@getmicdrop/venue-calendar 4.0.92 → 4.0.94

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 (109) hide show
  1. package/README.md +740 -740
  2. package/dist/CartView-hnrXbE_O.js +2385 -0
  3. package/dist/CartView-hnrXbE_O.js.map +1 -0
  4. package/dist/Checkout-Bvre3lYs.js +1745 -0
  5. package/dist/Checkout-Bvre3lYs.js.map +1 -0
  6. package/dist/Checkout-C4Kr5pVp.js +1040 -0
  7. package/dist/Checkout-C4Kr5pVp.js.map +1 -0
  8. package/dist/{CheckoutTimer-CF6emJxC.js → CheckoutTimer-D2HnWYm7.js} +37 -37
  9. package/dist/CheckoutTimer-D2HnWYm7.js.map +1 -0
  10. package/dist/ClockIcon-DA4wXK5Q.js +32 -0
  11. package/dist/ClockIcon-DA4wXK5Q.js.map +1 -0
  12. package/dist/CollectionView-DU1lTGU_.js +299 -0
  13. package/dist/CollectionView-DU1lTGU_.js.map +1 -0
  14. package/dist/{Event-BzBZmp6N.js → Event-BuOnGjPB.js} +1569 -1491
  15. package/dist/Event-BuOnGjPB.js.map +1 -0
  16. package/dist/EventPage-vBSbuSaG.js +566 -0
  17. package/dist/EventPage-vBSbuSaG.js.map +1 -0
  18. package/dist/{Heading-BswFTsr3.js → Heading-D4iOOm-C.js} +26 -26
  19. package/dist/Heading-D4iOOm-C.js.map +1 -0
  20. package/dist/ScarcityBadge-D37JY-BJ.js +167 -0
  21. package/dist/ScarcityBadge-D37JY-BJ.js.map +1 -0
  22. package/dist/{SeriesPage-CbmuRofu.js → SeriesPage-CZdi_-a4.js} +5 -5
  23. package/dist/SeriesPage-CZdi_-a4.js.map +1 -0
  24. package/dist/{Spinner-CAxL7NK0.js → Spinner-BZYln43S.js} +10 -10
  25. package/dist/Spinner-BZYln43S.js.map +1 -0
  26. package/dist/Success-CQYI5SZO.js +866 -0
  27. package/dist/Success-CQYI5SZO.js.map +1 -0
  28. package/dist/Text-C-6sDfH2.js +171 -0
  29. package/dist/Text-C-6sDfH2.js.map +1 -0
  30. package/dist/VenueCalendar-Um0PQCVy.js +15645 -0
  31. package/dist/VenueCalendar-Um0PQCVy.js.map +1 -0
  32. package/dist/{ViewTicketsEmbed-C7GPK33F.js → ViewTicketsEmbed-D2jQ8AMb.js} +386 -387
  33. package/dist/ViewTicketsEmbed-D2jQ8AMb.js.map +1 -0
  34. package/dist/api/{events.d.ts → api/events.d.ts} +9 -10
  35. package/dist/api/{index.d.ts → api/index.d.ts} +2 -1
  36. package/dist/api/api/result.d.ts +48 -0
  37. package/dist/api/{transformers → api/transformers}/event.d.ts +19 -10
  38. package/dist/api/api.cjs +1 -1
  39. package/dist/api/api.cjs.map +1 -1
  40. package/dist/api/api.mjs +690 -599
  41. package/dist/api/api.mjs.map +1 -1
  42. package/dist/api/types.d.ts +9 -0
  43. package/dist/{data-toggle-store.svelte-BUOQgWTH.js → data-toggle-store.svelte-CyXPU9Oq.js} +2 -2
  44. package/dist/data-toggle-store.svelte-CyXPU9Oq.js.map +1 -0
  45. package/dist/labels-BNiV89mT.js +636 -0
  46. package/dist/labels-BNiV89mT.js.map +1 -0
  47. package/dist/{modalManager.svelte-C8L8XPBi.js → modalManager.svelte-D_9E6W5P.js} +2 -2
  48. package/dist/modalManager.svelte-D_9E6W5P.js.map +1 -0
  49. package/dist/seo/seo.cjs +1 -1
  50. package/dist/seo/seo.cjs.map +1 -1
  51. package/dist/seo/seo.mjs +78 -74
  52. package/dist/seo/seo.mjs.map +1 -1
  53. package/dist/transform-HKz55B2D.js +360 -0
  54. package/dist/transform-HKz55B2D.js.map +1 -0
  55. package/dist/types/index.d.ts +454 -442
  56. package/dist/venue-calendar.css +1 -1
  57. package/dist/venue-calendar.es.js +12 -12
  58. package/dist/venue-calendar.iife.js +44 -30
  59. package/dist/venue-calendar.iife.js.map +1 -1
  60. package/dist/venue-calendar.umd.js +45 -31
  61. package/dist/venue-calendar.umd.js.map +1 -1
  62. package/package.json +7 -5
  63. package/src/lib/theme.js +222 -222
  64. package/dist/CartView-IiXG4UTa.js +0 -2366
  65. package/dist/CartView-IiXG4UTa.js.map +0 -1
  66. package/dist/Checkout-BscK0fmI.js +0 -1717
  67. package/dist/Checkout-BscK0fmI.js.map +0 -1
  68. package/dist/Checkout-Dx7QWFn9.js +0 -916
  69. package/dist/Checkout-Dx7QWFn9.js.map +0 -1
  70. package/dist/CheckoutTimer-CF6emJxC.js.map +0 -1
  71. package/dist/CollectionView-BAy5mYKg.js +0 -299
  72. package/dist/CollectionView-BAy5mYKg.js.map +0 -1
  73. package/dist/Event-BzBZmp6N.js.map +0 -1
  74. package/dist/EventPage-TNjZq1ls.js +0 -532
  75. package/dist/EventPage-TNjZq1ls.js.map +0 -1
  76. package/dist/Heading-BswFTsr3.js.map +0 -1
  77. package/dist/ScarcityBadge-DEzS1qXs.js +0 -90
  78. package/dist/ScarcityBadge-DEzS1qXs.js.map +0 -1
  79. package/dist/SeriesPage-CbmuRofu.js.map +0 -1
  80. package/dist/Spinner-CAxL7NK0.js.map +0 -1
  81. package/dist/Success-DdWMiFHS.js +0 -729
  82. package/dist/Success-DdWMiFHS.js.map +0 -1
  83. package/dist/Text-HvIEXENM.js +0 -167
  84. package/dist/Text-HvIEXENM.js.map +0 -1
  85. package/dist/VenueCalendar-DhxkKfli.js +0 -18400
  86. package/dist/VenueCalendar-DhxkKfli.js.map +0 -1
  87. package/dist/ViewTicketsEmbed-C7GPK33F.js.map +0 -1
  88. package/dist/data-toggle-store.svelte-BUOQgWTH.js.map +0 -1
  89. package/dist/labels-Bwet5rDx.js +0 -965
  90. package/dist/labels-Bwet5rDx.js.map +0 -1
  91. package/dist/modalManager.svelte-C8L8XPBi.js.map +0 -1
  92. package/dist/transform-5AH-sRWT.js +0 -274
  93. package/dist/transform-5AH-sRWT.js.map +0 -1
  94. /package/dist/api/{client.d.ts → api/client.d.ts} +0 -0
  95. /package/dist/api/{cta.d.ts → api/cta.d.ts} +0 -0
  96. /package/dist/api/{gift-cards.d.ts → api/gift-cards.d.ts} +0 -0
  97. /package/dist/api/{orders.d.ts → api/orders.d.ts} +0 -0
  98. /package/dist/api/{promo.d.ts → api/promo.d.ts} +0 -0
  99. /package/dist/api/{transformers → api/transformers}/address.d.ts +0 -0
  100. /package/dist/api/{transformers → api/transformers}/cart.d.ts +0 -0
  101. /package/dist/api/{transformers → api/transformers}/collection.d.ts +0 -0
  102. /package/dist/api/{transformers → api/transformers}/giftCard.d.ts +0 -0
  103. /package/dist/api/{transformers → api/transformers}/index.d.ts +0 -0
  104. /package/dist/api/{transformers → api/transformers}/order.d.ts +0 -0
  105. /package/dist/api/{transformers → api/transformers}/performer.d.ts +0 -0
  106. /package/dist/api/{transformers → api/transformers}/series.d.ts +0 -0
  107. /package/dist/api/{transformers → api/transformers}/venue.d.ts +0 -0
  108. /package/dist/api/{venues.d.ts → api/venues.d.ts} +0 -0
  109. /package/dist/api/{waitlist.d.ts → api/waitlist.d.ts} +0 -0
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Checkout-C4Kr5pVp.js","sources":["../node_modules/@getmicdrop/svelte-components/dist/primitives/Icons/CalendarOutline.svelte","../node_modules/@getmicdrop/svelte-components/dist/primitives/Icons/phosphor/CheckIcon.svelte","../node_modules/@getmicdrop/svelte-components/dist/primitives/Icons/phosphor/CloseIcon.svelte","../node_modules/@getmicdrop/svelte-components/dist/primitives/Icons/phosphor/TagIcon.svelte","../node_modules/@stripe/stripe-js/dist/index.mjs","../src/lib/utils/stripe-errors.ts","../src/lib/public-calendar-flow/serverTotals.ts","../src/components/Events/Checkout/GiftCardInput.svelte","../src/components/Modals/EventUnavailableModal.svelte","../src/components/Views/Checkout.svelte"],"sourcesContent":["<script lang=\"ts\">\n interface Props {\n size?: string;\n color?: string;\n class?: string;\n }\n let { size = \"24\", color = \"currentColor\", class: className = \"\" }: Props = $props();\n</script>\n\n<svg\n class={className}\n aria-hidden=\"true\"\n width={size}\n height={size}\n fill=\"none\"\n stroke={color}\n stroke-width=\"2\"\n viewBox=\"0 0 24 24\"\n xmlns=\"http://www.w3.org/2000/svg\"\n>\n <path\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n d=\"M8 2.25v3M16 2.25v3M3.75 9.75h16.5M5.25 4.5h13.5a1.5 1.5 0 011.5 1.5v13.5a1.5 1.5 0 01-1.5 1.5H5.25a1.5 1.5 0 01-1.5-1.5V6a1.5 1.5 0 011.5-1.5z\"\n />\n</svg>\n","<script lang=\"ts\">\n /**\n * Check — Phosphor icon (canonical Micdrop icon family).\n * Outline by default; pass `weight=\"fill\"` for solid, or let a stateful parent\n * (NavItem / Tabs / BottomNav / status badge) drive it via icon-weight context.\n */\n import { useIconWeight, type IconWeight } from './iconWeight.js';\n\n interface Props {\n /** Pixel size (width + height). */\n size?: string;\n /** Icon color; defaults to `currentColor` (inherits text color). */\n color?: string;\n /** Extra classes. */\n class?: string;\n /** `regular` (outline) or `fill` (solid). Overrides ambient state weight. */\n weight?: IconWeight;\n }\n\n let { size = '24', color = 'currentColor', class: className = '', weight }: Props = $props();\n\n const ctx = useIconWeight();\n let resolved: IconWeight = $derived(weight ?? ctx?.weight ?? 'regular');\n</script>\n\n<svg\n class={className}\n aria-hidden=\"true\"\n width={size}\n height={size}\n viewBox=\"0 0 256 256\"\n fill=\"currentColor\"\n style:color={color}\n xmlns=\"http://www.w3.org/2000/svg\"\n>\n {#if resolved === 'fill'}<path d=\"M216,40H40A16,16,0,0,0,24,56V200a16,16,0,0,0,16,16H216a16,16,0,0,0,16-16V56A16,16,0,0,0,216,40ZM205.66,85.66l-96,96a8,8,0,0,1-11.32,0l-40-40a8,8,0,0,1,11.32-11.32L104,164.69l90.34-90.35a8,8,0,0,1,11.32,11.32Z\"/>{:else}<polyline points=\"40 144 96 200 224 72\" fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"16\"/>{/if}\n</svg>\n","<script lang=\"ts\">\n /**\n * Close — Phosphor icon (canonical Micdrop icon family).\n * Outline by default; pass `weight=\"fill\"` for solid, or let a stateful parent\n * (NavItem / Tabs / BottomNav / status badge) drive it via icon-weight context.\n */\n import { useIconWeight, type IconWeight } from './iconWeight.js';\n\n interface Props {\n /** Pixel size (width + height). */\n size?: string;\n /** Icon color; defaults to `currentColor` (inherits text color). */\n color?: string;\n /** Extra classes. */\n class?: string;\n /** `regular` (outline) or `fill` (solid). Overrides ambient state weight. */\n weight?: IconWeight;\n }\n\n let { size = '24', color = 'currentColor', class: className = '', weight }: Props = $props();\n\n const ctx = useIconWeight();\n let resolved: IconWeight = $derived(weight ?? ctx?.weight ?? 'regular');\n</script>\n\n<svg\n class={className}\n aria-hidden=\"true\"\n width={size}\n height={size}\n viewBox=\"0 0 256 256\"\n fill=\"currentColor\"\n style:color={color}\n xmlns=\"http://www.w3.org/2000/svg\"\n>\n {#if resolved === 'fill'}<path d=\"M208,32H48A16,16,0,0,0,32,48V208a16,16,0,0,0,16,16H208a16,16,0,0,0,16-16V48A16,16,0,0,0,208,32ZM181.66,170.34a8,8,0,0,1-11.32,11.32L128,139.31,85.66,181.66a8,8,0,0,1-11.32-11.32L116.69,128,74.34,85.66A8,8,0,0,1,85.66,74.34L128,116.69l42.34-42.35a8,8,0,0,1,11.32,11.32L139.31,128Z\"/>{:else}<line x1=\"200\" y1=\"56\" x2=\"56\" y2=\"200\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"16\"/><line x1=\"200\" y1=\"200\" x2=\"56\" y2=\"56\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"16\"/>{/if}\n</svg>\n","<script lang=\"ts\">\n /**\n * Tag — Phosphor icon (canonical Micdrop icon family).\n * Outline by default; pass `weight=\"fill\"` for solid, or let a stateful parent\n * (NavItem / Tabs / BottomNav / status badge) drive it via icon-weight context.\n */\n import { useIconWeight, type IconWeight } from './iconWeight.js';\n\n interface Props {\n /** Pixel size (width + height). */\n size?: string;\n /** Icon color; defaults to `currentColor` (inherits text color). */\n color?: string;\n /** Extra classes. */\n class?: string;\n /** `regular` (outline) or `fill` (solid). Overrides ambient state weight. */\n weight?: IconWeight;\n }\n\n let { size = '24', color = 'currentColor', class: className = '', weight }: Props = $props();\n\n const ctx = useIconWeight();\n let resolved: IconWeight = $derived(weight ?? ctx?.weight ?? 'regular');\n</script>\n\n<svg\n class={className}\n aria-hidden=\"true\"\n width={size}\n height={size}\n viewBox=\"0 0 256 256\"\n fill=\"currentColor\"\n style:color={color}\n xmlns=\"http://www.w3.org/2000/svg\"\n>\n {#if resolved === 'fill'}<path d=\"M243.31,136,144,36.69A15.86,15.86,0,0,0,132.69,32H40a8,8,0,0,0-8,8v92.69A15.86,15.86,0,0,0,36.69,144L136,243.31a16,16,0,0,0,22.63,0l84.68-84.68a16,16,0,0,0,0-22.63ZM84,96A12,12,0,1,1,96,84,12,12,0,0,1,84,96Z\"/>{:else}<path d=\"M42.34,138.34A8,8,0,0,1,40,132.69V40h92.69a8,8,0,0,1,5.65,2.34l99.32,99.32a8,8,0,0,1,0,11.31L153,237.66a8,8,0,0,1-11.31,0Z\" fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"16\"/><circle cx=\"84\" cy=\"84\" r=\"12\"/>{/if}\n</svg>\n","function _typeof(obj) {\n \"@babel/helpers - typeof\";\n\n if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") {\n _typeof = function (obj) {\n return typeof obj;\n };\n } else {\n _typeof = function (obj) {\n return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj;\n };\n }\n\n return _typeof(obj);\n}\n\nvar RELEASE_TRAIN = 'clover';\n\nvar runtimeVersionToUrlVersion = function runtimeVersionToUrlVersion(version) {\n return version === 3 ? 'v3' : version;\n};\n\nvar ORIGIN = 'https://js.stripe.com';\nvar STRIPE_JS_URL = \"\".concat(ORIGIN, \"/\").concat(RELEASE_TRAIN, \"/stripe.js\");\nvar V3_URL_REGEX = /^https:\\/\\/js\\.stripe\\.com\\/v3\\/?(\\?.*)?$/;\nvar STRIPE_JS_URL_REGEX = /^https:\\/\\/js\\.stripe\\.com\\/(v3|[a-z]+)\\/stripe\\.js(\\?.*)?$/;\nvar EXISTING_SCRIPT_MESSAGE = 'loadStripe.setLoadParameters was called but an existing Stripe.js script already exists in the document; existing script parameters will be used';\n\nvar isStripeJSURL = function isStripeJSURL(url) {\n return V3_URL_REGEX.test(url) || STRIPE_JS_URL_REGEX.test(url);\n};\n\nvar findScript = function findScript() {\n var scripts = document.querySelectorAll(\"script[src^=\\\"\".concat(ORIGIN, \"\\\"]\"));\n\n for (var i = 0; i < scripts.length; i++) {\n var script = scripts[i];\n\n if (!isStripeJSURL(script.src)) {\n continue;\n }\n\n return script;\n }\n\n return null;\n};\n\nvar injectScript = function injectScript(params) {\n var queryString = params && !params.advancedFraudSignals ? '?advancedFraudSignals=false' : '';\n var script = document.createElement('script');\n script.src = \"\".concat(STRIPE_JS_URL).concat(queryString);\n var headOrBody = document.head || document.body;\n\n if (!headOrBody) {\n throw new Error('Expected document.body not to be null. Stripe.js requires a <body> element.');\n }\n\n headOrBody.appendChild(script);\n return script;\n};\n\nvar registerWrapper = function registerWrapper(stripe, startTime) {\n if (!stripe || !stripe._registerWrapper) {\n return;\n }\n\n stripe._registerWrapper({\n name: 'stripe-js',\n version: \"8.8.0\",\n startTime: startTime\n });\n};\n\nvar stripePromise$1 = null;\nvar onErrorListener = null;\nvar onLoadListener = null;\n\nvar onError = function onError(reject) {\n return function (cause) {\n reject(new Error('Failed to load Stripe.js', {\n cause: cause\n }));\n };\n};\n\nvar onLoad = function onLoad(resolve, reject) {\n return function () {\n if (window.Stripe) {\n resolve(window.Stripe);\n } else {\n reject(new Error('Stripe.js not available'));\n }\n };\n};\n\nvar loadScript = function loadScript(params) {\n // Ensure that we only attempt to load Stripe.js at most once\n if (stripePromise$1 !== null) {\n return stripePromise$1;\n }\n\n stripePromise$1 = new Promise(function (resolve, reject) {\n if (typeof window === 'undefined' || typeof document === 'undefined') {\n // Resolve to null when imported server side. This makes the module\n // safe to import in an isomorphic code base.\n resolve(null);\n return;\n }\n\n if (window.Stripe && params) {\n console.warn(EXISTING_SCRIPT_MESSAGE);\n }\n\n if (window.Stripe) {\n resolve(window.Stripe);\n return;\n }\n\n try {\n var script = findScript();\n\n if (script && params) {\n console.warn(EXISTING_SCRIPT_MESSAGE);\n } else if (!script) {\n script = injectScript(params);\n } else if (script && onLoadListener !== null && onErrorListener !== null) {\n var _script$parentNode;\n\n // remove event listeners\n script.removeEventListener('load', onLoadListener);\n script.removeEventListener('error', onErrorListener); // if script exists, but we are reloading due to an error,\n // reload script to trigger 'load' event\n\n (_script$parentNode = script.parentNode) === null || _script$parentNode === void 0 ? void 0 : _script$parentNode.removeChild(script);\n script = injectScript(params);\n }\n\n onLoadListener = onLoad(resolve, reject);\n onErrorListener = onError(reject);\n script.addEventListener('load', onLoadListener);\n script.addEventListener('error', onErrorListener);\n } catch (error) {\n reject(error);\n return;\n }\n }); // Resets stripePromise on error\n\n return stripePromise$1[\"catch\"](function (error) {\n stripePromise$1 = null;\n return Promise.reject(error);\n });\n};\nvar initStripe = function initStripe(maybeStripe, args, startTime) {\n if (maybeStripe === null) {\n return null;\n }\n\n var pk = args[0];\n\n if (typeof pk !== 'string') {\n throw new Error(\"Expected publishable key to be of type string, got type \".concat(_typeof(pk), \" instead.\"));\n }\n\n var isTestKey = pk.match(/^pk_test/); // @ts-expect-error this is not publicly typed\n\n var version = runtimeVersionToUrlVersion(maybeStripe.version);\n var expectedVersion = RELEASE_TRAIN;\n\n if (isTestKey && version !== expectedVersion) {\n console.warn(\"Stripe.js@\".concat(version, \" was loaded on the page, but @stripe/stripe-js@\").concat(\"8.8.0\", \" expected Stripe.js@\").concat(expectedVersion, \". This may result in unexpected behavior. For more information, see https://docs.stripe.com/sdks/stripejs-versioning\"));\n }\n\n var stripe = maybeStripe.apply(undefined, args);\n registerWrapper(stripe, startTime);\n return stripe;\n}; // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types\n\nvar stripePromise;\nvar loadCalled = false;\n\nvar getStripePromise = function getStripePromise() {\n if (stripePromise) {\n return stripePromise;\n }\n\n stripePromise = loadScript(null)[\"catch\"](function (error) {\n // clear cache on error\n stripePromise = null;\n return Promise.reject(error);\n });\n return stripePromise;\n}; // Execute our own script injection after a tick to give users time to do their\n// own script injection.\n\n\nPromise.resolve().then(function () {\n return getStripePromise();\n})[\"catch\"](function (error) {\n if (!loadCalled) {\n console.warn(error);\n }\n});\nvar loadStripe = function loadStripe() {\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n loadCalled = true;\n var startTime = Date.now(); // if previous attempts are unsuccessful, will re-load script\n\n return getStripePromise().then(function (maybeStripe) {\n return initStripe(maybeStripe, args, startTime);\n });\n};\n\nexport { loadStripe };\n","// Stripe error code to user-friendly message mapping.\n// Extracted from Views/Checkout.svelte for reuse across checkout implementations.\n\nexport interface PaymentErrorDetails {\n\ttype: string; // 'card_declined', 'network', 'validation', 'general', 'rate_limit'\n\ttitle: string;\n\tmessage: string;\n\tsuggestion: string;\n\tretryable: boolean;\n}\n\n/**\n * Maps a Stripe error object to user-friendly error details.\n * Handles card_declined (insufficient_funds, lost_card, stolen_card, expired_card),\n * api_connection_error/network, rate_limit, incorrect_number/invalid_cvc/invalid_expiry,\n * and a default fallback.\n */\nexport function getPaymentErrorDetails(error: any): PaymentErrorDetails {\n\tconst errorCode = error?.code || error?.decline_code || '';\n\tconst errorType = error?.type || '';\n\tconst errorMessage = error?.message || '';\n\n\t// Card declined errors\n\tif (errorCode === 'card_declined' || errorType === 'card_error') {\n\t\tconst declineCode = error?.decline_code || '';\n\n\t\tif (declineCode === 'insufficient_funds') {\n\t\t\treturn {\n\t\t\t\ttype: 'card_declined',\n\t\t\t\ttitle: 'Insufficient funds',\n\t\t\t\tmessage: 'Your card has insufficient funds to complete this purchase.',\n\t\t\t\tsuggestion: 'Please try a different payment method or contact your bank.',\n\t\t\t\tretryable: true,\n\t\t\t};\n\t\t}\n\n\t\tif (declineCode === 'lost_card' || declineCode === 'stolen_card') {\n\t\t\treturn {\n\t\t\t\ttype: 'card_declined',\n\t\t\t\ttitle: 'Card cannot be used',\n\t\t\t\tmessage: 'This card cannot be used for this transaction.',\n\t\t\t\tsuggestion: 'Please use a different payment method.',\n\t\t\t\tretryable: true,\n\t\t\t};\n\t\t}\n\n\t\tif (declineCode === 'expired_card') {\n\t\t\treturn {\n\t\t\t\ttype: 'card_declined',\n\t\t\t\ttitle: 'Card expired',\n\t\t\t\tmessage: 'Your card has expired.',\n\t\t\t\tsuggestion: 'Please use a different card or update your card details.',\n\t\t\t\tretryable: true,\n\t\t\t};\n\t\t}\n\n\t\treturn {\n\t\t\ttype: 'card_declined',\n\t\t\ttitle: 'Card declined',\n\t\t\tmessage: 'Your card was declined by your bank.',\n\t\t\tsuggestion: 'Please try a different card or contact your bank for more information.',\n\t\t\tretryable: true,\n\t\t};\n\t}\n\n\t// Network/connection errors\n\tif (\n\t\terrorType === 'api_connection_error' ||\n\t\terrorMessage.includes('network') ||\n\t\terrorMessage.includes('connection')\n\t) {\n\t\treturn {\n\t\t\ttype: 'network',\n\t\t\ttitle: 'Connection error',\n\t\t\tmessage: \"We couldn't connect to the payment server.\",\n\t\t\tsuggestion: 'Please check your internet connection and try again.',\n\t\t\tretryable: true,\n\t\t};\n\t}\n\n\t// Rate limiting\n\tif (errorCode === 'rate_limit') {\n\t\treturn {\n\t\t\ttype: 'rate_limit',\n\t\t\ttitle: 'Too many attempts',\n\t\t\tmessage: 'Too many payment attempts. Please wait a moment.',\n\t\t\tsuggestion: 'Wait 30 seconds before trying again.',\n\t\t\tretryable: true,\n\t\t};\n\t}\n\n\t// Invalid card details\n\tif (errorCode === 'incorrect_number' || errorCode === 'invalid_number') {\n\t\treturn {\n\t\t\ttype: 'validation',\n\t\t\ttitle: 'Invalid card number',\n\t\t\tmessage: 'The card number you entered is invalid.',\n\t\t\tsuggestion: 'Please check your card number and try again.',\n\t\t\tretryable: true,\n\t\t};\n\t}\n\n\tif (errorCode === 'incorrect_cvc' || errorCode === 'invalid_cvc') {\n\t\treturn {\n\t\t\ttype: 'validation',\n\t\t\ttitle: 'Invalid security code',\n\t\t\tmessage: 'The security code (CVC) is incorrect.',\n\t\t\tsuggestion: 'Please check the 3-digit code on the back of your card.',\n\t\t\tretryable: true,\n\t\t};\n\t}\n\n\tif (errorCode === 'invalid_expiry_month' || errorCode === 'invalid_expiry_year') {\n\t\treturn {\n\t\t\ttype: 'validation',\n\t\t\ttitle: 'Invalid expiration date',\n\t\t\tmessage: 'The expiration date is invalid.',\n\t\t\tsuggestion: \"Please check your card's expiration date.\",\n\t\t\tretryable: true,\n\t\t};\n\t}\n\n\t// Default error\n\treturn {\n\t\ttype: 'general',\n\t\ttitle: 'Payment failed',\n\t\tmessage: errorMessage || 'Something went wrong with your payment.',\n\t\tsuggestion: 'Please try again or use a different payment method.',\n\t\tretryable: true,\n\t};\n}\n","import type { PaymentIntentResponse } from '../api/types';\nimport type { ApplyGiftCardResult } from '../api/gift-cards';\nimport type { ServerOrderTotals } from './types';\n\n/**\n * Build the checkout's authoritative order totals from a createPaymentIntent\n * response. The server returns int cents for every monetary field; the checkout\n * UI (OrderSummary + Place-order button) renders from these numbers so the\n * displayed total always matches what Stripe will charge.\n *\n * Canonical single source for BOTH checkout flows — the embed\n * (components/Views/Checkout.svelte) and the hosted route\n * (routes/[id]/[slug]/checkout/+page.svelte). Setting config.serverTotals is\n * also what unlocks the Place-order button on paid orders\n * (totalsLocked = !!config.serverTotals in public-calendar-flow/Checkout.svelte).\n *\n * Notes baked in from the money-fix history:\n * - Total sources from `amount` (the charged residual, net of any gift card),\n * NOT `amount_total` (gross) — else the gift card is double-counted and the\n * displayed total overstates the charge.\n * - `stripeAmount` is that same residual (`amount`); the old `stripe_amount`\n * key never existed on the response, so it was permanently 0.\n * - `currency` is ISO-4217 for the Purchase pixel / MICDROP_CHECKOUT_COMPLETE value.\n * Stripe returns it lowercase; upcased here for GA4/Meta. Defaults to USD.\n */\nexport function buildServerTotalsFromPaymentIntent(\n paymentData: PaymentIntentResponse\n): ServerOrderTotals {\n return {\n subtotal: (paymentData.subtotal ?? 0) / 100,\n fees: (paymentData.service_fee ?? 0) / 100,\n taxes: (paymentData.tax_amount_exclusive ?? 0) / 100,\n total: (paymentData.amount ?? 0) / 100,\n promoDiscount: (paymentData.discount ?? 0) / 100,\n giftCardAmount: (paymentData.gift_card_amount ?? 0) / 100,\n stripeAmount: (paymentData.amount ?? 0) / 100,\n currency: paymentData.currency\n ? String(paymentData.currency).toUpperCase()\n : 'USD',\n };\n}\n\n/**\n * Fold an applied gift card into the authoritative order totals so the\n * OrderSummary line items AND the \"Place order · $X\" button show the amount\n * still due — 0 on full coverage, the residual on a split. The gift-card panel\n * still renders the full breakdown (applied / remaining). `pristine` is the\n * untouched pre-gift-card snapshot (serverTotalsFromPaymentIntent) so a later\n * removal can restore it verbatim.\n *\n * Canonical single source for BOTH checkout orchestrators — the embed\n * (components/Views/Checkout.svelte) and the hosted route\n * (routes/[id]/[slug]/checkout/+page.svelte) — so a fully-covering gift card\n * resolves the shared checkout to a 0 total on either surface and the two can't\n * drift again (the route previously tore Stripe down without folding, leaving a\n * non-zero total on a gift-card-only order).\n *\n * Total sources from the residual the card must still cover: `stripeAmount`\n * when the card requires Stripe (partial), else 0 (full coverage). Matches the\n * money-fix invariant that Total is the charged residual, never the gross.\n */\nexport function foldGiftCardIntoServerTotals(\n pristine: ServerOrderTotals,\n appliedCard: Pick<\n ApplyGiftCardResult,\n 'requiresStripe' | 'stripeAmount' | 'giftCardAmount'\n >\n): ServerOrderTotals {\n const amountDue = appliedCard.requiresStripe\n ? (appliedCard.stripeAmount ?? 0)\n : 0;\n return {\n ...pristine,\n giftCardAmount: appliedCard.giftCardAmount ?? 0,\n total: amountDue,\n };\n}\n","<!-- native-element-exception: VC is an embeddable widget — native <button>s are intentional here (widget-controlled styling on calendar cells, date selectors, checkout/nav CTAs). -->\n<script module>\n import { createLogger } from '@getmicdrop/svelte-components';\n const logger = createLogger('GiftCardInput');\n</script>\n\n<script>\n import {\n TagIcon,\n CloseIcon,\n CheckIcon,\n WarningTriIcon,\n } from '@getmicdrop/svelte-components/primitives/Icons/phosphor/index.js';\n import {\n DURATION,\n formatCurrency,\n safeSlide,\n } from '@getmicdrop/svelte-components';\n import { applyGiftCard, removeGiftCard } from '$lib/api';\n\n let {\n cartId,\n onApplied = () => {},\n onRemoved = () => {},\n disabled = false,\n labels = {},\n } = $props();\n\n let code = $state('');\n let loading = $state(false);\n let error = $state('');\n // Stacked applied cards: { code, giftCardAmount } (giftCardAmount in dollars).\n let appliedCards = $state([]);\n let showInput = $state(false);\n // Order total (dollars) inferred from the latest apply response, so the residual\n // can be recomputed locally after a single-card removal.\n let orderTotal = $state(0);\n\n let totalApplied = $derived(\n appliedCards.reduce((s, c) => s + (c.giftCardAmount || 0), 0)\n );\n let residual = $derived(Math.max(0, orderTotal - totalApplied));\n let fullyCovered = $derived(appliedCards.length > 0 && residual <= 0);\n\n // Emit the aggregate cart gift-card state to the parent (re-prices the order /\n // re-inits the PaymentIntent for the residual). Emits onRemoved when empty.\n function emitAggregate() {\n if (appliedCards.length === 0) {\n onRemoved();\n return;\n }\n onApplied({\n code: appliedCards.map(c => c.code).join(', '),\n giftCardAmount: totalApplied,\n stripeAmount: residual,\n requiresStripe: residual > 0,\n paymentType: residual > 0 ? 'split' : 'gift_card_only',\n orderTotal,\n });\n }\n\n async function handleApply() {\n const entered = code.trim().toUpperCase();\n if (!entered || loading || !cartId) return;\n if (appliedCards.some(c => c.code === entered)) {\n error =\n labels.giftCardAlreadyApplied || 'That gift card is already applied';\n return;\n }\n\n loading = true;\n error = '';\n\n try {\n const result = await applyGiftCard(cartId, entered);\n\n if (result.valid) {\n appliedCards = [\n ...appliedCards,\n {\n code: result.giftCardCode || entered,\n giftCardAmount: result.giftCardAmount || 0,\n },\n ];\n // orderTotal = (new) sum applied + the aggregate residual the backend\n // reported for the whole cart.\n orderTotal = totalApplied + (result.stripeAmount || 0);\n code = '';\n showInput = false;\n emitAggregate();\n } else {\n error =\n result.error ||\n labels.invalidGiftCardCode ||\n 'Invalid gift card code';\n }\n } catch (err) {\n logger.error('Error applying gift card:', err);\n error =\n labels.failedToApplyGiftCard ||\n 'Failed to apply gift card. Please try again.';\n }\n\n loading = false;\n }\n\n async function handleRemove(cardCode) {\n if (loading || !cartId) return;\n\n loading = true;\n error = '';\n\n try {\n const result = await removeGiftCard(cartId, cardCode);\n\n if (result.success !== false && !result.error) {\n appliedCards = appliedCards.filter(c => c.code !== cardCode);\n emitAggregate();\n } else {\n error =\n result.error ||\n labels.failedToRemoveGiftCard ||\n 'Failed to remove gift card.';\n }\n } catch (err) {\n logger.error('Error removing gift card:', err);\n error =\n labels.failedToRemoveGiftCard ||\n 'Failed to remove gift card. Please try again.';\n }\n\n loading = false;\n }\n\n function handleKeydown(e) {\n if (e.key === 'Enter' && !loading) {\n handleApply();\n }\n }\n\n function toggleInput() {\n showInput = !showInput;\n if (!showInput) {\n code = '';\n error = '';\n }\n }\n</script>\n\n<div class=\"mb-4\">\n <!-- Applied gift cards (stackable): one removable row each -->\n {#each appliedCards as card (card.code)}\n <div\n class=\"applied-card mb-2\"\n transition:safeSlide={{ duration: DURATION.fast }}\n >\n <div class=\"flex items-center gap-3\">\n <div class=\"applied-icon\">\n <CheckIcon size=\"16\" />\n </div>\n <div class=\"flex flex-col flex-1\">\n <span class=\"type-caption text-status-success-text\"\n >{labels.giftCardApplied || 'Gift card applied'}</span\n >\n <span class=\"type-body font-mono text-text-primary\">{card.code}</span>\n </div>\n <span class=\"type-label text-accent-success\"\n >-{formatCurrency(card.giftCardAmount)}</span\n >\n <button\n class=\"remove-btn\"\n onclick={() => handleRemove(card.code)}\n disabled={loading || disabled}\n aria-label={labels.removeGiftCard || 'Remove gift card'}\n >\n {#if loading}\n <span class=\"gc-spinner gc-spinner-sm\"></span>\n {:else}\n <CloseIcon size=\"16\" />\n {/if}\n </button>\n </div>\n </div>\n {/each}\n\n <!-- Aggregate summary -->\n {#if appliedCards.length > 0}\n <div class=\"applied-card mb-3\">\n <div class=\"flex justify-between items-center type-body\">\n <span class=\"text-text-secondary\"\n >{labels.appliedToOrder || 'Applied to order'}</span\n >\n <span class=\"type-label text-accent-success\"\n >-{formatCurrency(totalApplied)}</span\n >\n </div>\n {#if fullyCovered}\n <div class=\"full-coverage-badge\">\n <CheckIcon size=\"16\" />\n <span\n >{labels.fullyCoveredByGiftCard ||\n 'Fully covered by gift card'}</span\n >\n </div>\n {:else}\n <div class=\"flex justify-between items-center type-body mt-1.5\">\n <span class=\"text-text-secondary\"\n >{labels.remainingToPay || 'Remaining to pay'}</span\n >\n <span class=\"type-label text-text-primary\"\n >{formatCurrency(residual)}</span\n >\n </div>\n {/if}\n </div>\n {/if}\n\n <!-- Add a gift card (stack multiple) -->\n <button\n class=\"gift-card-toggle\"\n onclick={toggleInput}\n {disabled}\n aria-expanded={showInput}\n >\n <TagIcon size=\"20\" class=\"gift-icon\" />\n <span\n >{appliedCards.length > 0\n ? labels.addAnotherGiftCard || 'Add another gift card'\n : labels.haveAGiftCard || 'Have a gift card?'}</span\n >\n <span class=\"toggle-indicator\">{showInput ? '-' : '+'}</span>\n </button>\n\n {#if showInput}\n <div\n class=\"input-section\"\n transition:safeSlide={{ duration: DURATION.fast }}\n >\n <div class=\"flex gap-2\">\n <input\n type=\"text\"\n name=\"giftCardCode\"\n aria-label={labels.enterGiftCardCode || 'Enter gift card code'}\n bind:value={code}\n onkeydown={handleKeydown}\n placeholder={labels.enterGiftCardCode || 'Enter gift card code'}\n disabled={loading || disabled}\n class=\"gift-input\"\n class:has-error={!!error}\n autocomplete=\"off\"\n autocapitalize=\"characters\"\n />\n <button\n class=\"apply-btn\"\n onclick={handleApply}\n disabled={!code.trim() || loading || disabled}\n >\n {#if loading}\n <span class=\"gc-spinner\"></span>\n {:else}\n {labels.apply || 'Apply'}\n {/if}\n </button>\n </div>\n {#if error}\n <div\n class=\"flex items-center gap-1.5 mt-2 type-body text-accent-danger\"\n transition:safeSlide={{ duration: DURATION.micro }}\n >\n <WarningTriIcon size=\"16\" />\n <span>{error}</span>\n </div>\n {/if}\n </div>\n {/if}\n</div>\n\n<style>\n .gift-card-toggle {\n display: flex;\n align-items: center;\n gap: 0.5rem;\n width: 100%;\n padding: 0.75rem 1rem;\n font-size: 0.875rem;\n line-height: 1.25rem;\n font-weight: 500;\n background-color: hsl(var(--bg-secondary));\n border-radius: 0.5rem;\n border: 1px solid hsl(var(--border));\n color: hsl(var(--text-secondary));\n cursor: pointer;\n transition-property: background-color, color;\n transition-duration: 150ms;\n }\n\n .gift-card-toggle:hover:not(:disabled) {\n background-color: hsl(var(--bg-tertiary));\n\n &:is([data-theme='dark'], [data-theme='dark'] *) {\n background-color: hsl(var(--muted));\n }\n }\n\n .gift-card-toggle:disabled {\n opacity: 0.5;\n cursor: not-allowed;\n }\n\n .gift-card-toggle :global(.gift-icon) {\n color: hsl(var(--text-tertiary));\n\n &:is([data-theme='dark'], [data-theme='dark'] *) {\n color: hsl(var(--text-head));\n }\n }\n\n .toggle-indicator {\n margin-left: auto;\n color: hsl(var(--text-head));\n font-size: 1.125rem;\n font-weight: 300;\n }\n\n .input-section {\n margin-top: 0.75rem;\n padding: 1rem;\n background-color: hsl(var(--bg-secondary));\n border-radius: 0.5rem;\n border: 1px solid hsl(var(--border));\n }\n\n .gift-input {\n width: 100%;\n padding: 0.5rem 0.75rem;\n font-size: 0.875rem;\n line-height: 1.25rem;\n border-radius: 0.5rem;\n border: 1px solid hsl(var(--stroke-primary));\n background-color: hsl(var(--bg-primary));\n color: hsl(var(--text-primary));\n flex: 1;\n text-transform: uppercase;\n transition-property: border-color;\n transition-duration: 150ms;\n }\n\n .gift-input::placeholder {\n color: hsl(var(--text-head));\n\n &:is([data-theme='dark'], [data-theme='dark'] *) {\n color: hsl(var(--text-tertiary));\n }\n }\n\n .gift-input:focus {\n outline: none;\n box-shadow: 0 0 0 2px hsl(var(--brand-primary));\n border-color: transparent;\n }\n\n .gift-input.has-error {\n border-color: hsl(var(--accent-danger));\n }\n\n .gift-input:disabled {\n opacity: 0.5;\n cursor: not-allowed;\n }\n\n .apply-btn {\n padding: 0.5rem 1rem;\n font-size: 0.875rem;\n line-height: 1.25rem;\n font-weight: 500;\n border-radius: 0.5rem;\n color: hsl(var(--bg-primary));\n border: none;\n transition-property: background-color;\n transition-duration: 150ms;\n display: flex;\n align-items: center;\n justify-content: center;\n min-width: 4rem;\n cursor: pointer;\n background-color: hsl(var(--brand-primary, 224 76% 48%));\n }\n\n .apply-btn:hover:not(:disabled) {\n filter: brightness(0.9);\n }\n\n .apply-btn:disabled {\n opacity: 0.5;\n cursor: not-allowed;\n }\n\n /* Applied card styles */\n .applied-card {\n padding: 1rem;\n background-color: hsl(var(--accent-success) / 8%);\n border-radius: 0.5rem;\n border: 1px solid hsl(var(--accent-success) / 30%);\n }\n\n .applied-icon {\n width: 2rem;\n height: 2rem;\n border-radius: 9999px;\n display: flex;\n align-items: center;\n justify-content: center;\n background-color: hsl(var(--accent-success) / 15%);\n color: hsl(var(--accent-success));\n }\n\n .remove-btn {\n padding: 0.5rem;\n border-radius: 9999px;\n border: none;\n background: none;\n transition-property: background-color, color;\n transition-duration: 150ms;\n color: hsl(var(--text-tertiary));\n cursor: pointer;\n }\n\n .remove-btn:hover {\n background-color: hsl(var(--accent-danger) / 10%);\n color: hsl(var(--accent-danger));\n }\n\n .remove-btn:disabled {\n opacity: 0.5;\n cursor: not-allowed;\n }\n\n .full-coverage-badge {\n display: flex;\n align-items: center;\n gap: 0.375rem;\n margin-top: 0.5rem;\n padding: 0.375rem 0.625rem;\n border-radius: 0.375rem;\n background-color: hsl(var(--accent-success) / 15%);\n color: hsl(var(--accent-success));\n font-size: 0.75rem;\n line-height: 1rem;\n font-weight: 500;\n }\n\n /* Loading spinner */\n .gc-spinner {\n width: 1.5rem;\n height: 1.5rem;\n border: 2px solid hsl(var(--border));\n border-radius: 9999px;\n border-top-color: hsl(var(--brand-primary));\n animation: sc-spin 0.8s linear infinite; /* SC canonical spinner keyframes */\n }\n\n .gc-spinner-sm {\n width: 1rem;\n height: 1rem;\n }\n</style>\n","<!--\n Fail-closed FLOOR for the public checkout. When a buyer tries to finalize a\n purchase for an event that has been canceled or postponed mid-purchase, the\n backend gate refuses to capture the charge and returns\n `{ success: false, eventCanceled: true }` or `{ ... eventPostponed: true }`\n on validatePaymentIntent. Checkout.svelte catches that rejection and raises\n THIS modal instead of the inline payment-error text — the buyer needs an\n interruptive, charge-aware response, not a line of red text under the form.\n\n The copy is intentionally calm and factual: the headline fact is \"you weren't\n charged.\" Structure mirrors NetworkErrorModal (the existing interruptive\n error-modal precedent in this repo): ModalRoot size=\"sm\", centered icon +\n title + body, footer with a single full-width Button.\n\n Both variants (canceled / postponed) offer a SINGLE action: \"Back to events\".\n There is no notify/waitlist backend wired for the mid-purchase case, so a\n \"Notify me\" button would do nothing — a dead button is worse than no button.\n\n role=\"alertdialog\": this is an interruptive prompt that demands a response and\n must not be dismissible by a stray backdrop click (R-MODAL-04 / R-A11Y-06).\n\n class=\"micdrop\" on ModalRoot: the Modal primitive PORTALS its dialog to\n document.body, which lands OUTSIDE the widget's `.micdrop` style scope. That\n scope is where the widget gets both `font-family: Inter` (app.css) and\n `box-sizing: border-box` (app.css `.micdrop *`). Without it the portaled\n dialog fell back to the UA serif AND content-box sizing (so `w-full` + button\n padding overflowed the panel). Tagging the portaled root with `micdrop`\n re-enters that scope for the whole subtree, fixing font + overflow at once.\n-->\n<script>\n import {\n ModalRoot,\n ModalOverlay,\n ModalPanel,\n ModalBody,\n ModalFooter,\n Button,\n CloseCircleOutline,\n CalendarOutline,\n typography,\n } from '@getmicdrop/svelte-components';\n\n /**\n * @typedef {Object} Props\n * @property {boolean} [open]\n * @property {'canceled' | 'postponed'} reason - which fail-closed variant to show\n * @property {() => void} [onBackToEvents] - return to the calendar / event list\n * @property {Record<string, string>} [labels]\n */\n /** @type {Props} */\n let {\n open = $bindable(false),\n reason,\n onBackToEvents = () => {},\n labels = {},\n } = $props();\n\n let isCanceled = $derived(reason === 'canceled');\n\n let resolvedTitle = $derived(\n isCanceled\n ? labels.eventCanceledTitle || 'Event canceled'\n : labels.eventPostponedTitle || 'Event postponed'\n );\n let resolvedBody = $derived(\n isCanceled\n ? labels.eventCanceledBody ||\n \"This event was canceled — you weren't charged.\"\n : labels.eventPostponedBody ||\n \"Sales are paused while this show is rescheduled — you weren't charged.\"\n );\n let resolvedBackToEvents = $derived(labels.backToEvents || 'Back to events');\n</script>\n\n<ModalRoot bind:open size=\"sm\" role=\"alertdialog\" class=\"micdrop\">\n <ModalOverlay />\n <ModalPanel>\n <ModalBody>\n <div class=\"flex flex-col items-center text-center pt-6 px-4 pb-4\">\n <div\n class=\"w-16 h-16 rounded-full flex items-center justify-center mb-4 {isCanceled\n ? 'bg-accent-danger/10 text-accent-danger'\n : 'bg-accent-warning/10 text-accent-warning'}\"\n aria-hidden=\"true\"\n >\n {#if isCanceled}\n <CloseCircleOutline size=\"32\" />\n {:else}\n <CalendarOutline size=\"32\" />\n {/if}\n </div>\n <h3 id=\"event-unavailable-title\" class=\"mb-2 {typography.heading}\">\n {resolvedTitle}\n </h3>\n <p\n id=\"event-unavailable-body\"\n class=\"type-body tone-secondary max-w-72\"\n >\n {resolvedBody}\n </p>\n </div>\n </ModalBody>\n <ModalFooter>\n <Button\n size=\"full\"\n variant=\"default\"\n onclick={onBackToEvents}\n aria-label={resolvedBackToEvents}\n >\n {resolvedBackToEvents}\n </Button>\n </ModalFooter>\n </ModalPanel>\n</ModalRoot>\n","<!--\n @currency-escape: cents/100 in this file is fee-math arithmetic, not\n display. `serviceFeeCents / 100` produces a dollar-magnitude `number`\n used in the running fee total + `Math.min(fee, maxServiceFeeCents / 100)`\n cap calculation. Real math, not formatter bypass. Per Atlas\n utility-currency convergence record.\n\n @form-handling-escape: `processing` is a Stripe payment-confirmation\n reentrancy guard (`if (processing) return; processing = true` around\n confirmPayment), NOT form-submission/validation state. createFormStore\n cannot express a payment-intent confirmation flow, and forcing it here\n would risk double-charge regressions for zero user-visible benefit.\n Same call as PP#193. Per Atlas behavior-form-handling convergence record.\n-->\n<script module>\n import { createLogger } from '@getmicdrop/svelte-components';\n const logger = createLogger('Checkout');\n</script>\n\n<script>\n import {\n roundCurrency,\n getCookie,\n COOKIE_NAMES,\n } from '@getmicdrop/svelte-components';\n import { getDefaultTimezone } from '@getmicdrop/svelte-components/utils/timezones';\n import { onMount } from 'svelte';\n import { loadStripe } from '@stripe/stripe-js';\n import {\n loadCheckoutStateFromCookies,\n getVenueDetails,\n } from '$lib/utils/utils.js';\n // DETAIL-mode view shaper under an unambiguous alias — `$lib/api` exports\n // a DIFFERENT `transformEvent` (the canonical domain parseEvent); the name\n // collision previously made this import ambiguous to readers.\n import { transformEvent as transformEventDetail } from '$lib/utils/event-transform.js';\n import {\n createPaymentIntent,\n completeGiftCardPayment,\n extendCheckoutSession,\n getSessionStatus,\n applyPromoCode,\n // validatePaymentIntent MUST come from the same orders-v2 service as\n // createPaymentIntent. Previously it was imported from utils.js (the legacy\n // /api/v2/public/orders/{id}/validate-payment endpoint), so after a\n // successful charge the cart created via the orders-v2 PI could fail to\n // finalize / report \"validation failed\" — money taken, order not confirmed.\n validatePaymentIntent,\n } from '$lib/api';\n import { getPaymentErrorDetails } from '$lib/utils/stripe-errors';\n import { trackCheckoutStarted } from '$lib/tracking';\n import CheckoutMain from '$lib/public-calendar-flow/Checkout.svelte';\n import {\n buildServerTotalsFromPaymentIntent,\n foldGiftCardIntoServerTotals,\n } from '$lib/public-calendar-flow/serverTotals';\n import GiftCardInput from '../Events/Checkout/GiftCardInput.svelte';\n import EventUnavailableModal from '../Modals/EventUnavailableModal.svelte';\n\n let {\n data,\n availableTickets = [],\n value = '',\n venueId = '',\n organizationId = '',\n onNavigateToSuccess,\n // Optional back handler. Defaults to history.back() for the full-page\n // get-micdrop.com checkout route; the in-widget embed passes a callback\n // that returns to the in-place show detail (there is no history entry to\n // pop in that context).\n onNavigateBack = undefined,\n initialError = undefined,\n // Saved-widget id, threaded from CalendarContainer onto the checkout_started\n // funnel beacon (per-widget attribution).\n widgetId = null,\n labels = {},\n } = $props();\n\n // --- Derive event from data prop ---\n let id = $derived((data || {}).id);\n let orgSlug = $derived((data || {}).orgSlug);\n let slug = $derived((data || {}).slug);\n let rawEvent = $derived((data || {}).event);\n let event = $derived(\n rawEvent\n ? transformEventDetail(rawEvent)\n : data && (data.id || id)\n ? {\n id: data.id || id,\n eventID: data.id || id,\n venueID: data.venueID ?? data.venueId ?? null,\n venueId: data.venueId ?? data.venueID ?? null,\n eventTicketingType: 0,\n ticketType: 0,\n availableTickets: [],\n }\n : null\n );\n\n // --- Core state ---\n let cartId = $state('');\n let quantities = $state({});\n let donationAmounts = $state({});\n let tickets = $state([]);\n let promocode = $state('');\n let promoDiscountAmount = $state(0);\n let processing = $state(false);\n // True while a gift-card PI re-init is in flight (the Stripe PaymentIntent is\n // being re-created at the reduced residual after a split gift card is applied,\n // or restored to the full amount after one is removed). Place-order is blocked\n // while it's true so a click can't confirm a charge against the stale PI.\n let reinitializingPayment = $state(false);\n\n // Stripe state\n let stripe = $state(null);\n let paymentIntent = $state('');\n let elements = $state(undefined);\n\n // Error state\n let paymentErrorMessage = $state('');\n let showError = $state(false);\n let errorMessage = $state('');\n\n // Fail-closed FLOOR: when the finalize call is rejected because the event was\n // canceled or postponed mid-purchase, the backend gate did NOT capture the\n // charge. We raise an interruptive, charge-aware modal instead of the inline\n // payment-error text — the buyer must be told plainly they weren't charged.\n // `eventUnavailableReason` is 'canceled' | 'postponed' | null.\n let eventUnavailableReason = $state(null);\n let showEventUnavailable = $derived(eventUnavailableReason !== null);\n\n // Gift card state\n let giftCardApplied = $state(null);\n\n // CheckoutConfig for CheckoutMain\n let checkoutConfig = $state(null);\n\n // Captured from /payment-intent response — the server's totals are\n // the source of truth for what Stripe charges. Set inside\n // initializeStripePayment (which runs before checkoutConfig is\n // built) and applied at checkoutConfig assembly time.\n let serverTotalsFromPaymentIntent = null;\n\n // The order's paid total + currency for the Purchase pixel + MICDROP_CHECKOUT_COMPLETE\n // postMessage (MISSION-TRUTH C6). Threaded onto every success payload →\n // CalendarContainer → Success. value is null (fires without an amount) when\n // the server totals never arrived; currency defaults to USD.\n function orderValueForPixel() {\n return {\n value: serverTotalsFromPaymentIntent?.total ?? null,\n currency: serverTotalsFromPaymentIntent?.currency || 'USD',\n };\n }\n\n // --- Initialize on mount ---\n onMount(async () => {\n cartId = getCookie(COOKIE_NAMES.CHECKOUT_CARTID);\n\n if (!cartId) {\n showError = true;\n errorMessage =\n labels.noCheckoutSession ||\n 'No checkout session found. Please select tickets first.';\n return;\n }\n\n // Funnel: the checkout UI is open with a live cart → checkout_started\n // moment (never deduped). Fire-and-forget with this instance's widgetId.\n trackCheckoutStarted(\n event?.eventID || event?.id || id,\n widgetId,\n venueId || event?.venueID || event?.venueId || null\n );\n\n // Load checkout state from cookies/localStorage\n try {\n const checkoutState = loadCheckoutStateFromCookies(\n event?.eventID || event?.id || id\n );\n quantities = checkoutState.quantities || {};\n donationAmounts = checkoutState.donationAmounts || {};\n promocode = checkoutState.promocode || '';\n promoDiscountAmount = checkoutState.promoDiscountAmount || 0;\n tickets = checkoutState.tickets || [];\n } catch (err) {\n logger.error('Error loading checkout state:', err);\n quantities = {};\n tickets = [];\n }\n\n if (tickets.length > 0 && event) {\n event.availableTickets = tickets;\n availableTickets = tickets;\n }\n\n // Fetch venue details for fee calculations\n let venueServiceCharge = {\n serviceFeeCents: 0,\n serviceFeePercentage: 0,\n serviceFeeChargeType: 'both',\n maxServiceFeeCents: 0,\n taxPercentage: 0,\n };\n\n try {\n const venueData = /** @type {any} */ (\n await getVenueDetails(event?.venueID || event?.venueId || venueId)\n );\n venueServiceCharge = {\n serviceFeeCents: Number(venueData?.serviceFeeCents ?? 0),\n serviceFeePercentage: Number(venueData?.serviceFeePercentage ?? 0),\n serviceFeeChargeType: String(venueData?.serviceFeeChargeType ?? 'both'),\n maxServiceFeeCents: Number(venueData?.maxServiceFeeCents ?? 0),\n taxPercentage: Number(venueData?.taxPercentage ?? 0),\n };\n } catch (err) {\n logger.error('Error fetching venue data:', err);\n }\n\n // Build OrderLine[] from quantities + tickets + venue fees\n const lines = buildOrderLines(quantities, tickets, venueServiceCharge);\n\n // Initialize the payment intent for any cart that has line items.\n //\n // For PAID carts this creates a Stripe PaymentIntent up front so the\n // card form has a PI to mount against on the common pay-by-card path.\n // Gift-card application happens AFTER mount; if the user later applies a\n // gift card that covers the whole amount, handleGiftCardApplied clears\n // the elements. The unused PaymentIntent is benign on Stripe's side\n // (auto-expires).\n //\n // For genuinely FREE carts ($0 total, no donation) we STILL call the\n // payment-intent endpoint: the backend's CreatePaymentIntentFromCart\n // finalizes a $0 order in-band (generates tickets, marks the cart\n // completed, sends the confirmation email, sets payment_status\n // \"succeeded\") and returns { requires_stripe: false, payment_type:\n // 'free', order_uuid }. initializeStripePayment then sets the\n // `paymentIntent = 'free'` sentinel, which handlePlaceOrder reads to\n // skip Stripe and navigate straight to the Confirmation page. Skipping\n // this call is what dead-ended free orders at \"Payment form is not\n // ready\" (checkout-free-order-deadend).\n // Donation (\"pay what you want\") carts have unitPrice-0 lines but a real\n // amount in donationAmounts, so they are paid carts and take the Stripe\n // path via the same call below.\n if (Object.keys(quantities).length > 0) {\n await initializeStripePayment();\n }\n\n // Resolve timer from: 1) server session, 2) localStorage, 3) default 15 min\n let timerStart = 15 * 60;\n if (cartId) {\n // Always check localStorage first (set by tickets page timer)\n const storedExpiry =\n typeof localStorage !== 'undefined'\n ? localStorage.getItem(`checkout-expiry-${cartId}`) // @storage-escape: checkout-timer state (intentional raw localStorage)\n : null;\n if (storedExpiry) {\n const remaining = Math.max(\n 0,\n Math.floor((parseInt(storedExpiry, 10) - Date.now()) / 1000)\n );\n if (remaining > 0) timerStart = remaining;\n }\n\n // Then try server (overrides localStorage if available)\n try {\n const status = await getSessionStatus(cartId);\n if (!status.error && status.expiresAt) {\n const remaining = Math.max(\n 0,\n Math.floor(\n (new Date(status.expiresAt).getTime() - Date.now()) / 1000\n )\n );\n timerStart = remaining;\n localStorage.setItem(\n // @storage-escape: checkout-timer state (intentional raw localStorage)\n `checkout-expiry-${cartId}`,\n String(new Date(status.expiresAt).getTime())\n );\n }\n // If status.error (404), timerStart keeps the localStorage value\n } catch {\n // Network error — timerStart keeps the localStorage value\n }\n }\n\n // Build CheckoutConfig for CheckoutMain. If initializeStripePayment\n // already captured server totals (paid carts), include them so the\n // first render uses authoritative numbers.\n checkoutConfig = {\n event: buildEventData(event, venueServiceCharge),\n lines,\n timerStart,\n promoApplied: !!promocode,\n promoDiscount: promoDiscountAmount,\n forceExpired: false,\n ...(serverTotalsFromPaymentIntent\n ? { serverTotals: serverTotalsFromPaymentIntent }\n : {}),\n };\n\n // Apply initial error if provided (for showcase/preview)\n if (initialError) {\n const details = getPaymentErrorDetails(\n typeof initialError === 'object'\n ? initialError\n : {\n code: 'card_declined',\n message:\n 'Your card was declined. Please try a different payment method.',\n }\n );\n paymentErrorMessage = details.message;\n }\n });\n\n // --- Stripe initialization (uses API-provided key, NO hardcoded key) ---\n // Monotonic id for payment-intent re-inits. initializeStripePayment runs on\n // mount AND on every gift-card apply/remove, each awaiting a fresh\n // createPaymentIntent before it binds `paymentIntent`/`serverTotals`. Two\n // re-inits can overlap (apply then remove); a slower EARLIER run resolving\n // last would otherwise clobber the latest intent, so Stripe Elements confirms\n // the card against a PI for the wrong amount. We stamp each run and, on\n // resolve, bail unless it is still the latest — a superseded run writes nothing.\n let latestPaymentInit = 0;\n\n async function initializeStripePayment() {\n const runId = ++latestPaymentInit;\n if (!cartId) {\n logger.error('Missing cartId!');\n return;\n }\n\n const filteredQuantities = Object.fromEntries(\n Object.entries(quantities).filter(([_, val]) => val > 0)\n );\n\n try {\n // Convert donationAmounts to numeric keys/values for the API\n const numericDonationAmounts = Object.fromEntries(\n Object.entries(donationAmounts)\n .filter(([, v]) => parseFloat(String(v)) > 0)\n .map(([k, v]) => [parseInt(k, 10), parseFloat(String(v))])\n );\n // Persist the promo code onto the cart BEFORE creating the PaymentIntent.\n // The PI is built from the cart's DiscountAmount, which is only set by the\n // apply-promo endpoint — validation on the event-detail step is display-only.\n // Without this, the buyer saw a discount but was charged full price.\n if (promocode) {\n const promoResult = await applyPromoCode(cartId, promocode);\n if (!promoResult.success) {\n logger.error(\n 'Failed to apply promo code to cart:',\n promoResult.error\n );\n }\n }\n\n const paymentData = await createPaymentIntent(\n cartId,\n filteredQuantities,\n Object.keys(numericDonationAmounts).length > 0\n ? numericDonationAmounts\n : undefined\n );\n\n // A newer re-init superseded us — discard this stale response before it\n // repaints the totals or the payment intent (wrong-amount charge).\n if (runId !== latestPaymentInit) return;\n\n if (!paymentData) {\n paymentErrorMessage =\n labels.failedToCreatePaymentIntent ||\n 'Failed to create payment intent. Please try again.';\n return;\n }\n\n // Capture the server's authoritative totals — from here on, OrderSummary /\n // Place-order render from these numbers, not from a local subtotal ×\n // tax-rate guess, so the displayed total always matches what Stripe will\n // charge. Shared with the hosted route checkout via the one canonical\n // buildServerTotalsFromPaymentIntent (Total = charged residual, currency\n // upper-cased for the pixel — see that helper for the money notes).\n serverTotalsFromPaymentIntent =\n buildServerTotalsFromPaymentIntent(paymentData);\n // If checkoutConfig was already built (e.g. a later re-init for\n // promo/gift-card flows), apply immediately. Otherwise the\n // assembly step below picks it up.\n if (checkoutConfig) {\n checkoutConfig = {\n ...checkoutConfig,\n serverTotals: serverTotalsFromPaymentIntent,\n };\n }\n\n // §8.2 Free-order branch — server returned payment_type=free /\n // requires_stripe=false. Order has already been finalized in-band; do\n // NOT mount Stripe Element. Set a sentinel paymentIntent so downstream\n // place-order code knows to skip Stripe confirm and just navigate to\n // the success page using the order_uuid the server returned. (These\n // fields aren't on PaymentIntentResponse, hence the loose cast.)\n const paymentDataAny = /** @type {any} */ (paymentData);\n if (\n paymentDataAny.requires_stripe === false ||\n paymentDataAny.payment_type === 'free'\n ) {\n paymentIntent = 'free';\n return;\n }\n\n // Use the Stripe publishable key from the API response -- NEVER hardcoded\n const stripeKey = paymentData.stripe_publishable_key;\n if (!stripeKey) {\n logger.error('No Stripe publishable key in payment intent response');\n paymentErrorMessage =\n labels.paymentConfigError ||\n 'Payment configuration error. Please try again.';\n return;\n }\n\n const loadedStripe = await loadStripe(stripeKey);\n\n // loadStripe is another await point — re-check before binding Elements.\n if (runId !== latestPaymentInit) return;\n stripe = loadedStripe;\n\n if (paymentData.client_secret) {\n paymentIntent = paymentData.client_secret;\n } else {\n paymentErrorMessage =\n labels.failedToInitPayment ||\n 'Failed to initialize payment. Please try again.';\n }\n } catch (err) {\n logger.error('Failed to initialize Stripe payment:', err);\n // A superseded run failing must not paint an error over the latest run's\n // successfully-bound intent.\n if (runId !== latestPaymentInit) return;\n paymentErrorMessage =\n err.message ||\n labels.failedToInitPayment ||\n 'Failed to initialize payment. Please try again.';\n }\n }\n\n // --- Build EventData shape for CheckoutMain ---\n function buildEventData(evt, venueCharge) {\n if (!evt) return null;\n return {\n id: evt.id || evt.eventID,\n title: evt.name || evt.title || '',\n slug: evt.slug || slug || '',\n description: evt.description || '',\n date: evt.date || '',\n startDateTime: evt.startDateTime || '',\n endDateTime: evt.endDateTime || '',\n doorsOpenTime: evt.doorsOpenTime || '',\n timezone: evt.timeZone || evt.timezone || getDefaultTimezone(),\n imageUrl: evt.imageUrl || evt.image || '',\n venue: {\n id: evt.venueID || evt.venueId || 0,\n name: evt.venueName || '',\n address: evt.venueAddress || '',\n timezone: evt.timeZone || evt.timezone || getDefaultTimezone(),\n serviceFeePercentage: venueCharge.serviceFeePercentage,\n serviceFeeCents: venueCharge.serviceFeeCents,\n taxPercentage: venueCharge.taxPercentage,\n serviceFeeChargeType: venueCharge.serviceFeeChargeType,\n maxServiceFeeCents: venueCharge.maxServiceFeeCents,\n },\n performers: evt.performers || [],\n tickets: (evt.availableTickets || []).map(t => ({\n id: t.ID || t.id,\n name: t.name || '',\n description: t.description || '',\n // ticket.price is DOLLARS here, same source buildOrderLines and CartView\n // read (CartView: Math.round(ticket.price * 100)). No /100 — that made\n // event.tickets[].price 100x too small for any consumer that reads it.\n price: t.price || 0,\n fee: 0,\n quantityAvailable: t.quantityAvailable || 0,\n quantityTotal: t.quantityTotal || 0,\n minPerOrder: t.minPerOrder || 1,\n maxPerOrder: t.maxPerOrder || 10,\n status: 'on_sale',\n isDonation: t.type === 2,\n isHidden: false,\n })),\n faqs: evt.faqs || [],\n status: 'on_sale',\n isPasswordProtected: false,\n isRegistrationEvent: evt.eventTicketingType === 1 || evt.ticketType === 1,\n totalTicketsRemaining: 100,\n totalTicketsCapacity: 100,\n };\n }\n\n // --- Build OrderLine[] from cookie data + venue fees ---\n function buildOrderLines(qtys, ticketList, venueCharge) {\n const lines = [];\n for (const [ticketId, quantity] of Object.entries(qtys)) {\n if (quantity <= 0) continue;\n const ticket = ticketList.find(\n t => String(t.ID) === ticketId || String(t.id) === ticketId\n );\n if (!ticket) continue;\n\n const unitPrice = ticket.price || 0;\n const fee = calculateTicketFee(unitPrice, venueCharge);\n\n lines.push({\n ticketId: parseInt(ticketId),\n ticketName: ticket.name || '',\n quantity,\n unitPrice,\n fee,\n subtotal: roundCurrency(unitPrice * quantity),\n isDonation: ticket.type === 2,\n });\n }\n return lines;\n }\n\n // --- Calculate fee per ticket based on venue charge settings ---\n function calculateTicketFee(unitPrice, venueCharge) {\n if (unitPrice === 0) return 0;\n\n const {\n serviceFeePercentage = 0,\n serviceFeeCents = 0,\n serviceFeeChargeType = 'both',\n maxServiceFeeCents = 0,\n } = venueCharge;\n\n let fee = 0;\n if (\n serviceFeeChargeType === 'percentage' ||\n serviceFeeChargeType === 'both'\n ) {\n fee += unitPrice * (serviceFeePercentage / 100);\n }\n // Canonical charge type is 'fixed' (normalizeChargeType maps legacy\n // 'flat'/'cents' -> 'fixed'); accept all so a 'fixed'-configured venue's\n // flat fee isn't silently dropped from the estimate.\n if (\n serviceFeeChargeType === 'fixed' ||\n serviceFeeChargeType === 'flat' ||\n serviceFeeChargeType === 'cents' ||\n serviceFeeChargeType === 'both'\n ) {\n fee += serviceFeeCents / 100;\n }\n\n if (maxServiceFeeCents > 0) {\n fee = Math.min(fee, maxServiceFeeCents / 100);\n }\n\n return roundCurrency(fee);\n }\n\n // --- Compute whether order is free (for hiding gift card section) ---\n // A donation (\"pay what you want\") cart has unitPrice-0 lines but a real\n // amount in donationAmounts, so it is NOT free — otherwise the payment UI is\n // hidden and the donation can't be paid.\n let hasDonations = $derived(\n Object.values(donationAmounts).some(v => (Number(v) || 0) > 0)\n );\n let isFreeOrder = $derived(\n !hasDonations &&\n (checkoutConfig\n ? checkoutConfig.lines.every(l => l.unitPrice === 0)\n : true)\n );\n\n // --- Place order handler: 3-step Stripe flow ---\n async function handlePlaceOrder(formData) {\n if (processing) return;\n processing = true;\n paymentErrorMessage = '';\n\n try {\n // Gift-card PI re-init in flight: the Stripe PaymentIntent is being\n // rebuilt at the reduced residual. Refuse rather than confirm against a\n // stale full-amount PI (overcharge). Recoverable — the buyer retries once\n // the residual PI has mounted.\n if (reinitializingPayment) {\n paymentErrorMessage =\n labels.paymentReinitializing ||\n 'Updating your total. Please wait a moment and try again.';\n return;\n }\n\n // Gift-card-only purchase: skip Stripe entirely\n if (giftCardApplied && !giftCardApplied.requiresStripe) {\n await executeGiftCardOnlyPurchase(formData);\n return;\n }\n\n // Free ($0) order: skip Stripe entirely. The backend's payment-intent\n // endpoint finalizes a $0 order in-band (issues tickets, completes the\n // cart, sends the confirmation email) and returns requires_stripe:false\n // / payment_type:'free'; initializeStripePayment records that as the\n // `paymentIntent === 'free'` sentinel. If the sentinel isn't set yet\n // (init skipped or raced), executeFreeOrder calls the endpoint itself so\n // the order is finalized before we navigate.\n if (isFreeOrder) {\n await executeFreeOrder(formData);\n return;\n }\n\n // Step 1: Validate card via Stripe elements\n if (!elements) {\n paymentErrorMessage =\n labels.paymentFormNotReady ||\n 'Payment form is not ready. Please wait a moment and try again.';\n processing = false;\n return;\n }\n\n if (!stripe) {\n paymentErrorMessage =\n labels.paymentSystemNotInitialized ||\n 'Payment system is not initialized. Please refresh the page.';\n processing = false;\n return;\n }\n\n const { error: submitError } = await elements.submit();\n if (submitError) {\n const details = getPaymentErrorDetails(submitError);\n paymentErrorMessage = details.message;\n processing = false;\n return;\n }\n\n // Step 2: Confirm payment with Stripe\n const result = await stripe.confirmPayment({\n elements,\n redirect: 'if_required',\n });\n\n if (result.error) {\n const details = getPaymentErrorDetails(result.error);\n paymentErrorMessage = details.message;\n processing = false;\n return;\n }\n\n // Step 3: Validate payment on backend\n const paymentPayload = {\n id: cartId,\n paymentIntentId: result.paymentIntent.id,\n tickets: quantities,\n firstName: formData.firstName,\n lastName: formData.lastName,\n email: formData.email,\n paymentMethod: 'credit-card',\n mailingList: formData.keepMeUpdated,\n saleType: 'online',\n };\n\n const response = await validatePaymentIntent(cartId, paymentPayload);\n\n // FAIL-CLOSED FLOOR: the backend gate refuses to capture the charge when\n // the event was canceled or postponed between cart-creation and finalize,\n // returning `{ success: false, eventCanceled: true }` or\n // `{ ... eventPostponed: true }`. Treat either as \"buyer was NOT charged\":\n // stop the success navigation and raise the charge-aware modal instead of\n // the inline payment-error text. Checked BEFORE the success branch so a\n // rejected finalize can never slip through to onNavigateToSuccess.\n if (response?.eventCanceled || response?.eventPostponed) {\n eventUnavailableReason = response.eventCanceled\n ? 'canceled'\n : 'postponed';\n // No charge implies no order: clear any inline error so the modal is\n // the single source of truth, and leave the cart untouched (a postponed\n // show may resume — we don't destroy the buyer's selection here).\n paymentErrorMessage = '';\n return;\n }\n\n if (response?.status === 'Payment succeeded') {\n const successData = {\n orderId: cartId,\n eventId: event?.id || event?.eventID || null,\n event: event || null,\n venueId: venueId || event?.venueId || null,\n organizationId: organizationId || event?.organizationId || null,\n ...orderValueForPixel(),\n };\n\n if (onNavigateToSuccess) {\n onNavigateToSuccess(successData);\n }\n } else if (\n response?.status === 'Payment amount does not match the total price'\n ) {\n paymentErrorMessage =\n labels.paymentAmountMismatch ||\n 'Payment amount mismatch. Please refresh and try again.';\n } else {\n paymentErrorMessage =\n labels.paymentValidationFailed ||\n 'Payment validation failed. Please try again.';\n }\n } catch (err) {\n logger.error('Payment execution error:', err);\n const details = getPaymentErrorDetails(err);\n paymentErrorMessage = details.message;\n } finally {\n processing = false;\n }\n }\n\n // --- Gift card only purchase ---\n async function executeGiftCardOnlyPurchase(formData) {\n try {\n const result = await completeGiftCardPayment(cartId, {\n firstName: formData.firstName,\n lastName: formData.lastName,\n email: formData.email,\n phoneNumber: null,\n mailingList: formData.keepMeUpdated,\n });\n\n if (result?.success) {\n const successData = {\n orderId: result.orderId || cartId,\n eventId: event?.id || event?.eventID || null,\n event: event || null,\n venueId: venueId || event?.venueId || null,\n organizationId: organizationId || event?.organizationId || null,\n paymentType: 'gift_card_only',\n ...orderValueForPixel(),\n };\n\n if (onNavigateToSuccess) {\n onNavigateToSuccess(successData);\n }\n } else {\n paymentErrorMessage =\n result?.error ||\n labels.failedToCompleteOrder ||\n 'Failed to complete order. Please try again.';\n }\n } catch (err) {\n logger.error('Gift card payment error:', err);\n const details = getPaymentErrorDetails(err);\n paymentErrorMessage = details.message;\n } finally {\n processing = false;\n }\n }\n\n // --- Free ($0) order: complete without Stripe ---\n // The orders-service finalizes a $0 order in-band when the payment-intent\n // endpoint is called: it issues tickets, marks the cart completed and sets\n // payment_status \"succeeded\" (CreatePaymentIntentFromCart, stripeAmount==0\n // branch). initializeStripePayment records that result as paymentIntent ===\n // 'free'. If init was skipped or hasn't completed yet we call it now so the\n // order is finalized server-side before navigating to the Confirmation page.\n // NOTE: the public payment-intent endpoint does not accept customer details,\n // so name/email are not persisted on a purely-free order today — see the\n // checkout-free-order-deadend finding for the backend follow-up.\n async function executeFreeOrder(_formData) {\n try {\n if (paymentIntent !== 'free') {\n await initializeStripePayment();\n }\n\n if (paymentIntent !== 'free') {\n // Backend did not treat the order as free (e.g. it now carries a\n // chargeable amount). Surface a recoverable error rather than a\n // silent dead-end.\n paymentErrorMessage =\n labels.failedToCompleteOrder ||\n 'Could not complete the order. Please try again.';\n return;\n }\n\n const successData = {\n orderId: cartId,\n eventId: event?.id || event?.eventID || null,\n event: event || null,\n venueId: venueId || event?.venueId || null,\n organizationId: organizationId || event?.organizationId || null,\n paymentType: 'free',\n ...orderValueForPixel(),\n };\n\n if (onNavigateToSuccess) {\n onNavigateToSuccess(successData);\n }\n } catch (err) {\n logger.error('Free order completion error:', err);\n const details = getPaymentErrorDetails(err);\n paymentErrorMessage = details.message;\n } finally {\n processing = false;\n }\n }\n\n // --- Gift card handlers ---\n async function handleGiftCardApplied(appliedCard) {\n giftCardApplied = appliedCard;\n\n // Fold the gift card into the authoritative totals so the OrderSummary\n // line items AND the \"Place order · $X\" button show the final amount due\n // — not the pre-gift-card total. The gift-card panel still shows the full\n // breakdown (applied / remaining). serverTotalsFromPaymentIntent stays the\n // pristine pre-gift-card snapshot so removal can restore it.\n if (checkoutConfig && serverTotalsFromPaymentIntent) {\n checkoutConfig = {\n ...checkoutConfig,\n serverTotals: foldGiftCardIntoServerTotals(\n serverTotalsFromPaymentIntent,\n appliedCard\n ),\n };\n }\n\n if (!appliedCard.requiresStripe) {\n // Gift card covers full amount -- clear Stripe. Supersede any in-flight\n // re-init so a pending response can't repaint a card form after the order\n // is fully covered.\n latestPaymentInit++;\n elements = undefined;\n stripe = null;\n paymentIntent = '';\n } else if (cartId && Object.keys(quantities).length > 0) {\n // Split payment: the gift card is now persisted on the cart, so re-create\n // the PaymentIntent for the REDUCED remaining amount (CreatePaymentIntentFromCart\n // subtracts the cart's gift card). Without this the buyer's card is confirmed\n // against the original full-amount PI and is overcharged (full card charge +\n // gift-card redemption). Mirrors handleGiftCardRemoved's re-init. Guarded so\n // Place-order can't confirm against the stale full-amount PI mid-re-init.\n reinitializingPayment = true;\n try {\n await initializeStripePayment();\n } finally {\n reinitializingPayment = false;\n }\n }\n }\n\n async function handleGiftCardRemoved() {\n giftCardApplied = null;\n // Restore the pristine pre-gift-card totals immediately so the headline\n // total / Place-order button revert without waiting on the async re-init.\n if (checkoutConfig && serverTotalsFromPaymentIntent) {\n checkoutConfig = {\n ...checkoutConfig,\n serverTotals: serverTotalsFromPaymentIntent,\n };\n }\n // Re-initialize Stripe payment at the full amount. Guarded so Place-order\n // can't confirm against the just-torn-down reduced PI mid-re-init.\n if (cartId && Object.keys(quantities).length > 0) {\n reinitializingPayment = true;\n try {\n await initializeStripePayment();\n } finally {\n reinitializingPayment = false;\n }\n }\n }\n\n // --- Navigation handlers ---\n function handleBack() {\n if (onNavigateBack) onNavigateBack();\n else window.history.back();\n }\n\n function handleRetryExpired() {\n if (onNavigateBack) onNavigateBack();\n else window.history.back();\n }\n\n // --- Fail-closed (canceled/postponed) modal handlers ---\n // \"Back to events\" returns the buyer to the calendar / event list, reusing\n // the existing back navigation (embed callback or history.back()).\n function handleEventUnavailableBack() {\n eventUnavailableReason = null;\n handleBack();\n }\n\n async function handleExtendSession() {\n if (!cartId) return null;\n\n try {\n const result = await extendCheckoutSession(cartId);\n if (result.success) {\n return {\n newExpiryTime: result.newExpiryTime,\n remainingExtensions: result.remainingExtensions,\n };\n } else {\n logger.error('Failed to extend session:', result.error);\n return null;\n }\n } catch (err) {\n logger.error('Error extending checkout session:', err);\n return null;\n }\n }\n</script>\n\n{#if checkoutConfig}\n <CheckoutMain\n config={checkoutConfig}\n onPlaceOrder={handlePlaceOrder}\n onBack={handleBack}\n onRetryExpired={handleRetryExpired}\n onExtendSession={handleExtendSession}\n {stripe}\n {paymentIntent}\n bind:elements\n paymentError={paymentErrorMessage}\n {labels}\n />\n\n {#if !isFreeOrder}\n <div class=\"max-w-6xl mx-auto px-4 md:px-6 -mt-4 mb-8\">\n <GiftCardInput\n {cartId}\n onApplied={handleGiftCardApplied}\n onRemoved={handleGiftCardRemoved}\n disabled={processing || reinitializingPayment}\n />\n </div>\n {/if}\n{:else if showError}\n <div class=\"p-8 text-center\">\n <p class=\"text-accent-danger\">{errorMessage}</p>\n </div>\n{:else}\n <div class=\"p-8 text-center\">\n <p class=\"tone-muted\">\n {labels.loadingSecurePaymentForm || 'Loading secure payment form...'}\n </p>\n </div>\n{/if}\n\n<!--\n Fail-closed FLOOR: raised when validatePaymentIntent reports the event was\n canceled/postponed mid-purchase (no charge captured). Rendered outside the\n page branches so it overlays whatever checkout state is showing.\n-->\n{#if showEventUnavailable}\n <EventUnavailableModal\n open\n reason={eventUnavailableReason}\n onBackToEvents={handleEventUnavailableBack}\n {labels}\n />\n{/if}\n"],"names":["size","$","$$props","color","className","svg","root","ctx","useIconWeight","resolved","root_2","path","polyline","root_1","$$render","consequent","alternate","styles","_typeof","obj","RELEASE_TRAIN","runtimeVersionToUrlVersion","version","ORIGIN","STRIPE_JS_URL","V3_URL_REGEX","STRIPE_JS_URL_REGEX","isStripeJSURL","url","findScript","scripts","script","injectScript","params","queryString","headOrBody","registerWrapper","stripe","startTime","stripePromise$1","onErrorListener","onLoadListener","onError","reject","cause","onLoad","resolve","loadScript","_script$parentNode","error","initStripe","maybeStripe","args","pk","isTestKey","expectedVersion","stripePromise","loadCalled","getStripePromise","loadStripe","_len","_key","getPaymentErrorDetails","errorCode","errorType","errorMessage","declineCode","buildServerTotalsFromPaymentIntent","paymentData","foldGiftCardIntoServerTotals","pristine","appliedCard","amountDue","logger","createLogger","onApplied","onRemoved","disabled","labels","code","loading","appliedCards","showInput","orderTotal","totalApplied","s","c","residual","fullyCovered","emitAggregate","handleApply","entered","result","applyGiftCard","err","handleRemove","cardCode","removeGiftCard","handleKeydown","e","toggleInput","div","root_8","node","card","div_1","div_2","div_3","CheckIcon","node_1","div_4","span","span_1","span_2","button","span_3","CloseIcon","$$anchor","text_1","formatCurrency","safeSlide","DURATION","div_5","root_4","div_6","span_4","span_5","div_7","node_5","span_6","div_8","root_3","span_7","span_8","consequent_1","alternate_1","consequent_2","button_1","node_3","TagIcon","node_6","span_9","span_10","div_9","root_7","div_10","input","button_2","span_11","root_5","consequent_3","alternate_2","div_11","root_6","WarningTriIcon","node_10","span_12","consequent_4","classes","$0","$$value","consequent_5","open","onBackToEvents","isCanceled","resolvedTitle","resolvedBody","resolvedBackToEvents","ModalRoot","ModalOverlay","ModalPanel","ModalBody","node_2","CloseCircleOutline","CalendarOutline","h3","p","typography","ModalFooter","node_4","Button","availableTickets","venueId","organizationId","onNavigateBack","initialError","widgetId","id","slug","rawEvent","event","transformEventDetail","cartId","quantities","donationAmounts","tickets","promocode","promoDiscountAmount","processing","reinitializingPayment","paymentIntent","elements","paymentErrorMessage","showError","eventUnavailableReason","showEventUnavailable","giftCardApplied","checkoutConfig","serverTotalsFromPaymentIntent","orderValueForPixel","onMount","getCookie","COOKIE_NAMES","trackCheckoutStarted","checkoutState","loadCheckoutStateFromCookies","venueServiceCharge","venueData","getVenueDetails","lines","buildOrderLines","initializeStripePayment","timerStart","storedExpiry","remaining","status","getSessionStatus","buildEventData","details","latestPaymentInit","runId","filteredQuantities","_","val","numericDonationAmounts","v","k","promoResult","applyPromoCode","createPaymentIntent","paymentDataAny","stripeKey","loadedStripe","evt","venueCharge","getDefaultTimezone","t","qtys","ticketList","ticketId","quantity","ticket","unitPrice","fee","calculateTicketFee","roundCurrency","serviceFeePercentage","serviceFeeCents","serviceFeeChargeType","maxServiceFeeCents","hasDonations","isFreeOrder","l","handlePlaceOrder","formData","executeGiftCardOnlyPurchase","executeFreeOrder","submitError","paymentPayload","response","validatePaymentIntent","successData","completeGiftCardPayment","_formData","handleGiftCardApplied","handleGiftCardRemoved","handleBack","handleRetryExpired","handleEventUnavailableBack","handleExtendSession","extendCheckoutSession","CheckoutMain","GiftCardInput","p_1","EventUnavailableModal"],"mappings":";;;;;;kBAAA;AAME,MAAMA,IAAIC,EAAA,KAAAC,GAAA,QAAA,GAAG,IAAI,GAAEC,0BAAQ,cAAc,GAASC,0BAAY,EAAE;MAGjEC,I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AAAA;;AA7BD,MAAAzG,EAAA,IAAA8M,CAAc,kBAwBTJ,EAAS,IAAA7L,EAAA0H,IAAA,CAAA,IAAA1H,EAAAE,IAAA,EAAA;AAAA;;;;;AAkBhB,MAAA4Q,GAAoBvK,GAAA;AAAA;;uBAEXuF,CAAsB;AAAA;wBACd0E;AAAA;iBACfxM,EAAM;AAAA;;;;YALN+H,EAAoB,KAAA/L,EAAAwI,EAAA;AAAA;;;AA3CjB;","x_google_ignoreList":[0,1,2,3,4]}
@@ -1,20 +1,19 @@
1
1
  import "svelte/internal/disclose-version";
