@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
|
@@ -1,1071 +0,0 @@
|
|
|
1
|
-
import { t as e } from "./logger-DM8WW61-.js";
|
|
2
|
-
import { t } from "./CalendarOutline-CApIWx8i.js";
|
|
3
|
-
import { n } from "./Input-BQk4itex.js";
|
|
4
|
-
import { t as r } from "./CheckIcon-BH9EAoee.js";
|
|
5
|
-
import { t as i } from "./CloseIcon-DRlYvIPc.js";
|
|
6
|
-
import { o as a, r as o } from "./ScarcityBadge-BAaV2CIY.js";
|
|
7
|
-
import { t as s } from "./TagIcon-Dp7n6eKU.js";
|
|
8
|
-
import { t as c } from "./WarningTriIcon-BMa-jcUr.js";
|
|
9
|
-
import { i as l, r as u } from "./typography-CKwYSv07.js";
|
|
10
|
-
import { d, t as f } from "./transitions-DST-mWoo.js";
|
|
11
|
-
import { d as p, o as m, v as h } from "./instant-BkZCSGDm.js";
|
|
12
|
-
import { a as g, u as _ } from "./formatters-CzKNRUwz.js";
|
|
13
|
-
import { a as v, c as y, h as b, i as x, n as ee, o as S, r as C, u as w } from "./widget-key-context-BrWW0fyM.js";
|
|
14
|
-
import { n as T, t as E } from "./serverTotals-COsx7Mc5.js";
|
|
15
|
-
import { C as te, c as ne, l as D, o as re, s as ie } from "./api-CRHFSJDI.js";
|
|
16
|
-
import { t as O } from "./Button-B_gbGd63.js";
|
|
17
|
-
import { a as ae, i as k, n as A, r as j, t as M } from "./ModalFooter-gFaDKsfj.js";
|
|
18
|
-
import { c as oe } from "./navigation-DpqP-ahJ.js";
|
|
19
|
-
import { n as se, t as ce } from "./defaultLabels-CybwJCNn.js";
|
|
20
|
-
import { d as N } from "./datetime-BlEsN_-8.js";
|
|
21
|
-
import { t as le } from "./SkeletonLoader-DfW0N9R3.js";
|
|
22
|
-
import { t as ue } from "./venue-DLkL7xdj.js";
|
|
23
|
-
import { n as de } from "./event-transform-DqFigNQg.js";
|
|
24
|
-
import { c as fe, p as pe, s as me, t as he, u as ge } from "./checkoutState-BDNjJRMG.js";
|
|
25
|
-
import { r as _e } from "./utils-AIszIHUb.js";
|
|
26
|
-
import { i as ve } from "./AddOnCard-DEAC26HA.js";
|
|
27
|
-
import ye, { n as be, r as xe, t as Se } from "./Checkout-VnochAZE.js";
|
|
28
|
-
import { n as Ce } from "./buyerEmail-CvPpEiON.js";
|
|
29
|
-
import "svelte/internal/disclose-version";
|
|
30
|
-
import * as P from "svelte/internal/client";
|
|
31
|
-
import { onMount as we } from "svelte";
|
|
32
|
-
// node_modules/@stripe/stripe-js/dist/index.mjs
|
|
33
|
-
function F(e) {
|
|
34
|
-
"@babel/helpers - typeof";
|
|
35
|
-
return F = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(e) {
|
|
36
|
-
return typeof e;
|
|
37
|
-
} : function(e) {
|
|
38
|
-
return e && typeof Symbol == "function" && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e;
|
|
39
|
-
}, F(e);
|
|
40
|
-
}
|
|
41
|
-
var I = "endive", L = function(e) {
|
|
42
|
-
return e === 3 ? "v3" : e;
|
|
43
|
-
}, Te = "https://js.stripe.com", R = `${Te}/${I}/stripe.js`, Ee = /^https:\/\/js\.stripe\.com\/v3\/?(\?.*)?$/, z = /^https:\/\/js\.stripe\.com\/(v3|[a-z]+)\/stripe\.js(\?.*)?$/, B = "loadStripe.setLoadParameters was called but an existing Stripe.js script already exists in the document; existing script parameters will be used", De = function(e) {
|
|
44
|
-
return Ee.test(e) || z.test(e);
|
|
45
|
-
}, Oe = function() {
|
|
46
|
-
for (var e = document.querySelectorAll(`script[src^="${Te}"]`), t = 0; t < e.length; t++) {
|
|
47
|
-
var n = e[t];
|
|
48
|
-
if (De(n.src)) return n;
|
|
49
|
-
}
|
|
50
|
-
return null;
|
|
51
|
-
}, ke = function(e) {
|
|
52
|
-
var t = e && !e.advancedFraudSignals ? "?advancedFraudSignals=false" : "", n = document.createElement("script");
|
|
53
|
-
n.src = `${R}${t}`;
|
|
54
|
-
var r = document.head || document.body;
|
|
55
|
-
if (!r) throw Error("Expected document.body not to be null. Stripe.js requires a <body> element.");
|
|
56
|
-
return r.appendChild(n), n;
|
|
57
|
-
}, V = function(e, t) {
|
|
58
|
-
e && e._registerWrapper && e._registerWrapper({
|
|
59
|
-
name: "stripe-js",
|
|
60
|
-
version: "10.1.0",
|
|
61
|
-
startTime: t
|
|
62
|
-
});
|
|
63
|
-
}, H = null, U = null, W = null, G = function(e) {
|
|
64
|
-
return function(t) {
|
|
65
|
-
e(Error("Failed to load Stripe.js", { cause: t }));
|
|
66
|
-
};
|
|
67
|
-
}, Ae = function(e, t) {
|
|
68
|
-
return function() {
|
|
69
|
-
window.Stripe ? e(window.Stripe) : t(/* @__PURE__ */ Error("Stripe.js not available"));
|
|
70
|
-
};
|
|
71
|
-
}, je = function(e) {
|
|
72
|
-
if (H !== null) return H;
|
|
73
|
-
var t = function() {
|
|
74
|
-
return new Promise(function(t, n) {
|
|
75
|
-
if (typeof window > "u" || typeof document > "u") t(null);
|
|
76
|
-
else if (window.Stripe && e && console.warn(B), window.Stripe) t(window.Stripe);
|
|
77
|
-
else try {
|
|
78
|
-
var r = Oe();
|
|
79
|
-
if (r && e) console.warn(B);
|
|
80
|
-
else if (!r) r = ke(e);
|
|
81
|
-
else if (r && W !== null && U !== null) {
|
|
82
|
-
var i;
|
|
83
|
-
r.removeEventListener("load", W), r.removeEventListener("error", U), (i = r.parentNode) == null || i.removeChild(r), r = ke(e);
|
|
84
|
-
}
|
|
85
|
-
W = Ae(t, n), U = G(n), r.addEventListener("load", W), r.addEventListener("error", U);
|
|
86
|
-
} catch (e) {
|
|
87
|
-
n(e);
|
|
88
|
-
return;
|
|
89
|
-
}
|
|
90
|
-
});
|
|
91
|
-
};
|
|
92
|
-
return H = t().catch(function() {
|
|
93
|
-
return t();
|
|
94
|
-
}).catch(function(e) {
|
|
95
|
-
return H = null, Promise.reject(e);
|
|
96
|
-
}), H;
|
|
97
|
-
}, K = function(e, t, n) {
|
|
98
|
-
if (e === null) return null;
|
|
99
|
-
var r = t[0];
|
|
100
|
-
if (typeof r != "string") throw Error(`Expected publishable key to be of type string, got type ${F(r)} instead.`);
|
|
101
|
-
var i = r.match(/^pk_test/), a = L(e.version), o = I;
|
|
102
|
-
i && a !== o && console.warn(`Stripe.js@${a} was loaded on the page, but @stripe/stripe-js@10.1.0 expected Stripe.js@${o}. This may result in unexpected behavior. For more information, see https://docs.stripe.com/sdks/stripejs-versioning`);
|
|
103
|
-
var s = e.apply(void 0, t);
|
|
104
|
-
return V(s, n), s;
|
|
105
|
-
}, q, J = !1, Y = function() {
|
|
106
|
-
return q || (q = je(null).catch(function(e) {
|
|
107
|
-
return q = null, Promise.reject(e);
|
|
108
|
-
}), q);
|
|
109
|
-
};
|
|
110
|
-
Promise.resolve().then(function() {
|
|
111
|
-
return Y();
|
|
112
|
-
}).catch(function(e) {
|
|
113
|
-
J || console.warn(e);
|
|
114
|
-
});
|
|
115
|
-
var Me = function() {
|
|
116
|
-
var e = [...arguments];
|
|
117
|
-
J = !0;
|
|
118
|
-
var t = Date.now();
|
|
119
|
-
return Y().then(function(n) {
|
|
120
|
-
return K(n, e, t);
|
|
121
|
-
});
|
|
122
|
-
};
|
|
123
|
-
// src/lib/utils/stripe-errors.ts
|
|
124
|
-
function X(e, t = ce) {
|
|
125
|
-
let n = e?.code || e?.decline_code || "", r = e?.type || "", i = e?.message || "";
|
|
126
|
-
if (n === "card_declined" || r === "card_error") {
|
|
127
|
-
let n = e?.decline_code || "";
|
|
128
|
-
return n === "insufficient_funds" ? {
|
|
129
|
-
type: "card_declined",
|
|
130
|
-
title: t.cardInsufficientFundsTitle || "Insufficient funds",
|
|
131
|
-
message: t.cardInsufficientFundsMessage || "Your card has insufficient funds to complete this purchase",
|
|
132
|
-
suggestion: t.cardInsufficientFundsSuggestion || "Please try a different payment method or contact your bank",
|
|
133
|
-
retryable: !0
|
|
134
|
-
} : n === "lost_card" || n === "stolen_card" ? {
|
|
135
|
-
type: "card_declined",
|
|
136
|
-
title: t.cardUnusableTitle || "Card cannot be used",
|
|
137
|
-
message: t.cardUnusableMessage || "This card cannot be used for this transaction",
|
|
138
|
-
suggestion: t.cardUnusableSuggestion || "Please use a different payment method",
|
|
139
|
-
retryable: !0
|
|
140
|
-
} : n === "expired_card" ? {
|
|
141
|
-
type: "card_declined",
|
|
142
|
-
title: t.cardExpiredTitle || "Card expired",
|
|
143
|
-
message: t.cardExpiredMessage || "Your card has expired",
|
|
144
|
-
suggestion: t.cardExpiredSuggestion || "Please use a different card or update your card details",
|
|
145
|
-
retryable: !0
|
|
146
|
-
} : n === "do_not_honor" ? {
|
|
147
|
-
type: "card_declined",
|
|
148
|
-
title: t.cardDeclinedTitle || "Card declined",
|
|
149
|
-
message: t.cardDoNotHonorMessage || "Your bank declined this card",
|
|
150
|
-
suggestion: t.cardDoNotHonorSuggestion || "Try another card or call your bank",
|
|
151
|
-
retryable: !0
|
|
152
|
-
} : {
|
|
153
|
-
type: "card_declined",
|
|
154
|
-
title: t.cardDeclinedTitle || "Card declined",
|
|
155
|
-
message: t.cardDeclinedMessage || "Your card was declined by your bank",
|
|
156
|
-
suggestion: t.cardDeclinedSuggestion || "Please try a different card or contact your bank for more information",
|
|
157
|
-
retryable: !0
|
|
158
|
-
};
|
|
159
|
-
}
|
|
160
|
-
return r === "api_connection_error" || i.includes("network") || i.includes("connection") ? {
|
|
161
|
-
type: "network",
|
|
162
|
-
title: t.connectionError || "Connection error",
|
|
163
|
-
message: t.paymentConnectionErrorMessage || "We couldn't connect to the payment server",
|
|
164
|
-
suggestion: t.paymentConnectionErrorSuggestion || "Please check your internet connection and try again",
|
|
165
|
-
retryable: !0
|
|
166
|
-
} : n === "rate_limit" ? {
|
|
167
|
-
type: "rate_limit",
|
|
168
|
-
title: t.tooManyAttemptsTitle || "Too many attempts",
|
|
169
|
-
message: t.tooManyAttemptsMessage || "Too many payment attempts. Please wait a moment",
|
|
170
|
-
suggestion: t.tooManyAttemptsSuggestion || "Wait 30 seconds before trying again",
|
|
171
|
-
retryable: !0
|
|
172
|
-
} : n === "incorrect_number" || n === "invalid_number" ? {
|
|
173
|
-
type: "validation",
|
|
174
|
-
title: t.invalidCardNumberTitle || "Invalid card number",
|
|
175
|
-
message: t.invalidCardNumberMessage || "The card number you entered is invalid",
|
|
176
|
-
suggestion: t.invalidCardNumberSuggestion || "Please check your card number and try again",
|
|
177
|
-
retryable: !0
|
|
178
|
-
} : n === "incorrect_cvc" || n === "invalid_cvc" ? {
|
|
179
|
-
type: "validation",
|
|
180
|
-
title: t.invalidCvcTitle || "Invalid security code",
|
|
181
|
-
message: t.invalidCvcMessage || "The security code (CVC) is incorrect",
|
|
182
|
-
suggestion: t.invalidCvcSuggestion || "Please check the 3-digit code on the back of your card",
|
|
183
|
-
retryable: !0
|
|
184
|
-
} : n === "invalid_expiry_month" || n === "invalid_expiry_year" ? {
|
|
185
|
-
type: "validation",
|
|
186
|
-
title: t.invalidExpiryTitle || "Invalid expiration date",
|
|
187
|
-
message: t.invalidExpiryMessage || "The expiration date is invalid",
|
|
188
|
-
suggestion: t.invalidExpirySuggestion || "Please check your card's expiration date",
|
|
189
|
-
retryable: !0
|
|
190
|
-
} : {
|
|
191
|
-
type: "general",
|
|
192
|
-
title: t.paymentFailedTitle || "Payment failed",
|
|
193
|
-
message: i || t.paymentFailedMessage || "Something went wrong with your payment",
|
|
194
|
-
suggestion: t.paymentFailedSuggestion || "Please try again or use a different payment method",
|
|
195
|
-
retryable: !0
|
|
196
|
-
};
|
|
197
|
-
}
|
|
198
|
-
// src/components/Events/Checkout/GiftCardInput.svelte
|
|
199
|
-
var Z = e("GiftCardInput"), Ne = P.from_html("<div class=\"applied-card mb-2 svelte-emw0hd\"><div class=\"flex items-center gap-3\"><div class=\"applied-icon svelte-emw0hd\"><!></div> <div class=\"flex flex-col flex-1\"><span class=\"type-caption text-status-success-text\"> </span> <span class=\"type-body font-mono text-text-primary\"> </span></div> <span class=\"type-label text-accent-success\"> </span> <!></div></div>"), Pe = P.from_html("<div class=\"applied-card mb-3 svelte-emw0hd\"><div><!> <span> </span></div></div>"), Q = P.from_html("<div class=\"flex items-center gap-1.5 mt-2 type-body text-accent-danger\"><!> <span> </span></div>"), Fe = P.from_html("<div class=\"input-section svelte-emw0hd\"><div class=\"flex gap-2\"><input type=\"text\" name=\"giftCardCode\" autocomplete=\"off\" autocapitalize=\"characters\"/> <!></div> <!></div>"), Ie = P.from_html("<div class=\"mb-4\"><!> <!> <button type=\"button\"><!> <span> </span> <span class=\"toggle-indicator svelte-emw0hd\"> </span></button> <!></div>");
|
|
200
|
-
function Le(e, t) {
|
|
201
|
-
P.push(t, !0);
|
|
202
|
-
let n = ee(), a = P.prop(t, "onApplied", 3, () => {}), o = P.prop(t, "onRemoved", 3, () => {}), p = P.prop(t, "disabled", 3, !1), m = P.prop(t, "labels", 3, ce), h = P.prop(t, "owedTotal", 3, 0), _ = P.prop(t, "serverGiftCardAmount", 3, null), y = P.state(""), b = P.state(!1), x = P.state(""), S = P.state(P.proxy([])), C = P.state(!1), w = P.state(0);
|
|
203
|
-
P.user_effect(() => {
|
|
204
|
-
if (!t.cartId || p() || P.get(S).length > 0 || _() === 0) return;
|
|
205
|
-
let e = !1;
|
|
206
|
-
return v(t.cartId, void 0, { widgetKey: n }).then((t) => {
|
|
207
|
-
if (e || !t?.giftCards?.length) return;
|
|
208
|
-
let n = t.giftCards.filter((e) => typeof e.amount == "number");
|
|
209
|
-
n.length !== t.giftCards.length && Z.error("Ignored applied gift card(s) with an unusable amount while restoring the panel"), n.length !== 0 && (P.set(S, n.map((e) => ({
|
|
210
|
-
giftCardId: e.giftCardId,
|
|
211
|
-
code: e.maskedCode,
|
|
212
|
-
giftCardAmount: e.amount
|
|
213
|
-
})), !0), P.set(w, P.get(S).reduce((e, t) => e + (t.giftCardAmount || 0), 0) + (h() || 0)));
|
|
214
|
-
}).catch((e) => Z.error("Could not restore applied gift cards:", e)), () => {
|
|
215
|
-
e = !0;
|
|
216
|
-
};
|
|
217
|
-
});
|
|
218
|
-
let T = P.derived(() => P.get(S).reduce((e, t) => e + (t.giftCardAmount || 0), 0)), E = P.derived(() => Math.max(0, P.get(w) - P.get(T))), te = P.derived(() => P.get(S).length > 0 && P.get(E) <= 0);
|
|
219
|
-
function ne() {
|
|
220
|
-
P.get(S).length === 0 ? o()() : a()({
|
|
221
|
-
code: P.get(S).map((e) => e.code).join(", "),
|
|
222
|
-
giftCardAmount: P.get(T),
|
|
223
|
-
stripeAmount: P.get(E),
|
|
224
|
-
requiresStripe: P.get(E) > 0,
|
|
225
|
-
paymentType: P.get(E) > 0 ? "split" : "gift_card_only",
|
|
226
|
-
orderTotal: P.get(w)
|
|
227
|
-
});
|
|
228
|
-
}
|
|
229
|
-
async function re() {
|
|
230
|
-
let e = P.get(y).trim().toUpperCase();
|
|
231
|
-
if (e && !P.get(b) && t.cartId) {
|
|
232
|
-
if (P.get(S).some((t) => t.code === e)) P.set(x, m().giftCardAlreadyApplied || "That gift card is already applied", !0);
|
|
233
|
-
else {
|
|
234
|
-
P.set(b, !0), P.set(x, "");
|
|
235
|
-
try {
|
|
236
|
-
let r = await ie(t.cartId, e, { widgetKey: n });
|
|
237
|
-
r.valid ? (P.set(S, [...P.get(S), {
|
|
238
|
-
code: r.giftCardCode || e,
|
|
239
|
-
giftCardAmount: r.giftCardAmount || 0
|
|
240
|
-
}], !0), P.set(w, P.get(T) + (r.stripeAmount || 0)), P.set(y, ""), P.set(C, !1), ne()) : P.set(x, r.error || m().invalidGiftCardCode || "Invalid gift card code", !0);
|
|
241
|
-
} catch (e) {
|
|
242
|
-
Z.error("Error applying gift card:", e);
|
|
243
|
-
let t = e && typeof e == "object" && typeof e.message == "string" ? e.message : "";
|
|
244
|
-
P.set(x, t || m().failedToApplyGiftCard || "Failed to apply gift card. Please try again", !0);
|
|
245
|
-
}
|
|
246
|
-
P.set(b, !1);
|
|
247
|
-
}
|
|
248
|
-
}
|
|
249
|
-
}
|
|
250
|
-
async function ae(e) {
|
|
251
|
-
if (!P.get(b) && t.cartId) {
|
|
252
|
-
P.set(b, !0), P.set(x, "");
|
|
253
|
-
try {
|
|
254
|
-
let r = P.get(S).find((t) => t.code === e), i = await D(t.cartId, r?.giftCardId ? { giftCardId: r.giftCardId } : { code: e }, { widgetKey: n });
|
|
255
|
-
i.success !== !1 && !i.error ? (P.set(S, P.get(S).filter((t) => t.code !== e), !0), typeof i.remainingTotal == "number" && P.set(w, P.get(T) + i.remainingTotal), ne()) : P.set(x, i.error || m().failedToRemoveGiftCard || "Failed to remove gift card. Please try again", !0);
|
|
256
|
-
} catch (e) {
|
|
257
|
-
Z.error("Error removing gift card:", e), P.set(x, m().failedToRemoveGiftCard || "Failed to remove gift card. Please try again", !0);
|
|
258
|
-
}
|
|
259
|
-
P.set(b, !1);
|
|
260
|
-
}
|
|
261
|
-
}
|
|
262
|
-
function k(e) {
|
|
263
|
-
e.key === "Enter" && !P.get(b) && re();
|
|
264
|
-
}
|
|
265
|
-
function A() {
|
|
266
|
-
P.set(C, !P.get(C)), P.get(C) || (P.set(y, ""), P.set(x, ""));
|
|
267
|
-
}
|
|
268
|
-
var j = Ie(), M = P.child(j);
|
|
269
|
-
P.each(M, 17, () => P.get(S), (e) => e.code, (e, t) => {
|
|
270
|
-
var n = Ne(), a = P.child(n), o = P.child(a), s = P.child(o);
|
|
271
|
-
r(s, { size: "16" }), P.reset(o);
|
|
272
|
-
var c = P.sibling(o, 2), l = P.child(c), u = P.only_child(l, !0), h = P.sibling(l, 2), _ = P.only_child(h, !0);
|
|
273
|
-
P.reset(c);
|
|
274
|
-
var v = P.sibling(c, 2), y = P.only_child(v), x = P.sibling(v, 2);
|
|
275
|
-
{
|
|
276
|
-
let e = P.derived(() => m().removeGiftCard || "Remove gift card");
|
|
277
|
-
O(x, {
|
|
278
|
-
variant: "icon",
|
|
279
|
-
size: "icon-sm",
|
|
280
|
-
class: "rounded-full hover:bg-status-error-bg hover:text-accent-danger",
|
|
281
|
-
onclick: () => ae(P.get(t).code),
|
|
282
|
-
get loading() {
|
|
283
|
-
return P.get(b);
|
|
284
|
-
},
|
|
285
|
-
get disabled() {
|
|
286
|
-
return p();
|
|
287
|
-
},
|
|
288
|
-
get "aria-label"() {
|
|
289
|
-
return P.get(e);
|
|
290
|
-
},
|
|
291
|
-
children: (e, t) => {
|
|
292
|
-
i(e, { size: "16" });
|
|
293
|
-
},
|
|
294
|
-
$$slots: { default: !0 }
|
|
295
|
-
});
|
|
296
|
-
}
|
|
297
|
-
P.reset(a), P.reset(n), P.template_effect((e) => {
|
|
298
|
-
P.set_text(u, m().giftCardApplied || "Gift card applied"), P.set_text(_, P.get(t).code), P.set_text(y, `-${e ?? ""}`);
|
|
299
|
-
}, [() => g(P.get(t).giftCardAmount)]), P.transition(3, n, () => d, () => ({ duration: f.fast })), P.append(e, n);
|
|
300
|
-
});
|
|
301
|
-
var oe = P.sibling(M, 2), se = (e) => {
|
|
302
|
-
var t = Pe(), n = P.child(t), i = P.child(n);
|
|
303
|
-
r(i, { size: "16" });
|
|
304
|
-
var a = P.sibling(i, 2), o = P.only_child(a, !0);
|
|
305
|
-
P.reset(n), P.reset(t), P.template_effect(() => {
|
|
306
|
-
P.set_class(n, 1, `full-coverage-badge ${l.caption ?? ""} ${u.emphasis ?? ""}`, "svelte-emw0hd"), P.set_text(o, m().fullyCoveredByGiftCard || "Fully covered by gift card");
|
|
307
|
-
}), P.append(e, t);
|
|
308
|
-
};
|
|
309
|
-
P.if(oe, (e) => {
|
|
310
|
-
P.get(te) && e(se);
|
|
311
|
-
});
|
|
312
|
-
var N = P.sibling(oe, 2), le = P.child(N);
|
|
313
|
-
s(le, {
|
|
314
|
-
size: "20",
|
|
315
|
-
class: "gift-icon"
|
|
316
|
-
});
|
|
317
|
-
var ue = P.sibling(le, 2), de = P.only_child(ue, !0), fe = P.sibling(ue, 2), pe = P.only_child(fe, !0);
|
|
318
|
-
P.reset(N);
|
|
319
|
-
var me = P.sibling(N, 2), he = (e) => {
|
|
320
|
-
var t = Fe(), n = P.child(t), r = P.child(n);
|
|
321
|
-
P.remove_input_defaults(r);
|
|
322
|
-
let i;
|
|
323
|
-
var a = P.sibling(r, 2);
|
|
324
|
-
{
|
|
325
|
-
let e = P.derived(() => !P.get(y).trim() || p());
|
|
326
|
-
O(a, {
|
|
327
|
-
variant: "default",
|
|
328
|
-
size: "sm",
|
|
329
|
-
class: "min-w-16 shrink-0",
|
|
330
|
-
onclick: re,
|
|
331
|
-
get loading() {
|
|
332
|
-
return P.get(b);
|
|
333
|
-
},
|
|
334
|
-
get disabled() {
|
|
335
|
-
return P.get(e);
|
|
336
|
-
},
|
|
337
|
-
children: (e, t) => {
|
|
338
|
-
P.next();
|
|
339
|
-
var n = P.text();
|
|
340
|
-
P.template_effect(() => P.set_text(n, m().apply || "Apply")), P.append(e, n);
|
|
341
|
-
},
|
|
342
|
-
$$slots: { default: !0 }
|
|
343
|
-
});
|
|
344
|
-
}
|
|
345
|
-
P.reset(n);
|
|
346
|
-
var o = P.sibling(n, 2), s = (e) => {
|
|
347
|
-
var t = Q(), n = P.child(t);
|
|
348
|
-
c(n, { size: "16" });
|
|
349
|
-
var r = P.sibling(n, 2), i = P.only_child(r, !0);
|
|
350
|
-
P.reset(t), P.template_effect(() => P.set_text(i, P.get(x))), P.transition(3, t, () => d, () => ({ duration: f.micro })), P.append(e, t);
|
|
351
|
-
};
|
|
352
|
-
P.if(o, (e) => {
|
|
353
|
-
P.get(x) && e(s);
|
|
354
|
-
}), P.reset(t), P.template_effect(() => {
|
|
355
|
-
P.set_attribute(r, "aria-label", m().enterGiftCardCode || "Enter gift card code"), P.set_attribute(r, "placeholder", m().enterGiftCardCode || "Enter gift card code"), r.disabled = P.get(b) || p(), i = P.set_class(r, 1, `gift-input ${l.body ?? ""}`, "svelte-emw0hd", i, { "has-error": !!P.get(x) });
|
|
356
|
-
}), P.delegated("keydown", r, k), P.bind_value(r, () => P.get(y), (e) => P.set(y, e)), P.transition(3, t, () => d, () => ({ duration: f.fast })), P.append(e, t);
|
|
357
|
-
};
|
|
358
|
-
P.if(me, (e) => {
|
|
359
|
-
P.get(C) && e(he);
|
|
360
|
-
}), P.reset(j), P.template_effect(() => {
|
|
361
|
-
P.set_class(N, 1, `gift-card-toggle ${l.label ?? ""}`, "svelte-emw0hd"), N.disabled = p(), P.set_attribute(N, "aria-expanded", P.get(C)), P.set_text(de, P.get(S).length > 0 ? m().addAnotherGiftCard || "Add another gift card" : m().haveAGiftCard || "Have a gift card?"), P.set_text(pe, P.get(C) ? "-" : "+");
|
|
362
|
-
}), P.delegated("click", N, A), P.append(e, j), P.pop();
|
|
363
|
-
}
|
|
364
|
-
P.delegate(["click", "keydown"]);
|
|
365
|
-
// src/components/Modals/EventUnavailableModal.svelte
|
|
366
|
-
var Re = P.from_html("<div class=\"flex flex-col items-center text-center pt-6 px-4 pb-4\"><div aria-hidden=\"true\"><!></div> <h3 id=\"event-unavailable-title\"> </h3> <p id=\"event-unavailable-body\" class=\"type-body tone-secondary max-w-72\"> </p></div>"), ze = P.from_html("<!> <!>", 1);
|
|
367
|
-
function Be(e, r) {
|
|
368
|
-
P.push(r, !0);
|
|
369
|
-
let i = P.prop(r, "open", 15, !1), a = P.prop(r, "onBackToEvents", 3, () => {}), o = P.prop(r, "labels", 3, ce), s = P.derived(() => r.reason === "canceled"), c = P.derived(() => P.get(s) ? o().eventCanceledTitle || "Event canceled" : o().eventPostponedTitle || "Event postponed"), u = P.derived(() => P.get(s) ? o().eventCanceledBody || "This event was canceled — you weren't charged" : o().eventPostponedBody || "Sales are paused while this show is rescheduled — you weren't charged"), d = P.derived(() => o().backToEvents || "Back to events");
|
|
370
|
-
ae(e, {
|
|
371
|
-
size: "sm",
|
|
372
|
-
role: "alertdialog",
|
|
373
|
-
class: "micdrop",
|
|
374
|
-
get open() {
|
|
375
|
-
return i();
|
|
376
|
-
},
|
|
377
|
-
set open(e) {
|
|
378
|
-
i(e);
|
|
379
|
-
},
|
|
380
|
-
children: (e, r) => {
|
|
381
|
-
var i = ze(), o = P.first_child(i);
|
|
382
|
-
k(o, {});
|
|
383
|
-
var f = P.sibling(o, 2);
|
|
384
|
-
j(f, {
|
|
385
|
-
children: (e, r) => {
|
|
386
|
-
var i = ze(), o = P.first_child(i);
|
|
387
|
-
A(o, {
|
|
388
|
-
children: (e, r) => {
|
|
389
|
-
var i = Re(), a = P.child(i), o = P.child(a), d = (e) => {
|
|
390
|
-
n(e, { size: "32" });
|
|
391
|
-
}, f = (e) => {
|
|
392
|
-
t(e, { size: "32" });
|
|
393
|
-
};
|
|
394
|
-
P.if(o, (e) => {
|
|
395
|
-
P.get(s) ? e(d) : e(f, -1);
|
|
396
|
-
}), P.reset(a);
|
|
397
|
-
var p = P.sibling(a, 2), m = P.only_child(p, !0), h = P.sibling(p, 2), g = P.only_child(h, !0);
|
|
398
|
-
P.reset(i), P.template_effect(() => {
|
|
399
|
-
P.set_class(a, 1, `w-16 h-16 rounded-full flex items-center justify-center mb-4 ${P.get(s) ? "bg-accent-danger/10 text-accent-danger" : "bg-accent-warning/10 text-accent-warning"}`), P.set_class(p, 1, `mb-2 ${l.heading ?? ""}`), P.set_text(m, P.get(c)), P.set_text(g, P.get(u));
|
|
400
|
-
}), P.append(e, i);
|
|
401
|
-
},
|
|
402
|
-
$$slots: { default: !0 }
|
|
403
|
-
});
|
|
404
|
-
var f = P.sibling(o, 2);
|
|
405
|
-
M(f, {
|
|
406
|
-
children: (e, t) => {
|
|
407
|
-
O(e, {
|
|
408
|
-
size: "full",
|
|
409
|
-
variant: "default",
|
|
410
|
-
get onclick() {
|
|
411
|
-
return a();
|
|
412
|
-
},
|
|
413
|
-
get "aria-label"() {
|
|
414
|
-
return P.get(d);
|
|
415
|
-
},
|
|
416
|
-
children: (e, t) => {
|
|
417
|
-
P.next();
|
|
418
|
-
var n = P.text();
|
|
419
|
-
P.template_effect(() => P.set_text(n, P.get(d))), P.append(e, n);
|
|
420
|
-
},
|
|
421
|
-
$$slots: { default: !0 }
|
|
422
|
-
});
|
|
423
|
-
},
|
|
424
|
-
$$slots: { default: !0 }
|
|
425
|
-
}), P.append(e, i);
|
|
426
|
-
},
|
|
427
|
-
$$slots: { default: !0 }
|
|
428
|
-
}), P.append(e, i);
|
|
429
|
-
},
|
|
430
|
-
$$slots: { default: !0 }
|
|
431
|
-
}), P.pop();
|
|
432
|
-
}
|
|
433
|
-
// src/components/Views/Checkout.svelte
|
|
434
|
-
var $ = e("Checkout"), Ve = P.from_html("<div class=\"p-8 text-center\"><p class=\"text-accent-danger\"> </p></div>"), He = P.from_html("<!> <!>", 1);
|
|
435
|
-
function Ue(e, t) {
|
|
436
|
-
P.push(t, !0);
|
|
437
|
-
let n = ee(), r = P.prop(t, "availableTickets", 23, () => []);
|
|
438
|
-
P.prop(t, "value", 3, "");
|
|
439
|
-
let i = P.prop(t, "venueId", 3, ""), s = P.prop(t, "organizationId", 3, ""), c = P.prop(t, "onNavigateBack", 3, void 0), l = P.prop(t, "backInBar", 3, !1), u = P.prop(t, "initialError", 3, void 0), d = P.prop(t, "widgetId", 3, null), f = P.prop(t, "labels", 3, ce), g = P.prop(t, "locale", 3, void 0);
|
|
440
|
-
function v(e) {
|
|
441
|
-
if (!e) return {};
|
|
442
|
-
let t = { ...e.venue ?? {} };
|
|
443
|
-
for (let n of [
|
|
444
|
-
"askForPhoneAtCheckout",
|
|
445
|
-
"requiredPhoneAtCheckout",
|
|
446
|
-
"hasCustomCheckout",
|
|
447
|
-
"requiredCustomCheckout",
|
|
448
|
-
"questionPrompt"
|
|
449
|
-
]) e[n] !== void 0 && (t[n] = e[n]);
|
|
450
|
-
return t;
|
|
451
|
-
}
|
|
452
|
-
let D = P.derived(() => (t.data || {}).id);
|
|
453
|
-
P.derived(() => (t.data || {}).orgSlug);
|
|
454
|
-
let ie = P.derived(() => (t.data || {}).slug), O = P.derived(() => (t.data || {}).event), ae = P.derived(() => ue(v(P.get(O)))), k = P.derived(() => P.get(O) ? {
|
|
455
|
-
...de(P.get(O)),
|
|
456
|
-
...P.get(ae)
|
|
457
|
-
} : t.data && (t.data.id || P.get(D)) ? {
|
|
458
|
-
id: t.data.id || P.get(D),
|
|
459
|
-
eventID: t.data.id || P.get(D),
|
|
460
|
-
venueID: t.data.venueID ?? t.data.venueId ?? null,
|
|
461
|
-
venueId: t.data.venueId ?? t.data.venueID ?? null,
|
|
462
|
-
eventTicketingType: 0,
|
|
463
|
-
ticketType: 0,
|
|
464
|
-
availableTickets: []
|
|
465
|
-
} : null), A = P.state(""), j = P.state(P.proxy({})), M = P.state(P.proxy({})), F = P.state(P.proxy({})), I = P.state(P.proxy([])), L = P.state(""), Te = P.state(0), R = P.state(!1), Ee = P.state(!1), z = P.state(!1), B = P.state(!1), De = P.state(!1), Oe = P.state(null), ke = P.derived(() => Object.values(P.get(j)).reduce((e, t) => e + (Number(t) || 0), 0)), V = P.state(null), H = P.state(""), U = P.state(void 0), W = P.state(null), G = P.state(""), Ae = P.state(!1), je = P.state(""), K = P.state(null), q = P.derived(() => P.get(K) !== null), J = P.state(null), Y = P.state(null), Z = null, Ne = P.state(!1);
|
|
466
|
-
function Pe() {
|
|
467
|
-
return {
|
|
468
|
-
value: Z?.total ?? null,
|
|
469
|
-
currency: Z?.currency || "USD"
|
|
470
|
-
};
|
|
471
|
-
}
|
|
472
|
-
we(async () => {
|
|
473
|
-
if (P.set(A, xe(he) || xe(be.CHECKOUT_CARTID), !0), !P.get(A)) {
|
|
474
|
-
P.set(Ae, !0), P.set(je, f().noCheckoutSession || "No checkout session found. Please select tickets first", !0);
|
|
475
|
-
return;
|
|
476
|
-
}
|
|
477
|
-
b(P.get(k)?.eventID || P.get(k)?.id || P.get(D), d(), i() || P.get(k)?.venueID || P.get(k)?.venueId || null, P.get(A));
|
|
478
|
-
let e = P.get(k)?.eventID || P.get(k)?.id || P.get(D);
|
|
479
|
-
try {
|
|
480
|
-
let t = fe(e);
|
|
481
|
-
P.set(j, t.quantities || {}, !0), P.set(M, t.donationAmounts || {}, !0), P.set(F, t.addOnQuantities || {}, !0), P.set(L, t.promocode || "", !0), P.set(Te, t.promoDiscountAmount || 0, !0), P.set(I, t.tickets || [], !0);
|
|
482
|
-
} catch (e) {
|
|
483
|
-
$.error("Error loading checkout state:", e), P.set(j, {}, !0), P.set(F, {}, !0), P.set(I, [], !0);
|
|
484
|
-
}
|
|
485
|
-
P.get(I).length > 0 && P.get(k) && (P.get(k).availableTickets = P.get(I), r(P.get(I)));
|
|
486
|
-
let t = _e(P.get(k)?.venueID || P.get(k)?.venueId || i(), { widgetKey: n }).then((e) => ({ data: e }), (e) => ({ error: e }));
|
|
487
|
-
Object.keys(P.get(j)).length > 0 && (P.set(z, !0), Fe().finally(() => {
|
|
488
|
-
P.set(z, !1);
|
|
489
|
-
}));
|
|
490
|
-
let s = {
|
|
491
|
-
serviceFeeCents: 0,
|
|
492
|
-
serviceFeePercentage: 0,
|
|
493
|
-
serviceFeeChargeType: "both",
|
|
494
|
-
maxServiceFeeCents: 0,
|
|
495
|
-
absorbServiceFee: !1,
|
|
496
|
-
taxPercentage: 0
|
|
497
|
-
};
|
|
498
|
-
try {
|
|
499
|
-
let e = await t;
|
|
500
|
-
if ("error" in e) throw e.error;
|
|
501
|
-
let n = e.data;
|
|
502
|
-
s = {
|
|
503
|
-
serviceFeeCents: Number(n?.serviceFeeCents == null ? 0 : n.serviceFeeCents),
|
|
504
|
-
serviceFeePercentage: Number(n?.serviceFeePercentage ?? 0),
|
|
505
|
-
serviceFeeChargeType: String(n?.serviceFeeChargeType ?? "both"),
|
|
506
|
-
maxServiceFeeCents: Number(n?.maxServiceFeeCents == null ? 0 : n.maxServiceFeeCents),
|
|
507
|
-
absorbServiceFee: n?.absorbServiceFee === !0,
|
|
508
|
-
taxPercentage: Number(n?.taxPercentage ?? 0)
|
|
509
|
-
};
|
|
510
|
-
} catch (e) {
|
|
511
|
-
$.error("Error fetching venue data:", e);
|
|
512
|
-
}
|
|
513
|
-
let c = [...Re(P.get(j), P.get(I), s), ...ze(P.get(F), P.get(k)?.addOns)], l = 900, p = "", h, g;
|
|
514
|
-
if (P.get(A)) {
|
|
515
|
-
let e = ge(P.get(A));
|
|
516
|
-
if (e) {
|
|
517
|
-
let t = Math.max(0, Math.floor((e - Date.now()) / 1e3));
|
|
518
|
-
t > 0 && (l = t);
|
|
519
|
-
}
|
|
520
|
-
try {
|
|
521
|
-
let e = await S(P.get(A), { widgetKey: n });
|
|
522
|
-
if (e.error || (e.remainingExtensions !== void 0 && (h = e.remainingExtensions), e.canExtend !== void 0 && (g = e.canExtend)), !e.error && e.expiresAt) {
|
|
523
|
-
let t = m(e.expiresAt).getTime();
|
|
524
|
-
l = Math.max(0, Math.floor((t - Date.now()) / 1e3)), p = e.expiresAt, pe(P.get(A), t);
|
|
525
|
-
}
|
|
526
|
-
} catch {}
|
|
527
|
-
}
|
|
528
|
-
let v = xe(`checkout-promo-discount-type-${e}`), y = [];
|
|
529
|
-
try {
|
|
530
|
-
let t = xe(`checkout-promo-ticket-ids-${e}`), n = t ? JSON.parse(t) : [];
|
|
531
|
-
Array.isArray(n) && (y = n);
|
|
532
|
-
} catch {
|
|
533
|
-
y = [];
|
|
534
|
-
}
|
|
535
|
-
let x = _(c.filter((e) => o(y, e.ticketId)).reduce((e, t) => e + (t.subtotal == null ? 0 : t.subtotal), 0)), ee = a(x, P.get(Te), v);
|
|
536
|
-
if (P.set(Y, {
|
|
537
|
-
event: Ie(P.get(k), s),
|
|
538
|
-
lines: c,
|
|
539
|
-
timerStart: l,
|
|
540
|
-
...p ? { deadlineAt: p } : {},
|
|
541
|
-
...h === void 0 ? {} : { remainingExtensions: h },
|
|
542
|
-
...g === void 0 ? {} : { canExtend: g },
|
|
543
|
-
promoApplied: !!P.get(L),
|
|
544
|
-
promoDiscount: ee,
|
|
545
|
-
forceExpired: !1,
|
|
546
|
-
...Z ? { serverTotals: Z } : {}
|
|
547
|
-
}, !0), u()) {
|
|
548
|
-
let e = X(typeof u() == "object" ? u() : {
|
|
549
|
-
code: "card_declined",
|
|
550
|
-
message: "Your card was declined. Please try a different payment method."
|
|
551
|
-
}, f());
|
|
552
|
-
P.set(W, {
|
|
553
|
-
message: e.message,
|
|
554
|
-
suggestion: e.suggestion
|
|
555
|
-
}, !0);
|
|
556
|
-
}
|
|
557
|
-
});
|
|
558
|
-
let Q = 0;
|
|
559
|
-
async function Fe() {
|
|
560
|
-
let e = ++Q;
|
|
561
|
-
if (!P.get(A)) {
|
|
562
|
-
$.error("Missing cartId!");
|
|
563
|
-
return;
|
|
564
|
-
}
|
|
565
|
-
let t = Object.fromEntries(Object.entries(P.get(j)).filter(([e, t]) => t > 0));
|
|
566
|
-
try {
|
|
567
|
-
let r = Object.fromEntries(Object.entries(P.get(M)).filter(([, e]) => parseFloat(String(e)) > 0).map(([e, t]) => [parseInt(e, 10), parseFloat(String(t))]));
|
|
568
|
-
if (P.get(L)) {
|
|
569
|
-
let t = await te(P.get(A), P.get(L), void 0, { widgetKey: n });
|
|
570
|
-
if (e !== Q) return;
|
|
571
|
-
t.success ? P.set(G, "") : ($.error("Failed to apply promo code to cart:", t.error), P.set(G, (f().promoCodeNotApplied || "We couldn't apply promo code {code}. It isn't included in this total — go back to re-enter it, or continue at the full price").replace("{code}", P.get(L)), !0));
|
|
572
|
-
}
|
|
573
|
-
let i = await C(P.get(A), t, Object.keys(r).length > 0 ? r : void 0, void 0, g(), { widgetKey: n });
|
|
574
|
-
if (e !== Q) return;
|
|
575
|
-
if (!i) {
|
|
576
|
-
P.set(W, { message: f().failedToCreatePaymentIntent || "Failed to create payment intent. Please try again" }, !0);
|
|
577
|
-
return;
|
|
578
|
-
}
|
|
579
|
-
P.set(Ne, !1), Z = E(i), P.get(Y) && P.set(Y, {
|
|
580
|
-
...P.get(Y),
|
|
581
|
-
serverTotals: Z
|
|
582
|
-
}, !0);
|
|
583
|
-
let a = i;
|
|
584
|
-
if (a.requires_stripe === !1 || a.payment_type === "free") {
|
|
585
|
-
P.set(H, "free");
|
|
586
|
-
return;
|
|
587
|
-
}
|
|
588
|
-
P.set(Ne, Z === null);
|
|
589
|
-
let o = i.stripe_publishable_key;
|
|
590
|
-
if (!o) {
|
|
591
|
-
$.error("No Stripe publishable key in payment intent response"), P.set(W, { message: f().paymentConfigError || "Payment configuration error. Please try again" }, !0);
|
|
592
|
-
return;
|
|
593
|
-
}
|
|
594
|
-
let s = await Me(o);
|
|
595
|
-
if (e !== Q) return;
|
|
596
|
-
P.set(V, s, !0), i.client_secret ? P.set(H, i.client_secret, !0) : P.set(W, { message: f().failedToInitPayment || "Failed to initialize payment. Please try again" }, !0);
|
|
597
|
-
} catch (t) {
|
|
598
|
-
if ($.error("Failed to initialize Stripe payment:", t), e !== Q) return;
|
|
599
|
-
P.set(W, { message: t.message || f().failedToInitPayment || "Failed to initialize payment. Please try again" }, !0);
|
|
600
|
-
}
|
|
601
|
-
}
|
|
602
|
-
function Ie(e, t) {
|
|
603
|
-
return e ? {
|
|
604
|
-
id: e.id || e.eventID,
|
|
605
|
-
title: e.name || e.title || "",
|
|
606
|
-
slug: e.slug || P.get(ie) || "",
|
|
607
|
-
description: e.description || "",
|
|
608
|
-
date: e.date || "",
|
|
609
|
-
startDateTime: e.startDateTime || "",
|
|
610
|
-
endDateTime: e.endDateTime || "",
|
|
611
|
-
doorsOpenTime: e.doorsOpenTime || "",
|
|
612
|
-
timezone: e.timeZone || e.timezone || se(),
|
|
613
|
-
imageUrl: e.imageUrl || e.image || "",
|
|
614
|
-
...P.get(ae),
|
|
615
|
-
venue: {
|
|
616
|
-
id: e.venueID || e.venueId || 0,
|
|
617
|
-
name: e.venueName || e.venue?.name || "",
|
|
618
|
-
address: e.venueAddress || "",
|
|
619
|
-
timezone: e.timeZone || e.timezone || se(),
|
|
620
|
-
serviceFeePercentage: t.serviceFeePercentage,
|
|
621
|
-
serviceFeeCents: t.serviceFeeCents,
|
|
622
|
-
taxPercentage: t.taxPercentage,
|
|
623
|
-
serviceFeeChargeType: t.serviceFeeChargeType,
|
|
624
|
-
maxServiceFeeCents: t.maxServiceFeeCents,
|
|
625
|
-
absorbServiceFee: t.absorbServiceFee
|
|
626
|
-
},
|
|
627
|
-
performers: e.performers || [],
|
|
628
|
-
addOns: e.addOns || [],
|
|
629
|
-
tickets: (e.availableTickets || []).map((e) => ({
|
|
630
|
-
id: e.ID || e.id,
|
|
631
|
-
name: e.name || "",
|
|
632
|
-
description: e.description || "",
|
|
633
|
-
price: N(e.price),
|
|
634
|
-
fee: 0,
|
|
635
|
-
quantityAvailable: e.quantityAvailable || 0,
|
|
636
|
-
quantityTotal: e.quantityTotal || 0,
|
|
637
|
-
minPerOrder: e.minPerOrder || 1,
|
|
638
|
-
maxPerOrder: e.maxPerOrder || 10,
|
|
639
|
-
status: "on_sale",
|
|
640
|
-
isDonation: me(e),
|
|
641
|
-
isHidden: !1
|
|
642
|
-
})),
|
|
643
|
-
faqs: e.faqs || [],
|
|
644
|
-
status: "on_sale",
|
|
645
|
-
isPasswordProtected: !1,
|
|
646
|
-
isRegistrationEvent: e.eventTicketingType === 1 || e.ticketType === 1,
|
|
647
|
-
totalTicketsRemaining: 100,
|
|
648
|
-
totalTicketsCapacity: 100
|
|
649
|
-
} : null;
|
|
650
|
-
}
|
|
651
|
-
function Re(e, t, n) {
|
|
652
|
-
let r = [];
|
|
653
|
-
for (let [i, a] of Object.entries(e)) {
|
|
654
|
-
if (a <= 0) continue;
|
|
655
|
-
let e = t.find((e) => String(e.ID) === i || String(e.id) === i);
|
|
656
|
-
if (!e) continue;
|
|
657
|
-
let o = me(e), s = e.price;
|
|
658
|
-
if (!o && (s == null || !Number.isFinite(s))) {
|
|
659
|
-
r.push({
|
|
660
|
-
ticketId: parseInt(i),
|
|
661
|
-
ticketName: e.name || "",
|
|
662
|
-
quantity: a,
|
|
663
|
-
unitPrice: null,
|
|
664
|
-
fee: 0,
|
|
665
|
-
subtotal: null,
|
|
666
|
-
isDonation: !1
|
|
667
|
-
});
|
|
668
|
-
continue;
|
|
669
|
-
}
|
|
670
|
-
let c = s ?? 0, l = ve(c, n, o);
|
|
671
|
-
r.push({
|
|
672
|
-
ticketId: parseInt(i),
|
|
673
|
-
ticketName: e.name || "",
|
|
674
|
-
quantity: a,
|
|
675
|
-
unitPrice: c,
|
|
676
|
-
fee: l,
|
|
677
|
-
subtotal: _(c * a),
|
|
678
|
-
isDonation: o
|
|
679
|
-
});
|
|
680
|
-
}
|
|
681
|
-
return r;
|
|
682
|
-
}
|
|
683
|
-
function ze(e, t) {
|
|
684
|
-
let n = t || [], r = [];
|
|
685
|
-
for (let [t, i] of Object.entries(e || {})) {
|
|
686
|
-
if (!(i > 0)) continue;
|
|
687
|
-
let e = n.find((e) => String(e.id) === String(t));
|
|
688
|
-
if (!e) continue;
|
|
689
|
-
let a = p(h(Number(e.priceCents) || 0));
|
|
690
|
-
r.push({
|
|
691
|
-
ticketId: parseInt(t, 10),
|
|
692
|
-
lineKey: `a:${t}`,
|
|
693
|
-
kind: "addon",
|
|
694
|
-
ticketName: e.name || "",
|
|
695
|
-
quantity: i,
|
|
696
|
-
unitPrice: a,
|
|
697
|
-
fee: 0,
|
|
698
|
-
subtotal: _(a * i),
|
|
699
|
-
isDonation: !1
|
|
700
|
-
});
|
|
701
|
-
}
|
|
702
|
-
return r;
|
|
703
|
-
}
|
|
704
|
-
let Ue = P.derived(() => Object.values(P.get(M)).some((e) => (Number(e) || 0) > 0)), We = P.derived(() => !P.get(Ue) && (!P.get(Y) || P.get(Y).lines.every((e) => e.unitPrice === 0)));
|
|
705
|
-
async function Ge(e) {
|
|
706
|
-
if (!P.get(R)) {
|
|
707
|
-
P.set(R, !0), P.set(W, null);
|
|
708
|
-
try {
|
|
709
|
-
if (P.get(z)) {
|
|
710
|
-
P.set(W, { message: f().paymentReinitializing || "Updating your total. Please wait a moment and try again" }, !0);
|
|
711
|
-
return;
|
|
712
|
-
}
|
|
713
|
-
if (P.get(J) && !P.get(J).requiresStripe) {
|
|
714
|
-
await Ke(e);
|
|
715
|
-
return;
|
|
716
|
-
}
|
|
717
|
-
if (P.get(We) || P.get(H) === "free" || Z?.total === 0) {
|
|
718
|
-
await qe(e);
|
|
719
|
-
return;
|
|
720
|
-
}
|
|
721
|
-
if (!P.get(U)) {
|
|
722
|
-
P.set(W, {
|
|
723
|
-
message: f().paymentFormNotReady || "Payment form is not ready. Please wait a moment and try again",
|
|
724
|
-
blocking: !0
|
|
725
|
-
}, !0), P.set(R, !1);
|
|
726
|
-
return;
|
|
727
|
-
}
|
|
728
|
-
if (!P.get(V)) {
|
|
729
|
-
P.set(W, {
|
|
730
|
-
message: f().paymentSystemNotInitialized || "Payment system is not initialized. Please refresh the page",
|
|
731
|
-
blocking: !0
|
|
732
|
-
}, !0), P.set(R, !1);
|
|
733
|
-
return;
|
|
734
|
-
}
|
|
735
|
-
let r = await y(P.get(A), Object.fromEntries(Object.entries(P.get(j)).filter(([e, t]) => t > 0)), Object.keys(P.get(M)).length > 0 ? Object.fromEntries(Object.entries(P.get(M)).filter(([, e]) => parseFloat(String(e)) > 0).map(([e, t]) => [parseInt(e, 10), parseFloat(String(t))])) : void 0, {
|
|
736
|
-
firstName: e.firstName,
|
|
737
|
-
lastName: e.lastName,
|
|
738
|
-
email: e.email,
|
|
739
|
-
phone: e.phone,
|
|
740
|
-
questionAnswer: e.questionAnswer,
|
|
741
|
-
mailingList: e.keepMeUpdated
|
|
742
|
-
}, g(), { widgetKey: n });
|
|
743
|
-
if (r.refusal) {
|
|
744
|
-
P.set(W, { message: r.refusal }, !0), P.set(R, !1);
|
|
745
|
-
return;
|
|
746
|
-
}
|
|
747
|
-
if (r.clientSecret && r.clientSecret !== P.get(H)) {
|
|
748
|
-
P.set(H, r.clientSecret, !0), P.set(W, { message: f().paymentReinitializing || "Updating your total. Please wait a moment and try again" }, !0), P.set(R, !1);
|
|
749
|
-
return;
|
|
750
|
-
}
|
|
751
|
-
let { error: a } = await P.get(U).submit();
|
|
752
|
-
if (a) {
|
|
753
|
-
let e = X(a, f());
|
|
754
|
-
P.set(W, {
|
|
755
|
-
message: e.message,
|
|
756
|
-
suggestion: e.suggestion
|
|
757
|
-
}, !0), P.set(R, !1);
|
|
758
|
-
return;
|
|
759
|
-
}
|
|
760
|
-
await Se(P.get(U), P.get(A), { widgetKey: n });
|
|
761
|
-
let o = await P.get(V).confirmPayment({
|
|
762
|
-
elements: P.get(U),
|
|
763
|
-
redirect: "if_required",
|
|
764
|
-
confirmParams: { return_url: oe(P.get(k)?.id || P.get(k)?.eventID || P.get(D), P.get(k)?.slug || P.get(ie) || "", {
|
|
765
|
-
orderId: P.get(A),
|
|
766
|
-
ticketCount: Object.values(P.get(j)).reduce((e, t) => e + (Number(t) || 0), 0)
|
|
767
|
-
}) }
|
|
768
|
-
});
|
|
769
|
-
if (o.error) {
|
|
770
|
-
let e = X(o.error, f());
|
|
771
|
-
P.set(W, {
|
|
772
|
-
message: e.message,
|
|
773
|
-
suggestion: e.suggestion
|
|
774
|
-
}, !0), P.set(R, !1);
|
|
775
|
-
return;
|
|
776
|
-
}
|
|
777
|
-
let c = {
|
|
778
|
-
id: P.get(A),
|
|
779
|
-
paymentIntentId: o.paymentIntent.id,
|
|
780
|
-
tickets: P.get(j),
|
|
781
|
-
firstName: e.firstName,
|
|
782
|
-
lastName: e.lastName,
|
|
783
|
-
email: e.email,
|
|
784
|
-
phone: e.phone,
|
|
785
|
-
questionAnswer: e.questionAnswer,
|
|
786
|
-
paymentMethod: "credit-card",
|
|
787
|
-
mailingList: e.keepMeUpdated,
|
|
788
|
-
saleType: "online"
|
|
789
|
-
}, l = await w(P.get(A), c, g(), { widgetKey: n });
|
|
790
|
-
if (l?.eventCanceled || l?.eventPostponed) {
|
|
791
|
-
P.set(K, l.eventCanceled ? "canceled" : "postponed", !0), P.set(W, null);
|
|
792
|
-
return;
|
|
793
|
-
}
|
|
794
|
-
if (l?.status === "Payment succeeded") {
|
|
795
|
-
Ce(P.get(A), e.email);
|
|
796
|
-
let n = {
|
|
797
|
-
orderId: P.get(A),
|
|
798
|
-
eventId: P.get(k)?.id || P.get(k)?.eventID || null,
|
|
799
|
-
event: P.get(k) || null,
|
|
800
|
-
venueId: i() || P.get(k)?.venueId || null,
|
|
801
|
-
organizationId: s() || P.get(k)?.organizationId || null,
|
|
802
|
-
...Pe()
|
|
803
|
-
};
|
|
804
|
-
t.onNavigateToSuccess && t.onNavigateToSuccess(n);
|
|
805
|
-
} else l?.status === "Payment amount does not match the total price" ? P.set(W, { message: f().paymentAmountMismatch || "Payment amount mismatch. Please refresh and try again" }, !0) : P.set(W, { message: f().paymentValidationFailed || "Payment validation failed. Please try again" }, !0);
|
|
806
|
-
} catch (e) {
|
|
807
|
-
$.error("Payment execution error:", e);
|
|
808
|
-
let t = X(e, f());
|
|
809
|
-
P.set(W, {
|
|
810
|
-
message: t.message,
|
|
811
|
-
suggestion: t.suggestion
|
|
812
|
-
}, !0);
|
|
813
|
-
} finally {
|
|
814
|
-
P.set(R, !1);
|
|
815
|
-
}
|
|
816
|
-
}
|
|
817
|
-
}
|
|
818
|
-
async function Ke(e) {
|
|
819
|
-
try {
|
|
820
|
-
let r = await ne(P.get(A), {
|
|
821
|
-
firstName: e.firstName,
|
|
822
|
-
lastName: e.lastName,
|
|
823
|
-
email: e.email,
|
|
824
|
-
phoneNumber: e.phone || null,
|
|
825
|
-
questionAnswer: e.questionAnswer,
|
|
826
|
-
mailingList: e.keepMeUpdated
|
|
827
|
-
}, g(), { widgetKey: n });
|
|
828
|
-
if (r?.success) {
|
|
829
|
-
Ce(r.orderId || P.get(A), e.email);
|
|
830
|
-
let n = {
|
|
831
|
-
orderId: r.orderId || P.get(A),
|
|
832
|
-
eventId: P.get(k)?.id || P.get(k)?.eventID || null,
|
|
833
|
-
event: P.get(k) || null,
|
|
834
|
-
venueId: i() || P.get(k)?.venueId || null,
|
|
835
|
-
organizationId: s() || P.get(k)?.organizationId || null,
|
|
836
|
-
paymentType: "gift_card_only",
|
|
837
|
-
...Pe()
|
|
838
|
-
};
|
|
839
|
-
t.onNavigateToSuccess && t.onNavigateToSuccess(n);
|
|
840
|
-
} else P.set(W, { message: r?.error || f().failedToCompleteOrder || "Failed to complete order. Please try again" }, !0);
|
|
841
|
-
} catch (e) {
|
|
842
|
-
$.error("Gift card payment error:", e);
|
|
843
|
-
let t = X(e, f());
|
|
844
|
-
P.set(W, {
|
|
845
|
-
message: t.message,
|
|
846
|
-
suggestion: t.suggestion
|
|
847
|
-
}, !0);
|
|
848
|
-
} finally {
|
|
849
|
-
P.set(R, !1);
|
|
850
|
-
}
|
|
851
|
-
}
|
|
852
|
-
async function qe(e) {
|
|
853
|
-
try {
|
|
854
|
-
let r = Object.fromEntries(Object.entries(P.get(j)).filter(([e, t]) => t > 0)), a = Object.fromEntries(Object.entries(P.get(M)).filter(([, e]) => parseFloat(String(e)) > 0).map(([e, t]) => [parseInt(e, 10), parseFloat(String(t))])), o = await C(P.get(A), r, Object.keys(a).length > 0 ? a : void 0, {
|
|
855
|
-
firstName: e.firstName,
|
|
856
|
-
lastName: e.lastName,
|
|
857
|
-
email: e.email,
|
|
858
|
-
phone: e.phone,
|
|
859
|
-
questionAnswer: e.questionAnswer,
|
|
860
|
-
mailingList: e.keepMeUpdated
|
|
861
|
-
}, g(), { widgetKey: n });
|
|
862
|
-
if (o?.requires_stripe !== !1 && o?.payment_type !== "free" || o?.order_finalized === !1) {
|
|
863
|
-
P.set(W, { message: f().failedToCompleteOrder || "Failed to complete order. Please try again" }, !0);
|
|
864
|
-
return;
|
|
865
|
-
}
|
|
866
|
-
P.set(H, "free"), Ce(P.get(A), e.email);
|
|
867
|
-
let c = {
|
|
868
|
-
orderId: P.get(A),
|
|
869
|
-
eventId: P.get(k)?.id || P.get(k)?.eventID || null,
|
|
870
|
-
event: P.get(k) || null,
|
|
871
|
-
venueId: i() || P.get(k)?.venueId || null,
|
|
872
|
-
organizationId: s() || P.get(k)?.organizationId || null,
|
|
873
|
-
paymentType: "free",
|
|
874
|
-
...Pe()
|
|
875
|
-
};
|
|
876
|
-
t.onNavigateToSuccess && t.onNavigateToSuccess(c);
|
|
877
|
-
} catch (e) {
|
|
878
|
-
$.error("Free order completion error:", e);
|
|
879
|
-
let t = X(e, f());
|
|
880
|
-
P.set(W, {
|
|
881
|
-
message: t.message,
|
|
882
|
-
suggestion: t.suggestion
|
|
883
|
-
}, !0);
|
|
884
|
-
} finally {
|
|
885
|
-
P.set(R, !1);
|
|
886
|
-
}
|
|
887
|
-
}
|
|
888
|
-
async function Je(e) {
|
|
889
|
-
if (P.set(J, e, !0), P.get(Y) && Z && P.set(Y, {
|
|
890
|
-
...P.get(Y),
|
|
891
|
-
serverTotals: T(Z, e)
|
|
892
|
-
}, !0), !e.requiresStripe) Q++, P.set(U, void 0), P.set(V, null), P.set(H, "");
|
|
893
|
-
else if (P.get(A) && Object.keys(P.get(j)).length > 0) {
|
|
894
|
-
P.set(z, !0);
|
|
895
|
-
try {
|
|
896
|
-
await Fe();
|
|
897
|
-
} finally {
|
|
898
|
-
P.set(z, !1);
|
|
899
|
-
}
|
|
900
|
-
}
|
|
901
|
-
}
|
|
902
|
-
async function Ye() {
|
|
903
|
-
if (P.set(J, null), P.get(Y) && Z && P.set(Y, {
|
|
904
|
-
...P.get(Y),
|
|
905
|
-
serverTotals: Z
|
|
906
|
-
}, !0), P.get(A) && Object.keys(P.get(j)).length > 0) {
|
|
907
|
-
P.set(z, !0);
|
|
908
|
-
try {
|
|
909
|
-
await Fe();
|
|
910
|
-
} finally {
|
|
911
|
-
P.set(z, !1);
|
|
912
|
-
}
|
|
913
|
-
}
|
|
914
|
-
}
|
|
915
|
-
async function Xe(e, t) {
|
|
916
|
-
if (!P.get(A) || P.get(B) || P.get(z)) return;
|
|
917
|
-
let r = { ...P.get(F) };
|
|
918
|
-
t > 0 ? r[e] = t : delete r[e], P.set(B, !0), P.set(De, !1), P.set(Oe, null), P.set(z, !0);
|
|
919
|
-
try {
|
|
920
|
-
let e = await re(P.get(A), r, { widgetKey: n });
|
|
921
|
-
if (!e.success) {
|
|
922
|
-
P.set(De, !0), P.set(Oe, e.error, !0);
|
|
923
|
-
return;
|
|
924
|
-
}
|
|
925
|
-
let t = {};
|
|
926
|
-
for (let n of e.lines) t[n.addOnId] = n.quantity;
|
|
927
|
-
P.set(F, t, !0), e.repriced && await Fe();
|
|
928
|
-
} finally {
|
|
929
|
-
P.set(B, !1), P.set(z, !1);
|
|
930
|
-
}
|
|
931
|
-
}
|
|
932
|
-
function Ze() {
|
|
933
|
-
c() ? c()() : window.history.back();
|
|
934
|
-
}
|
|
935
|
-
function Qe() {
|
|
936
|
-
c() ? c()() : window.history.back();
|
|
937
|
-
}
|
|
938
|
-
function $e() {
|
|
939
|
-
P.set(K, null), Ze();
|
|
940
|
-
}
|
|
941
|
-
async function et() {
|
|
942
|
-
if (!P.get(A)) return null;
|
|
943
|
-
try {
|
|
944
|
-
let e = await x(P.get(A), { widgetKey: n });
|
|
945
|
-
return e.success ? {
|
|
946
|
-
newExpiryTime: e.newExpiryTime,
|
|
947
|
-
remainingExtensions: e.remainingExtensions
|
|
948
|
-
} : ($.error("Failed to extend session:", e.error), null);
|
|
949
|
-
} catch (e) {
|
|
950
|
-
return $.error("Error extending checkout session:", e), null;
|
|
951
|
-
}
|
|
952
|
-
}
|
|
953
|
-
var tt = He(), nt = P.first_child(tt), rt = (e) => {
|
|
954
|
-
{
|
|
955
|
-
let t = (e) => {
|
|
956
|
-
{
|
|
957
|
-
let t = P.derived(() => P.get(R) || P.get(z)), n = P.derived(() => P.get(Y)?.serverTotals?.total ?? 0), r = P.derived(() => P.get(Y)?.serverTotals?.giftCardAmount ?? null);
|
|
958
|
-
Le(e, {
|
|
959
|
-
get cartId() {
|
|
960
|
-
return P.get(A);
|
|
961
|
-
},
|
|
962
|
-
onApplied: Je,
|
|
963
|
-
onRemoved: Ye,
|
|
964
|
-
get disabled() {
|
|
965
|
-
return P.get(t);
|
|
966
|
-
},
|
|
967
|
-
get owedTotal() {
|
|
968
|
-
return P.get(n);
|
|
969
|
-
},
|
|
970
|
-
get serverGiftCardAmount() {
|
|
971
|
-
return P.get(r);
|
|
972
|
-
},
|
|
973
|
-
get labels() {
|
|
974
|
-
return f();
|
|
975
|
-
}
|
|
976
|
-
});
|
|
977
|
-
}
|
|
978
|
-
}, n = P.derived(() => P.get(W) ?? (P.get(G) ? { message: P.get(G) } : null)), r = P.derived(() => P.get(k)?.addOns || []), i = P.derived(() => P.get(B) || P.get(z));
|
|
979
|
-
ye(e, {
|
|
980
|
-
get config() {
|
|
981
|
-
return P.get(Y);
|
|
982
|
-
},
|
|
983
|
-
onPlaceOrder: Ge,
|
|
984
|
-
onBack: Ze,
|
|
985
|
-
get backInBar() {
|
|
986
|
-
return l();
|
|
987
|
-
},
|
|
988
|
-
onRetryExpired: Qe,
|
|
989
|
-
onExtendSession: et,
|
|
990
|
-
get stripe() {
|
|
991
|
-
return P.get(V);
|
|
992
|
-
},
|
|
993
|
-
get paymentIntent() {
|
|
994
|
-
return P.get(H);
|
|
995
|
-
},
|
|
996
|
-
get serverTotalsUnavailable() {
|
|
997
|
-
return P.get(Ne);
|
|
998
|
-
},
|
|
999
|
-
get repricing() {
|
|
1000
|
-
return P.get(z);
|
|
1001
|
-
},
|
|
1002
|
-
get paymentError() {
|
|
1003
|
-
return P.get(n);
|
|
1004
|
-
},
|
|
1005
|
-
get labels() {
|
|
1006
|
-
return f();
|
|
1007
|
-
},
|
|
1008
|
-
get locale() {
|
|
1009
|
-
return g();
|
|
1010
|
-
},
|
|
1011
|
-
get checkoutAddOns() {
|
|
1012
|
-
return P.get(r);
|
|
1013
|
-
},
|
|
1014
|
-
get addOnQuantities() {
|
|
1015
|
-
return P.get(F);
|
|
1016
|
-
},
|
|
1017
|
-
get addOnTicketCount() {
|
|
1018
|
-
return P.get(ke);
|
|
1019
|
-
},
|
|
1020
|
-
onAddOnQuantityChange: Xe,
|
|
1021
|
-
get addOnsBusy() {
|
|
1022
|
-
return P.get(i);
|
|
1023
|
-
},
|
|
1024
|
-
get addOnsFailed() {
|
|
1025
|
-
return P.get(De);
|
|
1026
|
-
},
|
|
1027
|
-
get addOnsError() {
|
|
1028
|
-
return P.get(Oe);
|
|
1029
|
-
},
|
|
1030
|
-
get elements() {
|
|
1031
|
-
return P.get(U);
|
|
1032
|
-
},
|
|
1033
|
-
set elements(e) {
|
|
1034
|
-
P.set(U, e, !0);
|
|
1035
|
-
},
|
|
1036
|
-
get eventEnded() {
|
|
1037
|
-
return P.get(Ee);
|
|
1038
|
-
},
|
|
1039
|
-
set eventEnded(e) {
|
|
1040
|
-
P.set(Ee, e, !0);
|
|
1041
|
-
},
|
|
1042
|
-
giftCard: t,
|
|
1043
|
-
$$slots: { giftCard: !0 }
|
|
1044
|
-
});
|
|
1045
|
-
}
|
|
1046
|
-
}, it = (e) => {
|
|
1047
|
-
var t = Ve(), n = P.child(t), r = P.only_child(n, !0);
|
|
1048
|
-
P.reset(t), P.template_effect(() => P.set_text(r, P.get(je))), P.append(e, t);
|
|
1049
|
-
}, at = (e) => {
|
|
1050
|
-
le(e, { type: "checkout" });
|
|
1051
|
-
};
|
|
1052
|
-
P.if(nt, (e) => {
|
|
1053
|
-
P.get(Y) ? e(rt) : P.get(Ae) ? e(it, 1) : e(at, -1);
|
|
1054
|
-
});
|
|
1055
|
-
var ot = P.sibling(nt, 2), st = (e) => {
|
|
1056
|
-
Be(e, {
|
|
1057
|
-
open: !0,
|
|
1058
|
-
get reason() {
|
|
1059
|
-
return P.get(K);
|
|
1060
|
-
},
|
|
1061
|
-
onBackToEvents: $e,
|
|
1062
|
-
get labels() {
|
|
1063
|
-
return f();
|
|
1064
|
-
}
|
|
1065
|
-
});
|
|
1066
|
-
};
|
|
1067
|
-
P.if(ot, (e) => {
|
|
1068
|
-
P.get(q) && e(st);
|
|
1069
|
-
}), P.append(e, tt), P.pop();
|
|
1070
|
-
}
|
|
1071
|
-
export { Ue as default };
|