@getmicdrop/venue-calendar 4.3.138 → 4.3.139

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (211) hide show
  1. package/README.md +895 -840
  2. package/dist/AddOnCard-Dlt_4lut.js +475 -0
  3. package/dist/{Button-B_gbGd63.js → Button-Ch5dRGa2.js} +1 -1
  4. package/dist/{Button-B1cBhdtC.js → Button-DpeQSoQ7.js} +58 -45
  5. package/dist/Calendar-CNWS2xiR.js +396 -0
  6. package/dist/CalendarFoundryView-B5puOxH5.js +16431 -0
  7. package/dist/{ChartBlock-DcsCXfX8.js → ChartBlock-vihMKVdW.js} +2 -2
  8. package/dist/Checkout-B2FvX6Af.js +1070 -0
  9. package/dist/Checkout-y0x-v-XH.js +1995 -0
  10. package/dist/{ChevronDownOutline-kFgRY2cg.js → CloseOutline-Bh9UO94v.js} +2 -2
  11. package/dist/{CollectionView-C0vDg5oJ.js → CollectionView-CcLlV-1f.js} +22 -24
  12. package/dist/{CropImage-BWYeQXXA.js → CropImage-DqLAGy5s.js} +6 -6
  13. package/dist/{DatePicker-v-4ijT8N.js → DatePicker-D20Te0JY.js} +222 -215
  14. package/dist/{Event-vlu8IAxh.js → Event-DoIU0o6C.js} +799 -796
  15. package/dist/{EventCard-puoh3xag.js → EventCard-B8MYLyIW.js} +1 -1
  16. package/dist/EventPage-DM4tjCcL.js +1298 -0
  17. package/dist/{FilterChipGroup-DUGvOaRI.js → FilterChipGroup-BCjc7-pE.js} +1 -1
  18. package/dist/{ImageUploader-CKrf5amy.js → ImageUploader-BzxKIyLN.js} +324 -375
  19. package/dist/{Input-BQk4itex.js → Input-Bp5EgI1F.js} +5 -3
  20. package/dist/Modal-C6EXgkuF.js +159 -0
  21. package/dist/{ModalFooter-gFaDKsfj.js → ModalFooter-C4TD3-zP.js} +1 -1
  22. package/dist/{ModalTitle-CS5AGwrU.js → ModalTitle-BP4Bm3sA.js} +1 -1
  23. package/dist/{PasswordInput-C65GqxdF.js → PasswordInput-BlzSrkPs.js} +1 -1
  24. package/dist/{PhoneInput-Dj1I3bEn.js → PhoneInput-_ByjRGQ0.js} +2 -2
  25. package/dist/{RecommendationsRail-DC5qX1ei.js → RecommendationsRail-BDNnbL-p.js} +53 -50
  26. package/dist/{Search-BE64QcmK.js → Search-vhGEpog6.js} +1 -1
  27. package/dist/SeriesPage-YE8czX1M.js +32 -0
  28. package/dist/{SkeletonLoader-DfW0N9R3.js → SkeletonLoader-Beh2izdy.js} +1 -1
  29. package/dist/Spinner-DgubkWKo.js +88 -0
  30. package/dist/{Success-D3CrUeka.js → Success-CN5HB8gN.js} +164 -166
  31. package/dist/{TimePicker-HYzPI_Dc.js → TimePicker-BDuy9Ap8.js} +1 -1
  32. package/dist/{ViewTicketsEmbed-DzUCgtA3.js → ViewTicketsEmbed-DvoMIiKJ.js} +9 -10
  33. package/dist/{address-field-BwGHcMKY.js → address-field-DOalICpt.js} +2 -2
  34. package/dist/{allowlist-Bt1BHhNd.js → allowlist-DinkGF2L.js} +77 -68
  35. package/dist/api/api.cjs +1 -1
  36. package/dist/api/api.mjs +320 -297
  37. package/dist/api/client.d.ts +14 -53
  38. package/dist/api/events.d.ts +15 -1
  39. package/dist/api/result.d.ts +9 -0
  40. package/dist/{api-CRHFSJDI.js → api-CsAx0rmV.js} +150 -145
  41. package/dist/{avatar-picker-field-CSF5okeM.js → avatar-picker-field-CV4vRxTB.js} +14 -14
  42. package/dist/{checkoutState-BDNjJRMG.js → checkoutState-DSx7g3Vy.js} +12 -21
  43. package/dist/{client-BIN_q-of.js → client-SaDt6559.js} +18 -12
  44. package/dist/{constants-DrFV2oht.js → constants-sRRJh0u-.js} +1 -1
  45. package/dist/{date-field-3tgOYbzF.js → date-field-DylJx0y7.js} +9 -9
  46. package/dist/{date-range-field-D0Aq9me9.js → date-range-field-BOV1V2ab.js} +7 -7
  47. package/dist/{de-CUrE_4a4.js → de-CzkX3H3B.js} +1 -0
  48. package/dist/{defaultLabels-CybwJCNn.js → defaultLabels-DLK6rq4q.js} +1 -0
  49. package/dist/{defaults-B5wyre5O.js → defaults-Cbuin1WS.js} +2 -3
  50. package/dist/{es-B2-z2Kft.js → es-BOLzv8eD.js} +1 -0
  51. package/dist/{event-CEg17hts.js → event-ClsLWtR0.js} +1 -1
  52. package/dist/{event-transform-DqFigNQg.js → event-transform-Cs63X0hI.js} +42 -42
  53. package/dist/{eventStatusStream-DK5fWCTB.js → eventStatusStream-BAh5nJP2.js} +1 -1
  54. package/dist/{field-rules-CKFFB16Q.js → field-rules-Yb2JY1qT.js} +1 -1
  55. package/dist/{file-field-2mPz4Da-.js → file-field-Dwo80kDg.js} +4 -4
  56. package/dist/format-CehusdDg.js +1718 -0
  57. package/dist/{formatters-CzKNRUwz.js → formatters-DUWbI_Eg.js} +25 -35
  58. package/dist/{fr-CiePVIlj.js → fr-DYTIBBXo.js} +1 -0
  59. package/dist/{href-DpbLXQ4c.js → href-BXhNawil.js} +1 -1
  60. package/dist/i18n-BNF6a-QA.js +720 -0
  61. package/dist/i18n-F_QOaHVh.js +26 -0
  62. package/dist/{id-Ttw95_7t.js → id-CIyIkGhH.js} +1 -0
  63. package/dist/{image-field-B8x0WQ2j.js → image-field-DeLzsJlz.js} +2 -2
  64. package/dist/{it-CBbXcFY1.js → it-CF4Db_nK.js} +1 -0
  65. package/dist/{ja-B2Tag7J3.js → ja-5-7WNHD1.js} +1 -0
  66. package/dist/{ko-CcTn4lAi.js → ko-huIzHR3W.js} +1 -0
  67. package/dist/locales/4.3.139/main/de.js +1 -0
  68. package/dist/locales/4.3.139/main/es.js +1 -0
  69. package/dist/locales/4.3.139/main/fr.js +1 -0
  70. package/dist/locales/4.3.139/main/id.js +1 -0
  71. package/dist/locales/4.3.139/main/it.js +1 -0
  72. package/dist/locales/4.3.139/main/ja.js +1 -0
  73. package/dist/locales/4.3.139/main/ko.js +1 -0
  74. package/dist/locales/4.3.139/main/nl.js +1 -0
  75. package/dist/locales/4.3.139/main/pl.js +1 -0
  76. package/dist/locales/4.3.139/main/pt-br.js +1 -0
  77. package/dist/locales/4.3.139/main/tr.js +1 -0
  78. package/dist/locales/4.3.139/main/zh.js +1 -0
  79. package/dist/look-island.svelte-D87MvHNy.js +1296 -0
  80. package/dist/{look-names-JI6GE-Zj.js → look-names-B9MywEzX.js} +68 -58
  81. package/dist/looks/4.3.139/AddOnCard-CKdkGcHH.js +1 -0
  82. package/dist/looks/4.3.139/Checkout-D7CaFYTE.js +1 -0
  83. package/dist/looks/4.3.139/Checkout-DuP46PMi.js +3 -0
  84. package/dist/looks/4.3.139/CollectionView-CWm57JCx.js +1 -0
  85. package/dist/looks/4.3.139/Event-ePupb4qY.js +8 -0
  86. package/dist/looks/4.3.139/EventPage-CgexXhEU.js +1 -0
  87. package/dist/looks/4.3.139/RecommendationsRail-Bz-Mj_r4.js +2 -0
  88. package/dist/looks/4.3.139/SeriesPage-DI2uFF0Y.js +1 -0
  89. package/dist/looks/4.3.139/Success-BkMzmgmc.js +3 -0
  90. package/dist/looks/4.3.139/ViewTicketsEmbed-CbEJwRry.js +1 -0
  91. package/dist/looks/4.3.139/_vc-foundry-calendar-stub-BVbAFEK2.js +1 -0
  92. package/dist/looks/4.3.139/buyerEmail-CqCYa9UL.js +1 -0
  93. package/dist/looks/4.3.139/constants-CU_ZgyQu.js +3 -0
  94. package/dist/looks/4.3.139/defaults-B46SFFK4.js +2 -0
  95. package/dist/looks/4.3.139/dist-BWGSqtWN.js +1 -0
  96. package/dist/looks/4.3.139/eventStatusStream-CW5lJwsa.js +10 -0
  97. package/dist/looks/4.3.139/first-core-DrYq9wBy.js +151 -0
  98. package/dist/looks/4.3.139/first-mount.svelte-DFSLaJWm.js +1 -0
  99. package/dist/looks/4.3.139/first-seo-DvHuCXT6.js +1 -0
  100. package/dist/looks/4.3.139/first.js +1 -0
  101. package/dist/looks/4.3.139/full-widget-DDBk3i4U.js +2 -0
  102. package/dist/looks/4.3.139/gate-password-cache-D4Zls6QM.js +1 -0
  103. package/dist/looks/4.3.139/i18n-DRaFNYsQ.js +1 -0
  104. package/dist/looks/4.3.139/listing-BSaRTkxW.js +1 -0
  105. package/dist/looks/4.3.139/loaders.runtime-BNG8O6-A.js +1 -0
  106. package/dist/looks/4.3.139/looks.js +1 -0
  107. package/dist/looks/4.3.139/modalManager.svelte-CqQWYz9Y.js +1 -0
  108. package/dist/looks/4.3.139/rolldown-runtime-4tVxZq34.js +1 -0
  109. package/dist/looks/4.3.139/serverTotals-Bu1fAPLB.js +1 -0
  110. package/dist/looks/4.3.139/showcase-state-options-CpCMAKVD.js +1 -0
  111. package/dist/looks/4.3.139/utils-pGRhH4A-.js +1 -0
  112. package/dist/{media-field-HieD0ye0.js → media-field-PW8ye6EL.js} +2 -2
  113. package/dist/modalManager.svelte-BHE0t9q3.js +79 -0
  114. package/dist/{multiselect-field-CJ4lUJyS.js → multiselect-field-CmocFs5f.js} +2 -2
  115. package/dist/navigation-B8rkS2On.js +348 -0
  116. package/dist/{nl-DeIqgjIs.js → nl-B1dv1lqk.js} +1 -0
  117. package/dist/{number-field-D5GkkGLB.js → number-field-CUD936Ai.js} +3 -3
  118. package/dist/{numeric-filter-field-CRWZFu_P.js → numeric-filter-field-BmgSYhOt.js} +3 -3
  119. package/dist/{password-field-DdOHXEOo.js → password-field-BfvcZUi_.js} +1 -1
  120. package/dist/{phone-field-BaYmp56f.js → phone-field-DO0U_YZ6.js} +17 -18
  121. package/dist/{pixels-BXXzmoCb.js → pixels-ipedGW6i.js} +7 -7
  122. package/dist/{pl-Bm2FcD5y.js → pl-DLlM_IPo.js} +1 -0
  123. package/dist/{pt-br-XS1Lsa6z.js → pt-br-8V3mf7pu.js} +1 -0
  124. package/dist/repeating-field-BwtJ6VS1.js +488 -0
  125. package/dist/{richtext-field-KmUytgBW.js → richtext-field-DvLCxPvq.js} +2 -2
  126. package/dist/{datetime-BlEsN_-8.js → scarcity-DfQvyhJP.js} +74 -85
  127. package/dist/{searchable-select-field-DettZRav.js → searchable-select-field-zuIqfoQM.js} +17 -17
  128. package/dist/{select-field-Wc4gAtou.js → select-field-DNNN-a9q.js} +6 -6
  129. package/dist/seo/HostSeoController.d.ts +13 -0
  130. package/dist/seo/seo.cjs +1 -1
  131. package/dist/seo/seo.mjs +18 -11
  132. package/dist/{serverTotals-COsx7Mc5.js → serverTotals-BprgDwOw.js} +1 -1
  133. package/dist/{showcase-state-options-CHGUaZtl.js → showcase-state-options-bKRf48yz.js} +2 -2
  134. package/dist/{time-field-CnxZcziR.js → time-field-DmPCoppV.js} +2 -2
  135. package/dist/{to-event-card-props-C9v9dspT.js → to-event-card-props-KVcCJ2JF.js} +34 -34
  136. package/dist/{tr-zKAbMfgi.js → tr-DiUEV65j.js} +1 -0
  137. package/dist/{tree-picker-field-aqux58EQ.js → tree-picker-field-BJwSFAqm.js} +8 -8
  138. package/dist/types/index.d.ts +3 -0
  139. package/dist/{utils-AIszIHUb.js → utils-x8YXRKvr.js} +12 -12
  140. package/dist/venue-BjLCg-PW.js +38 -0
  141. package/dist/venue-calendar.css +1 -1
  142. package/dist/venue-calendar.es.js +1655 -1539
  143. package/dist/venue-calendar.iife.js +1 -54
  144. package/dist/venue-calendar.umd.js +69 -63
  145. package/dist/{widget-key-context-BrWW0fyM.js → widget-key-context-dHM9FiuJ.js} +8 -37
  146. package/dist/{zh-DHfgJplH.js → zh-Cej2EPQt.js} +1 -0
  147. package/package.json +2 -2
  148. package/src/lib/constants/scarcity.ts +1 -2
  149. package/dist/AddOnCard-DEAC26HA.js +0 -348
  150. package/dist/BlockPlaceholder-BKfoE795.js +0 -59
  151. package/dist/Calendar-9xskvKUf.js +0 -395
  152. package/dist/CalendarFoundryView-DbxZNmY7.js +0 -16356
  153. package/dist/CartView-DMINN6bY.js +0 -2200
  154. package/dist/Checkbox-sObkYRdj.js +0 -60
  155. package/dist/Checkout-H9RGBU9D.js +0 -1071
  156. package/dist/Checkout-VnochAZE.js +0 -1967
  157. package/dist/CheckoutTimer-mjcYR3XU.js +0 -42
  158. package/dist/EventPage-DycxjX5Z.js +0 -1301
  159. package/dist/Modal-DOpDiAwN.js +0 -102
  160. package/dist/ScarcityBadge-BAaV2CIY.js +0 -141
  161. package/dist/SeriesPage-Cx89s2B6.js +0 -34
  162. package/dist/Skeleton-B6qB_udJ.js +0 -31
  163. package/dist/Spinner-Bj4dr9kO.js +0 -19
  164. package/dist/Textarea-BDcuBI13.js +0 -72
  165. package/dist/__SKIP_NAVIGATION__-Znm_vYcG.js +0 -5
  166. package/dist/__SKIP_PATHS__-Bzzrca_a.js +0 -5
  167. package/dist/calendar-Cdu8fCIt.js +0 -111
  168. package/dist/cta-qbcIt5Gh.js +0 -116
  169. package/dist/format-CypC4vWs.js +0 -1587
  170. package/dist/heic-to-BoLfsr3l.js +0 -70
  171. package/dist/i18n-B_TWnExv.js +0 -495
  172. package/dist/i18n-CSaUFnlD.js +0 -26
  173. package/dist/instant-BkZCSGDm.js +0 -162
  174. package/dist/labels-D8LN8lY7.js +0 -227
  175. package/dist/locales/4.3.138/main/de.js +0 -1
  176. package/dist/locales/4.3.138/main/es.js +0 -1
  177. package/dist/locales/4.3.138/main/fr.js +0 -1
  178. package/dist/locales/4.3.138/main/id.js +0 -1
  179. package/dist/locales/4.3.138/main/it.js +0 -1
  180. package/dist/locales/4.3.138/main/ja.js +0 -1
  181. package/dist/locales/4.3.138/main/ko.js +0 -1
  182. package/dist/locales/4.3.138/main/nl.js +0 -1
  183. package/dist/locales/4.3.138/main/pl.js +0 -1
  184. package/dist/locales/4.3.138/main/pt-br.js +0 -1
  185. package/dist/locales/4.3.138/main/tr.js +0 -1
  186. package/dist/locales/4.3.138/main/zh.js +0 -1
  187. package/dist/look-island.svelte-B7UH_QVv.js +0 -1270
  188. package/dist/looks/4.3.138/looks.js +0 -248
  189. package/dist/modalManager.svelte-BvyrTI6p.js +0 -51
  190. package/dist/navigation-DpqP-ahJ.js +0 -241
  191. package/dist/repeating-field-B4OhsaGB.js +0 -488
  192. package/dist/venue-DLkL7xdj.js +0 -12
  193. /package/dist/checkout-libs/{4.3.138 → 4.3.139}/phone.js +0 -0
  194. /package/dist/checkout-libs/{4.3.138 → 4.3.139}/qrcode.js +0 -0
  195. /package/dist/locales/{4.3.138 → 4.3.139}/flow/de.js +0 -0
  196. /package/dist/locales/{4.3.138 → 4.3.139}/flow/es.js +0 -0
  197. /package/dist/locales/{4.3.138 → 4.3.139}/flow/fr.js +0 -0
  198. /package/dist/locales/{4.3.138 → 4.3.139}/flow/id.js +0 -0
  199. /package/dist/locales/{4.3.138 → 4.3.139}/flow/it.js +0 -0
  200. /package/dist/locales/{4.3.138 → 4.3.139}/flow/ja.js +0 -0
  201. /package/dist/locales/{4.3.138 → 4.3.139}/flow/ko.js +0 -0
  202. /package/dist/locales/{4.3.138 → 4.3.139}/flow/nl.js +0 -0
  203. /package/dist/locales/{4.3.138 → 4.3.139}/flow/pl.js +0 -0
  204. /package/dist/locales/{4.3.138 → 4.3.139}/flow/pt-br.js +0 -0
  205. /package/dist/locales/{4.3.138 → 4.3.139}/flow/tr.js +0 -0
  206. /package/dist/locales/{4.3.138 → 4.3.139}/flow/zh.js +0 -0
  207. /package/dist/looks/{4.3.138 → 4.3.139}/micdrop-wordmark-BYMG6vLR.svg +0 -0
  208. /package/dist/looks/{4.3.138 → 4.3.139}/microphone-Ccv4r-kd.webp +0 -0
  209. /package/dist/looks/{4.3.138 → 4.3.139}/superuser-CZF6a5gO.webp +0 -0
  210. /package/dist/looks/{4.3.138 → 4.3.139}/treasury-DUE7lZzT.webp +0 -0
  211. /package/dist/looks/{4.3.138 → 4.3.139}/user-image-yuS4errP.svg +0 -0
