@scopetickets/checkout 0.1.2 → 0.1.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.cjs CHANGED
@@ -1653,6 +1653,30 @@ var ScopeClient = class {
1653
1653
  signal
1654
1654
  });
1655
1655
  }
1656
+ /**
1657
+ * Tickets for any number of events or whole series in one request, each row naming the
1658
+ * events it sells for in `EventKeys`.
1659
+ *
1660
+ * THE ROUTE TO READ TICKETS FROM. `Events/{key}/Tickets` omits a timeslot at
1661
+ * `Remaining: 0` rather than reporting it sold out, so a sold-out session never reaches
1662
+ * the picker at all.
1663
+ *
1664
+ * A MISSPELT PARAMETER IS NOT REFUSED: the platform answers `200 {"Tickets":[]}`, which
1665
+ * reads exactly like an event that sells nothing.
1666
+ */
1667
+ async getTicketInformation(query, signal) {
1668
+ const params = new URLSearchParams();
1669
+ for (const key of query.events ?? []) params.append("events", key);
1670
+ for (const key of query.series ?? []) params.append("series", key);
1671
+ if (query.includeTimeslots) params.set("include_timeslots", "true");
1672
+ if (query.includeQuestions) params.set("include_questions", "true");
1673
+ const response = await this.fetch(
1674
+ `/api/v2/TicketInformation?${params}`,
1675
+ { signal }
1676
+ );
1677
+ return response.Tickets ?? [];
1678
+ }
1679
+ /** @deprecated Use getTicketInformation(), which also reports sold-out timeslots */
1656
1680
  async getEventTickets(eventKey, signal) {
1657
1681
  const response = await this.fetch(
1658
1682
  `/api/v2/Events/${eventKey}/Tickets?include_timeslots=true`,
@@ -2725,8 +2749,8 @@ function e164(dialCode, phone) {
2725
2749
  if (country === null) return null;
2726
2750
  const national = nationalDigits(phone, country);
2727
2751
  if (!isValidPhone(phone, country)) return null;
2728
- const composed = `${country.dialCode}${national}`;
2729
- return isE164(composed) ? composed : null;
2752
+ const composed2 = `${country.dialCode}${national}`;
2753
+ return isE164(composed2) ? composed2 : null;
2730
2754
  }
2731
2755
  function normalizeE164(value) {
2732
2756
  const { dialCode, national } = splitPhoneNumber(value);
@@ -3438,8 +3462,8 @@ var PURCHASE_STEPS = [
3438
3462
  name: "More Information",
3439
3463
  islandState: "details",
3440
3464
  preflightStepId: "questionnaire",
3441
- blurb: "The event\u2019s own questions \u2014 the last thing the order can still be missing. Needs the cart, which is the only source of the integer EventId the questions endpoint takes, and by here the cart is four steps old.",
3442
- excusedWhen: "The event asks nothing. A failed LOOKUP is NOT this \u2014 it resolves to a notice, because proceeding would let the buyer reach payment and be rejected server-side with nothing on screen to fix.",
3465
+ blurb: "The event\u2019s own questions \u2014 the last thing the order can still be missing. They come from the tickets and from the event\u2019s questionnaire, or its series\u2019, which is read with the cart; the answers go to every cart item once, before any charge.",
3466
+ excusedWhen: "Nothing asks \u2014 not the ticket, the event or its series. A failed LOOKUP is NOT this \u2014 it resolves to a notice, because proceeding would let the buyer reach payment and be rejected server-side with nothing on screen to fix.",
3443
3467
  collapsed: pill("Add Details")
3444
3468
  },
3445
3469
  {
@@ -4892,136 +4916,182 @@ function useCheckoutClient(appKey, source) {
4892
4916
  });
4893
4917
  }, [appKey, orgKey, environment]);
4894
4918
  }
