@getmicdrop/venue-calendar 4.0.86 → 4.0.87
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +740 -740
- package/dist/{CartView-e2hG7cOV.js → CartView-DrfUvXHU.js} +370 -370
- package/dist/CartView-DrfUvXHU.js.map +1 -0
- package/dist/{Checkout-DmnOMwhl.js → Checkout-BIT0aula.js} +3 -3
- package/dist/Checkout-BIT0aula.js.map +1 -0
- package/dist/{Checkout-BpTUMyLk.js → Checkout-DNwBnmE3.js} +51 -51
- package/dist/Checkout-DNwBnmE3.js.map +1 -0
- package/dist/{CheckoutTimer-Dv0c-X6O.js → CheckoutTimer-C50Ahi93.js} +4 -4
- package/dist/CheckoutTimer-C50Ahi93.js.map +1 -0
- package/dist/{CollectionView-CyxK6aI9.js → CollectionView-W4Atllhp.js} +5 -5
- package/dist/CollectionView-W4Atllhp.js.map +1 -0
- package/dist/{Event-Cw7b9UEd.js → Event-t3hhfFuJ.js} +10 -7
- package/dist/{Event-Cw7b9UEd.js.map → Event-t3hhfFuJ.js.map} +1 -1
- package/dist/{EventPage-BKtFiZL1.js → EventPage-CEWppTrK.js} +7 -7
- package/dist/EventPage-CEWppTrK.js.map +1 -0
- package/dist/Heading-DUg5tgzm.js +91 -0
- package/dist/Heading-DUg5tgzm.js.map +1 -0
- package/dist/{ModalHeader-V5AlK1dt.js → ModalHeader-DEuHuPK2.js} +2 -2
- package/dist/{ModalHeader-V5AlK1dt.js.map → ModalHeader-DEuHuPK2.js.map} +1 -1
- package/dist/{ScarcityBadge-Co7gZXuW.js → ScarcityBadge-BVM_XAXR.js} +2 -2
- package/dist/ScarcityBadge-BVM_XAXR.js.map +1 -0
- package/dist/{SeriesPage-USYe3APQ.js → SeriesPage-Bg4oZ2fA.js} +5 -5
- package/dist/SeriesPage-Bg4oZ2fA.js.map +1 -0
- package/dist/{Success-C387RvIY.js → Success-DwpMMfeZ.js} +19 -19
- package/dist/Success-DwpMMfeZ.js.map +1 -0
- package/dist/Text-D4lbf8Z6.js +167 -0
- package/dist/{Text-ZUPglf_o.js.map → Text-D4lbf8Z6.js.map} +1 -1
- package/dist/{VenueCalendar-tmWZSmhT.js → VenueCalendar-DYnha5wZ.js} +97 -100
- package/dist/VenueCalendar-DYnha5wZ.js.map +1 -0
- package/dist/{ViewTicketsEmbed--091XJJn.js → ViewTicketsEmbed-mrawQhqD.js} +382 -382
- package/dist/ViewTicketsEmbed-mrawQhqD.js.map +1 -0
- package/dist/api/api.cjs.map +1 -1
- package/dist/api/api.mjs +21 -21
- package/dist/api/api.mjs.map +1 -1
- package/dist/api/transformers/venue.d.ts +17 -7
- package/dist/{data-toggle-store.svelte-Bn0h8FT_.js → data-toggle-store.svelte-CgH3EfQF.js} +2 -2
- package/dist/data-toggle-store.svelte-CgH3EfQF.js.map +1 -0
- package/dist/{labels-C7Znep_T.js → labels-CV4Mq9xD.js} +3 -3
- package/dist/labels-CV4Mq9xD.js.map +1 -0
- package/dist/seo/seo.cjs.map +1 -1
- package/dist/seo/seo.mjs.map +1 -1
- package/dist/{transform-BxgTZDAD.js → transform-DrAudcCa.js} +2 -2
- package/dist/transform-DrAudcCa.js.map +1 -0
- package/dist/types/index.d.ts +442 -442
- package/dist/venue-calendar.css +1 -1
- package/dist/venue-calendar.es.js +2 -2
- package/dist/venue-calendar.iife.js +21 -21
- package/dist/venue-calendar.iife.js.map +1 -1
- package/dist/venue-calendar.umd.js +11 -11
- package/dist/venue-calendar.umd.js.map +1 -1
- package/package.json +2 -2
- package/src/lib/theme.js +222 -222
- package/dist/CartView-e2hG7cOV.js.map +0 -1
- package/dist/Checkout-BpTUMyLk.js.map +0 -1
- package/dist/Checkout-DmnOMwhl.js.map +0 -1
- package/dist/CheckoutTimer-Dv0c-X6O.js.map +0 -1
- package/dist/CollectionView-CyxK6aI9.js.map +0 -1
- package/dist/EventPage-BKtFiZL1.js.map +0 -1
- package/dist/Heading-D0grC8vd.js +0 -81
- package/dist/Heading-D0grC8vd.js.map +0 -1
- package/dist/ScarcityBadge-Co7gZXuW.js.map +0 -1
- package/dist/SeriesPage-USYe3APQ.js.map +0 -1
- package/dist/Success-C387RvIY.js.map +0 -1
- package/dist/Text-ZUPglf_o.js +0 -158
- package/dist/VenueCalendar-tmWZSmhT.js.map +0 -1
- package/dist/ViewTicketsEmbed--091XJJn.js.map +0 -1
- package/dist/data-toggle-store.svelte-Bn0h8FT_.js.map +0 -1
- package/dist/labels-C7Znep_T.js.map +0 -1
- package/dist/transform-BxgTZDAD.js.map +0 -1
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"labels-C7Znep_T.js","sources":["../node_modules/@getmicdrop/svelte-components/dist/components/Toast/toast.svelte.js","../src/lib/api/cta.ts","../src/lib/public-calendar-flow/defaults.ts","../src/lib/public-calendar-flow/OrderSummary.svelte","../src/lib/public-calendar-flow/i18n/labels.js"],"sourcesContent":["import { createLogger } from '../../utils/logger.js';\n/**\n * Micdrop Toast System\n * A modern, macOS-style toast notification system built with Svelte 5 runes.\n * Supports both simple toasts and rich notification-style toasts.\n *\n * Features:\n * - Opt-in batching for high-frequency notifications (merge toasts sharing a key)\n * - Desktop notification support (browser API)\n * - Swipe-to-dismiss on mobile\n * - Haptic feedback on toast display (QOL Bible)\n */\nimport { SvelteMap } from 'svelte/reactivity';\nimport { triggerHaptic } from '../../utils/haptic.js';\nconst logger = createLogger('toast.svelte');\n// =============================================================================\n// BATCHING CONFIGURATION\n// =============================================================================\nconst BATCH_WINDOW_MS = 20000; // 20 seconds - default window to aggregate batched toasts\nconst activeBatches = new SvelteMap();\n// Namespace for opt-in (generic) batch keys, kept distinct from any other\n// internal map usage.\nconst GENERIC_BATCH_PREFIX = 'opt-in:';\nfunction registerBatch(mapKey, toastId, amount, windowMs) {\n const timeout = setTimeout(() => {\n activeBatches.delete(mapKey);\n }, windowMs);\n activeBatches.set(mapKey, {\n toastId,\n count: 1,\n total: amount,\n timeout,\n lastUpdate: Date.now(),\n });\n}\nfunction bumpBatch(batch, amount) {\n batch.count++;\n batch.total += amount;\n batch.lastUpdate = Date.now();\n return { count: batch.count, total: batch.total };\n}\n// Apply a merge to the batched toast (MF parity: update-if-present — if the\n// toast was already dismissed, this is bookkeeping-only; no resurrection).\n// Resets the visual timer (createdAt) and reschedules auto-dismiss.\nfunction applyBatchMerge(batch, ctx, update, duration) {\n toasts = toasts.map(t => t.id === batch.toastId\n ? {\n ...t,\n title: update.title ?? t.title,\n description: update.description ?? t.description,\n onClick: update.onClick ?? t.onClick,\n batchCount: ctx.count,\n batchTotal: ctx.total,\n notification: t.notification\n ? {\n ...t.notification,\n batchCount: ctx.count,\n batchTotal: ctx.total,\n message: update.message ?? t.notification.message,\n }\n : t.notification,\n createdAt: Date.now(), // Reset timer visual (MF parity)\n }\n : t);\n if (duration !== Infinity) {\n scheduleRemoval(batch.toastId, duration);\n }\n}\n// =============================================================================\n// DESKTOP NOTIFICATIONS\n// =============================================================================\nlet desktopNotificationsEnabled = $state(false);\nlet desktopNotificationPermission = $state('default');\n// Check initial permission state\nif (typeof window !== 'undefined' && 'Notification' in window) {\n desktopNotificationPermission = Notification.permission;\n desktopNotificationsEnabled = Notification.permission === 'granted';\n}\nasync function requestDesktopPermission() {\n if (typeof window === 'undefined' || !('Notification' in window)) {\n return false;\n }\n const permission = await Notification.requestPermission();\n desktopNotificationPermission = permission;\n desktopNotificationsEnabled = permission === 'granted';\n return desktopNotificationsEnabled;\n}\nlet pushPreferenceChecker = null;\n// Status-to-preference mapping\nconst STATUS_TO_PREFERENCE = {\n // Admin notifications\n 'ticket sold': { category: 'admin', key: 'ticketSales' },\n 'order completed': { category: 'admin', key: 'ticketSales' },\n 'performer confirmed': { category: 'admin', key: 'performerResponses' },\n 'performer declined': { category: 'admin', key: 'performerResponses' },\n 'event sold out': { category: 'admin', key: 'eventSoldOut' },\n 'show sold out': { category: 'admin', key: 'eventSoldOut' },\n 'section sold out': { category: 'admin', key: 'eventSoldOut' },\n 'ticket type sold out': { category: 'admin', key: 'eventSoldOut' },\n 'vip tickets sold out': { category: 'admin', key: 'eventSoldOut' },\n 'event published': { category: 'admin', key: 'eventPublished' },\n // Performer notifications\n 'avails sent': { category: 'performer', key: 'availabilityRequests' },\n 'avails sent to all': { category: 'performer', key: 'availabilityRequests' },\n 'availability request': {\n category: 'performer',\n key: 'availabilityRequests',\n },\n 'performance invitation': {\n category: 'performer',\n key: 'performanceInvitations',\n },\n 'invited to perform': {\n category: 'performer',\n key: 'performanceInvitations',\n },\n};\nfunction setPushPreferenceChecker(checker) {\n pushPreferenceChecker = checker;\n}\n// Shared normalization — trim + lowercase — used by both the legacy\n// notification-toast path and the new opt-in desktopNotification path so the\n// push-preference checker always receives the same casing the STATUS_TO_PREFERENCE\n// keys were authored in. Without this, a display-cased status like 'Ticket Sold'\n// would miss the 'ticket sold' key and bypass a muted category.\nfunction normalizeStatus(status) {\n return status.trim().toLowerCase();\n}\nfunction isPushEnabledForStatus(status) {\n // If no preference checker is set, allow all (backwards compatibility)\n if (!pushPreferenceChecker)\n return true;\n return pushPreferenceChecker(status);\n}\nfunction showDesktopNotification(title, options) {\n if (!desktopNotificationsEnabled)\n return;\n // Normalize status before the preference check so both the legacy\n // notification-toast path and the opt-in simple-toast path see the same\n // lowercase form the push-preference checker's keys are authored in.\n if (options?.status && !isPushEnabledForStatus(normalizeStatus(options.status))) {\n return; // User has disabled push for this category\n }\n try {\n new Notification(title, {\n body: options?.body,\n icon: options?.icon || '/favicon.png',\n badge: '/favicon.png',\n silent: false,\n });\n }\n catch (e) {\n // Desktop notifications may fail in some contexts (e.g., service workers)\n logger.warn('Desktop notification failed:', e);\n }\n}\n// Fire the OPT-IN desktop notification for a simple toast (creation or batch\n// merge). No-op unless the caller passed `desktopNotification` — notification\n// toasts keep their automatic legacy behavior elsewhere.\nfunction fireDesktopNotificationOption(title, options, update) {\n const dn = options.desktopNotification;\n if (!dn)\n return;\n const cfg = dn === true ? {} : dn;\n showDesktopNotification(cfg.title ?? update?.title ?? title, {\n body: cfg.body ?? update?.description ?? options.description,\n icon: cfg.icon,\n status: cfg.status,\n });\n}\n// Default durations by type (ms).\n// Decided feel (premium brief 02-B): success/info ~4s with pause-on-hover;\n// warning ~5s; ERRORS PERSIST until dismissed (manual/click dismiss) so a\n// failure can't scroll away before it's read. loading is also persistent.\nconst DEFAULT_DURATIONS = {\n success: 4000,\n error: Infinity, // persist until dismissed (was 6000ms auto-dismiss)\n warning: 5000,\n info: 4000,\n loading: Infinity,\n notification: 6000,\n};\n// Maximum number of toasts before oldest are auto-dismissed\nconst MAX_TOASTS = 5;\n// Toast store using Svelte 5 runes\nlet toasts = $state([]);\nconst timers = new SvelteMap();\nfunction generateId() {\n return `toast-${Date.now()}-${Math.random().toString(36).slice(2, 9)}`;\n}\n// Map toast types to haptic feedback styles\nconst TOAST_HAPTIC_STYLES = {\n success: 'success',\n error: 'error',\n warning: 'warning',\n info: 'light',\n loading: null, // No haptic for loading states\n notification: 'light',\n};\n// ===========================================================================\n// ARIA-LIVE ANNOUNCEMENTS (brief 02-C)\n// ===========================================================================\n// Two SEPARATE, persistent live regions — one polite, one assertive — instead\n// of one shared region whose politeness is mutated per-announcement. A shared\n// region races: an error (assertive) at t=0 followed by a success (polite) at\n// t=50ms would flip the region to polite before the error text lands. Separate\n// regions let each politeness write immediately and independently.\nconst LIVE_REGION_IDS = {\n polite: 'sc-toast-live-polite',\n assertive: 'sc-toast-live-assertive',\n};\nfunction getToastLiveRegion(politeness) {\n const id = LIVE_REGION_IDS[politeness];\n let region = document.getElementById(id);\n if (region)\n return region;\n region = document.createElement('div');\n region.id = id;\n region.setAttribute('role', politeness === 'assertive' ? 'alert' : 'status');\n region.setAttribute('aria-live', politeness);\n region.setAttribute('aria-atomic', 'true');\n region.className = 'sr-only';\n Object.assign(region.style, {\n position: 'absolute',\n width: '1px',\n height: '1px',\n padding: '0',\n margin: '-1px',\n overflow: 'hidden',\n clip: 'rect(0, 0, 0, 0)',\n whiteSpace: 'nowrap',\n border: '0',\n });\n document.body.appendChild(region);\n return region;\n}\nfunction announceToMatchingRegion(politeness, message) {\n if (typeof document === 'undefined' || !message)\n return;\n const region = getToastLiveRegion(politeness);\n // Clear then set on the next frame so repeated identical messages still fire.\n region.textContent = '';\n setTimeout(() => {\n region.textContent = message;\n }, 100);\n}\n// Announce a toast to the politeness-matched live region (brief 02-C).\n// Errors interrupt (assertive); everything else is polite.\nfunction announceToast(type, title, description) {\n const message = description ? `${title}. ${description}` : title;\n announceToMatchingRegion(type === 'error' ? 'assertive' : 'polite', message);\n}\nfunction addToast(type, title, options = {}) {\n const duration = options.duration ?? DEFAULT_DURATIONS[type];\n // Opt-in generic batching: merge into an active batch instead of stacking.\n // MF-parity merge semantics: no new announcement, no haptic, timer reset.\n if (options.batch) {\n const mapKey = GENERIC_BATCH_PREFIX + options.batch.key;\n const existingBatch = activeBatches.get(mapKey);\n if (existingBatch) {\n const ctx = bumpBatch(existingBatch, options.batch.amount ?? 1);\n const update = options.batch.render?.(ctx) ?? {};\n applyBatchMerge(existingBatch, ctx, update, duration);\n fireDesktopNotificationOption(title, options, update);\n return existingBatch.toastId;\n }\n }\n const id = generateId();\n // A PERSISTENT ERROR (brief 02-B made errors duration:Infinity) MUST keep a\n // dismiss affordance, or a failure could never be closed. Force `dismissible`\n // on only for that case — never for loading / programmatic Infinity toasts,\n // which intentionally close from code (dismissible:false stays honored there).\n const isPersistentError = type === 'error' && duration === Infinity;\n const dismissible = isPersistentError ? true : (options.dismissible ?? true);\n const newToast = {\n id,\n type,\n title,\n description: options.description,\n duration,\n dismissible,\n onClick: options.onClick,\n action: options.action,\n createdAt: Date.now(),\n ...(options.batch\n ? { batchCount: 1, batchTotal: options.batch.amount ?? 1 }\n : {}),\n };\n // Add to beginning so newest appears at top\n toasts = [newToast, ...toasts];\n // Announce to screen readers via the politeness-matched live region\n // (brief 02-C): errors are assertive (interrupt), everything else is polite.\n announceToast(type, title, options.description);\n // Trigger haptic feedback based on toast type (QOL Bible)\n const hapticStyle = TOAST_HAPTIC_STYLES[type];\n if (hapticStyle) {\n triggerHaptic(hapticStyle);\n }\n // Set auto-dismiss timer if not infinite\n if (duration !== Infinity) {\n scheduleRemoval(id, duration);\n }\n // Opt-in batching: open the (non-sliding) batch window for this key.\n if (options.batch) {\n registerBatch(GENERIC_BATCH_PREFIX + options.batch.key, id, options.batch.amount ?? 1, options.batch.window ?? BATCH_WINDOW_MS);\n }\n // Opt-in desktop notification (simple toasts never fired these before).\n fireDesktopNotificationOption(title, options);\n // Trim overflow — keep only MAX_TOASTS\n if (toasts.length > MAX_TOASTS) {\n const overflow = toasts.slice(MAX_TOASTS);\n for (const t of overflow) {\n const timer = timers.get(t.id);\n if (timer) {\n clearTimeout(timer);\n timers.delete(t.id);\n }\n }\n toasts = toasts.slice(0, MAX_TOASTS);\n }\n return id;\n}\nfunction addNotificationToast(options) {\n const normalizedStatus = normalizeStatus(options.status || '');\n // Batching is purely opt-in: an explicit `batch` object merges toasts\n // sharing the caller's key; `batch: false`/undefined disables batching.\n const genericBatch = typeof options.batch === 'object' && options.batch !== null\n ? options.batch\n : undefined;\n // Generic opt-in batching: merge into an active batch under the caller's key.\n if (genericBatch) {\n const mapKey = GENERIC_BATCH_PREFIX + genericBatch.key;\n const existingBatch = activeBatches.get(mapKey);\n if (existingBatch) {\n const ctx = bumpBatch(existingBatch, genericBatch.amount ?? 1);\n const update = genericBatch.render?.(ctx) ?? {};\n applyBatchMerge(existingBatch, ctx, update, options.duration ?? DEFAULT_DURATIONS.notification);\n // Notification toasts fire desktop notifications automatically (legacy\n // behavior); on merge, prefer the batch-updated body.\n showDesktopNotification(options.event, {\n body: update.desktopBody ??\n update.message ??\n options.message ??\n options.status,\n icon: options.avatar,\n status: normalizedStatus,\n });\n return existingBatch.toastId;\n }\n }\n // Create new toast (either not batched, or first in a new batch)\n const id = generateId();\n const duration = options.duration ?? DEFAULT_DURATIONS.notification;\n const newToast = {\n id,\n type: 'notification',\n notification: {\n name: options.name,\n displayName: options.displayName,\n event: options.event,\n status: options.status,\n avatar: options.avatar,\n message: options.message,\n performerMessage: options.performerMessage,\n eventId: options.eventId,\n batchCount: genericBatch ? 1 : undefined,\n batchTotal: genericBatch ? (genericBatch.amount ?? 1) : undefined,\n },\n duration,\n dismissible: options.dismissible ?? true,\n onClick: options.onClick,\n createdAt: Date.now(),\n ...(genericBatch\n ? { batchCount: 1, batchTotal: genericBatch.amount ?? 1 }\n : {}),\n };\n toasts = [newToast, ...toasts];\n // Announce notification toasts politely (brief 02-C).\n announceToMatchingRegion('polite', [options.name || options.event, options.status, options.message]\n .filter(Boolean)\n .join('. '));\n // Trigger haptic feedback for notification toasts\n triggerHaptic('light');\n if (duration !== Infinity) {\n scheduleRemoval(id, duration);\n }\n // Opt-in batching: open the (non-sliding) batch window for this key.\n if (genericBatch) {\n registerBatch(GENERIC_BATCH_PREFIX + genericBatch.key, id, genericBatch.amount ?? 1, genericBatch.window ?? BATCH_WINDOW_MS);\n }\n // Show desktop notification\n const desktopTitle = options.name || options.event;\n const desktopBody = options.name\n ? `${options.status} · ${options.event}`\n : options.message || options.status;\n showDesktopNotification(desktopTitle, {\n body: desktopBody,\n icon: options.avatar,\n status: normalizedStatus,\n });\n // Trim overflow — keep only MAX_TOASTS\n if (toasts.length > MAX_TOASTS) {\n const overflow = toasts.slice(MAX_TOASTS);\n for (const t of overflow) {\n const timer = timers.get(t.id);\n if (timer) {\n clearTimeout(timer);\n timers.delete(t.id);\n }\n }\n toasts = toasts.slice(0, MAX_TOASTS);\n }\n return id;\n}\nfunction scheduleRemoval(id, delay) {\n const existingTimer = timers.get(id);\n if (existingTimer) {\n clearTimeout(existingTimer);\n }\n const timer = setTimeout(() => {\n dismiss(id);\n }, delay);\n timers.set(id, timer);\n}\nfunction dismiss(id) {\n const timer = timers.get(id);\n if (timer) {\n clearTimeout(timer);\n timers.delete(id);\n }\n toasts = toasts.filter(t => t.id !== id);\n}\nfunction dismissAll() {\n timers.forEach(timer => clearTimeout(timer));\n timers.clear();\n toasts = [];\n}\nfunction pause(id) {\n const toast = toasts.find(t => t.id === id);\n if (!toast || toast.duration === Infinity)\n return;\n const timer = timers.get(id);\n if (timer) {\n clearTimeout(timer);\n timers.delete(id);\n }\n const elapsed = Date.now() - toast.createdAt;\n const remaining = Math.max(0, toast.duration - elapsed);\n toasts = toasts.map(t => t.id === id ? { ...t, pausedAt: Date.now(), remainingTime: remaining } : t);\n}\nfunction resume(id) {\n const foundToast = toasts.find(t => t.id === id);\n if (!foundToast || !foundToast.pausedAt || foundToast.duration === Infinity)\n return;\n const remaining = foundToast.remainingTime ?? foundToast.duration;\n toasts = toasts.map(t => t.id === id\n ? {\n ...t,\n pausedAt: undefined,\n remainingTime: undefined,\n createdAt: Date.now() - (foundToast.duration - remaining),\n }\n : t);\n if (remaining > 0) {\n scheduleRemoval(id, remaining);\n }\n else {\n dismiss(id);\n }\n}\n// Main toast function and methods\nfunction toast(title, options) {\n return addToast('info', title, options);\n}\ntoast.success = (title, options) => addToast('success', title, options);\ntoast.error = (title, options) => addToast('error', title, options);\ntoast.warning = (title, options) => addToast('warning', title, options);\ntoast.info = (title, options) => addToast('info', title, options);\ntoast.loading = (title, options) => addToast('loading', title, { ...options, duration: Infinity });\ntoast.notification = (options) => addNotificationToast(options);\ntoast.dismiss = dismiss;\ntoast.dismissAll = dismissAll;\ntoast.pause = pause;\ntoast.resume = resume;\n// Desktop notification controls\ntoast.requestDesktopPermission = requestDesktopPermission;\ntoast.getDesktopPermission = () => desktopNotificationPermission;\ntoast.isDesktopEnabled = () => desktopNotificationsEnabled;\ntoast.setPushPreferenceChecker = setPushPreferenceChecker;\ntoast.STATUS_TO_PREFERENCE = STATUS_TO_PREFERENCE;\n// Composable: fire a desktop notification WITHOUT creating a toast (no-op\n// unless permission is granted; respects the push-preference checker when a\n// status is supplied). Lets app wrappers compose their own notify flows.\ntoast.desktopNotify = (title, options) => showDesktopNotification(title, options);\ntoast.promise = async (promise, options) => {\n const id = toast.loading(options.loading);\n try {\n const result = await promise;\n dismiss(id);\n toast.success(options.success);\n return result;\n }\n catch (err) {\n dismiss(id);\n toast.error(options.error);\n throw err;\n }\n};\n// Getter for reactive access to toasts\nexport function getToasts() {\n return toasts;\n}\nexport { toast };\n","/**\n * CTA state computation.\n *\n * Pure function (no I/O) — derives the buy-button state from an event and\n * its ticket list. Lives in `api/` because it is the canonical, single\n * source of truth that replaces the duplicate implementations previously\n * scattered across utils/api.js, core/api-client.js, and a few components.\n */\n\n// Import from the specific subpath (not the bare entry) so the api/\n// bundle doesn't pull in the entire SC component graph (Accordion etc.)\n// and break `npm run build:api`.\nimport {\n formatDateRaw,\n formatTime,\n} from '@getmicdrop/svelte-components/utils/formatters';\n// Hidden-ticket predicate from the `/transforms` leaf subpath (no component\n// graph, so `npm run build:api` stays clean). SC's copy was pinned FROM this\n// body (dedup #392) and additionally honours the backend-resolved\n// `effectiveSales*` window for relative-offset tickets (#388). Imported (not\n// just re-exported) so it stays in local scope for `computeCtaState` below.\nimport { isHiddenTicketPurchasable } from '@getmicdrop/svelte-components/transforms';\n\nexport interface CtaStateOptions {\n cancelled?: boolean;\n isRegistration?: boolean;\n waitlistEnabled?: boolean;\n}\n\nexport interface CtaState {\n text: string;\n disabled: boolean;\n reason:\n | 'cancelled'\n | 'event_past'\n | 'no_tickets'\n | 'available'\n | 'coming_soon'\n | 'sold_out_waitlist'\n | 'sold_out'\n | 'sales_ended'\n | 'hidden_only';\n}\n\ninterface CtaEvent {\n startDateTime?: string | null;\n endDateTime?: string | null;\n hasPurchasableHiddenTickets?: boolean;\n}\n\ninterface CtaTicket {\n salesChannel?: number;\n salesBegin?: string | null;\n salesStart?: string | null;\n saleBegin?: string | null;\n onSaleStart?: string | null;\n salesEnd?: string | null;\n saleEnd?: string | null;\n onSaleEnd?: string | null;\n remainingCapacity?: number | null;\n quantityRemaining?: number | null;\n quantity?: number | null;\n soldOut?: boolean;\n isHidden?: boolean;\n visibility?: number;\n}\n\n// A hidden ticket (visibility>=2 or isHidden) that's still on sale drives the\n// \"Sales ended\" / \"Sold out\" / \"No tickets\" → \"Get tickets\" override. The user\n// just needs the promo code to see it. Re-exported from the SC canonical so\n// existing consumers (cta.test.ts, computeCtaState) keep their import path while\n// the single-source body lives in SC (dedup #392).\nexport { isHiddenTicketPurchasable };\n\nexport function computeCtaState(\n event: CtaEvent,\n tickets: CtaTicket[] | undefined,\n options: CtaStateOptions = {}\n): CtaState {\n const {\n cancelled = false,\n isRegistration = false,\n waitlistEnabled = false,\n } = options;\n const now = new Date();\n\n if (cancelled)\n return { text: 'Cancelled', disabled: true, reason: 'cancelled' };\n\n const eventEnd = event.endDateTime || event.startDateTime;\n if (eventEnd && new Date(eventEnd) < now) {\n return { text: 'Sales ended', disabled: true, reason: 'event_past' };\n }\n\n const hiddenAvailable =\n event?.hasPurchasableHiddenTickets === true ||\n (Array.isArray(tickets) && tickets.some(isHiddenTicketPurchasable));\n\n const publicTickets = (tickets || []).filter(\n t =>\n t.salesChannel !== 2 &&\n !t.isHidden &&\n !(typeof t.visibility === 'number' && t.visibility >= 2)\n );\n if (publicTickets.length === 0) {\n if (hiddenAvailable) {\n return {\n text: isRegistration ? 'Reserve a spot' : 'Get tickets',\n disabled: false,\n reason: 'hidden_only',\n };\n }\n return {\n text: 'No tickets available',\n disabled: true,\n reason: 'no_tickets',\n };\n }\n\n let hasPurchasable = false;\n let allSoldOut = true;\n let allComingSoon = true;\n let earliestSalesStart: Date | null = null;\n\n for (const ticket of publicTickets) {\n const salesBegin =\n ticket.salesBegin ||\n ticket.salesStart ||\n ticket.saleBegin ||\n ticket.onSaleStart;\n const salesEnd = ticket.salesEnd || ticket.saleEnd || ticket.onSaleEnd;\n const remaining =\n ticket.remainingCapacity ?? ticket.quantityRemaining ?? ticket.quantity;\n const isSoldOut =\n ticket.soldOut ||\n (remaining !== null && remaining !== undefined && remaining <= 0);\n\n const isScheduled = salesBegin ? new Date(salesBegin) > now : false;\n const hasSalesEnded = salesEnd ? new Date(salesEnd) < now : false;\n const isPurchasable = !isSoldOut && !isScheduled && !hasSalesEnded;\n\n if (isPurchasable) hasPurchasable = true;\n if (!isSoldOut) allSoldOut = false;\n if (!isScheduled) allComingSoon = false;\n\n if (isScheduled && salesBegin && !isSoldOut && !hasSalesEnded) {\n const startDate = new Date(salesBegin);\n if (!earliestSalesStart || startDate < earliestSalesStart) {\n earliestSalesStart = startDate;\n }\n }\n }\n\n if (hasPurchasable) {\n return {\n text: isRegistration ? 'Reserve a spot' : 'Get tickets',\n disabled: false,\n reason: 'available',\n };\n }\n\n if (allComingSoon && earliestSalesStart) {\n if (hiddenAvailable) {\n return {\n text: isRegistration ? 'Reserve a spot' : 'Get tickets',\n disabled: false,\n reason: 'hidden_only',\n };\n }\n const diffMs = earliestSalesStart.getTime() - now.getTime();\n const diffHours = diffMs / (1000 * 60 * 60);\n const diffDays = diffMs / (1000 * 60 * 60 * 24);\n let dateText: string;\n if (diffHours < 24) {\n dateText = formatTime(earliestSalesStart, { hour12: true }, 'en-US');\n } else if (diffDays <= 7) {\n dateText = formatDateRaw(\n earliestSalesStart,\n { weekday: 'short', hour: 'numeric', minute: '2-digit', hour12: true },\n 'en-US'\n );\n } else {\n const d = formatDateRaw(\n earliestSalesStart,\n { month: 'short', day: 'numeric' },\n 'en-US'\n );\n const t = formatTime(earliestSalesStart, { hour12: true }, 'en-US');\n dateText = `${d} ${t}`;\n }\n return {\n text: `On sale ${dateText}`,\n disabled: true,\n reason: 'coming_soon',\n };\n }\n\n if (allSoldOut) {\n if (hiddenAvailable) {\n return {\n text: isRegistration ? 'Reserve a spot' : 'Get tickets',\n disabled: false,\n reason: 'hidden_only',\n };\n }\n if (waitlistEnabled) {\n return {\n text: 'Join Waitlist',\n disabled: false,\n reason: 'sold_out_waitlist',\n };\n }\n return { text: 'Sold out', disabled: true, reason: 'sold_out' };\n }\n\n if (hiddenAvailable) {\n return {\n text: isRegistration ? 'Reserve a spot' : 'Get tickets',\n disabled: false,\n reason: 'hidden_only',\n };\n }\n\n return { text: 'Sales ended', disabled: true, reason: 'sales_ended' };\n}\n","// @currency-escape: feeCents / 100 in calculateServiceFee is arithmetic,\n// not display. Produces a dollar-magnitude number used in the fee formula\n// `price * (feePercentage / 100) + feeCents / 100`. Per Atlas\n// utility-currency convergence record; the no-handrolled-currency\n// ESLint rule's divideByHundred detector treats variable-name `Cents`\n// as drift but here it's real math.\n\n// Premium Ticket Experience — Constants & Defaults\n// Used by all design variants. DO NOT MODIFY per-variant.\n\n// @raw-intl-datetimeformat-escape: formatSmartSalesDate is a date-formatter\n// implementation (smart relative-date thresholds → \"on Friday at 8 PM\" / \"on Mar 15\").\n// The weekday-long (\"Friday\") and month-short+day (\"Mar 15\") fragments are interpolated\n// into smart-threshold strings; SC formatDate/DATE_FORMATS has no preset that emits a\n// bare weekday or a bare month+day, so it cannot reproduce these byte-identical fragments.\n// This file is the canonical formatter module for public-calendar-flow (it wraps + re-exports\n// scFormatDate/scFormatTime), not a call site.\n\nimport type {\n EventData,\n TicketTypeData,\n ScarcityLevel,\n CtaConfig,\n PromoCodeState,\n} from './types';\nimport { computeCtaState } from '$lib/api';\nimport type { Cents } from '@getmicdrop/svelte-components';\nimport {\n formatTime as scFormatTime,\n roundCurrency,\n} from '@getmicdrop/svelte-components';\nimport {\n formatFullDate,\n formatFullDateCompact,\n formatEventTime,\n formatTimeRange,\n formatDoorsTime,\n formatSalesDate,\n formatBrowseDate,\n formatEventDate,\n formatCleanTimeRange,\n getDateParts,\n} from '$lib/utils/datetime.js';\n\n// --- Re-export production date/time formatters (timezone-aware) ---\nexport {\n formatFullDate,\n formatFullDateCompact,\n formatEventTime,\n formatTimeRange,\n formatDoorsTime,\n formatSalesDate,\n formatBrowseDate,\n formatEventDate,\n formatCleanTimeRange,\n getDateParts,\n};\n\n// --- Scarcity Badge Rules ---\nexport const SCARCITY_THRESHOLDS = {\n SOLD_OUT: 0,\n URGENT: 0.1, // ≤10% remaining → urgent (\"Only X left\")\n LOW: 0.2, // ≤20% remaining (80%+ sold) → \"Selling fast\"\n MAX_EXACT_COUNT: 20, // Don't show exact count above 20\n} as const;\n\nexport function getScarcityLevel(\n remaining: number,\n total: number\n): ScarcityLevel {\n if (total === 0) return 'none';\n if (remaining <= 0) return 'sold_out';\n const pct = remaining / total;\n if (pct <= SCARCITY_THRESHOLDS.URGENT) return 'urgent';\n if (pct <= SCARCITY_THRESHOLDS.LOW) return 'low';\n return 'none';\n}\n\nexport function getScarcityText(\n level: ScarcityLevel,\n remaining: number,\n context: 'browse' | 'event' | 'ticket',\n options?: { isFree?: boolean }\n): string | null {\n if (level === 'none') return null;\n if (level === 'sold_out') return 'Sold out';\n // No scarcity badges on free events/tickets — nothing to lose = no urgency\n if (options?.isFree) return null;\n if (\n level === 'urgent' &&\n context !== 'browse' &&\n remaining <= SCARCITY_THRESHOLDS.MAX_EXACT_COUNT\n ) {\n return `Only ${remaining} left`;\n }\n if (level === 'low' || level === 'urgent') return 'Selling fast';\n return null;\n}\n\n// --- CTA Rules ---\n// Delegates to production computeCtaState() but adapts our EventData shape.\n// Components keep calling getCtaConfig(event) — internal logic is production-aligned.\nexport function getCtaConfig(event: EventData): CtaConfig {\n // Map our EventData tickets to the shape computeCtaState expects.\n // `isHidden` flows through so computeCtaState can apply the hidden-only\n // \"Sales ended\" → \"Get tickets\" override (MIC-1039).\n const apiTickets = event.tickets.map(t => ({\n salesBegin: t.salesStartDate,\n salesEnd: t.salesEndDate,\n remainingCapacity: t.quantityAvailable,\n totalCapacity: t.quantityTotal,\n soldOut: t.status === 'sold_out',\n salesChannel: 1, // All our tickets are online (not \"at the door only\")\n isHidden: t.isHidden,\n }));\n\n // Handle statuses that computeCtaState doesn't compute from tickets\n if (event.status === 'cancelled') {\n return {\n text: 'Cancelled',\n disabled: true,\n reason: 'This event has been cancelled',\n };\n }\n if (event.status === 'past') {\n return {\n text: 'Event ended',\n disabled: true,\n reason: 'This event has ended',\n };\n }\n\n const result = computeCtaState(\n { startDateTime: event.startDateTime, endDateTime: event.endDateTime },\n apiTickets,\n {\n cancelled: false,\n isRegistration: event.isRegistrationEvent,\n waitlistEnabled: false,\n }\n );\n\n return {\n text: result.text,\n disabled: result.disabled,\n reason: result.disabled ? toFriendlyReason(result.reason) : undefined,\n };\n}\n\n/**\n * computeCtaState() returns machine-enum reasons ('event_past', 'sold_out',\n * 'coming_soon', etc) intended for branching, not display. The BookingWidget\n * and MobileCta render `reason` directly as supplementary copy below the\n * button text — which leaks raw enum strings to users.\n *\n * Map each enum to a friendly sentence, OR return undefined when the button\n * `text` already says everything (\"Sales ended\" / \"Sold out\" — no need for\n * a second line repeating it).\n */\nfunction toFriendlyReason(reason: string | undefined): string | undefined {\n if (!reason) return undefined;\n switch (reason) {\n case 'cancelled':\n return 'This event has been cancelled.';\n case 'event_past':\n return 'This event has already happened.';\n case 'no_tickets':\n return 'There are no tickets configured for this event.';\n case 'coming_soon':\n return undefined; // text already shows \"On sale <date>\"\n case 'sold_out':\n return undefined; // text already shows \"Sold out\"\n case 'sold_out_waitlist':\n return 'All tickets are claimed. Join the waitlist to be notified.';\n case 'sales_ended':\n return undefined; // text already shows \"Sales ended\"\n default:\n return undefined; // unknown enum — never leak it\n }\n}\n\n// --- Price Display Rules (from DECISIONS.md #1) ---\nexport function getPriceDisplay(event: EventData): string | null {\n const visibleTickets = event.tickets.filter(\n t => t.status === 'on_sale' && !t.isHidden\n );\n if (visibleTickets.length === 0) return null;\n\n const hasDonation = visibleTickets.some(\n t => t.isDonation || t.ticketType === 2\n );\n const paidTickets = visibleTickets.filter(\n t => !t.isDonation && t.ticketType !== 2\n );\n const hasFree = paidTickets.some(t => t.price === 0);\n const pricedTickets = paidTickets.filter(t => t.price > 0);\n\n // Only donation tickets → \"Donation\"\n if (pricedTickets.length === 0 && !hasFree && hasDonation) return 'Donation';\n\n // Only free tickets (no paid, no donation) → null (BookingWidget shows \"Free\" via isFreeEvent)\n if (pricedTickets.length === 0 && hasFree) return null;\n\n const minPrice = Math.min(...pricedTickets.map(t => t.price));\n\n // Free + paid → \"Free\" (free dominates the display)\n if (hasFree) return null;\n\n // Donation + paid → \"From $X\" (donation is an alternative option)\n if (hasDonation) return `From $${minPrice}`;\n\n // Single paid ticket type → \"$X\"\n if (pricedTickets.length === 1) return `$${minPrice}`;\n\n // Multiple paid ticket types → \"From $X\"\n return `From $${minPrice}`;\n}\n\n// --- Fee Calculation ---\nexport function calculateFee(\n price: number,\n feePercentage: number,\n feeCents: Cents\n): number {\n return roundCurrency(price * (feePercentage / 100) + feeCents / 100);\n}\n\nexport function calculateTax(amount: number, taxPercentage: number): number {\n return roundCurrency(amount * (taxPercentage / 100));\n}\n\n// --- Date Formatting ---\n// PREFERRED: Use the timezone-aware production formatters re-exported above:\n// formatBrowseDate(iso, tz) → \"Fri, Feb 20\"\n// formatFullDateCompact(iso, tz) → \"Friday, February 20\"\n// formatEventTime(iso, tz) → \"8:00 PM\"\n// formatTimeRange(start, end, tz) → \"8:00 PM - 10:00 PM\"\n// formatDoorsTime(doors, tz) → \"7:00 PM\"\n\n// --- Animation Durations ---\nexport const DURATION = {\n instant: 100,\n micro: 150,\n fast: 200,\n normal: 300,\n slow: 400,\n elaborate: 600,\n} as const;\n\n// --- Smart Sales Date Formatting ---\n// Ported from production TicketBlock.svelte — smart thresholds for human-readable dates\nexport function formatSmartSalesDate(dateStr: string): string {\n if (!dateStr) return '';\n const date = new Date(dateStr);\n const now = new Date();\n const diffMs = date.getTime() - now.getTime();\n const diffMinutes = Math.round(diffMs / (1000 * 60));\n const diffHours = diffMs / (1000 * 60 * 60);\n\n // < 1 hour: \"in X minutes\"\n if (diffMinutes > 0 && diffMinutes < 60) {\n const mins = Math.max(1, diffMinutes);\n return `in ${mins} minute${mins !== 1 ? 's' : ''}`;\n }\n\n // 1-24 hours: \"in X hours\"\n if (diffHours > 0 && diffHours < 24) {\n const hours = Math.max(1, Math.round(diffHours));\n return `in ${hours} hour${hours !== 1 ? 's' : ''}`;\n }\n\n // Tomorrow: \"tomorrow at X PM\"\n const tomorrow = new Date(now);\n tomorrow.setDate(tomorrow.getDate() + 1);\n if (date.toDateString() === tomorrow.toDateString()) {\n const timeStr = scFormatTime(\n date,\n { hour: 'numeric', minute: '2-digit' },\n 'en-US'\n );\n return `tomorrow at ${timeStr}`;\n }\n\n // 2-7 days: \"on Friday at X PM\"\n const diffDays = diffMs / (1000 * 60 * 60 * 24);\n if (diffDays > 0 && diffDays <= 7) {\n // @datetime-escape: composite string \"on {dayname} at {time}\" in formatSmartSalesDate — no <Time> preset, function returns a JS string\n const dayName = new Intl.DateTimeFormat('en-US', {\n weekday: 'long',\n }).format(date);\n const timeStr = scFormatTime(\n date,\n { hour: 'numeric', minute: '2-digit' },\n 'en-US'\n );\n return `on ${dayName} at ${timeStr}`;\n }\n\n // > 7 days: \"on Mar 15\"\n // @datetime-escape: composite string \"on {date}\" in formatSmartSalesDate — no <Time> preset, function returns a JS string\n const dateFormatted = new Intl.DateTimeFormat('en-US', {\n month: 'short',\n day: 'numeric',\n }).format(date);\n return `on ${dateFormatted}`;\n}\n\n// --- Promo Code State Factory ---\nexport function createDefaultPromoState(): PromoCodeState {\n return {\n code: '',\n isApplied: false,\n isValidating: false,\n error: '',\n hint: '',\n discountAmount: 0,\n discountType: '',\n discountTicketIds: [],\n revealHiddenTickets: false,\n revealTicketIds: [],\n };\n}\n\n// --- Ticket helpers ---\nexport function getAvailableTickets(\n tickets: TicketTypeData[]\n): TicketTypeData[] {\n return tickets.filter(t => !t.isHidden && t.status === 'on_sale');\n}\n","<!-- @style-escape: widget-intentional. -->\n<script lang=\"ts\">\n\timport type { USD } from '@getmicdrop/svelte-components';\n\timport { Text, formatCurrency } from '@getmicdrop/svelte-components';\n\timport type { OrderTotals } from '$lib/public-calendar-flow/types';\n\timport { DURATION } from '$lib/public-calendar-flow/defaults';\n\n\tinterface Props {\n\t\torderTotals: OrderTotals;\n\t\tlabels?: Record<string, string>;\n\t\t/**\n\t\t * Which section to render.\n\t\t * - `full` (default): ticket lines + totals stacked together.\n\t\t * - `lines` : ticket-line items only. Use when the parent scrolls\n\t\t * this section in a flex column.\n\t\t * - `totals` : subtotal/fees/taxes/promo/total only. Use in a fixed\n\t\t * footer alongside the action button.\n\t\t *\n\t\t * Splitting via `lines` / `totals` lets the sticky sidebars scroll\n\t\t * just the variable-length ticket list while keeping the summary\n\t\t * block and CTA always visible.\n\t\t */\n\t\tmode?: 'full' | 'lines' | 'totals';\n\t}\n\n\tlet { orderTotals, labels = {}, mode = 'full' }: Props = $props();\n</script>\n\n<div\n\tclass=\"space-y-2\"\n\tstyle=\"transition-duration: {DURATION.normal}ms;\"\n>\n\t{#if mode !== 'totals'}\n\t\t<!-- Line items -->\n\t\t{#each orderTotals.lines as line (line.ticketId)}\n\t\t\t<div class=\"flex justify-between\">\n\t\t\t\t<Text size=\"sm\">{line.quantity}x {line.ticketName}</Text>\n\t\t\t\t<Text size=\"sm\">{formatCurrency(line.subtotal as USD)}</Text>\n\t\t\t</div>\n\t\t{/each}\n\t{/if}\n\n\t{#if mode !== 'lines'}\n\t\t<!-- Subtotal. In `totals` mode the parent supplies the separator above\n\t\t this block (BookingWidget wraps the totals block in border-t); a\n\t\t second internal border would render as a double line. Only show\n\t\t the internal border-t in `full` mode where lines + totals stack\n\t\t in one container with no external separator. -->\n\t\t{#if mode === 'full' && orderTotals.lines.length > 1}\n\t\t\t<div class=\"flex justify-between pt-1 border-t border-default\">\n\t\t\t\t<Text size=\"sm\" color=\"muted\">{labels.subtotal || 'Subtotal'}</Text>\n\t\t\t\t<Text size=\"sm\" color=\"muted\">{formatCurrency(orderTotals.subtotal as USD)}</Text>\n\t\t\t</div>\n\t\t{:else if orderTotals.lines.length > 1}\n\t\t\t<div class=\"flex justify-between\">\n\t\t\t\t<Text size=\"sm\" color=\"muted\">{labels.subtotal || 'Subtotal'}</Text>\n\t\t\t\t<Text size=\"sm\" color=\"muted\">{formatCurrency(orderTotals.subtotal as USD)}</Text>\n\t\t\t</div>\n\t\t{/if}\n\n\t\t<!-- Fees -->\n\t\t{#if orderTotals.fees > 0}\n\t\t\t<div class=\"flex justify-between\">\n\t\t\t\t<Text size=\"sm\" color=\"muted\">{labels.serviceFees || 'Service fees'}</Text>\n\t\t\t\t<Text size=\"sm\" color=\"muted\">{formatCurrency(orderTotals.fees as USD)}</Text>\n\t\t\t</div>\n\t\t{/if}\n\n\t\t<!-- Taxes -->\n\t\t{#if orderTotals.taxes > 0}\n\t\t\t<div class=\"flex justify-between\">\n\t\t\t\t<Text size=\"sm\" color=\"muted\">{labels.taxes || 'Taxes'}</Text>\n\t\t\t\t<Text size=\"sm\" color=\"muted\">{formatCurrency(orderTotals.taxes as USD)}</Text>\n\t\t\t</div>\n\t\t{/if}\n\n\t\t<!-- Promo discount -->\n\t\t{#if orderTotals.promoDiscount > 0}\n\t\t\t<div class=\"flex justify-between\">\n\t\t\t\t<Text size=\"sm\" color=\"success\">{labels.promoDiscount || 'Promo discount'}</Text>\n\t\t\t\t<Text size=\"sm\" color=\"success\">-{formatCurrency(orderTotals.promoDiscount as USD)}</Text>\n\t\t\t</div>\n\t\t{/if}\n\n\t\t<!-- Gift card — deduction from the amount due; `total` already reflects it -->\n\t\t{#if orderTotals.giftCardAmount > 0}\n\t\t\t<div class=\"flex justify-between\">\n\t\t\t\t<Text size=\"sm\" color=\"success\">{labels.giftCard || 'Gift card'}</Text>\n\t\t\t\t<Text size=\"sm\" color=\"success\">-{formatCurrency(orderTotals.giftCardAmount as USD)}</Text>\n\t\t\t</div>\n\t\t{/if}\n\n\t\t<!-- Total -->\n\t\t<div class=\"flex justify-between pt-2 border-t border-default\">\n\t\t\t<Text size=\"base\" class=\"font-semibold\">{labels.total || 'Total'}</Text>\n\t\t\t<Text size=\"base\" class=\"font-semibold\">{formatCurrency(orderTotals.total as USD)}</Text>\n\t\t</div>\n\t{/if}\n</div>","/**\n * Default English labels for public-calendar-flow components.\n * Consumers override via the `labels` prop on any *Main component.\n *\n * Label keys use flat camelCase. For composed strings (e.g. aria-labels),\n * components build them from atomic label parts.\n */\nexport const defaultLabels = {\n // ── Ticket quantity controls ──────────────────────────────────────\n decrease: 'Decrease',\n increase: 'Increase',\n quantity: 'quantity',\n\n // ── Ticket states ─────────────────────────────────────────────────\n soldOut: 'Sold out',\n free: 'Free',\n unavailable: 'Unavailable',\n eventSoldOut: 'This event is sold out',\n\n // ── Price display ─────────────────────────────────────────────────\n includesFees: 'Includes',\n fees: 'fees',\n fee: 'fee',\n\n // ── Checkout CTAs ─────────────────────────────────────────────────\n checkout: 'Checkout',\n getTickets: 'Get tickets',\n selectTickets: 'Select tickets',\n selectTicketsBelow: 'Select tickets below',\n selectTicketsToContinue: 'Select tickets to continue',\n reserveASpot: 'Reserve a spot',\n\n // ── Password modal / gate ─────────────────────────────────────────\n enterPassword: 'Enter Password',\n enterEventPassword: 'Enter event password',\n passwordRequired: 'Password Required',\n passwordRequiredShort: 'Password required',\n eventRequiresPassword: 'This event requires a password to purchase tickets.',\n eventRequiresPasswordAccess: 'This event requires a password to access tickets.',\n enterEventPasswordToView: 'Enter the event password to view tickets.',\n enterEventPasswordToViewAvailable: 'Enter the event password to view available tickets.',\n eventPassword: 'Event password',\n password: 'Password',\n pleaseEnterPassword: 'Please enter the event password',\n pleaseEnterAPassword: 'Please enter a password',\n eventRequiresPasswordShort: 'This event requires a password',\n unlockTickets: 'Unlock tickets',\n cancel: 'Cancel',\n continue: 'Continue',\n submit: 'Submit',\n\n // ── Order summary ─────────────────────────────────────────────────\n subtotal: 'Subtotal',\n serviceFees: 'Service fees',\n taxes: 'Taxes',\n tax: 'Tax',\n promoDiscount: 'Promo discount',\n giftCard: 'Gift card',\n total: 'Total',\n orderSummary: 'Order summary',\n yourOrder: 'Your Order',\n\n // ── Ticket counts (used in CTA buttons) ───────────────────────────\n ticket: 'ticket',\n tickets: 'tickets',\n\n // ── Checkout form (public-calendar-flow) ───────────────────────────────\n yourDetails: 'Your details',\n attendeeDetails: 'Attendee details',\n attendee: 'Attendee',\n sameAsPurchaser: 'Same as purchaser',\n payment: 'Payment',\n noPaymentRequired: 'No payment required',\n freeEventMessage: 'This is a free event. Complete the form above to reserve your spot.',\n firstName: 'First name',\n lastName: 'Last name',\n emailAddress: 'Email address',\n email: 'Email',\n emailPlaceholder: 'you@example.com',\n attendeeEmailPlaceholder: 'attendee@example.com',\n cardNumber: 'Card number',\n cardPlaceholder: '4242 4242 4242 4242',\n expiryDate: 'Expiry date',\n expiryPlaceholder: 'MM / YY',\n cvc: 'CVC',\n cvcPlaceholder: '123',\n keepMeUpdated: 'Keep me updated about this event and similar events',\n agreeToTerms: 'I agree to the terms and conditions',\n goBack: 'Go back',\n loadingPaymentForm: 'Loading secure payment form...',\n\n // ── Checkout form validation ──────────────────────────────────────\n firstNameRequired: 'First name is required',\n lastNameRequired: 'Last name is required',\n emailRequired: 'Email is required',\n emailInvalid: 'Enter a valid email address',\n emailInvalidShort: 'Enter a valid email',\n cardNumberRequired: 'Card number is required',\n expiryRequired: 'Expiry date is required',\n cvcRequired: 'CVC is required',\n mustAgreeTerms: 'You must agree to the terms',\n\n // ── Place order CTAs ──────────────────────────────────────────────\n placeOrder: 'Place order',\n completeOrder: 'Complete order',\n placingOrder: 'Placing order...',\n\n // ── Promo code ────────────────────────────────────────────────────\n havePromoCode: 'Have a promo code?',\n promoCode: 'Promo code',\n enterCode: 'Enter code',\n apply: 'Apply',\n remove: 'Remove',\n removePromoCode: 'Remove promo code',\n applyPromoCode: 'Apply promo code',\n checkingPromoCode: 'Checking promo code',\n checking: 'Checking...',\n promoApplied: 'Promo applied',\n\n // ── Navigation tabs (app-segments) ────────────────────────────────\n about: 'About',\n ticketsTab: 'Tickets',\n eventSections: 'Event sections',\n\n // ── Event details ─────────────────────────────────────────────────\n eventDetails: 'Event details',\n performers: 'Performers',\n faq: 'FAQ',\n frequentlyAskedQuestions: 'Frequently asked questions',\n doors: 'Doors',\n doorsOpenAt: 'Doors open at',\n\n // ── Series occurrences ────────────────────────────────────────────\n upcomingDates: 'Upcoming Dates',\n\n // ── Close / dismiss ───────────────────────────────────────────────\n closeTicketSelection: 'Close ticket selection',\n closeTicketSelector: 'Close ticket selector',\n\n // ── Accessibility ─────────────────────────────────────────────────\n ticketSelection: 'ticket selection',\n ticketsSelected: 'tickets selected',\n view: 'View',\n\n // ── Success page (public-calendar-flow) ────────────────────────────────\n youreIn: \"You're in!\",\n youreRegistered: \"You're registered!\",\n confirmed: 'confirmed',\n viewTickets: 'View tickets',\n order: 'Order',\n confirmationSentTo: 'Confirmation sent to',\n addToCalendar: 'Add to Calendar',\n googleCalendar: 'Google Calendar',\n appleCalendar: 'Apple Calendar (.ics)',\n share: 'Share',\n map: 'Map',\n backToEvent: 'Back to event',\n needHelp: 'Need help?',\n linkCopied: 'Link copied to clipboard!',\n copyLink: 'Copy this link:',\n addToAppleWallet: 'Add to Apple Wallet',\n saveToGoogleWallet: 'Save to Google Wallet',\n\n // ── Session timer / expiration modals ─────────────────────────────\n sessionExpiringSoon: 'Session expiring soon',\n sessionExpiringSoonMessage: 'Your checkout session will expire in {time}. Your selected tickets will be released back to inventory.',\n extensionsRemaining: '{count} extension{plural} remaining',\n continueCheckout: 'Continue checkout',\n okIllHurry: \"OK, I'll hurry\",\n maxExtensionsReached: 'Maximum extensions reached',\n wantToKeepTickets: 'Want to keep your tickets?',\n sessionExpiredMessage: 'Your checkout session has expired and your selected tickets have been released.',\n sessionExpired: 'Session expired',\n reservationTimedOut: 'Your reservation has timed out. Please select your tickets again to continue.',\n keepMyTickets: 'Keep my tickets',\n selectTicketsAgain: 'Select tickets again',\n extendingSession: 'Extending...',\n\n // ── MobileCta ─────────────────────────────────────────────────────\n selectTicketsLabel: 'Select Tickets',\n};\n\n/**\n * Merge user-provided label overrides with the defaults.\n * Shallow merge — any key provided by the consumer wins.\n *\n * @param {Record<string, string>} [userLabels] - Partial label overrides\n * @returns {Record<string, string>} Merged labels object\n */\nexport function mergeLabels(userLabels = {}) {\n return { ...defaultLabels, ...userLabels };\n}\n"],"names":["logger","createLogger","BATCH_WINDOW_MS","activeBatches","SvelteMap","GENERIC_BATCH_PREFIX","registerBatch","mapKey","toastId","amount","windowMs","timeout","bumpBatch","batch","applyBatchMerge","ctx","update","duration","toasts","t","scheduleRemoval","desktopNotificationsEnabled","$","desktopNotificationPermission","requestDesktopPermission","permission","pushPreferenceChecker","STATUS_TO_PREFERENCE","setPushPreferenceChecker","checker","normalizeStatus","status","isPushEnabledForStatus","showDesktopNotification","title","options","e","fireDesktopNotificationOption","dn","cfg","DEFAULT_DURATIONS","MAX_TOASTS","timers","generateId","TOAST_HAPTIC_STYLES","LIVE_REGION_IDS","getToastLiveRegion","politeness","id","region","announceToMatchingRegion","message","announceToast","type","description","addToast","existingBatch","dismissible","newToast","hapticStyle","triggerHaptic","overflow","timer","addNotificationToast","normalizedStatus","genericBatch","desktopTitle","desktopBody","delay","existingTimer","dismiss","dismissAll","pause","toast","elapsed","remaining","resume","foundToast","promise","result","err","computeCtaState","event","tickets","cancelled","isRegistration","waitlistEnabled","now","eventEnd","hiddenAvailable","isHiddenTicketPurchasable","publicTickets","hasPurchasable","allSoldOut","allComingSoon","earliestSalesStart","ticket","salesBegin","salesEnd","isSoldOut","isScheduled","hasSalesEnded","startDate","diffMs","diffHours","diffDays","dateText","formatTime","formatDateRaw","d","SCARCITY_THRESHOLDS","getScarcityLevel","total","pct","getScarcityText","level","context","getCtaConfig","apiTickets","toFriendlyReason","reason","getPriceDisplay","visibleTickets","hasDonation","paidTickets","hasFree","pricedTickets","minPrice","calculateTax","taxPercentage","roundCurrency","DURATION","formatSmartSalesDate","dateStr","date","diffMinutes","mins","hours","tomorrow","scFormatTime","dayName","timeStr","createDefaultPromoState","labels","$$props","mode","div","root_3","node_1","line","div_1","root","Text","node_2","text","node_3","formatCurrency","$$render","consequent","div_2","root_1","node_6","node_7","$0","text_3","div_3","node_8","node_9","text_5","consequent_1","consequent_2","div_4","node_11","node_12","text_7","consequent_3","div_5","node_14","node_15","text_9","consequent_4","div_6","node_17","node_18","text_11","consequent_5","div_7","node_20","node_21","text_13","consequent_6","div_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AA,EAGf,cAAc;AAAA,EACd,YAAY;AAAA,EACZ,KAAK;AAAA,EACL,0BAA0B;AAAA,EAC1B,OAAO;AAAA,EACP,aAAa;AAAA;AAAA,EAGb,eAAe;AAAA;AAAA,EAGf,sBAAsB;AAAA,EACtB,qBAAqB;AAAA;AAAA,EAGrB,iBAAiB;AAAA,EACjB,iBAAiB;AAAA,EACjB,MAAM;AAAA;AAAA,EAGN,SAAS;AAAA,EACT,iBAAiB;AAAA,EACjB,WAAW;AAAA,EACX,aAAa;AAAA,EACb,OAAO;AAAA,EACP,oBAAoB;AAAA,EACpB,eAAe;AAAA,EACf,gBAAgB;AAAA,EAChB,eAAe;AAAA,EACf,OAAO;AAAA,EACP,KAAK;AAAA,EACL,aAAa;AAAA,EACb,UAAU;AAAA,EACV,YAAY;AAAA,EACZ,UAAU;AAAA,EACV,kBAAkB;AAAA,EAClB,oBAAoB;AAAA;AAAA,EAGpB,qBAAqB;AAAA,EACrB,4BAA4B;AAAA,EAC5B,qBAAqB;AAAA,EACrB,kBAAkB;AAAA,EAClB,YAAY;AAAA,EACZ,sBAAsB;AAAA,EACtB,mBAAmB;AAAA,EACnB,uBAAuB;AAAA,EACvB,gBAAgB;AAAA,EAChB,qBAAqB;AAAA,EACrB,eAAe;AAAA,EACf,oBAAoB;AAAA,EACpB,kBAAkB;AAAA;AAAA,EAGlB,oBAAoB;AACtB;AASO,SAASC,GAAYC,IAAa,IAAI;AAC3C,SAAO,EAAE,GAAGF,IAAe,GAAGE,EAAU;AAC1C;","x_google_ignoreList":[0]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"transform-BxgTZDAD.js","sources":["../src/lib/utils/imageUrl.ts","../src/lib/api/transformers/address.ts","../src/lib/api/transformers/series.ts","../src/lib/api/transformers/collection.ts","../src/lib/public-calendar-flow/transform.ts"],"sourcesContent":["/**\n * Image URL resolution utilities — npm-calendar's local canonical for\n * the moxy.sfo3.*.digitaloceanspaces.com CDN base URL. Other modules in\n * this package (event-transform, performerDisplay, core/api-client)\n * import {@link CDN_BASE_URL} from here rather than re-declaring the\n * literal — Phase G ratchet eliminated three duplicate constant\n * definitions.\n */\n\n/** Origin (no CDN) — admin / preview surfaces. */\nexport const CDN_BASE_URL_ORIGIN = \"https://moxy.sfo3.digitaloceanspaces.com\";\n/** CloudFront-fronted CDN — public-facing surfaces. */\nexport const CDN_BASE_URL = \"https://moxy.sfo3.cdn.digitaloceanspaces.com\";\n/** @deprecated Use {@link CDN_BASE_URL}. Kept as alias during migration. */\nconst DEFAULT_CDN_BASE_URL = CDN_BASE_URL;\n\n/**\n * Resolve an image path to a full URL.\n * If the path is already a full URL, returns it as-is.\n * Otherwise prepends the CDN base URL.\n */\nexport function getImageUrl(\n imagePath: string | null | undefined,\n baseUrl: string = DEFAULT_CDN_BASE_URL\n): string {\n if (!imagePath) return \"\";\n\n if (imagePath.startsWith(\"http://\") || imagePath.startsWith(\"https://\")) {\n return imagePath;\n }\n\n return `${baseUrl}${imagePath}`;\n}\n","/**\n * Address helpers — shared between the event, series and collection page\n * transformers.\n *\n * Lifted verbatim from public-calendar-flow/transform.ts so the series and\n * collection canonicals (and the in-place transformApiEvent) read a single\n * source instead of each carrying a private copy. Behavior is byte-identical\n * to the previous module-private versions.\n */\n\n/**\n * Parse a single-line address string into display lines.\n * E.g. \"123 Main St, Los Angeles, CA 90012\" -> [\"123 Main St\", \"Los Angeles, CA 90012\"]\n */\nexport function parseAddress(addressStr: string): string[] {\n if (!addressStr) return [];\n const parts = addressStr.split(',').map(p => p.trim());\n if (parts.length < 2) return [addressStr];\n const lastPart = parts[parts.length - 1];\n const stateZipMatch = lastPart.match(/^([A-Z]{2})\\s+(\\d{5}(-\\d{4})?)$/);\n if (stateZipMatch && parts.length >= 3) {\n const state = stateZipMatch[1];\n const zip = stateZipMatch[2];\n const city = parts[parts.length - 2];\n const lines = parts.slice(0, -2);\n lines.push(`${city}, ${state} ${zip}`);\n return lines;\n }\n return [parts[0], parts.slice(1).join(', ')];\n}\n\n/**\n * Build a Google Maps search URL from an address string.\n */\nexport function buildGoogleMapsUrl(address: string): string {\n if (!address) return '';\n return `https://www.google.com/maps/search/?api=1&query=${encodeURIComponent(address)}`;\n}\n","/**\n * Series Page Transformer\n *\n * Wire->domain boundary for the public series page. Maps a SeriesPageData\n * payload (from the series API) into the clean EventData shape consumed by\n * SeriesPage.svelte / EventExperience (full-width series mode, set via\n * eventSeriesId).\n *\n * Lifted byte-identically from public-calendar-flow/transform.ts's\n * transformSeriesPageData. Every ||/?? fallthrough is preserved exactly;\n * characterization tests pin the output. transformSeriesPageData now delegates\n * here.\n *\n * COMPOSITION NOTE — why this does NOT reuse parseVenue:\n * The api `parseVenue` returns the api-domain `Venue` (raw timezone string,\n * fee fields read from the payload). The series page needs the pcf `VenueData`\n * shape: timezone is the IANA-RESOLVED zone (getIANATimezone) and the fee\n * fields are hard-zeroed (the series payload carries no venue fees). Those\n * shapes are not byte-compatible, so the venue sub-shape stays local.\n */\n\nimport { formatDateRaw, getIANATimezone } from '@getmicdrop/svelte-components';\nimport { getImageUrl } from '$lib/utils/utils.js';\nimport { parseAddress, buildGoogleMapsUrl } from './address.js';\nimport type { SeriesPageData } from '../types.js';\nimport type {\n EventData,\n EventStatus,\n PerformerData,\n FAQItem,\n SeriesOccurrence,\n} from '$lib/public-calendar-flow/types';\n\n/**\n * Transform SeriesPageData (from the series API) into our clean EventData interface.\n * Sets eventSeriesId so EventExperience renders in full-width series mode.\n */\nexport function parseSeries(series: SeriesPageData): EventData {\n // Mirror the event transform: raw series carry lowercase `timezone`\n // (some PascalCase `timeZone` / snake `time_zone`). Read all casings so a\n // non-UTC series doesn't silently fall back to UTC.\n const seriesAny = series as SeriesPageData & {\n timezone?: string;\n time_zone?: string;\n };\n const timezone = getIANATimezone(\n series.timeZone || seriesAny.timezone || seriesAny.time_zone || 'UTC'\n );\n\n // Build image URL\n const rawImage = series.image || '';\n const imageUrl = rawImage.startsWith('http')\n ? rawImage\n : rawImage\n ? getImageUrl(rawImage)\n : '';\n\n // Map occurrences to SeriesOccurrence[]\n const seriesOccurrences: SeriesOccurrence[] = (series.occurrences || []).map(\n occ => ({\n id: occ.id,\n slug: occ.slug || '',\n startDateTime: occ.startDateTime,\n endDateTime: occ.endDateTime || '',\n status: (occ.ctaState?.reason === 'sold_out'\n ? 'sold_out'\n : 'on_sale') as EventStatus,\n ctaText: occ.ctaState?.text || 'Get Tickets',\n ctaDisabled: occ.ctaState?.disabled || false,\n })\n );\n\n // Use first occurrence for date fields\n const firstOcc = series.occurrences?.[0];\n let date = '';\n if (firstOcc?.startDateTime) {\n const dt = new Date(firstOcc.startDateTime);\n date = formatDateRaw(\n dt,\n { timeZone: timezone, year: 'numeric', month: '2-digit', day: '2-digit' },\n 'en-CA'\n );\n }\n\n // Map FAQs\n const rawFaq = series.venue?.faq;\n let faqs: FAQItem[] = [];\n if (Array.isArray(rawFaq)) {\n faqs = rawFaq.map(f => ({\n question: f.question || '',\n answer: f.answer || '',\n }));\n } else if (typeof rawFaq === 'string' && rawFaq) {\n faqs = [{ question: 'FAQ', answer: rawFaq }];\n }\n\n // Map performers\n const performers: PerformerData[] = (series.performers || []).map(\n (p, index) => ({\n id: index + 1,\n displayName:\n p.displayName || [p.firstName, p.lastName].filter(Boolean).join(' '),\n profileImage: p.profileImage || undefined,\n })\n );\n\n // Venue address\n const venueAddress =\n series.venue?.location || series.venue?.googleLocationNameCache || '';\n\n return {\n id: series.id,\n title: series.title || '',\n slug: '',\n description: series.description || series.eventSummary || '',\n date,\n startDateTime: firstOcc?.startDateTime || '',\n endDateTime: firstOcc?.endDateTime || '',\n doorsOpenTime: '',\n timezone,\n imageUrl,\n venue: {\n id: series.venue?.id || 0,\n name: series.venue?.name || '',\n address: venueAddress,\n timezone,\n serviceFeePercentage: 0,\n serviceFeeCents: 0,\n taxPercentage: 0,\n },\n performers,\n tickets: [],\n faqs,\n disclaimer: series.venue?.disclaimer || undefined,\n status: 'on_sale',\n eventSeriesId: series.id,\n seriesOccurrences,\n isPasswordProtected: false,\n isRegistrationEvent: false,\n totalTicketsRemaining: 0,\n totalTicketsCapacity: 0,\n venueAddressLines: parseAddress(venueAddress),\n googleMapsUrl: buildGoogleMapsUrl(venueAddress),\n };\n}\n\n/**\n * Back-compat alias — the public-calendar-flow shaper name. Existing call\n * sites importing transformSeriesPageData continue to work unchanged.\n */\nexport const transformSeriesPageData = parseSeries;\n","/**\n * Collection Page Transformer\n *\n * Wire->domain boundary for the public collection page. Maps a\n * PublicCollectionData payload (from the collection API) into the clean\n * EventData shape consumed by CollectionView.svelte / EventExperience\n * (full-width collection mode, set via collectionId).\n *\n * Lifted byte-identically from public-calendar-flow/transform.ts's\n * transformCollectionData. Every ||/?? fallthrough is preserved exactly;\n * characterization tests pin the output. transformCollectionData now delegates\n * here.\n *\n * COMPOSITION NOTE — why this does NOT reuse parseVenue/parseEvent:\n * The collection payload has no venue and no timezone; the EventData it\n * produces hard-codes an empty venue and 'UTC'. The per-event mapping is a\n * tiny CollectionEvent card shape (id/name/slug/image/startDateTime/status),\n * not the full Event domain — reusing parseEvent would change the output.\n * Both stay local.\n */\n\nimport { getImageUrl } from '$lib/utils/utils.js';\nimport type { PublicCollectionData } from '../types.js';\nimport type {\n EventData,\n EventStatus,\n CollectionEvent,\n} from '$lib/public-calendar-flow/types';\n\n/**\n * Transform PublicCollectionData (from the collection API) into our clean EventData interface.\n * Sets collectionId so EventExperience renders in full-width collection mode.\n */\nexport function parseCollection(collection: PublicCollectionData): EventData {\n // Map collection events to CollectionEvent[]\n const collectionEvents: CollectionEvent[] = (collection.events || []).map(\n ev => {\n const rawImg = ev.image || '';\n return {\n id: ev.id,\n name: ev.title || '',\n slug: ev.slug || '',\n image: rawImg.startsWith('http')\n ? rawImg\n : rawImg\n ? getImageUrl(rawImg)\n : '',\n startDateTime: ev.startDateTime || '',\n status: (ev.status || 'on_sale') as EventStatus,\n };\n }\n );\n\n // Cover image\n const rawCover = collection.coverImage || '';\n const imageUrl = rawCover.startsWith('http')\n ? rawCover\n : rawCover\n ? getImageUrl(rawCover)\n : '';\n\n return {\n id: collection.id,\n title: collection.collectionTitle || '',\n slug: '',\n description: collection.description || collection.summary || '',\n date: '',\n startDateTime: '',\n endDateTime: '',\n doorsOpenTime: '',\n timezone: 'UTC',\n imageUrl,\n venue: {\n id: 0,\n name: '',\n address: '',\n timezone: 'UTC',\n serviceFeePercentage: 0,\n serviceFeeCents: 0,\n taxPercentage: 0,\n },\n performers: [],\n tickets: [],\n faqs: [],\n status: 'on_sale',\n collectionId: collection.id,\n collectionEvents,\n isPasswordProtected: false,\n isRegistrationEvent: false,\n totalTicketsRemaining: 0,\n totalTicketsCapacity: 0,\n };\n}\n\n/**\n * Back-compat alias — the public-calendar-flow shaper name. Existing call\n * sites importing transformCollectionData continue to work unchanged.\n */\nexport const transformCollectionData = parseCollection;\n","import { formatDateRaw, getIANATimezone } from '@getmicdrop/svelte-components';\n// Premium Ticket Experience — API → EventData Transformer\n// Maps raw API event responses to our clean EventData interface.\n// Used when plugging in real API data. The showcase continues using mock-data.ts directly.\n\nimport { getImageUrl } from '$lib/utils/utils.js';\nimport {\n parseAddress,\n buildGoogleMapsUrl,\n} from '$lib/api/transformers/address';\n// Canonical wire→domain boundary — all event-level scalar reads go through it.\nimport { parseEvent } from '$lib/api/transformers/event';\nimport { parseSeries } from '$lib/api/transformers/series';\nimport { parseCollection } from '$lib/api/transformers/collection';\nimport type {\n EventData,\n EventStatus,\n TicketTypeData,\n TicketStatus,\n VenueData,\n PerformerData,\n FAQItem,\n SeriesOccurrence,\n} from './types';\nimport type { SeriesPageData, PublicCollectionData } from '$lib/api/types';\n\n/**\n * Map a raw API ticket status/state to our TicketStatus union.\n */\nfunction mapTicketStatus(ticket: any): TicketStatus {\n const now = new Date();\n const remaining =\n ticket.remainingCapacity ??\n ticket.quantityRemaining ??\n ticket.quantity ??\n 0;\n const salesBegin =\n ticket.salesBegin ||\n ticket.salesStart ||\n ticket.saleBegin ||\n ticket.onSaleStart;\n const salesEnd = ticket.salesEnd || ticket.saleEnd || ticket.onSaleEnd;\n\n if (remaining <= 0) return 'sold_out';\n if (salesEnd && new Date(salesEnd) < now) return 'sales_ended';\n if (salesBegin && new Date(salesBegin) > now) return 'coming_soon';\n return 'on_sale';\n}\n\n/**\n * Map a raw API event status string to our EventStatus union.\n */\nfunction mapEventStatus(\n rawStatus: string,\n tickets: TicketTypeData[]\n): EventStatus {\n const s = (rawStatus || '').toLowerCase().replace(/\\s+/g, '_');\n\n if (s === 'cancelled' || s === 'canceled') return 'cancelled';\n\n // Check if event is past based on end time (handled by caller if needed)\n if (s === 'past' || s === 'ended') return 'past';\n\n // MIC-1039: if any hidden ticket is still on sale, the event is \"on_sale\"\n // regardless of visible-ticket states — the user just needs a promo code.\n // NOTE: this operates on the pcf DOMAIN ticket shape (post-transform, with a\n // computed `status` string), NOT the wire shape SC's\n // `isHiddenTicketPurchasable` reads (raw visibility/salesChannel/sale-window\n // fields). The sale-window math already happened in `mapTicketStatus`, so the\n // SC predicate can't honestly serve this site — kept deliberately local.\n const hasPurchasableHiddenTickets = tickets.some(\n t => t.isHidden && t.status === 'on_sale'\n );\n if (hasPurchasableHiddenTickets) return 'on_sale';\n\n // Derive from ticket states\n const publicTickets = tickets.filter(t => !t.isHidden);\n if (publicTickets.length > 0) {\n if (publicTickets.every(t => t.status === 'sold_out')) return 'sold_out';\n if (publicTickets.every(t => t.status === 'coming_soon'))\n return 'coming_soon';\n if (\n publicTickets.every(\n t => t.status === 'sales_ended' || t.status === 'sold_out'\n )\n )\n return 'sales_ended';\n }\n\n if (s === 'sold_out' || s === 'soldout') return 'sold_out';\n if (s === 'coming_soon' || s === 'comingsoon') return 'coming_soon';\n if (s === 'sales_ended' || s === 'salesended') return 'sales_ended';\n\n return 'on_sale';\n}\n\n/**\n * Transform a raw API event response into our clean EventData interface.\n * This is the bridge between the API and our premium ticket experience components.\n *\n * COMPOSITION NOTE (events convergence): the wire is parsed ONCE through the\n * canonical parseEvent ($lib/api/transformers/event); every event-level\n * scalar below projects off the domain Event. Three deliberate wire seams\n * remain, characterization-pinned in\n * utils/event-shapers.characterization.test.js:\n * 1. TICKETS — the TicketTypeData map uses `??` (nullish) semantics over\n * raw ticket fields (remainingCapacity/visibility/fee/…) that\n * parseTicket's `||`-folding AvailableTicket neither carries nor\n * preserves; routing through parseTicket would change rendered output.\n * 2. IMAGE — image→imageUrl→image_url precedence intentionally differs\n * from the canonical resolver's (imageUrl-first); see the note in\n * api/transformers/event.ts.\n * 3. VENUE/PERFORMERS — mapped from the raw passthrough objects\n * (domain.venue / domain.performers) with B-specific `??` fee/tax\n * semantics; the performer canonical lands in PR #260 and should\n * absorb the performer map then.\n */\nexport function transformApiEvent(rawEvent: any): EventData {\n // Wire→domain ONCE (see composition note).\n const domain = parseEvent(rawEvent);\n const rawVenue = domain.venue || {};\n // Event-level timeZone is an OPTIONAL per-event override; when absent/blank it\n // must inherit the venue timezone. Falling straight to 'UTC' here rendered\n // venue-local times (e.g. a Fri 10pm Central show) in UTC (\"Sat 3:00 AM\"),\n // which made already-ended events look like future ones.\n // (domain.timeZone is the verbatim PascalCase passthrough; domain.timezone\n // folds lowercase + snake_case — same chain as before.)\n const timezone = getIANATimezone(\n domain.timeZone ||\n domain.timezone ||\n rawVenue.timeZone ||\n rawVenue.timezone ||\n 'UTC'\n );\n\n // Transform tickets — TICKET SEAM: raw wire tickets by contract (see note).\n const rawTickets = rawEvent.availableTickets || [];\n const tickets: TicketTypeData[] = rawTickets.map((t: any) => ({\n id: t.id || t.ID,\n name: t.name || t.title || '',\n description: t.description || undefined,\n price: t.price ?? 0,\n fee: t.fee ?? 0,\n quantityAvailable:\n t.remainingCapacity ?? t.quantityRemaining ?? t.quantity ?? 0,\n quantityTotal: t.totalCapacity ?? t.quantity ?? 0,\n minPerOrder: t.minPerOrder ?? t.minQuantity ?? 1,\n maxPerOrder: t.maxPerOrder ?? t.maxQuantity ?? 10,\n status: mapTicketStatus(t),\n salesStartDate:\n t.salesBegin || t.salesStart || t.saleBegin || t.onSaleStart || undefined,\n salesEndDate: t.salesEnd || t.saleEnd || t.onSaleEnd || undefined,\n isDonation: t.type === 2 || t.ticketType === 2 || t.isDonation === true,\n isHidden: t.visibility === 2 || t.isHidden === true,\n ticketType: t.type || t.ticketType || undefined,\n sectionName: t.sectionName || t.section || undefined,\n }));\n\n // Calculate totals from public tickets\n const publicTickets = tickets.filter(t => !t.isHidden && !t.isDonation);\n const totalRemaining = publicTickets.reduce(\n (sum, t) => sum + t.quantityAvailable,\n 0\n );\n const totalCapacity = publicTickets.reduce(\n (sum, t) => sum + t.quantityTotal,\n 0\n );\n\n // Determine event status\n const status = mapEventStatus(domain.status as string, tickets);\n\n // Build image URL — IMAGE SEAM: image-first precedence (see note).\n const rawImage =\n rawEvent.image || rawEvent.imageUrl || rawEvent.image_url || '';\n const imageUrl = rawImage.startsWith('http')\n ? rawImage\n : getImageUrl(rawImage);\n\n // Venue\n const venue: VenueData = {\n id: rawVenue.id || rawVenue.ID || 0,\n name: rawVenue.name || rawVenue.googleLocationNameCache || '',\n address: rawVenue.address || rawVenue.googleLocationNameCache || '',\n timezone,\n serviceFeePercentage: rawVenue.serviceFeePercentage ?? rawVenue.fee ?? 0,\n serviceFeeCents: rawVenue.serviceFeeCents ?? 0,\n taxPercentage: rawVenue.taxPercentage ?? rawVenue.tax ?? 0,\n contactEmail: rawVenue.contactEmail || rawVenue.email || undefined,\n };\n\n // Performers — VENUE/PERFORMERS SEAM: raw passthrough map (see note).\n const rawPerformers = domain.performers || [];\n const performers: PerformerData[] = rawPerformers.map((p: any) => ({\n id: p.id || p.ID,\n displayName: p.displayName || p.name || '',\n profileImage: p.avatar || p.profileImage || undefined,\n role: p.role || undefined,\n }));\n\n // FAQs (may not be in API response)\n const faqs: FAQItem[] = (domain.faqs || []).map((f: any) => ({\n question: f.question || '',\n answer: f.answer || '',\n }));\n\n // Series showtimes → occurrences. A single series-event detail carries a\n // `showtimes` array; the v2 <ShowtimeDesigns> renders event.seriesOccurrences\n // under \"Upcoming Shows\". Without this map the section is always empty.\n const seriesOccurrences: SeriesOccurrence[] = (domain.showtimes || [])\n .filter((s: any) => s.published !== false)\n .map((s: any, i: number) => ({\n id: s.id ?? s.eventId ?? i + 1,\n slug: s.slug || '',\n startDateTime: s.startDateTime || s.startTime || '',\n endDateTime: s.endDateTime || s.endTime || '',\n status: (s.ctaState?.reason === 'sold_out'\n ? 'sold_out'\n : 'on_sale') as EventStatus,\n ctaText: s.ctaState?.text || 'Get tickets',\n ctaDisabled: s.ctaState?.disabled || false,\n }));\n\n // Date in venue timezone\n let date = '';\n if (domain.startDateTime) {\n const dt = new Date(domain.startDateTime);\n date = formatDateRaw(\n dt,\n { timeZone: timezone, year: 'numeric', month: '2-digit', day: '2-digit' },\n 'en-CA'\n );\n }\n\n return {\n id: domain.id,\n title: domain.title || '',\n slug: domain.slug || '',\n description: domain.description || domain.eventSummary || '',\n date,\n startDateTime: domain.startDateTime || '',\n endDateTime: domain.endDateTime || '',\n doorsOpenTime: domain.doorsOpenTime || '',\n timezone,\n imageUrl,\n venue,\n performers,\n tickets,\n faqs,\n disclaimer: domain.disclaimer || undefined,\n status,\n eventSeriesId: domain.eventSeriesId || undefined,\n seriesOccurrences: seriesOccurrences.length ? seriesOccurrences : undefined,\n // Public API hides the actual password (json:\"-\") and exposes a boolean\n // `hasPassword` flag instead; fall back to a populated `password` for\n // admin-shaped payloads.\n isPasswordProtected: domain.hasPassword === true || !!domain.password,\n isRegistrationEvent:\n domain.ticketType === 1 || domain.eventTicketingType === 1,\n totalTicketsRemaining: totalRemaining,\n totalTicketsCapacity: totalCapacity,\n stageName: domain.stage?.name || domain.stageName || undefined,\n ageRestriction: domain.ageRestriction || undefined,\n displayAgeRestriction: domain.displayAgeRestriction ?? false,\n displayStartTime: domain.displayStartTime ?? true,\n displayEndTime: domain.displayEndTime ?? true,\n displayDoorsTime: domain.displayDoorsTime ?? true,\n collectionId: domain.collectionId || undefined, // domain folds collection_id\n venueAddressLines: parseAddress(\n rawVenue.address || rawVenue.googleLocationNameCache || ''\n ),\n googleMapsUrl: buildGoogleMapsUrl(\n rawVenue.address || rawVenue.googleLocationNameCache || ''\n ),\n };\n}\n\n/**\n * Transform SeriesPageData (from the series API) into our clean EventData interface.\n * Sets eventSeriesId so EventExperience renders in full-width series mode.\n */\nexport function transformSeriesPageData(series: SeriesPageData): EventData {\n // Implementation moved to the canonical transformer home\n // (`$lib/api/transformers/series.ts`). This export stays as a thin delegate\n // so SeriesPage.svelte and other consumers don't churn.\n return parseSeries(series);\n}\n\n/**\n * Transform PublicCollectionData (from the collection API) into our clean EventData interface.\n * Sets collectionId so EventExperience renders in full-width collection mode.\n */\nexport function transformCollectionData(\n collection: PublicCollectionData\n): EventData {\n // Implementation moved to the canonical transformer home\n // (`$lib/api/transformers/collection.ts`). This export stays as a thin\n // delegate so CollectionView.svelte and other consumers don't churn.\n return parseCollection(collection);\n}\n"],"names":["CDN_BASE_URL","DEFAULT_CDN_BASE_URL","getImageUrl","imagePath","baseUrl","parseAddress","addressStr","parts","p","stateZipMatch","state","zip","city","lines","buildGoogleMapsUrl","address","parseSeries","series","seriesAny","timezone","getIANATimezone","rawImage","imageUrl","seriesOccurrences","occ","firstOcc","date","dt","formatDateRaw","rawFaq","faqs","f","performers","index","venueAddress","parseCollection","collection","collectionEvents","ev","rawImg","rawCover","mapTicketStatus","ticket","now","remaining","salesBegin","salesEnd","mapEventStatus","rawStatus","tickets","t","publicTickets","transformApiEvent","rawEvent","domain","parseEvent","rawVenue","totalRemaining","sum","totalCapacity","status","venue","s","i","transformSeriesPageData","transformCollectionData"],"mappings":";AAYO,MAAMA,IAAe,gDAEtBC,IAAuBD;AAOtB,SAASE,EACdC,GACAC,IAAkBH,GACV;AACR,SAAKE,IAEDA,EAAU,WAAW,SAAS,KAAKA,EAAU,WAAW,UAAU,IAC7DA,IAGF,GAAGC,CAAO,GAAGD,CAAS,KANN;AAOzB;AClBO,SAASE,EAAaC,GAA8B;AACzD,MAAI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