@@ -1,495 +0,0 @@
1
- import { S as e } from "./instant-BkZCSGDm.js";
2
- import { a as t, u as n } from "./formatters-CzKNRUwz.js";
3
- import { f as r } from "./widget-key-context-BrWW0fyM.js";
4
- import "./api-CRHFSJDI.js";
5
- import { n as i } from "./constants-DrFV2oht.js";
6
- import { _ as a, f as o, g as s, h as c, p as l } from "./datetime-BlEsN_-8.js";
7
- import { t as u } from "./cta-qbcIt5Gh.js";
8
- import { t as d } from "./labels-D8LN8lY7.js";
9
- import "svelte/internal/disclose-version";
10
- import * as f from "svelte/internal/client";
11
- // src/lib/public-calendar-flow/defaults.ts
12
- function p(e, t) {
13
- let n = a(e, t);
14
- return n === "sold-out" ? "sold_out" : n === "plenty" ? "none" : n;
15
- }
16
- function m(e, t, n, r) {
17
- return e === "none" ? null : e === "sold_out" ? "Sold out" : r?.isFree ? null : e === "urgent" && n !== "browse" && t <= s.MAX_EXACT_COUNT ? `Only ${t} left` : e === "low" || e === "urgent" ? "Selling fast" : null;
18
- }
19
- var h = {
20
- cancelled: (e) => e.eventCancelled,
21
- postponed: (e) => e.eventPostponed,
22
- event_past: (e) => e.eventEnded,
23
- no_tickets: (e) => e.noTicketsAvailable,
24
- sold_out: (e) => e.soldOut,
25
- sold_out_waitlist: (e) => e.joinWaitlist,
26
- sales_ended: (e) => e.salesEnded,
27
- sales_paused: (e) => e.salesPaused
28
- }, g = {
29
- cancelled: (e) => e.reasonEventCancelled,
30
- postponed: (e) => e.eventPostponedBanner,
31
- event_past: (e) => e.reasonEventPast,
32
- no_tickets: (e) => e.reasonNoTickets,
33
- sold_out_waitlist: (e) => e.reasonSoldOutWaitlist
34
- };
35
- function _(e) {
36
- let t = (e || "").trim().toLowerCase();
37
- return t === "canceled" || t === "cancelled";
38
- }
39
- function v(e, t, n, r) {
40
- if (e === "available" || e === "hidden_only") return n ? r.reserveASpot || t : r.getTickets || t;
41
- let i = e ? h[e] : void 0;
42
- return i && i(r) || t;
43
- }
44
- function y(e, t, n) {
45
- let r = e.ctaText || n.getTickets || "Get tickets", i = t || e.ctaText === "Reserve a spot";
46
- return v(e.ctaReason, r, i, n);
47
- }
48
- function b(e) {
49
- let t = e.tickets.map((e) => ({
50
- salesBegin: e.salesStartDate,
51
- salesEnd: e.salesEndDate,
52
- remainingCapacity: e.quantityAvailable,
53
- totalCapacity: e.quantityTotal,
54
- soldOut: e.status === "sold_out",
55
- salesChannel: 1,
56
- isHidden: e.isHidden
57
- }));
58
- return u({
59
- startDateTime: e.startDateTime,
60
- endDateTime: e.endDateTime,
61
- salesStatus: e.salesStatus,
62
- timezone: e.timezone,
63
- status: e.status,
64
- hasPurchasableHiddenTickets: e.hasPurchasableHiddenTickets
65
- }, t, {
66
- cancelled: !1,
67
- isRegistration: e.isRegistrationEvent,
68
- waitlistEnabled: !1
69
- });
70
- }
71
- function x(e, t = d) {
72
- if (e.status === "cancelled") return {
73
- text: t.eventCancelled || "Canceled",
74
- disabled: !0,
75
- reason: t.reasonEventCancelled || "This event has been canceled"
76
- };
77
- if (e.status === "postponed") return {
78
- text: t.eventPostponed || "Postponed",
79
- disabled: !0,
80
- reason: t.eventPostponedBanner || "This event has been postponed. Ticket sales are paused"
81
- };
82
- if (e.status === "past") return {
83
- text: t.eventEnded || "Ended",
84
- disabled: !0,
85
- reason: t.reasonEventPast || "This event has already happened"
86
- };
87
- let n = b(e);
88
- return {
89
- text: v(n.reason, n.text, e.isRegistrationEvent === !0, t),
90
- disabled: n.disabled,
91
- reason: n.disabled ? w(n.reason, t) : void 0
92
- };
93
- }
94
- function S(e, t = d, n, r = {}) {
95
- let i = () => ({
96
- text: t.eventCancelled || "Canceled",
97
- variant: "error"
98
- }), a = () => ({
99
- text: t.eventPostponed || "Postponed",
100
- variant: "warning"
101
- });
102
- if (n) return _(n) ? i() : n === "postponed" ? a() : null;
103
- if (e.status === "cancelled") return i();
104
- if (e.status === "postponed") return a();
105
- if (e.status === "past") return {
106
- text: t.eventEnded || "Ended",
107
- variant: "neutral"
108
- };
109
- let o = () => ({
110
- text: t.soldOut || "Sold out",
111
- variant: "neutral"
112
- });
113
- if (C(e, !!r.gated, !!r.waitlistEnabled) !== null) return o();
114
- let { reason: s } = b(e);
115
- return s === "event_past" ? {
116
- text: t.eventEnded || "Ended",
117
- variant: "neutral"
118
- } : s === "sales_paused" ? {
119
- text: t.salesPaused || "Sales paused",
120
- variant: "warning"
121
- } : s === "sold_out" || s === "sold_out_waitlist" ? o() : null;
122
- }
123
- function C(e, t, n) {
124
- if (!t || !n || e.status === "cancelled" || e.status === "postponed" || e.status === "past") return null;
125
- let { reason: r } = b(e);
126
- return r === "sold_out" ? e.tickets.some((e) => !e.isHidden && e.status === "on_sale" && (e.quantityAvailable ?? 0) > 0) ? "held" : "join" : r === "available" || r === "hidden_only" ? "held" : null;
127
- }
128
- function w(e, t = d) {
129
- if (!e) return;
130
- let n = g[e], r = n && n(t);
131
- if (r) return r;
132
- switch (e) {
133
- case "cancelled": return "This event has been cancelled";
134
- case "event_past": return "This event has already happened";
135
- case "no_tickets": return "There are no tickets configured for this event";
136
- case "coming_soon": return;
137
- case "sold_out": return;
138
- case "sold_out_waitlist": return "All tickets are claimed. Join the waitlist to be notified";
139
- case "sales_ended": return;
140
- case "sales_paused": return;
141
- default: return;
142
- }
143
- }
144
- function T(e) {
145
- let t = e.tickets.filter((e) => e.status === "on_sale" && !e.isHidden);
146
- return t.length > 0 && t.every((e) => e.price === 0 && !e.isDonation);
147
- }
148
- function E(e) {
149
- let t = e.tickets.filter((e) => e.status === "on_sale" && !e.isHidden);
150
- if (t.length === 0) return null;
151
- let n = t.some((e) => e.isDonation || e.ticketType === 2), r = t.filter((e) => !e.isDonation && e.ticketType !== 2), i = r.some((e) => e.price === 0), a = r.filter((e) => e.price > 0);
152
- if (a.length === 0 && !i && n) return "Donation";
153
- if (a.length === 0 && i) return null;
154
- let s = Math.min(...a.map((e) => c(e) ?? e.price));
155
- if (i) return "Free";
156
- let l = o(s);
157
- return n ? `From ${l}` : a.length === 1 ? l : `From ${l}`;
158
- }
159
- function D(e, t) {
160
- return n(t / 100 * e);
161
- }
162
- var O = {
163
- instant: 100,
164
- micro: 150,
165
- fast: 200,
166
- normal: 300,
167
- slow: 400,
168
- elaborate: 600
169
- };
170
- function k() {
171
- return {
172
- code: "",
173
- isApplied: !1,
174
- isValidating: !1,
175
- error: "",
176
- hint: "",
177
- discountAmount: 0,
178
- discountType: "",
179
- discountTicketIds: [],
180
- revealHiddenTickets: !1,
181
- revealTicketIds: []
182
- };
183
- }
184
- function A(e) {
185
- return e.filter((e) => !e.isHidden && e.status === "on_sale");
186
- }
187
- function j(e) {
188
- return A(e.tickets).filter((e) => !e.isDonation).every((e) => e.price === 0);
189
- }
190
- // src/lib/public-calendar-flow/OrderSummary.svelte
191
- var M = f.from_html("<div class=\"flex justify-between\"><!> <!></div>"), N = f.from_html("<div class=\"flex justify-between pt-1\"><!></div> <!>", 1), P = f.from_html("<!> <!>", 1), F = f.from_html("<div class=\"flex justify-between pt-1 border-t border-default\"><!> <!></div>"), I = f.from_html("<!> <!> <!> <!> <!> <div class=\"flex justify-between pt-2 border-t border-default\"><!> <!></div>", 1), L = f.from_html("<div class=\"space-y-2\"><!> <!></div>");
192
- function R(n, r) {
193
- f.push(r, !0);
194
- let a = f.prop(r, "labels", 3, d), o = f.prop(r, "mode", 3, "full");
195
- function s(n) {
196
- return n == null ? "—" : t(e(n));
197
- }
198
- function c(e) {
199
- return e.lineKey ?? `t:${String(e.ticketId)}`;
200
- }
201
- let u = f.derived(() => r.orderTotals.lines.filter((e) => e.kind !== "addon")), p = f.derived(() => r.orderTotals.lines.filter((e) => e.kind === "addon"));
202
- var m = L(), h = f.child(m), g = (n) => {
203
- var r = P(), o = f.first_child(r);
204
- f.each(o, 17, () => f.get(u), (e) => c(e), (n, r) => {
205
- var o = M(), s = f.child(o);
206
- i(s, {
207
- size: "sm",
208
- children: (e, t) => {
209
- f.next();
210
- var n = f.text();
211
- f.template_effect(() => f.set_text(n, `${f.get(r).quantity ?? ""}x ${f.get(r).ticketName ?? ""}`)), f.append(e, n);
212
- },
213
- $$slots: { default: !0 }
214
- });
215
- var c = f.sibling(s, 2);
216
- i(c, {
217
- size: "sm",
218
- children: (n, i) => {
219
- var o = f.comment(), s = f.first_child(o), c = (e) => {
220
- var t = f.text();
221
- t.nodeValue = "—", f.append(e, t);
222
- }, u = (n) => {
223
- var i = f.text();
224
- f.template_effect((e) => f.set_text(i, e), [() => t(e(f.get(r).subtotal))]), f.append(n, i);
225
- }, d = (e) => {
226
- var t = f.text();
227
- f.template_effect((e) => f.set_text(t, e), [() => l(f.get(r).subtotal, a())]), f.append(e, t);
228
- };
229
- f.if(s, (e) => {
230
- f.get(r).subtotal == null ? e(c) : f.get(r).isDonation ? e(u, 1) : e(d, -1);
231
- }), f.append(n, o);
232
- },
233
- $$slots: { default: !0 }
234
- }), f.reset(o), f.append(n, o);
235
- });
236
- var s = f.sibling(o, 2), d = (e) => {
237
- var t = N(), n = f.first_child(t), r = f.child(n);
238
- i(r, {
239
- size: "sm",
240
- color: "muted",
241
- children: (e, t) => {
242
- f.next();
243
- var n = f.text();
244
- f.template_effect(() => f.set_text(n, a().addOns || "Add-ons")), f.append(e, n);
245
- },
246
- $$slots: { default: !0 }
247
- }), f.reset(n);
248
- var o = f.sibling(n, 2);
249
- f.each(o, 17, () => f.get(p), (e) => c(e), (e, t) => {
250
- var n = M(), r = f.child(n);
251
- i(r, {
252
- size: "sm",
253
- children: (e, n) => {
254
- f.next();
255
- var r = f.text();
256
- f.template_effect(() => f.set_text(r, `${f.get(t).quantity ?? ""}x ${f.get(t).ticketName ?? ""}`)), f.append(e, r);
257
- },
258
- $$slots: { default: !0 }
259
- });
260
- var o = f.sibling(r, 2);
261
- i(o, {
262
- size: "sm",
263
- children: (e, n) => {
264
- var r = f.comment(), i = f.first_child(r), o = (e) => {
265
- var t = f.text();
266
- t.nodeValue = "—", f.append(e, t);
267
- }, s = (e) => {
268
- var n = f.text();
269
- f.template_effect((e) => f.set_text(n, e), [() => l(f.get(t).subtotal, a())]), f.append(e, n);
270
- };
271
- f.if(i, (e) => {
272
- f.get(t).subtotal == null ? e(o) : e(s, -1);
273
- }), f.append(e, r);
274
- },
275
- $$slots: { default: !0 }
276
- }), f.reset(n), f.append(e, n);
277
- }), f.append(e, t);
278
- };
279
- f.if(s, (e) => {
280
- f.get(p).length > 0 && e(d);
281
- }), f.append(n, r);
282
- };
283
- f.if(h, (e) => {
284
- o() !== "totals" && e(g);
285
- });
286
- var _ = f.sibling(h, 2), v = (n) => {
287
- var c = I(), l = f.first_child(c), u = (e) => {
288
- var t = F(), n = f.child(t);
289
- i(n, {
290
- size: "sm",
291
- color: "muted",
292
- children: (e, t) => {
293
- f.next();
294
- var n = f.text();
295
- f.template_effect(() => f.set_text(n, a().subtotal || "Subtotal")), f.append(e, n);
296
- },
297
- $$slots: { default: !0 }
298
- });
299
- var o = f.sibling(n, 2);
300
- i(o, {
301
- size: "sm",
302
- color: "muted",
303
- children: (e, t) => {
304
- f.next();
305
- var n = f.text();
306
- f.template_effect((e) => f.set_text(n, e), [() => s(r.orderTotals.subtotal)]), f.append(e, n);
307
- },
308
- $$slots: { default: !0 }
309
- }), f.reset(t), f.append(e, t);
310
- }, d = (e) => {
311
- var t = M(), n = f.child(t);
312
- i(n, {
313
- size: "sm",
314
- color: "muted",
315
- children: (e, t) => {
316
- f.next();
317
- var n = f.text();
318
- f.template_effect(() => f.set_text(n, a().subtotal || "Subtotal")), f.append(e, n);
319
- },
320
- $$slots: { default: !0 }
321
- });
322
- var o = f.sibling(n, 2);
323
- i(o, {
324
- size: "sm",
325
- color: "muted",
326
- children: (e, t) => {
327
- f.next();
328
- var n = f.text();
329
- f.template_effect((e) => f.set_text(n, e), [() => s(r.orderTotals.subtotal)]), f.append(e, n);
330
- },
331
- $$slots: { default: !0 }
332
- }), f.reset(t), f.append(e, t);
333
- };
334
- f.if(l, (e) => {
335
- o() === "full" && r.orderTotals.lines.length > 1 ? e(u) : r.orderTotals.lines.length > 1 && e(d, 1);
336
- });
337
- var p = f.sibling(l, 2), m = (n) => {
338
- var o = M(), s = f.child(o);
339
- i(s, {
340
- size: "sm",
341
- color: "success",
342
- children: (e, t) => {
343
- f.next();
344
- var n = f.text();
345
- f.template_effect(() => f.set_text(n, a().promoDiscount || "Promo discount")), f.append(e, n);
346
- },
347
- $$slots: { default: !0 }
348
- });
349
- var c = f.sibling(s, 2);
350
- i(c, {
351
- size: "sm",
352
- color: "success",
353
- children: (n, i) => {
354
- f.next();
355
- var a = f.text();
356
- f.template_effect((e) => f.set_text(a, `-${e ?? ""}`), [() => t(e(r.orderTotals.promoDiscount))]), f.append(n, a);
357
- },
358
- $$slots: { default: !0 }
359
- }), f.reset(o), f.append(n, o);
360
- };
361
- f.if(p, (e) => {
362
- r.orderTotals.promoDiscount > 0 && e(m);
363
- });
364
- var h = f.sibling(p, 2), g = (e) => {
365
- var t = M(), n = f.child(t);
366
- i(n, {
367
- size: "sm",
368
- color: "muted",
369
- children: (e, t) => {
370
- f.next();
371
- var n = f.text();
372
- f.template_effect(() => f.set_text(n, a().serviceFees || "Service fees")), f.append(e, n);
373
- },
374
- $$slots: { default: !0 }
375
- });
376
- var o = f.sibling(n, 2);
377
- i(o, {
378
- size: "sm",
379
- color: "muted",
380
- children: (e, t) => {
381
- f.next();
382
- var n = f.text();
383
- f.template_effect((e) => f.set_text(n, e), [() => s(r.orderTotals.fees)]), f.append(e, n);
384
- },
385
- $$slots: { default: !0 }
386
- }), f.reset(t), f.append(e, t);
387
- };
388
- f.if(h, (e) => {
389
- (r.orderTotals.fees == null || r.orderTotals.fees > 0) && e(g);
390
- });
391
- var _ = f.sibling(h, 2), v = (n) => {
392
- var o = M(), s = f.child(o);
393
- i(s, {
394
- size: "sm",
395
- color: "muted",
396
- children: (e, t) => {
397
- f.next();
398
- var n = f.text();
399
- f.template_effect(() => f.set_text(n, a().taxes || "Taxes")), f.append(e, n);
400
- },
401
- $$slots: { default: !0 }
402
- });
403
- var c = f.sibling(s, 2);
404
- i(c, {
405
- size: "sm",
406
- color: "muted",
407
- children: (n, i) => {
408
- f.next();
409
- var a = f.text();
410
- f.template_effect((e) => f.set_text(a, e), [() => t(e(r.orderTotals.taxes))]), f.append(n, a);
411
- },
412
- $$slots: { default: !0 }
413
- }), f.reset(o), f.append(n, o);
414
- };
415
- f.if(_, (e) => {
416
- r.orderTotals.taxes > 0 && e(v);
417
- });
418
- var y = f.sibling(_, 2), b = (n) => {
419
- var o = M(), s = f.child(o);
420
- i(s, {
421
- size: "sm",
422
- color: "success",
423
- children: (e, t) => {
424
- f.next();
425
- var n = f.text();
426
- f.template_effect(() => f.set_text(n, a().giftCard || "Gift card")), f.append(e, n);
427
- },
428
- $$slots: { default: !0 }
429
- });
430
- var c = f.sibling(s, 2);
431
- i(c, {
432
- size: "sm",
433
- color: "success",
434
- children: (n, i) => {
435
- f.next();
436
- var a = f.text();
437
- f.template_effect((e) => f.set_text(a, `-${e ?? ""}`), [() => t(e(r.orderTotals.giftCardAmount))]), f.append(n, a);
438
- },
439
- $$slots: { default: !0 }
440
- }), f.reset(o), f.append(n, o);
441
- };
442
- f.if(y, (e) => {
443
- r.orderTotals.giftCardAmount > 0 && e(b);
444
- });
445
- var x = f.sibling(y, 2), S = f.child(x);
446
- i(S, {
447
- size: "base",
448
- weight: "semibold",
449
- children: (e, t) => {
450
- f.next();
451
- var n = f.text();
452
- f.template_effect(() => f.set_text(n, a().total || "Total")), f.append(e, n);
453
- },
454
- $$slots: { default: !0 }
455
- });
456
- var C = f.sibling(S, 2);
457
- i(C, {
458
- size: "base",
459
- weight: "semibold",
460
- children: (e, t) => {
461
- f.next();
462
- var n = f.text();
463
- f.template_effect((e) => f.set_text(n, e), [() => s(r.orderTotals.total)]), f.append(e, n);
464
- },
465
- $$slots: { default: !0 }
466
- }), f.reset(x), f.append(n, c);
467
- };
468
- f.if(_, (e) => {
469
- o() !== "lines" && e(v);
470
- }), f.reset(m), f.template_effect(() => f.set_style(m, `transition-duration: ${O.normal ?? ""}ms;`)), f.append(n, m), f.pop();
471
- }
472
- // src/lib/public-calendar-flow/i18n/index.js
473
- var z = r({
474
- defaults: d,
475
- locales: { en: d },
476
- loaders: {
477
- es: () => import("./es-8qe0Mo-8.js").then((e) => e.es),
478
- fr: () => import("./fr-BmpShjUG.js").then((e) => e.fr),
479
- "pt-br": () => import("./pt-br-CpmhafxS.js").then((e) => e.pt_br),
480
- pt: () => import("./pt-br-CpmhafxS.js").then((e) => e.pt_br),
481
- de: () => import("./de-vKpbo9Zl.js").then((e) => e.de),
482
- ja: () => import("./ja-Cobhk-xH.js").then((e) => e.ja),
483
- zh: () => import("./zh-BaZ_hYJV.js").then((e) => e.zh),
484
- ko: () => import("./ko-CyTlg6vA.js").then((e) => e.ko),
485
- it: () => import("./it-Dc-H_PdY.js").then((e) => e.it),
486
- nl: () => import("./nl-BObQMscG.js").then((e) => e.nl),
487
- tr: () => import("./tr-CN8DGCc-.js").then((e) => e.tr),
488
- id: () => import("./id-_6GFAYBn.js").then((e) => e.id),
489
- pl: () => import("./pl-_Sbz4Ou-.js").then((e) => e.pl)
490
- }
491
- });
492
- z.resolveLocale;
493
- var B = z.getLabelsForLocale;
494
- z.loadLocale, z.listLocales;
495
- export { k as a, y as c, m as d, C as f, j as h, D as i, E as l, T as m, R as n, x as o, _ as p, O as r, S as s, B as t, p as u };
@@ -1,26 +0,0 @@
1
- import { f as e } from "./widget-key-context-BrWW0fyM.js";
2
- import { t } from "./defaultLabels-CybwJCNn.js";
3
- // src/lib/i18n/index.js
4
- var n = e({
5
- defaults: t,
6
- locales: { en: t },
7
- loaders: {
8
- es: () => import("./es-B2-z2Kft.js").then((e) => e.es),
9
- fr: () => import("./fr-CiePVIlj.js").then((e) => e.fr),
10
- "pt-br": () => import("./pt-br-XS1Lsa6z.js").then((e) => e.pt_br),
11
- pt: () => import("./pt-br-XS1Lsa6z.js").then((e) => e.pt_br),
12
- de: () => import("./de-CUrE_4a4.js").then((e) => e.de),
13
- ja: () => import("./ja-B2Tag7J3.js").then((e) => e.ja),
14
- zh: () => import("./zh-DHfgJplH.js").then((e) => e.zh),
15
- ko: () => import("./ko-CcTn4lAi.js").then((e) => e.ko),
16
- it: () => import("./it-CBbXcFY1.js").then((e) => e.it),
17
- nl: () => import("./nl-DeIqgjIs.js").then((e) => e.nl),
18
- tr: () => import("./tr-zKAbMfgi.js").then((e) => e.tr),
19
- id: () => import("./id-Ttw95_7t.js").then((e) => e.id),
20
- pl: () => import("./pl-Bm2FcD5y.js").then((e) => e.pl)
21
- }
22
- });
23
- n.resolveLocale;
24
- var r = n.getLabelsForLocale, i = n.loadLocale;
25
- n.listLocales;
26
- export { i as n, r as t };
@@ -1,162 +0,0 @@
1
- import { n as e, t } from "./AppError-t1LnBwj_.js";
2
- // node_modules/@getmicdrop/svelte-components/dist/types/brands.js
3
- function n(e) {
4
- if (!Number.isFinite(e)) throw TypeError(`cents must be a finite number, got ${e}`);
5
- if (!Number.isInteger(e)) throw TypeError(`cents must be integer, got ${e}`);
6
- return e;
7
- }
8
- function r(e) {
9
- if (!Number.isFinite(e)) throw TypeError(`USD must be a finite number, got ${e}`);
10
- return e;
11
- }
12
- function i(e) {
13
- if (!Number.isFinite(e)) throw TypeError(`dollars must be a finite number, got ${e}`);
14
- return Math.round(e * 100);
15
- }
16
- function a(e) {
17
- return e / 100;
18
- }
19
- function o(e, t, n, r = 0, i = 0, a = 0) {
20
- let o = new Date(Date.UTC(e, t - 1, n, r, i, a));
21
- return e >= 0 && e <= 99 && o.setUTCFullYear(e), o;
22
- }
23
- function s(e) {
24
- if (!/^\d{4}-\d{2}-\d{2}$/.test(e)) throw TypeError(`DateOnly must be YYYY-MM-DD, got ${JSON.stringify(e)}`);
25
- let [t, n, r] = e.split("-").map(Number), i = o(t, n, r);
26
- if (i.getUTCFullYear() !== t || i.getUTCMonth() !== n - 1 || i.getUTCDate() !== r) throw TypeError(`DateOnly must be a real calendar date, got ${e}`);
27
- return e;
28
- }
29
- function c(e) {
30
- try {
31
- return new Intl.DateTimeFormat("en-US", { timeZone: e }).format(0), e;
32
- } catch {
33
- throw TypeError(`IANATimezone must be a valid zone, got ${e}`);
34
- }
35
- }
36
- function l(e) {
37
- return (t) => {
38
- if (!Number.isInteger(t) || t <= 0) throw TypeError(`${e} must be a positive integer, got ${t}`);
39
- return t;
40
- };
41
- }
42
- var u = l("EventId");
43
- function d(e, t) {
44
- return (n) => {
45
- let r;
46
- if (typeof n == "string") {
47
- if (!/^-?\d+$/.test(n)) throw TypeError(`${e} must be a numeric integer string, got ${JSON.stringify(n)}`);
48
- if (r = Number(n), !Number.isSafeInteger(r)) throw TypeError(`${e} must fit in a safe integer, got ${JSON.stringify(n)}`);
49
- } else if (r = n, Number.isFinite(r) && !Number.isSafeInteger(r) && Number.isInteger(r)) throw TypeError(`${e} must fit in a safe integer, got ${n}`);
50
- if (!Number.isFinite(r)) throw TypeError(`${e} must be a numeric value, got ${JSON.stringify(n)}`);
51
- return t(r);
52
- };
53
- }
54
- var f = d("EventId", u), p = (e, t) => e + t, m = (e, t) => e - t, h = (e, t) => Math.round(e * t), g = (e) => e.reduce((e, t) => p(e, t), 0), _ = (e) => typeof e == "string" && /^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(e), v = l("TicketId"), y = (e) => e, b = class extends t {
55
- constructor(e, t, n = {}) {
56
- super(e, t, {
57
- status: 422,
58
- recoverable: !1,
59
- ...n
60
- }), this.name = "ValueGuardError";
61
- }
62
- }, x = class extends b {
63
- constructor(e, t, n) {
64
- super(e, t, { details: n }), this.name = "DateTimeError";
65
- }
66
- }, S;
67
- (function(e) {
68
- e.INVALID_TIMEZONE = "INVALID_TIMEZONE", e.INVALID_ISO_STRING = "INVALID_ISO_STRING", e.INVALID_DATE = "INVALID_DATE", e.INVALID_TIME = "INVALID_TIME", e.MISSING_TIMEZONE = "MISSING_TIMEZONE", e.PARSE_ERROR = "PARSE_ERROR";
69
- })(S ||= {});
70
- // node_modules/@getmicdrop/svelte-components/dist/datetime/parse.js
71
- function C(e) {
72
- if (!(e instanceof Date) || isNaN(e.getTime())) throw new x("Valid Date object is required", S.INVALID_DATE, { value: e });
73
- return e.toISOString();
74
- }
75
- // node_modules/@getmicdrop/svelte-components/dist/datetime/instant.js
76
- var w = /^(\d{4})-(\d{2})-(\d{2})(?:T\d{2}:\d{2}(?::\d{2}(?:\.\d{1,9})?)?(?:Z|[+-]\d{2}:\d{2}))?$/, T = /^\d{4}-\d{2}-\d{2}[T ]\d{2}:\d{2}(?::\d{2}(?:\.\d{1,9})?)?$/;
77
- function E(e, t, n) {
78
- let r = o(e, t, n);
79
- return r.getUTCFullYear() === e && r.getUTCMonth() === t - 1 && r.getUTCDate() === n;
80
- }
81
- var D = /^(\d{4})-(\d{2})-(\d{2}) (\d{2}):(\d{2}):(\d{2})(?:\.(\d{1,9}))? ?([+-])(\d{2}):?(\d{2})(?: [A-Za-z][A-Za-z0-9_/+-]*)?(?: m=[+-][\d.]+)?$/, O = o(1, 1, 1).getTime();
82
- function k(e) {
83
- let t = w.exec(e);
84
- if (t) {
85
- let [, n, r, i] = t;
86
- return {
87
- iso: e,
88
- year: +n,
89
- month: +r,
90
- day: +i
91
- };
92
- }
93
- let n = D.exec(e);
94
- if (n) {
95
- let [, e, t, r, i, a, o, s, c, l, u] = n;
96
- return {
97
- iso: `${e}-${t}-${r}T${i}:${a}:${o}${s ? `.${s.slice(0, 3).padEnd(3, "0")}` : ""}${c}${l}:${u}`,
98
- year: +e,
99
- month: +t,
100
- day: +r
101
- };
102
- }
103
- return null;
104
- }
105
- function A(e) {
106
- if (typeof e == "number") {
107
- if (!Number.isFinite(e)) return null;
108
- let t = new Date(e);
109
- return Number.isNaN(t.getTime()) ? null : t;
110
- }
111
- if (typeof e != "string") return null;
112
- let t = k(e.trim());
113
- if (!t || !E(t.year, t.month, t.day)) return null;
114
- let n = new Date(t.iso);
115
- return Number.isNaN(n.getTime()) ? null : n;
116
- }
117
- function j(e) {
118
- let t = A(e);
119
- return t !== null && t.getTime() === O;
120
- }
121
- function M(e, t) {
122
- if (e.getTime() === O) throw new x(`toInstant: ${JSON.stringify(t)} is the backend's UNSET marker (Go's zero time.Time), not a moment — the field was never filled in. toInstant is the REQUIRED-timestamp door, so an unset value here is a bug: returning the year-1 instant it names would sort this row ahead of every real date and answer "yes" to "has this started?". If the field is allowed to be unset, read it with toInstantOrNull (null), ask isAbsentTimestamp why it is missing, and order it with compareWireInstants.`, S.INVALID_ISO_STRING, { value: t });
123
- }
124
- function N(e) {
125
- return e == null || typeof e == "string" && e.trim() === "" || j(e);
126
- }
127
- function P(...e) {
128
- return e.find((e) => !N(e));
129
- }
130
- function F(e, t) {
131
- if (!(e instanceof Date) || Number.isNaN(e.getTime())) throw new x(`${t} must be a valid Date`, S.INVALID_DATE, { value: e });
132
- }
133
- function I(e, t) {
134
- return F(e, "compareInstants(a)"), F(t, "compareInstants(b)"), e.getTime() - t.getTime();
135
- }
136
- function L(e) {
137
- if (typeof e == "number") {
138
- if (!Number.isFinite(e)) throw new x(`toInstant: epoch milliseconds must be a finite number, got ${e}`, S.INVALID_DATE, { value: e });
139
- let t = new Date(e);
140
- return F(t, "toInstant(value)"), M(t, e), t;
141
- }
142
- if (typeof e != "string" || e.trim() === "") throw new x(`toInstant: a UTC ISO timestamp or epoch ms is required, got ${JSON.stringify(e)}`, typeof e == "string" ? S.INVALID_ISO_STRING : S.INVALID_DATE, { value: e });
143
- let t = k(e);
144
- if (!t) throw T.test(e) ? new x(`toInstant: ${JSON.stringify(e)} carries a time but no timezone, so it is not an instant — it would resolve on the viewer's clock and land on a different calendar day for a viewer in Los Angeles than one in London. Send a UTC wire timestamp (2026-06-09T20:00:00Z) or an explicit offset (2026-06-09T13:00:00-07:00). If this is a local wall-clock value, it belongs in datetime/local or parseLocalToUTC(value, timezone), not here.`, S.MISSING_TIMEZONE, { value: e }) : new x(`toInstant: not an ISO-8601 timestamp: ${JSON.stringify(e)}`, S.INVALID_ISO_STRING, { value: e });
145
- let { year: n, month: r, day: i } = t;
146
- if (!E(n, r, i)) throw new x(`toInstant: ${n}-${r}-${i} is not a real calendar date: ${JSON.stringify(e)}`, S.INVALID_ISO_STRING, { value: e });
147
- let a = new Date(t.iso);
148
- if (Number.isNaN(a.getTime())) throw new x(`toInstant: ISO-8601 shaped but not a real instant: ${JSON.stringify(e)}`, S.INVALID_ISO_STRING, { value: e });
149
- return M(a, e), a;
150
- }
151
- function R(e) {
152
- if (e == null || typeof e == "string" && e.trim() === "" || j(e)) return null;
153
- try {
154
- return L(e);
155
- } catch {
156
- return null;
157
- }
158
- }
159
- function z() {
160
- return C(e());
161
- }
162
- export { r as S, g as _, z as a, c as b, x as c, a as d, i as f, m as g, f as h, N as i, S as l, h as m, I as n, L as o, _ as p, P as r, R as s, F as t, y as u, n as v, v as x, s as y };