4919
+ function readRun(info, environment) {
4920
+ const eventKeyByDay = {};
4921
+ for (const event of info.Events) eventKeyByDay[dayOf(event.Date)] = event.Key;
4922
+ const theme = info.Series?.Theme ?? info.Events[0]?.Theme;
4923
+ const artwork = runArtwork(info.Series, info.Events, ENVIRONMENT_URLS[environment].artworkUrl);
4924
+ if (artwork === void 0 && theme !== void 0 && typeof console !== "undefined") {
4925
+ console.warn(
4926
+ "[ScopeTicketsCheckout] no cart artwork resolved from this run\u2019s Theme. Expected a url in `Theme.Backgrounds[0]`. The Theme as it arrived:",
4927
+ theme
4928
+ );
4929
+ }
4930
+ return {
4931
+ info,
4932
+ events: info.Events.map((event) => ({
4933
+ eventKey: event.Key,
4934
+ name: event.Name,
4935
+ day: dayOf(event.Date)
4936
+ })),
4937
+ eventKeyByDay,
4938
+ /*
4939
+ * THE VENUE'S CLOCK, from the venue. `Venue.TimeZone` is an IANA zone and every event
4940
+ * carries its venue — `nowTime` was `00:00` for a turn, which is not a clock at all:
4941
+ * it says every slot today is still to come, which is exactly the question the time
4942
+ * picker asks it.
4943
+ */
4944
+ timeZone: info.Events[0]?.Venue?.TimeZone ?? null,
4945
+ artwork
4946
+ };
4947
+ }
4948
+ function composed({ run, wanted, today, nowTime, tickets, error }, loading) {
4949
+ const { info } = run;
4950
+ const slots = tickets.flatMap((ticket) => ticket.HasTimeslot ? ticket.Timeslots ?? [] : []);
4951
+ const slotsByDay = wanted !== null && slots.length > 0 ? { [wanted]: slots.map(toTimeslot) } : {};
4952
+ const questions = tickets.flatMap((ticket) => ticket.Questions ?? []);
4953
+ const productCurrency = tickets.map((ticket) => ticket.Currency).find((currency) => currency !== null && currency !== void 0);
4954
+ const assignments = [
4955
+ ...info.UserTypes ?? [],
4956
+ ...info.Events.flatMap((event) => event.UserTypes ?? []),
4957
+ ...tickets.flatMap((ticket) => ticket.UserTypes ?? [])
4958
+ ];
4959
+ const organisation = info.Events[0]?.Organisation;
4960
+ return {
4961
+ schedule: {
4962
+ series: { events: [...run.events] },
4963
+ today,
4964
+ nowTime,
4965
+ slotsByDay
4966
+ },
4967
+ userTypes: groupUserTypes(assignments),
4968
+ userTypeNames: userTypeNames(assignments),
4969
+ /*
4970
+ * THE QUESTIONS RIDE ON THE TICKETS, so they arrive with the slots and cost no
4971
+ * request of their own. `getQuestionnaireQuestions` wants a cart's event id, which
4972
+ * does not exist yet at the step that has to know whether to ask.
4973
+ */
4974
+ questions: [...new Map(questions.map((q) => [q.QuestionId, q])).values()],
4975
+ /*
4976
+ * WHOSE EVENT IT IS. There is no follow endpoint and there does not need to be:
4977
+ * the organisation is on every event, and it is who a buyer would want to hear
4978
+ * from again.
4979
+ *
4980
+ * NOT THE VENUE, though the event names one. A venue hosts whatever is booked
4981
+ * into it — following one subscribes a buyer to every unrelated thing that happens
4982
+ * in a building, which is not what "stay up to date" offered them. The organiser
4983
+ * is the party whose next event resembles this one.
4984
+ */
4985
+ follow: [
4986
+ organisation === void 0 ? null : { key: organisation.Key, name: organisation.Name, kind: "Organiser" }
4987
+ ].filter((entity) => entity !== null),
4988
+ /*
4989
+ * `Backgrounds[0]`, made absolute against the CDN, the run's before a night's — see
4990
+ * `runArtwork`. The platform answers with site-root paths, so the origin is the
4991
+ * whole of the work: without it every thumbnail points at the customer's own domain.
4992
+ */
4993
+ artwork: run.artwork,
4994
+ eventKeyByDay: run.eventKeyByDay,
4995
+ hasTimeslots: tickets.some((ticket) => ticket.HasTimeslot),
4996
+ limits: ticketLimits(tickets),
4997
+ /* Most specific first — a product's own, then its event's, then the run's. */
4998
+ currency: productCurrency ?? info.Events[0]?.Currency ?? info.Series?.Currency ?? void 0,
4999
+ loading,
5000
+ error: loading ? null : error
5001
+ };
5002
+ }
4895
5003
  function useCheckoutData(subjectKey, isSeries, client, enabled, day, environment = "production") {
4896
- const [data, setData] = (0, import_react9.useState)(NOTHING);
5004
+ const [run, setRun] = (0, import_react9.useState)({ status: "IDLE" });
5005
+ const [sessions, setSessions] = (0, import_react9.useState)({ status: "IDLE" });
4897
5006
  (0, import_react9.useEffect)(() => {
4898
5007
  if (!enabled || client === null) return;
4899
5008
  const abort = new AbortController();
4900
- setData((was) => ({ ...was, loading: true, error: null }));
4901
- const load = async () => {
4902
- const info = isSeries ? await client.getSeriesInfo(subjectKey, abort.signal) : await client.getEventInfo(subjectKey, abort.signal);
4903
- const eventKeyByDay = {};
4904
- for (const event of info.Events) eventKeyByDay[dayOf(event.Date)] = event.Key;
4905
- const events = info.Events.map((event) => ({
4906
- eventKey: event.Key,
4907
- name: event.Name,
4908
- day: dayOf(event.Date)
4909
- }));
4910
- const timeZone = info.Events[0]?.Venue?.TimeZone ?? null;
4911
- const now = /* @__PURE__ */ new Date();
4912
- const today = dayInZone(now, timeZone);
4913
- const wanted = day !== void 0 && day in eventKeyByDay ? day : soonestRelevantDay({ events }, today);
4914
- const forDay = wanted === null ? void 0 : eventKeyByDay[wanted];
4915
- const slotsByDay = {};
4916
- const questions = [];
4917
- let list = [];
4918
- let ticketsError = null;
4919
- if (forDay !== void 0) {
4920
- try {
4921
- list = await client.getEventTickets(forDay, abort.signal);
4922
- } catch (cause) {
4923
- ticketsError = cause instanceof Error ? cause : new Error(String(cause));
4924
- }
4925
- }
4926
- const tickets = wanted === null ? [] : [[wanted, list]];
4927
- let hasTimeslots = false;
4928
- let productCurrency;
4929
- for (const [on, forThatDay] of tickets) {
4930
- const slots = forThatDay.flatMap(
4931
- (ticket) => ticket.HasTimeslot ? ticket.Timeslots ?? [] : []
4932
- );
4933
- if (forThatDay.some((ticket) => ticket.HasTimeslot)) hasTimeslots = true;
4934
- if (slots.length > 0) slotsByDay[on] = slots.map(toTimeslot);
4935
- for (const ticket of forThatDay) {
4936
- questions.push(...ticket.Questions ?? []);
4937
- productCurrency ??= ticket.Currency ?? void 0;
4938
- }
4939
- }
4940
- const assignments = [
4941
- ...info.UserTypes ?? [],
4942
- ...info.Events.flatMap((event) => event.UserTypes ?? []),
4943
- ...list.flatMap((ticket) => ticket.UserTypes ?? [])
4944
- ];
4945
- const organisation = info.Events[0]?.Organisation;
4946
- const theme = info.Series?.Theme ?? info.Events[0]?.Theme;
4947
- const artwork = runArtwork(
4948
- info.Series,
4949
- info.Events,
4950
- ENVIRONMENT_URLS[environment].artworkUrl
4951
- );
4952
- if (artwork === void 0 && theme !== void 0 && typeof console !== "undefined") {
5009
+ setRun({ status: "LOADING" });
5010
+ const load = async () => readRun(
5011
+ isSeries ? await client.getSeriesInfo(subjectKey, abort.signal) : await client.getEventInfo(subjectKey, abort.signal),
5012
+ environment
5013
+ );
5014
+ load().then((loaded2) => {
5015
+ if (!abort.signal.aborted) setRun({ status: "LOADED", run: loaded2 });
5016
+ }).catch((cause) => {
5017
+ if (abort.signal.aborted) return;
5018
+ if (typeof console !== "undefined") {
4953
5019
  console.warn(
4954
- "[ScopeTicketsCheckout] no cart artwork resolved from this run\u2019s Theme. Expected a url in `Theme.Backgrounds[0]`. The Theme as it arrived:",
4955
- theme
5020
+ `[ScopeTicketsCheckout] could not load ${isSeries ? "series" : "event"} '${subjectKey}' from ${environment} (${ENVIRONMENT_URLS[environment].apiUrl}). If the key is right, check \`source.environment\` \u2014 it defaults to production.`,
5021
+ cause
4956
5022
  );
4957
5023
  }
4958
- return {
4959
- schedule: {
4960
- series: { events },
4961
- today,
4962
- nowTime: timeOfDayInZone(now, timeZone),
4963
- slotsByDay
4964
- },
4965
- userTypes: groupUserTypes(assignments),
4966
- userTypeNames: userTypeNames(assignments),
4967
- /*
4968
- * THE QUESTIONS RIDE ON THE TICKETS, so they arrive with the slots and cost no
4969
- * request of their own. `getQuestionnaireQuestions` wants a cart's event id, which
4970
- * does not exist yet at the step that has to know whether to ask.
4971
- */
4972
- questions: [...new Map(questions.map((q) => [q.QuestionId, q])).values()],
4973
- /*
4974
- * WHOSE EVENT IT IS. There is no follow endpoint and there does not need to be:
4975
- * the organisation is on every event, and it is who a buyer would want to hear
4976
- * from again.
4977
- *
4978
- * NOT THE VENUE, though the event names one. A venue hosts whatever is booked
4979
- * into it — following one subscribes a buyer to every unrelated thing that happens
4980
- * in a building, which is not what "stay up to date" offered them. The organiser
4981
- * is the party whose next event resembles this one.
4982
- */
4983
- follow: [
4984
- organisation === void 0 ? null : { key: organisation.Key, name: organisation.Name, kind: "Organiser" }
4985
- ].filter((entity) => entity !== null),
4986
- /*
4987
- * `Backgrounds[0]`, made absolute against the CDN, the run's before a night's — see
4988
- * `runArtwork`. The platform answers with site-root paths, so the origin is the
4989
- * whole of the work: without it every thumbnail points at the customer's own domain.
4990
- */
4991
- artwork,
4992
- eventKeyByDay,
4993
- hasTimeslots,
4994
- limits: ticketLimits(list),
4995
- ticketsError,
4996
- /* Most specific first — a product's own, then its event's, then the run's. */
4997
- currency: productCurrency ?? info.Events[0]?.Currency ?? info.Series?.Currency ?? void 0
4998
- };
5024
+ setRun({
5025
+ status: "ERROR",
5026
+ error: cause instanceof Error ? cause : new Error(String(cause))
5027
+ });
5028
+ });
5029
+ return () => abort.abort();
5030
+ }, [client, subjectKey, isSeries, enabled, environment]);
5031
+ const loaded = run.status === "LOADED" ? run.run : void 0;
5032
+ const wanted = (0, import_react9.useMemo)(() => {
5033
+ if (loaded === void 0) return null;
5034
+ if (day !== void 0 && day in loaded.eventKeyByDay) return day;
5035
+ return soonestRelevantDay({ events: loaded.events }, dayInZone(/* @__PURE__ */ new Date(), loaded.timeZone));
5036
+ }, [loaded, day]);
5037
+ (0, import_react9.useEffect)(() => {
5038
+ if (!enabled || client === null || loaded === void 0) return;
5039
+ const abort = new AbortController();
5040
+ const now = /* @__PURE__ */ new Date();
5041
+ const asked = {
5042
+ run: loaded,
5043
+ wanted,
5044
+ today: dayInZone(now, loaded.timeZone),
5045
+ nowTime: timeOfDayInZone(now, loaded.timeZone)
4999
5046
  };
5000
- load().then(({ ticketsError, ...loaded }) => {
5047
+ const eventKey = wanted === null ? void 0 : loaded.eventKeyByDay[wanted];
5048
+ if (eventKey === void 0) {
5049
+ setSessions({ status: "SETTLED", day: { ...asked, tickets: [], error: null } });
5050
+ return;
5051
+ }
5052
+ setSessions((was) => ({
5053
+ status: "LOADING",
5054
+ previous: was.status === "SETTLED" ? was.day : was.status === "LOADING" ? was.previous : void 0
5055
+ }));
5056
+ client.getTicketInformation(
5057
+ { events: [eventKey], includeTimeslots: true, includeQuestions: true },
5058
+ abort.signal
5059
+ ).then((tickets) => {
5001
5060
  if (abort.signal.aborted) return;
5002
- if (ticketsError !== null && typeof console !== "undefined") {
5003
- console.warn(
5004
- "[ScopeTicketsCheckout] could not load tickets for this day; sessions, questions and user types will be missing.",
5005
- ticketsError
5006
- );
5007
- }
5008
- setData({ ...loaded, loading: false, error: ticketsError });
5061
+ setSessions({ status: "SETTLED", day: { ...asked, tickets, error: null } });
5009
5062
  }).catch((cause) => {
5010
5063
  if (abort.signal.aborted) return;
5064
+ const error = cause instanceof Error ? cause : new Error(String(cause));
5011
5065
  if (typeof console !== "undefined") {
5012
5066
  console.warn(
5013
- `[ScopeTicketsCheckout] could not load ${isSeries ? "series" : "event"} '${subjectKey}' from ${environment} (${ENVIRONMENT_URLS[environment].apiUrl}). If the key is right, check \`source.environment\` \u2014 it defaults to production.`,
5014
- cause
5067
+ "[ScopeTicketsCheckout] could not load tickets for this day; sessions, questions and user types will be missing.",
5068
+ error
5015
5069
  );
5016
5070
  }
5017
- setData({
5018
- ...NOTHING,
5019
- error: cause instanceof Error ? cause : new Error(String(cause))
5020
- });
5071
+ setSessions({ status: "SETTLED", day: { ...asked, tickets: [], error } });
5021
5072
  });
5022
5073
  return () => abort.abort();
5023
- }, [client, subjectKey, isSeries, enabled, day, environment]);
5024
- return enabled ? data : NOTHING;
5074
+ }, [client, enabled, loaded, wanted]);
5075
+ return (0, import_react9.useMemo)(() => {
5076
+ if (!enabled) return NOTHING;
5077
+ switch (run.status) {
5078
+ case "IDLE":
5079
+ return NOTHING;
5080
+ case "LOADING":
5081
+ return { ...NOTHING, loading: true };
5082
+ case "ERROR":
5083
+ return { ...NOTHING, error: run.error };
5084
+ case "LOADED": {
5085
+ const shown = sessions.status === "SETTLED" ? sessions.day : sessions.status === "LOADING" ? sessions.previous : void 0;
5086
+ if (shown === void 0 || shown.run !== run.run) return { ...NOTHING, loading: true };
5087
+ return composed(shown, sessions.status === "LOADING");
5088
+ }
5089
+ default: {
5090
+ const exhaustive = run;
5091
+ return exhaustive;
5092
+ }
5093
+ }
5094
+ }, [enabled, run, sessions]);
5025
5095
  }
5026
5096
 
5027
5097
  // src/data/useAccountGateway.ts
@@ -6485,6 +6555,171 @@ function productForSession(tickets, session) {
6485
6555
  return sells.find((ticket) => ticket.Available) ?? sells[0];
6486
6556
  }
6487
6557
 
6558
+ // src/domain/questionnaire.ts
6559
+ var AGREED = "true";
6560
+ var NOT_AGREED = "false";
6561
+ function questionType(type) {
6562
+ switch (type.trim().toLowerCase()) {
6563
+ case "text":
6564
+ return "TEXT";
6565
+ case "boolean":
6566
+ return "AGREEMENT";
6567
+ case "integer":
6568
+ return "INTEGER";
6569
+ default:
6570
+ return null;
6571
+ }
6572
+ }
6573
+ function questionKind(question) {
6574
+ const type = questionType(question.Type);
6575
+ switch (type) {
6576
+ case "TEXT":
6577
+ return "TEXT";
6578
+ case "AGREEMENT":
6579
+ return "AGREEMENT";
6580
+ case "INTEGER":
6581
+ return "INTEGER";
6582
+ // Unknown types are asked as text rather than dropped.
6583
+ case null:
6584
+ return "TEXT";
6585
+ default: {
6586
+ const exhaustive = type;
6587
+ return exhaustive;
6588
+ }
6589
+ }
6590
+ }
6591
+ function questionAnswered(kind, value) {
6592
+ switch (kind) {
6593
+ case "TEXT":
6594
+ return (value ?? "").trim().length > 0;
6595
+ case "AGREEMENT":
6596
+ return value === AGREED;
6597
+ case "INTEGER":
6598
+ return wholeNumber(value) !== null;
6599
+ default: {
6600
+ const exhaustive = kind;
6601
+ return exhaustive;
6602
+ }
6603
+ }
6604
+ }
6605
+ function wholeNumber(value) {
6606
+ const text = (value ?? "").trim();
6607
+ if (!/^[+-]?\d{1,10}$/.test(text)) return null;
6608
+ const parsed = Number(text);
6609
+ return parsed >= -2147483648 && parsed <= 2147483647 ? text : null;
6610
+ }
6611
+ function questionsAnswered(questions, answers) {
6612
+ return questions.every(
6613
+ (question) => questionAnswered(questionKind(question), answers[String(question.QuestionId)])
6614
+ );
6615
+ }
6616
+ var MAX_ANSWER_LENGTH = 200;
6617
+ var QUESTION_KEY = /^\d{1,12}$/;
6618
+ function hostAnswers(raw) {
6619
+ if (raw === null || typeof raw !== "object") return {};
6620
+ const kept = {};
6621
+ for (const [key, value] of Object.entries(raw)) {
6622
+ if (!QUESTION_KEY.test(key) || typeof value !== "string") continue;
6623
+ const answer = value.trim();
6624
+ if (answer.length > MAX_ANSWER_LENGTH) continue;
6625
+ kept[key] = answer;
6626
+ }
6627
+ return kept;
6628
+ }
6629
+ function responsesFor(items, questions, answers) {
6630
+ const values = [];
6631
+ for (const question of questions) {
6632
+ const value = answers[String(question.QuestionId)];
6633
+ const kind = questionKind(question);
6634
+ switch (kind) {
6635
+ case "TEXT": {
6636
+ const text = (value ?? "").trim();
6637
+ if (text.length > 0 && text.length <= MAX_ANSWER_LENGTH) {
6638
+ values.push({ QuestionId: question.QuestionId, Value: text });
6639
+ }
6640
+ break;
6641
+ }
6642
+ case "AGREEMENT":
6643
+ if (value === AGREED || value === NOT_AGREED) {
6644
+ values.push({ QuestionId: question.QuestionId, Value: value });
6645
+ }
6646
+ break;
6647
+ case "INTEGER": {
6648
+ const number = wholeNumber(value);
6649
+ if (number !== null) values.push({ QuestionId: question.QuestionId, Value: number });
6650
+ break;
6651
+ }
6652
+ default: {
6653
+ const exhaustive = kind;
6654
+ return exhaustive;
6655
+ }
6656
+ }
6657
+ }
6658
+ if (values.length === 0) return [];
6659
+ return items.map((item) => ({
6660
+ ItemKey: item.Key,
6661
+ Values: values.map((entry) => ({ ...entry }))
6662
+ }));
6663
+ }
6664
+ function answersLocked(save) {
6665
+ switch (save.status) {
6666
+ case "IDLE":
6667
+ return false;
6668
+ case "SAVING":
6669
+ case "SAVED":
6670
+ return true;
6671
+ case "FAILED":
6672
+ return save.partly;
6673
+ default: {
6674
+ const exhaustive = save;
6675
+ return exhaustive;
6676
+ }
6677
+ }
6678
+ }
6679
+ var MAX_QUESTION_TEXT = 1e3;
6680
+ var MAX_QUESTION_TYPE = 40;
6681
+ function guardQuestions(raw) {
6682
+ if (!Array.isArray(raw)) return [];
6683
+ return raw.flatMap((entry) => {
6684
+ if (entry === null || typeof entry !== "object") return [];
6685
+ const { QuestionId, Question, Type } = entry;
6686
+ if (typeof QuestionId !== "number" || !Number.isSafeInteger(QuestionId)) return [];
6687
+ if (typeof Question !== "string" || Question.trim() === "") return [];
6688
+ if (Question.length > MAX_QUESTION_TEXT) return [];
6689
+ if (typeof Type !== "string" || Type.length > MAX_QUESTION_TYPE) return [];
6690
+ return [{ QuestionId, Question, Type }];
6691
+ });
6692
+ }
6693
+ function mergeQuestions(eventQuestions, ticketQuestions) {
6694
+ const seen = /* @__PURE__ */ new Set();
6695
+ const merged = [];
6696
+ for (const question of [...eventQuestions, ...ticketQuestions]) {
6697
+ if (seen.has(question.QuestionId)) continue;
6698
+ seen.add(question.QuestionId);
6699
+ merged.push(question);
6700
+ }
6701
+ return merged;
6702
+ }
6703
+ function questionsInHand(ticketQuestions, load, hasCart) {
6704
+ if (!hasCart) return { status: "READY", questions: guardQuestions(ticketQuestions) };
6705
+ switch (load.status) {
6706
+ case "IDLE":
6707
+ case "LOADING":
6708
+ return { status: "PENDING" };
6709
+ case "LOADED":
6710
+ return {
6711
+ status: "READY",
6712
+ questions: mergeQuestions(load.questions, guardQuestions(ticketQuestions))
6713
+ };
6714
+ case "FAILED":
6715
+ return { status: "FAILED" };
6716
+ default: {
6717
+ const exhaustive = load;
6718
+ return exhaustive;
6719
+ }
6720
+ }
6721
+ }
6722
+
6488
6723
  // src/domain/promo.ts
6489
6724
  function promoSaved(cart, currency) {
6490
6725
  if (currency === void 0) return null;
@@ -6512,8 +6747,23 @@ var IDLE = {
6512
6747
  items: [],
6513
6748
  currency: void 0,
6514
6749
  productName: void 0,
6515
- payment: void 0
6750
+ payment: void 0,
6751
+ answers: { status: "IDLE" },
6752
+ eventQuestions: { status: "IDLE" }
6516
6753
  };
6754
+ async function eventQuestionsFor(client, cart) {
6755
+ if (client === null) return { status: "IDLE" };
6756
+ if (typeof cart.EventId !== "number")
6757
+ return { status: "FAILED", reason: "The cart names no event" };
6758
+ try {
6759
+ return {
6760
+ status: "LOADED",
6761
+ questions: guardQuestions(await client.getQuestionnaireQuestions(cart.EventId))
6762
+ };
6763
+ } catch (cause) {
6764
+ return { status: "FAILED", reason: cause instanceof Error ? cause.message : String(cause) };
6765
+ }
6766
+ }
6517
6767
  var POLL_MS = 2e3;
6518
6768
  function toQuote(cart, currency) {
6519
6769
  if (currency === void 0) return void 0;
@@ -6596,7 +6846,7 @@ function useCheckoutOrder(client, request, currency, open, adopt, userTypeNames2
6596
6846
  const cart = withExpiry(await client.createCart(mark), opening);
6597
6847
  held.current = opening;
6598
6848
  asking = `reading the tickets on '${mark}'`;
6599
- const tickets = await client.getEventTickets(mark);
6849
+ const tickets = await client.getTicketInformation({ events: [mark], includeTimeslots: true });
6600
6850
  const asked = safeParse(timeslot, null) ?? void 0;
6601
6851
  const session = sessionFor(tickets, asked);
6602
6852
  const product = productForSession(tickets, session);
@@ -6646,9 +6896,18 @@ function useCheckoutOrder(client, request, currency, open, adopt, userTypeNames2
6646
6896
  productName: product.Name
6647
6897
  };
6648
6898
  };
6649
- load().then(({ cart, items, fill, currency: filled2, productName }) => {
6899
+ load().then(async ({ cart, items, fill, currency: filled2, productName }) => {
6900
+ const eventQuestions = await eventQuestionsFor(client, cart);
6650
6901
  if (!live) return;
6651
- setState((was) => ({ ...was, cart, items, fill, currency: filled2, productName }));
6902
+ setState((was) => ({
6903
+ ...was,
6904
+ cart,
6905
+ items,
6906
+ fill,
6907
+ currency: filled2,
6908
+ productName,
6909
+ eventQuestions
6910
+ }));
6652
6911
  }).catch((cause) => {
6653
6912
  if (!live) return;
6654
6913
  opened.current = null;
@@ -6721,6 +6980,44 @@ function useCheckoutOrder(client, request, currency, open, adopt, userTypeNames2
6721
6980
  },
6722
6981
  [client, state.cart?.Key]
6723
6982
  );
6983
+ const savedAnswers = (0, import_react21.useRef)(null);
6984
+ const saveAnswers = (0, import_react21.useCallback)(
6985
+ async (questions, answers) => {
6986
+ const cartKey = state.cart?.Key;
6987
+ if (client === null || cartKey === void 0) return false;
6988
+ const was = savedAnswers.current;
6989
+ const landed = was !== null && was.cartKey === cartKey && was.items.size > 0 ? was : null;
6990
+ const requests = landed === null ? responsesFor(state.items, questions, answers) : state.items.map((item) => ({
6991
+ ItemKey: item.Key,
6992
+ Values: landed.values.map((value) => ({ ...value }))
6993
+ }));
6994
+ if (requests.length === 0) return true;
6995
+ const saved = landed?.items ?? /* @__PURE__ */ new Set();
6996
+ savedAnswers.current = { cartKey, values: requests[0]?.Values ?? [], items: saved };
6997
+ const unsent = requests.filter((request2) => !saved.has(request2.ItemKey));
6998
+ if (unsent.length === 0) return true;
6999
+ setState((held2) => ({ ...held2, answers: { status: "SAVING" } }));
7000
+ for (const request2 of unsent) {
7001
+ try {
7002
+ await client.submitQuestionnaireResponses(cartKey, request2);
7003
+ saved.add(request2.ItemKey);
7004
+ } catch (cause) {
7005
+ setState((held2) => ({
7006
+ ...held2,
7007
+ answers: {
7008
+ status: "FAILED",
7009
+ reason: cause instanceof Error ? cause.message : String(cause),
7010
+ partly: saved.size > 0
7011
+ }
7012
+ }));
7013
+ return false;
7014
+ }
7015
+ }
7016
+ setState((held2) => ({ ...held2, answers: { status: "SAVED" } }));
7017
+ return true;
7018
+ },
7019
+ [client, state.cart?.Key, state.items]
7020
+ );
6724
7021
  const [promo, setPromo] = (0, import_react21.useState)({ status: "IDLE" });
6725
7022
  const writePromo = (0, import_react21.useCallback)(
6726
7023
  async (write) => {
@@ -6802,6 +7099,14 @@ function useCheckoutOrder(client, request, currency, open, adopt, userTypeNames2
6802
7099
  setWatching(false);
6803
7100
  setState((was) => was.payment === void 0 ? was : { ...was, payment: void 0 });
6804
7101
  }, []);
7102
+ const retryEventQuestions = (0, import_react21.useCallback)(() => {
7103
+ const cart = state.cart;
7104
+ if (cart === null) return;
7105
+ setState((was) => ({ ...was, eventQuestions: { status: "LOADING" } }));
7106
+ void eventQuestionsFor(client, cart).then(
7107
+ (eventQuestions) => setState((was) => was.cart?.Key === cart.Key ? { ...was, eventQuestions } : was)
7108
+ );
7109
+ }, [client, state.cart]);
6805
7110
  const restart = (0, import_react21.useCallback)(() => {
6806
7111
  opened.current = null;
6807
7112
  held.current = null;
@@ -6819,6 +7124,7 @@ function useCheckoutOrder(client, request, currency, open, adopt, userTypeNames2
6819
7124
  quote: state.cart === null ? void 0 : toQuote(state.cart, filled ?? currency),
6820
7125
  hold: state.cart === null ? void 0 : toHold(state.cart, Date.now(), held.current),
6821
7126
  saveBuyer,
7127
+ saveAnswers,
6822
7128
  promo,
6823
7129
  applyPromo,
6824
7130
  removePromo,
@@ -6827,7 +7133,8 @@ function useCheckoutOrder(client, request, currency, open, adopt, userTypeNames2
6827
7133
  paidWithoutFinalizing,
6828
7134
  retryPayment,
6829
7135
  chargeAttempted,
6830
- restart
7136
+ restart,
7137
+ retryEventQuestions
6831
7138
  };
6832
7139
  }
6833
7140
 
@@ -7045,6 +7352,7 @@ function TextField({
7045
7352
  placeholder,
7046
7353
  maxLength,
7047
7354
  autoFocus = false,
7355
+ readOnly = false,
7048
7356
  id,
7049
7357
  name
7050
7358
  }) {
@@ -7093,6 +7401,7 @@ function TextField({
7093
7401
  value,
7094
7402
  placeholder,
7095
7403
  maxLength,
7404
+ readOnly,
7096
7405
  onChange: (event) => {
7097
7406
  const typed = event.target.value;
7098
7407
  const before = typed.slice(0, event.target.selectionStart ?? typed.length);
@@ -7138,6 +7447,26 @@ function TextField({
7138
7447
  );
7139
7448
  }
7140
7449
 
7450
+ // src/island/Switch.tsx
7451
+ var import_jsx_runtime21 = require("react/jsx-runtime");
7452
+ function Switch({ checked, onChange, label, size: size2 = "wide", disabled = false }) {
7453
+ const press = useIslandPress("element");
7454
+ return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
7455
+ "button",
7456
+ {
7457
+ type: "button",
7458
+ role: "switch",
7459
+ "aria-checked": checked,
7460
+ "aria-label": label,
7461
+ disabled,
7462
+ className: `scopetickets-island-switch scopetickets-island-switch--${size2}`,
7463
+ onClick: () => onChange(!checked),
7464
+ ...disabled ? {} : press,
7465
+ children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("span", { className: "scopetickets-island-switch__thumb", "aria-hidden": "true" })
7466
+ }
7467
+ );
7468
+ }
7469
+
7141
7470
  // src/island/ContactSteps.tsx
7142
7471
  var import_react23 = require("react");
7143
7472
 
@@ -7306,7 +7635,7 @@ function counterRingPaths(progress, direction = "cw") {
7306
7635
  }
7307
7636
 
7308
7637
  // src/island/CounterRing.tsx
7309
- var import_jsx_runtime21 = require("react/jsx-runtime");
7638
+ var import_jsx_runtime22 = require("react/jsx-runtime");
7310
7639
  var LAYER = { position: "absolute", inset: 0 };
7311
7640
  var DEFAULT_FILL = "var(--scopetickets-island-counter-ring-fill)";
7312
7641
  var DEFAULT_TRACK = "var(--scopetickets-island-counter-ring-track)";
@@ -7321,22 +7650,22 @@ function CounterRing({
7321
7650
  track = true
7322
7651
  }) {
7323
7652
  if (complete !== void 0) {
7324
- return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
7653
+ return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
7325
7654
  "span",
7326
7655
  {
7327
7656
  className: "scopetickets-island-counter-ring",
7328
7657
  style: { width: size2, height: size2, flex: "none" },
7329
- children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(ContentFlag, { tone: complete, title })
7658
+ children: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(ContentFlag, { tone: complete, title })
7330
7659
  }
7331
7660
  );
7332
7661
  }
7333
- return /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(
7662
+ return /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(
7334
7663
  "span",
7335
7664
  {
7336
7665
  className: "scopetickets-island-counter-ring",
7337
7666
  style: { position: "relative", display: "block", width: size2, height: size2, flex: "none" },
7338
7667
  children: [
7339
- track ? /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("span", { style: LAYER, children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
7668
+ track ? /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("span", { style: LAYER, children: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
7340
7669
  import_icons8.IconGlyph,
7341
7670
  {
7342
7671
  glyph: "StepCompletionProgressRingTrack",
@@ -7345,7 +7674,7 @@ function CounterRing({
7345
7674
  fill: true
7346
7675
  }
7347
7676
  ) }) : null,
7348
- /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("span", { style: LAYER, children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
7677
+ /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("span", { style: LAYER, children: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
7349
7678
  import_icons8.IconGlyph,
7350
7679
  {
7351
7680
  glyph: "StepCompletionProgressRing",
@@ -7361,7 +7690,7 @@ function CounterRing({
7361
7690
  }
7362
7691
 
7363
7692
  // src/island/ContactSteps.tsx
7364
- var import_jsx_runtime22 = require("react/jsx-runtime");
7693
+ var import_jsx_runtime23 = require("react/jsx-runtime");
7365
7694
  function useReportAnswered(answered, onAnsweredChange) {
7366
7695
  (0, import_react23.useEffect)(() => {
7367
7696
  onAnsweredChange?.(answered);
@@ -7370,10 +7699,10 @@ function useReportAnswered(answered, onAnsweredChange) {
7370
7699
  function ringFor(counter) {
7371
7700
  if (counter.kind === "EMPTY") return void 0;
7372
7701
  const props = counter.kind === "COMPLETE" ? { progress: 1, complete: counter.flag } : { progress: counter.progress };
7373
- return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(CounterRing, { ...props, size: 16 });
7702
+ return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(CounterRing, { ...props, size: 16 });
7374
7703
  }
7375
7704
  function StepForm({ children }) {
7376
- return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("form", { className: "scopetickets-island-card__fields", onSubmit: (event) => event.preventDefault(), children });
7705
+ return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("form", { className: "scopetickets-island-card__fields", onSubmit: (event) => event.preventDefault(), children });
7377
7706
  }
7378
7707
  function NameStep({
7379
7708
  value,
@@ -7385,8 +7714,8 @@ function NameStep({
7385
7714
  const { firstName, lastName } = current;
7386
7715
  const accept = (next) => onChange ? onChange(next) : setInternal(next);
7387
7716
  useReportAnswered(isCompleteName(firstName, lastName), onAnsweredChange);
7388
- return /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(StepForm, { children: [
7389
- /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
7717
+ return /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(StepForm, { children: [
7718
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
7390
7719
  TextField,
7391
7720
  {
7392
7721
  id: "contact-given-name",
@@ -7402,7 +7731,7 @@ function NameStep({
7402
7731
  onSubmit: () => document.getElementById("contact-family-name")?.focus()
7403
7732
  }
7404
7733
  ),
7405
- /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
7734
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
7406
7735
  TextField,
7407
7736
  {
7408
7737
  id: "contact-family-name",
@@ -7427,7 +7756,7 @@ function EmailStep({
7427
7756
  const email = value ?? internal;
7428
7757
  const accept = (next) => onChange ? onChange(next) : setInternal(next);
7429
7758
  useReportAnswered(isValidEmail(email), onAnsweredChange);
7430
- return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(StepForm, { children: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
7759
+ return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(StepForm, { children: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
7431
7760
  TextField,
7432
7761
  {
7433
7762
  id: "contact-email",
@@ -7467,8 +7796,8 @@ function PhoneStep({
7467
7796
  if (onChange) onChange(next);
7468
7797
  else setInternal(next);
7469
7798
  };
7470
- return /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(StepForm, { children: [
7471
- /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
7799
+ return /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(StepForm, { children: [
7800
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
7472
7801
  TextField,
7473
7802
  {
7474
7803
  id: "phone-country-code",
@@ -7483,7 +7812,7 @@ function PhoneStep({
7483
7812
  note: country?.name
7484
7813
  }
7485
7814
  ),
7486
- /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
7815
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
7487
7816
  TextField,
7488
7817
  {
7489
7818
  id: "phone-national",
@@ -7516,8 +7845,8 @@ function PasswordStep({
7516
7845
  onPasswordChange?.(submittable ? password : "");
7517
7846
  }, [submittable, password, onPasswordChange]);
7518
7847
  const type = revealed ? "text" : "password";
7519
- return /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(StepForm, { children: [
7520
- accountEmail === void 0 ? null : /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
7848
+ return /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(StepForm, { children: [
7849
+ accountEmail === void 0 ? null : /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
7521
7850
  "input",
7522
7851
  {
7523
7852
  type: "text",
@@ -7530,7 +7859,7 @@ function PasswordStep({
7530
7859
  className: "scopetickets-island-offscreen"
7531
7860
  }
7532
7861
  ),
7533
- /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
7862
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
7534
7863
  TextField,
7535
7864
  {
7536
7865
  id: "new-password",
@@ -7550,7 +7879,7 @@ function PasswordStep({
7550
7879
  trailing: ringFor(enterPasswordCounter(password))
7551
7880
  }
7552
7881
  ),
7553
- /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
7882
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
7554
7883
  TextField,
7555
7884
  {
7556
7885
  id: "confirm-password",
@@ -7577,7 +7906,7 @@ function ConfirmEmailStep({
7577
7906
  const [typed, setTyped] = (0, import_react23.useState)(initialEmail);
7578
7907
  const email = typed.trim() === "" ? initialEmail : typed;
7579
7908
  useReportAnswered(isValidEmail(email), onAnsweredChange);
7580
- return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(StepForm, { children: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
7909
+ return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(StepForm, { children: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
7581
7910
  TextField,
7582
7911
  {
7583
7912
  id: "account-email",
@@ -7604,7 +7933,7 @@ function ConfirmEmailStep({
7604
7933
 
7605
7934
  // src/island/PasscodeField.tsx
7606
7935
  var import_react24 = require("react");
7607
- var import_jsx_runtime23 = require("react/jsx-runtime");
7936
+ var import_jsx_runtime24 = require("react/jsx-runtime");
7608
7937
  function PasscodeField({
7609
7938
  value,
7610
7939
  onChange,
@@ -7636,8 +7965,8 @@ function PasscodeField({
7636
7965
  event.preventDefault();
7637
7966
  onComplete?.();
7638
7967
  };
7639
- return /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("div", { className: "scopetickets-island-passcode", children: [
7640
- /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
7968
+ return /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)("div", { className: "scopetickets-island-passcode", children: [
7969
+ /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
7641
7970
  "input",
7642
7971
  {
7643
7972
  ref: inputRef,
@@ -7657,7 +7986,7 @@ function PasscodeField({
7657
7986
  "aria-describedby": message === void 0 ? void 0 : messageId
7658
7987
  }
7659
7988
  ),
7660
- /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("div", { className: "scopetickets-island-passcode__boxes", "aria-hidden": "true", children: Array.from({ length: PASSCODE_LENGTH }, (_, index) => /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
7989
+ /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("div", { className: "scopetickets-island-passcode__boxes", "aria-hidden": "true", children: Array.from({ length: PASSCODE_LENGTH }, (_, index) => /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
7661
7990
  "span",
7662
7991
  {
7663
7992
  className: "scopetickets-island-passcode__box",
@@ -7668,7 +7997,7 @@ function PasscodeField({
7668
7997
  },
7669
7998
  index
7670
7999
  )) }),
7671
- message === void 0 ? null : /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("p", { id: messageId, role: "status", className: "scopetickets-island-passcode__message", children: message })
8000
+ message === void 0 ? null : /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("p", { id: messageId, role: "status", className: "scopetickets-island-passcode__message", children: message })
7672
8001
  ] });
7673
8002
  }
7674
8003
  var VERIFY_EMAIL_COPY = {
@@ -7695,7 +8024,7 @@ function VerifyEmailStep({
7695
8024
  setCode("");
7696
8025
  setRefused(true);
7697
8026
  }, [invalid]);
7698
- return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("div", { className: "scopetickets-island-card__fields", children: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
8027
+ return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("div", { className: "scopetickets-island-card__fields", children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
7699
8028
  PasscodeField,
7700
8029
  {
7701
8030
  autoFocus: true,
@@ -7716,7 +8045,7 @@ function VerifyEmailStep({
7716
8045
  var import_icons10 = require("@scopetickets/icons");
7717
8046
 
7718
8047
  // src/island/brand-marks.tsx
7719
- var import_jsx_runtime24 = require("react/jsx-runtime");
8048
+ var import_jsx_runtime25 = require("react/jsx-runtime");
7720
8049
  function BrandMark({
7721
8050
  mark,
7722
8051
  artwork,
@@ -7731,7 +8060,7 @@ function BrandMark({
7731
8060
  const a11y = title ? { role: "img", "aria-label": title } : { "aria-hidden": true, focusable: false };
7732
8061
  const drawn = height ?? artwork.height;
7733
8062
  const box = fill ? { width: "100%", height: "100%" } : { height: drawn, width: drawn * artwork.width / artwork.height, maxWidth: "100%" };
7734
- return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
8063
+ return /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
7735
8064
  "svg",
7736
8065
  {
7737
8066
  ...a11y,
@@ -7745,7 +8074,7 @@ function BrandMark({
7745
8074
  ...box,
7746
8075
  ...style
7747
8076
  },
7748
- children: paths.map((path, i) => /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
8077
+ children: paths.map((path, i) => /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
7749
8078
  "path",
7750
8079
  {
7751
8080
  d: path.d,
@@ -7786,7 +8115,7 @@ var SCOPE_TICKETS_WORDMARK_PATHS = [
7786
8115
  }
7787
8116
  ];
7788
8117
  function ScopeTicketsWordmarkMark(props) {
7789
- return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
8118
+ return /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
7790
8119
  BrandMark,
7791
8120
  {
7792
8121
  ...props,
@@ -7875,6 +8204,21 @@ var NOTICES = {
7875
8204
  */
7876
8205
  actions: [secondary("CLOSE", "Close")]
7877
8206
  },
8207
+ QUESTIONS_NOT_LOADED: {
8208
+ id: "QUESTIONS_NOT_LOADED",
8209
+ severity: "FAILURE",
8210
+ title: "We Could Not Load the Questions",
8211
+ subtitle: "This event asks a few questions before checkout, and they did not reach us just now.",
8212
+ actions: [confirm("RETRY", "Try Again"), secondary("CLOSE", "Close")]
8213
+ },
8214
+ ANSWERS_NOT_SAVED: {
8215
+ id: "ANSWERS_NOT_SAVED",
8216
+ severity: "FAILURE",
8217
+ title: "We Could Not Save Your Answers",
8218
+ // Every path to a charge saves the answers first, so nothing has been charged.
8219
+ subtitle: "Your answers did not reach us just now. Nothing has been charged.",
8220
+ actions: [confirm("RETRY", "Try Again"), secondary("CLOSE", "Close")]
8221
+ },
7878
8222
  /*
7879
8223
  * THE COUNTERPART OF THE CHARGE PROMISE, and the reason both of these say it. Before a
7880
8224
  * payment the reassurance a buyer needs is that no money moved; after one it is the
@@ -8041,6 +8385,12 @@ function raiseForSignIn(signIn2, funnel) {
8041
8385
  function raiseForFeedback(submission) {
8042
8386
  return submission.status === "FAILED" ? NOTICES.FEEDBACK_NOT_SENT : null;
8043
8387
  }
8388
+ function raiseForQuestions(load) {
8389
+ return load.status === "FAILED" ? NOTICES.QUESTIONS_NOT_LOADED : null;
8390
+ }
8391
+ function raiseForAnswers(answers) {
8392
+ return answers.status === "FAILED" ? NOTICES.ANSWERS_NOT_SAVED : null;
8393
+ }
8044
8394
  function noticeTelemetry(severity) {
8045
8395
  return severity === "WARNING" ? "BREADCRUMB" : "EXCEPTION";
8046
8396
  }
@@ -8049,7 +8399,7 @@ function noticeLeadRole(severity) {
8049
8399
  }
8050
8400
 
8051
8401
  // src/island/CredentialFields.tsx
8052
- var import_jsx_runtime25 = require("react/jsx-runtime");
8402
+ var import_jsx_runtime26 = require("react/jsx-runtime");
8053
8403
  function CredentialFields({
8054
8404
  email,
8055
8405
  password,
@@ -8058,7 +8408,7 @@ function CredentialFields({
8058
8408
  passwordVisible,
8059
8409
  onSubmit
8060
8410
  }) {
8061
- return /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(
8411
+ return /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(
8062
8412
  "form",
8063
8413
  {
8064
8414
  className: "scopetickets-island-credentials",
@@ -8066,7 +8416,7 @@ function CredentialFields({
8066
8416
  onSubmit: (event) => event.preventDefault(),
8067
8417
  "data-revealed": passwordVisible ? "" : void 0,
8068
8418
  children: [
8069
- /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
8419
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
8070
8420
  TextField,
8071
8421
  {
8072
8422
  id: "signin-email",
@@ -8082,7 +8432,7 @@ function CredentialFields({
8082
8432
  onSubmit: () => document.getElementById("signin-password")?.focus()
8083
8433
  }
8084
8434
  ),
8085
- /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("div", { className: "scopetickets-island-credentials__password", children: /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
8435
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("div", { className: "scopetickets-island-credentials__password", children: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
8086
8436
  TextField,
8087
8437
  {
8088
8438
  id: "signin-password",
@@ -8107,9 +8457,9 @@ function CredentialFields({
8107
8457
  var import_status = require("@scopetickets/icons/status");
8108
8458
 
8109
8459
  // src/island/RadioDot.tsx
8110
- var import_jsx_runtime26 = require("react/jsx-runtime");
8460
+ var import_jsx_runtime27 = require("react/jsx-runtime");
8111
8461
  function RadioDot({ selected }) {
8112
- return /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
8462
+ return /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
8113
8463
  "span",
8114
8464
  {
8115
8465
  className: "scopetickets-island-radio",
@@ -8120,14 +8470,14 @@ function RadioDot({ selected }) {
8120
8470
  }
8121
8471
 
8122
8472
  // src/island/PaymentMethods.tsx
8123
- var import_jsx_runtime27 = require("react/jsx-runtime");
8473
+ var import_jsx_runtime28 = require("react/jsx-runtime");
8124
8474
  function PaymentRow({
8125
8475
  method,
8126
8476
  selected,
8127
8477
  onSelect
8128
8478
  }) {
8129
8479
  const press = useIslandPress("element");
8130
- return /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(
8480
+ return /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(
8131
8481
  "button",
8132
8482
  {
8133
8483
  type: "button",
@@ -8138,15 +8488,15 @@ function PaymentRow({
8138
8488
  onClick: onSelect,
8139
8489
  ...press,
8140
8490
  children: [
8141
- method.icon === void 0 ? /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(RadioDot, { selected }) : /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("span", { className: "scopetickets-island-pay__mark", "aria-hidden": "true", children: method.icon }),
8142
- /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)("span", { className: "scopetickets-island-pay__content", children: [
8143
- method.mark ?? /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("span", { className: "scopetickets-island-pay__label", children: method.label }),
8144
- method.detail === void 0 ? null : /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("span", { className: "scopetickets-island-pay__detail", children: method.detail }),
8145
- method.perk === void 0 ? null : /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("span", { className: "scopetickets-island-pay__perk", children: method.perk }),
8491
+ method.icon === void 0 ? /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(RadioDot, { selected }) : /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("span", { className: "scopetickets-island-pay__mark", "aria-hidden": "true", children: method.icon }),
8492
+ /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("span", { className: "scopetickets-island-pay__content", children: [
8493
+ method.mark ?? /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("span", { className: "scopetickets-island-pay__label", children: method.label }),
8494
+ method.detail === void 0 ? null : /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("span", { className: "scopetickets-island-pay__detail", children: method.detail }),
8495
+ method.perk === void 0 ? null : /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("span", { className: "scopetickets-island-pay__perk", children: method.perk }),
8146
8496
  method.note === void 0 ? null : (
8147
8497
  /* THE PERK'S SLOT, because the note is the same trailing text at the same
8148
8498
  * weight — the difference is only why it is there. */
8149
- /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("span", { className: "scopetickets-island-pay__perk", children: method.note })
8499
+ /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("span", { className: "scopetickets-island-pay__perk", children: method.note })
8150
8500
  )
8151
8501
  ] })
8152
8502
  ]
@@ -8161,7 +8511,7 @@ function PaymentMethods({ methods, selectedKey, onSelect, label }) {
8161
8511
  0,
8162
8512
  methods.findIndex((method) => method.key === selectedKey)
8163
8513
  );
8164
- return /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(
8514
+ return /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(
8165
8515
  "div",
8166
8516
  {
8167
8517
  className: "scopetickets-island-pay",
@@ -8169,8 +8519,8 @@ function PaymentMethods({ methods, selectedKey, onSelect, label }) {
8169
8519
  "aria-label": label,
8170
8520
  style: { "--scopetickets-island-pay-index": selectedIndex },
8171
8521
  children: [
8172
- /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("span", { className: "scopetickets-island-pay__highlight", "aria-hidden": "true" }),
8173
- methods.map((method) => /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
8522
+ /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("span", { className: "scopetickets-island-pay__highlight", "aria-hidden": "true" }),
8523
+ methods.map((method) => /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
8174
8524
  PaymentRow,
8175
8525
  {
8176
8526
  method,
@@ -8211,7 +8561,7 @@ function formatHold(hold) {
8211
8561
 
8212
8562
  // src/island/CountdownTimer.tsx
8213
8563
  var import_icons9 = require("@scopetickets/icons");
8214
- var import_jsx_runtime28 = require("react/jsx-runtime");
8564
+ var import_jsx_runtime29 = require("react/jsx-runtime");
8215
8565
  var LAYER2 = { position: "absolute", inset: 0 };
8216
8566
  var TRACK_FILL = "var(--scopetickets-island-timer-track, rgba(230, 230, 230, 0.05))";
8217
8567
  function CountdownTimer({
@@ -8224,7 +8574,7 @@ function CountdownTimer({
8224
8574
  className,
8225
8575
  style
8226
8576
  }) {
8227
- return /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(
8577
+ return /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(
8228
8578
  "span",
8229
8579
  {
8230
8580
  className,
@@ -8237,7 +8587,7 @@ function CountdownTimer({
8237
8587
  ...style
8238
8588
  },
8239
8589
  children: [
8240
- track ? /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("span", { style: LAYER2, children: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
8590
+ track ? /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("span", { style: LAYER2, children: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
8241
8591
  import_icons9.IconGlyph,
8242
8592
  {
8243
8593
  glyph: "TimerTrack",
@@ -8246,7 +8596,7 @@ function CountdownTimer({
8246
8596
  fill: true
8247
8597
  }
8248
8598
  ) }) : null,
8249
- /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("span", { style: LAYER2, children: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
8599
+ /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("span", { style: LAYER2, children: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
8250
8600
  import_icons9.IconGlyph,
8251
8601
  {
8252
8602
  glyph: "Timer",
@@ -8264,7 +8614,7 @@ function CountdownTimer({
8264
8614
  }
8265
8615
 
8266
8616
  // src/island/step-cards.tsx
8267
- var import_jsx_runtime29 = require("react/jsx-runtime");
8617
+ var import_jsx_runtime30 = require("react/jsx-runtime");
8268
8618
  var STEP_BADGES = {
8269
8619
  /* More Information's ASTERISK — the design. */
8270
8620
  /*
@@ -8275,7 +8625,7 @@ var STEP_BADGES = {
8275
8625
  * ROUND, not square — the two question badges and the passkey sit in a square notch;
8276
8626
  * this one and Create Account's plus do not.
8277
8627
  */
8278
- DETAILS: { shape: "circle", content: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(import_icons10.AsteriskIcon, { fill: true, spin: true, appearance: "metal" }) },
8628
+ DETAILS: { shape: "circle", content: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(import_icons10.AsteriskIcon, { fill: true, spin: true, appearance: "metal" }) },
8279
8629
  /*
8280
8630
  * Metal is an SVG FILTER whose canvas is 28x28 for a 20x20 glyph, and it normally hangs
8281
8631
  * outside the layout box. A SQUARE badge slot CLIPS — by design; a badge clipped to a
@@ -8287,31 +8637,31 @@ var STEP_BADGES = {
8287
8637
  */
8288
8638
  NAME: {
8289
8639
  shape: "square",
8290
- content: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(import_icons10.TextCursorWithRectangleIcon, { fill: true, appearance: "metal" })
8640
+ content: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(import_icons10.TextCursorWithRectangleIcon, { fill: true, appearance: "metal" })
8291
8641
  },
8292
8642
  EMAIL: {
8293
8643
  shape: "square",
8294
- content: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(import_icons10.PaperPlaneToTopLeftIcon, { fill: true, appearance: "metal" })
8644
+ content: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(import_icons10.PaperPlaneToTopLeftIcon, { fill: true, appearance: "metal" })
8295
8645
  },
8296
8646
  PASSWORD: {
8297
8647
  shape: "square",
8298
- content: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(import_icons10.TextCursorWithRedactedTextIcon, { fill: true, appearance: "metal" })
8648
+ content: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(import_icons10.TextCursorWithRedactedTextIcon, { fill: true, appearance: "metal" })
8299
8649
  },
8300
8650
  /* the design — a handset, in the square notch like the other questions. */
8301
- PHONE: { shape: "square", content: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(import_icons10.PhoneToRightIcon, { fill: true, appearance: "metal" }) },
8651
+ PHONE: { shape: "square", content: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(import_icons10.PhoneToRightIcon, { fill: true, appearance: "metal" }) },
8302
8652
  /*
8303
8653
  * A CAMERA OVER THE FACE BEING CHOSEN — the design, in the square notch. The badge says
8304
8654
  * what the hero beneath it is FOR on this card: the avatar is not reporting who is
8305
8655
  * signed in, it is wearing what has just been picked.
8306
8656
  */
8307
- PROFILE_PHOTO: { shape: "square", content: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(import_icons10.CameraIcon, { fill: true, appearance: "metal" }) },
8308
- FOLLOW: { shape: "square", content: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(import_icons10.BellIcon, { fill: true, appearance: "metal" }) },
8657
+ PROFILE_PHOTO: { shape: "square", content: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(import_icons10.CameraIcon, { fill: true, appearance: "metal" }) },
8658
+ FOLLOW: { shape: "square", content: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(import_icons10.BellIcon, { fill: true, appearance: "metal" }) },
8309
8659
  /*
8310
8660
  * A HEART IN A CALLOUT — the design's badge on this card, in the square notch the other
8311
8661
  * marks here sit in. It says what the hero underneath is for: the avatar is not
8312
8662
  * reporting who is signed in, it is being asked a question.
8313
8663
  */
8314
- FEEDBACK: { shape: "square", content: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(import_icons10.CalloutWithHeartIcon, { fill: true, appearance: "metal" }) },
8664
+ FEEDBACK: { shape: "square", content: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(import_icons10.CalloutWithHeartIcon, { fill: true, appearance: "metal" }) },
8315
8665
  /*
8316
8666
  * NO `CREATE_ACCOUNT` ENTRY, AND THAT IS THE POINT. Its badge is on its CARD —
8317
8667
  * `AUTH_CARDS.ADD_TO_ACCOUNT`, which is the authority for everything the design draws —
@@ -8325,7 +8675,7 @@ var STEP_BADGES = {
8325
8675
  * metal glyph. The glyph is drawn; the blue field is not, because no token in the
8326
8676
  * export we have says what that fill is. Raised in.
8327
8677
  */
8328
- PAYMENT: { shape: "square", content: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(import_icons10.PaymentCardIcon, { fill: true, appearance: "metal" }) },
8678
+ PAYMENT: { shape: "square", content: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(import_icons10.PaymentCardIcon, { fill: true, appearance: "metal" }) },
8329
8679
  /*
8330
8680
  * ROUND, like Details and Create Account's plus — the sticker is a mark rather than a
8331
8681
  * picture, and the square slot is for the ones that read as pictures in a frame.
@@ -8333,14 +8683,14 @@ var STEP_BADGES = {
8333
8683
  * It also keeps the sticker off the clip the note above describes: a square slot cuts
8334
8684
  * the metal filter's canvas at the badge's own edge, and this glyph reaches its.
8335
8685
  */
8336
- PROMO: { shape: "circle", content: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(import_icons10.PercentInStickerIcon, { fill: true, appearance: "metal" }) },
8686
+ PROMO: { shape: "circle", content: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(import_icons10.PercentInStickerIcon, { fill: true, appearance: "metal" }) },
8337
8687
  /*
8338
8688
  * THE SAME MARK THE EMAIL STEP WEARS. The buyer is looking at their address again, and
8339
8689
  * a second glyph for the same subject would suggest a different one.
8340
8690
  */
8341
8691
  CONFIRM_EMAIL: {
8342
8692
  shape: "square",
8343
- content: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(import_icons10.PaperPlaneToTopLeftIcon, { fill: true, appearance: "metal" })
8693
+ content: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(import_icons10.PaperPlaneToTopLeftIcon, { fill: true, appearance: "metal" })
8344
8694
  },
8345
8695
  /*
8346
8696
  * @Zsolt — AUTH SURFACE. `3735:45219` — the SQUARE notch, and the set's own passkey
@@ -8348,7 +8698,7 @@ var STEP_BADGES = {
8348
8698
  * keyhole shipped here first and is a different idea: a keyhole is a lock, and a
8349
8699
  * passkey is the thing that opens one without a key.
8350
8700
  */
8351
- PASSKEY: { shape: "square", content: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(import_icons10.PasskeyIcon, { fill: true, appearance: "metal" }) }
8701
+ PASSKEY: { shape: "square", content: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(import_icons10.PasskeyIcon, { fill: true, appearance: "metal" }) }
8352
8702
  /*
8353
8703
  * NO `PAYMENT_SUCCESS` ENTRY ANY MORE. It drew a bare metal check in the circular
8354
8704
  * notch, and the design now gives it the same status tag the failure wears — a green
@@ -8405,7 +8755,7 @@ function statusBadge(status, size2, override) {
8405
8755
  const Glyph = override ?? mark ?? spec.icon;
8406
8756
  return {
8407
8757
  shape: "circle",
8408
- content: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
8758
+ content: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
8409
8759
  "span",
8410
8760
  {
8411
8761
  role: "img",
@@ -8427,7 +8777,7 @@ function statusBadge(status, size2, override) {
8427
8777
  */
8428
8778
  background: mark === void 0 ? tone.background : "transparent"
8429
8779
  },
8430
- children: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
8780
+ children: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
8431
8781
  Glyph,
8432
8782
  {
8433
8783
  fill: true,
@@ -8536,7 +8886,7 @@ function funnelViewProps(funnel, handlers) {
8536
8886
  title: FUNNEL_COPY.title,
8537
8887
  subtitle: funnel.status === "REFUSED" ? FUNNEL_COPY.refused : working ? FUNNEL_COPY.working : FUNNEL_COPY.subtitle,
8538
8888
  actionLabel: AUTH_COPY.SIGN_IN,
8539
- input: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
8889
+ input: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
8540
8890
  CredentialFields,
8541
8891
  {
8542
8892
  email: credentials.email,
@@ -8663,7 +9013,7 @@ function cartViewProps(input, hold, onBack) {
8663
9013
  function holdBadge(hold) {
8664
9014
  return {
8665
9015
  shape: "circle",
8666
- content: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(CountdownTimer, { remaining: holdRemaining(hold), appearance: "solid", size: "100%" }),
9016
+ content: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(CountdownTimer, { remaining: holdRemaining(hold), appearance: "solid", size: "100%" }),
8667
9017
  id: "view:hold"
8668
9018
  };
8669
9019
  }
@@ -8703,12 +9053,12 @@ var SIGN_IN_WITH_WORDMARK = {
8703
9053
  mark: {
8704
9054
  side: "trailing",
8705
9055
  spacing: "joined",
8706
- node: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(ScopeTicketsWordmarkMark, { height: 12, title: "Scope Tickets" })
9056
+ node: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(ScopeTicketsWordmarkMark, { height: 12, title: "Scope Tickets" })
8707
9057
  }
8708
9058
  };
8709
9059
  var KEYHOLE_BADGE = {
8710
9060
  shape: "square",
8711
- content: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(import_icons10.KeyholeInSquareIcon, { fill: true, appearance: "metal" }),
9061
+ content: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(import_icons10.KeyholeInSquareIcon, { fill: true, appearance: "metal" }),
8712
9062
  /*
8713
9063
  * NAMED, like every step badge — it is square, and so are six others. See
8714
9064
  * `STEP_ACCESSORY` for what the name is for.
@@ -8764,7 +9114,7 @@ var AUTH_CARDS = {
8764
9114
  * on exactly as the header's glyphs do. SEPARATE spacing, not joined: the label says
8765
9115
  * the whole thing on its own and the glyph accompanies it.
8766
9116
  */
8767
- mark: { side: "trailing", node: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(import_icons10.PasskeyIcon, { size: 16, color: "currentColor" }) }
9117
+ mark: { side: "trailing", node: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(import_icons10.PasskeyIcon, { size: 16, color: "currentColor" }) }
8768
9118
  },
8769
9119
  { role: "secondary", label: AUTH_COPY.ENTER_PASSWORD },
8770
9120
  { role: "secondary", label: AUTH_COPY.SIGN_OUT }
@@ -8799,7 +9149,7 @@ var AUTH_CARDS = {
8799
9149
  */
8800
9150
  accessory: {
8801
9151
  shape: "circle",
8802
- content: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(import_icons10.PlusInCircleIcon, { fill: true, appearance: "metal" }),
9152
+ content: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(import_icons10.PlusInCircleIcon, { fill: true, appearance: "metal" }),
8803
9153
  id: "card:account-plus"
8804
9154
  }
8805
9155
  }
@@ -8994,7 +9344,7 @@ var STEP_CARD_ACTIONS = {
8994
9344
  role: "secondary",
8995
9345
  label: "Upload",
8996
9346
  uploads: true,
8997
- mark: { side: "leading", node: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(import_icons10.CloudWithArrowUpInIcon, { size: 14, color: "currentColor" }) }
9347
+ mark: { side: "leading", node: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(import_icons10.CloudWithArrowUpInIcon, { size: 14, color: "currentColor" }) }
8998
9348
  }
8999
9349
  ],
9000
9350
  /*
@@ -9006,9 +9356,9 @@ var STEP_CARD_ACTIONS = {
9006
9356
  */
9007
9357
  FOLLOW: [{ role: "primary", label: "Continue to Ticket" }]
9008
9358
  };
9009
- var POWERED_BY = /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)("span", { className: "scopetickets-island-credit", children: [
9359
+ var POWERED_BY = /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)("span", { className: "scopetickets-island-credit", children: [
9010
9360
  "Powered by",
9011
- /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(ScopeTicketsWordmarkMark, { height: 12 })
9361
+ /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(ScopeTicketsWordmarkMark, { height: 12 })
9012
9362
  ] });
9013
9363
  var STEP_CARD_COPY = {
9014
9364
  PARTY: { title: "Party Size", subtitle: "Let us know who\u2019s coming." },
@@ -9162,9 +9512,9 @@ var SIGN_IN_FUNNEL_CARD = {
9162
9512
  * justify-center`, `gap: $2`, with the words `whitespace-nowrap` and the mark at
9163
9513
  * 117.778 x 20 beside them.
9164
9514
  */
9165
- title: /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)("span", { className: "scopetickets-island-funnel-title", children: [
9166
- /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("span", { children: "Sign In to" }),
9167
- /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(ScopeTicketsWordmarkMark, { height: 20, title: "Scope Tickets" })
9515
+ title: /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)("span", { className: "scopetickets-island-funnel-title", children: [
9516
+ /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("span", { children: "Sign In to" }),
9517
+ /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(ScopeTicketsWordmarkMark, { height: 20, title: "Scope Tickets" })
9168
9518
  ] }),
9169
9519
  subtitle: "Sign in below."
9170
9520
  },
@@ -9184,6 +9534,7 @@ var SIGN_IN_FUNNEL_CARD = {
9184
9534
  * still running, unlike the design.
9185
9535
  */
9186
9536
  };
9537
+ var DETAILS_SAVED_SUBTITLE = "Your answers are saved with this order and can no longer be changed.";
9187
9538
 
9188
9539
  // src/island/island-hero.tsx
9189
9540
  var HERO_TRANSITION_KEY = "checkout:hero";
@@ -9325,7 +9676,7 @@ async function read(client, subject, day) {
9325
9676
  if (client === null || subject === void 0) return NOTHING2;
9326
9677
  const eventKey = await eventKeyFor(client, subject, day);
9327
9678
  if (eventKey === null) return NOTHING2;
9328
- const tickets = await client.getEventTickets(eventKey);
9679
+ const tickets = await client.getTicketInformation({ events: [eventKey], includeQuestions: true });
9329
9680
  return {
9330
9681
  sellsSessions: tickets.some((ticket) => ticket.HasTimeslot),
9331
9682
  asksQuestions: tickets.some((ticket) => (ticket.Questions ?? []).length > 0)
@@ -9339,7 +9690,7 @@ async function eventKeyFor(client, subject, day) {
9339
9690
  }
9340
9691
 
9341
9692
  // src/island/RestingIsland.tsx
9342
- var import_jsx_runtime30 = require("react/jsx-runtime");
9693
+ var import_jsx_runtime31 = require("react/jsx-runtime");
9343
9694
  function RestingIsland({
9344
9695
  appKey,
9345
9696
  source,
@@ -9434,7 +9785,7 @@ function RestingIsland({
9434
9785
  [raised, signIn2, funnel]
9435
9786
  );
9436
9787
  const badge = showsCart && running !== void 0 ? holdBadge(running) : heroAccessory(showsCart ? void 0 : authCard.accessory);
9437
- const hero = /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
9788
+ const hero = /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
9438
9789
  import_avatar3.Avatar,
9439
9790
  {
9440
9791
  subject: { kind: "user", avatar: buyerAvatarValue(session.auth), assets: avatarAssets },
@@ -9445,14 +9796,14 @@ function RestingIsland({
9445
9796
  }
9446
9797
  );
9447
9798
  if (notice !== null) {
9448
- return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
9799
+ return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
9449
9800
  CheckoutIsland,
9450
9801
  {
9451
9802
  mode,
9452
9803
  align,
9453
9804
  placement,
9454
9805
  contentKey: `IDLE:NOTICE:${notice.id}`,
9455
- avatar: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
9806
+ avatar: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
9456
9807
  import_avatar3.Avatar,
9457
9808
  {
9458
9809
  subject: { kind: "user", avatar: buyerAvatarValue(session.auth), assets: avatarAssets },
@@ -9467,7 +9818,7 @@ function RestingIsland({
9467
9818
  );
9468
9819
  }
9469
9820
  if (funnelOpen(funnel.state)) {
9470
- return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
9821
+ return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
9471
9822
  CheckoutIsland,
9472
9823
  {
9473
9824
  mode,
@@ -9485,7 +9836,7 @@ function RestingIsland({
9485
9836
  }
9486
9837
  if (showsCart) {
9487
9838
  const total = formatMoney(money.minorUnits, money.currency);
9488
- return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
9839
+ return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
9489
9840
  CheckoutIsland,
9490
9841
  {
9491
9842
  mode,
@@ -9498,7 +9849,7 @@ function RestingIsland({
9498
9849
  pillCopy: { title: total, subtitle: CART_VIEW.title },
9499
9850
  actionLabel: RESTING_CART.checkOut,
9500
9851
  ...restingCartViewProps(
9501
- /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
9852
+ /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
9502
9853
  CartLines,
9503
9854
  {
9504
9855
  lines,
@@ -9516,7 +9867,7 @@ function RestingIsland({
9516
9867
  );
9517
9868
  }
9518
9869
  const lead = drawnQuote === void 0 ? null : quoteLines(drawnQuote);
9519
- return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
9870
+ return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
9520
9871
  CheckoutIsland,
9521
9872
  {
9522
9873
  mode,
@@ -9531,7 +9882,7 @@ function RestingIsland({
9531
9882
  subtitle: authCard.copy.subtitle,
9532
9883
  pillCopy: { title: lead?.headline, subtitle: lead?.qualifier ?? void 0 },
9533
9884
  actionLabel: prompt.actionLabel,
9534
- input: offersPasskeySignIn ? /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
9885
+ input: offersPasskeySignIn ? /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
9535
9886
  PasskeyButton,
9536
9887
  {
9537
9888
  hostUrl: passkeyEnvironment.passkeyHostUrl,
@@ -9597,13 +9948,13 @@ function useTicketCodes(gateway, keys) {
9597
9948
  }
9598
9949
 
9599
9950
  // src/island/QuickActions.tsx
9600
- var import_jsx_runtime31 = require("react/jsx-runtime");
9951
+ var import_jsx_runtime32 = require("react/jsx-runtime");
9601
9952
  function QuickActions({ actions }) {
9602
- return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("div", { className: "scopetickets-island-quick", children: actions.map((action) => /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(QuickActionButton, { action }, action.key)) });
9953
+ return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("div", { className: "scopetickets-island-quick", children: actions.map((action) => /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(QuickActionButton, { action }, action.key)) });
9603
9954
  }
9604
9955
  function QuickActionButton({ action }) {
9605
9956
  const press = useIslandPress("element");
9606
- return /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)(
9957
+ return /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)(
9607
9958
  "button",
9608
9959
  {
9609
9960
  type: "button",
@@ -9614,8 +9965,8 @@ function QuickActionButton({ action }) {
9614
9965
  "data-disabled": action.disabled === true ? "" : void 0,
9615
9966
  ...press,
9616
9967
  children: [
9617
- /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("span", { className: "scopetickets-island-quick__ring", "aria-hidden": "true", children: action.glyph }),
9618
- /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("span", { className: "scopetickets-island-quick__label", "aria-hidden": "true", children: action.lines.map((line) => /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("span", { children: line }, line)) })
9968
+ /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("span", { className: "scopetickets-island-quick__ring", "aria-hidden": "true", children: action.glyph }),
9969
+ /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("span", { className: "scopetickets-island-quick__label", "aria-hidden": "true", children: action.lines.map((line) => /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("span", { children: line }, line)) })
9619
9970
  ]
9620
9971
  }
9621
9972
  );
@@ -9667,7 +10018,7 @@ function sameFit(current, next) {
9667
10018
  }
9668
10019
 
9669
10020
  // src/island/TicketCode.tsx
9670
- var import_jsx_runtime32 = require("react/jsx-runtime");
10021
+ var import_jsx_runtime33 = require("react/jsx-runtime");
9671
10022
  function readTicketEdgeTokens(node) {
9672
10023
  if (typeof getComputedStyle !== "function") return TICKET_EDGE_FALLBACK;
9673
10024
  const style = getComputedStyle(node);
@@ -9713,20 +10064,20 @@ function TicketCode({
9713
10064
  if (frameRef.current) observer.observe(frameRef.current);
9714
10065
  return () => observer.disconnect();
9715
10066
  }, [measure, fit?.ok]);
9716
- const header = /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)("div", { className: "scopetickets-island-ticket__header", ref: headerRef, children: [
9717
- /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)("div", { className: "scopetickets-island-ticket__holder", children: [
9718
- /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)("div", { className: "scopetickets-island-ticket__who", children: [
9719
- qualifier === null ? null : /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("span", { className: "scopetickets-island-ticket__qualifier", children: qualifier }),
9720
- name === null ? null : /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("span", { className: "scopetickets-island-ticket__name", children: name })
10067
+ const header = /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("div", { className: "scopetickets-island-ticket__header", ref: headerRef, children: [
10068
+ /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("div", { className: "scopetickets-island-ticket__holder", children: [
10069
+ /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("div", { className: "scopetickets-island-ticket__who", children: [
10070
+ qualifier === null ? null : /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("span", { className: "scopetickets-island-ticket__qualifier", children: qualifier }),
10071
+ name === null ? null : /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("span", { className: "scopetickets-island-ticket__name", children: name })
9721
10072
  ] }),
9722
- avatar === void 0 || avatar === null ? null : /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("span", { className: "scopetickets-island-ticket__avatar", children: avatar })
10073
+ avatar === void 0 || avatar === null ? null : /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("span", { className: "scopetickets-island-ticket__avatar", children: avatar })
9723
10074
  ] }),
9724
- /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)("div", { className: "scopetickets-island-ticket__booking", children: [
9725
- /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("span", { className: "scopetickets-island-ticket__day", children: day }),
9726
- time === null ? null : /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("span", { className: "scopetickets-island-ticket__time", children: time })
10075
+ /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("div", { className: "scopetickets-island-ticket__booking", children: [
10076
+ /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("span", { className: "scopetickets-island-ticket__day", children: day }),
10077
+ time === null ? null : /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("span", { className: "scopetickets-island-ticket__time", children: time })
9727
10078
  ] })
9728
10079
  ] });
9729
- return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("div", { className: "scopetickets-island-ticket", ref: hostRef, children: fit?.ok === true ? /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)(
10080
+ return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("div", { className: "scopetickets-island-ticket", ref: hostRef, children: fit?.ok === true ? /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(
9730
10081
  "div",
9731
10082
  {
9732
10083
  ref: frameRef,
@@ -9736,23 +10087,23 @@ function TicketCode({
9736
10087
  "--scopetickets-island-ticket-rows": fit.rows
9737
10088
  },
9738
10089
  children: [
9739
- /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)("div", { className: "scopetickets-island-ticket__band", children: [
9740
- /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("span", { className: "scopetickets-island-ticket__corner" }),
9741
- /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("span", { className: "scopetickets-island-ticket__rail" }),
9742
- /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("span", { className: "scopetickets-island-ticket__corner" })
10090
+ /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("div", { className: "scopetickets-island-ticket__band", children: [
10091
+ /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("span", { className: "scopetickets-island-ticket__corner" }),
10092
+ /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("span", { className: "scopetickets-island-ticket__rail" }),
10093
+ /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("span", { className: "scopetickets-island-ticket__corner" })
9743
10094
  ] }),
9744
- /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)("div", { className: "scopetickets-island-ticket__middle", children: [
9745
- /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("span", { className: "scopetickets-island-ticket__side", children: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("span", { className: "scopetickets-island-ticket__rail scopetickets-island-ticket__rail--turned" }) }),
9746
- /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)("div", { className: "scopetickets-island-ticket__centre", children: [
10095
+ /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("div", { className: "scopetickets-island-ticket__middle", children: [
10096
+ /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("span", { className: "scopetickets-island-ticket__side", children: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("span", { className: "scopetickets-island-ticket__rail scopetickets-island-ticket__rail--turned" }) }),
10097
+ /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("div", { className: "scopetickets-island-ticket__centre", children: [
9747
10098
  header,
9748
- /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(TicketCodeImage, { code, label: codeLabel, missing: codeMissing })
10099
+ /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(TicketCodeImage, { code, label: codeLabel, missing: codeMissing })
9749
10100
  ] }),
9750
- /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("span", { className: "scopetickets-island-ticket__side scopetickets-island-ticket__side--flipped", children: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("span", { className: "scopetickets-island-ticket__rail scopetickets-island-ticket__rail--turned" }) })
10101
+ /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("span", { className: "scopetickets-island-ticket__side scopetickets-island-ticket__side--flipped", children: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("span", { className: "scopetickets-island-ticket__rail scopetickets-island-ticket__rail--turned" }) })
9751
10102
  ] }),
9752
- /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)("div", { className: "scopetickets-island-ticket__band scopetickets-island-ticket__band--flipped", children: [
9753
- /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("span", { className: "scopetickets-island-ticket__corner" }),
9754
- /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("span", { className: "scopetickets-island-ticket__rail" }),
9755
- /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("span", { className: "scopetickets-island-ticket__corner" })
10103
+ /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("div", { className: "scopetickets-island-ticket__band scopetickets-island-ticket__band--flipped", children: [
10104
+ /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("span", { className: "scopetickets-island-ticket__corner" }),
10105
+ /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("span", { className: "scopetickets-island-ticket__rail" }),
10106
+ /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("span", { className: "scopetickets-island-ticket__corner" })
9756
10107
  ] })
9757
10108
  ]
9758
10109
  }
@@ -9762,7 +10113,7 @@ function TicketCode({
9762
10113
  * width the ticket will have, so the first measurement is a real one rather than a
9763
10114
  * zero that draws a ticket of one cutout and then jumps.
9764
10115
  */
9765
- /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("div", { className: "scopetickets-island-ticket__ruler", "aria-hidden": "true", children: header })
10116
+ /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("div", { className: "scopetickets-island-ticket__ruler", "aria-hidden": "true", children: header })
9766
10117
  ) });
9767
10118
  }
9768
10119
  function TicketCodeImage({
@@ -9771,20 +10122,20 @@ function TicketCodeImage({
9771
10122
  missing
9772
10123
  }) {
9773
10124
  if (code.status === "DRAWN") {
9774
- return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("div", { className: "scopetickets-island-ticket__code", children: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("img", { src: code.src, alt: label, draggable: false }) });
10125
+ return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("div", { className: "scopetickets-island-ticket__code", children: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("img", { src: code.src, alt: label, draggable: false }) });
9775
10126
  }
9776
- return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
10127
+ return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
9777
10128
  "div",
9778
10129
  {
9779
10130
  className: "scopetickets-island-ticket__code scopetickets-island-ticket__code--bare",
9780
10131
  "data-state": code.status === "LOADING" ? "loading" : "missing",
9781
- children: code.status === "ERROR" ? /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("span", { className: "scopetickets-island-ticket__missing", children: missing }) : null
10132
+ children: code.status === "ERROR" ? /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("span", { className: "scopetickets-island-ticket__missing", children: missing }) : null
9782
10133
  }
9783
10134
  );
9784
10135
  }
9785
10136
 
9786
10137
  // src/island/TicketCodes.tsx
9787
- var import_jsx_runtime33 = require("react/jsx-runtime");
10138
+ var import_jsx_runtime34 = require("react/jsx-runtime");
9788
10139
  function TicketCodes({ tickets, at, onAtChange, label }) {
9789
10140
  const wrapRef = (0, import_react29.useRef)(null);
9790
10141
  const pagerRef = (0, import_react29.useRef)(null);
@@ -9875,7 +10226,7 @@ function TicketCodes({ tickets, at, onAtChange, label }) {
9875
10226
  onAtChange(landed);
9876
10227
  }, [tickets.length, onAtChange]);
9877
10228
  if (tickets.length === 0) return null;
9878
- return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("div", { className: "scopetickets-island-codes", ref: wrapRef, children: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
10229
+ return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("div", { className: "scopetickets-island-codes", ref: wrapRef, children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
9879
10230
  "div",
9880
10231
  {
9881
10232
  ref: pagerRef,
@@ -9889,14 +10240,14 @@ function TicketCodes({ tickets, at, onAtChange, label }) {
9889
10240
  onPointerMove,
9890
10241
  onPointerUp: release,
9891
10242
  onPointerCancel: release,
9892
- children: tickets.map((ticket, index) => /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
10243
+ children: tickets.map((ticket, index) => /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
9893
10244
  "div",
9894
10245
  {
9895
10246
  className: "scopetickets-island-codes__page",
9896
10247
  ref: (node) => {
9897
10248
  pageRefs.current[index] = node;
9898
10249
  },
9899
- children: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(TicketCode, { ...ticket })
10250
+ children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(TicketCode, { ...ticket })
9900
10251
  },
9901
10252
  ticket.key
9902
10253
  ))
@@ -9950,27 +10301,27 @@ function TicketCodePager({
9950
10301
  previousLabel,
9951
10302
  nextLabel
9952
10303
  }) {
9953
- return /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("div", { className: "scopetickets-island-codes__pager-control", children: [
9954
- /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
10304
+ return /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("div", { className: "scopetickets-island-codes__pager-control", children: [
10305
+ /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
9955
10306
  PagerArrow,
9956
10307
  {
9957
10308
  label: previousLabel,
9958
10309
  disabled: at <= 0,
9959
10310
  onPress: () => onAtChange(at - 1),
9960
- glyph: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(import_icons11.ArrowLeftIcon, { size: 16, color: "currentColor" })
10311
+ glyph: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(import_icons11.ArrowLeftIcon, { size: 16, color: "currentColor" })
9961
10312
  }
9962
10313
  ),
9963
- /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("span", { className: "scopetickets-island-codes__position", "aria-live": "polite", children: [
10314
+ /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("span", { className: "scopetickets-island-codes__position", "aria-live": "polite", children: [
9964
10315
  position,
9965
- /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("span", { className: "scopetickets-island-codes__position-of", children: positionOf })
10316
+ /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("span", { className: "scopetickets-island-codes__position-of", children: positionOf })
9966
10317
  ] }),
9967
- /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
10318
+ /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
9968
10319
  PagerArrow,
9969
10320
  {
9970
10321
  label: nextLabel,
9971
10322
  disabled: at >= count - 1,
9972
10323
  onPress: () => onAtChange(at + 1),
9973
- glyph: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(import_icons11.ArrowRightIcon, { size: 16, color: "currentColor" })
10324
+ glyph: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(import_icons11.ArrowRightIcon, { size: 16, color: "currentColor" })
9974
10325
  }
9975
10326
  )
9976
10327
  ] });
@@ -9982,7 +10333,7 @@ function PagerArrow({
9982
10333
  glyph
9983
10334
  }) {
9984
10335
  const press = useIslandPress("element");
9985
- return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
10336
+ return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
9986
10337
  "button",
9987
10338
  {
9988
10339
  type: "button",
@@ -9999,13 +10350,13 @@ function PagerArrow({
9999
10350
 
10000
10351
  // src/island/TicketsInBooking.tsx
10001
10352
  var import_icons12 = require("@scopetickets/icons");
10002
- var import_jsx_runtime34 = require("react/jsx-runtime");
10353
+ var import_jsx_runtime35 = require("react/jsx-runtime");
10003
10354
  function TicketsInBooking({ tickets, onOpen }) {
10004
- return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("div", { className: "scopetickets-island-tickets", children: tickets.map((ticket) => /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(TicketInBookingRow, { ticket, onOpen: () => onOpen(ticket.key) }, ticket.key)) });
10355
+ return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("div", { className: "scopetickets-island-tickets", children: tickets.map((ticket) => /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(TicketInBookingRow, { ticket, onOpen: () => onOpen(ticket.key) }, ticket.key)) });
10005
10356
  }
10006
10357
  function TicketInBookingRow({ ticket, onOpen }) {
10007
10358
  const press = useIslandPress("element");
10008
- return /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)(
10359
+ return /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(
10009
10360
  "button",
10010
10361
  {
10011
10362
  type: "button",
@@ -10014,8 +10365,8 @@ function TicketInBookingRow({ ticket, onOpen }) {
10014
10365
  onClick: onOpen,
10015
10366
  ...press,
10016
10367
  children: [
10017
- /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("span", { className: "scopetickets-island-tickets__detail", children: [
10018
- /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
10368
+ /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)("span", { className: "scopetickets-island-tickets__detail", children: [
10369
+ /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
10019
10370
  "span",
10020
10371
  {
10021
10372
  className: "scopetickets-island-tickets__holder",
@@ -10023,9 +10374,9 @@ function TicketInBookingRow({ ticket, onOpen }) {
10023
10374
  children: ticket.holder
10024
10375
  }
10025
10376
  ),
10026
- ticket.qualifier === null ? null : /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("span", { className: "scopetickets-island-tickets__qualifier", children: ticket.qualifier })
10377
+ ticket.qualifier === null ? null : /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("span", { className: "scopetickets-island-tickets__qualifier", children: ticket.qualifier })
10027
10378
  ] }),
10028
- ticket.add === void 0 ? /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("span", { className: "scopetickets-island-tickets__open", "aria-hidden": "true", children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(import_icons12.ArrowRightIcon, { size: 16, color: "currentColor" }) }) : /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("span", { className: "scopetickets-island-tickets__add", "aria-hidden": "true", children: ticket.add })
10379
+ ticket.add === void 0 ? /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("span", { className: "scopetickets-island-tickets__open", "aria-hidden": "true", children: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(import_icons12.ArrowRightIcon, { size: 16, color: "currentColor" }) }) : /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("span", { className: "scopetickets-island-tickets__add", "aria-hidden": "true", children: ticket.add })
10029
10380
  ]
10030
10381
  }
10031
10382
  );
@@ -10033,7 +10384,7 @@ function TicketInBookingRow({ ticket, onOpen }) {
10033
10384
 
10034
10385
  // src/island/booking-cards.tsx
10035
10386
  var import_icons13 = require("@scopetickets/icons");
10036
- var import_jsx_runtime35 = require("react/jsx-runtime");
10387
+ var import_jsx_runtime36 = require("react/jsx-runtime");
10037
10388
  var BOOKING_COPY = {
10038
10389
  /** The root. A statement of what was bought, which is why the title is a subject. */
10039
10390
  title: "Booking Details",
@@ -10134,13 +10485,13 @@ function bookingDismiss(back) {
10134
10485
  }
10135
10486
  function DayChip({ day, size: size2 }) {
10136
10487
  const { date, month } = formatDayChip(day);
10137
- return /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(
10488
+ return /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(
10138
10489
  "span",
10139
10490
  {
10140
10491
  className: `scopetickets-island-datemark${size2 === 10 ? " scopetickets-island-datemark--sm" : ""}`,
10141
10492
  children: [
10142
- /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("span", { className: "scopetickets-island-datemark__date", children: date }),
10143
- size2 === 10 ? null : /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("span", { className: "scopetickets-island-datemark__month", children: month })
10493
+ /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("span", { className: "scopetickets-island-datemark__date", children: date }),
10494
+ size2 === 10 ? null : /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("span", { className: "scopetickets-island-datemark__month", children: month })
10144
10495
  ]
10145
10496
  }
10146
10497
  );
@@ -10148,33 +10499,33 @@ function DayChip({ day, size: size2 }) {
10148
10499
  var BOOKING_BADGES = {
10149
10500
  day: (day, size2) => ({
10150
10501
  shape: "square",
10151
- content: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(DayChip, { day, size: size2 }),
10502
+ content: /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(DayChip, { day, size: size2 }),
10152
10503
  id: "booking:day"
10153
10504
  }),
10154
10505
  edit: {
10155
10506
  shape: "square",
10156
- content: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(import_icons13.PaperAndPencilIcon, { fill: true, appearance: "metal" }),
10507
+ content: /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(import_icons13.PaperAndPencilIcon, { fill: true, appearance: "metal" }),
10157
10508
  id: "booking:edit"
10158
10509
  },
10159
10510
  /* The same plane the quick action wears, so the card says what the press that opened it did. */
10160
10511
  send: {
10161
10512
  shape: "square",
10162
- content: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(import_icons13.PaperPlaneToTopRightIcon, { fill: true, appearance: "metal" }),
10513
+ content: /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(import_icons13.PaperPlaneToTopRightIcon, { fill: true, appearance: "metal" }),
10163
10514
  id: "booking:send"
10164
10515
  }
10165
10516
  };
10166
10517
  function CodeGlyph({ size: size2 = 16 }) {
10167
- return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(import_icons13.QrCodeIcon, { size: size2, color: "currentColor" });
10518
+ return /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(import_icons13.QrCodeIcon, { size: size2, color: "currentColor" });
10168
10519
  }
10169
10520
  function EditGlyph({ size: size2 = 16 }) {
10170
- return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(import_icons13.PaperAndPencilIcon, { size: size2, color: "currentColor" });
10521
+ return /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(import_icons13.PaperAndPencilIcon, { size: size2, color: "currentColor" });
10171
10522
  }
10172
10523
  function SendGlyph({ size: size2 = 16 }) {
10173
- return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(import_icons13.PaperPlaneToTopRightIcon, { size: size2, color: "currentColor" });
10524
+ return /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(import_icons13.PaperPlaneToTopRightIcon, { size: size2, color: "currentColor" });
10174
10525
  }
10175
10526
 
10176
10527
  // src/island/BookingIsland.tsx
10177
- var import_jsx_runtime36 = require("react/jsx-runtime");
10528
+ var import_jsx_runtime37 = require("react/jsx-runtime");
10178
10529
  var NO_CODES = [];
10179
10530
  function BookingIsland({
10180
10531
  appKey,
@@ -10270,12 +10621,12 @@ function BookingIsland({
10270
10621
  );
10271
10622
  const common = { mode, align, placement, expanded, onToggle: onDismiss };
10272
10623
  if (notice !== null) {
10273
- return /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
10624
+ return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
10274
10625
  CheckoutIsland,
10275
10626
  {
10276
10627
  ...common,
10277
10628
  contentKey: `BOOKING:NOTICE:${notice.id}`,
10278
- avatar: /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
10629
+ avatar: /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
10279
10630
  import_avatar4.Avatar,
10280
10631
  {
10281
10632
  subject: { kind: "event", src: occasion.artwork ?? "", alt: "" },
@@ -10291,13 +10642,13 @@ function BookingIsland({
10291
10642
  }
10292
10643
  if (dressed === null) {
10293
10644
  const waiting = booking.state.status === "LOADING";
10294
- return /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
10645
+ return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
10295
10646
  CheckoutIsland,
10296
10647
  {
10297
10648
  ...common,
10298
10649
  contentKey: waiting ? "BOOKING:LOADING" : "BOOKING:NONE",
10299
10650
  dismiss: "close",
10300
- avatar: /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
10651
+ avatar: /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
10301
10652
  import_avatar4.Avatar,
10302
10653
  {
10303
10654
  subject: { kind: "event", src: occasion.artwork ?? "", alt: "" },
@@ -10349,14 +10700,14 @@ function BookingIsland({
10349
10700
  ...named === null ? { add: BOOKING_COPY.add } : {}
10350
10701
  };
10351
10702
  });
10352
- return /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
10703
+ return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
10353
10704
  CheckoutIsland,
10354
10705
  {
10355
10706
  ...common,
10356
10707
  contentKey: "BOOKING:ROOT",
10357
10708
  dismiss,
10358
10709
  onToggle: onDismiss,
10359
- avatar: expanded ? /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
10710
+ avatar: expanded ? /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
10360
10711
  import_avatar4.Avatar,
10361
10712
  {
10362
10713
  subject: { kind: "event", src: occasion.artwork ?? "", alt: "" },
@@ -10365,7 +10716,7 @@ function BookingIsland({
10365
10716
  accessory: BOOKING_BADGES.day(occasion.day, 25),
10366
10717
  transitionKey: BOOKING_TRANSITION_KEY
10367
10718
  }
10368
- ) : /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
10719
+ ) : /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
10369
10720
  import_avatar4.Avatar,
10370
10721
  {
10371
10722
  subject: { kind: "user", avatar: buyerAvatar ?? null, assets: buyerAvatarAssets },
@@ -10373,7 +10724,7 @@ function BookingIsland({
10373
10724
  fill: true,
10374
10725
  accessory: {
10375
10726
  shape: "square",
10376
- content: /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
10727
+ content: /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
10377
10728
  import_avatar4.Avatar,
10378
10729
  {
10379
10730
  subject: { kind: "event", src: occasion.artwork ?? "", alt: "" },
@@ -10387,22 +10738,22 @@ function BookingIsland({
10387
10738
  }
10388
10739
  ),
10389
10740
  title: BOOKING_COPY.title,
10390
- subtitle: /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)("span", { className: "scopetickets-island-booking__lines", children: [
10391
- /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("span", { children: occasion.name }),
10392
- /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("span", { children: formatDayDate(occasion.day) })
10741
+ subtitle: /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)("span", { className: "scopetickets-island-booking__lines", children: [
10742
+ /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("span", { children: occasion.name }),
10743
+ /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("span", { children: formatDayDate(occasion.day) })
10393
10744
  ] }),
10394
10745
  pillCopy: {},
10395
10746
  actionLabel: BOOKING_COPY.myBooking,
10396
- input: /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)("div", { className: "scopetickets-island-booking", children: [
10397
- time === null ? null : /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("p", { className: "scopetickets-island-booking__time", children: time }),
10398
- /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(TicketsInBooking, { tickets: rows, onOpen: openTicket })
10747
+ input: /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)("div", { className: "scopetickets-island-booking", children: [
10748
+ time === null ? null : /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("p", { className: "scopetickets-island-booking__time", children: time }),
10749
+ /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(TicketsInBooking, { tickets: rows, onOpen: openTicket })
10399
10750
  ] }),
10400
10751
  actions: [
10401
10752
  {
10402
10753
  key: "booking-codes",
10403
10754
  role: "secondary",
10404
10755
  label: BOOKING_COPY.showCodes,
10405
- mark: { side: "leading", node: /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(CodeGlyph, {}) },
10756
+ mark: { side: "leading", node: /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(CodeGlyph, {}) },
10406
10757
  onPress: () => openCodes(0)
10407
10758
  }
10408
10759
  ]
@@ -10424,7 +10775,7 @@ function BookingIsland({
10424
10775
  codeMissing: BOOKING_COPY.codeMissing
10425
10776
  };
10426
10777
  });
10427
- return /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
10778
+ return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
10428
10779
  CheckoutIsland,
10429
10780
  {
10430
10781
  ...common,
@@ -10433,7 +10784,7 @@ function BookingIsland({
10433
10784
  onToggle: onDismiss,
10434
10785
  pillCopy: pill2,
10435
10786
  actionLabel: BOOKING_COPY.codes,
10436
- input: /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
10787
+ input: /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
10437
10788
  TicketCodes,
10438
10789
  {
10439
10790
  tickets: entries,
@@ -10443,7 +10794,7 @@ function BookingIsland({
10443
10794
  }
10444
10795
  ),
10445
10796
  actions: [],
10446
- footer: /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
10797
+ footer: /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
10447
10798
  TicketCodePager,
10448
10799
  {
10449
10800
  at: showing.at,
@@ -10462,7 +10813,7 @@ function BookingIsland({
10462
10813
  const name = holderName(ticket.holder) ?? BOOKING_COPY.awaiting;
10463
10814
  const qualifier = ticketQualifier(ticket);
10464
10815
  if (showing.kind === "TICKET") {
10465
- return /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
10816
+ return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
10466
10817
  CheckoutIsland,
10467
10818
  {
10468
10819
  ...common,
@@ -10470,35 +10821,35 @@ function BookingIsland({
10470
10821
  dismiss,
10471
10822
  onToggle: onDismiss,
10472
10823
  title: ticketTitle(ticket.holder) ?? BOOKING_COPY.ticketFallbackTitle,
10473
- subtitle: /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)("span", { className: "scopetickets-island-booking__lines", children: [
10474
- qualifier === null ? null : /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("span", { children: qualifier }),
10475
- /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("span", { children: formatWeekdayAndDate(occasion.day) }),
10476
- occasionTime(occasion) === null ? null : /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("span", { children: occasionTime(occasion) })
10824
+ subtitle: /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)("span", { className: "scopetickets-island-booking__lines", children: [
10825
+ qualifier === null ? null : /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("span", { children: qualifier }),
10826
+ /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("span", { children: formatWeekdayAndDate(occasion.day) }),
10827
+ occasionTime(occasion) === null ? null : /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("span", { children: occasionTime(occasion) })
10477
10828
  ] }),
10478
10829
  pillCopy: { title: name, subtitle: qualifier ?? occasion.name },
10479
10830
  actionLabel: BOOKING_COPY.title,
10480
- input: /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)("div", { className: "scopetickets-island-booking scopetickets-island-booking--ticket", children: [
10481
- walletBadge === void 0 ? null : /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("div", { className: "scopetickets-island-booking__wallet", children: walletBadge(ticket.key) }),
10482
- /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("span", { className: "scopetickets-island-booking__rule", "aria-hidden": "true" }),
10483
- /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
10831
+ input: /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)("div", { className: "scopetickets-island-booking scopetickets-island-booking--ticket", children: [
10832
+ walletBadge === void 0 ? null : /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("div", { className: "scopetickets-island-booking__wallet", children: walletBadge(ticket.key) }),
10833
+ /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("span", { className: "scopetickets-island-booking__rule", "aria-hidden": "true" }),
10834
+ /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
10484
10835
  QuickActions,
10485
10836
  {
10486
10837
  actions: [
10487
10838
  {
10488
10839
  key: "ticket-code",
10489
- glyph: /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(CodeGlyph, { size: 24 }),
10840
+ glyph: /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(CodeGlyph, { size: 24 }),
10490
10841
  lines: BOOKING_COPY.showCodeLines,
10491
10842
  onPress: () => openCodes(indexOfTicket(dressed.tickets, ticket.key))
10492
10843
  },
10493
10844
  {
10494
10845
  key: "ticket-holder",
10495
- glyph: /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(EditGlyph, { size: 24 }),
10846
+ glyph: /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(EditGlyph, { size: 24 }),
10496
10847
  lines: BOOKING_COPY.editHolderLines,
10497
10848
  onPress: () => openEdit(ticket)
10498
10849
  },
10499
10850
  {
10500
10851
  key: "ticket-send",
10501
- glyph: /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(SendGlyph, { size: 24 }),
10852
+ glyph: /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(SendGlyph, { size: 24 }),
10502
10853
  lines: BOOKING_COPY.sendTicketLines,
10503
10854
  /*
10504
10855
  * ADDRESSED BY THE NUMERIC ID, which some tickets arrive without — the
@@ -10524,7 +10875,7 @@ function BookingIsland({
10524
10875
  const failed2 = booking.send.status === "FAILED";
10525
10876
  const address = sendTo.trim();
10526
10877
  const sendable2 = isValidEmail(address) && !sending && address !== sent?.email;
10527
- return /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
10878
+ return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
10528
10879
  CheckoutIsland,
10529
10880
  {
10530
10881
  ...common,
@@ -10540,7 +10891,7 @@ function BookingIsland({
10540
10891
  subtitle: sent !== null ? BOOKING_COPY.sentTo(sent.email) : failed2 ? BOOKING_COPY.sendFailed : BOOKING_COPY.sendPrompt,
10541
10892
  pillCopy: { title: name, subtitle: BOOKING_COPY.sendTicket },
10542
10893
  actionLabel: BOOKING_COPY.sendTicket,
10543
- input: /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("div", { className: "scopetickets-island-booking__form", children: /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
10894
+ input: /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("div", { className: "scopetickets-island-booking__form", children: /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
10544
10895
  TextField,
10545
10896
  {
10546
10897
  id: "send-ticket-email",
@@ -10573,7 +10924,7 @@ function BookingIsland({
10573
10924
  const saving = booking.save.status === "SAVING";
10574
10925
  const sendable = holderComplete(held) && holderChanged(ticket.holder, held);
10575
10926
  const change = (field) => (value) => setDraft({ ...held, [field]: value });
10576
- return /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
10927
+ return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
10577
10928
  CheckoutIsland,
10578
10929
  {
10579
10930
  ...common,
@@ -10589,8 +10940,8 @@ function BookingIsland({
10589
10940
  subtitle: qualifier ?? void 0,
10590
10941
  pillCopy: { title: name, subtitle: BOOKING_COPY.editHolder },
10591
10942
  actionLabel: BOOKING_COPY.editHolder,
10592
- input: /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)("div", { className: "scopetickets-island-booking__form", children: [
10593
- /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
10943
+ input: /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)("div", { className: "scopetickets-island-booking__form", children: [
10944
+ /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
10594
10945
  TextField,
10595
10946
  {
10596
10947
  label: BOOKING_COPY.firstName,
@@ -10603,7 +10954,7 @@ function BookingIsland({
10603
10954
  enterKeyHint: "next"
10604
10955
  }
10605
10956
  ),
10606
- /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
10957
+ /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
10607
10958
  TextField,
10608
10959
  {
10609
10960
  label: BOOKING_COPY.lastName,
@@ -10616,7 +10967,7 @@ function BookingIsland({
10616
10967
  enterKeyHint: "next"
10617
10968
  }
10618
10969
  ),
10619
- /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
10970
+ /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
10620
10971
  TextField,
10621
10972
  {
10622
10973
  label: BOOKING_COPY.email,
@@ -10671,7 +11022,7 @@ function indexOfTicket(tickets, key) {
10671
11022
  }
10672
11023
  function holderFace(holder, { size: size2 = 10, accessory, transitionKey } = {}) {
10673
11024
  if (holder.photo === null) return void 0;
10674
- return /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
11025
+ return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
10675
11026
  import_avatar4.Avatar,
10676
11027
  {
10677
11028
  subject: { kind: "user", avatar: holder.photo, alt: "" },
@@ -10690,13 +11041,13 @@ var import_icons14 = require("@scopetickets/icons");
10690
11041
  var import_react32 = require("react");
10691
11042
 
10692
11043
  // src/island/CalendarMonthHeading.tsx
10693
- var import_jsx_runtime37 = require("react/jsx-runtime");
11044
+ var import_jsx_runtime38 = require("react/jsx-runtime");
10694
11045
  function CalendarMonthHeading({ month }) {
10695
- return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("h3", { className: "scopetickets-island-calendar__heading", children: formatMonthName(month) });
11046
+ return /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("h3", { className: "scopetickets-island-calendar__heading", children: formatMonthName(month) });
10696
11047
  }
10697
11048
 
10698
11049
  // src/island/CalendarDayIndicator.tsx
10699
- var import_jsx_runtime38 = (
11050
+ var import_jsx_runtime39 = (
10700
11051
  // DECORATIVE, and now correctly so.
10701
11052
  require("react/jsx-runtime")
10702
11053
  );
@@ -10708,20 +11059,20 @@ var FILLED_SEGMENTS = {
10708
11059
  };
10709
11060
  function CalendarDayIndicator({ level }) {
10710
11061
  const filled = FILLED_SEGMENTS[level];
10711
- return /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)("span", { className: "scopetickets-island-day-indicator", "aria-hidden": "true", children: [
10712
- /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
11062
+ return /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)("span", { className: "scopetickets-island-day-indicator", "aria-hidden": "true", children: [
11063
+ /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
10713
11064
  "span",
10714
11065
  {
10715
11066
  className: `scopetickets-island-day-indicator__fill scopetickets-island-day-indicator__fill--${level.toLowerCase()}`,
10716
11067
  style: { flexGrow: filled }
10717
11068
  }
10718
11069
  ),
10719
- filled < SEGMENTS ? /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("span", { style: { flexGrow: SEGMENTS - filled } }) : null
11070
+ filled < SEGMENTS ? /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("span", { style: { flexGrow: SEGMENTS - filled } }) : null
10720
11071
  ] });
10721
11072
  }
10722
11073
 
10723
11074
  // src/island/CalendarDay.tsx
10724
- var import_jsx_runtime39 = require("react/jsx-runtime");
11075
+ var import_jsx_runtime40 = require("react/jsx-runtime");
10725
11076
  function CalendarDay({
10726
11077
  cell,
10727
11078
  accessory,
@@ -10733,10 +11084,10 @@ function CalendarDay({
10733
11084
  const press = useIslandPress("element");
10734
11085
  const dimmed = outsideMonth ? { "data-outside-month": "" } : null;
10735
11086
  if (cell.kind === "EMPTY") {
10736
- return /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("span", { className: "scopetickets-island-day", "aria-hidden": "true" });
11087
+ return /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("span", { className: "scopetickets-island-day", "aria-hidden": "true" });
10737
11088
  }
10738
11089
  if (isSelectableCalendarCell(cell)) {
10739
- return /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
11090
+ return /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
10740
11091
  CalendarDayButton,
10741
11092
  {
10742
11093
  cell,
@@ -10750,7 +11101,7 @@ function CalendarDay({
10750
11101
  );
10751
11102
  }
10752
11103
  if (cell.kind === "UNAVAILABLE") {
10753
- return /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
11104
+ return /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
10754
11105
  CalendarDayButton,
10755
11106
  {
10756
11107
  cell,
@@ -10762,7 +11113,7 @@ function CalendarDay({
10762
11113
  }
10763
11114
  );
10764
11115
  }
10765
- return /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("span", { className: "scopetickets-island-day", ...dimmed, ...press, children: /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("span", { className: "scopetickets-island-day__well", "data-state": cell.kind, children: /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("span", { className: "scopetickets-island-day__number", children: cell.dayOfMonth }) }) });
11116
+ return /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("span", { className: "scopetickets-island-day", ...dimmed, ...press, children: /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("span", { className: "scopetickets-island-day__well", "data-state": cell.kind, children: /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("span", { className: "scopetickets-island-day__number", children: cell.dayOfMonth }) }) });
10766
11117
  }
10767
11118
  function CalendarDayButton({
10768
11119
  cell,
@@ -10775,7 +11126,7 @@ function CalendarDayButton({
10775
11126
  }) {
10776
11127
  const selected = cell.kind === "SELECTED";
10777
11128
  const availability = readAvailability(remaining);
10778
- return /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
11129
+ return /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
10779
11130
  "button",
10780
11131
  {
10781
11132
  type: "button",
@@ -10786,17 +11137,17 @@ function CalendarDayButton({
10786
11137
  "aria-label": availability === null ? label : `${label}, ${availability.announcement}`,
10787
11138
  onClick: onSelect ? () => onSelect(cell.day) : void 0,
10788
11139
  ...press,
10789
- children: /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)("span", { className: "scopetickets-island-day__well", "data-state": cell.kind, children: [
10790
- /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("span", { className: "scopetickets-island-day__number", children: cell.dayOfMonth }),
10791
- cell.kind === "UNAVAILABLE" ? /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("span", { className: "scopetickets-island-day__strike", "aria-hidden": "true" }) : null,
10792
- accessory === "LINE" && availability !== null ? /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("span", { className: "scopetickets-island-day__accessory", children: /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(CalendarDayIndicator, { level: availability.level }) }) : null
11140
+ children: /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)("span", { className: "scopetickets-island-day__well", "data-state": cell.kind, children: [
11141
+ /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("span", { className: "scopetickets-island-day__number", children: cell.dayOfMonth }),
11142
+ cell.kind === "UNAVAILABLE" ? /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("span", { className: "scopetickets-island-day__strike", "aria-hidden": "true" }) : null,
11143
+ accessory === "LINE" && availability !== null ? /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("span", { className: "scopetickets-island-day__accessory", children: /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(CalendarDayIndicator, { level: availability.level }) }) : null
10793
11144
  ] })
10794
11145
  }
10795
11146
  );
10796
11147
  }
10797
11148
 
10798
11149
  // src/island/CalendarRunGrid.tsx
10799
- var import_jsx_runtime40 = require("react/jsx-runtime");
11150
+ var import_jsx_runtime41 = require("react/jsx-runtime");
10800
11151
  function CalendarRunGrid({
10801
11152
  series,
10802
11153
  weeks,
@@ -10807,10 +11158,10 @@ function CalendarRunGrid({
10807
11158
  selectedDay,
10808
11159
  onSelectDay
10809
11160
  }) {
10810
- return /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("div", { className: "scopetickets-island-calendar__grid", children: weeks.map((weekStart) => (
11161
+ return /* @__PURE__ */ (0, import_jsx_runtime41.jsx)("div", { className: "scopetickets-island-calendar__grid", children: weeks.map((weekStart) => (
10811
11162
  // A presentational row: the seven columns are a layout, and announcing "row 3
10812
11163
  // of 9" describes the grid rather than the run.
10813
- /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("div", { className: "scopetickets-island-calendar__week", children: buildWeekRow(series, weekStart, { today, selectedDay }).map((cell, dayIndex) => /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
11164
+ /* @__PURE__ */ (0, import_jsx_runtime41.jsx)("div", { className: "scopetickets-island-calendar__week", children: buildWeekRow(series, weekStart, { today, selectedDay }).map((cell, dayIndex) => /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
10814
11165
  CalendarDay,
10815
11166
  {
10816
11167
  cell,
@@ -10827,7 +11178,7 @@ function CalendarRunGrid({
10827
11178
 
10828
11179
  // src/island/CalendarScroller.tsx
10829
11180
  var import_react31 = require("react");
10830
- var import_jsx_runtime41 = require("react/jsx-runtime");
11181
+ var import_jsx_runtime42 = require("react/jsx-runtime");
10831
11182
  var WHEEL_IDLE_MS = 200;
10832
11183
  var CALENDAR_DRAG_SLOP = 4;
10833
11184
  function CalendarScroller({
@@ -10965,7 +11316,7 @@ function CalendarScroller({
10965
11316
  },
10966
11317
  []
10967
11318
  );
10968
- return /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(
11319
+ return /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)(
10969
11320
  "div",
10970
11321
  {
10971
11322
  ref: viewportRef,
@@ -10982,8 +11333,8 @@ function CalendarScroller({
10982
11333
  onPointerCancel,
10983
11334
  onClickCapture,
10984
11335
  children: [
10985
- /* @__PURE__ */ (0, import_jsx_runtime41.jsx)("div", { className: "scopetickets-island-calendar-scroller__window", "aria-hidden": "true" }),
10986
- /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
11336
+ /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("div", { className: "scopetickets-island-calendar-scroller__window", "aria-hidden": "true" }),
11337
+ /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
10987
11338
  "div",
10988
11339
  {
10989
11340
  ref: trackRef,
@@ -11001,17 +11352,17 @@ function CalendarScroller({
11001
11352
  }
11002
11353
 
11003
11354
  // src/island/CalendarWeekdayNames.tsx
11004
- var import_jsx_runtime42 = require("react/jsx-runtime");
11355
+ var import_jsx_runtime43 = require("react/jsx-runtime");
11005
11356
  var WEEKDAY_NAMES = ["Mon", "Tue", "Wed", "Thu", "Fri", "Sat", "Sun"];
11006
11357
  function CalendarWeekdayNames() {
11007
11358
  return (
11008
11359
  // `aria-hidden`, and it is not a shortcut.
11009
- /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("div", { className: "scopetickets-island-calendar__weekdays", "aria-hidden": "true", children: WEEKDAY_NAMES.map((name) => /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("span", { className: "scopetickets-island-calendar__weekday", children: name }, name)) })
11360
+ /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("div", { className: "scopetickets-island-calendar__weekdays", "aria-hidden": "true", children: WEEKDAY_NAMES.map((name) => /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("span", { className: "scopetickets-island-calendar__weekday", children: name }, name)) })
11010
11361
  );
11011
11362
  }
11012
11363
 
11013
11364
  // src/island/DayPicker.tsx
11014
- var import_jsx_runtime43 = require("react/jsx-runtime");
11365
+ var import_jsx_runtime44 = require("react/jsx-runtime");
11015
11366
  function DayPicker({
11016
11367
  series,
11017
11368
  today,
@@ -11044,10 +11395,10 @@ function DayPicker({
11044
11395
  [starts, currentMonth, onSelectDay]
11045
11396
  );
11046
11397
  if (weeks.length === 0) return null;
11047
- return /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)("div", { className: "scopetickets-island-calendar", "data-accessory": accessory, children: [
11048
- currentMonth !== null && /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(CalendarMonthHeading, { month: currentMonth }),
11049
- /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(CalendarWeekdayNames, {}),
11050
- /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
11398
+ return /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)("div", { className: "scopetickets-island-calendar", "data-accessory": accessory, children: [
11399
+ currentMonth !== null && /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(CalendarMonthHeading, { month: currentMonth }),
11400
+ /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(CalendarWeekdayNames, {}),
11401
+ /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
11051
11402
  CalendarScroller,
11052
11403
  {
11053
11404
  rowCount: weeks.length,
@@ -11055,7 +11406,7 @@ function DayPicker({
11055
11406
  onRowChange: setRow,
11056
11407
  onRowPreview: setShownRow,
11057
11408
  label: "Weeks of the run",
11058
- children: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
11409
+ children: /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
11059
11410
  CalendarRunGrid,
11060
11411
  {
11061
11412
  series,
@@ -11078,7 +11429,7 @@ var import_react35 = require("react");
11078
11429
 
11079
11430
  // src/island/CalendarWeekSection.tsx
11080
11431
  var import_react33 = require("react");
11081
- var import_jsx_runtime44 = require("react/jsx-runtime");
11432
+ var import_jsx_runtime45 = require("react/jsx-runtime");
11082
11433
  function CalendarWeekSection({
11083
11434
  series,
11084
11435
  today,
@@ -11133,16 +11484,16 @@ function CalendarWeekSection({
11133
11484
  );
11134
11485
  }, [weeks.length, visibleWeek, selectedWeek, selectedDay, onVisibleMonthChange]);
11135
11486
  if (weeks.length === 0) return null;
11136
- return /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)("div", { className: "scopetickets-island-week", children: [
11137
- /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(CalendarWeekdayNames, {}),
11138
- /* @__PURE__ */ (0, import_jsx_runtime44.jsx)("div", { className: "scopetickets-island-week__pager", ref: pagerRef, onScroll: paint, children: weeks.map((weekStart, index) => /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
11487
+ return /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)("div", { className: "scopetickets-island-week", children: [
11488
+ /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(CalendarWeekdayNames, {}),
11489
+ /* @__PURE__ */ (0, import_jsx_runtime45.jsx)("div", { className: "scopetickets-island-week__pager", ref: pagerRef, onScroll: paint, children: weeks.map((weekStart, index) => /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
11139
11490
  "div",
11140
11491
  {
11141
11492
  className: "scopetickets-island-week__page",
11142
11493
  ref: (node) => {
11143
11494
  pageRefs.current[index] = node;
11144
11495
  },
11145
- children: /* @__PURE__ */ (0, import_jsx_runtime44.jsx)("div", { className: "scopetickets-island-week__row", children: buildWeekRow(series, weekStart, { today, selectedDay }).map((cell, dayIndex) => /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
11496
+ children: /* @__PURE__ */ (0, import_jsx_runtime45.jsx)("div", { className: "scopetickets-island-week__row", children: buildWeekRow(series, weekStart, { today, selectedDay }).map((cell, dayIndex) => /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
11146
11497
  CalendarDay,
11147
11498
  {
11148
11499
  cell,
@@ -11160,14 +11511,14 @@ function CalendarWeekSection({
11160
11511
  }
11161
11512
 
11162
11513
  // src/island/SelectedDayHeading.tsx
11163
- var import_jsx_runtime45 = require("react/jsx-runtime");
11514
+ var import_jsx_runtime46 = require("react/jsx-runtime");
11164
11515
  function SelectedDayHeading({ day }) {
11165
- return /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)("h3", { className: "scopetickets-island-day-heading", children: [
11166
- /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)("span", { className: "scopetickets-island-day-heading__weekday", children: [
11516
+ return /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)("h3", { className: "scopetickets-island-day-heading", children: [
11517
+ /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)("span", { className: "scopetickets-island-day-heading__weekday", children: [
11167
11518
  formatDayWeekday(day),
11168
11519
  ","
11169
11520
  ] }),
11170
- /* @__PURE__ */ (0, import_jsx_runtime45.jsx)("span", { className: "scopetickets-island-day-heading__date", children: formatDayDate(day) })
11521
+ /* @__PURE__ */ (0, import_jsx_runtime46.jsx)("span", { className: "scopetickets-island-day-heading__date", children: formatDayDate(day) })
11171
11522
  ] });
11172
11523
  }
11173
11524
 
@@ -11175,7 +11526,7 @@ function SelectedDayHeading({ day }) {
11175
11526
  var import_react34 = require("react");
11176
11527
 
11177
11528
  // src/island/Timeslot.tsx
11178
- var import_jsx_runtime46 = require("react/jsx-runtime");
11529
+ var import_jsx_runtime47 = require("react/jsx-runtime");
11179
11530
  var REMAINING_SIZE = "var(--scopetickets-island-space-4)";
11180
11531
  var SELECTED_ARC = "var(--scopetickets-island-timeslot-ring-selected)";
11181
11532
  var TRACK = "var(--scopetickets-island-timeslot-track)";
@@ -11183,16 +11534,16 @@ var SELECTED_TRACK = "var(--scopetickets-island-timeslot-track-selected)";
11183
11534
  var SOLD_OUT = "Sold Out";
11184
11535
  function Timeslot({ cell, accessory, onSelect }) {
11185
11536
  if (isDatePickerCellSelectable(cell.state)) {
11186
- return /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(TimeslotButton, { cell, accessory, onSelect });
11537
+ return /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(TimeslotButton, { cell, accessory, onSelect });
11187
11538
  }
11188
- return /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(TimeslotFixed, { cell });
11539
+ return /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(TimeslotFixed, { cell });
11189
11540
  }
11190
11541
  function TimeslotRow({ cell }) {
11191
- return /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)("span", { className: "scopetickets-island-timeslot__times", children: [
11192
- /* @__PURE__ */ (0, import_jsx_runtime46.jsx)("span", { className: "scopetickets-island-timeslot__time", children: cell.slot.startTime }),
11193
- cell.slot.endTime === null ? null : /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)(import_jsx_runtime46.Fragment, { children: [
11194
- /* @__PURE__ */ (0, import_jsx_runtime46.jsx)("span", { className: "scopetickets-island-timeslot__dash", "aria-hidden": "true", children: "-" }),
11195
- /* @__PURE__ */ (0, import_jsx_runtime46.jsx)("span", { className: "scopetickets-island-timeslot__time", children: cell.slot.endTime })
11542
+ return /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)("span", { className: "scopetickets-island-timeslot__times", children: [
11543
+ /* @__PURE__ */ (0, import_jsx_runtime47.jsx)("span", { className: "scopetickets-island-timeslot__time", children: cell.slot.startTime }),
11544
+ cell.slot.endTime === null ? null : /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)(import_jsx_runtime47.Fragment, { children: [
11545
+ /* @__PURE__ */ (0, import_jsx_runtime47.jsx)("span", { className: "scopetickets-island-timeslot__dash", "aria-hidden": "true", children: "-" }),
11546
+ /* @__PURE__ */ (0, import_jsx_runtime47.jsx)("span", { className: "scopetickets-island-timeslot__time", children: cell.slot.endTime })
11196
11547
  ] }),
11197
11548
  cell.state === "UNAVAILABLE" ? (
11198
11549
  /*
@@ -11203,8 +11554,8 @@ function TimeslotRow({ cell }) {
11203
11554
  * merely BEGUN keeps its ring — it still has seats, and "Sold Out" over them
11204
11555
  * would be false.
11205
11556
  */
11206
- /* @__PURE__ */ (0, import_jsx_runtime46.jsx)("span", { className: "scopetickets-island-timeslot__soldout", children: SOLD_OUT })
11207
- ) : cell.slot.remaining === null ? null : /* @__PURE__ */ (0, import_jsx_runtime46.jsx)("span", { className: "scopetickets-island-timeslot__remaining", children: /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
11557
+ /* @__PURE__ */ (0, import_jsx_runtime47.jsx)("span", { className: "scopetickets-island-timeslot__soldout", children: SOLD_OUT })
11558
+ ) : cell.slot.remaining === null ? null : /* @__PURE__ */ (0, import_jsx_runtime47.jsx)("span", { className: "scopetickets-island-timeslot__remaining", children: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
11208
11559
  CounterRing,
11209
11560
  {
11210
11561
  progress: cell.slot.remaining,
@@ -11223,7 +11574,7 @@ function TimeslotButton({ cell, accessory, onSelect }) {
11223
11574
  const press = useIslandPress("element");
11224
11575
  const selected = cell.state === "SELECTED";
11225
11576
  const availability = readAvailability(cell.slot.remaining);
11226
- return /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
11577
+ return /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
11227
11578
  "button",
11228
11579
  {
11229
11580
  type: "button",
@@ -11232,23 +11583,23 @@ function TimeslotButton({ cell, accessory, onSelect }) {
11232
11583
  "aria-label": timeslotLabel(cell, availability?.announcement ?? null),
11233
11584
  onClick: () => onSelect(cell.slot.startTime),
11234
11585
  ...press,
11235
- children: /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)("span", { className: "scopetickets-island-timeslot__pill", "data-state": cell.state, children: [
11236
- /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(TimeslotRow, { cell }),
11237
- accessory === "LINE" && availability !== null ? /* @__PURE__ */ (0, import_jsx_runtime46.jsx)("span", { className: "scopetickets-island-timeslot__accessory", children: /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(CalendarDayIndicator, { level: availability.level }) }) : null
11586
+ children: /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)("span", { className: "scopetickets-island-timeslot__pill", "data-state": cell.state, children: [
11587
+ /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(TimeslotRow, { cell }),
11588
+ accessory === "LINE" && availability !== null ? /* @__PURE__ */ (0, import_jsx_runtime47.jsx)("span", { className: "scopetickets-island-timeslot__accessory", children: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(CalendarDayIndicator, { level: availability.level }) }) : null
11238
11589
  ] })
11239
11590
  }
11240
11591
  );
11241
11592
  }
11242
11593
  function TimeslotFixed({ cell }) {
11243
- return /* @__PURE__ */ (0, import_jsx_runtime46.jsx)("span", { className: "scopetickets-island-timeslot", children: /* @__PURE__ */ (0, import_jsx_runtime46.jsx)("span", { className: "scopetickets-island-timeslot__pill", "data-state": cell.state, children: /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(TimeslotRow, { cell }) }) });
11594
+ return /* @__PURE__ */ (0, import_jsx_runtime47.jsx)("span", { className: "scopetickets-island-timeslot", children: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)("span", { className: "scopetickets-island-timeslot__pill", "data-state": cell.state, children: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(TimeslotRow, { cell }) }) });
11244
11595
  }
11245
11596
 
11246
11597
  // src/island/TimeslotGroupSection.tsx
11247
- var import_jsx_runtime47 = require("react/jsx-runtime");
11598
+ var import_jsx_runtime48 = require("react/jsx-runtime");
11248
11599
  function TimeslotGroupSection({ group, accessory, onSelect }) {
11249
- return /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)("section", { className: "scopetickets-island-timeslots__group", children: [
11250
- group.label === null ? null : /* @__PURE__ */ (0, import_jsx_runtime47.jsx)("h4", { className: "scopetickets-island-timeslots__label", children: group.label }),
11251
- /* @__PURE__ */ (0, import_jsx_runtime47.jsx)("div", { className: "scopetickets-island-timeslots__list", children: group.cells.map((cell, index) => /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
11600
+ return /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)("section", { className: "scopetickets-island-timeslots__group", children: [
11601
+ group.label === null ? null : /* @__PURE__ */ (0, import_jsx_runtime48.jsx)("h4", { className: "scopetickets-island-timeslots__label", children: group.label }),
11602
+ /* @__PURE__ */ (0, import_jsx_runtime48.jsx)("div", { className: "scopetickets-island-timeslots__list", children: group.cells.map((cell, index) => /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
11252
11603
  Timeslot,
11253
11604
  {
11254
11605
  cell,
@@ -11261,7 +11612,7 @@ function TimeslotGroupSection({ group, accessory, onSelect }) {
11261
11612
  }
11262
11613
 
11263
11614
  // src/island/TimeslotPicker.tsx
11264
- var import_jsx_runtime48 = require("react/jsx-runtime");
11615
+ var import_jsx_runtime49 = require("react/jsx-runtime");
11265
11616
  function TimeslotPicker({
11266
11617
  slots,
11267
11618
  selection,
@@ -11275,7 +11626,7 @@ function TimeslotPicker({
11275
11626
  () => buildTimeslotGroups(slots, { selection, today, nowTime, grouping }),
11276
11627
  [slots, selection, today, nowTime, grouping]
11277
11628
  );
11278
- return /* @__PURE__ */ (0, import_jsx_runtime48.jsx)("div", { className: "scopetickets-island-timeslots", children: groups.map((group) => /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
11629
+ return /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("div", { className: "scopetickets-island-timeslots", children: groups.map((group) => /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
11279
11630
  TimeslotGroupSection,
11280
11631
  {
11281
11632
  group,
@@ -11330,7 +11681,7 @@ function reduceDaySwap(state, event) {
11330
11681
  }
11331
11682
 
11332
11683
  // src/island/TimePicker.tsx
11333
- var import_jsx_runtime49 = require("react/jsx-runtime");
11684
+ var import_jsx_runtime50 = require("react/jsx-runtime");
11334
11685
  function TimePicker({
11335
11686
  series,
11336
11687
  today,
@@ -11355,8 +11706,8 @@ function TimePicker({
11355
11706
  }
11356
11707
  };
11357
11708
  const shownSelection = swap.shown.day === selection.day ? selection : { day: swap.shown.day, startTime: null };
11358
- return /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)("div", { className: "scopetickets-island-time", "data-accessory": accessory, children: [
11359
- /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
11709
+ return /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)("div", { className: "scopetickets-island-time", "data-accessory": accessory, children: [
11710
+ /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
11360
11711
  CalendarWeekSection,
11361
11712
  {
11362
11713
  series,
@@ -11368,7 +11719,7 @@ function TimePicker({
11368
11719
  onVisibleMonthChange
11369
11720
  }
11370
11721
  ),
11371
- /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(
11722
+ /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)(
11372
11723
  "div",
11373
11724
  {
11374
11725
  className: "scopetickets-island-time__swap",
@@ -11376,8 +11727,8 @@ function TimePicker({
11376
11727
  style: swap.phase === "REST" ? void 0 : { "--scopetickets-island-swap-sign": swap.sign },
11377
11728
  onAnimationEnd: onSwapAnimationEnd,
11378
11729
  children: [
11379
- /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(SelectedDayHeading, { day: swap.shown.day }),
11380
- /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
11730
+ /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(SelectedDayHeading, { day: swap.shown.day }),
11731
+ /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
11381
11732
  TimeslotPicker,
11382
11733
  {
11383
11734
  slots: swap.shown.slots,
@@ -11396,7 +11747,7 @@ function TimePicker({
11396
11747
 
11397
11748
  // src/island/IslandPaymentFrame.tsx
11398
11749
  var import_react36 = require("react");
11399
- var import_jsx_runtime50 = require("react/jsx-runtime");
11750
+ var import_jsx_runtime51 = require("react/jsx-runtime");
11400
11751
  var MOUNTING_HEIGHT = 280;
11401
11752
  var HEIGHT_WAIT_MS = 6e3;
11402
11753
  var CART_NOT_FOUND = /cart was not found/i;
@@ -11564,7 +11915,7 @@ function IslandPaymentFrame({
11564
11915
  deliveredCancelRef.current = cancelSignal;
11565
11916
  post(buildCancelRequestedMessage(identity));
11566
11917
  }, [cancelSignal, active, identity, post]);
11567
- return /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
11918
+ return /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
11568
11919
  "iframe",
11569
11920
  {
11570
11921
  ref: frame,
@@ -11677,7 +12028,7 @@ function signalProviderReturn(payload) {
11677
12028
  }
11678
12029
 
11679
12030
  // src/island/ScopeTicketsCheckout.tsx
11680
- var import_jsx_runtime51 = require("react/jsx-runtime");
12031
+ var import_jsx_runtime52 = require("react/jsx-runtime");
11681
12032
  var PROVIDER_BUTTON_HEIGHT = 52;
11682
12033
  var CONFIRMS_ADDRESS = ACCOUNT_CREATION_ORDER[ACCOUNT_CREATION_ORDER.indexOf("CONFIRM_EMAIL") + 1];
11683
12034
  var NOTHING_COLLECTED = {
@@ -11751,7 +12102,7 @@ function ScopeTicketsCheckout({
11751
12102
  const [opensAt, setOpensAt] = (0, import_react37.useState)(null);
11752
12103
  const [booked, setBooked] = (0, import_react37.useState)(null);
11753
12104
  const auth = useAuthSession(seed);
11754
- const face = booked !== null ? /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
12105
+ const face = booked !== null ? /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
11755
12106
  BookingIsland,
11756
12107
  {
11757
12108
  appKey: props.appKey,
@@ -11768,7 +12119,7 @@ function ScopeTicketsCheckout({
11768
12119
  }
11769
12120
  ) : (
11770
12121
  /* Nothing to sell, so nothing to check out: the account card, and no cart face. */
11771
- intent === void 0 ? /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(RestingIsland, { ...props, auth }) : opensOn === "cart" && opensAt === null ? /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(RestingIsland, { ...props, auth, intent, onCheckOut: setOpensAt }) : /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
12122
+ intent === void 0 ? /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(RestingIsland, { ...props, auth }) : opensOn === "cart" && opensAt === null ? /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(RestingIsland, { ...props, auth, intent, onCheckOut: setOpensAt }) : /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
11772
12123
  PurchaseIsland,
11773
12124
  {
11774
12125
  ...props,
@@ -11779,7 +12130,7 @@ function ScopeTicketsCheckout({
11779
12130
  }
11780
12131
  )
11781
12132
  );
11782
- return /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(IslandContinuityContext.Provider, { value: CHECKOUT_CONTINUITY, children: face });
12133
+ return /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(IslandContinuityContext.Provider, { value: CHECKOUT_CONTINUITY, children: face });
11783
12134
  }
11784
12135
  function PurchaseIsland({
11785
12136
  appKey,
@@ -11865,7 +12216,16 @@ function PurchaseIsland({
11865
12216
  [userTypes, fetched.userTypes, partyAsking]
11866
12217
  );
11867
12218
  const standing = (0, import_react37.useMemo)(() => foldIntent(intent, collected), [intent, collected]);
12219
+ const [walkQuestionnaire, setWalkQuestionnaire] = (0, import_react37.useState)({ hasCart: false, load: { status: "IDLE" } });
12220
+ const walkQuestions = (0, import_react37.useMemo)(
12221
+ () => questionsInHand(fetched.questions, walkQuestionnaire.load, walkQuestionnaire.hasCart),
12222
+ [fetched.questions, walkQuestionnaire]
12223
+ );
11868
12224
  const orderedBuyer = (0, import_react37.useMemo)(() => orderBuyer(standing, session.auth), [standing, session.auth]);
12225
+ const answersInHand = (0, import_react37.useMemo)(
12226
+ () => ({ ...hostAnswers(intent?.answers), ...collected.answers }),
12227
+ [intent?.answers, collected.answers]
12228
+ );
11869
12229
  const situation = (0, import_react37.useMemo)(
11870
12230
  () => ({
11871
12231
  name: "The host composes what it holds",
@@ -11886,12 +12246,13 @@ function PurchaseIsland({
11886
12246
  */
11887
12247
  excused: [
11888
12248
  ...excusedByIntent(
11889
- /*
11890
- * WHAT THE EVENT ACTUALLY ASKS, where the platform said. `asksQuestions` is a
11891
- * host's claim; the tickets carry the questions, so a run that asks none excuses
11892
- * the step without anybody having to remember to say so.
11893
- */
11894
- fetched.questions.length > 0 ? { ...intent, asksQuestions: true } : intent
12249
+ // Unknown or failed questions keep the step.
12250
+ walkQuestions.status !== "READY" || walkQuestions.questions.length > 0 ? {
12251
+ ...intent,
12252
+ asksQuestions: true,
12253
+ // Host answers skip the step only if they cover every question.
12254
+ answers: walkQuestions.status === "READY" && !questionsAnswered(walkQuestions.questions, hostAnswers(intent.answers)) ? void 0 : intent.answers
12255
+ } : intent
11895
12256
  ),
11896
12257
  /*
11897
12258
  * AND A RUN THAT SELLS NO SESSIONS IS NOT ASKED FOR ONE. `HasTimeslot` is the
@@ -11912,7 +12273,7 @@ function PurchaseIsland({
11912
12273
  savedPaymentMethod: intent.paymentMethodKey !== void 0,
11913
12274
  devicePasskey: false
11914
12275
  }),
11915
- [intent, fetched.questions.length, fetched.hasTimeslots, photos.length]
12276
+ [intent, walkQuestions, fetched.hasTimeslots, photos.length]
11916
12277
  );
11917
12278
  const [accountChosen, setAccountChosen] = (0, import_react37.useState)(false);
11918
12279
  const [passwordRevealed, setPasswordRevealed] = (0, import_react37.useState)(false);
@@ -12018,6 +12379,19 @@ function PurchaseIsland({
12018
12379
  */
12019
12380
  userTypeNames2
12020
12381
  );
12382
+ const questionnaire = (0, import_react37.useMemo)(
12383
+ () => questionsInHand(fetched.questions, order.eventQuestions, order.cart !== null),
12384
+ [fetched.questions, order.eventQuestions, order.cart]
12385
+ );
12386
+ const answersReady = questionnaire.status === "READY" && questionsAnswered(questionnaire.questions, answersInHand);
12387
+ const answersSaved = answersLocked(order.answers);
12388
+ (0, import_react37.useEffect)(() => {
12389
+ setWalkQuestionnaire({ hasCart: order.cart !== null, load: order.eventQuestions });
12390
+ }, [order.cart, order.eventQuestions]);
12391
+ const saveForCharge = (0, import_react37.useCallback)(
12392
+ () => questionnaire.status !== "READY" || !answersReady ? Promise.resolve(false) : order.saveAnswers(questionnaire.questions, answersInHand).then((saved) => saved && order.saveBuyer(buyerDetails(orderedBuyer))),
12393
+ [order, questionnaire, answersReady, answersInHand, orderedBuyer]
12394
+ );
12021
12395
  (0, import_react37.useEffect)(() => {
12022
12396
  if (order.fill.status !== "FAILED" || typeof console === "undefined") return;
12023
12397
  console.warn(
@@ -12091,6 +12465,11 @@ function PurchaseIsland({
12091
12465
  const index = Math.min(Math.max(from, floor), last);
12092
12466
  const walked = walk.stops[index]?.step ?? "REVIEW";
12093
12467
  const stepId = detour ?? (outcome?.kind === "FAILED" ? "PAYMENT_FAILED" : walked);
12468
+ (0, import_react37.useEffect)(() => {
12469
+ if (questionnaire.status !== "READY" || answersReady || floor > 0) return;
12470
+ const details = walk.stops.findIndex((stop) => stop.step === "DETAILS");
12471
+ if (details !== -1 && from > details) setAt("DETAILS");
12472
+ }, [questionnaire.status, answersReady, floor, walk.stops, from]);
12094
12473
  const passkeyRegistration = usePasskeyRegistration(accounts, stepId === "PASSKEY");
12095
12474
  const step = purchaseStep(stepId);
12096
12475
  const ratedTicket = outcome?.kind === "PLACED" ? outcome.attendeeTicketKey : void 0;
@@ -12152,7 +12531,7 @@ function PurchaseIsland({
12152
12531
  setRevolutCart(key);
12153
12532
  setSavedRevolutCart(null);
12154
12533
  }
12155
- void order.saveBuyer(buyerDetails(orderedBuyer)).then((saved) => {
12534
+ void saveForCharge().then((saved) => {
12156
12535
  if (!saved || selectionRequest.current !== request) return;
12157
12536
  if (wallet) setSavedWalletCart(key);
12158
12537
  else setSavedRevolutCart(key);
@@ -12171,7 +12550,7 @@ function PurchaseIsland({
12171
12550
  const funnel = useAuthFunnel(signIns, auth);
12172
12551
  useSessionGuard(client, auth);
12173
12552
  const raised = (0, import_react37.useMemo)(
12174
- () => raiseFor(order.fill) ?? raiseForAccount(accountFlow.progress, accountFlow.outcome) ?? raiseForSignIn(signIn2.state, funnel.state) ?? /*
12553
+ () => raiseFor(order.fill) ?? raiseForQuestions(order.eventQuestions) ?? raiseForAnswers(order.answers) ?? raiseForAccount(accountFlow.progress, accountFlow.outcome) ?? raiseForSignIn(signIn2.state, funnel.state) ?? /*
12175
12554
  * THE RATING LAST, because it is the least of them. Everything above is about the
12176
12555
  * order or the way into an account; a rating that did not send is news about a
12177
12556
  * courtesy, and a buyer holding both should be told about the one that matters.
@@ -12179,6 +12558,8 @@ function PurchaseIsland({
12179
12558
  raiseForFeedback(feedback.submission),
12180
12559
  [
12181
12560
  order.fill,
12561
+ order.eventQuestions,
12562
+ order.answers,
12182
12563
  accountFlow.progress,
12183
12564
  accountFlow.outcome,
12184
12565
  signIn2.state,
@@ -12198,6 +12579,15 @@ function PurchaseIsland({
12198
12579
  if (raised?.id === "SIGN_IN_NOT_COMPLETED") signIn2.retry();
12199
12580
  if (raised?.id === "SIGN_IN_UNREACHABLE") funnel.open(standing.buyer?.email ?? "");
12200
12581
  if (raised?.id === "FEEDBACK_NOT_SENT") feedback.retry();
12582
+ if (raised?.id === "QUESTIONS_NOT_LOADED") order.retryEventQuestions();
12583
+ if (raised?.id === "ANSWERS_NOT_SAVED") {
12584
+ const key = order.cart?.Key;
12585
+ void saveForCharge().then((saved) => {
12586
+ if (!saved || key === void 0) return;
12587
+ setSavedRevolutCart(key);
12588
+ setSavedWalletCart(key);
12589
+ });
12590
+ }
12201
12591
  if (raised?.id === "ACCOUNT_NOT_CREATED") {
12202
12592
  accountFlow.create(
12203
12593
  {
@@ -12221,7 +12611,9 @@ function PurchaseIsland({
12221
12611
  collected.firstName,
12222
12612
  collected.lastName,
12223
12613
  collected.phone,
12224
- walk.stops
12614
+ walk.stops,
12615
+ saveForCharge,
12616
+ order
12225
12617
  ]
12226
12618
  );
12227
12619
  const forward = (0, import_react37.useCallback)(() => {
@@ -12397,7 +12789,7 @@ function PurchaseIsland({
12397
12789
  }
12398
12790
  if (action.pays === true) {
12399
12791
  return () => {
12400
- void order.saveBuyer(buyerDetails(orderedBuyer)).then((saved) => {
12792
+ void saveForCharge().then((saved) => {
12401
12793
  if (!saved) return;
12402
12794
  setSubmitSignal((was) => was + 1);
12403
12795
  });
@@ -12417,7 +12809,7 @@ function PurchaseIsland({
12417
12809
  detour,
12418
12810
  forward,
12419
12811
  order,
12420
- orderedBuyer,
12812
+ saveForCharge,
12421
12813
  walletCharging,
12422
12814
  /* The funnel's prefill is the address TYPED, not the order's — see its press below. */
12423
12815
  standing.buyer?.email,
@@ -12657,20 +13049,20 @@ function PurchaseIsland({
12657
13049
  };
12658
13050
  (0, import_react37.useEffect)(() => {
12659
13051
  const key = order.cart?.Key;
12660
- if (stepId !== "REVIEW" || key === void 0 || revolutCart === key) return;
13052
+ if (stepId !== "REVIEW" || key === void 0 || revolutCart === key || !answersReady) return;
12661
13053
  setRevolutCart(key);
12662
13054
  setWalletCart(key);
12663
13055
  const request = ++selectionRequest.current;
12664
- void order.saveBuyer(buyerDetails(orderedBuyer)).then((saved) => {
13056
+ void saveForCharge().then((saved) => {
12665
13057
  if (!saved || selectionRequest.current !== request) return;
12666
13058
  setSavedRevolutCart(key);
12667
13059
  setSavedWalletCart(key);
12668
13060
  });
12669
- }, [stepId, order.cart?.Key, revolutCart]);
13061
+ }, [stepId, order.cart?.Key, revolutCart, answersReady]);
12670
13062
  const [cardStatus, setCardStatus] = (0, import_react37.useState)(null);
12671
13063
  const checkoutSessionId = (0, import_react37.useMemo)(() => crypto.randomUUID(), [order.cart?.Key]);
12672
- const payEntries = frameMounted ? /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)(import_jsx_runtime51.Fragment, { children: [
12673
- /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("div", { className: "scopetickets-island-bay__field", hidden: !cardChosen || frameHeight === null, children: /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
13064
+ const payEntries = frameMounted ? /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)(import_jsx_runtime52.Fragment, { children: [
13065
+ /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("div", { className: "scopetickets-island-bay__field", hidden: !cardChosen || frameHeight === null, children: /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
12674
13066
  IslandPaymentFrame,
12675
13067
  {
12676
13068
  hostUrl: ENVIRONMENT_URLS[source?.environment ?? "production"].paymentHostUrl,
@@ -12715,7 +13107,7 @@ function PurchaseIsland({
12715
13107
  * dead attempt to resurrect. A cancel or a decline is the host's own
12716
13108
  * cancellation housekeeping, which re-arms the button itself.
12717
13109
  */
12718
- /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("div", { className: walletVisible ? void 0 : "scopetickets-island-bay__offstage", children: /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
13110
+ /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("div", { className: walletVisible ? void 0 : "scopetickets-island-bay__offstage", children: /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
12719
13111
  IslandPaymentFrame,
12720
13112
  {
12721
13113
  hostUrl: ENVIRONMENT_URLS[source?.environment ?? "production"].paymentHostUrl,
@@ -12751,11 +13143,11 @@ function PurchaseIsland({
12751
13143
  },
12752
13144
  `wallet:${order.cart.Key}`
12753
13145
  ) }),
12754
- revolutCart === order.cart.Key && /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
13146
+ revolutCart === order.cart.Key && /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
12755
13147
  "div",
12756
13148
  {
12757
13149
  className: journeyInline && journeyFullscreen ? "scopetickets-island-bay__journey" : revolutVisible ? void 0 : "scopetickets-island-bay__offstage",
12758
- children: /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
13150
+ children: /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
12759
13151
  IslandPaymentFrame,
12760
13152
  {
12761
13153
  hostUrl: ENVIRONMENT_URLS[source?.environment ?? "production"].paymentHostUrl,
@@ -12797,16 +13189,16 @@ function PurchaseIsland({
12797
13189
  }
12798
13190
  )
12799
13191
  ] }) : null;
12800
- const bay = frameMounted || bayOpen ? /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("div", { className: "scopetickets-island-bay__buttons", children: payEntries }) : void 0;
13192
+ const bay = frameMounted || bayOpen ? /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("div", { className: "scopetickets-island-bay__buttons", children: payEntries }) : void 0;
12801
13193
  if (notice !== null) {
12802
- return /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
13194
+ return /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
12803
13195
  CheckoutIsland,
12804
13196
  {
12805
13197
  mode,
12806
13198
  align,
12807
13199
  placement,
12808
13200
  contentKey: `NOTICE:${notice.id}`,
12809
- avatar: /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
13201
+ avatar: /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
12810
13202
  import_avatar5.Avatar,
12811
13203
  {
12812
13204
  subject: { kind: "user", avatar: heroAvatar, assets: avatarAssets },
@@ -12821,7 +13213,7 @@ function PurchaseIsland({
12821
13213
  );
12822
13214
  }
12823
13215
  if (cartOpen && held !== void 0) {
12824
- return /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
13216
+ return /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
12825
13217
  CheckoutIsland,
12826
13218
  {
12827
13219
  mode,
@@ -12830,7 +13222,7 @@ function PurchaseIsland({
12830
13222
  contentKey: "CART",
12831
13223
  bay,
12832
13224
  bayVisible: false,
12833
- avatar: /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
13225
+ avatar: /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
12834
13226
  import_avatar5.Avatar,
12835
13227
  {
12836
13228
  subject: { kind: "user", avatar: heroAvatar, assets: avatarAssets },
@@ -12841,7 +13233,7 @@ function PurchaseIsland({
12841
13233
  }
12842
13234
  ),
12843
13235
  ...cartViewProps(
12844
- /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
13236
+ /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
12845
13237
  CartLines,
12846
13238
  {
12847
13239
  lines: drawnCartLines,
@@ -12857,14 +13249,14 @@ function PurchaseIsland({
12857
13249
  );
12858
13250
  }
12859
13251
  if (funnelOpen(funnel.state)) {
12860
- return /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
13252
+ return /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
12861
13253
  CheckoutIsland,
12862
13254
  {
12863
13255
  mode,
12864
13256
  align,
12865
13257
  placement,
12866
13258
  contentKey: "FUNNEL",
12867
- avatar: /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
13259
+ avatar: /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
12868
13260
  import_avatar5.Avatar,
12869
13261
  {
12870
13262
  subject: { kind: "user", avatar: heroAvatar, assets: avatarAssets },
@@ -12882,14 +13274,14 @@ function PurchaseIsland({
12882
13274
  );
12883
13275
  }
12884
13276
  if (timedOut && expanded && drawnHold !== void 0) {
12885
- return /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
13277
+ return /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
12886
13278
  CheckoutIsland,
12887
13279
  {
12888
13280
  mode,
12889
13281
  align,
12890
13282
  placement,
12891
13283
  contentKey: "HOLD_TIMED_OUT",
12892
- avatar: /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
13284
+ avatar: /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
12893
13285
  import_avatar5.Avatar,
12894
13286
  {
12895
13287
  subject: { kind: "user", avatar: heroAvatar, assets: avatarAssets },
@@ -12904,7 +13296,7 @@ function PurchaseIsland({
12904
13296
  );
12905
13297
  }
12906
13298
  const waitingOnPayment = stepId === "PROCESSING" && journey.kind === "unresolved" && !terminalPayment;
12907
- const input = offersPasskeySignIn ? /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
13299
+ const input = offersPasskeySignIn ? /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
12908
13300
  PasskeyButton,
12909
13301
  {
12910
13302
  hostUrl: passkeyEnvironment.passkeyHostUrl,
@@ -12912,7 +13304,7 @@ function PurchaseIsland({
12912
13304
  label: AUTH_COPY.USE_PASSKEY,
12913
13305
  onResult: signIn2.onResult
12914
13306
  }
12915
- ) : waitingOnPayment ? /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("div", { className: "scopetickets-island-payment-waiting", children: /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
13307
+ ) : waitingOnPayment ? /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("div", { className: "scopetickets-island-payment-waiting", children: /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
12916
13308
  ProcessingSlowIcon,
12917
13309
  {
12918
13310
  className: "scopetickets-island-payment-waiting-glyph",
@@ -12943,7 +13335,8 @@ function PurchaseIsland({
12943
13335
  schedule: drawnSchedule,
12944
13336
  onPartyRefused: setPartyRefused,
12945
13337
  partyRefused,
12946
- questions: fetched.questions,
13338
+ questions: questionnaire.status === "READY" ? questionnaire.questions : [],
13339
+ answersLocked: answersSaved,
12947
13340
  follow: fetched.follow,
12948
13341
  buyerEmail: standing.buyer?.email,
12949
13342
  scheduleDay: chosenDay,
@@ -13023,7 +13416,7 @@ function PurchaseIsland({
13023
13416
  stepId === "NAME" ? isCompleteName(
13024
13417
  standing.buyer?.firstName ?? "",
13025
13418
  standing.buyer?.lastName ?? ""
13026
- ) : stepId === "EMAIL" ? isValidEmail(collected.email) : stepId === "PHONE" ? e164(collected.phone.dialCode, collected.phone.national) !== null : input === null || answered
13419
+ ) : stepId === "EMAIL" ? isValidEmail(collected.email) : stepId === "PHONE" ? e164(collected.phone.dialCode, collected.phone.national) !== null : stepId === "DETAILS" ? questionnaire.status === "READY" && questionsAnswered(questionnaire.questions, collected.answers) : input === null || answered
13027
13420
  )
13028
13421
  )
13029
13422
  )
@@ -13054,7 +13447,7 @@ function PurchaseIsland({
13054
13447
  * checkout this is. A card with no hold has the room for it; one with a hold has
13055
13448
  * something more useful to say in the only line it has.
13056
13449
  */
13057
- stepId === "REVIEW" || stepId === "PAYMENT" ? drawnHold === void 0 ? POWERED_BY : CART_VIEW.remaining(formatHold(drawnHold)) : copy?.subtitle
13450
+ stepId === "REVIEW" || stepId === "PAYMENT" ? drawnHold === void 0 ? POWERED_BY : CART_VIEW.remaining(formatHold(drawnHold)) : stepId === "DETAILS" && answersSaved ? DETAILS_SAVED_SUBTITLE : copy?.subtitle
13058
13451
  );
13059
13452
  const lines = drawnQuote === void 0 ? null : quoteLines(drawnQuote);
13060
13453
  const title = paidRecovery ? "Payment Received" : stepId === "ACCOUNT_CREATED" ? accountCreatedTitle(accountFirstName) : stepId === "REVIEW" && lines !== null ? `Pay ${lines.headline}` : (
@@ -13063,7 +13456,7 @@ function PurchaseIsland({
13063
13456
  * MONEY and not a percentage — see `promoSaved`, where the reason no endpoint
13064
13457
  * can answer for a rate is written down.
13065
13458
  */
13066
- stepId === "PROMO" && promoSaving !== null ? /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("span", { className: "scopetickets-island-promo__saved", children: PROMO_COPY.saved(promoSaving) }) : copy?.title
13459
+ stepId === "PROMO" && promoSaving !== null ? /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("span", { className: "scopetickets-island-promo__saved", children: PROMO_COPY.saved(promoSaving) }) : copy?.title
13067
13460
  );
13068
13461
  const baseActions = authCard?.actions ?? STEP_CARD_ACTIONS[stepId];
13069
13462
  const creatingOrder = pressCreatesOrder(stepId, walk.stops[index + 1]?.step);
@@ -13120,7 +13513,7 @@ function PurchaseIsland({
13120
13513
  label: passwordRevealed ? "Hide Entered Text" : "Show Entered Text",
13121
13514
  mark: {
13122
13515
  side: "leading",
13123
- node: passwordRevealed ? /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(import_icons14.EyeToCenterWithStrikethroughIcon, { size: 14, color: "currentColor" }) : /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(import_icons14.EyeToCenterIcon, { size: 14, color: "currentColor" })
13516
+ node: passwordRevealed ? /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(import_icons14.EyeToCenterWithStrikethroughIcon, { size: 14, color: "currentColor" }) : /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(import_icons14.EyeToCenterIcon, { size: 14, color: "currentColor" })
13124
13517
  },
13125
13518
  onPress: () => setPasswordRevealed((was) => !was)
13126
13519
  }
@@ -13184,7 +13577,7 @@ function PurchaseIsland({
13184
13577
  const heroSize = expanded ? 25 : 10;
13185
13578
  const closable = !UNCLOSABLE_STEPS.has(stepId);
13186
13579
  const payHoldBadge = (stepId === "REVIEW" || stepId === "PAYMENT") && drawnHold !== void 0 ? holdBadge(drawnHold) : null;
13187
- const hero = /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
13580
+ const hero = /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
13188
13581
  import_avatar5.Avatar,
13189
13582
  {
13190
13583
  subject: { kind: "user", avatar: heroAvatar, assets: avatarAssets },
@@ -13194,7 +13587,7 @@ function PurchaseIsland({
13194
13587
  transitionKey: HERO_TRANSITION_KEY
13195
13588
  }
13196
13589
  );
13197
- return /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
13590
+ return /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
13198
13591
  CheckoutIsland,
13199
13592
  {
13200
13593
  mode,
@@ -13230,7 +13623,7 @@ function PurchaseIsland({
13230
13623
  * pill: both are what the pill OPENS, and a control that re-opens the card you are
13231
13624
  * standing on is a control that does nothing. The way out is the header's back.
13232
13625
  */
13233
- detour === "PROMO" || cartOpen ? void 0 : summary === void 0 ? /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
13626
+ detour === "PROMO" || cartOpen ? void 0 : summary === void 0 ? /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
13234
13627
  ComposeFunnel,
13235
13628
  {
13236
13629
  stops: composeFunnel(
@@ -13241,7 +13634,7 @@ function PurchaseIsland({
13241
13634
  onGo: goToStep,
13242
13635
  label: COMPOSE_FUNNEL_LABEL
13243
13636
  }
13244
- ) : /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
13637
+ ) : /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
13245
13638
  IslandCommitPill,
13246
13639
  {
13247
13640
  onOpenCart: openCart,
@@ -13272,6 +13665,7 @@ function stepInput(stepId, context) {
13272
13665
  onPartyRefused,
13273
13666
  partyRefused,
13274
13667
  questions,
13668
+ answersLocked: answersLocked2,
13275
13669
  follow,
13276
13670
  buyerEmail,
13277
13671
  buyerName: buyerName2,
@@ -13301,7 +13695,7 @@ function stepInput(stepId, context) {
13301
13695
  * from, which is the platform's and had nowhere to arrive.
13302
13696
  */
13303
13697
  case "DATE":
13304
- return schedule === void 0 ? null : /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
13698
+ return schedule === void 0 ? null : /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
13305
13699
  DayPicker,
13306
13700
  {
13307
13701
  series: schedule.series,
@@ -13314,7 +13708,7 @@ function stepInput(stepId, context) {
13314
13708
  case "TIME": {
13315
13709
  if (schedule === void 0) return null;
13316
13710
  const day = scheduleDay ?? schedule.today;
13317
- return /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
13711
+ return /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
13318
13712
  TimePicker,
13319
13713
  {
13320
13714
  series: schedule.series,
@@ -13340,30 +13734,69 @@ function stepInput(stepId, context) {
13340
13734
  /*
13341
13735
  * THE EVENT'S OWN QUESTIONS. The card was a gate onto nothing: `DETAILS` had no case
13342
13736
  * here, so it drew a sentence about needing details and no way to give any. The
13343
- * questions ride on the tickets, so they are already in hand by the time this is asked.
13737
+ * questions come from the tickets and the event's questionnaire, which arrives with the
13738
+ * cart, so they are in hand by the time this is asked.
13344
13739
  */
13345
13740
  case "DETAILS":
13346
- return questions.length === 0 ? null : /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("div", { className: "scopetickets-island-card__fields", children: questions.map((question) => /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
13347
- TextField,
13348
- {
13349
- label: question.Question,
13350
- value: collected.answers[String(question.QuestionId)] ?? "",
13351
- onChange: (value) => setCollected((was) => ({
13352
- ...was,
13353
- answers: { ...was.answers, [String(question.QuestionId)]: value }
13354
- })),
13355
- type: question.Type === "date" ? "text" : "text",
13356
- enterKeyHint: "done"
13357
- },
13358
- question.QuestionId
13359
- )) });
13741
+ return questions.length === 0 ? null : /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("div", { className: "scopetickets-island-card__fields", children: questions.map((question) => {
13742
+ const key = String(question.QuestionId);
13743
+ const value = collected.answers[key];
13744
+ const answer = answersLocked2 ? void 0 : (next) => setCollected((was) => ({ ...was, answers: { ...was.answers, [key]: next } }));
13745
+ const kind = questionKind(question);
13746
+ switch (kind) {
13747
+ case "AGREEMENT":
13748
+ return /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)("div", { className: "scopetickets-island-card__agreement", children: [
13749
+ /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("span", { className: "scopetickets-island-card__agreement-label", children: question.Question }),
13750
+ /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
13751
+ Switch,
13752
+ {
13753
+ checked: value === AGREED,
13754
+ label: question.Question,
13755
+ onChange: (on) => answer?.(on ? AGREED : NOT_AGREED),
13756
+ disabled: answersLocked2
13757
+ }
13758
+ )
13759
+ ] }, question.QuestionId);
13760
+ case "INTEGER":
13761
+ return /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
13762
+ TextField,
13763
+ {
13764
+ label: question.Question,
13765
+ value: value ?? "",
13766
+ onChange: answer,
13767
+ inputMode: "numeric",
13768
+ maxLength: 11,
13769
+ readOnly: answersLocked2,
13770
+ enterKeyHint: "done"
13771
+ },
13772
+ question.QuestionId
13773
+ );
13774
+ case "TEXT":
13775
+ return /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
13776
+ TextField,
13777
+ {
13778
+ label: question.Question,
13779
+ value: value ?? "",
13780
+ onChange: answer,
13781
+ maxLength: MAX_ANSWER_LENGTH,
13782
+ readOnly: answersLocked2,
13783
+ enterKeyHint: "done"
13784
+ },
13785
+ question.QuestionId
13786
+ );
13787
+ default: {
13788
+ const exhaustive = kind;
13789
+ return exhaustive;
13790
+ }
13791
+ }
13792
+ }) });
13360
13793
  /*
13361
13794
  * WHO TO HEAR FROM AGAIN. `FollowList` was built and tested and mounted by nothing —
13362
13795
  * the organiser and the venue are on every event, and they are who a buyer would
13363
13796
  * follow.
13364
13797
  */
13365
13798
  case "FOLLOW":
13366
- return follow.length === 0 ? null : /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
13799
+ return follow.length === 0 ? null : /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
13367
13800
  FollowList,
13368
13801
  {
13369
13802
  entities: follow,
@@ -13379,7 +13812,7 @@ function stepInput(stepId, context) {
13379
13812
  * TICKET the number ends up against is the widget's business and not this card's.
13380
13813
  */
13381
13814
  case "FEEDBACK":
13382
- return /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
13815
+ return /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
13383
13816
  StarRating,
13384
13817
  {
13385
13818
  value: collected.rating,
@@ -13389,7 +13822,7 @@ function stepInput(stepId, context) {
13389
13822
  );
13390
13823
  case "PARTY":
13391
13824
  if (party.status === "ASKING") return null;
13392
- return /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
13825
+ return /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
13393
13826
  PartyStepper,
13394
13827
  {
13395
13828
  onRefuse: onPartyRefused,
@@ -13405,7 +13838,7 @@ function stepInput(stepId, context) {
13405
13838
  }
13406
13839
  );
13407
13840
  case "NAME":
13408
- return /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
13841
+ return /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
13409
13842
  NameStep,
13410
13843
  {
13411
13844
  value: buyerName2,
@@ -13414,7 +13847,7 @@ function stepInput(stepId, context) {
13414
13847
  }
13415
13848
  );
13416
13849
  case "EMAIL":
13417
- return /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
13850
+ return /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
13418
13851
  EmailStep,
13419
13852
  {
13420
13853
  value: collected.email,
@@ -13423,7 +13856,7 @@ function stepInput(stepId, context) {
13423
13856
  }
13424
13857
  );
13425
13858
  case "PHONE":
13426
- return /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
13859
+ return /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
13427
13860
  PhoneStep,
13428
13861
  {
13429
13862
  value: collected.phone,
@@ -13436,7 +13869,7 @@ function stepInput(stepId, context) {
13436
13869
  * own save prompt. See `PasswordStep`'s hidden username.
13437
13870
  */
13438
13871
  case "PASSWORD":
13439
- return /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
13872
+ return /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
13440
13873
  PasswordStep,
13441
13874
  {
13442
13875
  revealed: passwordRevealed,
@@ -13446,7 +13879,7 @@ function stepInput(stepId, context) {
13446
13879
  }
13447
13880
  );
13448
13881
  case "CONFIRM_EMAIL":
13449
- return /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
13882
+ return /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
13450
13883
  ConfirmEmailStep,
13451
13884
  {
13452
13885
  initialEmail: buyerEmail ?? "",
@@ -13455,7 +13888,7 @@ function stepInput(stepId, context) {
13455
13888
  }
13456
13889
  );
13457
13890
  case "VERIFY_EMAIL":
13458
- return /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
13891
+ return /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
13459
13892
  VerifyEmailStep,
13460
13893
  {
13461
13894
  onAnsweredChange,
@@ -13470,7 +13903,7 @@ function stepInput(stepId, context) {
13470
13903
  * only the Skip for this step; see `cardActions`.
13471
13904
  */
13472
13905
  case "PASSKEY":
13473
- return /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
13906
+ return /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
13474
13907
  PasskeyButton,
13475
13908
  {
13476
13909
  hostUrl: passkey.hostUrl,
@@ -13485,7 +13918,7 @@ function stepInput(stepId, context) {
13485
13918
  * `CheckoutProps.profilePhotos`.
13486
13919
  */
13487
13920
  case "PROFILE_PHOTO":
13488
- return photos.length === 0 ? null : /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
13921
+ return photos.length === 0 ? null : /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
13489
13922
  ProfilePhotoPicker,
13490
13923
  {
13491
13924
  photos,
@@ -13505,8 +13938,8 @@ function stepInput(stepId, context) {
13505
13938
  case "PROMO": {
13506
13939
  const { typed, onTyped, applied, write } = context.promo;
13507
13940
  const refused4 = write.status === "REFUSED";
13508
- return /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)(import_jsx_runtime51.Fragment, { children: [
13509
- /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
13941
+ return /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)(import_jsx_runtime52.Fragment, { children: [
13942
+ /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
13510
13943
  TextField,
13511
13944
  {
13512
13945
  id: "promo-code",
@@ -13521,7 +13954,7 @@ function stepInput(stepId, context) {
13521
13954
  flagTitle: refused4 ? void 0 : PROMO_COPY.accepted
13522
13955
  }
13523
13956
  ),
13524
- refused4 ? /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("p", { className: "scopetickets-island-promo__refusal", role: "status", children: write.reason }) : null
13957
+ refused4 ? /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("p", { className: "scopetickets-island-promo__refusal", role: "status", children: write.reason }) : null
13525
13958
  ] });
13526
13959
  }
13527
13960
  default:
@@ -13531,7 +13964,7 @@ function stepInput(stepId, context) {
13531
13964
 
13532
13965
  // src/PaymentReturn.tsx
13533
13966
  var import_react38 = require("react");
13534
- var import_jsx_runtime52 = require("react/jsx-runtime");
13967
+ var import_jsx_runtime53 = require("react/jsx-runtime");
13535
13968
  var CART_ALREADY_CONVERTED_MESSAGE = "Cart was altered while attempting to confirm the transaction";
13536
13969
  var CARRIED_CHECKOUT_PARAMS2 = ["event", "eventKey", "cartKey", "checkoutSessionId"];
13537
13970
  function checkoutReturnUrl(checkoutPath, search) {
@@ -13631,32 +14064,32 @@ function PaymentReturn({
13631
14064
  }
13632
14065
  }, 150);
13633
14066
  };
13634
- const wayBack = checkoutPath === void 0 && !window.opener ? null : /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("button", { type: "button", onClick: goBack, className: "scopetickets-payment-return__back", children: "Return to checkout" });
14067
+ const wayBack = checkoutPath === void 0 && !window.opener ? null : /* @__PURE__ */ (0, import_jsx_runtime53.jsx)("button", { type: "button", onClick: goBack, className: "scopetickets-payment-return__back", children: "Return to checkout" });
13635
14068
  if (state.status === "processing") {
13636
- return /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("div", { className: "scopetickets-payment-return scopetickets-payment-return--processing", children: /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("p", { children: "Completing your payment..." }) });
14069
+ return /* @__PURE__ */ (0, import_jsx_runtime53.jsx)("div", { className: "scopetickets-payment-return scopetickets-payment-return--processing", children: /* @__PURE__ */ (0, import_jsx_runtime53.jsx)("p", { children: "Completing your payment..." }) });
13637
14070
  }
13638
14071
  if (state.status === "completed") {
13639
- return /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)("div", { className: "scopetickets-payment-return scopetickets-payment-return--success", children: [
13640
- /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("p", { children: "Payment successful!" }),
13641
- /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("p", { children: "You can close this window." })
14072
+ return /* @__PURE__ */ (0, import_jsx_runtime53.jsxs)("div", { className: "scopetickets-payment-return scopetickets-payment-return--success", children: [
14073
+ /* @__PURE__ */ (0, import_jsx_runtime53.jsx)("p", { children: "Payment successful!" }),
14074
+ /* @__PURE__ */ (0, import_jsx_runtime53.jsx)("p", { children: "You can close this window." })
13642
14075
  ] });
13643
14076
  }
13644
14077
  if (state.status === "cancelled") {
13645
- return /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)("div", { className: "scopetickets-payment-return scopetickets-payment-return--cancelled", children: [
13646
- /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("p", { children: "Payment was cancelled." }),
14078
+ return /* @__PURE__ */ (0, import_jsx_runtime53.jsxs)("div", { className: "scopetickets-payment-return scopetickets-payment-return--cancelled", children: [
14079
+ /* @__PURE__ */ (0, import_jsx_runtime53.jsx)("p", { children: "Payment was cancelled." }),
13647
14080
  wayBack
13648
14081
  ] });
13649
14082
  }
13650
- return /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)("div", { className: "scopetickets-payment-return scopetickets-payment-return--failed", children: [
13651
- /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("p", { children: "Payment failed" }),
13652
- /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("p", { children: state.message }),
14083
+ return /* @__PURE__ */ (0, import_jsx_runtime53.jsxs)("div", { className: "scopetickets-payment-return scopetickets-payment-return--failed", children: [
14084
+ /* @__PURE__ */ (0, import_jsx_runtime53.jsx)("p", { children: "Payment failed" }),
14085
+ /* @__PURE__ */ (0, import_jsx_runtime53.jsx)("p", { children: state.message }),
13653
14086
  wayBack
13654
14087
  ] });
13655
14088
  }
13656
14089
 
13657
14090
  // src/island/CalendarGrainButton.tsx
13658
14091
  var import_react39 = require("react");
13659
- var import_jsx_runtime53 = require("react/jsx-runtime");
14092
+ var import_jsx_runtime54 = require("react/jsx-runtime");
13660
14093
  function useShortenedMonth(long) {
13661
14094
  const [short, setShort] = (0, import_react39.useState)(false);
13662
14095
  const title = (0, import_react39.useRef)(null);
@@ -13699,7 +14132,7 @@ function CalendarGrainButton({ month, grain, onPress }) {
13699
14132
  const long = grain === "YEAR" ? formatMonthYear(month) : formatMonthName(month);
13700
14133
  const { short, titleRef, probeRef } = useShortenedMonth(long);
13701
14134
  const shown = grain === "MONTH" && short ? formatMonthNameShort(month) : long;
13702
- const title = /* @__PURE__ */ (0, import_jsx_runtime53.jsxs)(
14135
+ const title = /* @__PURE__ */ (0, import_jsx_runtime54.jsxs)(
13703
14136
  "span",
13704
14137
  {
13705
14138
  className: "scopetickets-island-header-button__title",
@@ -13707,7 +14140,7 @@ function CalendarGrainButton({ month, grain, onPress }) {
13707
14140
  ...grain === "MONTH" && short ? { "data-grain-short": "" } : null,
13708
14141
  children: [
13709
14142
  shown,
13710
- grain === "MONTH" ? /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
14143
+ grain === "MONTH" ? /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
13711
14144
  "span",
13712
14145
  {
13713
14146
  className: "scopetickets-island-header-button__probe",
@@ -13720,9 +14153,9 @@ function CalendarGrainButton({ month, grain, onPress }) {
13720
14153
  }
13721
14154
  );
13722
14155
  if (onPress === void 0) {
13723
- return /* @__PURE__ */ (0, import_jsx_runtime53.jsx)("span", { className: "scopetickets-island-chrome-pill scopetickets-island-grain-pill", children: title });
14156
+ return /* @__PURE__ */ (0, import_jsx_runtime54.jsx)("span", { className: "scopetickets-island-chrome-pill scopetickets-island-grain-pill", children: title });
13724
14157
  }
13725
- return /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
14158
+ return /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
13726
14159
  "button",
13727
14160
  {
13728
14161
  type: "button",
@@ -13733,26 +14166,6 @@ function CalendarGrainButton({ month, grain, onPress }) {
13733
14166
  }
13734
14167
  );
13735
14168
  }
13736
-
13737
- // src/island/Switch.tsx
13738
- var import_jsx_runtime54 = require("react/jsx-runtime");
13739
- function Switch({ checked, onChange, label, size: size2 = "wide", disabled = false }) {
13740
- const press = useIslandPress("element");
13741
- return /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
13742
- "button",
13743
- {
13744
- type: "button",
13745
- role: "switch",
13746
- "aria-checked": checked,
13747
- "aria-label": label,
13748
- disabled,
13749
- className: `scopetickets-island-switch scopetickets-island-switch--${size2}`,
13750
- onClick: () => onChange(!checked),
13751
- ...disabled ? {} : press,
13752
- children: /* @__PURE__ */ (0, import_jsx_runtime54.jsx)("span", { className: "scopetickets-island-switch__thumb", "aria-hidden": "true" })
13753
- }
13754
- );
13755
- }
13756
14169
  // Annotate the CommonJS export names for ESM import in node:
13757
14170
  0 && (module.exports = {
13758
14171
  AUTH_CARDS,