2
2
  import * as e from "svelte/internal/client";
3
- import { M as R, a as U, b as j, c as y, d as B, ay as F } from "./VenueCalendar-DhxkKfli.js";
4
- import { M as H } from "./modalManager.svelte-C8L8XPBi.js";
5
- import { T as O } from "./Text-HvIEXENM.js";
6
- var q = e.from_html("<!> <!> <!> <!>", 1), w = e.from_html("<!> <!>", 1);
7
- function K(u, t) {
3
+ import { M as R, a as U, b as j, c as y, d as w } from "./VenueCalendar-Um0PQCVy.js";
4
+ import { M as B } from "./modalManager.svelte-D_9E6W5P.js";
5
+ import { C as F } from "./ClockIcon-DA4wXK5Q.js";
6
+ import { T as H } from "./Text-C-6sDfH2.js";
7
+ var I = e.from_html("<!> <!> <!> <!>", 1), O = e.from_html("<!> <!>", 1);
8
+ function L(u, t) {
8
9
  e.push(t, !0);
9
- let c = e.prop(t, "open", 15, !1);
10
- e.prop(t, "isProcessing", 3, !1), e.prop(t, "isSuccess", 3, !1);
11
- let h = e.prop(t, "size", 3, "md"), s = e.prop(t, "persistent", 3, !1), f = e.prop(t, "haptic", 3, !0), m = e.prop(t, "variant", 3, "sheet");
10
+ let c = e.prop(t, "open", 15, !1), h = e.prop(t, "size", 3, "md"), o = e.prop(t, "persistent", 3, !1), f = e.prop(t, "haptic", 3, !0), m = e.prop(t, "variant", 3, "sheet");
12
11
  R(u, {
13
12
  get size() {
14
13
  return h();
15
14
  },
16
15
  get persistent() {
17
- return s();
16
+ return o();
18
17
  },
19
18
  get haptic() {
20
19
  return f();
@@ -38,15 +37,15 @@ function K(u, t) {
38
37
  c(i);
39
38
  },
40
39
  children: (i, v) => {
41
- var o = w(), d = e.first_child(o);
40
+ var s = O(), d = e.first_child(s);
42
41
  U(d, {});
43
42
  var P = e.sibling(d, 2);
44
43
  j(P, {
45
- children: (x, D) => {
46
- var _ = q(), g = e.first_child(_);
44
+ children: (x, A) => {
45
+ var _ = I(), g = e.first_child(_);
47
46
  {
48
47
  var z = (r) => {
49
- H(r, {
48
+ B(r, {
50
49
  children: (n, p) => {
51
50
  var a = e.comment(), l = e.first_child(a);
52
51
  e.snippet(l, () => t.header), e.append(n, a);
@@ -60,7 +59,7 @@ function K(u, t) {
60
59
  }
61
60
  var b = e.sibling(g, 2);
62
61
  {
63
- var S = (r) => {
62
+ var C = (r) => {
64
63
  y(r, {
65
64
  children: (n, p) => {
66
65
  var a = e.comment(), l = e.first_child(a);
@@ -70,12 +69,12 @@ function K(u, t) {
70
69
  });
71
70
  };
72
71
  e.if(b, (r) => {
73
- t.body && r(S);
72
+ t.body && r(C);
74
73
  });
75
74
  }
76
75
  var M = e.sibling(b, 2);
77
76
  {
78
- var T = (r) => {
77
+ var S = (r) => {
79
78
  y(r, {
80
79
  children: (n, p) => {
81
80
  var a = e.comment(), l = e.first_child(a);
@@ -85,13 +84,13 @@ function K(u, t) {
85
84
  });
86
85
  };
87
86
  e.if(M, (r) => {
88
- t.children && r(T);
87
+ t.children && r(S);
89
88
  });
90
89
  }
91
- var C = e.sibling(M, 2);
90
+ var k = e.sibling(M, 2);
92
91
  {
93
- var k = (r) => {
94
- B(r, {
92
+ var T = (r) => {
93
+ w(r, {
95
94
  children: (n, p) => {
96
95
  var a = e.comment(), l = e.first_child(a);
97
96
  e.snippet(l, () => t.footer), e.append(n, a);
@@ -99,43 +98,44 @@ function K(u, t) {
99
98
  $$slots: { default: !0 }
100
99
  });
101
100
  };
102
- e.if(C, (r) => {
103
- t.footer && r(k);
101
+ e.if(k, (r) => {
102
+ t.footer && r(T);
104
103
  });
105
104
  }
106
105
  e.append(x, _);
107
106
  },
108
107
  $$slots: { default: !0 }
109
- }), e.append(i, o);
108
+ }), e.append(i, s);
110
109
  },
111
110
  $$slots: { default: !0 }
112
111
  }), e.pop();
113
112
  }
114
- var A = e.from_html("<div><!> <!></div>");
115
- function L(u, t) {
113
+ var q = e.from_html("<div><!> <!></div>");
114
+ function N(u, t) {
116
115
  e.push(t, !0), e.prop(t, "labels", 19, () => ({}));
117
116
  let c = e.derived(() => (() => {
118
- const v = Math.floor(t.seconds / 60), o = t.seconds % 60;
119
- return `${v.toString().padStart(2, "0")}:${o.toString().padStart(2, "0")}`;
117
+ const v = Math.floor(t.seconds / 60), s = t.seconds % 60;
118
+ return `${v.toString().padStart(2, "0")}:${s.toString().padStart(2, "0")}`;
120
119
  })()), h = e.derived(() => t.isUrgent ? "Complete soon" : "Reservation held");
121
- var s = A();
120
+ var o = q();
122
121
  let f;
123
- var m = e.child(s);
124
- F(m, { size: 16, class: "shrink-0" });
122
+ var m = e.child(o);
123
+ F(m, { size: "16", class: "shrink-0" });
125
124
  var i = e.sibling(m, 2);
126
- O(i, {
125
+ H(i, {
127
126
  size: "sm",
128
- class: "font-medium tabular-nums",
129
- children: (v, o) => {
127
+ weight: "medium",
128
+ class: "tabular-nums",
129
+ children: (v, s) => {
130
130
  e.next();
131
131
  var d = e.text();
132
132
  e.template_effect(() => e.set_text(d, `${e.get(h) ?? ""} · ${e.get(c) ?? ""}`)), e.append(v, d);
133
133
  },
134
134
  $$slots: { default: !0 }
135
- }), e.reset(s), e.template_effect(() => f = e.set_class(s, 1, "timer-display text-color-secondary svelte-8jbi4g", null, f, { urgent: t.isUrgent })), e.append(u, s), e.pop();
135
+ }), e.reset(o), e.template_effect(() => f = e.set_class(o, 1, "timer-display text-color-secondary svelte-8jbi4g", null, f, { urgent: t.isUrgent })), e.append(u, o), e.pop();
136
136
  }
137
137
  export {
138
- L as C,
139
- K as M
138
+ N as C,
139
+ L as M
140
140
  };
141
- //# sourceMappingURL=CheckoutTimer-CF6emJxC.js.map
141
+ //# sourceMappingURL=CheckoutTimer-D2HnWYm7.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CheckoutTimer-D2HnWYm7.js","sources":["../node_modules/@getmicdrop/svelte-components/dist/primitives/Modal/Modal.svelte","../src/lib/public-calendar-flow/CheckoutTimer.svelte"],"sourcesContent":["<script lang=\"ts\">\n /**\n * Legacy Modal API — backward-compatible wrapper around ModalRoot + ModalOverlay + ModalPanel.\n * Accepts the old flat API: bind:open, header/body/footer snippets, size, persistent, oncancel.\n * New code should use ModalRoot + ModalOverlay + ModalPanel directly.\n */\n import type { Snippet } from 'svelte';\n import ModalRoot from './ModalRoot.svelte';\n import ModalOverlay from './ModalOverlay.svelte';\n import ModalPanel from './ModalPanel.svelte';\n import ModalHeader from './ModalHeader.svelte';\n import ModalBody from './ModalBody.svelte';\n import ModalFooter from './ModalFooter.svelte';\n\n interface Props {\n open?: boolean;\n size?: 'sm' | 'md' | 'lg' | 'xl';\n persistent?: boolean;\n haptic?: boolean;\n oncancel?: () => void;\n header?: Snippet;\n body?: Snippet;\n footer?: Snippet;\n children?: Snippet;\n class?: string;\n 'aria-labelledby'?: string;\n /**\n * Layout variant. `'sheet'` (default) = bottom-sheet on mobile, centered\n * on md+. `'dialog'` = centered on all viewports. See ModalRoot for details.\n */\n variant?: 'sheet' | 'dialog';\n }\n\n let {\n open = $bindable(false),\n size = 'md',\n persistent = false,\n haptic = true,\n oncancel,\n header,\n body,\n footer,\n children,\n class: className,\n 'aria-labelledby': ariaLabelledby,\n variant = 'sheet',\n }: Props = $props();\n</script>\n\n<ModalRoot bind:open {size} {persistent} {haptic} {oncancel} {variant} class={className} aria-labelledby={ariaLabelledby}>\n <ModalOverlay />\n <ModalPanel>\n {#if header}<ModalHeader>{@render header()}</ModalHeader>{/if}\n {#if body}<ModalBody>{@render body()}</ModalBody>{/if}\n {#if children}<ModalBody>{@render children()}</ModalBody>{/if}\n {#if footer}<ModalFooter>{@render footer()}</ModalFooter>{/if}\n </ModalPanel>\n</ModalRoot>\n","<script lang=\"ts\">\n import { ClockIcon } from '@getmicdrop/svelte-components/primitives/Icons/phosphor/index.js';\n import { Text } from '@getmicdrop/svelte-components';\n\n interface Props {\n seconds: number;\n isUrgent: boolean;\n labels?: Record<string, string>;\n }\n\n let { seconds, isUrgent, labels = {} }: Props = $props();\n\n let display = $derived(\n (() => {\n const m = Math.floor(seconds / 60);\n const s = seconds % 60;\n return `${m.toString().padStart(2, '0')}:${s.toString().padStart(2, '0')}`;\n })()\n );\n\n let label = $derived(isUrgent ? 'Complete soon' : 'Reservation held');\n</script>\n\n<div class=\"timer-display text-color-secondary\" class:urgent={isUrgent}>\n <ClockIcon size=\"16\" class=\"shrink-0\" />\n <Text size=\"sm\" weight=\"medium\" class=\"tabular-nums\">\n {label} &middot; {display}\n </Text>\n</div>\n\n<style>\n .timer-display {\n display: inline-flex;\n align-items: center;\n gap: 0.5rem;\n }\n\n .timer-display.urgent {\n color: hsl(var(--accent-warning)); /* orange-500 */\n }\n</style>\n"],"names":["open","$","$$props","size","persistent","haptic","variant","ModalRoot","$$anchor","$$value","ModalOverlay","node","ModalPanel","node_1","ModalHeader","ModalBody","ModalFooter","display","m","label","div","root","ClockIcon","Text","text","classes"],"mappings":";;;;;;;iBAAA;;AAiCE,MACEA,IAAIC,EAAA,KAAAC,GAAA,QAAA,IAAa,EAAK,GACtBC,yBAAO,IAAI,GACXC,+BAAa,EAAK,GAClBC,2BAAS,EAAI,GAQbC,4BAAU,OAAO;AAIpB,EAAAC,EAASC,GAAA;AAAA;aAAYL,EAAI;AAAA;;aAAGC,EAAU;AAAA;;aAAGC,EAAM;AAAA;;;;;aAAcC,EAAO;AAAA;;;;;;;QAA1D,OAAS;;;QAAT,KAASG,GAAA;;;;;AACjB,MAAAC,EAAYC,GAAA,EAAA;;AACZ,MAAAC,EAAUC,GAAA;AAAA;;;;AACI,cAAAC,EAAWN,GAAA;AAAA;;;;;;;;;;;;;;AACb,cAAAO,EAASP,GAAA;AAAA;;;;;;;;;;;;;;AACL,cAAAO,EAASP,GAAA;AAAA;;;;;;;;;;;;;;AACX,cAAAQ,EAAWR,GAAA;AAAA;;;;;;;;;;;;;;;;;;AARpB;;iBC/CR;iBAUiCP,EAAA,KAAAC,GAAA,UAAA,IAAA,OAAA,CAAA,EAAA;AAE/B,MAAIe,IAAOhB,EAAA,QAAA,OAAA,MACF;AACL,UAAMiB,IAAI,KAAK,kBAAgB,EAAE,GAC3B,gBAAc;AACpB,cAAUA,EAAE,SAAQ,EAAG,SAAS,GAAG,GAAG,CAAA,IAAK,EAAE,SAAQ,EAAG,SAAS,GAAG,GAAG,CAAA;AAAA,EACzE,IAAC,GAGCC,IAAKlB,EAAA,QAAA,MAAAC,EAAA,WAAuB,kBAAkB,kBAAkB;MAGrEkB,IAAGC,EAAA;;kBAAHD,CAAG;AACD,EAAAE,EAASX,GAAA,EAAA,MAAA,MAAA,OAAA,YAAA;;AACT,EAAAY,EAAIV,GAAA;AAAA;;;;;;AACF,MAAAZ,EAAA,gBAAA,MAAAA,EAAA,SAAAuB,GAAA,GAAAvB,EAAA,IAAAkB,CAAK,mBAAYF,CAAO,KAAA,EAAA,EAAA,CAAA;;;cAH5BG,CAAG,2CAAHA,GAAG,GAAA,oDAAA,MAAAK,GAAA,EAAA,QAAAvB,EAAA,SAAA,CAAA,CAAA,eAAHkB,CAAG;AAFI;","x_google_ignoreList":[0]}
@@ -0,0 +1,32 @@
1
+ import "svelte/internal/disclose-version";
2
+ import * as e from "svelte/internal/client";
3
+ import { u as f } from "./VenueCalendar-Um0PQCVy.js";
4
+ var g = e.from_svg('<path d="M128,24A104,104,0,1,0,232,128,104.11,104.11,0,0,0,128,24Zm56,112H128a8,8,0,0,1-8-8V72a8,8,0,0,1,16,0v48h48a8,8,0,0,1,0,16Z"></path>'), m = e.from_svg('<circle cx="128" cy="128" r="96" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="16"></circle><polyline points="128 72 128 128 184 128" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="16"></polyline>', 1), w = e.from_svg('<svg aria-hidden="true" viewBox="0 0 256 256" fill="currentColor" xmlns="http://www.w3.org/2000/svg"><!></svg>');
5
+ function x(a, o) {
6
+ e.push(o, !0);
7
+ let s = e.prop(o, "size", 3, "24"), n = e.prop(o, "color", 3, "currentColor"), c = e.prop(o, "class", 3, "");
8
+ const p = f();
9
+ let v = e.derived(() => o.weight ?? p?.weight ?? "regular");
10
+ var r = w();
11
+ let i;
12
+ var d = e.child(r);
13
+ {
14
+ var u = (t) => {
15
+ var l = g();
16
+ e.append(t, l);
17
+ }, h = (t) => {
18
+ var l = m();
19
+ e.next(), e.append(t, l);
20
+ };
21
+ e.if(d, (t) => {
22
+ e.get(v) === "fill" ? t(u) : t(h, -1);
23
+ });
24
+ }
25
+ e.reset(r), e.template_effect(() => {
26
+ e.set_class(r, 0, e.clsx(c())), e.set_attribute(r, "width", s()), e.set_attribute(r, "height", s()), i = e.set_style(r, "", i, { color: n() });
27
+ }), e.append(a, r), e.pop();
28
+ }
29
+ export {
30
+ x as C
31
+ };
32
+ //# sourceMappingURL=ClockIcon-DA4wXK5Q.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ClockIcon-DA4wXK5Q.js","sources":["../node_modules/@getmicdrop/svelte-components/dist/primitives/Icons/phosphor/ClockIcon.svelte"],"sourcesContent":["<script lang=\"ts\">\n /**\n * Clock — Phosphor icon (canonical Micdrop icon family).\n * Outline by default; pass `weight=\"fill\"` for solid, or let a stateful parent\n * (NavItem / Tabs / BottomNav / status badge) drive it via icon-weight context.\n */\n import { useIconWeight, type IconWeight } from './iconWeight.js';\n\n interface Props {\n /** Pixel size (width + height). */\n size?: string;\n /** Icon color; defaults to `currentColor` (inherits text color). */\n color?: string;\n /** Extra classes. */\n class?: string;\n /** `regular` (outline) or `fill` (solid). Overrides ambient state weight. */\n weight?: IconWeight;\n }\n\n let { size = '24', color = 'currentColor', class: className = '', weight }: Props = $props();\n\n const ctx = useIconWeight();\n let resolved: IconWeight = $derived(weight ?? ctx?.weight ?? 'regular');\n</script>\n\n<svg\n class={className}\n aria-hidden=\"true\"\n width={size}\n height={size}\n viewBox=\"0 0 256 256\"\n fill=\"currentColor\"\n style:color={color}\n xmlns=\"http://www.w3.org/2000/svg\"\n>\n {#if resolved === 'fill'}<path d=\"M128,24A104,104,0,1,0,232,128,104.11,104.11,0,0,0,128,24Zm56,112H128a8,8,0,0,1-8-8V72a8,8,0,0,1,16,0v48h48a8,8,0,0,1,0,16Z\"/>{:else}<circle cx=\"128\" cy=\"128\" r=\"96\" fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"16\"/><polyline points=\"128 72 128 128 184 128\" fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"16\"/>{/if}\n</svg>\n"],"names":["size","$","$$props","color","className","ctx","useIconWeight","resolved","svg","root_2","path","root","$$render","consequent","alternate","styles"],"mappings":";;;;iBAAA;;AAmBE,MAAMA,IAAIC,EAAA,KAAAC,GAAA,QAAA,GAAG,IAAI,GAAEC,0BAAQ,cAAc,GAASC,0BAAY,EAAE;AAEhE,QAAMC,IAAMC,EAAa;AACzB,MAAIC,IAAoBN,EAAA,QAAA,MAAAC,EAAA,UAAsBG,GAAK,UAAU,SAAS;MAGvEG,IAAEC,EAAA;;kBAAFD,CAAE;;;UAUyBE,IAAIC,EAAA;kBAAJD,CAAI;AAAA;;;;;AAAzB,MAAAT,EAAA,IAAAM,CAAQ,MAAK,SAAMK,EAAAC,CAAA,IAAAD,EAAAE,GAAA,EAAA;AAAA;;UAVzBN,CAAE;AAAF,IAAAP,EAAA,UAAAO,aACQJ,EAAS,CAAA,CAAA,GADjBH,EAAA,cAAAO,YAGQR,EAAI,CAAA,GAHZC,EAAA,cAAAO,aAISR,EAAI,CAAA,GAJbe,IAAAd,EAAA,UAAAO,mBAOcL,EAAK,GAAA;AAAA,kBAPnBK,CAAE;AAFK;","x_google_ignoreList":[0]}