tf-checkout-react-native 2.0.0-beta.18 → 2.0.0-beta.21

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/dist/index.mjs CHANGED
@@ -2446,6 +2446,15 @@ import { useQueryClient as useQueryClient14 } from "@tanstack/react-query";
2446
2446
  import { useEffect as useEffect22, useRef as useRef27, useState as useState29 } from "react";
2447
2447
  import { useEffect as useEffect23, useRef as useRef28, useState as useState30 } from "react";
2448
2448
  import { useQueryClient as useQueryClient15 } from "@tanstack/react-query";
2449
+ import { useQueryClient as useQueryClient16 } from "@tanstack/react-query";
2450
+ import {
2451
+ useCallback as useCallback14,
2452
+ useEffect as useEffect24,
2453
+ useLayoutEffect as useLayoutEffect4,
2454
+ useMemo as useMemo16,
2455
+ useRef as useRef29,
2456
+ useSyncExternalStore as useSyncExternalStore20
2457
+ } from "react";
2449
2458
  var __defProp = Object.defineProperty;
2450
2459
  var __export = (target, all) => {
2451
2460
  for (var name in all)
@@ -5783,7 +5792,7 @@ var tripStatus = (status, locale) => {
5783
5792
  };
5784
5793
  var isEventTrip = (data) => "event" in data;
5785
5794
  var brandingLines = (identities = []) => identities.map(
5786
- (identity) => [...new Set([identity.brand_name, identity.platform_name].filter(Boolean))].join(
5795
+ (identity2) => [...new Set([identity2.brand_name, identity2.platform_name].filter(Boolean))].join(
5787
5796
  " \xB7 "
5788
5797
  )
5789
5798
  ).filter(Boolean);
@@ -6820,16 +6829,20 @@ var mapOption = (o) => {
6820
6829
  requiresSignIn: o.requiresSignIn === true || o.requires_sign_in === true
6821
6830
  };
6822
6831
  };
6832
+ var waitlistId = (value6) => typeof value6 === "string" && /^[1-9]\d*$/.test(value6) ? value6 : typeof value6 === "number" && Number.isSafeInteger(value6) && value6 > 0 ? String(value6) : null;
6823
6833
  var mapWaitlist = (w) => {
6824
- var _a2, _b, _c, _d;
6834
+ const ticketTypeId = waitlistId(w.ticketTypeId);
6835
+ if (!ticketTypeId || typeof w.name !== "string" || !w.name.trim()) return null;
6836
+ if (w.entry === null) return { ticketTypeId, name: w.name, entry: null };
6837
+ if (!w.entry || typeof w.entry !== "object" || Array.isArray(w.entry)) return null;
6838
+ const id2 = waitlistId(w.entry.id);
6839
+ const { status, offerExpiresAt } = w.entry;
6840
+ if (!id2 || !["waiting", "offered"].includes(status) || offerExpiresAt !== void 0 && offerExpiresAt !== null && typeof offerExpiresAt !== "string")
6841
+ return null;
6825
6842
  return {
6826
- ticketTypeId: String((_a2 = w.ticketTypeId) != null ? _a2 : ""),
6827
- name: String((_b = w.name) != null ? _b : ""),
6828
- entry: w.entry && typeof w.entry === "object" ? {
6829
- id: String((_c = w.entry.id) != null ? _c : ""),
6830
- status: String((_d = w.entry.status) != null ? _d : ""),
6831
- offerExpiresAt: text3(w.entry.offerExpiresAt)
6832
- } : null
6843
+ ticketTypeId,
6844
+ name: w.name,
6845
+ entry: { id: id2, status, offerExpiresAt: text3(offerExpiresAt) }
6833
6846
  };
6834
6847
  };
6835
6848
  var list = (value6) => Array.isArray(value6) ? value6.filter((v) => v && typeof v === "object") : [];
@@ -6849,7 +6862,7 @@ var ticketChangeOptionsFromResponse = (body3) => {
6849
6862
  closesAt: text3((_d = a.cutoff) == null ? void 0 : _d.closesAt)
6850
6863
  },
6851
6864
  options,
6852
- waitlistOptions: list(a.waitlistOptions).map(mapWaitlist),
6865
+ waitlistOptions: list(a.waitlistOptions).map(mapWaitlist).filter((option) => option !== null),
6853
6866
  sellInstead: {
6854
6867
  available: Boolean((_e = a.sellInstead) == null ? void 0 : _e.available) && Boolean((_f = a.sellInstead) == null ? void 0 : _f.url),
6855
6868
  url: text3((_g = a.sellInstead) == null ? void 0 : _g.url)
@@ -8521,6 +8534,49 @@ var waitingListEntryFrom = (definition, draft) => {
8521
8534
  quantity
8522
8535
  };
8523
8536
  };
8537
+ var identity = (ticket) => {
8538
+ var _a2;
8539
+ return (_a2 = ticket.selectionKey) != null ? _a2 : ticket.id;
8540
+ };
8541
+ var ticketPriceContext = (scope, ticket) => {
8542
+ var _a2, _b;
8543
+ return JSON.stringify([
8544
+ scope,
8545
+ ticket.currency,
8546
+ (_a2 = ticket.timeSlot) == null ? void 0 : _a2.date,
8547
+ (_b = ticket.timeSlot) == null ? void 0 : _b.time,
8548
+ identity(ticket)
8549
+ ]);
8550
+ };
8551
+ var calendarTicketRows = (base, dated) => {
8552
+ const ids = new Set(dated.map(identity));
8553
+ return [
8554
+ ...dated,
8555
+ ...base.filter(
8556
+ (ticket) => ticket.isRegularTicket === true && !ids.has(identity(ticket))
8557
+ )
8558
+ ];
8559
+ };
8560
+ var catalogDate = (selected, dates) => {
8561
+ var _a2;
8562
+ return dates.includes(selected) ? selected : (_a2 = dates[0]) != null ? _a2 : "";
8563
+ };
8564
+ var catalogQuantities = (previous, tickets, previousTickets = tickets, dateChanged = false) => {
8565
+ var _a2;
8566
+ const retained = /* @__PURE__ */ new Map();
8567
+ for (const ticket of previousTickets) {
8568
+ if (dateChanged && ticket.timeSlot) continue;
8569
+ if (previous[ticket.id] > 0) retained.set(identity(ticket), previous[ticket.id]);
8570
+ }
8571
+ const next = {};
8572
+ for (const ticket of tickets) {
8573
+ const quantity = (_a2 = retained.get(identity(ticket))) != null ? _a2 : 0;
8574
+ const range = ticketQuantityRange(ticket);
8575
+ if (quantity > 0 && !ticket.soldOut && ticket.salesStarted && !ticket.salesEnded && quantity >= range.min && quantity <= range.max && quantity % range.step === 0)
8576
+ next[ticket.id] = quantity;
8577
+ }
8578
+ return Object.keys(previous).length === Object.keys(next).length && Object.keys(next).every((id2) => previous[id2] === next[id2]) ? previous : next;
8579
+ };
8524
8580
  var initialSnapshot = () => ({
8525
8581
  status: "idle",
8526
8582
  selections: [],
@@ -9954,10 +10010,22 @@ var badgeOf = (raw) => {
9954
10010
  const text6 = typeof raw === "string" ? raw.trim() : "";
9955
10011
  return text6 || null;
9956
10012
  };
9957
- var mapTicket = (t) => {
10013
+ var eventCurrency = (raw) => {
10014
+ if (typeof raw === "string") return { currency: raw };
10015
+ if (!raw || typeof raw !== "object") return {};
10016
+ const value6 = raw;
10017
+ return {
10018
+ ...typeof value6.currency === "string" ? { currency: value6.currency } : {},
10019
+ ...typeof value6.symbol === "string" ? { priceSymbol: value6.symbol } : {}
10020
+ };
10021
+ };
10022
+ var selectionKey = (raw, eventId) => typeof raw === "string" && raw.trim() === raw && /^event:[1-9]\d*:ticket:[1-9]\d*$/.test(raw) && raw.startsWith(`event:${eventId}:ticket:`) ? raw : void 0;
10023
+ var mapTicket = (t, eventId) => {
9958
10024
  var _a2, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n;
9959
10025
  return {
9960
10026
  id: String(t.id),
10027
+ ...selectionKey(t.selectionKey, eventId) ? { selectionKey: selectionKey(t.selectionKey, eventId) } : {},
10028
+ isRegularTicket: typeof t.isRegularTicket === "boolean" ? t.isRegularTicket : void 0,
9961
10029
  name: (_a2 = t.displayName) != null ? _a2 : "",
9962
10030
  groupName: (_c = (_b = t.groupName) != null ? _b : t.group_name) != null ? _c : null,
9963
10031
  optionName: (_d = t.optionName) != null ? _d : "",
@@ -10016,7 +10084,7 @@ var getEventDetails = async (eventId, language = "en") => {
10016
10084
  endDate: hideDate ? null : text6(a.endDate),
10017
10085
  formattedDate: hideDate ? "Date TBC" : String((_q = a.formattedDate) != null ? _q : ""),
10018
10086
  timezone: text6(a.timezone),
10019
- currency: String((_r = a.currency) != null ? _r : ""),
10087
+ currency: (_r = eventCurrency(a.currency).currency) != null ? _r : "",
10020
10088
  salesStart: text6(a.salesStart),
10021
10089
  salesEnd: text6(a.salesEnd),
10022
10090
  salesStarted: Boolean(a.salesStarted),
@@ -10041,13 +10109,14 @@ var getEventTickets = async (eventId) => {
10041
10109
  tfCatalogContext: true
10042
10110
  });
10043
10111
  const ticketsObj = (_c = (_b = (_a2 = body3 == null ? void 0 : body3.data) == null ? void 0 : _a2.attributes) == null ? void 0 : _b.tickets) != null ? _c : {};
10044
- return Object.values(ticketsObj).map(mapTicket);
10112
+ return Object.values(ticketsObj).map((ticket) => mapTicket(ticket, eventId));
10045
10113
  };
10046
10114
  var getEventInfo = async (eventId, pk) => {
10047
10115
  var _a2, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q;
10048
10116
  await sdkSeatSessionHeaders(eventId);
10049
10117
  const body3 = await get(ENDPOINTS.events.info(eventId), {
10050
- params: pk ? { pk } : void 0
10118
+ params: pk ? { pk } : void 0,
10119
+ tfCatalogContext: true
10051
10120
  });
10052
10121
  const attributes6 = (_b = (_a2 = body3 == null ? void 0 : body3.data) == null ? void 0 : _a2.attributes) != null ? _b : {};
10053
10122
  const a = attributes6;
@@ -10056,6 +10125,7 @@ var getEventInfo = async (eventId, pk) => {
10056
10125
  const rawCountry = a.country;
10057
10126
  const countryCode = (_j = (_i = (_h = typeof rawCountry === "string" ? rawCountry : rawCountry == null ? void 0 : rawCountry.code) != null ? _h : a.countryCode) != null ? _i : a.country_code) != null ? _j : null;
10058
10127
  return {
10128
+ ...eventCurrency(a.currency),
10059
10129
  isSeatedEvent: isSeatedEvent(attributes6),
10060
10130
  tableMapEnabled: Boolean((_k = a.tableMapEnabled) != null ? _k : a.table_map_enabled),
10061
10131
  isTimeSlotEvent: Boolean(
@@ -10089,7 +10159,7 @@ var getEventConditions = async (eventId) => {
10089
10159
  }).filter((c) => c.content || c.name);
10090
10160
  };
10091
10161
  var getEventTimeSlotTickets = async (eventId, date, options) => {
10092
- var _a2, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s, _t, _u;
10162
+ var _a2, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z;
10093
10163
  await sdkSeatSessionHeaders(eventId);
10094
10164
  const body3 = await get(ENDPOINTS.events.timeSlotByDate(eventId), {
10095
10165
  tfCatalogContext: true,
@@ -10110,25 +10180,28 @@ var getEventTimeSlotTickets = async (eventId, date, options) => {
10110
10180
  const stock = Number((_h = (_g = s9.in_stock) != null ? _g : s9.real_stock) != null ? _h : 0);
10111
10181
  out.push({
10112
10182
  id: String(s9.matrix_record_id),
10183
+ ...selectionKey(s9.selectionKey, eventId) ? { selectionKey: selectionKey(s9.selectionKey, eventId) } : {},
10113
10184
  name: s9.display_name || s9.option_value || "Ticket",
10114
10185
  groupName: (_j = (_i = s9.group_name) != null ? _i : s9.groupName) != null ? _j : null,
10115
- optionName: String((_k = s9.option_key) != null ? _k : ""),
10116
- price: Number((_l = s9.base_price) != null ? _l : 0),
10117
- priceWithFees: Number((_n = (_m = s9.price_with_fees) != null ? _m : s9.base_price) != null ? _n : 0),
10118
- priceSymbol: (_p = (_o = s9.price_symbol) != null ? _o : s9.priceSymbol) != null ? _p : "",
10119
- currency: "",
10120
- feeIncluded: false,
10186
+ optionName: String((_l = (_k = s9.product_option_key) != null ? _k : s9.option_key) != null ? _l : ""),
10187
+ price: Number((_n = (_m = s9.display_price) != null ? _m : s9.base_price) != null ? _n : 0),
10188
+ priceWithFees: Number((_p = (_o = s9.price_with_fees) != null ? _o : s9.base_price) != null ? _p : 0),
10189
+ priceSymbol: (_r = (_q = s9.price_symbol) != null ? _q : s9.priceSymbol) != null ? _r : "",
10190
+ currency: (_s = s9.price_currency) != null ? _s : "",
10191
+ feeIncluded: s9.fee_included === true,
10121
10192
  depositPercent: s9.deposit_percent != null ? Number(s9.deposit_percent) : null,
10122
10193
  soldOut: Boolean(s9.sold_out) || stock <= 0,
10123
10194
  salesStarted: s9.sales_started != null ? Boolean(s9.sales_started) : true,
10124
10195
  salesEnded: Boolean(s9.sales_ended),
10125
- minQuantity: Number((_q = s9.min_quantity) != null ? _q : 1) || 1,
10126
- maxQuantity: Number((_r = s9.max_quantity) != null ? _r : 10) || 10,
10127
- multiplier: Number((_s = s9.multiplier) != null ? _s : 1) || 1,
10128
- isTable: Boolean(s9.is_table),
10129
- allowDirectPurchase: true,
10130
- descriptionRich: (_t = s9.description) != null ? _t : null,
10131
- badgeText: badgeOf((_u = s9.badge_text) != null ? _u : s9.badgeText),
10196
+ minQuantity: Number((_t = s9.min_quantity) != null ? _t : 1) || 1,
10197
+ maxQuantity: Number((_u = s9.max_quantity) != null ? _u : 10),
10198
+ multiplier: Number((_v = s9.multiplier) != null ? _v : 1) || 1,
10199
+ isTable: s9.x_is_table !== void 0 && s9.x_is_table !== null ? Number(s9.x_is_table) === 1 : Boolean(s9.is_table),
10200
+ minGuests: s9.min_guests === void 0 || s9.min_guests === null ? void 0 : Number(s9.min_guests),
10201
+ maxGuests: s9.max_guests === void 0 || s9.max_guests === null ? void 0 : Number(s9.max_guests),
10202
+ allowDirectPurchase: Number((_w = s9.allow_direct_purchase_for_seat_map) != null ? _w : 1) === 1,
10203
+ descriptionRich: (_y = (_x = s9.x_description_rich) != null ? _x : s9.description) != null ? _y : null,
10204
+ badgeText: badgeOf((_z = s9.badge_text) != null ? _z : s9.badgeText),
10132
10205
  timeSlot: { date: slotDate, time: timeKey }
10133
10206
  });
10134
10207
  }
@@ -10265,7 +10338,7 @@ var getEventTicketsWithMeta = async (eventId) => {
10265
10338
  const attrs = (_b = (_a2 = body3 == null ? void 0 : body3.data) == null ? void 0 : _a2.attributes) != null ? _b : {};
10266
10339
  const ticketsObj = (_c = attrs.tickets) != null ? _c : {};
10267
10340
  return {
10268
- tickets: Object.values(ticketsObj).map(mapTicket),
10341
+ tickets: Object.values(ticketsObj).map((ticket) => mapTicket(ticket, eventId)),
10269
10342
  promo: {
10270
10343
  isPromotionsEnabled: attrs.isPromotionsEnabled === true,
10271
10344
  isAccessCodeEnabled: attrs.is_access_code === true,
@@ -10286,7 +10359,11 @@ var getEventBundles = async (eventId) => {
10286
10359
  };
10287
10360
  var submitPromoCode = async (eventId, promo) => {
10288
10361
  await sdkSeatSessionHeaders(eventId);
10289
- await post(ENDPOINTS.events.promo(eventId), { promo: promo.trim() });
10362
+ await post(
10363
+ ENDPOINTS.events.promo(eventId),
10364
+ { promo: promo.trim() },
10365
+ { tfCatalogContext: true }
10366
+ );
10290
10367
  };
10291
10368
  var setEventCurrency = async (eventId, code, options) => {
10292
10369
  var _a2;
@@ -14845,6 +14922,7 @@ __export(hooks_exports, {
14845
14922
  useSubmitPrizeDetails: () => useSubmitPrizeDetails,
14846
14923
  useTicketCardForm: () => useTicketCardForm,
14847
14924
  useTicketCardOwner: () => useTicketCardOwner,
14925
+ useTicketCatalog: () => useTicketCatalog,
14848
14926
  useTicketChange: () => useTicketChange,
14849
14927
  useTicketChangeOptions: () => useTicketChangeOptions,
14850
14928
  useTicketGatewayWait: () => useTicketGatewayWait,
@@ -15795,7 +15873,7 @@ var useCatalogQuery = (options) => {
15795
15873
  } : queryFn
15796
15874
  });
15797
15875
  };
15798
- var useEvent = (eventId, options) => useSessionQuery({
15876
+ var useEvent = (eventId, options) => useCatalogQuery({
15799
15877
  queryKey: ttfKeys.event(eventId != null ? eventId : ""),
15800
15878
  queryFn: () => ttf.events.info(eventId),
15801
15879
  enabled: Boolean(eventId),
@@ -20044,15 +20122,15 @@ var useCheckoutImageField = ({
20044
20122
  value: value6,
20045
20123
  onChange,
20046
20124
  pick: pick3,
20047
- identity,
20125
+ identity: identity2,
20048
20126
  disabled = false
20049
20127
  }) => {
20050
20128
  const assertOwner = useSessionAction();
20051
20129
  const [busy, setBusy] = useState24(false);
20052
20130
  const [error, setError] = useState24(null);
20053
- const owner = useRef22({ identity, value: value6, disabled });
20054
- if (owner.current.identity !== identity || owner.current.value !== value6 || owner.current.disabled !== disabled)
20055
- owner.current = { identity, value: value6, disabled };
20131
+ const owner = useRef22({ identity: identity2, value: value6, disabled });
20132
+ if (owner.current.identity !== identity2 || owner.current.value !== value6 || owner.current.disabled !== disabled)
20133
+ owner.current = { identity: identity2, value: value6, disabled };
20056
20134
  const renderOwner = owner.current;
20057
20135
  const operation = useRef22(0);
20058
20136
  const inFlight = useRef22(false);
@@ -20070,7 +20148,7 @@ var useCheckoutImageField = ({
20070
20148
  inFlight.current = false;
20071
20149
  setBusy(false);
20072
20150
  setError(null);
20073
- }, [identity, value6, disabled]);
20151
+ }, [identity2, value6, disabled]);
20074
20152
  const select = async (picker = pick3) => {
20075
20153
  if (!mounted.current || owner.current !== renderOwner || !picker || disabled || inFlight.current)
20076
20154
  return;
@@ -21407,6 +21485,205 @@ var useAccountEmailEnrichment = (options = {}) => {
21407
21485
  }
21408
21486
  };
21409
21487
  };
21488
+ var EMPTY_DATES = [];
21489
+ var EMPTY_TICKETS = [];
21490
+ var useTicketCatalog = (eventId, explicitDates) => {
21491
+ var _a2, _b, _c, _d;
21492
+ const queryClient = useQueryClient16();
21493
+ const account = useSyncExternalStore20(subscribeSession, getSessionCacheScope, () => 0);
21494
+ const revision = useSyncExternalStore20(
21495
+ subscribeSession,
21496
+ getCatalogContextRevision,
21497
+ () => 0
21498
+ );
21499
+ const assertOwner = useMemo16(captureSessionAction, [account]);
21500
+ const actionSubject = JSON.stringify([eventId, account]);
21501
+ const action = useLiveScope(actionSubject);
21502
+ const subject = JSON.stringify([eventId, account, revision]);
21503
+ const { live, instance: instance2 } = useLiveScope(subject);
21504
+ const current5 = useCallback14(() => {
21505
+ try {
21506
+ assertOwner();
21507
+ return revision === getCatalogContextRevision() && instance2 !== null && live.current() === instance2;
21508
+ } catch (e) {
21509
+ return false;
21510
+ }
21511
+ }, [assertOwner, revision, instance2, live]);
21512
+ const capturePrimeContinuation = () => {
21513
+ const pin = getCartPinRevision();
21514
+ return () => {
21515
+ try {
21516
+ assertOwner();
21517
+ if (action.instance === null || action.live.current() !== action.instance)
21518
+ return false;
21519
+ if (current5()) return true;
21520
+ return getCartPinRevision() > pin && getCartGuestToken() !== null && getEffectiveGuestCarrier() === getCartGuestToken();
21521
+ } catch (e) {
21522
+ return false;
21523
+ }
21524
+ };
21525
+ };
21526
+ const [selection, updateSelection] = useScopedState(subject, { rows: EMPTY_TICKETS, date: "", quantities: {} });
21527
+ const [slotDate, updateDate] = useScopedState(subject, "");
21528
+ const [refreshing, setRefreshing] = useScopedState(subject, false);
21529
+ const eventQuery = useEvent(eventId);
21530
+ const ticketsQuery = useTicketsWithMeta(eventId);
21531
+ const eventInfo = eventQuery.data;
21532
+ const isTimeSlot = Boolean((explicitDates == null ? void 0 : explicitDates.length) || (eventInfo == null ? void 0 : eventInfo.isTimeSlotEvent));
21533
+ const dates = (_a2 = explicitDates != null ? explicitDates : eventInfo == null ? void 0 : eventInfo.availableDates) != null ? _a2 : EMPTY_DATES;
21534
+ const slotQuery = useTimeSlotTickets(eventId, isTimeSlot ? slotDate : void 0);
21535
+ const { tickets, datedTickets, regularTickets } = useMemo16(() => {
21536
+ var _a3, _b2, _c2;
21537
+ if (!eventInfo && explicitDates === void 0)
21538
+ return {
21539
+ tickets: EMPTY_TICKETS,
21540
+ datedTickets: EMPTY_TICKETS,
21541
+ regularTickets: EMPTY_TICKETS
21542
+ };
21543
+ const base = (_b2 = (_a3 = ticketsQuery.data) == null ? void 0 : _a3.tickets) != null ? _b2 : EMPTY_TICKETS;
21544
+ if (!isTimeSlot)
21545
+ return { tickets: base, datedTickets: EMPTY_TICKETS, regularTickets: EMPTY_TICKETS };
21546
+ const currencies = [...new Set(base.map((ticket) => ticket.currency).filter(Boolean))];
21547
+ const currency = (eventInfo == null ? void 0 : eventInfo.currency) || (currencies.length === 1 ? currencies[0] : "");
21548
+ const symbols = [
21549
+ ...new Set(
21550
+ base.filter((ticket) => ticket.currency === currency).map((ticket) => ticket.priceSymbol).filter(Boolean)
21551
+ )
21552
+ ];
21553
+ const symbol = (eventInfo == null ? void 0 : eventInfo.priceSymbol) || (symbols.length === 1 ? symbols[0] : "");
21554
+ const dated = (slotQuery.isPlaceholderData ? EMPTY_TICKETS : (_c2 = slotQuery.data) != null ? _c2 : EMPTY_TICKETS).map((ticket) => ({
21555
+ ...ticket,
21556
+ currency: ticket.currency || currency,
21557
+ priceSymbol: ticket.priceSymbol || symbol
21558
+ }));
21559
+ const rows2 = calendarTicketRows(base, dated);
21560
+ return {
21561
+ tickets: rows2,
21562
+ datedTickets: dated,
21563
+ regularTickets: rows2.slice(dated.length)
21564
+ };
21565
+ }, [
21566
+ eventInfo,
21567
+ explicitDates,
21568
+ isTimeSlot,
21569
+ (_b = ticketsQuery.data) == null ? void 0 : _b.tickets,
21570
+ slotQuery.data,
21571
+ slotQuery.isPlaceholderData
21572
+ ]);
21573
+ const liveCatalog = useRef29({ tickets, date: slotDate });
21574
+ useLayoutEffect4(() => {
21575
+ liveCatalog.current = { tickets, date: slotDate };
21576
+ }, [tickets, slotDate]);
21577
+ const qty = useMemo16(
21578
+ () => catalogQuantities(
21579
+ selection.quantities,
21580
+ tickets,
21581
+ selection.rows,
21582
+ selection.date !== slotDate
21583
+ ),
21584
+ [selection, tickets, slotDate]
21585
+ );
21586
+ useEffect24(() => {
21587
+ if (!current5()) return;
21588
+ const next = isTimeSlot ? catalogDate(slotDate, dates) : "";
21589
+ if (next !== slotDate) updateDate(next);
21590
+ updateSelection((previous) => {
21591
+ const quantities = catalogQuantities(
21592
+ previous.quantities,
21593
+ tickets,
21594
+ previous.rows,
21595
+ previous.date !== slotDate
21596
+ );
21597
+ return previous.rows === tickets && previous.date === slotDate && quantities === previous.quantities ? previous : { rows: tickets, date: slotDate, quantities };
21598
+ });
21599
+ }, [current5, isTimeSlot, slotDate, dates, tickets, updateDate, updateSelection]);
21600
+ const setQty = useCallback14(
21601
+ (update) => {
21602
+ if (current5())
21603
+ updateSelection((previous) => {
21604
+ const { tickets: rows2, date } = liveCatalog.current;
21605
+ const quantities = catalogQuantities(
21606
+ previous.quantities,
21607
+ rows2,
21608
+ previous.rows,
21609
+ previous.date !== date
21610
+ );
21611
+ const requested = typeof update === "function" ? update(quantities) : update;
21612
+ return { rows: rows2, date, quantities: catalogQuantities(requested, rows2) };
21613
+ });
21614
+ },
21615
+ [current5, updateSelection]
21616
+ );
21617
+ const setSlotDate = useCallback14(
21618
+ (date) => {
21619
+ if (current5() && dates.includes(date)) updateDate(date);
21620
+ },
21621
+ [current5, dates, updateDate]
21622
+ );
21623
+ const { refetch: refetchInfo } = eventQuery;
21624
+ const { refetch: refetchTickets } = ticketsQuery;
21625
+ const refetchCatalog = useCallback14(async () => {
21626
+ if (!current5()) return;
21627
+ setRefreshing(true);
21628
+ try {
21629
+ await Promise.all([
21630
+ refetchInfo({ throwOnError: true }),
21631
+ refetchTickets({ throwOnError: true })
21632
+ ]);
21633
+ if (!current5()) return;
21634
+ await queryClient.invalidateQueries(
21635
+ {
21636
+ predicate: (query) => {
21637
+ const key5 = query.queryKey;
21638
+ const prefix = [...ttfKeys.tickets(eventId), "slots"];
21639
+ return prefix.every((part, index) => key5[index] === part) && key5.some(
21640
+ (part) => !!part && typeof part === "object" && part.tfCatalogContext === revision
21641
+ ) && key5.some(
21642
+ (part) => !!part && typeof part === "object" && part.tfSessionScope === account
21643
+ );
21644
+ },
21645
+ refetchType: "active"
21646
+ },
21647
+ { throwOnError: true }
21648
+ );
21649
+ if (!current5()) return;
21650
+ } finally {
21651
+ if (current5()) setRefreshing(false);
21652
+ }
21653
+ }, [
21654
+ current5,
21655
+ refetchInfo,
21656
+ refetchTickets,
21657
+ setRefreshing,
21658
+ queryClient,
21659
+ eventId,
21660
+ revision,
21661
+ account
21662
+ ]);
21663
+ return {
21664
+ scope: subject,
21665
+ capturePrimeContinuation,
21666
+ attributionReady: !!eventInfo && !!ticketsQuery.data && !eventQuery.isFetching && !ticketsQuery.isFetching,
21667
+ ticketsQuery,
21668
+ eventInfo,
21669
+ slotQuery,
21670
+ tickets,
21671
+ datedTickets,
21672
+ regularTickets,
21673
+ dates,
21674
+ slotDate,
21675
+ isTimeSlot,
21676
+ setSlotDate,
21677
+ qty,
21678
+ setQty,
21679
+ current: current5,
21680
+ instance: instance2,
21681
+ refetchCatalog,
21682
+ busy: refreshing || eventQuery.isFetching || ticketsQuery.isFetching || isTimeSlot && !!slotDate && slotQuery.isFetching,
21683
+ isLoading: eventQuery.isLoading || ticketsQuery.isLoading || isTimeSlot && !!slotDate && slotQuery.isLoading,
21684
+ error: (_d = (_c = eventQuery.error) != null ? _c : ticketsQuery.error) != null ? _d : isTimeSlot ? slotQuery.error : null
21685
+ };
21686
+ };
21410
21687
  var accountEn = {
21411
21688
  "account.add_an_email_address": "Add an email address",
21412
21689
  "account.email_address": "Email address",
@@ -23795,26 +24072,26 @@ var translateAccountMessage = (translate2, english, vars) => {
23795
24072
  import { useState as useState35 } from "react";
23796
24073
 
23797
24074
  // src/CardInput.tsx
23798
- import { useEffect as useEffect26, useRef as useRef29, useState as useState34 } from "react";
24075
+ import { useEffect as useEffect27, useRef as useRef30, useState as useState34 } from "react";
23799
24076
  import { Platform, StyleSheet as StyleSheet4 } from "react-native";
23800
24077
  import { CardField } from "@stripe/stripe-react-native";
23801
24078
 
23802
24079
  // src/ui/CheckoutProvider.tsx
23803
24080
  import {
23804
24081
  createContext as createContext2,
23805
- useCallback as useCallback14,
24082
+ useCallback as useCallback15,
23806
24083
  useContext as useContext2,
23807
- useMemo as useMemo18,
24084
+ useMemo as useMemo19,
23808
24085
  useState as useState33
23809
24086
  } from "react";
23810
24087
  import { QueryClient, QueryClientProvider } from "@tanstack/react-query";
23811
24088
 
23812
24089
  // src/ui/InstallmentPicker.tsx
23813
- import { useEffect as useEffect24, useMemo as useMemo17, useState as useState31 } from "react";
24090
+ import { useEffect as useEffect25, useMemo as useMemo18, useState as useState31 } from "react";
23814
24091
  import { Modal, Pressable as Pressable2, StyleSheet as StyleSheet2, Text as Text2, View as View2 } from "react-native";
23815
24092
 
23816
24093
  // src/ui/primitives.tsx
23817
- import { useMemo as useMemo16 } from "react";
24094
+ import { useMemo as useMemo17 } from "react";
23818
24095
  import {
23819
24096
  ActivityIndicator,
23820
24097
  Pressable,
@@ -23933,7 +24210,7 @@ var Button = ({
23933
24210
  }
23934
24211
  );
23935
24212
  };
23936
- var useStyles = (theme) => useMemo16(
24213
+ var useStyles = (theme) => useMemo17(
23937
24214
  () => StyleSheet.create({
23938
24215
  card: {
23939
24216
  backgroundColor: theme.surface,
@@ -24002,7 +24279,7 @@ var useInstallmentPicker = () => {
24002
24279
  var _a2;
24003
24280
  const [pending3, setPending] = useState31(null);
24004
24281
  const [choices] = useState31(() => createInstallmentChoices(setPending));
24005
- useEffect24(() => () => choices.cancel(), [choices]);
24282
+ useEffect25(() => () => choices.cancel(), [choices]);
24006
24283
  const onInstallmentOffers = choices.ask;
24007
24284
  const choose = (offer) => pending3 == null ? void 0 : pending3.choose(offer);
24008
24285
  const picker = /* @__PURE__ */ jsx3(
@@ -24057,7 +24334,7 @@ var InstallmentModal = ({ offers, onChoose, onClose }) => {
24057
24334
  }
24058
24335
  );
24059
24336
  };
24060
- var useStyles2 = (theme) => useMemo17(
24337
+ var useStyles2 = (theme) => useMemo18(
24061
24338
  () => StyleSheet2.create({
24062
24339
  backdrop: {
24063
24340
  flex: 1,
@@ -24108,7 +24385,7 @@ var useStyles2 = (theme) => useMemo17(
24108
24385
  );
24109
24386
 
24110
24387
  // src/ui/ProviderPages.tsx
24111
- import { useEffect as useEffect25, useState as useState32 } from "react";
24388
+ import { useEffect as useEffect26, useState as useState32 } from "react";
24112
24389
  import {
24113
24390
  ActivityIndicator as ActivityIndicator2,
24114
24391
  Linking,
@@ -24191,8 +24468,8 @@ var externalInitialUri = (uri) => {
24191
24468
  var useProviderPages = () => {
24192
24469
  const [pending3, setPending] = useState32(null);
24193
24470
  const [pages] = useState32(() => createProviderPages(setPending));
24194
- useEffect25(() => () => pages.cancel(), [pages]);
24195
- useEffect25(() => {
24471
+ useEffect26(() => () => pages.cancel(), [pages]);
24472
+ useEffect26(() => {
24196
24473
  if (!pending3) return;
24197
24474
  const subscription = Linking.addEventListener("url", ({ url: url2 }) => {
24198
24475
  if (providerPageMatchesReturn(url2, pending3.request.returnUrlPrefix))
@@ -24217,7 +24494,7 @@ var ProviderPage = ({
24217
24494
  const [error, setError] = useState32("");
24218
24495
  const displayedError = sourceError || error;
24219
24496
  const [reload, setReload] = useState32(0);
24220
- useEffect25(() => {
24497
+ useEffect26(() => {
24221
24498
  if (!externalUri) return;
24222
24499
  let active2 = true;
24223
24500
  void Linking.openURL(externalUri).catch(() => {
@@ -24335,18 +24612,18 @@ var CheckoutThemeProvider = ({
24335
24612
  theme,
24336
24613
  children
24337
24614
  }) => {
24338
- const resolved = useMemo18(() => resolveTheme(theme), [theme]);
24615
+ const resolved = useMemo19(() => resolveTheme(theme), [theme]);
24339
24616
  return /* @__PURE__ */ jsx5(ThemeCtx.Provider, { value: resolved, children });
24340
24617
  };
24341
24618
  var CheckoutRoot = ({ checkout, theme, pickImage, children }) => {
24342
24619
  const inheritedPicker = useContext2(ImagePickerCtx);
24343
24620
  const [attempt2, setAttempt] = useState33(0);
24344
- const requestValidation = useCallback14(() => setAttempt((n) => n + 1), []);
24345
- const validation = useMemo18(
24621
+ const requestValidation = useCallback15(() => setAttempt((n) => n + 1), []);
24622
+ const validation = useMemo19(
24346
24623
  () => ({ attempt: attempt2, requestValidation }),
24347
24624
  [attempt2, requestValidation]
24348
24625
  );
24349
- const resolved = useMemo18(() => resolveTheme(theme), [theme]);
24626
+ const resolved = useMemo19(() => resolveTheme(theme), [theme]);
24350
24627
  return /* @__PURE__ */ jsx5(CheckoutCtx.Provider, { value: checkout, children: /* @__PURE__ */ jsx5(ThemeCtx.Provider, { value: resolved, children: /* @__PURE__ */ jsx5(ImagePickerCtx.Provider, { value: pickImage != null ? pickImage : inheritedPicker, children: /* @__PURE__ */ jsx5(ValidationCtx.Provider, { value: validation, children }) }) }) });
24351
24628
  };
24352
24629
  var SelfProvidedCheckout = ({
@@ -24415,10 +24692,10 @@ var CardInput = ({
24415
24692
  }) => {
24416
24693
  const theme = useTheme();
24417
24694
  const [attachment, setAttachment] = useState34(0);
24418
- const handleRef = useRef29(null);
24419
- const visibleRef = useRef29(visible);
24695
+ const handleRef = useRef30(null);
24696
+ const visibleRef = useRef30(visible);
24420
24697
  visibleRef.current = visible;
24421
- useEffect26(() => {
24698
+ useEffect27(() => {
24422
24699
  const handle = cardFields.mount(
24423
24700
  owner,
24424
24701
  () => setAttachment((n) => n + 1),
@@ -24430,7 +24707,7 @@ var CardInput = ({
24430
24707
  handleRef.current = null;
24431
24708
  };
24432
24709
  }, [owner]);
24433
- useEffect26(() => {
24710
+ useEffect27(() => {
24434
24711
  var _a2;
24435
24712
  (_a2 = handleRef.current) == null ? void 0 : _a2.setVisible(visible);
24436
24713
  }, [visible]);
@@ -25094,7 +25371,7 @@ var configureCheckout = (config) => configure({
25094
25371
  });
25095
25372
 
25096
25373
  // src/ui/Field.tsx
25097
- import { useMemo as useMemo19, useState as useState36 } from "react";
25374
+ import { useMemo as useMemo20, useState as useState36 } from "react";
25098
25375
  import {
25099
25376
  Pressable as Pressable3,
25100
25377
  StyleSheet as StyleSheet5,
@@ -25188,7 +25465,7 @@ var Checkbox = ({ checked, onChange, label, invalid: invalid3 = false }) => {
25188
25465
  }
25189
25466
  );
25190
25467
  };
25191
- var useFieldStyles = (theme) => useMemo19(
25468
+ var useFieldStyles = (theme) => useMemo20(
25192
25469
  () => StyleSheet5.create({
25193
25470
  field: { gap: 6 },
25194
25471
  label: {
@@ -25238,7 +25515,7 @@ var useFieldStyles = (theme) => useMemo19(
25238
25515
  );
25239
25516
 
25240
25517
  // src/ui/Select.tsx
25241
- import { useCallback as useCallback15, useEffect as useEffect27, useMemo as useMemo20, useRef as useRef30, useState as useState37 } from "react";
25518
+ import { useCallback as useCallback16, useEffect as useEffect28, useMemo as useMemo21, useRef as useRef31, useState as useState37 } from "react";
25242
25519
  import { FlatList, Modal as Modal3, Pressable as Pressable4, StyleSheet as StyleSheet6, Text as Text5, View as View5 } from "react-native";
25243
25520
  import { Fragment, jsx as jsx8, jsxs as jsxs6 } from "react/jsx-runtime";
25244
25521
  function Select({
@@ -25254,15 +25531,15 @@ function Select({
25254
25531
  const theme = useTheme();
25255
25532
  const s9 = useSelectStyles(theme);
25256
25533
  const [open, setOpen] = useState37(false);
25257
- const interaction = useRef30({ disabled, open: false, revision: 0 });
25534
+ const interaction = useRef31({ disabled, open: false, revision: 0 });
25258
25535
  interaction.current.disabled = disabled;
25259
25536
  const revision = interaction.current.revision;
25260
- const close = useCallback15(() => {
25537
+ const close = useCallback16(() => {
25261
25538
  interaction.current.open = false;
25262
25539
  interaction.current.revision += 1;
25263
25540
  setOpen(false);
25264
25541
  }, []);
25265
- useEffect27(() => {
25542
+ useEffect28(() => {
25266
25543
  if (disabled && interaction.current.open) close();
25267
25544
  }, [disabled, close]);
25268
25545
  const selected = options.find((o) => o.value === value6);
@@ -25327,7 +25604,7 @@ function Select({
25327
25604
  )
25328
25605
  ] });
25329
25606
  }
25330
- var useSelectStyles = (theme) => useMemo20(
25607
+ var useSelectStyles = (theme) => useMemo21(
25331
25608
  () => StyleSheet6.create({
25332
25609
  control: {
25333
25610
  flexDirection: "row",
@@ -25388,7 +25665,7 @@ var useSelectStyles = (theme) => useMemo20(
25388
25665
  );
25389
25666
 
25390
25667
  // src/ui/QuantitySelect.tsx
25391
- import { useMemo as useMemo21 } from "react";
25668
+ import { useMemo as useMemo22 } from "react";
25392
25669
  import { Pressable as Pressable5, StyleSheet as StyleSheet7, Text as Text6, View as View6 } from "react-native";
25393
25670
  import { jsx as jsx9, jsxs as jsxs7 } from "react/jsx-runtime";
25394
25671
  var QuantitySelect = ({
@@ -25459,7 +25736,7 @@ var QuantitySelect = ({
25459
25736
  }
25460
25737
  );
25461
25738
  };
25462
- var useQuantityStyles = (theme) => useMemo21(
25739
+ var useQuantityStyles = (theme) => useMemo22(
25463
25740
  () => StyleSheet7.create({
25464
25741
  stepper: { flexDirection: "row", alignItems: "center", gap: 14 },
25465
25742
  btn: {
@@ -25487,7 +25764,7 @@ var useQuantityStyles = (theme) => useMemo21(
25487
25764
  );
25488
25765
 
25489
25766
  // src/ui/Timer.tsx
25490
- import { useMemo as useMemo22 } from "react";
25767
+ import { useMemo as useMemo23 } from "react";
25491
25768
  import { StyleSheet as StyleSheet8, Text as Text7, View as View7 } from "react-native";
25492
25769
  import { jsx as jsx10, jsxs as jsxs8 } from "react/jsx-runtime";
25493
25770
  var clock = (s9) => {
@@ -25506,7 +25783,7 @@ var Timer = ({ seconds: seconds2, urgentAt = 60, label }) => {
25506
25783
  /* @__PURE__ */ jsx10(Text7, { style: [s9.clock, urgent && s9.clockUrgent], children: clock(seconds2) })
25507
25784
  ] });
25508
25785
  };
25509
- var useTimerStyles = (theme) => useMemo22(
25786
+ var useTimerStyles = (theme) => useMemo23(
25510
25787
  () => StyleSheet8.create({
25511
25788
  row: { flexDirection: "row", alignItems: "center", gap: 6 },
25512
25789
  label: {
@@ -25527,7 +25804,7 @@ var useTimerStyles = (theme) => useMemo22(
25527
25804
  );
25528
25805
 
25529
25806
  // src/ui/TimerBanner.tsx
25530
- import { useMemo as useMemo23, useState as useState38 } from "react";
25807
+ import { useMemo as useMemo24, useState as useState38 } from "react";
25531
25808
  import { Pressable as Pressable6, StyleSheet as StyleSheet9, Text as Text8, View as View8 } from "react-native";
25532
25809
  import { jsx as jsx11, jsxs as jsxs9 } from "react/jsx-runtime";
25533
25810
  var clock2 = (s9) => {
@@ -25565,7 +25842,7 @@ var TimerBanner = ({
25565
25842
  ] })
25566
25843
  );
25567
25844
  };
25568
- var useBannerStyles = (theme) => useMemo23(
25845
+ var useBannerStyles = (theme) => useMemo24(
25569
25846
  () => StyleSheet9.create({
25570
25847
  banner: {
25571
25848
  flexDirection: "row",
@@ -25605,7 +25882,7 @@ var useBannerStyles = (theme) => useMemo23(
25605
25882
  );
25606
25883
 
25607
25884
  // src/ui/PaymentMethods.tsx
25608
- import { useMemo as useMemo24 } from "react";
25885
+ import { useMemo as useMemo25 } from "react";
25609
25886
  import { Image, Pressable as Pressable7, StyleSheet as StyleSheet10, Text as Text9, View as View9 } from "react-native";
25610
25887
  import { jsx as jsx12, jsxs as jsxs10 } from "react/jsx-runtime";
25611
25888
  var EXTRA_LABEL = {
@@ -25684,7 +25961,7 @@ var PaymentMethods = ({
25684
25961
  ] }, option.value);
25685
25962
  }) });
25686
25963
  };
25687
- var useStyles3 = (theme) => useMemo24(
25964
+ var useStyles3 = (theme) => useMemo25(
25688
25965
  () => StyleSheet10.create({
25689
25966
  list: { gap: 8 },
25690
25967
  row: {
@@ -25728,7 +26005,7 @@ var useStyles3 = (theme) => useMemo24(
25728
26005
  );
25729
26006
 
25730
26007
  // src/ui/RichText.tsx
25731
- import { useMemo as useMemo25, useState as useState39 } from "react";
26008
+ import { useMemo as useMemo26, useState as useState39 } from "react";
25732
26009
  import { Alert, Linking as Linking3, StyleSheet as StyleSheet11, Text as Text10, View as View10 } from "react-native";
25733
26010
  import RenderHTML, {
25734
26011
  defaultSystemFonts,
@@ -25782,8 +26059,8 @@ var RichText = ({
25782
26059
  }) => {
25783
26060
  const theme = useTheme();
25784
26061
  const [width, setWidth] = useState39(0);
25785
- const source = useMemo25(() => ({ html }), [html]);
25786
- const baseStyle = useMemo25(
26062
+ const source = useMemo26(() => ({ html }), [html]);
26063
+ const baseStyle = useMemo26(
25787
26064
  () => ({
25788
26065
  color: theme.muted,
25789
26066
  fontSize: theme.fontSize - 1,
@@ -25793,13 +26070,13 @@ var RichText = ({
25793
26070
  }),
25794
26071
  [theme.muted, theme.fontSize, theme.fontFamily, textStyle]
25795
26072
  );
25796
- const systemFonts = useMemo25(
26073
+ const systemFonts = useMemo26(
25797
26074
  () => [
25798
26075
  .../* @__PURE__ */ new Set([...defaultSystemFonts, theme.fontFamily, textStyle == null ? void 0 : textStyle.fontFamily])
25799
26076
  ].filter((font) => typeof font === "string"),
25800
26077
  [theme.fontFamily, textStyle == null ? void 0 : textStyle.fontFamily]
25801
26078
  );
25802
- const tagsStyles = useMemo25(() => {
26079
+ const tagsStyles = useMemo26(() => {
25803
26080
  var _a2;
25804
26081
  const defaults = {
25805
26082
  p: { marginTop: 0, marginBottom: 8 },
@@ -25836,7 +26113,7 @@ var RichText = ({
25836
26113
  defaults[tag] = { ...defaults[tag], ...style };
25837
26114
  return defaults;
25838
26115
  }, [theme.accent, theme.fontSize, baseStyle.fontSize, tagOverrides]);
25839
- const renderersProps = useMemo25(
26116
+ const renderersProps = useMemo26(
25840
26117
  () => ({
25841
26118
  a: {
25842
26119
  onPress: (event, href) => {
@@ -25853,7 +26130,7 @@ var RichText = ({
25853
26130
  }),
25854
26131
  [onLinkPress]
25855
26132
  );
25856
- const defaultTextProps = useMemo25(() => ({ selectable }), [selectable]);
26133
+ const defaultTextProps = useMemo26(() => ({ selectable }), [selectable]);
25857
26134
  return /* @__PURE__ */ jsx13(
25858
26135
  View10,
25859
26136
  {
@@ -25884,9 +26161,9 @@ var styles3 = StyleSheet11.create({ container: { alignSelf: "stretch", minWidth:
25884
26161
  // src/sections/Tickets.tsx
25885
26162
  import {
25886
26163
  Fragment as Fragment2,
25887
- useEffect as useEffect28,
25888
- useMemo as useMemo26,
25889
- useRef as useRef31,
26164
+ useEffect as useEffect29,
26165
+ useMemo as useMemo27,
26166
+ useRef as useRef32,
25890
26167
  useState as useState40
25891
26168
  } from "react";
25892
26169
  import { Pressable as Pressable8, StyleSheet as StyleSheet13, Text as Text11, View as View12 } from "react-native";
@@ -26030,7 +26307,20 @@ var Tickets = ({
26030
26307
  const checkout = useCheckoutContext();
26031
26308
  const theme = useTheme();
26032
26309
  const s9 = useTicketStyles(theme);
26033
- const ticketsQuery = hooks_exports.useTicketsWithMeta(eventId);
26310
+ const catalog = hooks_exports.useTicketCatalog(eventId, timeSlotDates);
26311
+ const {
26312
+ ticketsQuery,
26313
+ eventInfo,
26314
+ slotQuery,
26315
+ isTimeSlot,
26316
+ dates,
26317
+ slotDate,
26318
+ setSlotDate,
26319
+ qty,
26320
+ setQty,
26321
+ refetchCatalog,
26322
+ current: catalogCurrent
26323
+ } = catalog;
26034
26324
  const waitingBuyer = hooks_exports.useAuthSession();
26035
26325
  const cachedProfile = hooks_exports.useProfile({ enabled: false }).data;
26036
26326
  const waitingPrefill = waitingListProfilePrefill(
@@ -26041,48 +26331,23 @@ var Tickets = ({
26041
26331
  const bundleWait = hooks_exports.useTicketGatewayWait(checkout.store);
26042
26332
  const bundleStarting = bundleWait !== null;
26043
26333
  const promoMeta = (_a2 = ticketsQuery.data) == null ? void 0 : _a2.promo;
26044
- const [qty, setQty] = useState40({});
26045
- const [slotDate, setSlotDate] = useState40("");
26046
- const eventInfo = hooks_exports.useEvent(eventId).data;
26047
- const isTimeSlot = Boolean((timeSlotDates == null ? void 0 : timeSlotDates.length) || (eventInfo == null ? void 0 : eventInfo.isTimeSlotEvent));
26048
- const dates = useMemo26(
26049
- () => {
26050
- var _a3;
26051
- return (_a3 = timeSlotDates != null ? timeSlotDates : eventInfo == null ? void 0 : eventInfo.availableDates) != null ? _a3 : [];
26052
- },
26053
- [timeSlotDates, eventInfo == null ? void 0 : eventInfo.availableDates]
26334
+ const tickets = catalog.tickets;
26335
+ const [error, updateError] = hooks_exports.useScopedState(catalog.scope, "");
26336
+ const setError = (message2) => {
26337
+ if (catalogCurrent()) updateError(message2);
26338
+ };
26339
+ const [code, setCode] = hooks_exports.useScopedState(catalog.scope, "");
26340
+ const [codeState, setCodeState] = hooks_exports.useScopedState(
26341
+ catalog.scope,
26342
+ "idle"
26054
26343
  );
26055
- useEffect28(() => {
26056
- if (isTimeSlot && !slotDate && dates.length) setSlotDate(dates[0]);
26057
- }, [isTimeSlot, slotDate, dates]);
26058
- const slotQuery = hooks_exports.useTimeSlotTickets(eventId, isTimeSlot ? slotDate : void 0);
26059
- const refetchCatalog = () => Promise.all([
26060
- ticketsQuery.refetch(),
26061
- ...isTimeSlot && slotDate ? [slotQuery.refetch()] : []
26062
- ]);
26063
- const tickets = useMemo26(
26064
- () => {
26065
- var _a3, _b2, _c2;
26066
- return isTimeSlot ? (_a3 = slotQuery.data) != null ? _a3 : [] : (_c2 = (_b2 = ticketsQuery.data) == null ? void 0 : _b2.tickets) != null ? _c2 : [];
26067
- },
26068
- [isTimeSlot, slotQuery.data, (_b = ticketsQuery.data) == null ? void 0 : _b.tickets]
26069
- );
26070
- const [error, setError] = useState40("");
26071
- const [code, setCode] = useState40("");
26072
- const [codeState, setCodeState] = useState40("idle");
26073
- const [promoOpen, setPromoOpen] = useState40(false);
26074
- hooks_exports.useOnEventChange(eventId, () => {
26075
- setQty({});
26076
- setSlotDate("");
26077
- setCode("");
26078
- setPromoOpen(false);
26079
- setError("");
26080
- });
26344
+ const [promoOpen, setPromoOpen] = hooks_exports.useScopedState(catalog.scope, false);
26081
26345
  const [visibleDescription, setVisibleDescription] = useState40(null);
26082
- const attributionEvent = useRef31(null);
26083
- useEffect28(() => {
26346
+ const attributionEvent = useRef32(null);
26347
+ useEffect29(() => {
26084
26348
  var _a3;
26085
- if (attributionEvent.current === eventId) return;
26349
+ if (!catalogCurrent() || !catalog.attributionReady || attributionEvent.current === eventId)
26350
+ return;
26086
26351
  attributionEvent.current = eventId;
26087
26352
  const promo = (_a3 = initialPromoCode == null ? void 0 : initialPromoCode.trim()) != null ? _a3 : "";
26088
26353
  const referral = referrer;
@@ -26094,26 +26359,41 @@ var Tickets = ({
26094
26359
  setPromoOpen(true);
26095
26360
  setCodeState("busy");
26096
26361
  checkout.applyPromoCode(eventId, promo).catch(() => void 0).finally(() => {
26097
- refetchCatalog().finally(() => setCodeState("idle"));
26362
+ if (!catalogCurrent()) return;
26363
+ return refetchCatalog().catch((e) => {
26364
+ if (catalogCurrent()) setError(errorMessage(e));
26365
+ }).finally(() => {
26366
+ if (catalogCurrent()) setCodeState("idle");
26367
+ });
26098
26368
  });
26099
26369
  }
26100
- }, [eventId, initialPromoCode, referrer, readAttributionFromUrl]);
26101
- useEffect28(() => {
26370
+ }, [
26371
+ eventId,
26372
+ initialPromoCode,
26373
+ referrer,
26374
+ readAttributionFromUrl,
26375
+ catalog.instance,
26376
+ catalog.attributionReady
26377
+ ]);
26378
+ useEffect29(() => {
26102
26379
  checkout.syncCurrency(eventId, void 0, { seed: true }).catch(() => void 0);
26103
26380
  }, [eventId]);
26104
26381
  const changeCurrency = (nextCode) => {
26105
26382
  checkout.syncCurrency(eventId, nextCode).then((res) => {
26106
- if (res.requiresCatalogRefresh) {
26383
+ if (catalogCurrent() && res.requiresCatalogRefresh) {
26107
26384
  setQty({});
26108
- refetchCatalog();
26385
+ refetchCatalog().catch((e) => {
26386
+ if (catalogCurrent()) setError(errorMessage(e));
26387
+ });
26109
26388
  }
26110
26389
  }).catch(() => void 0);
26111
26390
  };
26112
- const originals = useRef31({});
26113
- useEffect28(() => {
26391
+ const originals = useRef32({});
26392
+ useEffect29(() => {
26114
26393
  for (const t of tickets)
26115
- if (originals.current[t.id] == null) originals.current[t.id] = t.price;
26116
- }, [tickets]);
26394
+ if (originals.current[ticketPriceContext(catalog.scope, t)] == null)
26395
+ originals.current[ticketPriceContext(catalog.scope, t)] = t.price;
26396
+ }, [tickets, catalog.scope]);
26117
26397
  const selected = tickets.filter((t) => {
26118
26398
  var _a3;
26119
26399
  return ((_a3 = qty[t.id]) != null ? _a3 : 0) > 0;
@@ -26123,7 +26403,7 @@ var Tickets = ({
26123
26403
  const selectQty = (ticket, value6) => setQty(
26124
26404
  (previous) => changeTicketQuantity(previous, tickets, ticket, value6, allowMultiple)
26125
26405
  );
26126
- const isSeated = (_c = eventInfo == null ? void 0 : eventInfo.isSeatedEvent) != null ? _c : false;
26406
+ const isSeated = (_b = eventInfo == null ? void 0 : eventInfo.isSeatedEvent) != null ? _b : false;
26127
26407
  const seatMapRow = (t) => isSeated && !t.allowDirectPurchase;
26128
26408
  const hasSeatMapTickets = tickets.some(seatMapRow);
26129
26409
  const directPurchasable = tickets.filter((t) => !seatMapRow(t));
@@ -26131,7 +26411,9 @@ var Tickets = ({
26131
26411
  const firstTableIndex = tickets.findIndex((t) => t.isTable);
26132
26412
  const firstTableId = firstTableIndex > 0 && tickets.slice(0, firstTableIndex).some((t) => !t.isTable) ? tickets[firstTableIndex].id : void 0;
26133
26413
  const prime = () => {
26414
+ if (!catalogCurrent() || catalog.busy || codeState === "busy" || catalog.error) return;
26134
26415
  setError("");
26416
+ const continuationCurrent = catalog.capturePrimeContinuation();
26135
26417
  const selections = selected.map((t) => {
26136
26418
  var _a3;
26137
26419
  return {
@@ -26143,28 +26425,37 @@ var Tickets = ({
26143
26425
  currency: t.currency
26144
26426
  };
26145
26427
  });
26146
- checkout.setTickets(eventId, selections).then(() => onContinue == null ? void 0 : onContinue()).catch(
26428
+ checkout.setTickets(eventId, selections).then(() => {
26429
+ if (continuationCurrent()) onContinue == null ? void 0 : onContinue();
26430
+ }).catch(
26147
26431
  (e) => setError(
26148
26432
  e instanceof ConfirmerBusyError ? createTranslator()(e.message) : errorMessage(e)
26149
26433
  )
26150
26434
  );
26151
26435
  };
26152
26436
  const applyCode = () => {
26153
- if (!code.trim()) return;
26437
+ if (!catalogCurrent() || !catalog.attributionReady || catalog.busy || codeState === "busy" || !code.trim())
26438
+ return;
26439
+ setError("");
26154
26440
  setCodeState("busy");
26155
26441
  checkout.applyPromoCode(eventId, code.trim()).catch(() => void 0).finally(() => {
26156
- refetchCatalog().finally(() => setCodeState("idle"));
26442
+ if (!catalogCurrent()) return;
26443
+ return refetchCatalog().catch((e) => {
26444
+ if (catalogCurrent()) setError(errorMessage(e));
26445
+ }).finally(() => {
26446
+ if (catalogCurrent()) setCodeState("idle");
26447
+ });
26157
26448
  });
26158
26449
  };
26159
26450
  const isAccess = promoMeta == null ? void 0 : promoMeta.isAccessCodeEnabled;
26160
26451
  const showCodeInput = (promoMeta == null ? void 0 : promoMeta.isPromotionsEnabled) || isAccess;
26161
- const listQuery = isTimeSlot ? slotQuery : ticketsQuery;
26452
+ const listQuery = catalog;
26162
26453
  const currency = checkout.currency;
26163
26454
  const renderRow = (t) => {
26164
26455
  var _a3, _b2;
26165
26456
  const notStarted = !t.salesStarted;
26166
26457
  const unavailable = t.soldOut || t.salesEnded || notStarted;
26167
- const original = originals.current[t.id];
26458
+ const original = originals.current[ticketPriceContext(catalog.scope, t)];
26168
26459
  const discounted = original != null && original > t.price;
26169
26460
  const isFree = Number(t.price) === 0;
26170
26461
  const sym = t.priceSymbol || t.currency;
@@ -26237,8 +26528,8 @@ var Tickets = ({
26237
26528
  };
26238
26529
  const timeGroups = [];
26239
26530
  if (isTimeSlot)
26240
- for (const t of tickets) {
26241
- const time = (_e = (_d = t.timeSlot) == null ? void 0 : _d.time) != null ? _e : "";
26531
+ for (const t of catalog.datedTickets) {
26532
+ const time = (_d = (_c = t.timeSlot) == null ? void 0 : _c.time) != null ? _d : "";
26242
26533
  const g = timeGroups.find((x) => x.time === time);
26243
26534
  if (g) g.items.push(t);
26244
26535
  else timeGroups.push({ time, items: [t] });
@@ -26257,7 +26548,6 @@ var Tickets = ({
26257
26548
  value: slotDate,
26258
26549
  onChange: (d) => {
26259
26550
  setSlotDate(d);
26260
- setQty({});
26261
26551
  },
26262
26552
  options: dates.map((d) => ({ label: d, value: d }))
26263
26553
  }
@@ -26277,11 +26567,15 @@ var Tickets = ({
26277
26567
  }
26278
26568
  )
26279
26569
  ] }) : null,
26280
- isTimeSlot && !slotQuery.isLoading && tickets.length === 0 && slotDate ? /* @__PURE__ */ jsx15(MutedText, { children: "No sessions available on this date." }) : null,
26570
+ isTimeSlot && !slotQuery.isLoading && !((_e = slotQuery.data) == null ? void 0 : _e.length) && slotDate ? /* @__PURE__ */ jsx15(MutedText, { children: "No sessions available on this date." }) : null,
26281
26571
  isTimeSlot ? timeGroups.map((g) => /* @__PURE__ */ jsxs12(Fragment2, { children: [
26282
26572
  g.time ? /* @__PURE__ */ jsx15(Text11, { style: s9.slotTime, children: g.time }) : null,
26283
26573
  g.items.map(renderRow)
26284
26574
  ] }, g.time)) : tickets.map(renderRow),
26575
+ isTimeSlot && catalog.regularTickets.length > 0 ? /* @__PURE__ */ jsxs12(Fragment3, { children: [
26576
+ /* @__PURE__ */ jsx15(Text11, { style: s9.slotTime, children: createTranslator()("tickets.getTickets") }),
26577
+ catalog.regularTickets.map(renderRow)
26578
+ ] }) : null,
26285
26579
  showCodeInput ? /* @__PURE__ */ jsx15(View12, { style: s9.promo, children: !isAccess && !promoOpen ? /* @__PURE__ */ jsx15(
26286
26580
  Pressable8,
26287
26581
  {
@@ -26306,7 +26600,7 @@ var Tickets = ({
26306
26600
  variant: "ghost",
26307
26601
  onPress: applyCode,
26308
26602
  loading: codeState === "busy",
26309
- disabled: codeState === "busy" || !code.trim(),
26603
+ disabled: !catalog.attributionReady || catalog.busy || codeState === "busy" || !code.trim(),
26310
26604
  children: isAccess ? "ENTER" : "APPLY"
26311
26605
  }
26312
26606
  ),
@@ -26316,14 +26610,14 @@ var Tickets = ({
26316
26610
  directPurchasable.length > 0 ? renderContinue ? renderContinue({
26317
26611
  onPress: prime,
26318
26612
  loading: checkout.isBusy,
26319
- disabled: checkout.orderFixed || checkout.isBusy || bundleStarting || selected.length === 0,
26613
+ disabled: checkout.orderFixed || checkout.isBusy || bundleStarting || catalog.busy || codeState === "busy" || !!catalog.error || selected.length === 0,
26320
26614
  title: continueTitle
26321
26615
  }) : /* @__PURE__ */ jsx15(
26322
26616
  Button,
26323
26617
  {
26324
26618
  onPress: prime,
26325
26619
  loading: checkout.isBusy,
26326
- disabled: checkout.isBusy || bundleStarting || selected.length === 0,
26620
+ disabled: checkout.isBusy || bundleStarting || catalog.busy || codeState === "busy" || !!catalog.error || selected.length === 0,
26327
26621
  children: checkout.isBusy ? "Reserving\u2026" : selectionIsTable ? "Reserve tables" : buttonLabel
26328
26622
  }
26329
26623
  ) : null,
@@ -26348,7 +26642,7 @@ var Tickets = ({
26348
26642
  error || checkout.error ? /* @__PURE__ */ jsx15(ErrorText, { children: error || checkout.error }) : null
26349
26643
  ] }) });
26350
26644
  };
26351
- var useTicketStyles = (theme) => useMemo26(
26645
+ var useTicketStyles = (theme) => useMemo27(
26352
26646
  () => StyleSheet13.create({
26353
26647
  loading: { paddingVertical: 24, alignItems: "center" },
26354
26648
  selectBlock: { gap: 6 },
@@ -26481,7 +26775,7 @@ var useTicketStyles = (theme) => useMemo26(
26481
26775
  );
26482
26776
 
26483
26777
  // src/sections/SeatsIoMap.tsx
26484
- import { useMemo as useMemo27 } from "react";
26778
+ import { useMemo as useMemo28 } from "react";
26485
26779
  import { View as View13 } from "react-native";
26486
26780
  import { WebView as WebView2 } from "react-native-webview";
26487
26781
  import { Fragment as Fragment4, jsx as jsx16, jsxs as jsxs13 } from "react/jsx-runtime";
@@ -26490,7 +26784,7 @@ var SeatsIoMap = ({ eventId, initial, onContinue }) => {
26490
26784
  const checkout = useCheckoutContext();
26491
26785
  const flow = hooks_exports.useSeatsIoSelection(eventId, checkout, initial, onContinue);
26492
26786
  const bundleStarting = hooks_exports.useBundleStarting(checkout.store);
26493
- const html = useMemo27(
26787
+ const html = useMemo28(
26494
26788
  () => flow.data.chart ? seatsIoChartDocument(flow.data.chart, flow.nonce) : "",
26495
26789
  [flow.data.chart, flow.nonce]
26496
26790
  );
@@ -26576,7 +26870,7 @@ var SeatsIoMap = ({ eventId, initial, onContinue }) => {
26576
26870
  };
26577
26871
 
26578
26872
  // src/sections/SeatMap.tsx
26579
- import { useEffect as useEffect29, useMemo as useMemo28, useRef as useRef32, useState as useState41 } from "react";
26873
+ import { useEffect as useEffect30, useMemo as useMemo29, useRef as useRef33, useState as useState41 } from "react";
26580
26874
  import { StyleSheet as StyleSheet14, Text as Text12, View as View14 } from "react-native";
26581
26875
  import { WebView as WebView3 } from "react-native-webview";
26582
26876
 
@@ -26592,7 +26886,7 @@ var SeatMap = ({ eventId, onContinue }) => {
26592
26886
  const theme = useTheme();
26593
26887
  const flow = hooks_exports.useSeatSelection(eventId, checkout, onContinue);
26594
26888
  const bundleStarting = hooks_exports.useBundleStarting(checkout.store);
26595
- const webview = useRef32(null);
26889
+ const webview = useRef33(null);
26596
26890
  const [rendererError, setRendererError] = useState41(false);
26597
26891
  const [size, setSize] = useState41(320);
26598
26892
  const properties = flow.chart.state === "ready" ? {
@@ -26610,7 +26904,7 @@ var SeatMap = ({ eventId, onContinue }) => {
26610
26904
  predefinedSeats: flow.chart.data.predefinedSeats
26611
26905
  } : null;
26612
26906
  const chart = flow.chart.state === "ready" ? flow.chart.data : null;
26613
- const html = useMemo28(
26907
+ const html = useMemo29(
26614
26908
  () => chart ? `<!doctype html><html><head><meta name="viewport" content="width=device-width,initial-scale=1,maximum-scale=1"><style>html,body,#seat-map{margin:0;width:100%;height:100%;overflow:hidden}body{background:#fff}${SEAT_MAP_CSS}</style></head><body><div id="seat-map"></div><script>${SEAT_MAP_SCRIPT.replace(/<\/script/gi, "<\\/script")}</script></body></html>` : "",
26615
26909
  [chart]
26616
26910
  );
@@ -26621,7 +26915,7 @@ var SeatMap = ({ eventId, onContinue }) => {
26621
26915
  `window.__tfSeatMapUpdate&&window.__tfSeatMapUpdate(${safeJson2(properties)});true;`
26622
26916
  );
26623
26917
  };
26624
- useEffect29(update, [properties && safeJson2(properties)]);
26918
+ useEffect30(update, [properties && safeJson2(properties)]);
26625
26919
  if (flow.chart.state === "provider") return /* @__PURE__ */ jsx17(SeatsIoMap, { eventId, initial: flow.chart.data, onContinue });
26626
26920
  return /* @__PURE__ */ jsx17(FrozenFields, { frozen: checkout.orderFixed, children: /* @__PURE__ */ jsxs14(Card, { children: [
26627
26921
  /* @__PURE__ */ jsx17(SectionHeader, { title: "Select your seats" }),
@@ -26757,7 +27051,7 @@ var styles5 = StyleSheet14.create({
26757
27051
  });
26758
27052
 
26759
27053
  // src/sections/AddOns.tsx
26760
- import { Fragment as Fragment6, useMemo as useMemo29 } from "react";
27054
+ import { Fragment as Fragment6, useMemo as useMemo30 } from "react";
26761
27055
  import { Pressable as Pressable9, StyleSheet as StyleSheet15, Text as Text13, View as View16 } from "react-native";
26762
27056
 
26763
27057
  // src/ui/CustomFields.tsx
@@ -27028,7 +27322,7 @@ var AddOns = ({
27028
27322
  error || checkout.error ? /* @__PURE__ */ jsx19(ErrorText, { children: error || checkout.error }) : null
27029
27323
  ] }) });
27030
27324
  };
27031
- var useAddonStyles = (theme) => useMemo29(
27325
+ var useAddonStyles = (theme) => useMemo30(
27032
27326
  () => StyleSheet15.create({
27033
27327
  head: { flexDirection: "row", alignItems: "center", flexWrap: "wrap", gap: 8 },
27034
27328
  eyebrow: {
@@ -27122,7 +27416,7 @@ var useAddonStyles = (theme) => useMemo29(
27122
27416
  );
27123
27417
 
27124
27418
  // src/sections/Bundles.tsx
27125
- import { useMemo as useMemo30 } from "react";
27419
+ import { useMemo as useMemo31 } from "react";
27126
27420
  import { StyleSheet as StyleSheet16, Text as Text14, View as View17 } from "react-native";
27127
27421
  import { Fragment as Fragment7, jsx as jsx20, jsxs as jsxs17 } from "react/jsx-runtime";
27128
27422
  var money3 = (currency, amount2) => `${currency} ${amount2.toFixed(2)}`;
@@ -27372,7 +27666,7 @@ var Bundles = ({
27372
27666
  /* @__PURE__ */ jsx20(Button, { onPress: flow.continueToDetails, disabled: !anySelected, children: t("bundles.continue") })
27373
27667
  ] });
27374
27668
  };
27375
- var useBundleStyles = (theme) => useMemo30(
27669
+ var useBundleStyles = (theme) => useMemo31(
27376
27670
  () => StyleSheet16.create({
27377
27671
  loader: { paddingVertical: 20, alignItems: "center" },
27378
27672
  heading: {
@@ -27427,9 +27721,9 @@ var useBundleStyles = (theme) => useMemo30(
27427
27721
  // src/sections/BillingInfo.tsx
27428
27722
  import {
27429
27723
  Fragment as Fragment10,
27430
- useEffect as useEffect30,
27431
- useMemo as useMemo31,
27432
- useRef as useRef33,
27724
+ useEffect as useEffect31,
27725
+ useMemo as useMemo32,
27726
+ useRef as useRef34,
27433
27727
  useState as useState44
27434
27728
  } from "react";
27435
27729
  import { Linking as Linking5, Pressable as Pressable10, StyleSheet as StyleSheet19, Text as Text16, View as View22 } from "react-native";
@@ -27607,35 +27901,35 @@ var PhoneIdentity = ({
27607
27901
  ...options
27608
27902
  }) => {
27609
27903
  var _a2;
27610
- const identity = hooks_exports.useCheckoutPhoneIdentity(options);
27904
+ const identity2 = hooks_exports.useCheckoutPhoneIdentity(options);
27611
27905
  const [code, setCode] = useState43("");
27612
27906
  const [emailInstead, setEmailInstead] = useState43(false);
27613
27907
  if (emailInstead) return null;
27614
- if (identity.challenge)
27908
+ if (identity2.challenge)
27615
27909
  return /* @__PURE__ */ jsx23(
27616
27910
  TwoFactorForm,
27617
27911
  {
27618
- loading: identity.busy,
27619
- error: identity.error,
27912
+ loading: identity2.busy,
27913
+ error: identity2.error,
27620
27914
  successMessage: "",
27621
- smsAvailable: identity.challenge.smsAvailable,
27622
- smsRetryAfter: identity.retryAfter,
27623
- onSubmit: identity.verifyTwoFactor,
27624
- onSendSms: identity.sendTwoFactorSms,
27625
- onCancel: identity.cancel
27915
+ smsAvailable: identity2.challenge.smsAvailable,
27916
+ smsRetryAfter: identity2.retryAfter,
27917
+ onSubmit: identity2.verifyTwoFactor,
27918
+ onSendSms: identity2.sendTwoFactorSms,
27919
+ onCancel: identity2.cancel
27626
27920
  }
27627
27921
  );
27628
27922
  return /* @__PURE__ */ jsxs20(View20, { style: { gap: 12, paddingVertical: 12 }, children: [
27629
27923
  /* @__PURE__ */ jsx23(Text15, { children: "Verify your phone to complete your details faster" }),
27630
- identity.error ? /* @__PURE__ */ jsx23(ErrorText, { children: identity.error }) : null,
27631
- identity.verified ? /* @__PURE__ */ jsxs20(Fragment9, { children: [
27924
+ identity2.error ? /* @__PURE__ */ jsx23(ErrorText, { children: identity2.error }) : null,
27925
+ identity2.verified ? /* @__PURE__ */ jsxs20(Fragment9, { children: [
27632
27926
  /* @__PURE__ */ jsx23(MutedText, { children: "Your phone is verified." }),
27633
- ((_a2 = identity.result) == null ? void 0 : _a2.prefill.has_known_email) === true && typeof identity.result.prefill.email_masked === "string" ? /* @__PURE__ */ jsx23(
27927
+ ((_a2 = identity2.result) == null ? void 0 : _a2.prefill.has_known_email) === true && typeof identity2.result.prefill.email_masked === "string" ? /* @__PURE__ */ jsx23(
27634
27928
  Checkbox,
27635
27929
  {
27636
27930
  checked: Boolean(knownEmailSelected),
27637
27931
  onChange: onUseKnownEmail,
27638
- label: `Send my tickets to ${identity.result.prefill.email_masked}`
27932
+ label: `Send my tickets to ${identity2.result.prefill.email_masked}`
27639
27933
  }
27640
27934
  ) : null
27641
27935
  ] }) : /* @__PURE__ */ jsxs20(Fragment9, { children: [
@@ -27643,14 +27937,14 @@ var PhoneIdentity = ({
27643
27937
  Input,
27644
27938
  {
27645
27939
  accessibilityLabel: "Mobile number",
27646
- value: identity.phone,
27647
- onChangeText: identity.setPhone,
27940
+ value: identity2.phone,
27941
+ onChangeText: identity2.setPhone,
27648
27942
  keyboardType: "phone-pad",
27649
27943
  autoComplete: "tel",
27650
- editable: !identity.busy && !identity.sent
27944
+ editable: !identity2.busy && !identity2.sent
27651
27945
  }
27652
27946
  ) }),
27653
- identity.sent ? /* @__PURE__ */ jsxs20(Fragment9, { children: [
27947
+ identity2.sent ? /* @__PURE__ */ jsxs20(Fragment9, { children: [
27654
27948
  /* @__PURE__ */ jsx23(Field, { label: "Verification code", children: /* @__PURE__ */ jsx23(
27655
27949
  Input,
27656
27950
  {
@@ -27661,15 +27955,15 @@ var PhoneIdentity = ({
27661
27955
  autoComplete: "one-time-code",
27662
27956
  maxLength: 6,
27663
27957
  accessibilityLabel: "Verification code",
27664
- editable: !identity.busy
27958
+ editable: !identity2.busy
27665
27959
  }
27666
27960
  ) }),
27667
27961
  /* @__PURE__ */ jsx23(
27668
27962
  Button,
27669
27963
  {
27670
- loading: identity.busy,
27964
+ loading: identity2.busy,
27671
27965
  disabled: !/^\d{6}$/.test(code),
27672
- onPress: () => void identity.verify(code),
27966
+ onPress: () => void identity2.verify(code),
27673
27967
  children: "Verify phone"
27674
27968
  }
27675
27969
  )
@@ -27677,30 +27971,30 @@ var PhoneIdentity = ({
27677
27971
  /* @__PURE__ */ jsx23(
27678
27972
  Button,
27679
27973
  {
27680
- disabled: identity.busy || identity.retryAfter > 0 || !identity.phone.trim(),
27681
- onPress: () => void identity.request("sms"),
27682
- children: identity.retryAfter > 0 ? `Send another code in ${identity.retryAfter}s` : "Send code by SMS"
27974
+ disabled: identity2.busy || identity2.retryAfter > 0 || !identity2.phone.trim(),
27975
+ onPress: () => void identity2.request("sms"),
27976
+ children: identity2.retryAfter > 0 ? `Send another code in ${identity2.retryAfter}s` : "Send code by SMS"
27683
27977
  }
27684
27978
  ),
27685
27979
  options.whatsappAvailable ? /* @__PURE__ */ jsx23(
27686
27980
  Button,
27687
27981
  {
27688
27982
  variant: "ghost",
27689
- disabled: identity.busy || identity.retryAfter > 0 || !identity.phone.trim(),
27690
- onPress: () => void identity.request("whatsapp"),
27983
+ disabled: identity2.busy || identity2.retryAfter > 0 || !identity2.phone.trim(),
27984
+ onPress: () => void identity2.request("whatsapp"),
27691
27985
  children: "Send code by WhatsApp"
27692
27986
  }
27693
27987
  ) : null
27694
27988
  ] }),
27695
- (identity.sent || identity.verified) && /* @__PURE__ */ jsx23(
27989
+ (identity2.sent || identity2.verified) && /* @__PURE__ */ jsx23(
27696
27990
  Button,
27697
27991
  {
27698
27992
  variant: "ghost",
27699
- disabled: identity.busy,
27993
+ disabled: identity2.busy,
27700
27994
  onPress: () => {
27701
27995
  setCode("");
27702
27996
  onReset();
27703
- void identity.cancel();
27997
+ void identity2.cancel();
27704
27998
  },
27705
27999
  children: "Change phone number"
27706
28000
  }
@@ -27709,9 +28003,9 @@ var PhoneIdentity = ({
27709
28003
  Button,
27710
28004
  {
27711
28005
  variant: "ghost",
27712
- disabled: identity.busy,
28006
+ disabled: identity2.busy,
27713
28007
  onPress: () => {
27714
- void identity.cancel().then(() => setEmailInstead(true));
28008
+ void identity2.cancel().then(() => setEmailInstead(true));
27715
28009
  },
27716
28010
  children: "Use email instead"
27717
28011
  }
@@ -27945,35 +28239,35 @@ var BillingInfo = ({
27945
28239
  (prev) => holderDraftsReloaded(prev, checkout.holders, checkout.backfilledHolderIndexes)
27946
28240
  );
27947
28241
  });
27948
- const restoredHolders = useRef33(checkout.holders);
28242
+ const restoredHolders = useRef34(checkout.holders);
27949
28243
  hooks_exports.useOnEventChange(checkout.eventId, () => {
27950
28244
  restoredHolders.current = [];
27951
28245
  setHolders([]);
27952
28246
  setDataCapture({});
27953
28247
  });
27954
- const profileSeeded = useRef33(false);
27955
- const countryDefaultApplied = useRef33(Boolean((_c = checkout.billing) == null ? void 0 : _c.countryId));
28248
+ const profileSeeded = useRef34(false);
28249
+ const countryDefaultApplied = useRef34(Boolean((_c = checkout.billing) == null ? void 0 : _c.countryId));
27956
28250
  const {
27957
28251
  setBilling: commitBilling,
27958
28252
  setHolders: commitHolders,
27959
28253
  setConsent: commitConsent
27960
28254
  } = checkout;
27961
28255
  const gates = checkout.fieldGates;
27962
- const orderGroups = useMemo31(
28256
+ const orderGroups = useMemo32(
27963
28257
  () => checkout.customFields.filter((g) => g.scope === "order"),
27964
28258
  [checkout.customFields]
27965
28259
  );
27966
- const ticketGroups = useMemo31(
28260
+ const ticketGroups = useMemo32(
27967
28261
  () => checkout.customFields.filter((g) => g.scope === "ticket"),
27968
28262
  [checkout.customFields]
27969
28263
  );
27970
- const ticketFields = useMemo31(
28264
+ const ticketFields = useMemo32(
27971
28265
  () => ticketGroups.flatMap((g) => g.fields),
27972
28266
  [ticketGroups]
27973
28267
  );
27974
28268
  const holderNamesRequired = checkout.holderNamesRequired || collectTicketHolders;
27975
28269
  const showHolders = holderNamesRequired || ticketFields.length > 0;
27976
- const slots = useMemo31(() => {
28270
+ const slots = useMemo32(() => {
27977
28271
  var _a3, _b2;
27978
28272
  const out = [];
27979
28273
  const lines = (_b2 = (_a3 = checkout.breakdown) == null ? void 0 : _a3.tickets) != null ? _b2 : [];
@@ -27986,7 +28280,7 @@ var BillingInfo = ({
27986
28280
  }
27987
28281
  return out;
27988
28282
  }, [checkout.breakdown, checkout.selections]);
27989
- useEffect30(() => {
28283
+ useEffect31(() => {
27990
28284
  const p = profile.data;
27991
28285
  if (!p || profileSeeded.current) return;
27992
28286
  profileSeeded.current = true;
@@ -28009,10 +28303,10 @@ var BillingInfo = ({
28009
28303
  return keys.every((k) => next[k] === prev[k]) ? prev : next;
28010
28304
  });
28011
28305
  }, [profile.data, checkout.isLoggedIn]);
28012
- useEffect30(() => {
28306
+ useEffect31(() => {
28013
28307
  setHolders((prev) => holderDraftsForSlots(prev, slots, restoredHolders.current));
28014
28308
  }, [slots]);
28015
- useEffect30(() => {
28309
+ useEffect31(() => {
28016
28310
  if (!showHolders) return;
28017
28311
  setHolders(
28018
28312
  (prev) => holderDraftsMirroringBuyer(prev, {
@@ -28023,7 +28317,7 @@ var BillingInfo = ({
28023
28317
  })
28024
28318
  );
28025
28319
  }, [showHolders, billing.firstName, billing.lastName, billing.email, billing.phone]);
28026
- useEffect30(() => {
28320
+ useEffect31(() => {
28027
28321
  const email = billing.email.trim();
28028
28322
  if (checkout.isLoggedIn || !isEmail(email)) return;
28029
28323
  const t = setTimeout(
@@ -28037,18 +28331,18 @@ var BillingInfo = ({
28037
28331
  const countriesQuery = hooks_exports.useCountries({
28038
28332
  enabled: needsNationality || gates.showAddress
28039
28333
  });
28040
- const countries = useMemo31(() => {
28334
+ const countries = useMemo32(() => {
28041
28335
  var _a3;
28042
28336
  return (_a3 = countriesQuery.data) != null ? _a3 : [];
28043
28337
  }, [countriesQuery.data]);
28044
28338
  const statesQuery = hooks_exports.useStates(billing.countryId, {
28045
28339
  enabled: Boolean(billing.countryId)
28046
28340
  });
28047
- const states = useMemo31(() => {
28341
+ const states = useMemo32(() => {
28048
28342
  var _a3;
28049
28343
  return (_a3 = statesQuery.data) != null ? _a3 : [];
28050
28344
  }, [statesQuery.data]);
28051
- useEffect30(() => {
28345
+ useEffect31(() => {
28052
28346
  var _a3, _b2, _c2, _d2;
28053
28347
  if (countryDefaultApplied.current || billing.countryId || countries.length === 0 || profile.isLoading || eventId && event.isLoading) {
28054
28348
  return;
@@ -28087,7 +28381,7 @@ var BillingInfo = ({
28087
28381
  event.isLoading,
28088
28382
  (_e = event.data) == null ? void 0 : _e.countryCode
28089
28383
  ]);
28090
- useEffect30(() => {
28384
+ useEffect31(() => {
28091
28385
  var _a3;
28092
28386
  if (!billing.countryId) return;
28093
28387
  const country = countries.find(
@@ -28098,7 +28392,7 @@ var BillingInfo = ({
28098
28392
  setBilling((current5) => ({ ...current5, countryCode }));
28099
28393
  }
28100
28394
  }, [billing.countryId, billing.countryCode, countries]);
28101
- useEffect30(() => {
28395
+ useEffect31(() => {
28102
28396
  if (!billing.stateId) return;
28103
28397
  const state = states.find(
28104
28398
  (candidate) => String(candidate.id) === String(billing.stateId)
@@ -28158,7 +28452,7 @@ var BillingInfo = ({
28158
28452
  });
28159
28453
  if (ttfOptInLabel || brandOptInLabel) commitConsent(consent);
28160
28454
  };
28161
- useEffect30(() => {
28455
+ useEffect31(() => {
28162
28456
  if (combined) commit();
28163
28457
  }, [
28164
28458
  combined,
@@ -28432,7 +28726,7 @@ var BillingInfo = ({
28432
28726
  showHolders ? continueButton : null
28433
28727
  ] });
28434
28728
  };
28435
- var useStyles4 = (theme) => useMemo31(
28729
+ var useStyles4 = (theme) => useMemo32(
28436
28730
  () => StyleSheet19.create({
28437
28731
  loginRow: {
28438
28732
  flexDirection: "row",
@@ -28625,7 +28919,7 @@ var Accommodation = ({ eventId }) => {
28625
28919
  var styles9 = StyleSheet21.create({ room: { gap: 12, paddingVertical: 12 }, title: { fontSize: 16, fontWeight: "600" } });
28626
28920
 
28627
28921
  // src/sections/Payment.tsx
28628
- import { useEffect as useEffect31, useMemo as useMemo32, useState as useState45 } from "react";
28922
+ import { useEffect as useEffect32, useMemo as useMemo33, useState as useState45 } from "react";
28629
28923
  import { Platform as Platform2, View as View25 } from "react-native";
28630
28924
  import { isPlatformPaySupported } from "@stripe/stripe-react-native";
28631
28925
  import { Fragment as Fragment12, jsx as jsx29, jsxs as jsxs25 } from "react/jsx-runtime";
@@ -28686,7 +28980,7 @@ var Payment = ({
28686
28980
  const [extras, setExtras] = useState45({});
28687
28981
  const [useSavedCard, setUseSavedCard] = useState45(true);
28688
28982
  const [nativeWalletSupported, setNativeWalletSupported] = useState45(false);
28689
- useEffect31(() => {
28983
+ useEffect32(() => {
28690
28984
  let mounted = true;
28691
28985
  const env = getConfig().env;
28692
28986
  isPlatformPaySupported({ googlePay: { testEnv: env === "STAG" || env === "DEV" } }).then((supported) => {
@@ -28702,7 +28996,7 @@ var Payment = ({
28702
28996
  const isFree = bd !== void 0 && Number(bd.total) === 0;
28703
28997
  const isXendit = checkout.gateway === "xendit";
28704
28998
  const offersOxxo = stripeOffersOxxo(checkout.stripeElementsConfig);
28705
- const options = useMemo32(() => {
28999
+ const options = useMemo33(() => {
28706
29000
  var _a3, _b2, _c2, _d2, _e2;
28707
29001
  if (isFree || !methods) return [];
28708
29002
  const out = [];
@@ -28759,7 +29053,7 @@ var Payment = ({
28759
29053
  nativeWalletSupported,
28760
29054
  offersOxxo
28761
29055
  ]);
28762
- useEffect31(() => {
29056
+ useEffect32(() => {
28763
29057
  if (options.length && !options.some((o) => o.value === selected))
28764
29058
  setSelected(options[0].value);
28765
29059
  }, [options, selected]);
@@ -28944,11 +29238,11 @@ var Payment = ({
28944
29238
  };
28945
29239
 
28946
29240
  // src/sections/WaiverSigning.tsx
28947
- import { useMemo as useMemo34, useRef as useRef35, useState as useState47 } from "react";
29241
+ import { useMemo as useMemo35, useRef as useRef36, useState as useState47 } from "react";
28948
29242
  import { Pressable as Pressable12, ScrollView, StyleSheet as StyleSheet23, Text as Text19, View as View27 } from "react-native";
28949
29243
 
28950
29244
  // src/ui/SignaturePad.tsx
28951
- import { memo, useEffect as useEffect32, useMemo as useMemo33, useRef as useRef34, useState as useState46 } from "react";
29245
+ import { memo, useEffect as useEffect33, useMemo as useMemo34, useRef as useRef35, useState as useState46 } from "react";
28952
29246
  import { PanResponder, Pressable as Pressable11, StyleSheet as StyleSheet22, Text as Text18, View as View26 } from "react-native";
28953
29247
  import { Fragment as Fragment13, jsx as jsx30, jsxs as jsxs26 } from "react/jsx-runtime";
28954
29248
  var LINE_WIDTH = 2.5;
@@ -28994,13 +29288,13 @@ var SignaturePad = ({
28994
29288
  disabled
28995
29289
  }) => {
28996
29290
  const theme = useTheme();
28997
- const strokesRef = useRef34([]);
29291
+ const strokesRef = useRef35([]);
28998
29292
  const [, setFrame] = useState46(0);
28999
- const frameRequest = useRef34(null);
29000
- const size = useRef34({ width: 0, height: PAD_HEIGHT });
29001
- const report = useRef34(onChange);
29293
+ const frameRequest = useRef35(null);
29294
+ const size = useRef35({ width: 0, height: PAD_HEIGHT });
29295
+ const report = useRef35(onChange);
29002
29296
  report.current = onChange;
29003
- const disabledRef = useRef34(disabled);
29297
+ const disabledRef = useRef35(disabled);
29004
29298
  disabledRef.current = disabled;
29005
29299
  const render = () => {
29006
29300
  if (frameRequest.current !== null) cancelAnimationFrame(frameRequest.current);
@@ -29011,7 +29305,7 @@ var SignaturePad = ({
29011
29305
  if (frameRequest.current !== null) return;
29012
29306
  frameRequest.current = requestAnimationFrame(render);
29013
29307
  };
29014
- useEffect32(
29308
+ useEffect33(
29015
29309
  () => () => {
29016
29310
  if (frameRequest.current !== null) cancelAnimationFrame(frameRequest.current);
29017
29311
  },
@@ -29026,7 +29320,7 @@ var SignaturePad = ({
29026
29320
  });
29027
29321
  if (ended) report.current(ended.pngDataUrl, ended.inkLength);
29028
29322
  };
29029
- const responder = useMemo33(
29323
+ const responder = useMemo34(
29030
29324
  () => PanResponder.create({
29031
29325
  onStartShouldSetPanResponder: () => !disabledRef.current,
29032
29326
  onMoveShouldSetPanResponder: () => !disabledRef.current,
@@ -29243,7 +29537,7 @@ var TicketForm = ({ ticket, consentText, t, methods, busy, locked = false, error
29243
29537
  const [problems, setProblems] = useState47([]);
29244
29538
  const [pressed, setPressed] = useState47(false);
29245
29539
  const frozen = busy || locked;
29246
- const draftRef = useRef35(draft);
29540
+ const draftRef = useRef36(draft);
29247
29541
  draftRef.current = draft;
29248
29542
  const patch2 = (next) => {
29249
29543
  if (!frozen) setDraft((d) => ({ ...d, ...next }));
@@ -29397,7 +29691,7 @@ var TicketForm = ({ ticket, consentText, t, methods, busy, locked = false, error
29397
29691
  )
29398
29692
  ] });
29399
29693
  };
29400
- var useWaiverStyles = (theme) => useMemo34(
29694
+ var useWaiverStyles = (theme) => useMemo35(
29401
29695
  () => StyleSheet23.create({
29402
29696
  muted: {
29403
29697
  color: theme.muted,
@@ -29553,7 +29847,7 @@ var styles11 = StyleSheet24.create({
29553
29847
  });
29554
29848
 
29555
29849
  // src/sections/Rewards.tsx
29556
- import { useEffect as useEffect33, useState as useState51 } from "react";
29850
+ import { useEffect as useEffect34, useState as useState51 } from "react";
29557
29851
  import { Alert as Alert3, Image as Image3, Share as Share2, StyleSheet as StyleSheet27, View as View31 } from "react-native";
29558
29852
  import Clipboard2 from "@react-native-clipboard/clipboard";
29559
29853
 
@@ -29662,7 +29956,7 @@ var styles12 = StyleSheet25.create({
29662
29956
  });
29663
29957
 
29664
29958
  // src/sections/rewards/RewardsTree.tsx
29665
- import { useMemo as useMemo35 } from "react";
29959
+ import { useMemo as useMemo36 } from "react";
29666
29960
  import { StyleSheet as StyleSheet26, View as View30 } from "react-native";
29667
29961
  import { jsx as jsx35, jsxs as jsxs31 } from "react/jsx-runtime";
29668
29962
  var MAX_NODES = 120;
@@ -29670,11 +29964,11 @@ var DOT = 10;
29670
29964
  var ROOT_DOT = 16;
29671
29965
  var RewardsTree = ({ tree, size = 260 }) => {
29672
29966
  const theme = useTheme();
29673
- const nodes = useMemo35(() => {
29967
+ const nodes = useMemo36(() => {
29674
29968
  var _a2;
29675
29969
  return ((_a2 = tree == null ? void 0 : tree.nodes) != null ? _a2 : []).slice(0, MAX_NODES);
29676
29970
  }, [tree]);
29677
- const { layout, edges, rootId } = useMemo35(() => {
29971
+ const { layout, edges, rootId } = useMemo36(() => {
29678
29972
  const root = treeRootId(nodes);
29679
29973
  const computed = computeRadialTreeLayout(nodes, root);
29680
29974
  return { layout: computed, edges: radialTreeEdges(nodes, computed), rootId: root };
@@ -29764,7 +30058,7 @@ var RewardsView = ({
29764
30058
  const [packName, setPackName] = useState51("");
29765
30059
  const [packCode, setPackCode] = useState51("");
29766
30060
  const [copied, setCopied] = useState51(false);
29767
- useEffect33(() => {
30061
+ useEffect34(() => {
29768
30062
  setCopied(false);
29769
30063
  }, [rewards == null ? void 0 : rewards.share_link]);
29770
30064
  if (!rewards)
@@ -29952,7 +30246,7 @@ var styles14 = StyleSheet27.create({
29952
30246
  });
29953
30247
 
29954
30248
  // src/sections/TicketChange.tsx
29955
- import { useMemo as useMemo36 } from "react";
30249
+ import { useMemo as useMemo37 } from "react";
29956
30250
  import { Pressable as Pressable13, StyleSheet as StyleSheet28, Text as Text21, View as View32 } from "react-native";
29957
30251
  import { Fragment as Fragment16, jsx as jsx37, jsxs as jsxs33 } from "react/jsx-runtime";
29958
30252
  var TicketChange = ({
@@ -30162,7 +30456,7 @@ var TicketChange = ({
30162
30456
  flow.notice ? /* @__PURE__ */ jsx37(Text21, { style: s9.muted, children: t(flow.notice) }) : null
30163
30457
  ] });
30164
30458
  };
30165
- var useChangeStyles = (theme) => useMemo36(
30459
+ var useChangeStyles = (theme) => useMemo37(
30166
30460
  () => StyleSheet28.create({
30167
30461
  loader: { paddingVertical: 20, alignItems: "center" },
30168
30462
  muted: {
@@ -30258,7 +30552,7 @@ var Trips = ({
30258
30552
  };
30259
30553
 
30260
30554
  // src/sections/EventDiscussionView.tsx
30261
- import { useRef as useRef37, useState as useState53 } from "react";
30555
+ import { useRef as useRef38, useState as useState53 } from "react";
30262
30556
  import {
30263
30557
  ActivityIndicator as ActivityIndicator4,
30264
30558
  Alert as Alert4,
@@ -30276,7 +30570,7 @@ import {
30276
30570
  } from "react-native";
30277
30571
 
30278
30572
  // src/sections/discussion/CommentImages.tsx
30279
- import { useEffect as useEffect34, useState as useState52 } from "react";
30573
+ import { useEffect as useEffect35, useState as useState52 } from "react";
30280
30574
  import {
30281
30575
  ActivityIndicator as ActivityIndicator3,
30282
30576
  Image as Image4,
@@ -30289,9 +30583,9 @@ import {
30289
30583
  } from "react-native";
30290
30584
 
30291
30585
  // src/ui/useAccountT.ts
30292
- import { useMemo as useMemo37 } from "react";
30586
+ import { useMemo as useMemo38 } from "react";
30293
30587
  var useAccountT = (locale) => {
30294
- const translate2 = useMemo37(
30588
+ const translate2 = useMemo38(
30295
30589
  () => createTranslator({ locale: resolveLocale(locale) }),
30296
30590
  [locale]
30297
30591
  );
@@ -30356,7 +30650,7 @@ var CommentImages = ({
30356
30650
  const theme = useTheme();
30357
30651
  const white = [s.white, { fontFamily: theme.fontFamily }];
30358
30652
  const [selected, setSelected] = useState52(null);
30359
- useEffect34(() => {
30653
+ useEffect35(() => {
30360
30654
  if (selected === null) return;
30361
30655
  onPreviewChange(true);
30362
30656
  return () => onPreviewChange(false);
@@ -30612,7 +30906,7 @@ var s = StyleSheet29.create({
30612
30906
  });
30613
30907
 
30614
30908
  // src/sections/discussion/SwipeReply.tsx
30615
- import { useMemo as useMemo38, useRef as useRef36 } from "react";
30909
+ import { useMemo as useMemo39, useRef as useRef37 } from "react";
30616
30910
  import { Animated, PanResponder as PanResponder2, StyleSheet as StyleSheet30, Text as Text23, View as View35 } from "react-native";
30617
30911
  import { jsx as jsx40, jsxs as jsxs36 } from "react/jsx-runtime";
30618
30912
  var SwipeReply = ({
@@ -30623,8 +30917,8 @@ var SwipeReply = ({
30623
30917
  children
30624
30918
  }) => {
30625
30919
  const theme = useTheme();
30626
- const offset = useRef36(new Animated.Value(0)).current;
30627
- const gesture = useMemo38(() => {
30920
+ const offset = useRef37(new Animated.Value(0)).current;
30921
+ const gesture = useMemo39(() => {
30628
30922
  const reset = () => Animated.spring(offset, { toValue: 0, useNativeDriver: true }).start();
30629
30923
  return PanResponder2.create({
30630
30924
  onMoveShouldSetPanResponder: (_, value6) => enabled && value6.dx < -12 && Math.abs(value6.dx) > Math.abs(value6.dy) * 1.5,
@@ -30704,8 +30998,8 @@ var EventDiscussionBody = ({
30704
30998
  var _a2, _b, _c;
30705
30999
  const theme = useTheme();
30706
31000
  const t = useAccountT(locale);
30707
- const list2 = useRef37(null);
30708
- const firstContent = useRef37(true);
31001
+ const list2 = useRef38(null);
31002
+ const firstContent = useRef38(true);
30709
31003
  const [actions, setActions] = useState53(null);
30710
31004
  const [reporting, setReporting] = useState53(null);
30711
31005
  const [moderating, setModerating] = useState53(null);
@@ -30714,7 +31008,7 @@ var EventDiscussionBody = ({
30714
31008
  const [pickerError, setPickerError] = useState53("");
30715
31009
  const [imageOpen, setImageOpen] = useState53(false);
30716
31010
  const [pickerBusy, setPickerBusy] = useState53(false);
30717
- const picking = useRef37(false);
31011
+ const picking = useRef38(false);
30718
31012
  const text6 = { color: theme.text, fontFamily: theme.fontFamily };
30719
31013
  const muted = { color: theme.muted, fontFamily: theme.fontFamily };
30720
31014
  const closeActions = (work) => {
@@ -31728,7 +32022,7 @@ var styles15 = StyleSheet32.create({
31728
32022
  });
31729
32023
 
31730
32024
  // src/sections/Streaming.tsx
31731
- import { useMemo as useMemo39, useRef as useRef38, useState as useState54 } from "react";
32025
+ import { useMemo as useMemo40, useRef as useRef39, useState as useState54 } from "react";
31732
32026
  import {
31733
32027
  ActivityIndicator as ActivityIndicator5,
31734
32028
  Alert as Alert6,
@@ -31757,13 +32051,13 @@ var StreamingView = ({
31757
32051
  const defaultT = useAccountT(locale);
31758
32052
  const t = translate2 != null ? translate2 : defaultT;
31759
32053
  const inherited = useTheme();
31760
- const theme = useMemo39(
32054
+ const theme = useMemo40(
31761
32055
  () => override ? resolveTheme({ ...inherited, ...override }) : inherited,
31762
32056
  [inherited, override]
31763
32057
  );
31764
32058
  const session = hooks_exports.useAuthSession();
31765
32059
  const assertOwner = hooks_exports.useSessionAction();
31766
- const pendingBrowser = useRef38({ scope: session.sessionScope, locked: false });
32060
+ const pendingBrowser = useRef39({ scope: session.sessionScope, locked: false });
31767
32061
  const [stored, setStored] = useState54({
31768
32062
  scope: session.sessionScope,
31769
32063
  busy: false,
@@ -31927,7 +32221,7 @@ var s4 = StyleSheet33.create({
31927
32221
  });
31928
32222
 
31929
32223
  // src/sections/AccountDeletion.tsx
31930
- import { useMemo as useMemo40 } from "react";
32224
+ import { useMemo as useMemo41 } from "react";
31931
32225
  import {
31932
32226
  ActivityIndicator as ActivityIndicator6,
31933
32227
  Alert as Alert7,
@@ -31959,7 +32253,7 @@ var AccountDeletionView = ({
31959
32253
  const defaultT = useAccountT(locale);
31960
32254
  const t = translate2 != null ? translate2 : defaultT;
31961
32255
  const inherited = useTheme();
31962
- const theme = useMemo40(
32256
+ const theme = useMemo41(
31963
32257
  () => override ? resolveTheme({ ...inherited, ...override }) : inherited,
31964
32258
  [inherited, override]
31965
32259
  );
@@ -32188,7 +32482,7 @@ var s5 = StyleSheet34.create({
32188
32482
  });
32189
32483
 
32190
32484
  // src/sections/ProfileSettings.tsx
32191
- import { useEffect as useEffect35, useMemo as useMemo41 } from "react";
32485
+ import { useEffect as useEffect36, useMemo as useMemo42 } from "react";
32192
32486
  import {
32193
32487
  ActivityIndicator as ActivityIndicator7,
32194
32488
  KeyboardAvoidingView as KeyboardAvoidingView2,
@@ -32223,7 +32517,7 @@ var ProfileSettingsView = ({
32223
32517
  const defaultT = useAccountT(locale);
32224
32518
  const t = translate2 != null ? translate2 : defaultT;
32225
32519
  const inherited = useTheme();
32226
- const theme = useMemo41(
32520
+ const theme = useMemo42(
32227
32521
  () => override ? resolveTheme({ ...inherited, ...override }) : inherited,
32228
32522
  [inherited, override]
32229
32523
  );
@@ -32235,7 +32529,7 @@ var ProfileSettingsView = ({
32235
32529
  } catch (e) {
32236
32530
  }
32237
32531
  };
32238
- useEffect35(() => {
32532
+ useEffect36(() => {
32239
32533
  if (flow.settings) flow.open(mode);
32240
32534
  }, [mode, flow.scopeKey, Boolean(flow.settings)]);
32241
32535
  const text6 = { color: theme.text, fontFamily: theme.fontFamily };
@@ -32740,7 +33034,7 @@ var AccountPaymentPlanSection = ({
32740
33034
  };
32741
33035
 
32742
33036
  // src/sections/NotificationPreferences.tsx
32743
- import { useEffect as useEffect36, useMemo as useMemo42 } from "react";
33037
+ import { useEffect as useEffect37, useMemo as useMemo43 } from "react";
32744
33038
  import {
32745
33039
  ActivityIndicator as ActivityIndicator8,
32746
33040
  Pressable as Pressable21,
@@ -32769,7 +33063,7 @@ var NotificationPreferencesView = ({
32769
33063
  const defaultT = useAccountT(locale);
32770
33064
  const t = translate2 != null ? translate2 : defaultT;
32771
33065
  const inherited = useTheme();
32772
- const theme = useMemo42(
33066
+ const theme = useMemo43(
32773
33067
  () => override ? resolveTheme({ ...inherited, ...override }) : inherited,
32774
33068
  [inherited, override]
32775
33069
  );
@@ -32781,7 +33075,7 @@ var NotificationPreferencesView = ({
32781
33075
  } catch (e) {
32782
33076
  }
32783
33077
  };
32784
- useEffect36(() => {
33078
+ useEffect37(() => {
32785
33079
  var _a3;
32786
33080
  if ((_a3 = flow.preferences) == null ? void 0 : _a3.available) flow.begin();
32787
33081
  }, [flow.scopeKey, Boolean(flow.preferences), (_a2 = flow.preferences) == null ? void 0 : _a2.available]);
@@ -32951,7 +33245,7 @@ import {
32951
33245
  } from "react-native";
32952
33246
 
32953
33247
  // src/auth/LoginForm.tsx
32954
- import { useEffect as useEffect37, useState as useState56 } from "react";
33248
+ import { useEffect as useEffect38, useState as useState56 } from "react";
32955
33249
  import { Pressable as Pressable23, StyleSheet as StyleSheet38, Text as Text31, View as View49 } from "react-native";
32956
33250
 
32957
33251
  // src/auth/PasswordInput.tsx
@@ -33003,7 +33297,7 @@ var LoginForm = ({
33003
33297
  const theme = useTheme();
33004
33298
  const [email, setEmail] = useState56(initialEmail);
33005
33299
  const [password, setPassword] = useState56("");
33006
- useEffect37(() => {
33300
+ useEffect38(() => {
33007
33301
  if (initialEmail && !email) setEmail(initialEmail);
33008
33302
  }, [email, initialEmail]);
33009
33303
  const submit = () => void onSubmit({ email, password });
@@ -33127,7 +33421,7 @@ var EmailCodeForm = ({
33127
33421
  };
33128
33422
 
33129
33423
  // src/auth/ForgotPasswordForm.tsx
33130
- import { useEffect as useEffect38, useState as useState58 } from "react";
33424
+ import { useEffect as useEffect39, useState as useState58 } from "react";
33131
33425
  import { Pressable as Pressable24, StyleSheet as StyleSheet39, Text as Text32, View as View51 } from "react-native";
33132
33426
  import { jsx as jsx56, jsxs as jsxs52 } from "react/jsx-runtime";
33133
33427
  var ForgotPasswordForm = ({
@@ -33142,7 +33436,7 @@ var ForgotPasswordForm = ({
33142
33436
  }) => {
33143
33437
  const theme = useTheme();
33144
33438
  const [email, setEmail] = useState58(initialEmail);
33145
- useEffect38(() => {
33439
+ useEffect39(() => {
33146
33440
  if (initialEmail && !email) setEmail(initialEmail);
33147
33441
  }, [email, initialEmail]);
33148
33442
  const submit = () => void onSubmit(email);
@@ -33190,7 +33484,7 @@ var styles18 = StyleSheet39.create({
33190
33484
  });
33191
33485
 
33192
33486
  // src/auth/RegisterForm.tsx
33193
- import { useEffect as useEffect39, useMemo as useMemo43, useState as useState59 } from "react";
33487
+ import { useEffect as useEffect40, useMemo as useMemo44, useState as useState59 } from "react";
33194
33488
  import { Linking as Linking10, Pressable as Pressable25, StyleSheet as StyleSheet40, View as View52 } from "react-native";
33195
33489
  import { Fragment as Fragment29, jsx as jsx57, jsxs as jsxs53 } from "react/jsx-runtime";
33196
33490
  var emptyRegistration = (email) => ({
@@ -33219,7 +33513,7 @@ var RegisterForm = ({
33219
33513
  onFieldChange
33220
33514
  }) => {
33221
33515
  var _a2, _b, _c, _d, _e, _f;
33222
- const t = useMemo43(() => createTranslator({ locale }), [locale]);
33516
+ const t = useMemo44(() => createTranslator({ locale }), [locale]);
33223
33517
  const [values2, setValues] = useState59(
33224
33518
  () => emptyRegistration(initialEmail)
33225
33519
  );
@@ -33227,22 +33521,22 @@ var RegisterForm = ({
33227
33521
  const [refreshingProof, setRefreshingProof] = useState59(false);
33228
33522
  const [refreshCode, setRefreshCode] = useState59("");
33229
33523
  const countriesQuery = hooks_exports.useCountries();
33230
- const countries = useMemo43(() => {
33524
+ const countries = useMemo44(() => {
33231
33525
  var _a3;
33232
33526
  return (_a3 = countriesQuery.data) != null ? _a3 : [];
33233
33527
  }, [countriesQuery.data]);
33234
33528
  const statesQuery = hooks_exports.useStates(values2.countryId, {
33235
33529
  enabled: requireAddress && Boolean(values2.countryId)
33236
33530
  });
33237
- const states = useMemo43(() => {
33531
+ const states = useMemo44(() => {
33238
33532
  var _a3;
33239
33533
  return (_a3 = statesQuery.data) != null ? _a3 : [];
33240
33534
  }, [statesQuery.data]);
33241
- useEffect39(() => {
33535
+ useEffect40(() => {
33242
33536
  if (initialEmail && !values2.email)
33243
33537
  setValues((current5) => ({ ...current5, email: initialEmail }));
33244
33538
  }, [initialEmail, values2.email]);
33245
- useEffect39(() => {
33539
+ useEffect40(() => {
33246
33540
  var _a3;
33247
33541
  if (!requireAddress || values2.countryId || countries.length === 0) return;
33248
33542
  const preferred = (_a3 = countries.find((country) => {
@@ -33263,11 +33557,11 @@ var RegisterForm = ({
33263
33557
  setValues((current5) => ({ ...current5, [field]: value6 }));
33264
33558
  onFieldChange == null ? void 0 : onFieldChange(field);
33265
33559
  };
33266
- const countryOptions = useMemo43(
33560
+ const countryOptions = useMemo44(
33267
33561
  () => countries.map((country) => ({ label: country.name, value: String(country.id) })),
33268
33562
  [countries]
33269
33563
  );
33270
- const stateOptions = useMemo43(
33564
+ const stateOptions = useMemo44(
33271
33565
  () => states.map((state) => ({ label: state.name, value: String(state.id) })),
33272
33566
  [states]
33273
33567
  );
@@ -33866,7 +34160,7 @@ function AccountEmailEnrichment({
33866
34160
  }
33867
34161
 
33868
34162
  // src/auth/AuthModal.tsx
33869
- import { useCallback as useCallback16, useEffect as useEffect40, useRef as useRef39 } from "react";
34163
+ import { useCallback as useCallback17, useEffect as useEffect41, useRef as useRef40 } from "react";
33870
34164
  import { Image as Image8, Modal as Modal7, Pressable as Pressable26, ScrollView as ScrollView4, StyleSheet as StyleSheet42, Text as Text34, View as View55 } from "react-native";
33871
34165
  import { jsx as jsx60, jsxs as jsxs56 } from "react/jsx-runtime";
33872
34166
  var Tab = ({
@@ -33901,7 +34195,7 @@ var CredentialAuthModal = ({
33901
34195
  }) => {
33902
34196
  const theme = useTheme();
33903
34197
  const t = useAccountT();
33904
- const closeAfterAuth = useCallback16(
34198
+ const closeAfterAuth = useCallback17(
33905
34199
  (profile) => {
33906
34200
  onAuthenticated == null ? void 0 : onAuthenticated(profile);
33907
34201
  onClose();
@@ -34093,8 +34387,8 @@ var PhoneAccountModal = ({
34093
34387
  },
34094
34388
  onCancelled: onClose
34095
34389
  });
34096
- const prepared = useRef39(false);
34097
- useEffect40(() => {
34390
+ const prepared = useRef40(false);
34391
+ useEffect41(() => {
34098
34392
  if (prepared.current) return;
34099
34393
  prepared.current = true;
34100
34394
  if (initialEmail) flow.emailAuth.showLogin(initialEmail);
@@ -34184,7 +34478,7 @@ var styles20 = StyleSheet42.create({
34184
34478
  });
34185
34479
 
34186
34480
  // src/auth/ResetPasswordForm.tsx
34187
- import { useMemo as useMemo44, useState as useState60 } from "react";
34481
+ import { useMemo as useMemo45, useState as useState60 } from "react";
34188
34482
  import { StyleSheet as StyleSheet43, Text as Text35, View as View56 } from "react-native";
34189
34483
  import { jsx as jsx61, jsxs as jsxs57 } from "react/jsx-runtime";
34190
34484
  var ResetPasswordForm = ({
@@ -34197,7 +34491,7 @@ var ResetPasswordForm = ({
34197
34491
  const [confirmation, setConfirmation] = useState60("");
34198
34492
  const [submitted, setSubmitted] = useState60(false);
34199
34493
  const [success, setSuccess] = useState60(false);
34200
- const validation = useMemo44(() => {
34494
+ const validation = useMemo45(() => {
34201
34495
  if (!submitted)
34202
34496
  return {};
34203
34497
  return {
@@ -34256,7 +34550,7 @@ var styles21 = StyleSheet43.create({
34256
34550
  });
34257
34551
 
34258
34552
  // src/EmbeddedCheckout.tsx
34259
- import { useEffect as useEffect41, useRef as useRef40, useState as useState61 } from "react";
34553
+ import { useEffect as useEffect42, useRef as useRef41, useState as useState61 } from "react";
34260
34554
  import { Pressable as Pressable27, ScrollView as ScrollView5, StyleSheet as StyleSheet44, Text as Text36, View as View57 } from "react-native";
34261
34555
  import { Fragment as Fragment32, jsx as jsx62, jsxs as jsxs58 } from "react/jsx-runtime";
34262
34556
  var Flow = ({
@@ -34286,7 +34580,7 @@ var Flow = ({
34286
34580
  const theme = useTheme();
34287
34581
  const [view, setView] = useState61(initialView);
34288
34582
  const [selectionView, setSelectionView] = useState61(initialView);
34289
- const editedDetailsRef = useRef40(null);
34583
+ const editedDetailsRef = useRef41(null);
34290
34584
  const [authRequest, setAuthRequest] = useState61(
34291
34585
  null
34292
34586
  );
@@ -34303,7 +34597,7 @@ var Flow = ({
34303
34597
  orderFixed: checkout.orderFixed
34304
34598
  });
34305
34599
  const leaveAllowed = canLeavePayment(checkout);
34306
- useEffect41(() => {
34600
+ useEffect42(() => {
34307
34601
  if (visibleView === view) return;
34308
34602
  if (visibleView === "checkout") setView("checkout");
34309
34603
  else {
@@ -34311,7 +34605,7 @@ var Flow = ({
34311
34605
  setSelectionView("tickets");
34312
34606
  }
34313
34607
  }, [view, visibleView]);
34314
- useEffect41(() => {
34608
+ useEffect42(() => {
34315
34609
  onViewChange == null ? void 0 : onViewChange(visibleView);
34316
34610
  }, [onViewChange, visibleView]);
34317
34611
  const enterCheckout = (from) => {
@@ -34703,6 +34997,7 @@ export {
34703
34997
  bundleSubmitAction,
34704
34998
  bundleSubmitState,
34705
34999
  bundlesFromCatalog,
35000
+ calendarTicketRows,
34706
35001
  callHost,
34707
35002
  canLeavePayment,
34708
35003
  captureSessionAction,
@@ -34711,6 +35006,8 @@ export {
34711
35006
  cardFormShouldPrepare,
34712
35007
  cartTicketCount,
34713
35008
  cartTicketSlots,
35009
+ catalogDate,
35010
+ catalogQuantities,
34714
35011
  changeBillingEmail,
34715
35012
  changeBillingField,
34716
35013
  changeBillingPhone,
@@ -34983,6 +35280,7 @@ export {
34983
35280
  ticketConfirmerKey,
34984
35281
  ticketFieldsFor,
34985
35282
  ticketPaymentKeys,
35283
+ ticketPriceContext,
34986
35284
  ticketQuantityRange,
34987
35285
  ticketRefundConsequences,
34988
35286
  ticketTypesForTier,