@getmicdrop/venue-calendar 4.3.138 → 4.3.139
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +895 -840
- package/dist/AddOnCard-Dlt_4lut.js +475 -0
- package/dist/{Button-B_gbGd63.js → Button-Ch5dRGa2.js} +1 -1
- package/dist/{Button-B1cBhdtC.js → Button-DpeQSoQ7.js} +58 -45
- package/dist/Calendar-CNWS2xiR.js +396 -0
- package/dist/CalendarFoundryView-B5puOxH5.js +16431 -0
- package/dist/{ChartBlock-DcsCXfX8.js → ChartBlock-vihMKVdW.js} +2 -2
- package/dist/Checkout-B2FvX6Af.js +1070 -0
- package/dist/Checkout-y0x-v-XH.js +1995 -0
- package/dist/{ChevronDownOutline-kFgRY2cg.js → CloseOutline-Bh9UO94v.js} +2 -2
- package/dist/{CollectionView-C0vDg5oJ.js → CollectionView-CcLlV-1f.js} +22 -24
- package/dist/{CropImage-BWYeQXXA.js → CropImage-DqLAGy5s.js} +6 -6
- package/dist/{DatePicker-v-4ijT8N.js → DatePicker-D20Te0JY.js} +222 -215
- package/dist/{Event-vlu8IAxh.js → Event-DoIU0o6C.js} +799 -796
- package/dist/{EventCard-puoh3xag.js → EventCard-B8MYLyIW.js} +1 -1
- package/dist/EventPage-DM4tjCcL.js +1298 -0
- package/dist/{FilterChipGroup-DUGvOaRI.js → FilterChipGroup-BCjc7-pE.js} +1 -1
- package/dist/{ImageUploader-CKrf5amy.js → ImageUploader-BzxKIyLN.js} +324 -375
- package/dist/{Input-BQk4itex.js → Input-Bp5EgI1F.js} +5 -3
- package/dist/Modal-C6EXgkuF.js +159 -0
- package/dist/{ModalFooter-gFaDKsfj.js → ModalFooter-C4TD3-zP.js} +1 -1
- package/dist/{ModalTitle-CS5AGwrU.js → ModalTitle-BP4Bm3sA.js} +1 -1
- package/dist/{PasswordInput-C65GqxdF.js → PasswordInput-BlzSrkPs.js} +1 -1
- package/dist/{PhoneInput-Dj1I3bEn.js → PhoneInput-_ByjRGQ0.js} +2 -2
- package/dist/{RecommendationsRail-DC5qX1ei.js → RecommendationsRail-BDNnbL-p.js} +53 -50
- package/dist/{Search-BE64QcmK.js → Search-vhGEpog6.js} +1 -1
- package/dist/SeriesPage-YE8czX1M.js +32 -0
- package/dist/{SkeletonLoader-DfW0N9R3.js → SkeletonLoader-Beh2izdy.js} +1 -1
- package/dist/Spinner-DgubkWKo.js +88 -0
- package/dist/{Success-D3CrUeka.js → Success-CN5HB8gN.js} +164 -166
- package/dist/{TimePicker-HYzPI_Dc.js → TimePicker-BDuy9Ap8.js} +1 -1
- package/dist/{ViewTicketsEmbed-DzUCgtA3.js → ViewTicketsEmbed-DvoMIiKJ.js} +9 -10
- package/dist/{address-field-BwGHcMKY.js → address-field-DOalICpt.js} +2 -2
- package/dist/{allowlist-Bt1BHhNd.js → allowlist-DinkGF2L.js} +77 -68
- package/dist/api/api.cjs +1 -1
- package/dist/api/api.mjs +320 -297
- package/dist/api/client.d.ts +14 -53
- package/dist/api/events.d.ts +15 -1
- package/dist/api/result.d.ts +9 -0
- package/dist/{api-CRHFSJDI.js → api-CsAx0rmV.js} +150 -145
- package/dist/{avatar-picker-field-CSF5okeM.js → avatar-picker-field-CV4vRxTB.js} +14 -14
- package/dist/{checkoutState-BDNjJRMG.js → checkoutState-DSx7g3Vy.js} +12 -21
- package/dist/{client-BIN_q-of.js → client-SaDt6559.js} +18 -12
- package/dist/{constants-DrFV2oht.js → constants-sRRJh0u-.js} +1 -1
- package/dist/{date-field-3tgOYbzF.js → date-field-DylJx0y7.js} +9 -9
- package/dist/{date-range-field-D0Aq9me9.js → date-range-field-BOV1V2ab.js} +7 -7
- package/dist/{de-CUrE_4a4.js → de-CzkX3H3B.js} +1 -0
- package/dist/{defaultLabels-CybwJCNn.js → defaultLabels-DLK6rq4q.js} +1 -0
- package/dist/{defaults-B5wyre5O.js → defaults-Cbuin1WS.js} +2 -3
- package/dist/{es-B2-z2Kft.js → es-BOLzv8eD.js} +1 -0
- package/dist/{event-CEg17hts.js → event-ClsLWtR0.js} +1 -1
- package/dist/{event-transform-DqFigNQg.js → event-transform-Cs63X0hI.js} +42 -42
- package/dist/{eventStatusStream-DK5fWCTB.js → eventStatusStream-BAh5nJP2.js} +1 -1
- package/dist/{field-rules-CKFFB16Q.js → field-rules-Yb2JY1qT.js} +1 -1
- package/dist/{file-field-2mPz4Da-.js → file-field-Dwo80kDg.js} +4 -4
- package/dist/format-CehusdDg.js +1718 -0
- package/dist/{formatters-CzKNRUwz.js → formatters-DUWbI_Eg.js} +25 -35
- package/dist/{fr-CiePVIlj.js → fr-DYTIBBXo.js} +1 -0
- package/dist/{href-DpbLXQ4c.js → href-BXhNawil.js} +1 -1
- package/dist/i18n-BNF6a-QA.js +720 -0
- package/dist/i18n-F_QOaHVh.js +26 -0
- package/dist/{id-Ttw95_7t.js → id-CIyIkGhH.js} +1 -0
- package/dist/{image-field-B8x0WQ2j.js → image-field-DeLzsJlz.js} +2 -2
- package/dist/{it-CBbXcFY1.js → it-CF4Db_nK.js} +1 -0
- package/dist/{ja-B2Tag7J3.js → ja-5-7WNHD1.js} +1 -0
- package/dist/{ko-CcTn4lAi.js → ko-huIzHR3W.js} +1 -0
- package/dist/locales/4.3.139/main/de.js +1 -0
- package/dist/locales/4.3.139/main/es.js +1 -0
- package/dist/locales/4.3.139/main/fr.js +1 -0
- package/dist/locales/4.3.139/main/id.js +1 -0
- package/dist/locales/4.3.139/main/it.js +1 -0
- package/dist/locales/4.3.139/main/ja.js +1 -0
- package/dist/locales/4.3.139/main/ko.js +1 -0
- package/dist/locales/4.3.139/main/nl.js +1 -0
- package/dist/locales/4.3.139/main/pl.js +1 -0
- package/dist/locales/4.3.139/main/pt-br.js +1 -0
- package/dist/locales/4.3.139/main/tr.js +1 -0
- package/dist/locales/4.3.139/main/zh.js +1 -0
- package/dist/look-island.svelte-D87MvHNy.js +1296 -0
- package/dist/{look-names-JI6GE-Zj.js → look-names-B9MywEzX.js} +68 -58
- package/dist/looks/4.3.139/AddOnCard-CKdkGcHH.js +1 -0
- package/dist/looks/4.3.139/Checkout-D7CaFYTE.js +1 -0
- package/dist/looks/4.3.139/Checkout-DuP46PMi.js +3 -0
- package/dist/looks/4.3.139/CollectionView-CWm57JCx.js +1 -0
- package/dist/looks/4.3.139/Event-ePupb4qY.js +8 -0
- package/dist/looks/4.3.139/EventPage-CgexXhEU.js +1 -0
- package/dist/looks/4.3.139/RecommendationsRail-Bz-Mj_r4.js +2 -0
- package/dist/looks/4.3.139/SeriesPage-DI2uFF0Y.js +1 -0
- package/dist/looks/4.3.139/Success-BkMzmgmc.js +3 -0
- package/dist/looks/4.3.139/ViewTicketsEmbed-CbEJwRry.js +1 -0
- package/dist/looks/4.3.139/_vc-foundry-calendar-stub-BVbAFEK2.js +1 -0
- package/dist/looks/4.3.139/buyerEmail-CqCYa9UL.js +1 -0
- package/dist/looks/4.3.139/constants-CU_ZgyQu.js +3 -0
- package/dist/looks/4.3.139/defaults-B46SFFK4.js +2 -0
- package/dist/looks/4.3.139/dist-BWGSqtWN.js +1 -0
- package/dist/looks/4.3.139/eventStatusStream-CW5lJwsa.js +10 -0
- package/dist/looks/4.3.139/first-core-DrYq9wBy.js +151 -0
- package/dist/looks/4.3.139/first-mount.svelte-DFSLaJWm.js +1 -0
- package/dist/looks/4.3.139/first-seo-DvHuCXT6.js +1 -0
- package/dist/looks/4.3.139/first.js +1 -0
- package/dist/looks/4.3.139/full-widget-DDBk3i4U.js +2 -0
- package/dist/looks/4.3.139/gate-password-cache-D4Zls6QM.js +1 -0
- package/dist/looks/4.3.139/i18n-DRaFNYsQ.js +1 -0
- package/dist/looks/4.3.139/listing-BSaRTkxW.js +1 -0
- package/dist/looks/4.3.139/loaders.runtime-BNG8O6-A.js +1 -0
- package/dist/looks/4.3.139/looks.js +1 -0
- package/dist/looks/4.3.139/modalManager.svelte-CqQWYz9Y.js +1 -0
- package/dist/looks/4.3.139/rolldown-runtime-4tVxZq34.js +1 -0
- package/dist/looks/4.3.139/serverTotals-Bu1fAPLB.js +1 -0
- package/dist/looks/4.3.139/showcase-state-options-CpCMAKVD.js +1 -0
- package/dist/looks/4.3.139/utils-pGRhH4A-.js +1 -0
- package/dist/{media-field-HieD0ye0.js → media-field-PW8ye6EL.js} +2 -2
- package/dist/modalManager.svelte-BHE0t9q3.js +79 -0
- package/dist/{multiselect-field-CJ4lUJyS.js → multiselect-field-CmocFs5f.js} +2 -2
- package/dist/navigation-B8rkS2On.js +348 -0
- package/dist/{nl-DeIqgjIs.js → nl-B1dv1lqk.js} +1 -0
- package/dist/{number-field-D5GkkGLB.js → number-field-CUD936Ai.js} +3 -3
- package/dist/{numeric-filter-field-CRWZFu_P.js → numeric-filter-field-BmgSYhOt.js} +3 -3
- package/dist/{password-field-DdOHXEOo.js → password-field-BfvcZUi_.js} +1 -1
- package/dist/{phone-field-BaYmp56f.js → phone-field-DO0U_YZ6.js} +17 -18
- package/dist/{pixels-BXXzmoCb.js → pixels-ipedGW6i.js} +7 -7
- package/dist/{pl-Bm2FcD5y.js → pl-DLlM_IPo.js} +1 -0
- package/dist/{pt-br-XS1Lsa6z.js → pt-br-8V3mf7pu.js} +1 -0
- package/dist/repeating-field-BwtJ6VS1.js +488 -0
- package/dist/{richtext-field-KmUytgBW.js → richtext-field-DvLCxPvq.js} +2 -2
- package/dist/{datetime-BlEsN_-8.js → scarcity-DfQvyhJP.js} +74 -85
- package/dist/{searchable-select-field-DettZRav.js → searchable-select-field-zuIqfoQM.js} +17 -17
- package/dist/{select-field-Wc4gAtou.js → select-field-DNNN-a9q.js} +6 -6
- package/dist/seo/HostSeoController.d.ts +13 -0
- package/dist/seo/seo.cjs +1 -1
- package/dist/seo/seo.mjs +18 -11
- package/dist/{serverTotals-COsx7Mc5.js → serverTotals-BprgDwOw.js} +1 -1
- package/dist/{showcase-state-options-CHGUaZtl.js → showcase-state-options-bKRf48yz.js} +2 -2
- package/dist/{time-field-CnxZcziR.js → time-field-DmPCoppV.js} +2 -2
- package/dist/{to-event-card-props-C9v9dspT.js → to-event-card-props-KVcCJ2JF.js} +34 -34
- package/dist/{tr-zKAbMfgi.js → tr-DiUEV65j.js} +1 -0
- package/dist/{tree-picker-field-aqux58EQ.js → tree-picker-field-BJwSFAqm.js} +8 -8
- package/dist/types/index.d.ts +3 -0
- package/dist/{utils-AIszIHUb.js → utils-x8YXRKvr.js} +12 -12
- package/dist/venue-BjLCg-PW.js +38 -0
- package/dist/venue-calendar.css +1 -1
- package/dist/venue-calendar.es.js +1655 -1539
- package/dist/venue-calendar.iife.js +1 -54
- package/dist/venue-calendar.umd.js +69 -63
- package/dist/{widget-key-context-BrWW0fyM.js → widget-key-context-dHM9FiuJ.js} +8 -37
- package/dist/{zh-DHfgJplH.js → zh-Cej2EPQt.js} +1 -0
- package/package.json +2 -2
- package/src/lib/constants/scarcity.ts +1 -2
- package/dist/AddOnCard-DEAC26HA.js +0 -348
- package/dist/BlockPlaceholder-BKfoE795.js +0 -59
- package/dist/Calendar-9xskvKUf.js +0 -395
- package/dist/CalendarFoundryView-DbxZNmY7.js +0 -16356
- package/dist/CartView-DMINN6bY.js +0 -2200
- package/dist/Checkbox-sObkYRdj.js +0 -60
- package/dist/Checkout-H9RGBU9D.js +0 -1071
- package/dist/Checkout-VnochAZE.js +0 -1967
- package/dist/CheckoutTimer-mjcYR3XU.js +0 -42
- package/dist/EventPage-DycxjX5Z.js +0 -1301
- package/dist/Modal-DOpDiAwN.js +0 -102
- package/dist/ScarcityBadge-BAaV2CIY.js +0 -141
- package/dist/SeriesPage-Cx89s2B6.js +0 -34
- package/dist/Skeleton-B6qB_udJ.js +0 -31
- package/dist/Spinner-Bj4dr9kO.js +0 -19
- package/dist/Textarea-BDcuBI13.js +0 -72
- package/dist/__SKIP_NAVIGATION__-Znm_vYcG.js +0 -5
- package/dist/__SKIP_PATHS__-Bzzrca_a.js +0 -5
- package/dist/calendar-Cdu8fCIt.js +0 -111
- package/dist/cta-qbcIt5Gh.js +0 -116
- package/dist/format-CypC4vWs.js +0 -1587
- package/dist/heic-to-BoLfsr3l.js +0 -70
- package/dist/i18n-B_TWnExv.js +0 -495
- package/dist/i18n-CSaUFnlD.js +0 -26
- package/dist/instant-BkZCSGDm.js +0 -162
- package/dist/labels-D8LN8lY7.js +0 -227
- package/dist/locales/4.3.138/main/de.js +0 -1
- package/dist/locales/4.3.138/main/es.js +0 -1
- package/dist/locales/4.3.138/main/fr.js +0 -1
- package/dist/locales/4.3.138/main/id.js +0 -1
- package/dist/locales/4.3.138/main/it.js +0 -1
- package/dist/locales/4.3.138/main/ja.js +0 -1
- package/dist/locales/4.3.138/main/ko.js +0 -1
- package/dist/locales/4.3.138/main/nl.js +0 -1
- package/dist/locales/4.3.138/main/pl.js +0 -1
- package/dist/locales/4.3.138/main/pt-br.js +0 -1
- package/dist/locales/4.3.138/main/tr.js +0 -1
- package/dist/locales/4.3.138/main/zh.js +0 -1
- package/dist/look-island.svelte-B7UH_QVv.js +0 -1270
- package/dist/looks/4.3.138/looks.js +0 -248
- package/dist/modalManager.svelte-BvyrTI6p.js +0 -51
- package/dist/navigation-DpqP-ahJ.js +0 -241
- package/dist/repeating-field-B4OhsaGB.js +0 -488
- package/dist/venue-DLkL7xdj.js +0 -12
- /package/dist/checkout-libs/{4.3.138 → 4.3.139}/phone.js +0 -0
- /package/dist/checkout-libs/{4.3.138 → 4.3.139}/qrcode.js +0 -0
- /package/dist/locales/{4.3.138 → 4.3.139}/flow/de.js +0 -0
- /package/dist/locales/{4.3.138 → 4.3.139}/flow/es.js +0 -0
- /package/dist/locales/{4.3.138 → 4.3.139}/flow/fr.js +0 -0
- /package/dist/locales/{4.3.138 → 4.3.139}/flow/id.js +0 -0
- /package/dist/locales/{4.3.138 → 4.3.139}/flow/it.js +0 -0
- /package/dist/locales/{4.3.138 → 4.3.139}/flow/ja.js +0 -0
- /package/dist/locales/{4.3.138 → 4.3.139}/flow/ko.js +0 -0
- /package/dist/locales/{4.3.138 → 4.3.139}/flow/nl.js +0 -0
- /package/dist/locales/{4.3.138 → 4.3.139}/flow/pl.js +0 -0
- /package/dist/locales/{4.3.138 → 4.3.139}/flow/pt-br.js +0 -0
- /package/dist/locales/{4.3.138 → 4.3.139}/flow/tr.js +0 -0
- /package/dist/locales/{4.3.138 → 4.3.139}/flow/zh.js +0 -0
- /package/dist/looks/{4.3.138 → 4.3.139}/micdrop-wordmark-BYMG6vLR.svg +0 -0
- /package/dist/looks/{4.3.138 → 4.3.139}/microphone-Ccv4r-kd.webp +0 -0
- /package/dist/looks/{4.3.138 → 4.3.139}/superuser-CZF6a5gO.webp +0 -0
- /package/dist/looks/{4.3.138 → 4.3.139}/treasury-DUE7lZzT.webp +0 -0
- /package/dist/looks/{4.3.138 → 4.3.139}/user-image-yuS4errP.svg +0 -0
package/dist/api/api.mjs
CHANGED
|
@@ -86,18 +86,18 @@ async function he(e, t, n) {
|
|
|
86
86
|
throw a;
|
|
87
87
|
}
|
|
88
88
|
async function T(e, t) {
|
|
89
|
-
return
|
|
89
|
+
return D("GET", e, void 0, t);
|
|
90
90
|
}
|
|
91
91
|
async function E(e, t, n) {
|
|
92
|
-
return
|
|
92
|
+
return D("POST", e, t, n);
|
|
93
93
|
}
|
|
94
94
|
async function ge(e, t, n) {
|
|
95
|
-
return
|
|
95
|
+
return D("PUT", e, t, n);
|
|
96
96
|
}
|
|
97
|
-
async function
|
|
98
|
-
return
|
|
97
|
+
async function _e(e, t) {
|
|
98
|
+
return D("DELETE", e, void 0, t);
|
|
99
99
|
}
|
|
100
|
-
async function
|
|
100
|
+
async function D(e, t, n, r) {
|
|
101
101
|
let i = t.startsWith("http") || t.startsWith("/api/") ? t : `${C()}${t}`, { widgetKey: a, suppressOnError: o, headers: s, ...c } = r ?? {}, l = (e) => {
|
|
102
102
|
o || S.onError(e);
|
|
103
103
|
};
|
|
@@ -139,7 +139,11 @@ async function O(e, t, n, r) {
|
|
|
139
139
|
};
|
|
140
140
|
}
|
|
141
141
|
}
|
|
142
|
-
async function
|
|
142
|
+
async function O(e, t) {
|
|
143
|
+
return (await ye(e, t)).data;
|
|
144
|
+
}
|
|
145
|
+
var ve = ye;
|
|
146
|
+
async function ye(e, t) {
|
|
143
147
|
try {
|
|
144
148
|
let n = e.startsWith(S.baseUrl), { widgetKey: r, ...i } = t ?? {}, a = await he(e, {
|
|
145
149
|
...i,
|
|
@@ -147,15 +151,24 @@ async function k(e, t) {
|
|
|
147
151
|
}, S);
|
|
148
152
|
if (!a.ok) {
|
|
149
153
|
let e = await a.json().catch(() => ({}));
|
|
150
|
-
return b.error(`API request failed: ${a.status}`, e),
|
|
154
|
+
return b.error(`API request failed: ${a.status}`, e), {
|
|
155
|
+
data: null,
|
|
156
|
+
status: a.status
|
|
157
|
+
};
|
|
151
158
|
}
|
|
152
|
-
return
|
|
159
|
+
return {
|
|
160
|
+
data: await a.json(),
|
|
161
|
+
status: a.status
|
|
162
|
+
};
|
|
153
163
|
} catch (e) {
|
|
154
|
-
return b.error("API request error:", e),
|
|
164
|
+
return b.error("API request error:", e), {
|
|
165
|
+
data: null,
|
|
166
|
+
status: 0
|
|
167
|
+
};
|
|
155
168
|
}
|
|
156
169
|
}
|
|
157
170
|
// src/lib/api/transformers/cart.ts
|
|
158
|
-
function
|
|
171
|
+
function be(e) {
|
|
159
172
|
let t = e ?? {};
|
|
160
173
|
return {
|
|
161
174
|
ticketID: Number(t.TicketID ?? t.ticketID ?? 0),
|
|
@@ -164,7 +177,7 @@ function _e(e) {
|
|
|
164
177
|
status: String(t.Status ?? t.status ?? "")
|
|
165
178
|
};
|
|
166
179
|
}
|
|
167
|
-
function
|
|
180
|
+
function xe(e) {
|
|
168
181
|
let t = e ?? {}, n = t.Amount ?? t.amount, r = Number(n);
|
|
169
182
|
return {
|
|
170
183
|
giftCardId: Number(t.GiftCardID ?? t.giftCardId ?? 0),
|
|
@@ -172,51 +185,51 @@ function ve(e) {
|
|
|
172
185
|
amount: n == null || !Number.isFinite(r) ? null : i(p(r))
|
|
173
186
|
};
|
|
174
187
|
}
|
|
175
|
-
function
|
|
188
|
+
function Se(e) {
|
|
176
189
|
let t = e ?? {};
|
|
177
190
|
return {
|
|
178
191
|
uuid: t.UUID ?? t.uuid ?? "",
|
|
179
192
|
eventID: Number(t.EventID ?? t.eventID ?? 0),
|
|
180
193
|
status: t.Status ?? t.status ?? "",
|
|
181
194
|
expiresAt: t.ExpiresAt ?? t.expiresAt ?? "",
|
|
182
|
-
reservations: (t.Reservations ?? t.reservations ?? []).map(
|
|
183
|
-
giftCards: (t.GiftCards ?? t.giftCards ?? []).map(
|
|
195
|
+
reservations: (t.Reservations ?? t.reservations ?? []).map(be),
|
|
196
|
+
giftCards: (t.GiftCards ?? t.giftCards ?? []).map(xe)
|
|
184
197
|
};
|
|
185
198
|
}
|
|
186
199
|
// src/lib/tracking/normalize.ts
|
|
187
|
-
var
|
|
200
|
+
var Ce = [
|
|
188
201
|
"utmSource",
|
|
189
202
|
"utmMedium",
|
|
190
203
|
"utmCampaign",
|
|
191
204
|
"utmContent",
|
|
192
205
|
"utmTerm"
|
|
193
|
-
],
|
|
206
|
+
], we = {
|
|
194
207
|
utmSource: "utm_source",
|
|
195
208
|
utmMedium: "utm_medium",
|
|
196
209
|
utmCampaign: "utm_campaign",
|
|
197
210
|
utmContent: "utm_content",
|
|
198
211
|
utmTerm: "utm_term"
|
|
199
|
-
},
|
|
200
|
-
function
|
|
212
|
+
}, Te = "direct";
|
|
213
|
+
function Ee(e) {
|
|
201
214
|
return e ? e.trim().toLowerCase().replace(/\s+/g, "_") : "";
|
|
202
215
|
}
|
|
203
|
-
function
|
|
216
|
+
function De(e) {
|
|
204
217
|
let t = {};
|
|
205
|
-
for (let n of
|
|
206
|
-
return t.utmSource ||=
|
|
218
|
+
for (let n of Ce) t[n] = Ee(e[n]);
|
|
219
|
+
return t.utmSource ||= Te, t;
|
|
207
220
|
}
|
|
208
|
-
function
|
|
221
|
+
function Oe(e) {
|
|
209
222
|
let t = {};
|
|
210
|
-
for (let n of
|
|
211
|
-
return
|
|
223
|
+
for (let n of Ce) t[n] = e.get(we[n]);
|
|
224
|
+
return De(t);
|
|
212
225
|
}
|
|
213
226
|
// src/lib/tracking/context.ts
|
|
214
|
-
var
|
|
227
|
+
var k = {
|
|
215
228
|
search: null,
|
|
216
229
|
referrer: null,
|
|
217
230
|
pageUrl: null
|
|
218
231
|
};
|
|
219
|
-
function
|
|
232
|
+
function ke() {
|
|
220
233
|
if (typeof window > "u") return !0;
|
|
221
234
|
try {
|
|
222
235
|
return window.self === window.top;
|
|
@@ -224,34 +237,34 @@ function Ee() {
|
|
|
224
237
|
return !1;
|
|
225
238
|
}
|
|
226
239
|
}
|
|
227
|
-
function
|
|
228
|
-
let e = typeof window < "u", t =
|
|
240
|
+
function Ae() {
|
|
241
|
+
let e = typeof window < "u", t = ke(), n = k.search ?? (e ? window.location.search : ""), r = k.referrer ?? (typeof document < "u" ? document.referrer : "") ?? "", i = k.pageUrl ?? (e && t ? window.location.href : "");
|
|
229
242
|
return {
|
|
230
|
-
utm:
|
|
243
|
+
utm: Oe(new URLSearchParams(n)),
|
|
231
244
|
referrer: r || "",
|
|
232
245
|
pageUrl: i || ""
|
|
233
246
|
};
|
|
234
247
|
}
|
|
235
248
|
// src/lib/tracking/consent.ts
|
|
236
|
-
var
|
|
237
|
-
function
|
|
249
|
+
var je = null, Me = !1;
|
|
250
|
+
function Ne() {
|
|
238
251
|
return typeof window < "u" && typeof window.__tcfapi == "function";
|
|
239
252
|
}
|
|
240
|
-
function
|
|
253
|
+
function Pe() {
|
|
241
254
|
return typeof navigator < "u" && navigator.globalPrivacyControl === !0;
|
|
242
255
|
}
|
|
243
|
-
function
|
|
244
|
-
return
|
|
256
|
+
function Fe() {
|
|
257
|
+
return je === null ? Ne() || Pe() : je;
|
|
245
258
|
}
|
|
246
|
-
function
|
|
247
|
-
return !
|
|
259
|
+
function Ie() {
|
|
260
|
+
return !Fe() || Me;
|
|
248
261
|
}
|
|
249
262
|
// src/lib/tracking/identity.ts
|
|
250
|
-
var
|
|
251
|
-
function
|
|
252
|
-
return typeof e == "string" &&
|
|
263
|
+
var Le = "micdrop_session_id", A = "micdrop_visitor_id", Re = /^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i;
|
|
264
|
+
function ze(e) {
|
|
265
|
+
return typeof e == "string" && Re.test(e);
|
|
253
266
|
}
|
|
254
|
-
function
|
|
267
|
+
function Be() {
|
|
255
268
|
let e = typeof crypto < "u" ? crypto : void 0;
|
|
256
269
|
if (e?.randomUUID) return e.randomUUID();
|
|
257
270
|
let t = /* @__PURE__ */ new Uint8Array(16);
|
|
@@ -262,20 +275,20 @@ function Le() {
|
|
|
262
275
|
for (let e = 0; e < 16; e++) n.push(t[e].toString(16).padStart(2, "0"));
|
|
263
276
|
return `${n[0]}${n[1]}${n[2]}${n[3]}-${n[4]}${n[5]}-${n[6]}${n[7]}-${n[8]}${n[9]}-${n[10]}${n[11]}${n[12]}${n[13]}${n[14]}${n[15]}`;
|
|
264
277
|
}
|
|
265
|
-
function
|
|
266
|
-
let e = l(
|
|
267
|
-
return e || (e =
|
|
278
|
+
function Ve() {
|
|
279
|
+
let e = l(Le);
|
|
280
|
+
return e || (e = Be(), f(Le, e)), e;
|
|
268
281
|
}
|
|
269
|
-
function
|
|
270
|
-
let t = c(
|
|
271
|
-
if (
|
|
282
|
+
function He(e) {
|
|
283
|
+
let t = c(A);
|
|
284
|
+
if (ze(t)) return {
|
|
272
285
|
id: t,
|
|
273
286
|
createdAt: e,
|
|
274
287
|
migrated: !0
|
|
275
288
|
};
|
|
276
289
|
if (t && typeof t == "object") {
|
|
277
290
|
let { id: n, createdAt: r } = t;
|
|
278
|
-
if (!
|
|
291
|
+
if (!ze(n)) return null;
|
|
279
292
|
let i = typeof r == "number" && Number.isFinite(r), a = i ? Math.min(r, e) : e;
|
|
280
293
|
return {
|
|
281
294
|
id: n,
|
|
@@ -285,36 +298,36 @@ function ze(e) {
|
|
|
285
298
|
}
|
|
286
299
|
return null;
|
|
287
300
|
}
|
|
288
|
-
function
|
|
289
|
-
if (!
|
|
290
|
-
let e = Date.now(), t =
|
|
301
|
+
function Ue() {
|
|
302
|
+
if (!Ie()) return null;
|
|
303
|
+
let e = Date.now(), t = He(e);
|
|
291
304
|
if (t && e - t.createdAt < 34128e6) {
|
|
292
305
|
if (t.migrated) {
|
|
293
306
|
let e = {
|
|
294
307
|
id: t.id,
|
|
295
308
|
createdAt: t.createdAt
|
|
296
309
|
};
|
|
297
|
-
d(
|
|
310
|
+
d(A, e);
|
|
298
311
|
}
|
|
299
312
|
return t.id;
|
|
300
313
|
}
|
|
301
|
-
let n =
|
|
302
|
-
return d(
|
|
314
|
+
let n = Be();
|
|
315
|
+
return d(A, {
|
|
303
316
|
id: n,
|
|
304
317
|
createdAt: e
|
|
305
318
|
}), n;
|
|
306
319
|
}
|
|
307
320
|
// src/lib/tracking/attribution-store.ts
|
|
308
|
-
var
|
|
309
|
-
function
|
|
310
|
-
let e = l(
|
|
321
|
+
var We = "micdrop_attribution";
|
|
322
|
+
function Ge() {
|
|
323
|
+
let e = l(We);
|
|
311
324
|
return !e || !e.utm || typeof e.utm.utmSource != "string" ? null : e;
|
|
312
325
|
}
|
|
313
|
-
function
|
|
314
|
-
let e =
|
|
326
|
+
function j() {
|
|
327
|
+
let e = Ge() ?? Ae();
|
|
315
328
|
return {
|
|
316
|
-
sessionId:
|
|
317
|
-
visitorId:
|
|
329
|
+
sessionId: Ve(),
|
|
330
|
+
visitorId: Ue(),
|
|
318
331
|
utmSource: e.utm.utmSource,
|
|
319
332
|
utmMedium: e.utm.utmMedium,
|
|
320
333
|
utmCampaign: e.utm.utmCampaign,
|
|
@@ -325,11 +338,11 @@ function M() {
|
|
|
325
338
|
}
|
|
326
339
|
a("tracking"), $state(0);
|
|
327
340
|
// src/lib/i18n/createI18n.js
|
|
328
|
-
function
|
|
341
|
+
function Ke() {
|
|
329
342
|
return typeof navigator > "u" ? null : navigator.language || navigator.userLanguage || null;
|
|
330
343
|
}
|
|
331
344
|
// src/lib/i18n/localeSpec.js
|
|
332
|
-
var
|
|
345
|
+
var qe = [
|
|
333
346
|
[
|
|
334
347
|
"es",
|
|
335
348
|
"es",
|
|
@@ -396,19 +409,19 @@ var We = [
|
|
|
396
409
|
"pl"
|
|
397
410
|
]
|
|
398
411
|
];
|
|
399
|
-
Array.from(new Set(
|
|
412
|
+
Array.from(new Set(qe.map(([, e]) => e)));
|
|
400
413
|
// src/lib/i18n/buyerLocale.ts
|
|
401
|
-
var
|
|
402
|
-
function
|
|
403
|
-
let t = e ||
|
|
414
|
+
var Je = new Map([["en", "en"], ...qe.map(([e]) => [e, e === "pt" || e === "pt-br" ? "pt-BR" : e])]);
|
|
415
|
+
function M(e) {
|
|
416
|
+
let t = e || Ke();
|
|
404
417
|
if (!t || typeof t != "string") return;
|
|
405
418
|
let n = t.toLowerCase();
|
|
406
|
-
return
|
|
419
|
+
return Je.get(n) ?? Je.get(n.split("-")[0]);
|
|
407
420
|
}
|
|
408
421
|
// src/lib/api/orders.ts
|
|
409
|
-
var
|
|
410
|
-
async function
|
|
411
|
-
let o =
|
|
422
|
+
var N = e("VC");
|
|
423
|
+
async function Ye(e, t, n, r, i, a) {
|
|
424
|
+
let o = M(i);
|
|
412
425
|
return E(`${w()}/cart/${e}/payment-intent`, {
|
|
413
426
|
productQuantities: t,
|
|
414
427
|
...n && Object.keys(n).length > 0 ? { donationAmounts: n } : {},
|
|
@@ -420,41 +433,41 @@ async function Ke(e, t, n, r, i, a) {
|
|
|
420
433
|
questionAnswer: r.questionAnswer ?? "",
|
|
421
434
|
mailingList: r.mailingList ?? !1
|
|
422
435
|
} : {},
|
|
423
|
-
attribution:
|
|
436
|
+
attribution: j(),
|
|
424
437
|
...o ? { locale: o } : {}
|
|
425
438
|
}, { widgetKey: a?.widgetKey });
|
|
426
439
|
}
|
|
427
|
-
async function
|
|
440
|
+
async function Xe(e, n, r, i, a, o) {
|
|
428
441
|
try {
|
|
429
|
-
let s = await
|
|
430
|
-
if (!s.success) throw
|
|
442
|
+
let s = await Ye(e, n, r, i, a, o);
|
|
443
|
+
if (!s.success) throw N.error("Payment intent creation failed:", s.error), new t(s.error || "Failed to create payment intent", s.statusCode ?? 0, {
|
|
431
444
|
endpoint: `${w()}/cart/${e}/payment-intent`,
|
|
432
445
|
method: "POST"
|
|
433
446
|
});
|
|
434
|
-
return
|
|
447
|
+
return N.debug("Payment intent created:", s.data), s.data;
|
|
435
448
|
} catch (e) {
|
|
436
|
-
return
|
|
449
|
+
return N.error("createPaymentIntent error:", e), null;
|
|
437
450
|
}
|
|
438
451
|
}
|
|
439
|
-
var
|
|
440
|
-
async function
|
|
452
|
+
var Ze = "VALIDATION_FAILED";
|
|
453
|
+
async function Qe(e, t, n, r, i, a) {
|
|
441
454
|
let o;
|
|
442
455
|
try {
|
|
443
|
-
o = await
|
|
456
|
+
o = await Ye(e, t, n, r, i, a);
|
|
444
457
|
} catch (e) {
|
|
445
|
-
return
|
|
458
|
+
return N.error("submitCheckoutAnswers error:", e), { refusal: null };
|
|
446
459
|
}
|
|
447
460
|
return o.success ? {
|
|
448
461
|
refusal: null,
|
|
449
462
|
clientSecret: o.data?.client_secret
|
|
450
|
-
} : o.errorCode ===
|
|
463
|
+
} : o.errorCode === Ze && o.error ? (N.debug("Checkout answers refused:", o.error), { refusal: o.error }) : (N.error("Checkout answers call failed:", o.error), { refusal: null });
|
|
451
464
|
}
|
|
452
|
-
async function
|
|
465
|
+
async function $e(e, t, n) {
|
|
453
466
|
if (!e) return null;
|
|
454
467
|
try {
|
|
455
468
|
let r = await T(`${w()}/cart/${e}`, { widgetKey: n?.widgetKey });
|
|
456
469
|
if (!r.success) return null;
|
|
457
|
-
let { uuid: i, eventID: a, status: o, expiresAt: s, reservations: c, giftCards: l } =
|
|
470
|
+
let { uuid: i, eventID: a, status: o, expiresAt: s, reservations: c, giftCards: l } = Se(r.data);
|
|
458
471
|
return o !== "reserved" && o !== "active" || t !== void 0 && a !== Number(t) ? null : {
|
|
459
472
|
uuid: i,
|
|
460
473
|
eventID: a,
|
|
@@ -464,10 +477,10 @@ async function Xe(e, t, n) {
|
|
|
464
477
|
giftCards: l
|
|
465
478
|
};
|
|
466
479
|
} catch (e) {
|
|
467
|
-
return
|
|
480
|
+
return N.error("getCartByUUID error:", e), null;
|
|
468
481
|
}
|
|
469
482
|
}
|
|
470
|
-
async function
|
|
483
|
+
async function et(e, t, n) {
|
|
471
484
|
try {
|
|
472
485
|
let r = {};
|
|
473
486
|
for (let [e, n] of Object.entries(t)) {
|
|
@@ -489,14 +502,14 @@ async function Ze(e, t, n) {
|
|
|
489
502
|
});
|
|
490
503
|
if (!a.ok) {
|
|
491
504
|
let e = await a.json().catch(() => ({}));
|
|
492
|
-
return
|
|
505
|
+
return N.error("Cart update failed:", e), !1;
|
|
493
506
|
}
|
|
494
507
|
return !0;
|
|
495
508
|
} catch (e) {
|
|
496
|
-
return
|
|
509
|
+
return N.error("updateCartQuantities error:", e), !1;
|
|
497
510
|
}
|
|
498
511
|
}
|
|
499
|
-
async function
|
|
512
|
+
async function tt(e, t) {
|
|
500
513
|
try {
|
|
501
514
|
let n = await E(`${C()}/orders/complete/${e}`, void 0, { widgetKey: t?.widgetKey });
|
|
502
515
|
return n.success ? {
|
|
@@ -507,13 +520,13 @@ async function Qe(e, t) {
|
|
|
507
520
|
error: n.error || "Failed to complete reservation"
|
|
508
521
|
};
|
|
509
522
|
} catch (e) {
|
|
510
|
-
return
|
|
523
|
+
return N.error("Error completing reservation:", e), {
|
|
511
524
|
success: !1,
|
|
512
525
|
error: "Network error completing reservation"
|
|
513
526
|
};
|
|
514
527
|
}
|
|
515
528
|
}
|
|
516
|
-
async function
|
|
529
|
+
async function nt(e, t) {
|
|
517
530
|
try {
|
|
518
531
|
let n = await E(`${C()}/orders/cancel/${e}`, void 0, { widgetKey: t?.widgetKey });
|
|
519
532
|
return n.success ? {
|
|
@@ -524,36 +537,36 @@ async function $e(e, t) {
|
|
|
524
537
|
error: n.error || "Failed to cancel reservation"
|
|
525
538
|
};
|
|
526
539
|
} catch (e) {
|
|
527
|
-
return
|
|
540
|
+
return N.error("Error cancelling reservation:", e), {
|
|
528
541
|
success: !1,
|
|
529
542
|
error: "Network error cancelling reservation"
|
|
530
543
|
};
|
|
531
544
|
}
|
|
532
545
|
}
|
|
533
|
-
async function
|
|
546
|
+
async function rt(e, t, n) {
|
|
534
547
|
try {
|
|
535
548
|
let r = await E(`${C()}/orders/create`, {
|
|
536
549
|
eventID: e,
|
|
537
550
|
promoCode: t,
|
|
538
|
-
attribution:
|
|
551
|
+
attribution: j()
|
|
539
552
|
}, { widgetKey: n?.widgetKey });
|
|
540
|
-
return r.success ? r.data : (
|
|
553
|
+
return r.success ? r.data : (N.error("Create order failed:", r.error), null);
|
|
541
554
|
} catch (e) {
|
|
542
|
-
return
|
|
555
|
+
return N.error("createOrder error:", e), null;
|
|
543
556
|
}
|
|
544
557
|
}
|
|
545
|
-
async function
|
|
546
|
-
return
|
|
558
|
+
async function it(e, t) {
|
|
559
|
+
return O(`${C()}/orders/${e}`, { widgetKey: t?.widgetKey });
|
|
547
560
|
}
|
|
548
|
-
async function
|
|
549
|
-
let i =
|
|
561
|
+
async function at(e, t, n, r) {
|
|
562
|
+
let i = M(n);
|
|
550
563
|
try {
|
|
551
564
|
let n = await E(`${w()}/validatePaymentIntent/${e}`, {
|
|
552
565
|
...t,
|
|
553
|
-
attribution:
|
|
566
|
+
attribution: j(),
|
|
554
567
|
...i ? { locale: i } : {}
|
|
555
568
|
}, { widgetKey: r?.widgetKey });
|
|
556
|
-
if (!n.success) return
|
|
569
|
+
if (!n.success) return N.error("Payment validation failed:", n.error), {
|
|
557
570
|
success: !1,
|
|
558
571
|
status: "failed",
|
|
559
572
|
error: n.error || "Payment validation failed"
|
|
@@ -570,10 +583,10 @@ async function nt(e, t, n, r) {
|
|
|
570
583
|
orderUUID: a.orderUUID || a.uuid
|
|
571
584
|
};
|
|
572
585
|
} catch (e) {
|
|
573
|
-
return
|
|
586
|
+
return N.error("validatePaymentIntent error:", e), null;
|
|
574
587
|
}
|
|
575
588
|
}
|
|
576
|
-
async function
|
|
589
|
+
async function ot(e, t) {
|
|
577
590
|
try {
|
|
578
591
|
let n = await E(`${C()}/orders/extend-session`, { orderUuid: e }, { widgetKey: t?.widgetKey });
|
|
579
592
|
if (!n.success) return {
|
|
@@ -588,13 +601,13 @@ async function rt(e, t) {
|
|
|
588
601
|
remainingExtensions: r.remainingExtensions
|
|
589
602
|
};
|
|
590
603
|
} catch (e) {
|
|
591
|
-
return
|
|
604
|
+
return N.error("Error extending checkout session:", e), {
|
|
592
605
|
success: !1,
|
|
593
606
|
error: "Network error extending session"
|
|
594
607
|
};
|
|
595
608
|
}
|
|
596
609
|
}
|
|
597
|
-
async function
|
|
610
|
+
async function st(e, t) {
|
|
598
611
|
try {
|
|
599
612
|
let n = await T(`${C()}/orders/session/${e}`, { widgetKey: t?.widgetKey });
|
|
600
613
|
if (!n.success) return {
|
|
@@ -611,37 +624,37 @@ async function it(e, t) {
|
|
|
611
624
|
eventStatus: r.eventStatus
|
|
612
625
|
};
|
|
613
626
|
} catch (e) {
|
|
614
|
-
return
|
|
627
|
+
return N.error("Error getting session status:", e), { error: "Network error getting session status" };
|
|
615
628
|
}
|
|
616
629
|
}
|
|
617
|
-
async function
|
|
630
|
+
async function ct(e = { eventID: "" }, t) {
|
|
618
631
|
try {
|
|
619
632
|
let n = await E(`${C()}/orders/create`, {
|
|
620
633
|
...e,
|
|
621
|
-
attribution:
|
|
634
|
+
attribution: j()
|
|
622
635
|
}, { widgetKey: t?.widgetKey });
|
|
623
|
-
return n.success ? n.data?.uuid ?? null : (
|
|
636
|
+
return n.success ? n.data?.uuid ?? null : (N.error("Order initiation failed:", n.error), null);
|
|
624
637
|
} catch (e) {
|
|
625
|
-
return
|
|
638
|
+
return N.error("initiateOrder error:", e), null;
|
|
626
639
|
}
|
|
627
640
|
}
|
|
628
|
-
async function
|
|
641
|
+
async function lt(e) {
|
|
629
642
|
if (typeof window > "u") return;
|
|
630
|
-
let t =
|
|
643
|
+
let t = Ee(new URLSearchParams(window.location.search).get("utm_source")) || "direct";
|
|
631
644
|
try {
|
|
632
645
|
await fetch(`${C()}/utm/${e}/${encodeURIComponent(t)}`);
|
|
633
646
|
} catch (e) {
|
|
634
|
-
|
|
647
|
+
N.error("UTM tracking failed:", e);
|
|
635
648
|
}
|
|
636
649
|
}
|
|
637
650
|
// src/lib/api/promo.ts
|
|
638
|
-
var
|
|
639
|
-
function
|
|
651
|
+
var P = e("VC");
|
|
652
|
+
function ut(e, t) {
|
|
640
653
|
if (e === 404) return "Promo code isn't valid.";
|
|
641
654
|
let n = (t ?? "").toLowerCase();
|
|
642
655
|
return e === 400 ? n.includes("not yet active") ? "Promo code doesn't apply." : n.includes("expired") ? "Promo code expired." : n.includes("limit") ? "Promo code has reached its limit." : "Promo code isn't valid." : "Failed to validate code";
|
|
643
656
|
}
|
|
644
|
-
async function
|
|
657
|
+
async function dt(e, t, n) {
|
|
645
658
|
try {
|
|
646
659
|
if (!t || !t.trim()) return {
|
|
647
660
|
valid: !1,
|
|
@@ -650,7 +663,7 @@ async function ct(e, t, n) {
|
|
|
650
663
|
let r = await T(`/promo-codes/validate/${e}/${encodeURIComponent(t.trim())}`, { widgetKey: n?.widgetKey });
|
|
651
664
|
if (!r.success) return {
|
|
652
665
|
valid: !1,
|
|
653
|
-
error:
|
|
666
|
+
error: ut(r.statusCode, r.error)
|
|
654
667
|
};
|
|
655
668
|
let i = r.data;
|
|
656
669
|
return {
|
|
@@ -665,21 +678,21 @@ async function ct(e, t, n) {
|
|
|
665
678
|
applyToTicketIds: i.applyToTicketIds
|
|
666
679
|
};
|
|
667
680
|
} catch (e) {
|
|
668
|
-
return
|
|
681
|
+
return P.error("Error validating promo code:", e), {
|
|
669
682
|
valid: !1,
|
|
670
683
|
error: "Network error validating code"
|
|
671
684
|
};
|
|
672
685
|
}
|
|
673
686
|
}
|
|
674
|
-
async function
|
|
687
|
+
async function ft(e, t) {
|
|
675
688
|
try {
|
|
676
689
|
let n = await T(`/promo-codes/check/${e}`, { widgetKey: t?.widgetKey });
|
|
677
690
|
return !n.success || n.data.hasPromoCodes === !0;
|
|
678
691
|
} catch (e) {
|
|
679
|
-
return
|
|
692
|
+
return P.error("Error checking promo codes availability:", e), !0;
|
|
680
693
|
}
|
|
681
694
|
}
|
|
682
|
-
async function
|
|
695
|
+
async function pt(e, t, n, r) {
|
|
683
696
|
try {
|
|
684
697
|
let i = { promoCode: t };
|
|
685
698
|
n && Object.keys(n).length > 0 && (i.productQuantities = n);
|
|
@@ -689,13 +702,13 @@ async function ut(e, t, n, r) {
|
|
|
689
702
|
error: a.error || "Failed to apply promo code"
|
|
690
703
|
};
|
|
691
704
|
} catch (e) {
|
|
692
|
-
return
|
|
705
|
+
return P.error("Error applying promo code:", e), {
|
|
693
706
|
success: !1,
|
|
694
707
|
error: "Network error applying code"
|
|
695
708
|
};
|
|
696
709
|
}
|
|
697
710
|
}
|
|
698
|
-
async function
|
|
711
|
+
async function mt(e, t) {
|
|
699
712
|
try {
|
|
700
713
|
let n = await E(`/orders/${e}/remove-promo`, void 0, { widgetKey: t?.widgetKey });
|
|
701
714
|
return n.success ? { success: !0 } : {
|
|
@@ -703,14 +716,14 @@ async function dt(e, t) {
|
|
|
703
716
|
error: n.error || "Failed to remove promo code"
|
|
704
717
|
};
|
|
705
718
|
} catch (e) {
|
|
706
|
-
return
|
|
719
|
+
return P.error("Error removing promo code:", e), {
|
|
707
720
|
success: !1,
|
|
708
721
|
error: "Network error removing code"
|
|
709
722
|
};
|
|
710
723
|
}
|
|
711
724
|
}
|
|
712
725
|
// src/lib/api/transformers/performer.ts
|
|
713
|
-
function
|
|
726
|
+
function ht(e) {
|
|
714
727
|
let t = e ?? {};
|
|
715
728
|
return {
|
|
716
729
|
performers: Array.isArray(t.performers) ? t.performers : [],
|
|
@@ -718,189 +731,199 @@ function ft(e) {
|
|
|
718
731
|
};
|
|
719
732
|
}
|
|
720
733
|
// src/lib/api/result.ts
|
|
721
|
-
function
|
|
734
|
+
function F(e) {
|
|
722
735
|
return {
|
|
723
736
|
ok: !0,
|
|
724
737
|
data: e
|
|
725
738
|
};
|
|
726
739
|
}
|
|
727
|
-
function
|
|
740
|
+
function I(e) {
|
|
728
741
|
return {
|
|
729
742
|
ok: !1,
|
|
730
743
|
error: e
|
|
731
744
|
};
|
|
732
745
|
}
|
|
733
|
-
function
|
|
746
|
+
function L(e) {
|
|
734
747
|
return {
|
|
735
748
|
ok: !1,
|
|
736
749
|
error: e,
|
|
737
750
|
notFound: !0
|
|
738
751
|
};
|
|
739
752
|
}
|
|
740
|
-
function
|
|
753
|
+
function gt(e) {
|
|
754
|
+
return {
|
|
755
|
+
ok: !1,
|
|
756
|
+
error: e,
|
|
757
|
+
forbidden: !0
|
|
758
|
+
};
|
|
759
|
+
}
|
|
760
|
+
function _t(e) {
|
|
741
761
|
return e.ok;
|
|
742
762
|
}
|
|
743
|
-
function
|
|
763
|
+
function vt(e) {
|
|
744
764
|
return !e.ok;
|
|
745
765
|
}
|
|
746
|
-
function
|
|
766
|
+
function R(e, t) {
|
|
747
767
|
return e.ok ? e.data : t;
|
|
748
768
|
}
|
|
749
769
|
// src/lib/api/route-manifest.ts
|
|
750
|
-
var
|
|
751
|
-
`${
|
|
770
|
+
var z = "/api/v2/public", B = "/api/orders/v2/public", yt = "/api/orders/v2", bt = "00000000-0000-0000-0000-000000000000", V = bt;
|
|
771
|
+
`${z}`, `${z}${V}`, `${z}`, `${z}${V}`, `${z}`, `${z}${V}`, `${z}`, `${z}${V}`, `${z}`, `${z}${V}`, `${z}`, `${z}${V}`, `${z}`, `${z}${V}`, `${z}`, `${z}${V}`, `${z}`, `${z}${V}`, `${z}`, `${z}`, `${z}`, `${z}`, `${z}`, `${z}${V}`, `${z}`, `${z}${V}`, `${z}`, `${z}${V}`, `${z}`, `${z}${V}`, `${z}`, `${z}${V}`, `${z}`, `${z}${V}`, `${z}`, `${z}${V}`, `${z}`, `${z}${V}`, `${z}`, `${z}${V}`, `${z}`, `${z}${V}`, `${z}`, `${z}`, `${z}`, `${z}${V}`, `${z}`, `${z}${V}`, `${z}`, `${z}${V}`, `${z}`, `${z}${V}`, `${z}`, `${z}${V}`, `${z}`, `${z}${V}`, `${z}`, `${z}${V}`, `${z}`, `${z}`, `${z}`, `${z}${V}`, `${z}`, `${z}${V}`, `${z}`, `${z}${V}`, `${z}`, `${z}${V}`, `${z}`, `${z}${V}`, `${z}`, `${z}${V}`, `${z}`, `${z}`, `${z}`, `${z}`, `${z}`, `${z}${V}`, `${z}`, `${z}${V}`, `${z}`, `${z}${V}`, `${z}`, `${z}${V}`, `${z}`, `${z}`, `${z}`, `${z}`, `${z}`, `${z}${V}`, `${B}`, `${B}`, `${B}`, `${B}${V}`, `${B}`, `${B}${V}`, `${B}`, `${B}${V}`, `${B}`, `${B}${V}`, `${B}`, `${B}${V}`, `${B}`, `${B}${V}`, `${B}`, `${B}${V}`, `${B}`, `${B}${V}`, `${B}`, `${B}${V}`, `${yt}`, `${yt}`, `${B}`, `${B}`, `${B}`, `${B}`, `${B}`, `${B}${V}`, `${z}`, `${z}${V}`;
|
|
752
772
|
// src/lib/api/events.ts
|
|
753
|
-
var
|
|
754
|
-
async function
|
|
773
|
+
var H = e("VC"), U = /* @__PURE__ */ new Map();
|
|
774
|
+
async function xt(e, t = fetch, n, r) {
|
|
755
775
|
let i = n ? `${e}:pw` : String(e), a = `${r?.widgetKey ?? ""}|${i}`;
|
|
756
776
|
if (t === fetch) {
|
|
757
|
-
let e =
|
|
777
|
+
let e = U.get(a);
|
|
758
778
|
if (e) return e;
|
|
759
779
|
}
|
|
760
780
|
let o = (async () => {
|
|
761
781
|
try {
|
|
762
782
|
let i = await t(n ? `${C()}/events/${e}?password=${encodeURIComponent(n)}` : `${C()}/events/${e}`, { headers: x(void 0, r?.widgetKey) });
|
|
763
|
-
if (!i.ok) return i.status === 404 ?
|
|
783
|
+
if (!i.ok) return i.status === 404 ? L("event_not_found") : (H.error(`Failed to fetch event details: ${i.status}`), I("event_fetch_failed"));
|
|
764
784
|
let a = await i.json();
|
|
765
|
-
return a ?
|
|
785
|
+
return a ? F(a) : L("event_not_found");
|
|
766
786
|
} catch (e) {
|
|
767
|
-
return
|
|
787
|
+
return H.error("Error fetching event details:", e), I("event_fetch_failed");
|
|
768
788
|
}
|
|
769
789
|
})();
|
|
770
|
-
return t === fetch && (
|
|
771
|
-
|
|
790
|
+
return t === fetch && (U.set(a, o), o.finally(() => {
|
|
791
|
+
U.get(a) === o && U.delete(a);
|
|
772
792
|
})), o;
|
|
773
793
|
}
|
|
774
|
-
async function
|
|
775
|
-
let i = await
|
|
794
|
+
async function St(e, t = fetch, n, r) {
|
|
795
|
+
let i = await xt(e, t, n, r);
|
|
776
796
|
return i.ok ? i.data : null;
|
|
777
797
|
}
|
|
778
|
-
async function
|
|
798
|
+
async function W(e, t, n = (e) => e, r) {
|
|
779
799
|
try {
|
|
780
|
-
let i = await
|
|
781
|
-
return i ?
|
|
800
|
+
let { data: i, status: a } = await ve(e, { widgetKey: r?.widgetKey });
|
|
801
|
+
return a === 403 ? (H.error(`Refused (${t}): this site may not read it`), gt(t)) : i ? F(n(i)) : (H.error(`Failed to load (${t}): network or server error`), I(t));
|
|
782
802
|
} catch (e) {
|
|
783
|
-
return
|
|
803
|
+
return H.error(`Error loading (${t}):`, e), I(t);
|
|
784
804
|
}
|
|
785
805
|
}
|
|
786
|
-
function
|
|
806
|
+
function G(e) {
|
|
787
807
|
return Array.isArray(e) ? e : [];
|
|
788
808
|
}
|
|
789
|
-
async function
|
|
809
|
+
async function Ct(e, t, n) {
|
|
790
810
|
let r = t?.trim(), i = r ? `?promoCode=${encodeURIComponent(r)}` : "";
|
|
791
|
-
return
|
|
811
|
+
return W(`${C()}/tickets/event/${e}${i}`, "tickets_fetch_failed", G, n);
|
|
792
812
|
}
|
|
793
|
-
async function
|
|
794
|
-
return
|
|
813
|
+
async function wt(e, t, n) {
|
|
814
|
+
return R(await Ct(e, t, n), []);
|
|
795
815
|
}
|
|
796
|
-
async function
|
|
797
|
-
return e ?
|
|
816
|
+
async function Tt(e, t) {
|
|
817
|
+
return e ? W(`${C()}/events/${e}/performers`, "performers_fetch_failed", (e) => ht(e), t) : (H.warn("fetchEventPerformers called without eventId"), I("performers_missing_event_id"));
|
|
798
818
|
}
|
|
799
|
-
async function
|
|
800
|
-
return
|
|
819
|
+
async function Et(e, t) {
|
|
820
|
+
return R(await Tt(e, t), {
|
|
801
821
|
performers: [],
|
|
802
822
|
showPerformers: !1
|
|
803
823
|
});
|
|
804
824
|
}
|
|
805
|
-
async function
|
|
806
|
-
return e ?
|
|
825
|
+
async function Dt(e, t) {
|
|
826
|
+
return e ? W(`${C()}/venues/organization/${e}`, "venues_fetch_failed", G, t) : (H.warn("fetchAllVenues called without orgId"), I("venues_missing_org_id"));
|
|
807
827
|
}
|
|
808
|
-
async function
|
|
809
|
-
return
|
|
828
|
+
async function Ot(e, t) {
|
|
829
|
+
return R(await Dt(e, t), []);
|
|
810
830
|
}
|
|
811
|
-
async function
|
|
812
|
-
return e ?
|
|
831
|
+
async function kt(e, t) {
|
|
832
|
+
return e ? W(`${C()}/events/venue/${e}`, "venue_events_fetch_failed", G, t) : (H.warn("fetchVenueEvents called without venueId"), I("venue_events_missing_venue_id"));
|
|
813
833
|
}
|
|
814
|
-
async function
|
|
815
|
-
return
|
|
834
|
+
async function At(e, t) {
|
|
835
|
+
return R(await kt(e, t), []);
|
|
816
836
|
}
|
|
817
|
-
function
|
|
837
|
+
function jt(e) {
|
|
818
838
|
return Array.isArray(e) ? e : Array.isArray(e.events) ? e.events : [];
|
|
819
839
|
}
|
|
820
|
-
var
|
|
821
|
-
function
|
|
840
|
+
var K = /* @__PURE__ */ new Map(), q = /* @__PURE__ */ new Map(), Mt = 3e4;
|
|
841
|
+
function Nt(e, t) {
|
|
822
842
|
return `${t?.widgetKey ?? ""}|${e}`;
|
|
823
843
|
}
|
|
824
|
-
function
|
|
844
|
+
function Pt(e, t, n) {
|
|
845
|
+
return `${C()}/events/venue/${e}/month/${t}/${n}`;
|
|
846
|
+
}
|
|
847
|
+
function Ft(e, t, n) {
|
|
825
848
|
return `${C()}/events/organization/${e}/month/${t}/${n}`;
|
|
826
849
|
}
|
|
827
|
-
function
|
|
828
|
-
let t =
|
|
829
|
-
return !t || (
|
|
850
|
+
function It(e) {
|
|
851
|
+
let t = q.get(e);
|
|
852
|
+
return !t || (q.delete(e), Date.now() - t.at > Mt) ? null : t.events;
|
|
830
853
|
}
|
|
831
|
-
function
|
|
832
|
-
let i =
|
|
833
|
-
if (n?.fresh)
|
|
854
|
+
function Lt(e, t, n, r) {
|
|
855
|
+
let i = Nt(e, r);
|
|
856
|
+
if (n?.fresh) q.delete(i);
|
|
834
857
|
else {
|
|
835
|
-
let e =
|
|
858
|
+
let e = K.get(i);
|
|
836
859
|
if (e) return e;
|
|
837
|
-
let t =
|
|
838
|
-
if (t) return Promise.resolve(
|
|
860
|
+
let t = It(i);
|
|
861
|
+
if (t) return Promise.resolve(F(t));
|
|
839
862
|
}
|
|
840
|
-
let a =
|
|
841
|
-
return
|
|
842
|
-
|
|
863
|
+
let a = W(e, t, (e) => jt(e), r);
|
|
864
|
+
return K.set(i, a), a.finally(() => {
|
|
865
|
+
K.get(i) === a && K.delete(i);
|
|
843
866
|
}), a;
|
|
844
867
|
}
|
|
845
|
-
async function
|
|
846
|
-
return
|
|
868
|
+
async function Rt(e, t, n, r, i) {
|
|
869
|
+
return Lt(Pt(e, t, n), "month_events_fetch_failed", r, i);
|
|
847
870
|
}
|
|
848
|
-
async function
|
|
849
|
-
return
|
|
871
|
+
async function zt(e, t, n, r) {
|
|
872
|
+
return R(await Rt(e, t, n, void 0, r), []);
|
|
850
873
|
}
|
|
851
|
-
async function
|
|
852
|
-
return
|
|
874
|
+
async function Bt(e, t, n, r, i) {
|
|
875
|
+
return Lt(Ft(e, t, n), "org_month_events_fetch_failed", r, i);
|
|
853
876
|
}
|
|
854
|
-
async function
|
|
855
|
-
return
|
|
877
|
+
async function Vt(e, t, n, r) {
|
|
878
|
+
return R(await Bt(e, t, n, void 0, r), []);
|
|
856
879
|
}
|
|
857
|
-
async function
|
|
858
|
-
return
|
|
880
|
+
async function Ht(e, t) {
|
|
881
|
+
return W(`${C()}/series/${e}/occurrences`, "series_occurrences_fetch_failed", void 0, t);
|
|
859
882
|
}
|
|
860
|
-
async function
|
|
861
|
-
let n = await
|
|
883
|
+
async function Ut(e, t) {
|
|
884
|
+
let n = await Ht(e, t);
|
|
862
885
|
return n.ok ? n.data : null;
|
|
863
886
|
}
|
|
864
|
-
async function
|
|
865
|
-
return
|
|
887
|
+
async function Wt(e, t, n) {
|
|
888
|
+
return W(`${C()}/series/${e}/occurrences?venueId=${t}`, "series_cta_fetch_failed", void 0, n);
|
|
866
889
|
}
|
|
867
|
-
async function
|
|
868
|
-
let r = await
|
|
890
|
+
async function Gt(e, t, n) {
|
|
891
|
+
let r = await Wt(e, t, n);
|
|
869
892
|
return r.ok ? r.data : null;
|
|
870
893
|
}
|
|
871
|
-
async function
|
|
894
|
+
async function Kt(e, t, r) {
|
|
872
895
|
try {
|
|
873
|
-
let i = t ? `?slug=${encodeURIComponent(t)}` : "", a = await
|
|
896
|
+
let i = t ? `?slug=${encodeURIComponent(t)}` : "", a = await O(`${C()}/resolve/${encodeURIComponent(String(e))}${i}`, { widgetKey: r?.widgetKey });
|
|
874
897
|
if (!a || !a.type) throw new n("entity", String(e));
|
|
875
898
|
return a;
|
|
876
899
|
} catch (e) {
|
|
877
|
-
return
|
|
900
|
+
return H.error("Error resolving public entity:", e), null;
|
|
878
901
|
}
|
|
879
902
|
}
|
|
880
|
-
async function
|
|
903
|
+
async function qt(e, t, r) {
|
|
881
904
|
try {
|
|
882
|
-
let i = await
|
|
905
|
+
let i = await O(t ? `${C()}/collections/${e}?password=${encodeURIComponent(t)}` : `${C()}/collections/${e}`, { widgetKey: r?.widgetKey });
|
|
883
906
|
if (!i) throw new n("collection", String(e));
|
|
884
907
|
return i;
|
|
885
908
|
} catch (e) {
|
|
886
|
-
return
|
|
909
|
+
return H.error("Error fetching collection:", e), null;
|
|
887
910
|
}
|
|
888
911
|
}
|
|
889
|
-
async function
|
|
912
|
+
async function Jt(e, t, n) {
|
|
890
913
|
try {
|
|
891
|
-
return (await
|
|
914
|
+
return (await O(`${C()}/collections/${e}/check-password`, {
|
|
892
915
|
method: "POST",
|
|
893
916
|
headers: { "Content-Type": "application/json" },
|
|
894
917
|
body: JSON.stringify({ password: t }),
|
|
895
918
|
widgetKey: n?.widgetKey
|
|
896
919
|
}))?.valid === !0;
|
|
897
920
|
} catch (e) {
|
|
898
|
-
return
|
|
921
|
+
return H.error("Error checking collection password:", e), !1;
|
|
899
922
|
}
|
|
900
923
|
}
|
|
901
|
-
async function
|
|
924
|
+
async function Yt(e, t, n) {
|
|
902
925
|
try {
|
|
903
|
-
let r = await
|
|
926
|
+
let r = await O(`${C()}/events/${e}/check-password`, {
|
|
904
927
|
method: "POST",
|
|
905
928
|
headers: { "Content-Type": "application/json" },
|
|
906
929
|
body: JSON.stringify({ password: t }),
|
|
@@ -908,75 +931,75 @@ async function Wt(e, t, n) {
|
|
|
908
931
|
});
|
|
909
932
|
return typeof r == "boolean" ? { valid: r } : { valid: r?.valid === !0 };
|
|
910
933
|
} catch (e) {
|
|
911
|
-
return
|
|
934
|
+
return H.error("Error checking event password:", e), { valid: !1 };
|
|
912
935
|
}
|
|
913
936
|
}
|
|
914
|
-
async function
|
|
937
|
+
async function Xt(e, t) {
|
|
915
938
|
try {
|
|
916
|
-
let n = t ? `${C()}/events/venue/${t}` : e ? `${C()}/venues/organization/${e}` : `${C()}/venues/${
|
|
939
|
+
let n = t ? `${C()}/events/venue/${t}` : e ? `${C()}/venues/organization/${e}` : `${C()}/venues/${bt}`;
|
|
917
940
|
return (await fetch(n, { method: "HEAD" })).status < 500;
|
|
918
941
|
} catch (e) {
|
|
919
|
-
return
|
|
942
|
+
return H.error("Network connection test failed:", e), !1;
|
|
920
943
|
}
|
|
921
944
|
}
|
|
922
945
|
// src/lib/navigation.ts
|
|
923
|
-
var
|
|
924
|
-
function
|
|
946
|
+
var Zt = "get-micdrop.com";
|
|
947
|
+
function Qt(e) {
|
|
925
948
|
let t = typeof e == "string" ? e.trim() : "";
|
|
926
|
-
return t ? `https://${encodeURIComponent(t)}.${
|
|
949
|
+
return t ? `https://${encodeURIComponent(t)}.${Zt}` : "";
|
|
927
950
|
}
|
|
928
951
|
// src/lib/api/venues.ts
|
|
929
|
-
var
|
|
930
|
-
async function
|
|
952
|
+
var J = e("VC");
|
|
953
|
+
async function $t(e, t) {
|
|
931
954
|
try {
|
|
932
|
-
if (!e) return
|
|
955
|
+
if (!e) return J.warn("getVenue called without venueId"), null;
|
|
933
956
|
let n = await T(`/venues/${e}`, { widgetKey: t?.widgetKey });
|
|
934
|
-
return n.success ? n.data ?? null : (
|
|
957
|
+
return n.success ? n.data ?? null : (J.error(`Failed to fetch venue: ${n.statusCode}`), null);
|
|
935
958
|
} catch (e) {
|
|
936
|
-
return
|
|
959
|
+
return J.error("Error fetching venue:", e), null;
|
|
937
960
|
}
|
|
938
961
|
}
|
|
939
|
-
async function
|
|
940
|
-
let n = await
|
|
962
|
+
async function en(e, t) {
|
|
963
|
+
let n = await $t(e, t);
|
|
941
964
|
return n ? {
|
|
942
965
|
serviceFeePercentage: n.serviceFeePercentage ?? 0,
|
|
943
966
|
serviceFeeCents: n.serviceFeeCents == null ? 0 : n.serviceFeeCents,
|
|
944
967
|
taxPercentage: n.taxPercentage ?? 0
|
|
945
968
|
} : null;
|
|
946
969
|
}
|
|
947
|
-
async function
|
|
970
|
+
async function tn(e, t) {
|
|
948
971
|
try {
|
|
949
|
-
if (!e) return
|
|
972
|
+
if (!e) return J.warn("getVenueBySlug called without slug"), null;
|
|
950
973
|
let n = await T(`/venues/slug/${encodeURIComponent(e)}`, { widgetKey: t?.widgetKey });
|
|
951
|
-
return n.success ? n.data ?? null : (
|
|
974
|
+
return n.success ? n.data ?? null : (J.error(`Failed to fetch venue by slug: ${n.statusCode}`), null);
|
|
952
975
|
} catch (e) {
|
|
953
|
-
return
|
|
976
|
+
return J.error("Error fetching venue by slug:", e), null;
|
|
954
977
|
}
|
|
955
978
|
}
|
|
956
|
-
async function
|
|
957
|
-
let n =
|
|
979
|
+
async function nn(e, t) {
|
|
980
|
+
let n = Qt(e);
|
|
958
981
|
if (!n) return !1;
|
|
959
982
|
try {
|
|
960
983
|
let e = await T(`/sites/by-host/${encodeURIComponent(new URL(n).host)}`, { widgetKey: t?.widgetKey });
|
|
961
984
|
return !!(e.success && e.data);
|
|
962
985
|
} catch (e) {
|
|
963
|
-
return
|
|
986
|
+
return J.warn("hasPublishedSite failed:", e), !1;
|
|
964
987
|
}
|
|
965
988
|
}
|
|
966
989
|
// src/lib/api/transformers/giftCard.ts
|
|
967
|
-
function
|
|
990
|
+
function Y(e, t) {
|
|
968
991
|
return e == null || t(e);
|
|
969
992
|
}
|
|
970
|
-
function
|
|
993
|
+
function rn(e) {
|
|
971
994
|
if (typeof e != "object" || !e) return !1;
|
|
972
995
|
let t = e;
|
|
973
|
-
return t.valid === !0 && Number.isInteger(t.appliedAmount) && typeof t.remainingTotal == "number" && Number.isFinite(t.remainingTotal) &&
|
|
996
|
+
return t.valid === !0 && Number.isInteger(t.appliedAmount) && typeof t.remainingTotal == "number" && Number.isFinite(t.remainingTotal) && Y(t.giftCardCode, (e) => typeof e == "string") && Y(t.giftCardBalance, (e) => typeof e == "number" && Number.isFinite(e)) && Y(t.fullyCoveredByCard, (e) => typeof e == "boolean");
|
|
974
997
|
}
|
|
975
|
-
var
|
|
976
|
-
function
|
|
977
|
-
if (!
|
|
998
|
+
var an = "We couldn't apply that gift card. Please try again.";
|
|
999
|
+
function on(e) {
|
|
1000
|
+
if (!rn(e)) return {
|
|
978
1001
|
valid: !1,
|
|
979
|
-
error:
|
|
1002
|
+
error: an
|
|
980
1003
|
};
|
|
981
1004
|
let t = e, n = i(p(t.appliedAmount)), r = t.remainingTotal, a = t.fullyCoveredByCard ?? r <= 0, o = !a;
|
|
982
1005
|
return {
|
|
@@ -991,45 +1014,45 @@ function en(e) {
|
|
|
991
1014
|
};
|
|
992
1015
|
}
|
|
993
1016
|
// src/lib/api/gift-cards.ts
|
|
994
|
-
var
|
|
995
|
-
async function
|
|
1017
|
+
var X = e("VC");
|
|
1018
|
+
async function sn(e, n) {
|
|
996
1019
|
try {
|
|
997
1020
|
let r = await E(`${w()}/gift-cards/purchase/create`, e, { widgetKey: n?.widgetKey });
|
|
998
|
-
if (!r.success) throw
|
|
1021
|
+
if (!r.success) throw X.error("Gift card purchase creation failed:", r.error), new t(r.error || "Failed to create gift card purchase", r.statusCode ?? 0, {
|
|
999
1022
|
endpoint: `${w()}/gift-cards/purchase/create`,
|
|
1000
1023
|
method: "POST"
|
|
1001
1024
|
});
|
|
1002
|
-
return
|
|
1025
|
+
return X.debug("Gift card purchase created:", r.data), r.data;
|
|
1003
1026
|
} catch (e) {
|
|
1004
|
-
return
|
|
1027
|
+
return X.error("Gift card purchase creation error:", e), null;
|
|
1005
1028
|
}
|
|
1006
1029
|
}
|
|
1007
|
-
async function
|
|
1030
|
+
async function cn(e, t, n) {
|
|
1008
1031
|
try {
|
|
1009
1032
|
let r = await E(`${w()}/cart/${e}/apply-gift-card`, { giftCardCode: t }, { widgetKey: n?.widgetKey });
|
|
1010
1033
|
if (!r.success) return r.statusCode === 429 ? {
|
|
1011
1034
|
valid: !1,
|
|
1012
1035
|
error: "Too many attempts. Please wait a moment and try again."
|
|
1013
|
-
} : (
|
|
1036
|
+
} : (X.error("Apply gift card failed:", r.error), {
|
|
1014
1037
|
valid: !1,
|
|
1015
1038
|
error: r.error || "Invalid gift card code"
|
|
1016
1039
|
});
|
|
1017
|
-
let i =
|
|
1018
|
-
return i.valid ||
|
|
1040
|
+
let i = on(r.data);
|
|
1041
|
+
return i.valid || X.error("Apply gift card returned an unusable payload:", r.data), i;
|
|
1019
1042
|
} catch (e) {
|
|
1020
|
-
return
|
|
1043
|
+
return X.error("applyGiftCard error:", e), {
|
|
1021
1044
|
valid: !1,
|
|
1022
1045
|
error: "Network error. Please check your connection and try again."
|
|
1023
1046
|
};
|
|
1024
1047
|
}
|
|
1025
1048
|
}
|
|
1026
|
-
async function
|
|
1049
|
+
async function ln(e, t, n) {
|
|
1027
1050
|
try {
|
|
1028
|
-
let r = t?.giftCardId ? { giftCardId: t.giftCardId } : t?.code ? { giftCardCode: t.code } : null, i = await
|
|
1051
|
+
let r = t?.giftCardId ? { giftCardId: t.giftCardId } : t?.code ? { giftCardCode: t.code } : null, i = await _e(`${w()}/cart/${e}/gift-card`, r ? {
|
|
1029
1052
|
body: JSON.stringify(r),
|
|
1030
1053
|
widgetKey: n?.widgetKey
|
|
1031
1054
|
} : { widgetKey: n?.widgetKey });
|
|
1032
|
-
if (!i.success) return
|
|
1055
|
+
if (!i.success) return X.error("Remove gift card failed:", i.error), {
|
|
1033
1056
|
success: !1,
|
|
1034
1057
|
error: i.error || "Failed to remove gift card"
|
|
1035
1058
|
};
|
|
@@ -1039,14 +1062,14 @@ async function rn(e, t, n) {
|
|
|
1039
1062
|
...typeof o == "number" ? { remainingTotal: o } : {}
|
|
1040
1063
|
};
|
|
1041
1064
|
} catch (e) {
|
|
1042
|
-
return
|
|
1065
|
+
return X.error("removeGiftCard error:", e), {
|
|
1043
1066
|
success: !1,
|
|
1044
1067
|
error: "Network error. Please check your connection and try again."
|
|
1045
1068
|
};
|
|
1046
1069
|
}
|
|
1047
1070
|
}
|
|
1048
|
-
async function
|
|
1049
|
-
let i =
|
|
1071
|
+
async function un(e, t, n, r) {
|
|
1072
|
+
let i = M(n);
|
|
1050
1073
|
try {
|
|
1051
1074
|
let n = await E(`${w()}/cart/${e}/complete-gift-card-payment`, {
|
|
1052
1075
|
customerName: s(t.firstName, t.lastName),
|
|
@@ -1057,27 +1080,27 @@ async function an(e, t, n, r) {
|
|
|
1057
1080
|
phoneNumber: t.phoneNumber || null,
|
|
1058
1081
|
questionAnswer: t.questionAnswer || "",
|
|
1059
1082
|
mailingList: t.mailingList || !1,
|
|
1060
|
-
attribution:
|
|
1083
|
+
attribution: j(),
|
|
1061
1084
|
...i ? { locale: i } : {}
|
|
1062
1085
|
}, { widgetKey: r?.widgetKey });
|
|
1063
1086
|
return n.success ? {
|
|
1064
1087
|
success: !0,
|
|
1065
1088
|
orderId: n.data?.orderId,
|
|
1066
1089
|
confirmationNumber: n.data?.confirmationNumber
|
|
1067
|
-
} : (
|
|
1090
|
+
} : (X.error("Complete gift card payment failed:", n.error), {
|
|
1068
1091
|
success: !1,
|
|
1069
1092
|
error: n.error || "Failed to complete payment"
|
|
1070
1093
|
});
|
|
1071
1094
|
} catch (e) {
|
|
1072
|
-
return
|
|
1095
|
+
return X.error("completeGiftCardPayment error:", e), {
|
|
1073
1096
|
success: !1,
|
|
1074
1097
|
error: "Network error. Please check your connection and try again."
|
|
1075
1098
|
};
|
|
1076
1099
|
}
|
|
1077
1100
|
}
|
|
1078
1101
|
// src/lib/api/cart-addons.ts
|
|
1079
|
-
var
|
|
1080
|
-
async function
|
|
1102
|
+
var dn = e("VC");
|
|
1103
|
+
async function fn(e, t, n) {
|
|
1081
1104
|
let r = (e) => ({
|
|
1082
1105
|
success: !1,
|
|
1083
1106
|
error: e,
|
|
@@ -1103,12 +1126,12 @@ async function sn(e, t, n) {
|
|
|
1103
1126
|
repriced: a.repriced === !0
|
|
1104
1127
|
};
|
|
1105
1128
|
} catch (e) {
|
|
1106
|
-
return
|
|
1129
|
+
return dn.error("updateCartAddOns error:", e), r(null);
|
|
1107
1130
|
}
|
|
1108
1131
|
}
|
|
1109
1132
|
// src/lib/api/waitlist.ts
|
|
1110
|
-
var
|
|
1111
|
-
async function
|
|
1133
|
+
var Z = e("VC");
|
|
1134
|
+
async function pn(e, t, n = null, r = !1, i) {
|
|
1112
1135
|
try {
|
|
1113
1136
|
let a = { email: t };
|
|
1114
1137
|
n && r && (a.phone = n, a.smsOptIn = !0);
|
|
@@ -1117,18 +1140,18 @@ async function cn(e, t, n = null, r = !1, i) {
|
|
|
1117
1140
|
success: !0,
|
|
1118
1141
|
updated: o.data?.updated,
|
|
1119
1142
|
position: o.data?.position
|
|
1120
|
-
} : (
|
|
1143
|
+
} : (Z.error("Join waitlist failed:", o.error), {
|
|
1121
1144
|
success: !1,
|
|
1122
1145
|
errorCode: o.error || "join_failed"
|
|
1123
1146
|
});
|
|
1124
1147
|
} catch (e) {
|
|
1125
|
-
return
|
|
1148
|
+
return Z.error("joinWaitlist error:", e), {
|
|
1126
1149
|
success: !1,
|
|
1127
1150
|
errorCode: "network_error"
|
|
1128
1151
|
};
|
|
1129
1152
|
}
|
|
1130
1153
|
}
|
|
1131
|
-
async function
|
|
1154
|
+
async function mn(e, t, n) {
|
|
1132
1155
|
try {
|
|
1133
1156
|
let r = await E(`/checkout/validate-token/${e}`, { email: t }, { widgetKey: n?.widgetKey });
|
|
1134
1157
|
return r.success ? {
|
|
@@ -1141,14 +1164,14 @@ async function ln(e, t, n) {
|
|
|
1141
1164
|
errorCode: r.error
|
|
1142
1165
|
};
|
|
1143
1166
|
} catch (e) {
|
|
1144
|
-
return
|
|
1167
|
+
return Z.error("validateWaitlistToken error:", e), {
|
|
1145
1168
|
valid: !1,
|
|
1146
1169
|
eventId: 0,
|
|
1147
1170
|
errorCode: "invalid_token"
|
|
1148
1171
|
};
|
|
1149
1172
|
}
|
|
1150
1173
|
}
|
|
1151
|
-
async function
|
|
1174
|
+
async function hn(e, t, n) {
|
|
1152
1175
|
try {
|
|
1153
1176
|
let r = await E(`/waitlist/requeue/${e}`, { email: t }, { widgetKey: n?.widgetKey });
|
|
1154
1177
|
return r.success ? { success: !0 } : {
|
|
@@ -1156,13 +1179,13 @@ async function un(e, t, n) {
|
|
|
1156
1179
|
errorCode: r.error
|
|
1157
1180
|
};
|
|
1158
1181
|
} catch (e) {
|
|
1159
|
-
return
|
|
1182
|
+
return Z.error("requeueWaitlistToFront error:", e), {
|
|
1160
1183
|
success: !1,
|
|
1161
1184
|
errorCode: "internal_error"
|
|
1162
1185
|
};
|
|
1163
1186
|
}
|
|
1164
1187
|
}
|
|
1165
|
-
async function
|
|
1188
|
+
async function gn(e, t) {
|
|
1166
1189
|
let n = {
|
|
1167
1190
|
waitlistEnabled: !1,
|
|
1168
1191
|
soldOut: !1,
|
|
@@ -1176,15 +1199,15 @@ async function dn(e, t) {
|
|
|
1176
1199
|
gated: !!r.data?.gated
|
|
1177
1200
|
} : n;
|
|
1178
1201
|
} catch (e) {
|
|
1179
|
-
return
|
|
1202
|
+
return Z.error("getWaitlistStatus error:", e), n;
|
|
1180
1203
|
}
|
|
1181
1204
|
}
|
|
1182
|
-
function
|
|
1205
|
+
function _n(e) {
|
|
1183
1206
|
let t = String(e % 60).padStart(2, "0");
|
|
1184
1207
|
return e >= 3600 ? `${Math.floor(e / 3600)}:${String(Math.floor(e % 3600 / 60)).padStart(2, "0")}:${t}` : `${Math.floor(e / 60)}:${t}`;
|
|
1185
1208
|
}
|
|
1186
1209
|
// src/lib/api/cta.ts
|
|
1187
|
-
function
|
|
1210
|
+
function vn(e, t, n = {}) {
|
|
1188
1211
|
let { cancelled: r = !1, isRegistration: i = !1, waitlistEnabled: a = !1 } = n, o = ee();
|
|
1189
1212
|
if (r) return {
|
|
1190
1213
|
text: "Canceled",
|
|
@@ -1259,7 +1282,7 @@ function pn(e, t, n = {}) {
|
|
|
1259
1282
|
disabled: !1,
|
|
1260
1283
|
reason: "hidden_only"
|
|
1261
1284
|
} : {
|
|
1262
|
-
text: `On sale ${
|
|
1285
|
+
text: `On sale ${yn(_, m(_, o), [e.timezone, e.timeZone].find((e) => !!e && ne(e)))}`,
|
|
1263
1286
|
disabled: !0,
|
|
1264
1287
|
reason: "coming_soon"
|
|
1265
1288
|
} : h ? d() : u ? {
|
|
@@ -1272,7 +1295,7 @@ function pn(e, t, n = {}) {
|
|
|
1272
1295
|
reason: "sales_ended"
|
|
1273
1296
|
};
|
|
1274
1297
|
}
|
|
1275
|
-
function
|
|
1298
|
+
function yn(e, t, n) {
|
|
1276
1299
|
let r = t / 36e5, i = t / 864e5;
|
|
1277
1300
|
if (n) {
|
|
1278
1301
|
let t = e.toISOString(), a = te(n, e), o = `${_(t, n)} ${a}`;
|
|
@@ -1294,7 +1317,7 @@ function mn(e, t, n) {
|
|
|
1294
1317
|
}, "en-US")} ${a(e)}`;
|
|
1295
1318
|
}
|
|
1296
1319
|
// src/lib/api/transformers/order.ts
|
|
1297
|
-
function
|
|
1320
|
+
function bn(e) {
|
|
1298
1321
|
let t = e;
|
|
1299
1322
|
return {
|
|
1300
1323
|
uuid: t.uuid || String(t.id || t.ID || ""),
|
|
@@ -1312,7 +1335,7 @@ function hn(e) {
|
|
|
1312
1335
|
checkedInAt: t.checkedInAt || t.checked_in_at
|
|
1313
1336
|
};
|
|
1314
1337
|
}
|
|
1315
|
-
function
|
|
1338
|
+
function Q(e) {
|
|
1316
1339
|
let t = e, n = t.purchasedTickets || t.tickets || t.purchased_tickets || [];
|
|
1317
1340
|
return {
|
|
1318
1341
|
uuid: t.uuid || String(t.id || t.ID || ""),
|
|
@@ -1329,14 +1352,14 @@ function gn(e) {
|
|
|
1329
1352
|
paymentIntentId: t.paymentIntentId || t.payment_intent_id,
|
|
1330
1353
|
paymentMethod: t.paymentMethod || t.payment_method,
|
|
1331
1354
|
statementDescriptor: typeof t.statementDescriptor == "string" ? t.statementDescriptor.trim() : "",
|
|
1332
|
-
purchasedTickets: n.map(
|
|
1355
|
+
purchasedTickets: n.map(bn),
|
|
1333
1356
|
createdAt: t.createdAt || t.created_at,
|
|
1334
1357
|
updatedAt: t.updatedAt || t.updated_at
|
|
1335
1358
|
};
|
|
1336
1359
|
}
|
|
1337
|
-
var
|
|
1338
|
-
function
|
|
1339
|
-
let t =
|
|
1360
|
+
var xn = bn, Sn = Q;
|
|
1361
|
+
function Cn(e) {
|
|
1362
|
+
let t = Q(e), n = t.uuid.split("-")[0] || t.uuid, i = Number(t.totalAmount);
|
|
1340
1363
|
return {
|
|
1341
1364
|
orderId: t.uuid,
|
|
1342
1365
|
displayOrderId: n,
|
|
@@ -1349,13 +1372,13 @@ function yn(e) {
|
|
|
1349
1372
|
};
|
|
1350
1373
|
}
|
|
1351
1374
|
// src/lib/api/transformers/event.ts
|
|
1352
|
-
function
|
|
1375
|
+
function wn(e) {
|
|
1353
1376
|
return u(e, { cdn: !0 });
|
|
1354
1377
|
}
|
|
1355
1378
|
function $(e) {
|
|
1356
|
-
return
|
|
1379
|
+
return wn(e.imageUrl || e.imageURL || e.image_url || e.image || "");
|
|
1357
1380
|
}
|
|
1358
|
-
function
|
|
1381
|
+
function Tn(e) {
|
|
1359
1382
|
switch (e) {
|
|
1360
1383
|
case "available":
|
|
1361
1384
|
case "sold_out":
|
|
@@ -1364,10 +1387,10 @@ function xn(e) {
|
|
|
1364
1387
|
default: return null;
|
|
1365
1388
|
}
|
|
1366
1389
|
}
|
|
1367
|
-
function
|
|
1390
|
+
function En(e) {
|
|
1368
1391
|
let t = e.ctaState || e.cta_state;
|
|
1369
1392
|
if (t) {
|
|
1370
|
-
let e =
|
|
1393
|
+
let e = Tn(t);
|
|
1371
1394
|
if (e) return e;
|
|
1372
1395
|
}
|
|
1373
1396
|
if (e.isCancelled || e.is_cancelled) return "ended";
|
|
@@ -1384,7 +1407,7 @@ function Sn(e) {
|
|
|
1384
1407
|
return e + Math.max(0, n - r);
|
|
1385
1408
|
}, 0) <= 0 ? "sold_out" : "available";
|
|
1386
1409
|
}
|
|
1387
|
-
function
|
|
1410
|
+
function Dn(e) {
|
|
1388
1411
|
let t = e;
|
|
1389
1412
|
return {
|
|
1390
1413
|
id: t.id || t.ID,
|
|
@@ -1405,8 +1428,8 @@ function Cn(e) {
|
|
|
1405
1428
|
sortOrder: t.sortOrder || t.sort_order || 0
|
|
1406
1429
|
};
|
|
1407
1430
|
}
|
|
1408
|
-
function
|
|
1409
|
-
let t = e, n = (t.availableTickets || t.available_tickets || t.tickets || []).map(
|
|
1431
|
+
function On(e) {
|
|
1432
|
+
let t = e, n = (t.availableTickets || t.available_tickets || t.tickets || []).map(Dn), r = n.map((e) => e.price).filter((e) => e > 0), i = r.length > 0 ? Math.min(...r) : void 0, a = r.length > 0 ? Math.max(...r) : void 0;
|
|
1410
1433
|
return {
|
|
1411
1434
|
eventID: t.eventID || t.id || t.ID || 0,
|
|
1412
1435
|
id: t.id || t.ID,
|
|
@@ -1434,7 +1457,7 @@ function wn(e) {
|
|
|
1434
1457
|
minPrice: t.minPrice ?? t.min_price ?? i,
|
|
1435
1458
|
maxPrice: t.maxPrice ?? t.max_price ?? a,
|
|
1436
1459
|
ctaText: t.ctaText || t.cta_text,
|
|
1437
|
-
ctaState:
|
|
1460
|
+
ctaState: En(t),
|
|
1438
1461
|
showPerformers: t.showPerformers ?? t.show_performers,
|
|
1439
1462
|
eventSeriesId: t.eventSeriesId || t.event_series_id,
|
|
1440
1463
|
seriesInstanceNumber: t.seriesInstanceNumber || t.series_instance_number,
|
|
@@ -1472,12 +1495,12 @@ function wn(e) {
|
|
|
1472
1495
|
purchasedTickets: t.purchasedTickets
|
|
1473
1496
|
};
|
|
1474
1497
|
}
|
|
1475
|
-
var
|
|
1498
|
+
var kn = Dn, An = On, jn = On;
|
|
1476
1499
|
// src/lib/api/transformers/venue.ts
|
|
1477
|
-
function
|
|
1500
|
+
function Mn(e) {
|
|
1478
1501
|
return u(e, { cdn: !0 });
|
|
1479
1502
|
}
|
|
1480
|
-
function
|
|
1503
|
+
function Nn(e) {
|
|
1481
1504
|
let t = e, n = t.logoUrl || t.logo_url || t.logo;
|
|
1482
1505
|
return {
|
|
1483
1506
|
id: t.id || t.ID || 0,
|
|
@@ -1487,10 +1510,10 @@ function kn(e) {
|
|
|
1487
1510
|
googleLocationNameCache: t.googleLocationNameCache || t.google_location_name_cache,
|
|
1488
1511
|
city: t.city,
|
|
1489
1512
|
state: t.state,
|
|
1490
|
-
zipCode: t.zipCode || t.zip_code,
|
|
1513
|
+
zipCode: t.zipCode || t.zip_code || t.postalCode,
|
|
1491
1514
|
country: t.country,
|
|
1492
|
-
timezone: t.timezone || t.time_zone,
|
|
1493
|
-
logoUrl:
|
|
1515
|
+
timezone: t.timeZone || t.timezone || t.time_zone,
|
|
1516
|
+
logoUrl: Mn(n),
|
|
1494
1517
|
serviceFeePercentage: t.serviceFeePercentage ?? t.service_fee_percentage ?? 0,
|
|
1495
1518
|
serviceFeeCents: t.serviceFeeCents ?? t.service_fee_cents ?? 0,
|
|
1496
1519
|
absorbServiceFee: (t.absorbServiceFee ?? t.absorb_service_fee) === !0,
|
|
@@ -1498,8 +1521,8 @@ function kn(e) {
|
|
|
1498
1521
|
organizationId: t.organizationId || t.organization_id
|
|
1499
1522
|
};
|
|
1500
1523
|
}
|
|
1501
|
-
var
|
|
1502
|
-
function
|
|
1524
|
+
var Pn = Nn;
|
|
1525
|
+
function Fn(e) {
|
|
1503
1526
|
let t = e;
|
|
1504
1527
|
return {
|
|
1505
1528
|
serviceFeePercentage: t.serviceFeePercentage ?? t.service_fee_percentage ?? 0,
|
|
@@ -1507,7 +1530,7 @@ function jn(e) {
|
|
|
1507
1530
|
taxPercentage: t.taxPercentage ?? t.tax_percentage ?? 0
|
|
1508
1531
|
};
|
|
1509
1532
|
}
|
|
1510
|
-
function
|
|
1533
|
+
function In(e) {
|
|
1511
1534
|
return [
|
|
1512
1535
|
e.address,
|
|
1513
1536
|
e.city,
|
|
@@ -1515,4 +1538,4 @@ function Mn(e) {
|
|
|
1515
1538
|
e.zipCode
|
|
1516
1539
|
].filter(Boolean).join(", ");
|
|
1517
1540
|
}
|
|
1518
|
-
export {
|
|
1541
|
+
export { _e as apiDelete, T as apiGet, E as apiPost, ge as apiPut, cn as applyGiftCard, pt as applyPromoCode, En as calculateCtaState, nt as cancelReservation, Jt as checkCollectionPassword, Yt as checkEventPassword, un as completeGiftCardPayment, tt as completeReservation, vn as computeCtaState, ue as configureApi, sn as createGiftCardPurchase, rt as createOrder, Xe as createPaymentIntent, I as err, L as errNotFound, ot as extendCheckoutSession, Fn as extractVenueFees, Ot as fetchAllVenues, Dt as fetchAllVenuesResult, St as fetchEventDetails, xt as fetchEventDetailsResult, Et as fetchEventPerformers, Tt as fetchEventPerformersResult, wt as fetchEventTickets, Ct as fetchEventTicketsResult, qt as fetchPublicCollection, Gt as fetchSeriesOccurrences, Wt as fetchSeriesOccurrencesResult, At as fetchVenueEvents, kt as fetchVenueEventsResult, In as formatVenueAddress, _n as formatWaitlistWindow, de as getApiConfig, wn as getCDNImageUrl, $e as getCartByUUID, pe as getClientIP, $ as getEventImageUrl, fe as getLegacyPublicUrl, zt as getMonthEvents, Rt as getMonthEventsResult, it as getOrder, w as getOrdersV2Url, Vt as getOrgMonthEvents, Bt as getOrgMonthEventsResult, C as getPublicBaseUrl, Ut as getSeriesOccurrences, Ht as getSeriesOccurrencesResult, st as getSessionStatus, $t as getVenue, tn as getVenueBySlug, en as getVenueFees, gn as getWaitlistStatus, ft as hasPromoCodes, nn as hasPublishedSite, ct as initiateOrder, vt as isErr, _t as isOk, pn as joinWaitlist, F as ok, ln as removeGiftCard, mt as removePromoCode, hn as requeueWaitlistToFront, Kt as resolvePublicEntity, Qe as submitCheckoutAnswers, Xt as testNetworkConnection, lt as trackUTMSource, kn as transformAvailableTicket, An as transformEvent, jn as transformEventData, Sn as transformOrder, Cn as transformOrderForDisplay, xn as transformTicket, Pn as transformVenue, R as unwrapOr, fn as updateCartAddOns, et as updateCartQuantities, at as validatePaymentIntent, dt as validatePromoCode, mn as validateWaitlistToken };
|