@riverbankcms/sdk 0.124.0 → 0.126.0

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 (130) hide show
  1. package/README.md +3 -1
  2. package/dist/{PreviewEditorSidebar-DBmAJJkQ.mjs → PreviewEditorSidebar-DcYJxTgc.mjs} +67 -266
  3. package/dist/{PreviewEditorUI-CfGaz9cY.mjs → PreviewEditorUI-Ctt1yTJr.mjs} +3 -3
  4. package/dist/{PreviewQueryProvider-BH-3-jSj.mjs → PreviewQueryProvider-DgFDIwvK.mjs} +1 -1
  5. package/dist/{SdkPreviewModeRuntime-BW9Z8j8T.mjs → SdkPreviewModeRuntime-CvW1vdQ4.mjs} +38 -30
  6. package/dist/{SiteChromeCustomizeContext-2z8moxYf.mjs → SiteChromeCustomizeContext-C87qlKWw.mjs} +493 -1378
  7. package/dist/_dts/ai/src/contracts/proposals.d.ts +1354 -202
  8. package/dist/_dts/api/src/accessAdmin.d.ts +2 -14
  9. package/dist/_dts/api/src/common/envelope.d.ts +1 -1
  10. package/dist/_dts/api/src/contentRuntime.d.ts +0 -2
  11. package/dist/_dts/api/src/endpoints.d.ts +0 -7
  12. package/dist/_dts/api/src/sdk-event-upsert.d.ts +42 -0
  13. package/dist/_dts/api/src/sdkContracts.d.ts +11 -9
  14. package/dist/_dts/api/src/siteAccessAdmin.d.ts +23 -0
  15. package/dist/_dts/api/src/siteOperations.d.ts +18 -1
  16. package/dist/_dts/api/src/siteRuntimeEndpoints.d.ts +1 -14
  17. package/dist/_dts/billing/src/plans/types.d.ts +24 -5
  18. package/dist/_dts/blocks/src/contracts/non-block-islands.d.ts +4 -0
  19. package/dist/_dts/blocks/src/contracts/proof-block-islands.d.ts +2 -0
  20. package/dist/_dts/blocks/src/system/runtime/components/registry.client.d.ts +1 -0
  21. package/dist/_dts/blocks/src/system/runtime/nodes/event-details/logic.d.ts +2 -0
  22. package/dist/_dts/blocks/src/system/runtime/nodes/event-details.client.d.ts +3 -1
  23. package/dist/_dts/blocks/src/system/runtime/nodes/event-details.server.d.ts +2 -1
  24. package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/useEventRegistrationStripeReturn.d.ts +15 -2
  25. package/dist/_dts/db/src/generated/supabase/database.types.d.ts +331 -19
  26. package/dist/_dts/preview-next/src/client/preview/PreviewEditorSidebar.d.ts +1 -2
  27. package/dist/_dts/preview-next/src/client/preview/PreviewShell.d.ts +2 -3
  28. package/dist/_dts/preview-next/src/client/preview/PreviewShellLayout.d.ts +1 -2
  29. package/dist/_dts/preview-next/src/client/preview/SiteChromeCustomizeContext.d.ts +3 -12
  30. package/dist/_dts/preview-next/src/client/preview/StyleConfigurator.d.ts +3 -13
  31. package/dist/_dts/preview-next/src/client/preview/StyleConfigurator.state.d.ts +8 -100
  32. package/dist/_dts/preview-next/src/client/preview/siteStylePreviewPlanner.d.ts +1 -4
  33. package/dist/_dts/preview-next/src/client/preview/styleConfiguratorApplyPayload.d.ts +1 -15
  34. package/dist/_dts/preview-next/src/client/preview/styleConfiguratorSnapshot.d.ts +11 -21
  35. package/dist/_dts/sdk/src/cli/commands/event.d.ts +2 -2
  36. package/dist/_dts/sdk/src/cli/commands/eventOccurrenceSchedule.d.ts +12 -0
  37. package/dist/_dts/sdk/src/cli/commands/push/pushAllExtras.d.ts +6 -0
  38. package/dist/_dts/sdk/src/cli/commands/style.d.ts +1 -1
  39. package/dist/_dts/sdk/src/cli/content/legacyEventScheduleShapeError.d.ts +5 -0
  40. package/dist/_dts/sdk/src/cli/content/localEventSchedule.d.ts +17 -0
  41. package/dist/_dts/sdk/src/cli/content/reader.d.ts +5 -10
  42. package/dist/_dts/sdk/src/cli/migrations/events.d.ts +1 -1
  43. package/dist/_dts/sdk/src/cli/site-commands/eventScheduleCompiler.d.ts +24 -0
  44. package/dist/_dts/sdk/src/client/management/http.d.ts +1 -1
  45. package/dist/_dts/sdk/src/client/management/types.d.ts +3 -28
  46. package/dist/_dts/sdk/src/config/index.d.ts +1 -1
  47. package/dist/_dts/sdk/src/public-api/contracts.d.ts +5 -20
  48. package/dist/_dts/sdk/src/rendering/index.d.ts +1 -1
  49. package/dist/_dts/sdk/src/version.d.ts +1 -1
  50. package/dist/_dts/site-commands/src/commandContract.d.ts +33 -5
  51. package/dist/_dts/site-commands/src/commandDomain.d.ts +2 -2
  52. package/dist/_dts/site-commands/src/commands.d.ts +38 -9
  53. package/dist/_dts/site-commands/src/siteStyleCommandSchema.d.ts +28 -1
  54. package/dist/_dts/site-commands/src/siteStyleSelectionSchemaBuilder.d.ts +4 -4
  55. package/dist/_dts/theme-core/src/palette/concretePalette.d.ts +20 -0
  56. package/dist/_dts/theme-core/src/palette/curated/index.d.ts +2 -17
  57. package/dist/_dts/theme-core/src/palette/index.d.ts +1 -6
  58. package/dist/_dts/theme-core/src/palette/schema.d.ts +39 -0
  59. package/dist/_dts/theme-core/src/schema.d.ts +38 -26
  60. package/dist/_dts/theme-core/src/site-styles/previewCompiler.d.ts +4 -6
  61. package/dist/_dts/theme-core/src/site-styles/runtimeCompiler.d.ts +5 -6
  62. package/dist/cli/index.mjs +631 -525
  63. package/dist/cli/init-docs/content/cli-reference.md +6 -3
  64. package/dist/cli/init-docs/content/content-management.md +24 -13
  65. package/dist/client/{DiscountCodeDisclosure-DxvjKvck.mjs → DiscountCodeDisclosure-DS0AuFWW.mjs} +1 -1
  66. package/dist/client/{EventCombined.client-BydMGc4c.mjs → EventCombined.client-DtMxLr7q.mjs} +2 -2
  67. package/dist/client/{EventListing.client-vpzhhysN.mjs → EventListing.client-BdLSRNg1.mjs} +2 -2
  68. package/dist/client/{LeafletStaticMap-CB07rpf8.mjs → LeafletStaticMap-BrpC6vsT.mjs} +1 -1
  69. package/dist/client/{MagicLinkForm-BzyRJ8VF.mjs → MagicLinkForm-Bt3IuLMy.mjs} +1 -1
  70. package/dist/client/{StepIndicator-CTcGf8Be.mjs → StepIndicator-CBYPFVoy.mjs} +2 -2
  71. package/dist/client/{accordion-B-DUDLRD.mjs → accordion-BqqwPJWM.mjs} +1 -1
  72. package/dist/client/{bookingForm-DSbClLcZ.mjs → bookingForm-SneP3yxC.mjs} +5 -6
  73. package/dist/client/bookings.mjs +190 -24
  74. package/dist/client/{carousel-B6Ccdx8M.mjs → carousel-BTIR9L3I.mjs} +1 -1
  75. package/dist/client/{cart-BZh8G8wM.mjs → cart-bqiqd8SX.mjs} +3 -3
  76. package/dist/client/{checkout-o6zaC-kM.mjs → checkout-WbTFV5v4.mjs} +3 -3
  77. package/dist/client/client.mjs +175 -223
  78. package/dist/client/{courseRegistration-Cf11pNDs.mjs → courseRegistration-BcemLAdN.mjs} +6 -7
  79. package/dist/client/{eventCalendar-BeXrdsSE.mjs → eventCalendar-CsxIw0V_.mjs} +4 -4
  80. package/dist/client/{eventCombined-DA76PZgG.mjs → eventCombined-B6XMoHfa.mjs} +2 -2
  81. package/dist/client/{eventDetails-BLxg0rok.mjs → eventDetails-BJaoPPfo.mjs} +10 -5
  82. package/dist/client/{eventListing-tO9LheBX.mjs → eventListing-DgwdYHRT.mjs} +2 -2
  83. package/dist/client/{eventRegistration-Cnene9D9.mjs → eventRegistration-C0O3folu.mjs} +30 -22
  84. package/dist/client/{form-DZf72CHB.mjs → form-Bk9txGFt.mjs} +1 -1
  85. package/dist/client/{headerSection-Hioja5Cr.mjs → headerSection-yIBt0yTv.mjs} +2 -2
  86. package/dist/client/hooks.mjs +54 -102
  87. package/dist/client/{locationMap-DwhUXEix.mjs → locationMap-C-3KIpv-.mjs} +2 -2
  88. package/dist/client/{newsletterForm-C350bEQf.mjs → newsletterForm-CzB8g8h2.mjs} +1 -1
  89. package/dist/client/{pricing-BYWN_ATa.mjs → pricing-C1QeDes_.mjs} +1 -1
  90. package/dist/client/{productDetail-CCqCyXgU.mjs → productDetail-w7SBp5uc.mjs} +3 -3
  91. package/dist/client/{productList-BAiNJrOU.mjs → productList-D0tGKHGf.mjs} +3 -3
  92. package/dist/client/{propsDecoder-DeunRj6m.mjs → propsDecoder-Bcin2DB3.mjs} +172 -11
  93. package/dist/client/rendering/client.mjs +322 -363
  94. package/dist/client/rendering/islands.mjs +18 -18
  95. package/dist/client/rendering.mjs +231 -272
  96. package/dist/client/{useDiscountCodeUi-I-92-x2V.mjs → scrollToBlock-h-o_STf_.mjs} +18 -2
  97. package/dist/client/{shop-DUmCdBtw.mjs → shop-BGzmL8O_.mjs} +5 -6
  98. package/dist/client/{shop-commerce-CY27mEUr.mjs → shop-commerce-lX8QxjX-.mjs} +4 -4
  99. package/dist/client/{shop-commerce-store-ChXPbWfa.mjs → shop-commerce-store-CEurARtu.mjs} +1 -1
  100. package/dist/client/{shopShared-q0kin1cv.mjs → shopShared-DXxH8xxw.mjs} +2 -2
  101. package/dist/client/{useEventFilters-DlcVluZh.mjs → useEventFilters-B591g9vd.mjs} +2 -2
  102. package/dist/client/{usePolling-Bz7GFV_a.mjs → usePolling-BvnChV4m.mjs} +2 -2
  103. package/dist/preview-next/before-render.mjs +0 -7
  104. package/dist/preview-next/client/runtime.mjs +4 -4
  105. package/dist/preview-next/middleware.mjs +0 -7
  106. package/dist/{previewAuthStore-CJX21dGi.mjs → previewAuthStore-Dev9CdG9.mjs} +0 -7
  107. package/dist/{sdk-runtime-OnPM8Z69.mjs → sdk-runtime-M__i3Jce.mjs} +2 -2
  108. package/dist/{separator-CPtfzHqA.mjs → separator-VSlnI9bc.mjs} +1 -1
  109. package/dist/server/components.mjs +99 -141
  110. package/dist/server/config-validation.mjs +54 -102
  111. package/dist/server/config.mjs +54 -102
  112. package/dist/server/data.mjs +54 -102
  113. package/dist/server/index.mjs +1 -8
  114. package/dist/server/next.mjs +103 -152
  115. package/dist/server/page-converter.mjs +54 -102
  116. package/dist/server/prebuild.mjs +1 -1
  117. package/dist/server/rendering/server.mjs +62 -104
  118. package/dist/server/rendering.mjs +100 -142
  119. package/dist/server/routing.mjs +75 -147
  120. package/dist/server/server.mjs +55 -110
  121. package/dist/server/theme-bridge.mjs +172 -162
  122. package/dist/server/theme.mjs +167 -11
  123. package/package.json +1 -1
  124. package/dist/_dts/theme-core/src/palette/editorState.d.ts +0 -75
  125. package/dist/_dts/theme-core/src/palette/libraryModel.d.ts +0 -64
  126. package/dist/_dts/theme-core/src/palette/persistenceReadSource.d.ts +0 -81
  127. package/dist/_dts/theme-core/src/palette/resolveSelection.d.ts +0 -75
  128. package/dist/_dts/theme-core/src/palette/selection.d.ts +0 -74
  129. package/dist/_dts/theme-core/src/palette/sitePalettePersistence.d.ts +0 -34
  130. package/dist/client/scrollToBlock-C86BYkyV.mjs +0 -17
@@ -1,5 +1,5 @@
1
1
  "use client";
2
- import { d as unwrapResponse, l as ApiEnvelopeError, s as ApiRequestError, u as extractApiEnvelopeErrorDetails } from "./previewAuthStore-CJX21dGi.mjs";
2
+ import { d as unwrapResponse, l as ApiEnvelopeError, s as ApiRequestError, u as extractApiEnvelopeErrorDetails } from "./previewAuthStore-Dev9CdG9.mjs";
3
3
  import * as React$1 from "react";
4
4
  import React, { Component, Fragment, cloneElement, createContext, createElement, createRef, forwardRef, isValidElement, memo, useCallback, useContext, useDebugValue, useEffect, useId, useImperativeHandle, useLayoutEffect, useMemo, useReducer, useRef, useState, useSyncExternalStore } from "react";
5
5
  import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
@@ -51649,7 +51649,7 @@ const parseMediaAssetId = (value) => parseUuidBrand(value, unsafeAsMediaAssetId)
51649
51649
  const parseEventSeriesId = (value) => parseUuidBrand(value, unsafeAsEventSeriesId);
51650
51650
  //#endregion
51651
51651
  //#region ../core/src/assert-never.ts
51652
- function assertNever$9(value, message = "Unexpected variant") {
51652
+ function assertNever$6(value, message = "Unexpected variant") {
51653
51653
  throw new Error(`${message}: ${String(value)}`);
51654
51654
  }
51655
51655
  //#endregion
@@ -51761,7 +51761,7 @@ function formatCoursePriceDisplayLabel(display, options) {
51761
51761
  case "exact": return `Course (${formatCurrencyAmount(display.amount, display.currency, options)})`;
51762
51762
  case "from": return `Course (From ${formatCurrencyAmount(display.amount, display.currency, options)})`;
51763
51763
  case "range": return `Course (${formatCurrencyAmount(display.minAmount, display.currency, options)} - ${formatCurrencyAmount(display.maxAmount, display.currency, options)})`;
51764
- default: return assertNever$9(display);
51764
+ default: return assertNever$6(display);
51765
51765
  }
51766
51766
  }
51767
51767
  /**
@@ -51781,7 +51781,7 @@ function formatBookingPriceDisplay(display, options = {}) {
51781
51781
  case "unavailable": return "Pricing unavailable";
51782
51782
  case "external": return display.label;
51783
51783
  case "course": return formatCoursePriceDisplayLabel(display.display, options);
51784
- default: return assertNever$9(display);
51784
+ default: return assertNever$6(display);
51785
51785
  }
51786
51786
  }
51787
51787
  /** Render an event's price directly from its pricing value. */
@@ -77114,6 +77114,180 @@ const mediaSchema$1 = z.object({
77114
77114
  transform: transformSchema$1.optional()
77115
77115
  });
77116
77116
  //#endregion
77117
+ //#region ../theme-core/src/palette/colors.ts
77118
+ const HEX_COLOR_REGEX = /^#[0-9a-f]{6}$/;
77119
+ const NORMALIZABLE_HEX_REGEX = /^#(?:[0-9a-f]{3}|[0-9a-f]{6})$/i;
77120
+ const THEME_PALETTE_COLOR_ORDER = [
77121
+ "primary",
77122
+ "secondary",
77123
+ "accent",
77124
+ "success",
77125
+ "warning",
77126
+ "destructive",
77127
+ "background",
77128
+ "surface",
77129
+ "surfaceAlt",
77130
+ "muted",
77131
+ "text",
77132
+ "primaryForeground",
77133
+ "border"
77134
+ ];
77135
+ const hexColorSchema = z$1.string().regex(HEX_COLOR_REGEX, "Hex must be #RRGGBB (lowercase)").transform((value) => value);
77136
+ const paletteModeSchema = z$1.enum(["light", "dark"]);
77137
+ const PALETTE_VALUE_KEY_PREFIX = "palette-value:v1|";
77138
+ z$1.string().regex(/^[0-9a-f]{64}$/, "Palette hash must be a lowercase SHA-256 value").transform((value) => value);
77139
+ const paletteColorsSchema = z$1.object({
77140
+ primary: hexColorSchema,
77141
+ primaryForeground: hexColorSchema,
77142
+ secondary: hexColorSchema,
77143
+ accent: hexColorSchema,
77144
+ success: hexColorSchema,
77145
+ warning: hexColorSchema,
77146
+ destructive: hexColorSchema,
77147
+ background: hexColorSchema,
77148
+ surface: hexColorSchema,
77149
+ surfaceAlt: hexColorSchema,
77150
+ muted: hexColorSchema,
77151
+ text: hexColorSchema,
77152
+ border: hexColorSchema
77153
+ }).strict().transform((value) => value);
77154
+ function normalizePaletteHex(value) {
77155
+ if (!NORMALIZABLE_HEX_REGEX.test(value)) return null;
77156
+ const normalized = value.toLowerCase();
77157
+ if (normalized.length === 7) return normalized;
77158
+ const triplet = normalized.slice(1);
77159
+ const red = triplet.charAt(0);
77160
+ const green = triplet.charAt(1);
77161
+ const blue = triplet.charAt(2);
77162
+ return `#${red}${red}${green}${green}${blue}${blue}`;
77163
+ }
77164
+ function paletteColorsFromEntries(entries) {
77165
+ const values = {};
77166
+ for (const entry of entries) {
77167
+ const parsedRole = paletteTokenNameSchema.safeParse(entry.name);
77168
+ if (!parsedRole.success) return {
77169
+ ok: false,
77170
+ error: {
77171
+ kind: "unknown-role",
77172
+ role: entry.name
77173
+ }
77174
+ };
77175
+ const role = parsedRole.data;
77176
+ if (values[role] !== void 0) return {
77177
+ ok: false,
77178
+ error: {
77179
+ kind: "duplicate-role",
77180
+ role
77181
+ }
77182
+ };
77183
+ const hex = normalizePaletteHex(entry.hex);
77184
+ if (!hex) return {
77185
+ ok: false,
77186
+ error: {
77187
+ kind: "invalid-color",
77188
+ role,
77189
+ value: entry.hex
77190
+ }
77191
+ };
77192
+ values[role] = hex;
77193
+ }
77194
+ const missing = PALETTE_TOKEN_NAMES.filter((role) => values[role] === void 0);
77195
+ if (missing.length > 0) return {
77196
+ ok: false,
77197
+ error: {
77198
+ kind: "missing-roles",
77199
+ roles: missing
77200
+ }
77201
+ };
77202
+ return {
77203
+ ok: true,
77204
+ colors: paletteColorsSchema.parse(values)
77205
+ };
77206
+ }
77207
+ function requirePaletteColorsFromEntries(entries) {
77208
+ const result = paletteColorsFromEntries(entries);
77209
+ if (result.ok) return result.colors;
77210
+ throw new Error(`Invalid complete palette: ${result.error.kind}`);
77211
+ }
77212
+ function paletteColorEntries(colors) {
77213
+ return THEME_PALETTE_COLOR_ORDER.map((name) => ({
77214
+ name,
77215
+ hex: colors[name]
77216
+ }));
77217
+ }
77218
+ function paletteColorsEqual(left, right) {
77219
+ return PALETTE_TOKEN_NAMES.every((name) => left[name] === right[name]);
77220
+ }
77221
+ function paletteColorFingerprint(colors) {
77222
+ return PALETTE_TOKEN_NAMES.map((name) => `${name}:${colors[name]}`).join("|");
77223
+ }
77224
+ function canonicalPaletteHashInput(colors, mode) {
77225
+ return `${mode}|${paletteColorFingerprint(colors)}`;
77226
+ }
77227
+ /**
77228
+ * The shared TypeScript/SQL protocol. Do not reorder roles: the order comes
77229
+ * from PALETTE_TOKEN_NAMES through canonicalPaletteHashInput.
77230
+ */
77231
+ function paletteValueKey(colors, mode) {
77232
+ return `${PALETTE_VALUE_KEY_PREFIX}${canonicalPaletteHashInput(colors, mode)}`;
77233
+ }
77234
+ /** Parses only the exact v1 canonical form emitted by paletteValueKey. */
77235
+ function parsePaletteValueKey(value) {
77236
+ if (typeof value !== "string" || !value.startsWith(PALETTE_VALUE_KEY_PREFIX)) return null;
77237
+ const [rawMode, ...rawRoles] = value.slice(17).split("|");
77238
+ const mode = paletteModeSchema.safeParse(rawMode);
77239
+ if (!mode.success || rawRoles.length !== PALETTE_TOKEN_NAMES.length) return null;
77240
+ const colors = paletteColorsFromEntries(rawRoles.map((roleValue) => {
77241
+ const separator = roleValue.indexOf(":");
77242
+ return separator === -1 ? {
77243
+ name: "",
77244
+ hex: ""
77245
+ } : {
77246
+ name: roleValue.slice(0, separator),
77247
+ hex: roleValue.slice(separator + 1)
77248
+ };
77249
+ }));
77250
+ if (!colors.ok || paletteValueKey(colors.colors, mode.data) !== value) return null;
77251
+ return value;
77252
+ }
77253
+ const paletteValueKeySchema = z$1.string().transform((value, ctx) => {
77254
+ const parsed = parsePaletteValueKey(value);
77255
+ if (parsed) return parsed;
77256
+ ctx.addIssue({
77257
+ code: "custom",
77258
+ message: "Invalid canonical palette value key"
77259
+ });
77260
+ return z$1.NEVER;
77261
+ });
77262
+ //#endregion
77263
+ //#region ../theme-core/src/palette/schema.ts
77264
+ const colourHexString = z$1.string().regex(/^#([0-9A-Fa-f]{3}){1,2}$/);
77265
+ const paletteColorSchema = z$1.object({
77266
+ name: z$1.string().min(1),
77267
+ hex: colourHexString
77268
+ });
77269
+ const paletteMetaSchema = z$1.object({ mode: z$1.enum(["light", "dark"]) });
77270
+ const paletteSchema = z$1.object({
77271
+ colors: z$1.array(paletteColorSchema),
77272
+ meta: paletteMetaSchema
77273
+ }).transform((palette, ctx) => {
77274
+ const colors = paletteColorsFromEntries(palette.colors);
77275
+ if (!colors.ok) {
77276
+ ctx.addIssue({
77277
+ code: "custom",
77278
+ message: `Invalid complete palette: ${colors.error.kind}`
77279
+ });
77280
+ return z$1.NEVER;
77281
+ }
77282
+ return {
77283
+ colors: paletteColorEntries(colors.colors).map(({ name, hex }) => ({
77284
+ name: String(name),
77285
+ hex: String(hex)
77286
+ })),
77287
+ meta: palette.meta
77288
+ };
77289
+ });
77290
+ //#endregion
77117
77291
  //#region ../theme-core/src/cards/types.ts
77118
77292
  const cardVariantRoleValues = ["default", "alternative"];
77119
77293
  const boxlessCardVariantValue = "none";
@@ -78453,7 +78627,7 @@ function asDesignSystemTemplateId(value) {
78453
78627
  function makeBoundaryId(previousBlockId, nextBlockId) {
78454
78628
  return asDesignBoundaryId(`boundary:${encodeURIComponent(previousBlockId)}:${encodeURIComponent(nextBlockId)}`);
78455
78629
  }
78456
- function assertNever$8(value, message = "Unhandled Theme V2 variant") {
78630
+ function assertNever$5(value, message = "Unhandled Theme V2 variant") {
78457
78631
  throw new Error(`${message}: ${String(value)}`);
78458
78632
  }
78459
78633
  function brandNonEmptyString(value, label) {
@@ -78673,7 +78847,7 @@ function resolveBrandDisplay(mode, logoFacts) {
78673
78847
  case "logo-plus-title": return "logo-plus-title";
78674
78848
  case "title-only": return "title-only";
78675
78849
  case "auto": return resolveAutoBrandDisplay(logoFacts);
78676
- default: return assertNever$8(mode, "Unhandled brand display mode");
78850
+ default: return assertNever$5(mode, "Unhandled brand display mode");
78677
78851
  }
78678
78852
  }
78679
78853
  function resolveAutoBrandDisplay(logoFacts) {
@@ -78901,16 +79075,6 @@ const axesSchema = z$1.object({
78901
79075
  "expressive"
78902
79076
  ])
78903
79077
  });
78904
- const colourHexString = z$1.string().regex(/^#([0-9A-Fa-f]{3}){1,2}$/);
78905
- const paletteColorSchema = z$1.object({
78906
- name: z$1.string().min(1),
78907
- hex: colourHexString
78908
- });
78909
- const paletteMetaSchema = z$1.object({ mode: z$1.enum(["light", "dark"]) });
78910
- const paletteSchema = z$1.object({
78911
- colors: z$1.array(paletteColorSchema),
78912
- meta: paletteMetaSchema
78913
- });
78914
79078
  const typographyStyleSchema = z$1.object({
78915
79079
  family: z$1.string().min(1),
78916
79080
  weight: z$1.enum([
@@ -88094,7 +88258,7 @@ function planSiteChromePlacement(positioning) {
88094
88258
  headerRootClassName: "rb-fixed rb-top-0 rb-left-0 rb-right-0",
88095
88259
  standaloneShellClassName: "fixed left-0 right-0 top-0 z-40 w-full"
88096
88260
  };
88097
- default: return assertNever$8(positioning);
88261
+ default: return assertNever$5(positioning);
88098
88262
  }
88099
88263
  }
88100
88264
  function splitSiteChromePlacementClasses(className) {
@@ -88369,6 +88533,83 @@ const blockBookingPaymentCollectionOptionSchema = z$1.union([
88369
88533
  })
88370
88534
  ]);
88371
88535
  const blockBookingPaymentTermsSchema = z$1.object({ allowedOptions: z$1.array(blockBookingPaymentCollectionOptionSchema).min(1) });
88536
+ const unsupportedEventRegistrationPageSurfaceSubjectSchema = z$1.object({
88537
+ kind: z$1.literal("unsupported"),
88538
+ reason: z$1.enum([
88539
+ "unsupportedSubject",
88540
+ "invalidEventSeriesId",
88541
+ "invalidEventOfferingId"
88542
+ ])
88543
+ });
88544
+ const eventRegistrationPageSurfaceSubjectSchema = z$1.unknown().transform((value, ctx) => {
88545
+ const unsupported = unsupportedEventRegistrationPageSurfaceSubjectSchema.safeParse(value);
88546
+ if (unsupported.success) return unsupported.data;
88547
+ const parsed = parseEventPageSurfaceSubject(value);
88548
+ if (parsed.ok) return parsed.value;
88549
+ ctx.addIssue({
88550
+ code: z$1.ZodIssueCode.custom,
88551
+ message: `Invalid event page-surface subject (${parsed.error.kind})`
88552
+ });
88553
+ return z$1.NEVER;
88554
+ });
88555
+ function parseEventRegistrationPageSurfaceSubject(value) {
88556
+ return parseEventPageSurfaceSubject(value);
88557
+ }
88558
+ function normalizeEventRegistrationPageSurfaceSubject(value) {
88559
+ const parsed = parseEventRegistrationPageSurfaceSubject(value);
88560
+ if (parsed.ok) return parsed.value;
88561
+ switch (parsed.error.kind) {
88562
+ case "notObject": return null;
88563
+ case "unsupportedSubject": return {
88564
+ kind: "unsupported",
88565
+ reason: "unsupportedSubject"
88566
+ };
88567
+ case "invalidEventSeriesId": return {
88568
+ kind: "unsupported",
88569
+ reason: "invalidEventSeriesId"
88570
+ };
88571
+ case "invalidEventOfferingId": return {
88572
+ kind: "unsupported",
88573
+ reason: "invalidEventOfferingId"
88574
+ };
88575
+ }
88576
+ }
88577
+ function resolveEventRegistrationScope(context) {
88578
+ const occurrenceSeriesId = context.occurrenceContext?.seriesId;
88579
+ if (occurrenceSeriesId) return {
88580
+ kind: "occurrenceSeries",
88581
+ seriesId: occurrenceSeriesId
88582
+ };
88583
+ if (context.subject?.kind === "eventSeries") return {
88584
+ kind: "pageSurfaceSeries",
88585
+ seriesId: context.subject.eventSeriesId
88586
+ };
88587
+ if (context.subject?.kind === "eventOffering") return {
88588
+ kind: "pageSurfaceOffering",
88589
+ offeringId: context.subject.eventOfferingId,
88590
+ seriesIds: context.subject.availableEventSeriesIds
88591
+ };
88592
+ if (context.subject?.kind === "unsupported") return {
88593
+ kind: "unsupportedPageSurfaceSubject",
88594
+ reason: context.subject.reason
88595
+ };
88596
+ return { kind: "unscoped" };
88597
+ }
88598
+ function applyEventRegistrationScope(events, scope) {
88599
+ switch (scope.kind) {
88600
+ case "occurrenceSeries":
88601
+ case "pageSurfaceSeries": return events.filter((event) => event.seriesId === scope.seriesId);
88602
+ case "pageSurfaceOffering": {
88603
+ const seriesIds = new Set(scope.seriesIds);
88604
+ return events.filter((event) => seriesIds.has(event.seriesId));
88605
+ }
88606
+ case "unsupportedPageSurfaceSubject": return [];
88607
+ case "unscoped": return [...events];
88608
+ }
88609
+ }
88610
+ function resolveEventRegistrationScopedEvents(events, context) {
88611
+ return applyEventRegistrationScope(events, resolveEventRegistrationScope(context));
88612
+ }
88372
88613
  //#endregion
88373
88614
  //#region ../blocks/src/system/blocks/courses/shared/schemas.ts
88374
88615
  /**
@@ -90745,10 +90986,10 @@ function preferredPathsForSource(source) {
90745
90986
  case "workshop": return ["/workshops", "/workshop"];
90746
90987
  case "retreat": return ["/retreats", "/retreat"];
90747
90988
  case "performance": return ["/performances", "/performance"];
90748
- default: return assertNever$9(source.preset, "Unhandled offerings preview event preset");
90989
+ default: return assertNever$6(source.preset, "Unhandled offerings preview event preset");
90749
90990
  }
90750
90991
  case "course": return ["/courses", "/course"];
90751
- default: return assertNever$9(source, "Unhandled offerings preview source");
90992
+ default: return assertNever$6(source, "Unhandled offerings preview source");
90752
90993
  }
90753
90994
  }
90754
90995
  function normalizeRoutePath(value) {
@@ -92687,10 +92928,6 @@ const modernMinimalTheme = {
92687
92928
  name: "primary",
92688
92929
  hex: "#1f2937"
92689
92930
  },
92690
- {
92691
- name: "primaryForeground",
92692
- hex: "#ffffff"
92693
- },
92694
92931
  {
92695
92932
  name: "secondary",
92696
92933
  hex: "#6b7280"
@@ -92731,6 +92968,10 @@ const modernMinimalTheme = {
92731
92968
  name: "text",
92732
92969
  hex: "#1f2937"
92733
92970
  },
92971
+ {
92972
+ name: "primaryForeground",
92973
+ hex: "#ffffff"
92974
+ },
92734
92975
  {
92735
92976
  name: "border",
92736
92977
  hex: "#e5e7eb"
@@ -93875,398 +94116,30 @@ const pipeline = new BasicPipeline().filter.register("default", (r, g, b, a) =>
93875
94116
  //#region ../../node_modules/.pnpm/node-vibrant@4.0.4/node_modules/node-vibrant/dist/esm/browser.js
93876
94117
  Vibrant.use(pipeline);
93877
94118
  //#endregion
93878
- //#region ../theme-core/src/palette/colors.ts
93879
- const HEX_COLOR_REGEX = /^#[0-9a-f]{6}$/;
93880
- const NORMALIZABLE_HEX_REGEX = /^#(?:[0-9a-f]{3}|[0-9a-f]{6})$/i;
93881
- const THEME_PALETTE_COLOR_ORDER = [
93882
- "primary",
93883
- "secondary",
93884
- "accent",
93885
- "success",
93886
- "warning",
93887
- "destructive",
93888
- "background",
93889
- "surface",
93890
- "surfaceAlt",
93891
- "muted",
93892
- "text",
93893
- "primaryForeground",
93894
- "border"
93895
- ];
93896
- const hexColorSchema = z$1.string().regex(HEX_COLOR_REGEX, "Hex must be #RRGGBB (lowercase)").transform((value) => value);
93897
- const paletteModeSchema = z$1.enum(["light", "dark"]);
93898
- const PALETTE_VALUE_KEY_PREFIX = "palette-value:v1|";
93899
- z$1.string().regex(/^[0-9a-f]{64}$/, "Palette hash must be a lowercase SHA-256 value").transform((value) => value);
93900
- const paletteColorsSchema = z$1.object({
93901
- primary: hexColorSchema,
93902
- primaryForeground: hexColorSchema,
93903
- secondary: hexColorSchema,
93904
- accent: hexColorSchema,
93905
- success: hexColorSchema,
93906
- warning: hexColorSchema,
93907
- destructive: hexColorSchema,
93908
- background: hexColorSchema,
93909
- surface: hexColorSchema,
93910
- surfaceAlt: hexColorSchema,
93911
- muted: hexColorSchema,
93912
- text: hexColorSchema,
93913
- border: hexColorSchema
93914
- }).strict().transform((value) => value);
93915
- function normalizePaletteHex(value) {
93916
- if (!NORMALIZABLE_HEX_REGEX.test(value)) return null;
93917
- const normalized = value.toLowerCase();
93918
- if (normalized.length === 7) return normalized;
93919
- const triplet = normalized.slice(1);
93920
- const red = triplet.charAt(0);
93921
- const green = triplet.charAt(1);
93922
- const blue = triplet.charAt(2);
93923
- return `#${red}${red}${green}${green}${blue}${blue}`;
93924
- }
93925
- function paletteColorsFromEntries(entries) {
93926
- const values = {};
93927
- for (const entry of entries) {
93928
- const parsedRole = paletteTokenNameSchema.safeParse(entry.name);
93929
- if (!parsedRole.success) return {
93930
- ok: false,
93931
- error: {
93932
- kind: "unknown-role",
93933
- role: entry.name
93934
- }
93935
- };
93936
- const role = parsedRole.data;
93937
- if (values[role] !== void 0) return {
93938
- ok: false,
93939
- error: {
93940
- kind: "duplicate-role",
93941
- role
93942
- }
93943
- };
93944
- const hex = normalizePaletteHex(entry.hex);
93945
- if (!hex) return {
93946
- ok: false,
93947
- error: {
93948
- kind: "invalid-color",
93949
- role,
93950
- value: entry.hex
93951
- }
93952
- };
93953
- values[role] = hex;
93954
- }
93955
- const missing = PALETTE_TOKEN_NAMES.filter((role) => values[role] === void 0);
93956
- if (missing.length > 0) return {
93957
- ok: false,
93958
- error: {
93959
- kind: "missing-roles",
93960
- roles: missing
93961
- }
93962
- };
93963
- return {
93964
- ok: true,
93965
- colors: paletteColorsSchema.parse(values)
93966
- };
93967
- }
93968
- function requirePaletteColorsFromEntries(entries) {
93969
- const result = paletteColorsFromEntries(entries);
93970
- if (result.ok) return result.colors;
93971
- throw new Error(`Invalid complete palette: ${result.error.kind}`);
93972
- }
93973
- function paletteColorEntries(colors) {
93974
- return THEME_PALETTE_COLOR_ORDER.map((name) => ({
93975
- name,
93976
- hex: colors[name]
93977
- }));
93978
- }
93979
- function paletteColorsEqual(left, right) {
93980
- return PALETTE_TOKEN_NAMES.every((name) => left[name] === right[name]);
93981
- }
93982
- function paletteColorFingerprint(colors) {
93983
- return PALETTE_TOKEN_NAMES.map((name) => `${name}:${colors[name]}`).join("|");
93984
- }
93985
- function canonicalPaletteHashInput(colors, mode) {
93986
- return `${mode}|${paletteColorFingerprint(colors)}`;
93987
- }
94119
+ //#region ../theme-core/src/palette/concretePalette.ts
93988
94120
  /**
93989
- * The shared TypeScript/SQL protocol. Do not reorder roles: the order comes
93990
- * from PALETTE_TOKEN_NAMES through canonicalPaletteHashInput.
94121
+ * Converts an already schema-validated theme palette into the canonical
94122
+ * role-keyed representation. The theme boundary guarantees completeness and
94123
+ * mode validity; colour notation is normalised by that boundary.
93991
94124
  */
93992
- function paletteValueKey(colors, mode) {
93993
- return `${PALETTE_VALUE_KEY_PREFIX}${canonicalPaletteHashInput(colors, mode)}`;
93994
- }
93995
- /** Parses only the exact v1 canonical form emitted by paletteValueKey. */
93996
- function parsePaletteValueKey(value) {
93997
- if (typeof value !== "string" || !value.startsWith(PALETTE_VALUE_KEY_PREFIX)) return null;
93998
- const [rawMode, ...rawRoles] = value.slice(17).split("|");
93999
- const mode = paletteModeSchema.safeParse(rawMode);
94000
- if (!mode.success || rawRoles.length !== PALETTE_TOKEN_NAMES.length) return null;
94001
- const colors = paletteColorsFromEntries(rawRoles.map((roleValue) => {
94002
- const separator = roleValue.indexOf(":");
94003
- return separator === -1 ? {
94004
- name: "",
94005
- hex: ""
94006
- } : {
94007
- name: roleValue.slice(0, separator),
94008
- hex: roleValue.slice(separator + 1)
94009
- };
94010
- }));
94011
- if (!colors.ok || paletteValueKey(colors.colors, mode.data) !== value) return null;
94012
- return value;
94013
- }
94014
- const paletteValueKeySchema = z$1.string().transform((value, ctx) => {
94015
- const parsed = parsePaletteValueKey(value);
94016
- if (parsed) return parsed;
94017
- ctx.addIssue({
94018
- code: "custom",
94019
- message: "Invalid canonical palette value key"
94020
- });
94021
- return z$1.NEVER;
94022
- });
94023
- //#endregion
94024
- //#region ../theme-core/src/palette/editorState.ts
94025
- function createPaletteEditorState(committed) {
94125
+ function concretePaletteFromTheme(palette) {
94026
94126
  return {
94027
- committed,
94028
- preview: {
94029
- kind: "clean",
94030
- resolved: committed
94031
- }
94127
+ colors: requirePaletteColorsFromEntries(palette.colors),
94128
+ mode: palette.meta.mode
94032
94129
  };
94033
94130
  }
94034
- function reducePaletteEditorState(state, action) {
94035
- switch (action.kind) {
94036
- case "select": return {
94037
- ...state,
94038
- preview: paletteSelectionsEqual$1(state.committed.selection, action.resolved.selection) ? {
94039
- kind: "clean",
94040
- resolved: state.committed
94041
- } : {
94042
- kind: "selected",
94043
- resolved: action.resolved
94044
- }
94045
- };
94046
- case "edit": return {
94047
- ...state,
94048
- preview: editedPreview(state.preview, action.colors, action.mode)
94049
- };
94050
- case "create": {
94051
- const palette = previewPalette(state.preview);
94052
- return {
94053
- ...state,
94054
- preview: {
94055
- kind: "new-site",
94056
- colors: palette.colors,
94057
- mode: palette.mode
94058
- }
94059
- };
94060
- }
94061
- case "cancel": return createPaletteEditorState(state.committed);
94062
- default: return assertNever$7(action);
94063
- }
94064
- }
94065
- function previewPalette(preview) {
94066
- switch (preview.kind) {
94067
- case "clean":
94068
- case "selected": return {
94069
- colors: preview.resolved.colors,
94070
- mode: preview.resolved.mode
94071
- };
94072
- case "edited-curated":
94073
- case "edited-site":
94074
- case "new-site": return {
94075
- colors: preview.colors,
94076
- mode: preview.mode
94077
- };
94078
- default: return assertNever$7(preview);
94079
- }
94080
- }
94081
- function editedPreview(preview, colors, mode) {
94082
- switch (preview.kind) {
94083
- case "clean":
94084
- case "selected": return preview.resolved.kind === "curated" ? {
94085
- kind: "edited-curated",
94086
- sourceValueKey: preview.resolved.selection.valueKey,
94087
- colors,
94088
- mode
94089
- } : {
94090
- kind: "edited-site",
94091
- paletteId: preview.resolved.selection.paletteId,
94092
- expectedVersion: preview.resolved.version,
94093
- colors,
94094
- mode
94095
- };
94096
- case "edited-curated": return {
94097
- ...preview,
94098
- colors,
94099
- mode
94100
- };
94101
- case "edited-site": return {
94102
- ...preview,
94103
- colors,
94104
- mode
94105
- };
94106
- case "new-site": return {
94107
- ...preview,
94108
- colors,
94109
- mode
94110
- };
94111
- default: return assertNever$7(preview);
94112
- }
94113
- }
94114
- function planPaletteCommand(state) {
94115
- switch (state.preview.kind) {
94116
- case "clean": return { kind: "preserve" };
94117
- case "selected": return {
94118
- kind: "select",
94119
- selection: state.preview.resolved.selection
94120
- };
94121
- case "edited-curated": return {
94122
- kind: "create-site",
94123
- colors: state.preview.colors,
94124
- mode: state.preview.mode,
94125
- origin: {
94126
- kind: "curated-fork",
94127
- sourceValueKey: state.preview.sourceValueKey
94128
- }
94129
- };
94130
- case "edited-site": return {
94131
- kind: "update-site",
94132
- paletteId: state.preview.paletteId,
94133
- expectedVersion: state.preview.expectedVersion,
94134
- colors: state.preview.colors,
94135
- mode: state.preview.mode
94136
- };
94137
- case "new-site": return {
94138
- kind: "create-site",
94139
- colors: state.preview.colors,
94140
- mode: state.preview.mode,
94141
- origin: { kind: "manual" }
94142
- };
94143
- default: return assertNever$7(state.preview);
94144
- }
94145
- }
94146
- function completePaletteEditorPreview(state) {
94147
- switch (state.preview.kind) {
94148
- case "clean":
94149
- case "selected": return {
94150
- kind: "selected",
94151
- selection: state.preview.resolved.selection,
94152
- colors: state.preview.resolved.colors,
94153
- mode: state.preview.resolved.mode,
94154
- version: state.preview.resolved.kind === "site" ? state.preview.resolved.version : null
94155
- };
94156
- case "edited-curated": return {
94157
- kind: "edited-curated",
94158
- sourceValueKey: state.preview.sourceValueKey,
94159
- colors: state.preview.colors,
94160
- mode: state.preview.mode
94161
- };
94162
- case "edited-site": return {
94163
- kind: "edited-site",
94164
- selection: {
94165
- kind: "site",
94166
- paletteId: state.preview.paletteId
94167
- },
94168
- expectedVersion: state.preview.expectedVersion,
94169
- colors: state.preview.colors,
94170
- mode: state.preview.mode
94171
- };
94172
- case "new-site": return {
94173
- kind: "new-site",
94174
- colors: state.preview.colors,
94175
- mode: state.preview.mode
94176
- };
94177
- default: return assertNever$7(state.preview);
94178
- }
94179
- }
94180
- function paletteSelectionsEqual$1(left, right) {
94181
- if (left.kind === "curated" && right.kind === "curated") return left.valueKey === right.valueKey;
94182
- if (left.kind === "site" && right.kind === "site") return left.paletteId === right.paletteId;
94183
- return false;
94184
- }
94185
- function assertNever$7(value) {
94186
- throw new Error(`Unhandled palette editor variant: ${JSON.stringify(value)}`);
94187
- }
94188
- //#endregion
94189
- //#region ../theme-core/src/palette/libraryModel.ts
94190
- function buildPaletteLibraryReadModel(input) {
94191
- const curatedByValueKey = /* @__PURE__ */ new Map();
94192
- for (const palette of input.curatedPalettes) if (!curatedByValueKey.has(palette.valueKey)) curatedByValueKey.set(palette.valueKey, palette);
94193
- const siteById = /* @__PURE__ */ new Map();
94194
- for (const palette of input.sitePalettes) if (!siteById.has(palette.id)) siteById.set(palette.id, palette);
94195
- if (input.active.kind === "available" && input.active.selection.kind === "curated" && !curatedByValueKey.has(input.active.selection.valueKey)) return {
94196
- ok: false,
94197
- error: {
94198
- kind: "active-curated-palette-missing",
94199
- valueKey: input.active.selection.valueKey
94200
- }
94201
- };
94202
- if (input.active.kind === "available" && input.active.selection.kind === "site" && !siteById.has(input.active.selection.paletteId)) return {
94203
- ok: false,
94204
- error: {
94205
- kind: "active-site-palette-missing",
94206
- paletteId: input.active.selection.paletteId
94207
- }
94208
- };
94209
- const yours = [...siteById.values()].map((palette) => sitePaletteItem(palette, input.active)).sort((left, right) => Number(right.selected) - Number(left.selected));
94210
- const recommendedValueKeys = /* @__PURE__ */ new Set();
94211
- const suggested = [];
94212
- for (const valueKey of input.recommendations) {
94213
- if (recommendedValueKeys.has(valueKey)) continue;
94214
- recommendedValueKeys.add(valueKey);
94215
- const palette = curatedByValueKey.get(valueKey);
94216
- if (!palette) continue;
94217
- suggested.push(curatedPaletteItem(palette, input.active));
94218
- }
94219
- const more = [...curatedByValueKey.values()].filter((palette) => !recommendedValueKeys.has(palette.valueKey)).map((palette) => curatedPaletteItem(palette, input.active));
94131
+ function concretePaletteToTheme(palette) {
94220
94132
  return {
94221
- ok: true,
94222
- model: {
94223
- active: input.active,
94224
- yours,
94225
- suggested,
94226
- more
94227
- }
94228
- };
94229
- }
94230
- function curatedPaletteItem(palette, active) {
94231
- return {
94232
- kind: "curated",
94233
- valueKey: palette.valueKey,
94234
- colors: palette.colors,
94235
- mode: palette.mode,
94236
- swatch: paletteSwatch(palette.colors),
94237
- accessibleLabel: paletteAccessibleLabel("Palette", palette.colors),
94238
- selected: active.kind === "available" && active.selection.kind === "curated" && active.selection.valueKey === palette.valueKey
94133
+ colors: paletteColorEntries(palette.colors),
94134
+ meta: { mode: palette.mode }
94239
94135
  };
94240
94136
  }
94241
- function sitePaletteItem(palette, active) {
94242
- return {
94243
- kind: "site",
94244
- paletteId: palette.id,
94245
- colors: palette.colors,
94246
- mode: palette.mode,
94247
- origin: palette.origin,
94248
- version: palette.version,
94249
- swatch: paletteSwatch(palette.colors),
94250
- accessibleLabel: paletteAccessibleLabel("Your palette", palette.colors),
94251
- selected: active.kind === "available" && active.selection.kind === "site" && active.selection.paletteId === palette.id
94252
- };
94137
+ function concretePalettesEqual(left, right) {
94138
+ return left.mode === right.mode && paletteColorsEqual(left.colors, right.colors);
94253
94139
  }
94254
- function paletteSwatch(colors) {
94255
- return [
94256
- colors.background,
94257
- colors.surface,
94258
- colors.primary,
94259
- colors.secondary,
94260
- colors.accent
94261
- ];
94262
- }
94263
- function paletteAccessibleLabel(prefix, colors) {
94264
- return [
94265
- `${prefix}.`,
94266
- `Primary ${colors.primary}.`,
94267
- `Accent ${colors.accent}.`,
94268
- `Background ${colors.background}.`
94269
- ].join(" ");
94140
+ /** Exact semantic equality for two schema-validated theme palette values. */
94141
+ function themePalettesEqual(left, right) {
94142
+ return concretePalettesEqual(concretePaletteFromTheme(left), concretePaletteFromTheme(right));
94270
94143
  }
94271
94144
  //#endregion
94272
94145
  //#region ../theme-core/src/site-styles/styleTags.ts
@@ -95560,13 +95433,6 @@ const warmDarkKirtanGold = defineCuratedPalette({
95560
95433
  });
95561
95434
  //#endregion
95562
95435
  //#region ../theme-core/src/palette/curated/index.ts
95563
- /**
95564
- * Curated palette library.
95565
- *
95566
- * Authoring keys are readable source aliases. Value keys are derived from the
95567
- * complete mode and semantic colours and are the only curated identity used at
95568
- * persistence and runtime boundaries.
95569
- */
95570
95436
  function admitCuratedPaletteDefinition(definition) {
95571
95437
  return {
95572
95438
  ...definition,
@@ -95606,177 +95472,6 @@ function requireCuratedPaletteValueKey(authoringKey) {
95606
95472
  if (!palette) throw new Error(`Unknown curated palette authoring key "${authoringKey}"`);
95607
95473
  return palette.valueKey;
95608
95474
  }
95609
- /** Parses a raw persisted key into catalogue-proven curated membership. */
95610
- const knownCuratedPaletteValueKeySchema = z$1.string().transform((value, ctx) => {
95611
- const valueKey = parsePaletteValueKey(value);
95612
- if (!valueKey) {
95613
- ctx.addIssue({
95614
- code: "custom",
95615
- message: "Invalid canonical palette value key"
95616
- });
95617
- return z$1.NEVER;
95618
- }
95619
- const palette = findCuratedPalette(valueKey);
95620
- if (!palette) {
95621
- ctx.addIssue({
95622
- code: "custom",
95623
- message: "Unknown curated palette value key"
95624
- });
95625
- return z$1.NEVER;
95626
- }
95627
- return palette.valueKey;
95628
- });
95629
- //#endregion
95630
- //#region ../theme-core/src/palette/resolveSelection.ts
95631
- const resolvedPaletteSelectionBrand = Symbol("resolvedPaletteSelection");
95632
- /** Core-owned constructors keep the resolved marker out of application code. */
95633
- function resolvedCuratedPaletteSelection(palette) {
95634
- const resolved = {
95635
- kind: "curated",
95636
- selection: {
95637
- kind: "curated",
95638
- valueKey: palette.valueKey
95639
- },
95640
- colors: palette.colors,
95641
- mode: palette.mode,
95642
- [resolvedPaletteSelectionBrand]: true
95643
- };
95644
- Object.defineProperty(resolved, resolvedPaletteSelectionBrand, { enumerable: false });
95645
- return resolved;
95646
- }
95647
- function resolvedSitePaletteSelection(palette) {
95648
- return resolvedSitePaletteSelectionFromPreview({
95649
- paletteId: palette.id,
95650
- colors: palette.colors,
95651
- mode: palette.mode,
95652
- version: palette.version
95653
- });
95654
- }
95655
- /** Builds a resolved site-owned preview from the record fields it owns. */
95656
- function resolvedSitePaletteSelectionFromPreview(input) {
95657
- const resolved = {
95658
- kind: "site",
95659
- selection: {
95660
- kind: "site",
95661
- paletteId: input.paletteId
95662
- },
95663
- colors: input.colors,
95664
- mode: input.mode,
95665
- version: input.version,
95666
- [resolvedPaletteSelectionBrand]: true
95667
- };
95668
- Object.defineProperty(resolved, resolvedPaletteSelectionBrand, { enumerable: false });
95669
- return resolved;
95670
- }
95671
- function resolvedDraftPaletteSelection(input) {
95672
- const resolved = {
95673
- kind: "draft",
95674
- selection: null,
95675
- colors: input.colors,
95676
- mode: input.mode,
95677
- [resolvedPaletteSelectionBrand]: true
95678
- };
95679
- Object.defineProperty(resolved, resolvedPaletteSelectionBrand, { enumerable: false });
95680
- return resolved;
95681
- }
95682
- //#endregion
95683
- //#region ../theme-core/src/palette/selection.ts
95684
- const sitePaletteIdSchema = z$1.string().uuid().transform((value) => value);
95685
- const sitePaletteVersionSchema = z$1.number().int().nonnegative().transform((value) => value);
95686
- function parseSitePaletteVersion(value) {
95687
- const parsed = sitePaletteVersionSchema.safeParse(value);
95688
- return parsed.success ? parsed.data : null;
95689
- }
95690
- const paletteSelectionSchema = z$1.discriminatedUnion("kind", [z$1.object({
95691
- kind: z$1.literal("curated"),
95692
- valueKey: knownCuratedPaletteValueKeySchema
95693
- }), z$1.object({
95694
- kind: z$1.literal("site"),
95695
- paletteId: sitePaletteIdSchema
95696
- })]);
95697
- const onboardingPaletteOriginSchema = z$1.object({
95698
- kind: z$1.literal("onboarding"),
95699
- sourceKey: z$1.string().min(1).nullable()
95700
- });
95701
- const curatedForkPaletteOriginSchema = z$1.object({
95702
- kind: z$1.literal("curated-fork"),
95703
- sourceValueKey: paletteValueKeySchema
95704
- });
95705
- const manualPaletteOriginSchema = z$1.object({ kind: z$1.literal("manual") });
95706
- const legacyCustomizedPaletteOriginSchema = z$1.object({
95707
- kind: z$1.literal("legacy-customized"),
95708
- sourceKey: z$1.string().min(1).nullable()
95709
- });
95710
- const sitePaletteOriginSchema = z$1.discriminatedUnion("kind", [
95711
- onboardingPaletteOriginSchema,
95712
- curatedForkPaletteOriginSchema,
95713
- manualPaletteOriginSchema,
95714
- legacyCustomizedPaletteOriginSchema
95715
- ]);
95716
- const editorSitePaletteOriginSchema = z$1.discriminatedUnion("kind", [z$1.object({
95717
- kind: z$1.literal("curated-fork"),
95718
- sourceValueKey: knownCuratedPaletteValueKeySchema
95719
- }), manualPaletteOriginSchema]);
95720
- z$1.object({
95721
- id: sitePaletteIdSchema,
95722
- colors: paletteColorsSchema,
95723
- mode: paletteModeSchema,
95724
- origin: sitePaletteOriginSchema,
95725
- version: sitePaletteVersionSchema
95726
- });
95727
- z$1.discriminatedUnion("kind", [
95728
- z$1.object({ kind: z$1.literal("preserve") }),
95729
- z$1.object({
95730
- kind: z$1.literal("select"),
95731
- selection: paletteSelectionSchema
95732
- }),
95733
- z$1.object({
95734
- kind: z$1.literal("create-site"),
95735
- colors: paletteColorsSchema,
95736
- mode: paletteModeSchema,
95737
- origin: editorSitePaletteOriginSchema
95738
- }),
95739
- z$1.object({
95740
- kind: z$1.literal("update-site"),
95741
- paletteId: sitePaletteIdSchema,
95742
- expectedVersion: sitePaletteVersionSchema,
95743
- colors: paletteColorsSchema,
95744
- mode: paletteModeSchema
95745
- })
95746
- ]);
95747
- //#endregion
95748
- //#region ../theme-core/src/palette/persistenceReadSource.ts
95749
- function resolveMigratedRuntimePaletteState(state) {
95750
- if (state.authority === "site") return {
95751
- ok: true,
95752
- resolved: resolvedSitePaletteSelection({
95753
- id: state.selection.paletteId,
95754
- colors: state.colors,
95755
- mode: state.mode,
95756
- origin: { kind: "manual" },
95757
- version: state.sitePaletteVersion
95758
- })
95759
- };
95760
- const palette = findCuratedPalette(state.selection.valueKey);
95761
- if (!palette) return {
95762
- ok: false,
95763
- error: {
95764
- kind: "runtime-curated-palette-missing",
95765
- paletteId: state.selection.valueKey
95766
- }
95767
- };
95768
- if (palette.mode !== state.mode || !paletteColorsEqual(palette.colors, state.colors)) return {
95769
- ok: false,
95770
- error: {
95771
- kind: "runtime-curated-palette-mismatch",
95772
- paletteId: palette.valueKey
95773
- }
95774
- };
95775
- return {
95776
- ok: true,
95777
- resolved: resolvedCuratedPaletteSelection(palette)
95778
- };
95779
- }
95780
95475
  //#endregion
95781
95476
  //#region ../theme-core/src/tokens/tokens.ts
95782
95477
  const defaultThemeTokens = {
@@ -96020,7 +95715,7 @@ function persistenceTargetForSurface(surface) {
96020
95715
  kind: "site-chrome",
96021
95716
  surface: "footer"
96022
95717
  };
96023
- default: return assertNever$8(surface, "Unhandled customizable surface");
95718
+ default: return assertNever$5(surface, "Unhandled customizable surface");
96024
95719
  }
96025
95720
  }
96026
95721
  function writePlanForLookCustomizationCommand(command) {
@@ -96039,7 +95734,7 @@ function writePlanForLookCustomizationCommand(command) {
96039
95734
  kind: "clear-selection",
96040
95735
  target: persistenceTargetForSurface(command.surface)
96041
95736
  };
96042
- default: return assertNever$8(command, "Unhandled customization command");
95737
+ default: return assertNever$5(command, "Unhandled customization command");
96043
95738
  }
96044
95739
  }
96045
95740
  //#endregion
@@ -96192,7 +95887,7 @@ function logoFactsForHeaderContext(logo) {
96192
95887
  case "horizontal":
96193
95888
  case "square":
96194
95889
  case "tall": return deterministicLogoFactsForShape(logo.shape);
96195
- default: return assertNever$8(logo.shape, "Unhandled header logo shape");
95890
+ default: return assertNever$5(logo.shape, "Unhandled header logo shape");
96196
95891
  }
96197
95892
  }
96198
95893
  function resolveHeaderBrandPresentation(input) {
@@ -96792,7 +96487,7 @@ function applyNavTypography(style, typography) {
96792
96487
  textSize: "sm",
96793
96488
  letterSpacing: "wider"
96794
96489
  };
96795
- default: return assertNever$8(typography, "Unhandled header nav typography");
96490
+ default: return assertNever$5(typography, "Unhandled header nav typography");
96796
96491
  }
96797
96492
  }
96798
96493
  function minimalNavLinkStyle(colorToken, hoverColorToken = "primary", typography = "plain") {
@@ -96937,7 +96632,7 @@ function themedHeaderShadow(theme) {
96937
96632
  case "low": return { elevation: "sm" };
96938
96633
  case "medium": return { elevation: "md" };
96939
96634
  case "high": return { elevation: "lg" };
96940
- default: return assertNever$8(theme.shadow.elevation, "Unhandled theme shadow elevation");
96635
+ default: return assertNever$5(theme.shadow.elevation, "Unhandled theme shadow elevation");
96941
96636
  }
96942
96637
  }
96943
96638
  function brandSurfaceBase(theme, header) {
@@ -97150,7 +96845,7 @@ function applyHeaderStyle(theme, header, style) {
97150
96845
  },
97151
96846
  ctaTreatment: "default"
97152
96847
  };
97153
- default: return assertNever$8(style.id, "Unhandled header style id");
96848
+ default: return assertNever$5(style.id, "Unhandled header style id");
97154
96849
  }
97155
96850
  })(), style);
97156
96851
  }
@@ -99739,7 +99434,7 @@ function compileImageSurfaceTreatmentBackground(background, treatment, foregroun
99739
99434
  ...uniformSectionForeground("text"),
99740
99435
  ...foreground
99741
99436
  };
99742
- default: return assertNever$8(treatment);
99437
+ default: return assertNever$5(treatment);
99743
99438
  }
99744
99439
  }
99745
99440
  const imageSurfaceTreatmentOpacityByKind = {
@@ -99797,7 +99492,7 @@ function compileContainerStyles(contentFrame, rules) {
99797
99492
  rounded: "none"
99798
99493
  })
99799
99494
  };
99800
- default: return assertNever$8(contentFrame);
99495
+ default: return assertNever$5(contentFrame);
99801
99496
  }
99802
99497
  }
99803
99498
  function shouldMoveFrameToHeroContentCard(block) {
@@ -99816,7 +99511,7 @@ function compileHeroCompositionFields(composition) {
99816
99511
  verticalAlignment: "bottom",
99817
99512
  contentMaxWidth: "medium"
99818
99513
  };
99819
- default: return assertNever$8(composition);
99514
+ default: return assertNever$5(composition);
99820
99515
  }
99821
99516
  }
99822
99517
  function compileHeroRuntimeFields(input) {
@@ -99867,7 +99562,7 @@ function testimonialCardTreatmentStyles(treatment) {
99867
99562
  border: { enabled: false },
99868
99563
  rounded: "none"
99869
99564
  };
99870
- default: return assertNever$8(treatment);
99565
+ default: return assertNever$5(treatment);
99871
99566
  }
99872
99567
  }
99873
99568
  function compileCardStyles(input) {
@@ -99892,7 +99587,7 @@ function transitionTargetSurfaceForAdjacency(adjacency) {
99892
99587
  case "next-section":
99893
99588
  case "terminal-surface": return adjacency.surface;
99894
99589
  case "page-end": return null;
99895
- default: return assertNever$8(adjacency);
99590
+ default: return assertNever$5(adjacency);
99896
99591
  }
99897
99592
  }
99898
99593
  function resolveEyebrowTreatmentForRuntime(block, rules) {
@@ -100002,7 +99697,7 @@ function transitionEndpointCssValue(endpoint) {
100002
99697
  switch (endpoint.kind) {
100003
99698
  case "color-token": return themeColorTokenCssValue(endpoint.token);
100004
99699
  case "surface": return themeColorTokenCssValue(tokenForTransitionSurface(endpoint.surface));
100005
- default: return assertNever$8(endpoint);
99700
+ default: return assertNever$5(endpoint);
100006
99701
  }
100007
99702
  }
100008
99703
  function tokenForTransitionSurface(surface) {
@@ -100012,7 +99707,7 @@ function tokenForTransitionSurface(surface) {
100012
99707
  case "muted-band": return "muted";
100013
99708
  case "accent-band": return "accent";
100014
99709
  case "brand-depth-band": return "primary-800";
100015
- default: return assertNever$8(surface);
99710
+ default: return assertNever$5(surface);
100016
99711
  }
100017
99712
  }
100018
99713
  function themeColorTokenCssValue(token) {
@@ -100284,15 +99979,11 @@ const paletteByRecipe = {
100284
99979
  };
100285
99980
  /**
100286
99981
  * Resolves the full `theme.palette` (colours + light/dark mode) for a compiled
100287
- * theme. A caller that has palette authority supplies its complete resolved
100288
- * selection. Recipe-only callers retain the bounded recipe palette for static
100289
- * design compilation that has no palette selection to render.
99982
+ * theme. A caller can supply its complete concrete palette. Recipe-only callers
99983
+ * retain the bounded recipe palette for static design compilation.
100290
99984
  */
100291
99985
  function resolvePalette(recipes, options) {
100292
- if (options.resolvedPalette !== void 0) return {
100293
- colors: paletteColorEntries(options.resolvedPalette.colors),
100294
- meta: { mode: options.resolvedPalette.mode }
100295
- };
99986
+ if (options.palette !== void 0) return options.palette;
100296
99987
  return {
100297
99988
  colors: [...paletteByRecipe[recipes.palette]],
100298
99989
  meta: { mode: "light" }
@@ -100334,9 +100025,9 @@ function compileHeroTypography(recipes) {
100334
100025
  * pure and schema-validated so generated Theme V2 choices have a concrete legacy
100335
100026
  * Theme output before any persistence or Phase 5 integration consumes them.
100336
100027
  *
100337
- * Optional `options` accept an already-resolved palette selection and button
100338
- * style. Sparse overrides and legacy palette IDs are deliberately not
100339
- * compiler inputs: callers must resolve a complete palette before compiling.
100028
+ * Optional `options` accept a complete concrete palette and button style.
100029
+ * Sparse overrides and palette identities are deliberately not compiler
100030
+ * inputs.
100340
100031
  */
100341
100032
  function compileTokenRecipes(recipes, options = {}) {
100342
100033
  const theme = structuredClone(modernMinimalTheme);
@@ -102259,7 +101950,7 @@ function supportsBlockComposition(capability, composition) {
102259
101950
  switch (composition.kind) {
102260
101951
  case "intro": return supported.kind === "intro" && supported.treatments.includes(composition.treatment);
102261
101952
  case "feature-cards": return supported.kind === "feature-cards" && supported.treatments.includes(composition.treatment);
102262
- default: return assertNever$8(composition);
101953
+ default: return assertNever$5(composition);
102263
101954
  }
102264
101955
  }
102265
101956
  function isDecorativeTransition(transition) {
@@ -102882,13 +102573,13 @@ function compileSiteThemeFromSelections(input) {
102882
102573
  const siteChromeResult = applySiteChromeLooks({
102883
102574
  theme: applyTypographyToTheme(applySiteStyleThemeOverrides(compileTokenRecipes(siteStyle.template.tokenRecipes, {
102884
102575
  buttonStyleSelection: resolvedButtonStyle,
102885
- resolvedPalette: input.resolvedPalette
102576
+ palette: input.palette
102886
102577
  }), siteStyle), typography ?? siteStyle.typography, siteStyle.heroTypography),
102887
102578
  siteStyle,
102888
102579
  compilationPlan
102889
102580
  });
102890
102581
  const requestedSelections = requestedSelectionsForPlan(compilationPlan);
102891
- const commonResult = {
102582
+ return {
102892
102583
  theme: withSiteStyleMetadata(siteChromeResult.theme, siteStyle),
102893
102584
  requestedSelections,
102894
102585
  resolvedSelections: {
@@ -102900,13 +102591,6 @@ function compileSiteThemeFromSelections(input) {
102900
102591
  footerCompilation: siteChromeResult.footerCompilation,
102901
102592
  warnings
102902
102593
  };
102903
- return {
102904
- ...commonResult,
102905
- resolvedSelections: {
102906
- ...commonResult.resolvedSelections,
102907
- paletteSelection: input.resolvedPalette.selection
102908
- }
102909
- };
102910
102594
  }
102911
102595
  function requestedSelectionsForPlan(plan) {
102912
102596
  if (plan.kind === "replace-site-style") return {
@@ -103153,7 +102837,7 @@ function compositionCapabilityFor(composition) {
103153
102837
  kind: "feature-cards",
103154
102838
  treatments: [composition.treatment]
103155
102839
  };
103156
- default: return assertNever$8(composition);
102840
+ default: return assertNever$5(composition);
103157
102841
  }
103158
102842
  }
103159
102843
  //#endregion
@@ -108546,7 +108230,7 @@ const publicProductSchema = z$1.object({
108546
108230
  const publicProductsResponseSchema = z$1.object({ products: z$1.array(publicProductSchema) });
108547
108231
  //#endregion
108548
108232
  //#region ../blocks/src/system/runtime/api/creditProducts.ts
108549
- function assertNever$6(value) {
108233
+ function assertNever$4(value) {
108550
108234
  throw new Error(`Unhandled credit product case: ${String(value)}`);
108551
108235
  }
108552
108236
  function useCasesFromModules(modules) {
@@ -108569,7 +108253,7 @@ function getCreditProductCreditUnit(useCase) {
108569
108253
  plural: "credits",
108570
108254
  perCreditSuffix: "credit"
108571
108255
  };
108572
- default: return assertNever$6(useCase);
108256
+ default: return assertNever$4(useCase);
108573
108257
  }
108574
108258
  }
108575
108259
  function deriveCreditProductLabels(products, options = {}) {
@@ -109558,83 +109242,6 @@ const checkoutBlockDefinition = {
109558
109242
  }),
109559
109243
  runtime: checkoutBlockRuntime
109560
109244
  };
109561
- const unsupportedEventRegistrationPageSurfaceSubjectSchema = z$1.object({
109562
- kind: z$1.literal("unsupported"),
109563
- reason: z$1.enum([
109564
- "unsupportedSubject",
109565
- "invalidEventSeriesId",
109566
- "invalidEventOfferingId"
109567
- ])
109568
- });
109569
- const eventRegistrationPageSurfaceSubjectSchema = z$1.unknown().transform((value, ctx) => {
109570
- const unsupported = unsupportedEventRegistrationPageSurfaceSubjectSchema.safeParse(value);
109571
- if (unsupported.success) return unsupported.data;
109572
- const parsed = parseEventPageSurfaceSubject(value);
109573
- if (parsed.ok) return parsed.value;
109574
- ctx.addIssue({
109575
- code: z$1.ZodIssueCode.custom,
109576
- message: `Invalid event page-surface subject (${parsed.error.kind})`
109577
- });
109578
- return z$1.NEVER;
109579
- });
109580
- function parseEventRegistrationPageSurfaceSubject(value) {
109581
- return parseEventPageSurfaceSubject(value);
109582
- }
109583
- function normalizeEventRegistrationPageSurfaceSubject(value) {
109584
- const parsed = parseEventRegistrationPageSurfaceSubject(value);
109585
- if (parsed.ok) return parsed.value;
109586
- switch (parsed.error.kind) {
109587
- case "notObject": return null;
109588
- case "unsupportedSubject": return {
109589
- kind: "unsupported",
109590
- reason: "unsupportedSubject"
109591
- };
109592
- case "invalidEventSeriesId": return {
109593
- kind: "unsupported",
109594
- reason: "invalidEventSeriesId"
109595
- };
109596
- case "invalidEventOfferingId": return {
109597
- kind: "unsupported",
109598
- reason: "invalidEventOfferingId"
109599
- };
109600
- }
109601
- }
109602
- function resolveEventRegistrationScope(context) {
109603
- const occurrenceSeriesId = context.occurrenceContext?.seriesId;
109604
- if (occurrenceSeriesId) return {
109605
- kind: "occurrenceSeries",
109606
- seriesId: occurrenceSeriesId
109607
- };
109608
- if (context.subject?.kind === "eventSeries") return {
109609
- kind: "pageSurfaceSeries",
109610
- seriesId: context.subject.eventSeriesId
109611
- };
109612
- if (context.subject?.kind === "eventOffering") return {
109613
- kind: "pageSurfaceOffering",
109614
- offeringId: context.subject.eventOfferingId,
109615
- seriesIds: context.subject.availableEventSeriesIds
109616
- };
109617
- if (context.subject?.kind === "unsupported") return {
109618
- kind: "unsupportedPageSurfaceSubject",
109619
- reason: context.subject.reason
109620
- };
109621
- return { kind: "unscoped" };
109622
- }
109623
- function applyEventRegistrationScope(events, scope) {
109624
- switch (scope.kind) {
109625
- case "occurrenceSeries":
109626
- case "pageSurfaceSeries": return events.filter((event) => event.seriesId === scope.seriesId);
109627
- case "pageSurfaceOffering": {
109628
- const seriesIds = new Set(scope.seriesIds);
109629
- return events.filter((event) => seriesIds.has(event.seriesId));
109630
- }
109631
- case "unsupportedPageSurfaceSubject": return [];
109632
- case "unscoped": return [...events];
109633
- }
109634
- }
109635
- function resolveEventRegistrationScopedEvents(events, context) {
109636
- return applyEventRegistrationScope(events, resolveEventRegistrationScope(context));
109637
- }
109638
109245
  //#endregion
109639
109246
  //#region ../blocks/src/system/runtime/nodes/course-registration.interactive.ts
109640
109247
  const courseRegistrationSourceSchema = z$1.object({
@@ -113431,7 +113038,7 @@ const ALLOWED_URL_PROTOCOLS = ["http:", "https:"];
113431
113038
  const DATE_PATTERN = /^(?<year>[1-9]\d{3})-(?<month>\d{2})-(?<day>\d{2})$/;
113432
113039
  const TIME_PATTERN = /^(?<hours>[01]\d|2[0-3]):(?<minutes>[0-5]\d)$/;
113433
113040
  const DATETIME_PATTERN = /^(?<date>[1-9]\d{3}-\d{2}-\d{2})T(?<time>(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d)(?:\.\d+)?(?<offset>Z|[+-](?:[01]\d|2[0-3]):[0-5]\d)$/;
113434
- function assertNever$5(value) {
113041
+ function assertNever$3(value) {
113435
113042
  throw new Error(`Unhandled field validation variant: ${JSON.stringify(value)}`);
113436
113043
  }
113437
113044
  function validationContext(options = {}) {
@@ -113478,7 +113085,7 @@ function fieldIssueToMessage(issue) {
113478
113085
  case "invalidMedia": return `${issue.label} must be a media object with an identifier`;
113479
113086
  case "invalidLink": return `${issue.label} must be a valid link`;
113480
113087
  case "invalidReference": return `${issue.label} must reference a valid item`;
113481
- default: return assertNever$5(issue);
113088
+ default: return assertNever$3(issue);
113482
113089
  }
113483
113090
  }
113484
113091
  function pluralize(label, count) {
@@ -113598,7 +113205,7 @@ function deriveFieldValidationPlan(field, path = [field.id]) {
113598
113205
  case "presetOrCustom":
113599
113206
  case "contentTypeSelect":
113600
113207
  case "entryPicker": return makePlan("passthrough", "unknown", field, path, false, []);
113601
- default: return assertNever$5(field);
113208
+ default: return assertNever$3(field);
113602
113209
  }
113603
113210
  }
113604
113211
  function deriveFieldValidationPlans(fields, parentPath = []) {
@@ -113673,7 +113280,7 @@ function resolveSelectConstraintSource(field) {
113673
113280
  kind: "runtime",
113674
113281
  source: source.kind
113675
113282
  };
113676
- default: return assertNever$5(source);
113283
+ default: return assertNever$3(source);
113677
113284
  }
113678
113285
  }
113679
113286
  function normalizeStoredContentValues(plans, content, options = {}) {
@@ -113692,7 +113299,7 @@ function allGroupChildPlans(plan) {
113692
113299
  switch (plan.childSelection.kind) {
113693
113300
  case "all": return plan.childSelection.fields;
113694
113301
  case "discriminatedTabs": return plan.childSelection.tabs.flatMap((tab) => tab.fields);
113695
- default: return assertNever$5(plan.childSelection);
113302
+ default: return assertNever$3(plan.childSelection);
113696
113303
  }
113697
113304
  }
113698
113305
  function selectedGroupChildPlans(plan, value) {
@@ -113715,7 +113322,7 @@ function normalizeStoredFieldValueWithContext(plan, value, ctx) {
113715
113322
  case "link":
113716
113323
  case "select":
113717
113324
  case "passthrough": return normalizeFieldValue(plan, value, ctx);
113718
- default: return assertNever$5(plan);
113325
+ default: return assertNever$3(plan);
113719
113326
  }
113720
113327
  }
113721
113328
  function normalizeStoredObjectChildren(children, value, ctx) {
@@ -113748,7 +113355,7 @@ function normalizeFieldValue(plan, value, ctx) {
113748
113355
  case "select":
113749
113356
  case "passthrough": return value;
113750
113357
  case "media": return value;
113751
- default: return assertNever$5(plan);
113358
+ default: return assertNever$3(plan);
113752
113359
  }
113753
113360
  }
113754
113361
  function normalizeObjectChildren(children, value, ctx) {
@@ -113807,7 +113414,7 @@ function validateNormalizedFieldValue(plan, value, ctx) {
113807
113414
  case "repeater": return validateRepeaterPlan(plan, value, ctx);
113808
113415
  case "group": return validateGroupPlan(plan, value, ctx);
113809
113416
  case "passthrough": return [];
113810
- default: return assertNever$5(plan);
113417
+ default: return assertNever$3(plan);
113811
113418
  }
113812
113419
  }
113813
113420
  function shouldRequireValue(plan, value, ctx) {
@@ -113849,7 +113456,7 @@ function validateStringConstraint(plan, constraint, value) {
113849
113456
  case "timeFormat": return typeof value === "string" && isValidTimeString(value) ? [] : [issue(plan, "invalidTime")];
113850
113457
  case "datetimeFormat": return typeof value === "string" && isValidDateTimeInstantString(value) ? [] : [issue(plan, "invalidDateTime")];
113851
113458
  case "slugFormat": return typeof value === "string" && SLUG_PATTERN.test(value) ? [] : [issue(plan, "invalidSlug")];
113852
- default: return assertNever$5(constraint);
113459
+ default: return assertNever$3(constraint);
113853
113460
  }
113854
113461
  }
113855
113462
  function isValidIconPickerValue(value) {
@@ -113868,7 +113475,7 @@ function validateNumberConstraint(plan, constraint, value) {
113868
113475
  case "numberType": return [];
113869
113476
  case "numberMin": return value < constraint.minimum ? [issue(plan, "tooSmall", { minimum: constraint.minimum })] : [];
113870
113477
  case "numberMax": return value > constraint.maximum ? [issue(plan, "tooLarge", { maximum: constraint.maximum })] : [];
113871
- default: return assertNever$5(constraint);
113478
+ default: return assertNever$3(constraint);
113872
113479
  }
113873
113480
  }
113874
113481
  function validateSelectPlan(plan, value) {
@@ -113890,7 +113497,7 @@ function validateRepeaterPlan(plan, value, ctx) {
113890
113497
  maximum: constraint.maximum,
113891
113498
  itemLabel: "item"
113892
113499
  })] : [];
113893
- default: return assertNever$5(constraint);
113500
+ default: return assertNever$3(constraint);
113894
113501
  }
113895
113502
  }), ...value.flatMap((item, index) => validateRepeaterItem(plan, item, index, ctx))];
113896
113503
  }
@@ -113981,7 +113588,7 @@ function rebaseFieldPlanPath(plan, fromPrefix, toPrefix) {
113981
113588
  ...plan,
113982
113589
  path
113983
113590
  };
113984
- default: return assertNever$5(plan);
113591
+ default: return assertNever$3(plan);
113985
113592
  }
113986
113593
  }
113987
113594
  function validateInlineTextPlan(plan, value) {
@@ -114028,7 +113635,7 @@ function fieldPlanToObjectPropertyZod(plan, options = {}) {
114028
113635
  switch (presence.kind) {
114029
113636
  case "required": return schema;
114030
113637
  case "optional": return schema.optional();
114031
- default: return assertNever$5(presence);
113638
+ default: return assertNever$3(presence);
114032
113639
  }
114033
113640
  }
114034
113641
  function addFieldIssueToZodContext(zodCtx, validationIssue, rootPath) {
@@ -114098,7 +113705,7 @@ function addFieldIssueToZodContext(zodCtx, validationIssue, rootPath) {
114098
113705
  message
114099
113706
  });
114100
113707
  return;
114101
- default: assertNever$5(validationIssue);
113708
+ default: assertNever$3(validationIssue);
114102
113709
  }
114103
113710
  }
114104
113711
  function relativeZodIssuePath(path, rootPath) {
@@ -114133,7 +113740,7 @@ function findNestedFieldValidationPlan(plan, path) {
114133
113740
  case "link":
114134
113741
  case "select":
114135
113742
  case "passthrough": return null;
114136
- default: return assertNever$5(plan);
113743
+ default: return assertNever$3(plan);
114137
113744
  }
114138
113745
  }
114139
113746
  function fieldValidationDescriptor(plan) {
@@ -114246,7 +113853,7 @@ function isEmptyRichTextDoc(value) {
114246
113853
  }
114247
113854
  //#endregion
114248
113855
  //#region ../block-form/src/manifest/utils.ts
114249
- function assertNever$4(value) {
113856
+ function assertNever$2(value) {
114250
113857
  throw new Error(`Unhandled manifest variant: ${JSON.stringify(value)}`);
114251
113858
  }
114252
113859
  function getGroupChildFields$1(field) {
@@ -114295,7 +113902,7 @@ function toManifestFieldInput(field) {
114295
113902
  case "contentTypeSelect":
114296
113903
  case "entryPicker": return field;
114297
113904
  }
114298
- return assertNever$4(field);
113905
+ return assertNever$2(field);
114299
113906
  }
114300
113907
  function numberFieldToManifestInput(field) {
114301
113908
  const ui = readNumberFieldUiConfig(field.ui);
@@ -119830,6 +119437,10 @@ const eventDetailsManifest = createBlockManifest({
119830
119437
  from: "$root.occurrenceContext",
119831
119438
  fallback: null
119832
119439
  } },
119440
+ subject: { $bind: {
119441
+ from: "$root.subject",
119442
+ fallback: null
119443
+ } },
119833
119444
  events: { $bind: { from: "data.eventDetailsData.events" } },
119834
119445
  showVenue: { $bind: { from: "content.showVenue" } },
119835
119446
  showMap: { $bind: { from: "content.showMap" } },
@@ -128065,7 +127676,7 @@ function sourceLabel(source) {
128065
127676
  case "managed-database": return "DB";
128066
127677
  case "sdk-synced": return "SDK-synced DB";
128067
127678
  case "sdk-config": return "SDK config";
128068
- default: return assertNever$9(source);
127679
+ default: return assertNever$6(source);
128069
127680
  }
128070
127681
  }
128071
127682
  function mergeBlockDescriptorsWithRegistry(systemBlocks, registry, onConflict) {
@@ -157650,7 +157261,7 @@ function shouldUseCanonicalSchema(field) {
157650
157261
  case "entryPicker":
157651
157262
  case "button": return false;
157652
157263
  }
157653
- return assertNever$4(field);
157264
+ return assertNever$2(field);
157654
157265
  }
157655
157266
  /**
157656
157267
  * Create validation schema from a block manifest
@@ -159209,14 +158820,14 @@ function planBlockSaveRevisionForOwner(owner, optimisticHash) {
159209
158820
  kind: "compareAndSet",
159210
158821
  optimisticHash
159211
158822
  } : { kind: "missingRequiredRevision" };
159212
- default: return assertNever$9(owner);
158823
+ default: return assertNever$6(owner);
159213
158824
  }
159214
158825
  }
159215
158826
  function optimisticHashForSave(revision) {
159216
158827
  switch (revision.kind) {
159217
158828
  case "bestEffort":
159218
158829
  case "compareAndSet": return revision.optimisticHash;
159219
- default: return assertNever$9(revision);
158830
+ default: return assertNever$6(revision);
159220
158831
  }
159221
158832
  }
159222
158833
  const MISSING_REQUIRED_BLOCK_REVISION = "This Page Content block is missing its current revision. Reload the editor and try again.";
@@ -160274,7 +159885,7 @@ function extractBlockData$1(content) {
160274
159885
  }
160275
159886
  //#endregion
160276
159887
  //#region ../content-editor/src/utils/assertNever.ts
160277
- function assertNever$3(value, message) {
159888
+ function assertNever$1(value, message) {
160278
159889
  throw new Error(message ?? `Unexpected value: ${String(value)}`);
160279
159890
  }
160280
159891
  //#endregion
@@ -160956,7 +160567,7 @@ function applyEditorCommand(snapshot, command) {
160956
160567
  for (const change of command.changes) nextSnapshot = applyEditorCommand(nextSnapshot, change);
160957
160568
  return nextSnapshot;
160958
160569
  }
160959
- default: return assertNever$3(command);
160570
+ default: return assertNever$1(command);
160960
160571
  }
160961
160572
  }
160962
160573
  function applyUserOperation(snapshot, operation) {
@@ -160990,7 +160601,7 @@ function applySystemOperation(snapshot, operation) {
160990
160601
  case "save-linked-entry-failed": return saveLinkedEntryFailed(snapshot, operation.entryId, operation.message);
160991
160602
  case "clear-linked-entry-error": return clearLinkedEntryError(snapshot, operation.entryId);
160992
160603
  case "replace-block-list": return replaceEditorBlockList(snapshot, operation.next);
160993
- default: return assertNever$3(operation);
160604
+ default: return assertNever$1(operation);
160994
160605
  }
160995
160606
  }
160996
160607
  function hydrateMetadataSnapshot(snapshot, baseline, current, published) {
@@ -161400,7 +161011,7 @@ function getFirstUnpublishedDraftChange(snapshot) {
161400
161011
  currentContent: publicationState.current,
161401
161012
  publishedContent: publicationState.published
161402
161013
  };
161403
- default: return assertNever$3(publicationState);
161014
+ default: return assertNever$1(publicationState);
161404
161015
  }
161405
161016
  }
161406
161017
  return null;
@@ -162311,7 +161922,7 @@ function previewEditorOpenDestination(current, intent, requestId) {
162311
161922
  },
162312
161923
  previewDesignOpenRequest: null
162313
161924
  };
162314
- default: return assertNever$3(intent, "Unhandled preview editor open intent");
161925
+ default: return assertNever$1(intent, "Unhandled preview editor open intent");
162315
161926
  }
162316
161927
  }
162317
161928
  const EditorUiStoreContext = createContext(null);
@@ -163784,7 +163395,7 @@ function blockEditorOwnerKey(owner) {
163784
163395
  case "page": return `page:${owner.pageId}`;
163785
163396
  case "entry-slot": return `entry-slot:${owner.type}:${owner.entryId}:${owner.slotKey}`;
163786
163397
  case "surface-slot": return `surface-slot:${owner.pageSurfaceId}:${owner.slotKey}`;
163787
- default: return assertNever$9(owner);
163398
+ default: return assertNever$6(owner);
163788
163399
  }
163789
163400
  }
163790
163401
  async function createEditableBlockForOwner(apiClient, siteId, owner, input) {
@@ -163815,7 +163426,7 @@ async function createEditableBlockForOwner(apiClient, siteId, owner, input) {
163815
163426
  purpose: input.purpose,
163816
163427
  expectedCompositionHash: owner.compositionHash
163817
163428
  });
163818
- default: return assertNever$9(owner);
163429
+ default: return assertNever$6(owner);
163819
163430
  }
163820
163431
  }
163821
163432
  async function reorderEditableBlocksForOwner(apiClient, siteId, owner, blockIds) {
@@ -163839,7 +163450,7 @@ async function reorderEditableBlocksForOwner(apiClient, siteId, owner, blockIds)
163839
163450
  blockIds,
163840
163451
  expectedCompositionHash: owner.compositionHash
163841
163452
  });
163842
- default: return assertNever$9(owner);
163453
+ default: return assertNever$6(owner);
163843
163454
  }
163844
163455
  }
163845
163456
  async function deleteEditableBlockForOwner(apiClient, siteId, owner, blockId) {
@@ -163863,7 +163474,7 @@ async function deleteEditableBlockForOwner(apiClient, siteId, owner, blockId) {
163863
163474
  blockId,
163864
163475
  expectedCompositionHash: owner.compositionHash
163865
163476
  });
163866
- default: return assertNever$9(owner);
163477
+ default: return assertNever$6(owner);
163867
163478
  }
163868
163479
  }
163869
163480
  function surfaceCompositionHashFromResponse(response) {
@@ -164536,7 +164147,7 @@ function getFeatureCardGeneratedIconStyleSummary(content, currentStyleGuideVersi
164536
164147
  case "invalid_generated":
164537
164148
  invalidGeneratedCount += 1;
164538
164149
  break;
164539
- default: assertNever$9(state);
164150
+ default: assertNever$6(state);
164540
164151
  }
164541
164152
  }
164542
164153
  return {
@@ -164598,7 +164209,7 @@ function applyGeneratedFeatureCardIconSet({ blockId, content, drafts, assets })
164598
164209
  reason: plan.kind,
164599
164210
  cardKey: plan.cardKey
164600
164211
  };
164601
- default: assertNever$9(plan);
164212
+ default: assertNever$6(plan);
164602
164213
  }
164603
164214
  for (const appliedIcon of plan.appliedIcons) drafts.setAtPath(blockId, `cards.${appliedIcon.cardIndex}.icon`, appliedIcon.iconValue);
164604
164215
  return {
@@ -165545,7 +165156,7 @@ function deriveCustomizeAction({ actionPresentation, blockId, settingsAvailable
165545
165156
  presentation: "external",
165546
165157
  blockId
165547
165158
  } : null;
165548
- default: return assertNever$9(actionPresentation.customize);
165159
+ default: return assertNever$6(actionPresentation.customize);
165549
165160
  }
165550
165161
  }
165551
165162
  function deriveIconActions({ featureCardIconActionsAvailable, generatedIconSetActionsAvailable, hasStaleGeneratedIcons, featureCardIconDialogCardsCount }) {
@@ -165812,7 +165423,7 @@ function menuActionIcon(action) {
165812
165423
  case "generated-icon-set": return action.stale ? /* @__PURE__ */ jsx(RotateCcw, { className: "mr-2 h-4 w-4" }) : /* @__PURE__ */ jsx(ImagePlus, { className: "mr-2 h-4 w-4" });
165813
165424
  case "duplicate": return /* @__PURE__ */ jsx(Copy, { className: "mr-2 h-4 w-4" });
165814
165425
  case "delete": return /* @__PURE__ */ jsx(Trash2, { className: "mr-2 h-4 w-4" });
165815
- default: return assertNever$9(action);
165426
+ default: return assertNever$6(action);
165816
165427
  }
165817
165428
  }
165818
165429
  function menuActionLabel(action) {
@@ -165821,7 +165432,7 @@ function menuActionLabel(action) {
165821
165432
  case "generated-icon-set": return "Manage icons";
165822
165433
  case "duplicate": return "Duplicate";
165823
165434
  case "delete": return "Delete";
165824
- default: return assertNever$9(action);
165435
+ default: return assertNever$6(action);
165825
165436
  }
165826
165437
  }
165827
165438
  //#endregion
@@ -189950,7 +189561,7 @@ function formatOrderMode(state) {
189950
189561
  case "custom": return "Custom order";
189951
189562
  case "legacyInferred": return "Using saved order";
189952
189563
  case "default": return "Following site offering order";
189953
- default: assertNever$9(state);
189564
+ default: assertNever$6(state);
189954
189565
  }
189955
189566
  }
189956
189567
  function siblingPath(path, siblingId) {
@@ -190167,7 +189778,7 @@ async function loadSiteOptionItemsFromApi({ apiClient, siteId, source }) {
190167
189778
  endpoint: "listAppointmentResources",
190168
189779
  params: { siteId }
190169
189780
  })));
190170
- default: return assertNever$9(source);
189781
+ default: return assertNever$6(source);
190171
189782
  }
190172
189783
  }
190173
189784
  function createSiteOptionApiLoader(apiClient) {
@@ -190341,7 +189952,7 @@ function toDrainFailure(effect, error) {
190341
189952
  kind: effect.type,
190342
189953
  message
190343
189954
  };
190344
- default: return assertNever$3(effect);
189955
+ default: return assertNever$1(effect);
190345
189956
  }
190346
189957
  }
190347
189958
  async function drainEditorEffect(effect, context) {
@@ -190349,7 +189960,7 @@ async function drainEditorEffect(effect, context) {
190349
189960
  case "persist-reorder": return drainPersistReorderEffect(effect, context);
190350
189961
  case "persist-insert": return drainPersistInsertEffect(effect, context);
190351
189962
  case "persist-remove": return drainPersistRemoveEffect(effect, context);
190352
- default: return assertNever$3(effect);
189963
+ default: return assertNever$1(effect);
190353
189964
  }
190354
189965
  }
190355
189966
  async function drainEditorEffects(effects, context) {
@@ -191629,7 +191240,7 @@ function footerModuleLabel(section) {
191629
191240
  case "social-links": return "Social links";
191630
191241
  case "supporting-text": return "Supporting text";
191631
191242
  case "legal": return "Legal text";
191632
- default: return assertNever$9(section);
191243
+ default: return assertNever$6(section);
191633
191244
  }
191634
191245
  }
191635
191246
  function sourceFor(section) {
@@ -191672,7 +191283,7 @@ function sourceFor(section) {
191672
191283
  kind: "footer-local",
191673
191284
  description: "Footer-specific content"
191674
191285
  };
191675
- default: return assertNever$9(section);
191286
+ default: return assertNever$6(section);
191676
191287
  }
191677
191288
  }
191678
191289
  function sourceAvailability(input) {
@@ -192744,7 +192355,7 @@ function deriveStagedSessionCapabilities(state) {
192744
192355
  isApplyingStaged: false,
192745
192356
  requiresReload: true
192746
192357
  };
192747
- default: return assertNever$2(state, "Unhandled editor staged session state");
192358
+ default: return assertNever(state, "Unhandled editor staged session state");
192748
192359
  }
192749
192360
  }
192750
192361
  function beginStagedSession(state, transaction) {
@@ -192757,7 +192368,7 @@ function beginStagedSession(state, transaction) {
192757
192368
  };
192758
192369
  case "applying":
192759
192370
  case "stale": return state;
192760
- default: return assertNever$2(state, "Unhandled editor staged session state");
192371
+ default: return assertNever(state, "Unhandled editor staged session state");
192761
192372
  }
192762
192373
  }
192763
192374
  function applyStagedSession(state) {
@@ -192770,7 +192381,7 @@ function applyStagedSession(state) {
192770
192381
  case "idle":
192771
192382
  case "applying":
192772
192383
  case "stale": return state;
192773
- default: return assertNever$2(state, "Unhandled editor staged session state");
192384
+ default: return assertNever(state, "Unhandled editor staged session state");
192774
192385
  }
192775
192386
  }
192776
192387
  function confirmStagedSession(state) {
@@ -192795,7 +192406,7 @@ function cancelStagedSession(state) {
192795
192406
  case "stale": return { kind: "idle" };
192796
192407
  case "idle":
192797
192408
  case "applying": return state;
192798
- default: return assertNever$2(state, "Unhandled editor staged session state");
192409
+ default: return assertNever(state, "Unhandled editor staged session state");
192799
192410
  }
192800
192411
  }
192801
192412
  function enqueueTransaction(state, transaction) {
@@ -192817,7 +192428,7 @@ function enqueueTransaction(state, transaction) {
192817
192428
  transactions: coalesceQueuedTransactions(state.transactions, transaction)
192818
192429
  };
192819
192430
  case "stale": return state;
192820
- default: return assertNever$2(state, "Unhandled editor transaction queue state");
192431
+ default: return assertNever(state, "Unhandled editor transaction queue state");
192821
192432
  }
192822
192433
  }
192823
192434
  function beginAutosaveBatch(state) {
@@ -192831,7 +192442,7 @@ function beginAutosaveBatch(state) {
192831
192442
  case "idle":
192832
192443
  case "saving":
192833
192444
  case "stale": return state;
192834
- default: return assertNever$2(state, "Unhandled editor transaction queue state");
192445
+ default: return assertNever(state, "Unhandled editor transaction queue state");
192835
192446
  }
192836
192447
  }
192837
192448
  function confirmAutosaveBatch(state) {
@@ -192860,7 +192471,7 @@ function coalesceQueuedTransactions(queue, transaction) {
192860
192471
  function mergeBatchAndFollowUpTransactions(batch, followUp) {
192861
192472
  return followUp.reduce((transactions, transaction) => coalesceQueuedTransactions(transactions, transaction), batch);
192862
192473
  }
192863
- function assertNever$2(value, message) {
192474
+ function assertNever(value, message) {
192864
192475
  throw new Error(`${message}: ${JSON.stringify(value)}`);
192865
192476
  }
192866
192477
  //#endregion
@@ -192885,22 +192496,10 @@ function createStyleConfiguratorState(base) {
192885
192496
  saveStatus: { kind: "idle" },
192886
192497
  warnings: [],
192887
192498
  notices: [],
192888
- stalePaletteConflict: null,
192889
192499
  expandedRow: null,
192890
192500
  stagedSession: idleEditorStagedSessionState()
192891
192501
  };
192892
192502
  }
192893
- function paletteMutationCapability(state) {
192894
- if (state.previewed.palette.kind === "invalid") return {
192895
- kind: "blocked",
192896
- reason: "invalid-palette",
192897
- message: "Choose a palette below to repair this site’s saved palette."
192898
- };
192899
- return { kind: "editable" };
192900
- }
192901
- function editablePaletteEditor(state) {
192902
- return state.previewed.palette.kind === "available" ? state.previewed.palette.editor : null;
192903
- }
192904
192503
  function openRow(state, row) {
192905
192504
  return state.expandedRow === row ? state : {
192906
192505
  ...state,
@@ -192916,12 +192515,7 @@ function isPreviewingChange(state) {
192916
192515
  return !selectionSnapshotsEqual(state.base, state.previewed);
192917
192516
  }
192918
192517
  function deriveStyleConfiguratorCapabilities(state) {
192919
- const staged = deriveStagedSessionCapabilities(state.stagedSession);
192920
- return state.previewed.palette.kind === "invalid" ? {
192921
- ...staged,
192922
- canPreviewStaged: false,
192923
- canApplyStaged: false
192924
- } : staged;
192518
+ return deriveStagedSessionCapabilities(state.stagedSession);
192925
192519
  }
192926
192520
  function styleConfiguratorHistoryEntryForPersistedSelection(state, persisted) {
192927
192521
  if (state.stagedSession.kind === "idle") return null;
@@ -192979,84 +192573,27 @@ function resetTypographyToSaved(state) {
192979
192573
  function previewCuratedPalette(state, valueKey) {
192980
192574
  const palette = findCuratedPalette(valueKey);
192981
192575
  if (!palette) return state;
192982
- const resolved = resolvedCuratedPaletteSelection(palette);
192983
- const editor = editablePaletteEditor(state);
192984
- return withPreviewedSelection(state, {
192985
- ...state.previewed,
192986
- palette: {
192987
- kind: "available",
192988
- editor: editor ? reducePaletteEditorState(editor, {
192989
- kind: "select",
192990
- resolved
192991
- }) : {
192992
- committed: resolved,
192993
- preview: {
192994
- kind: "selected",
192995
- resolved
192996
- }
192997
- }
192998
- }
192999
- });
193000
- }
193001
- function previewSitePalette(state, palette) {
193002
- const resolved = resolvedSitePaletteSelectionFromPreview({
193003
- paletteId: palette.paletteId,
193004
- colors: palette.colors,
193005
- mode: palette.mode,
193006
- version: palette.version
193007
- });
193008
- const editor = editablePaletteEditor(state);
193009
192576
  return withPreviewedSelection(state, {
193010
192577
  ...state.previewed,
193011
- palette: {
193012
- kind: "available",
193013
- editor: editor ? reducePaletteEditorState(editor, {
193014
- kind: "select",
193015
- resolved
193016
- }) : {
193017
- committed: resolved,
193018
- preview: {
193019
- kind: "selected",
193020
- resolved
193021
- }
193022
- }
193023
- }
193024
- });
193025
- }
193026
- /** Starts a manual palette from the active complete palette, never sparse overrides. */
193027
- function createPalette(state) {
193028
- const editor = editablePaletteEditor(state);
193029
- if (!editor) return state;
193030
- return withPreviewedSelection(state, {
193031
- ...state.previewed,
193032
- palette: {
193033
- kind: "available",
193034
- editor: reducePaletteEditorState(editor, { kind: "create" })
193035
- }
192578
+ palette: concretePaletteToTheme(palette)
193036
192579
  });
193037
192580
  }
193038
192581
  function setPaletteColors(state, colors) {
193039
- const editor = editablePaletteEditor(state);
193040
- if (!editor) return state;
193041
- const preview = completePaletteEditorPreview(editor);
192582
+ const palette = concretePaletteFromTheme(state.previewed.palette);
193042
192583
  return withPreviewedSelection(state, {
193043
192584
  ...state.previewed,
193044
- palette: {
193045
- kind: "available",
193046
- editor: reducePaletteEditorState(editor, {
193047
- kind: "edit",
193048
- colors,
193049
- mode: preview.mode
193050
- })
193051
- }
192585
+ palette: concretePaletteToTheme({
192586
+ colors,
192587
+ mode: palette.mode
192588
+ })
193052
192589
  });
193053
192590
  }
193054
192591
  /**
193055
192592
  * Records the post-compile resolved selection + any fallback warnings.
193056
192593
  * Used after `compileSiteThemeFromSelections` runs against a new site style:
193057
- * the resolver may have auto-picked a different button style if the user's
193058
- * previous selection is not offered for the new style, or a different palette
193059
- * if the persisted palette value key is no longer known.
192594
+ * the resolver may have auto-picked a different button style or chrome look
192595
+ * when the user's previous selection is not offered for the new style. The
192596
+ * concrete palette is carried independently in the compiled Theme.
193060
192597
  *
193061
192598
  */
193062
192599
  function applyResolvedSelections(state, input) {
@@ -193081,7 +192618,6 @@ function cancelPreview(state) {
193081
192618
  saveStatus: { kind: "idle" },
193082
192619
  warnings: [],
193083
192620
  notices: [],
193084
- stalePaletteConflict: null,
193085
192621
  stagedSession
193086
192622
  };
193087
192623
  }
@@ -193100,7 +192636,6 @@ function markApplySaved(state, persisted) {
193100
192636
  saveStatus: { kind: "saved" },
193101
192637
  warnings: [],
193102
192638
  notices: [],
193103
- stalePaletteConflict: null,
193104
192639
  stagedSession: confirmStagedSession(applyStagedSession(state.stagedSession))
193105
192640
  };
193106
192641
  }
@@ -193118,76 +192653,6 @@ function markApplyFailed(state, message, failureKind = "retryable") {
193118
192653
  })
193119
192654
  };
193120
192655
  }
193121
- /** Advances a stale site's CAS token only for the user's explicit retry. */
193122
- function prepareStalePaletteRetry(state, input) {
193123
- if (state.saveStatus.kind !== "failed" || state.saveStatus.failureKind !== "stale") return state;
193124
- const conflict = state.stalePaletteConflict;
193125
- if (conflict) {
193126
- if (!input) return state;
193127
- const base = committedPaletteForSnapshot(state.base.palette);
193128
- if (!base) return state;
193129
- const original = paletteSnapshotForLibraryActive({
193130
- kind: "site",
193131
- paletteId: conflict.originalPaletteId
193132
- }, input.sitePalettes);
193133
- const palette = original?.kind === "site" ? {
193134
- kind: "available",
193135
- editor: {
193136
- committed: original,
193137
- preview: {
193138
- kind: "edited-site",
193139
- ...conflict.localDraft,
193140
- expectedVersion: original.version
193141
- }
193142
- }
193143
- } : {
193144
- kind: "available",
193145
- editor: {
193146
- committed: base,
193147
- preview: {
193148
- kind: "new-site",
193149
- colors: conflict.localDraft.colors,
193150
- mode: conflict.localDraft.mode
193151
- }
193152
- }
193153
- };
193154
- const previewed = {
193155
- ...state.previewed,
193156
- palette
193157
- };
193158
- return {
193159
- ...state,
193160
- saveStatus: { kind: "idle" },
193161
- stalePaletteConflict: null,
193162
- previewed,
193163
- stagedSession: ensureStagedSessionForPreview(idleEditorStagedSessionState(), state.base, previewed)
193164
- };
193165
- }
193166
- const base = committedPaletteForSnapshot(state.base.palette);
193167
- const palette = state.previewed.palette;
193168
- if (!base || base.kind !== "site" || palette.kind !== "available" || palette.editor.preview.kind !== "edited-site" || palette.editor.preview.paletteId !== base.selection.paletteId) return state;
193169
- const previewed = {
193170
- ...state.previewed,
193171
- palette: {
193172
- kind: "available",
193173
- editor: {
193174
- ...palette.editor,
193175
- committed: base,
193176
- preview: {
193177
- ...palette.editor.preview,
193178
- expectedVersion: base.version
193179
- }
193180
- }
193181
- }
193182
- };
193183
- return {
193184
- ...state,
193185
- saveStatus: { kind: "idle" },
193186
- stalePaletteConflict: null,
193187
- previewed,
193188
- stagedSession: ensureStagedSessionForPreview(idleEditorStagedSessionState(), state.base, previewed)
193189
- };
193190
- }
193191
192656
  function toggleRow(state, row) {
193192
192657
  return {
193193
192658
  ...state,
@@ -193214,21 +192679,8 @@ function syncStyleConfiguratorState(state, base) {
193214
192679
  saveStatus: state.saveStatus.kind === "saving" ? { kind: "saved" } : state.saveStatus,
193215
192680
  warnings: [],
193216
192681
  notices: [],
193217
- stalePaletteConflict: null,
193218
192682
  stagedSession: idleEditorStagedSessionState()
193219
192683
  };
193220
- const paletteConflict = staleActivePaletteConflict(state, base);
193221
- if (paletteConflict) return stateWithStalePaletteConflict(state, base, paletteConflict);
193222
- const rebasedPreview = rebaseSitePaletteDraft(state.previewed, base);
193223
- if (rebasedPreview) return {
193224
- ...state,
193225
- base,
193226
- previewed: rebasedPreview,
193227
- warnings: [],
193228
- notices: [],
193229
- stalePaletteConflict: null,
193230
- stagedSession: ensureStagedSessionForPreview(state.stagedSession, base, rebasedPreview)
193231
- };
193232
192684
  return {
193233
192685
  ...state,
193234
192686
  base,
@@ -193236,130 +192688,9 @@ function syncStyleConfiguratorState(state, base) {
193236
192688
  saveStatus: { kind: "idle" },
193237
192689
  warnings: [],
193238
192690
  notices: [],
193239
- stalePaletteConflict: null,
193240
192691
  stagedSession: idleEditorStagedSessionState()
193241
192692
  };
193242
192693
  }
193243
- /** Reconciles typed palette-library authority with the editor's saved base. */
193244
- function reconcilePaletteLibraryActive(state, active, sitePalettes) {
193245
- if (active.kind === "invalid") return state;
193246
- const committedPalette = paletteSnapshotForLibraryActive(active.selection, sitePalettes);
193247
- if (!committedPalette) return state;
193248
- return rebasePaletteLibraryAuthority(state, committedPalette);
193249
- }
193250
- /**
193251
- * A palette-library response only refreshes palette authority. Unlike a full
193252
- * server snapshot, it must never discard the user's staged site-style work.
193253
- * Site drafts keep their complete local colours/mode and rebase their expected
193254
- * version when the same palette was changed elsewhere.
193255
- */
193256
- function rebasePaletteLibraryAuthority(state, committedPalette) {
193257
- const committed = committedPaletteForSnapshot(state.base.palette);
193258
- if (committed && resolvedPalettesEqual(committed, committedPalette)) return state;
193259
- const base = {
193260
- ...state.base,
193261
- palette: {
193262
- kind: "available",
193263
- editor: createPaletteEditorState(committedPalette)
193264
- }
193265
- };
193266
- const paletteConflict = staleActivePaletteConflict(state, base);
193267
- if (paletteConflict) return stateWithStalePaletteConflict(state, base, paletteConflict);
193268
- const previewed = {
193269
- ...state.previewed,
193270
- palette: rebasePaletteEditorAuthority(state.previewed.palette, committedPalette)
193271
- };
193272
- return {
193273
- ...state,
193274
- base,
193275
- previewed,
193276
- stagedSession: ensureStagedSessionForPreview(state.stagedSession, base, previewed)
193277
- };
193278
- }
193279
- function staleActivePaletteConflict(state, refreshedBase) {
193280
- const saved = committedPaletteForSnapshot(state.base.palette);
193281
- const refreshed = committedPaletteForSnapshot(refreshedBase.palette);
193282
- const local = state.previewed.palette;
193283
- if (saved?.kind !== "site" || !refreshed || samePaletteIdentity(saved, refreshed) || local.kind !== "available" || local.editor.preview.kind !== "edited-site" || local.editor.preview.paletteId !== saved.selection.paletteId) return null;
193284
- return {
193285
- kind: "active-palette-changed",
193286
- originalPaletteId: saved.selection.paletteId,
193287
- localDraft: local.editor.preview
193288
- };
193289
- }
193290
- function stateWithStalePaletteConflict(state, base, stalePaletteConflict) {
193291
- const previewed = {
193292
- ...base,
193293
- palette: state.previewed.palette
193294
- };
193295
- const message = "The active palette changed elsewhere. Your palette draft is still here.";
193296
- return {
193297
- ...state,
193298
- base,
193299
- previewed,
193300
- saveStatus: {
193301
- kind: "failed",
193302
- message,
193303
- failureKind: "stale"
193304
- },
193305
- warnings: [],
193306
- notices: [],
193307
- stalePaletteConflict,
193308
- stagedSession: rejectStagedSession(ensureApplyingStagedSessionForPreview(state.stagedSession, base, previewed), {
193309
- kind: "stale",
193310
- message
193311
- })
193312
- };
193313
- }
193314
- function paletteSnapshotForLibraryActive(selection, sitePalettes) {
193315
- if (selection.kind === "curated") {
193316
- const curated = findCuratedPalette(selection.valueKey);
193317
- return curated ? resolvedCuratedPaletteSelection(curated) : null;
193318
- }
193319
- const palette = sitePalettes.find((candidate) => candidate.id === selection.paletteId);
193320
- return palette ? resolvedSitePaletteSelectionFromPreview({
193321
- paletteId: palette.id,
193322
- colors: palette.colors,
193323
- mode: palette.mode,
193324
- version: palette.version
193325
- }) : null;
193326
- }
193327
- function rebaseSitePaletteDraft(previewed, refreshedBase) {
193328
- const local = previewed.palette;
193329
- const saved = committedPaletteForSnapshot(refreshedBase.palette);
193330
- if (local.kind !== "available" || !saved || saved.kind !== "site" || local.editor.preview.kind !== "edited-site" || local.editor.preview.paletteId !== saved.selection.paletteId) return null;
193331
- return {
193332
- ...refreshedBase,
193333
- palette: rebasePaletteEditorAuthority(local, saved)
193334
- };
193335
- }
193336
- /**
193337
- * Refresh changes server authority, never the local draft. This is a narrow
193338
- * adapter over the core editor ADT rather than a second palette transition
193339
- * machine: all user actions and command planning still run through core.
193340
- */
193341
- function rebasePaletteEditorAuthority(palette, committed) {
193342
- if (palette.kind === "invalid") return palette;
193343
- const editor = palette.editor;
193344
- if (editor.preview.kind === "clean") return {
193345
- kind: "available",
193346
- editor: createPaletteEditorState(committed)
193347
- };
193348
- if (editor.preview.kind === "edited-site" && committed.kind === "site" && editor.preview.paletteId === committed.selection.paletteId) return {
193349
- kind: "available",
193350
- editor: {
193351
- committed,
193352
- preview: editor.preview
193353
- }
193354
- };
193355
- return {
193356
- kind: "available",
193357
- editor: {
193358
- ...editor,
193359
- committed
193360
- }
193361
- };
193362
- }
193363
192694
  function previewHeaderSelection(state, selection) {
193364
192695
  const headerStyleId = deriveNearestCompatibleHeaderStyle(selection.headerStyleId, selection.headerLayoutId);
193365
192696
  const headerLookId = findLegacyHeaderLookIdForSelection({
@@ -193374,7 +192705,6 @@ function previewHeaderSelection(state, selection) {
193374
192705
  });
193375
192706
  }
193376
192707
  function withPreviewedSelection(state, previewed) {
193377
- if (state.previewed.palette.kind === "invalid" && previewed.palette.kind === "invalid") return state;
193378
192708
  return {
193379
192709
  ...state,
193380
192710
  previewed,
@@ -193405,7 +192735,7 @@ function createStyleConfiguratorHistoryEntry(previous, next) {
193405
192735
  };
193406
192736
  }
193407
192737
  function selectionSnapshotsEqual(a, b) {
193408
- return a.siteStyleId === b.siteStyleId && a.selectionVersion === b.selectionVersion && a.selectionUpdatedAt === b.selectionUpdatedAt && a.headerLayoutId === b.headerLayoutId && a.headerStyleId === b.headerStyleId && a.headerLookId === b.headerLookId && a.footerLookId === b.footerLookId && buttonStyleSelectionsEqual(a.buttonStyleSelection, b.buttonStyleSelection) && paletteSelectionSnapshotsEqual(a.palette, b.palette) && typographyObjectsEqual(a.typography, b.typography);
192738
+ return a.siteStyleId === b.siteStyleId && a.selectionVersion === b.selectionVersion && a.selectionUpdatedAt === b.selectionUpdatedAt && a.headerLayoutId === b.headerLayoutId && a.headerStyleId === b.headerStyleId && a.headerLookId === b.headerLookId && a.footerLookId === b.footerLookId && buttonStyleSelectionsEqual(a.buttonStyleSelection, b.buttonStyleSelection) && themePalettesEqual(a.palette, b.palette) && typographyObjectsEqual(a.typography, b.typography);
193409
192739
  }
193410
192740
  function patchTypography(typography, patch) {
193411
192741
  switch (patch.kind) {
@@ -193449,121 +192779,13 @@ function proseLinkStylesEqual(a, b) {
193449
192779
  if (a === void 0 || b === void 0) return a === b;
193450
192780
  return a.colorToken === b.colorToken && a.hoverColorToken === b.hoverColorToken && a.underline === b.underline && a.decorationColorToken === b.decorationColorToken && a.hoverDecorationColorToken === b.hoverDecorationColorToken && a.underlineStyle === b.underlineStyle && a.underlineThickness === b.underlineThickness && a.underlineOffset === b.underlineOffset;
193451
192781
  }
193452
- function paletteSelectionSnapshotFromRuntime(runtime) {
193453
- if (runtime.kind === "invalid") return {
193454
- kind: "invalid",
193455
- reason: runtime.reason
193456
- };
193457
- switch (runtime.authority) {
193458
- case "curated": {
193459
- const palette = findCuratedPalette(runtime.selection.valueKey);
193460
- if (!palette) return {
193461
- kind: "invalid",
193462
- reason: "runtime-curated-palette-missing"
193463
- };
193464
- return {
193465
- kind: "available",
193466
- editor: createPaletteEditorState(resolvedCuratedPaletteSelection(palette))
193467
- };
193468
- }
193469
- case "site": return {
193470
- kind: "available",
193471
- editor: createPaletteEditorState(resolvedSitePaletteSelectionFromPreview({
193472
- paletteId: runtime.selection.paletteId,
193473
- colors: runtime.colors,
193474
- mode: runtime.mode,
193475
- version: runtime.sitePaletteVersion
193476
- }))
193477
- };
193478
- default: return assertNever$1(runtime);
193479
- }
193480
- }
193481
- function assertNever$1(value) {
193482
- throw new Error(`Unhandled runtime palette state: ${JSON.stringify(value)}`);
193483
- }
193484
- function paletteSelectionSnapshotsEqual(left, right) {
193485
- if (left.kind !== right.kind) return false;
193486
- if (left.kind === "invalid" && right.kind === "invalid") return left.reason === right.reason;
193487
- if (left.kind === "invalid" || right.kind === "invalid") return false;
193488
- return paletteEditorStatesEqual(left.editor, right.editor);
193489
- }
193490
192782
  function palettePreviewProjection(palette) {
193491
- if (palette.kind === "invalid") return palette;
193492
- const preview = completePaletteEditorPreview(palette.editor);
193493
- switch (preview.kind) {
193494
- case "selected": return preview.selection.kind === "curated" ? {
193495
- kind: "curated",
193496
- valueKey: preview.selection.valueKey,
193497
- colors: preview.colors,
193498
- mode: preview.mode
193499
- } : preview.version === null ? (() => {
193500
- throw new Error("A selected site palette requires a version");
193501
- })() : {
193502
- kind: "site",
193503
- paletteId: preview.selection.paletteId,
193504
- colors: preview.colors,
193505
- mode: preview.mode,
193506
- version: preview.version
193507
- };
193508
- case "edited-curated": return {
193509
- kind: "curated-fork",
193510
- sourceValueKey: preview.sourceValueKey,
193511
- colors: preview.colors,
193512
- mode: preview.mode
193513
- };
193514
- case "edited-site": return {
193515
- kind: "site",
193516
- paletteId: preview.selection.paletteId,
193517
- colors: preview.colors,
193518
- mode: preview.mode,
193519
- version: preview.expectedVersion
193520
- };
193521
- case "new-site": return preview;
193522
- default: return assertNever$1(preview);
193523
- }
193524
- }
193525
- function committedPaletteForSnapshot(palette) {
193526
- return palette.kind === "available" ? palette.editor.committed : null;
193527
- }
193528
- function paletteEditorStatesEqual(left, right) {
193529
- return resolvedPalettesEqual(left.committed, right.committed) && paletteCommandsEqual(planPaletteCommand(left), planPaletteCommand(right)) && palettePreviewProjectionsEqual(palettePreviewProjection({
193530
- kind: "available",
193531
- editor: left
193532
- }), palettePreviewProjection({
193533
- kind: "available",
193534
- editor: right
193535
- }));
193536
- }
193537
- function resolvedPalettesEqual(left, right) {
193538
- return paletteSelectionsEqual(left.selection, right.selection) && paletteColorsEqual(left.colors, right.colors) && left.mode === right.mode && (left.kind !== "site" || right.kind !== "site" || left.version === right.version);
193539
- }
193540
- function samePaletteIdentity(left, right) {
193541
- return paletteSelectionsEqual(left.selection, right.selection);
193542
- }
193543
- function paletteSelectionsEqual(left, right) {
193544
- if (left.kind !== right.kind) return false;
193545
- if (left.kind === "curated" && right.kind === "curated") return left.valueKey === right.valueKey;
193546
- if (left.kind === "site" && right.kind === "site") return left.paletteId === right.paletteId;
193547
- return false;
193548
- }
193549
- function paletteCommandsEqual(left, right) {
193550
- if (left.kind !== right.kind) return false;
193551
- switch (left.kind) {
193552
- case "preserve": return true;
193553
- case "select": return right.kind === "select" && paletteSelectionsEqual(left.selection, right.selection);
193554
- case "update-site": return right.kind === "update-site" && left.paletteId === right.paletteId && left.expectedVersion === right.expectedVersion && left.mode === right.mode && paletteColorsEqual(left.colors, right.colors);
193555
- case "create-site": return right.kind === "create-site" && left.mode === right.mode && paletteColorsEqual(left.colors, right.colors) && left.origin.kind === right.origin.kind && (left.origin.kind !== "curated-fork" || right.origin.kind === "curated-fork" && left.origin.sourceValueKey === right.origin.sourceValueKey);
193556
- default: return assertNever$1(left);
193557
- }
193558
- }
193559
- function palettePreviewProjectionsEqual(left, right) {
193560
- if (left.kind !== right.kind) return false;
193561
- if (left.kind === "invalid" && right.kind === "invalid") return left.reason === right.reason;
193562
- if (left.kind === "new-site" && right.kind === "new-site") return left.mode === right.mode && paletteColorsEqual(left.colors, right.colors);
193563
- if (left.kind === "curated" && right.kind === "curated") return left.valueKey === right.valueKey && left.mode === right.mode && paletteColorsEqual(left.colors, right.colors);
193564
- if (left.kind === "curated-fork" && right.kind === "curated-fork") return left.sourceValueKey === right.sourceValueKey && left.mode === right.mode && paletteColorsEqual(left.colors, right.colors);
193565
- if (left.kind === "site" && right.kind === "site") return left.paletteId === right.paletteId && left.version === right.version && left.mode === right.mode && paletteColorsEqual(left.colors, right.colors);
193566
- return false;
192783
+ const concrete = concretePaletteFromTheme(palette);
192784
+ return {
192785
+ curatedValueKey: curatedPalettes.find((candidate) => concretePalettesEqual(concrete, candidate))?.valueKey ?? null,
192786
+ colors: concrete.colors,
192787
+ mode: concrete.mode
192788
+ };
193567
192789
  }
193568
192790
  //#endregion
193569
192791
  //#region ../preview-next/src/client/preview/previewDesignCoordinator.ts
@@ -193624,7 +192846,7 @@ function transitionPreviewDesignState(state, command) {
193624
192846
  ...state,
193625
192847
  apply: "idle"
193626
192848
  }, { kind: "none" });
193627
- default: return assertNever$8(command, "Unhandled preview design command");
192849
+ default: return assertNever$5(command, "Unhandled preview design command");
193628
192850
  }
193629
192851
  }
193630
192852
  function acceptPreview(current, next, effect) {
@@ -193866,7 +193088,7 @@ function PreviewDesignCoordinatorProvider({ children }) {
193866
193088
  case "set-theme":
193867
193089
  setOverrideTheme(transition.effect.theme, { source: transition.effect.source });
193868
193090
  break;
193869
- default: assertNever$8(transition.effect, "Unhandled preview design overlay effect");
193091
+ default: assertNever$5(transition.effect, "Unhandled preview design overlay effect");
193870
193092
  }
193871
193093
  }
193872
193094
  return transition;
@@ -193938,152 +193160,13 @@ function usePreviewDesignCoordinator() {
193938
193160
  return ctx;
193939
193161
  }
193940
193162
  //#endregion
193941
- //#region ../preview-next/src/client/preview/siteStylePreviewPlanner.ts
193942
- function deriveSiteStylePreviewUpdate(baseTheme, baseSelection) {
193943
- return {
193944
- kind: "derive-update",
193945
- baseTheme,
193946
- baseSelection
193947
- };
193948
- }
193949
- function planSiteStylePreviewChange(input) {
193950
- const resolvedPalette = resolvedPaletteForPreview(input.selection.palette, input.siteStyle);
193951
- const compiled = compileSiteThemeFromSelections({
193952
- siteStyle: input.siteStyle,
193953
- buttonStyleSelection: input.selection.buttonStyleSelection,
193954
- resolvedPalette,
193955
- typography: input.selection.typography,
193956
- compilationPlan: compilationPlanForPreview(input)
193957
- });
193958
- return {
193959
- themeOverlay: compiled.theme,
193960
- resolvedSelections: {
193961
- ...compiled.resolvedSelections,
193962
- headerLayoutId: compiled.resolvedSelections.headerLayoutId ?? input.selection.headerLayoutId ?? input.siteStyle.defaultHeaderSelection.layoutId,
193963
- headerStyleId: compiled.resolvedSelections.headerStyleId ?? input.selection.headerStyleId ?? input.siteStyle.defaultHeaderSelection.styleId
193964
- },
193965
- chromeSelection: {
193966
- headerLookId: input.selection.headerLookId,
193967
- footerLookId: input.selection.footerLookId
193968
- },
193969
- warnings: compiled.warnings
193970
- };
193971
- }
193972
- function compilationPlanForPreview(input) {
193973
- const replacement = () => replaceSiteStyleCompilationPlan({
193974
- headerLayoutId: input.selection.headerLayoutId,
193975
- headerStyleId: input.selection.headerStyleId,
193976
- headerLookId: input.selection.headerLookId,
193977
- footerLookId: input.selection.footerLookId,
193978
- headerSelectionContext: input.headerSelectionContext
193979
- });
193980
- if (input.compilation.kind === "replace-site-style") return replacement();
193981
- const baseTheme = input.compilation.baseTheme;
193982
- if (!baseTheme) return replacement();
193983
- if (input.compilation.kind === "edit-chrome") return updateCompilationPlan({
193984
- baseTheme,
193985
- selection: input.selection,
193986
- headerSelectionContext: input.headerSelectionContext,
193987
- recompileHeader: input.compilation.surface === "header",
193988
- applyFooterLook: input.compilation.surface === "footer"
193989
- });
193990
- if (input.compilation.baseSelection.siteStyleId !== input.selection.siteStyleId) return replacement();
193991
- return updateCompilationPlan({
193992
- baseTheme,
193993
- selection: input.selection,
193994
- headerSelectionContext: input.headerSelectionContext,
193995
- recompileHeader: headerSelectionChanged(input.compilation.baseSelection, input.selection),
193996
- applyFooterLook: input.compilation.baseSelection.footerLookId !== input.selection.footerLookId
193997
- });
193998
- }
193999
- function updateCompilationPlan(input) {
194000
- const selection = {
194001
- headerLookId: input.selection.headerLookId,
194002
- headerLayoutId: input.selection.headerLayoutId ?? null,
194003
- headerStyleId: input.selection.headerStyleId ?? null
194004
- };
194005
- return {
194006
- kind: "update-selection",
194007
- header: input.recompileHeader ? {
194008
- kind: "recompile",
194009
- selection,
194010
- context: completeHeaderSelectionContext(input.headerSelectionContext),
194011
- brandPresentation: { kind: "apply-logo-context" }
194012
- } : {
194013
- kind: "preserve",
194014
- header: input.baseTheme.header,
194015
- selection
194016
- },
194017
- footer: input.applyFooterLook ? {
194018
- kind: "apply-look",
194019
- footer: input.baseTheme.footer,
194020
- footerLookId: input.selection.footerLookId
194021
- } : {
194022
- kind: "preserve",
194023
- footer: input.baseTheme.footer,
194024
- footerLookId: input.selection.footerLookId
194025
- }
194026
- };
194027
- }
194028
- function headerSelectionChanged(base, previewed) {
194029
- return base.headerLookId !== previewed.headerLookId || base.headerLayoutId !== previewed.headerLayoutId || base.headerStyleId !== previewed.headerStyleId;
194030
- }
194031
- function resolvedPaletteForPreview(palette, siteStyle) {
194032
- if (palette.kind === "available") {
194033
- const preview = completePaletteEditorPreview(palette.editor);
194034
- switch (preview.kind) {
194035
- case "selected":
194036
- if (preview.selection.kind === "site") {
194037
- if (preview.version === null) throw new Error("A selected site palette requires a version");
194038
- return resolvedSitePaletteSelectionFromPreview({
194039
- paletteId: preview.selection.paletteId,
194040
- colors: preview.colors,
194041
- mode: preview.mode,
194042
- version: preview.version
194043
- });
194044
- }
194045
- {
194046
- const curated = findCuratedPalette(preview.selection.valueKey);
194047
- if (!curated) throw new Error("Selected curated palette is unavailable");
194048
- return resolvedCuratedPaletteSelection(curated);
194049
- }
194050
- case "edited-curated": return resolvedDraftPaletteSelection({
194051
- colors: preview.colors,
194052
- mode: preview.mode
194053
- });
194054
- case "edited-site": return resolvedSitePaletteSelectionFromPreview({
194055
- paletteId: preview.selection.paletteId,
194056
- colors: preview.colors,
194057
- mode: preview.mode,
194058
- version: preview.expectedVersion
194059
- });
194060
- case "new-site": return resolvedDraftPaletteSelection({
194061
- colors: preview.colors,
194062
- mode: preview.mode
194063
- });
194064
- default: return assertNever(preview);
194065
- }
194066
- }
194067
- switch (palette.kind) {
194068
- case "invalid": {
194069
- const recommendation = findCuratedPalette(siteStyle.paletteRecommendations[0].id);
194070
- if (!recommendation) throw new Error("Site style has no usable palette recommendation");
194071
- return resolvedCuratedPaletteSelection(recommendation);
194072
- }
194073
- default: return assertNever(palette);
194074
- }
194075
- }
194076
- function assertNever(value) {
194077
- throw new Error(`Unhandled palette preview: ${JSON.stringify(value)}`);
194078
- }
194079
- //#endregion
194080
193163
  //#region ../preview-next/src/client/preview/siteChromeLookRows.ts
194081
193164
  function buildSiteChromeLookModels(input) {
194082
193165
  const selection = input.state.previewed;
194083
193166
  const current = compileSiteThemeFromSelections({
194084
193167
  siteStyle: input.siteStyle,
194085
193168
  buttonStyleSelection: selection.buttonStyleSelection,
194086
- resolvedPalette: resolvedPaletteForPreview(selection.palette, input.siteStyle),
193169
+ palette: selection.palette,
194087
193170
  compilationPlan: replaceSiteStyleCompilationPlan({
194088
193171
  headerLayoutId: selection.headerLayoutId,
194089
193172
  headerStyleId: selection.headerStyleId,
@@ -194187,7 +193270,6 @@ function planSiteChromeLookSelection(command) {
194187
193270
  //#endregion
194188
193271
  //#region ../preview-next/src/client/preview/previewErrorMessages.ts
194189
193272
  const PREVIEW_DESIGN_SAVE_ERROR_MESSAGE = "We couldn’t save that change just now. Please try again in a minute or two.";
194190
- const PREVIEW_DESIGN_REFRESH_ERROR_MESSAGE = "We couldn’t refresh the latest design just now. Your changes are still here. Please try again in a minute or two.";
194191
193273
  const PREVIEW_DESIGN_LOAD_ERROR_MESSAGE = "We couldn’t load those design options just now. Please try again in a minute or two.";
194192
193274
  function reportPreviewDesignError(operation, error) {
194193
193275
  console.error(`[preview-design] ${operation}`, error);
@@ -194195,26 +193277,20 @@ function reportPreviewDesignError(operation, error) {
194195
193277
  //#endregion
194196
193278
  //#region ../preview-next/src/client/preview/styleConfiguratorSnapshot.ts
194197
193279
  /**
194198
- * Preview only accepts the modern, server-resolved palette runtime state. The
194199
- * old Theme-plus-overrides reconstruction belongs to migration tooling, never
194200
- * to a live editor where it could silently overwrite authoritative state.
193280
+ * The parsed theme is the complete palette authority for preview.
194201
193281
  */
194202
193282
  function resolveStyleConfiguratorInitialSnapshot(input) {
194203
- const siteStyleId = siteStyleIdFromTheme(input.theme);
193283
+ const theme = input.theme;
193284
+ if (!theme) return null;
193285
+ const siteStyleId = siteStyleIdFromTheme(theme);
194204
193286
  if (!siteStyleId) return null;
194205
193287
  const siteStyle = getCuratedSiteStyle(siteStyleId);
194206
193288
  if (!siteStyle) return null;
194207
- const runtimePaletteState = input.initialSelections.runtimePaletteState;
194208
- const resolvedRuntimePalette = runtimePaletteState.kind === "migrated" ? resolveMigratedRuntimePaletteState(runtimePaletteState) : null;
194209
- const palette = resolvedRuntimePalette?.ok === false ? {
194210
- kind: "invalid",
194211
- reason: resolvedRuntimePalette.error.kind
194212
- } : paletteSelectionSnapshotFromRuntime(runtimePaletteState);
194213
193289
  const compiled = compileSiteThemeFromSelections({
194214
193290
  siteStyle,
194215
193291
  buttonStyleSelection: input.initialSelections.buttonStyleSelection,
194216
- resolvedPalette: resolvedRuntimePalette?.ok ? resolvedRuntimePalette.resolved : resolvedPaletteForPreview(palette, siteStyle),
194217
- typography: input.theme?.typography ?? siteStyle.typography,
193292
+ palette: theme.palette,
193293
+ typography: theme.typography,
194218
193294
  compilationPlan: replaceSiteStyleCompilationPlan(sharedSelectionInputs(input))
194219
193295
  });
194220
193296
  return {
@@ -194226,7 +193302,7 @@ function resolveStyleConfiguratorInitialSnapshot(input) {
194226
193302
  headerLookId: compiled.requestedSelections.headerLookId,
194227
193303
  footerLookId: compiled.requestedSelections.footerLookId,
194228
193304
  buttonStyleSelection: compiled.resolvedSelections.buttonStyleSelection,
194229
- palette,
193305
+ palette: theme.palette,
194230
193306
  typography: compiled.theme.typography
194231
193307
  };
194232
193308
  }
@@ -194364,6 +193440,96 @@ function hasLogoInHeaderSelectionContext(context) {
194364
193440
  return logo.shape !== "none" && logo.shape !== "text-only";
194365
193441
  }
194366
193442
  //#endregion
193443
+ //#region ../preview-next/src/client/preview/siteStylePreviewPlanner.ts
193444
+ function deriveSiteStylePreviewUpdate(baseTheme, baseSelection) {
193445
+ return {
193446
+ kind: "derive-update",
193447
+ baseTheme,
193448
+ baseSelection
193449
+ };
193450
+ }
193451
+ function planSiteStylePreviewChange(input) {
193452
+ const compiled = compileSiteThemeFromSelections({
193453
+ siteStyle: input.siteStyle,
193454
+ buttonStyleSelection: input.selection.buttonStyleSelection,
193455
+ palette: input.selection.palette,
193456
+ typography: input.selection.typography,
193457
+ compilationPlan: compilationPlanForPreview(input)
193458
+ });
193459
+ return {
193460
+ themeOverlay: compiled.theme,
193461
+ resolvedSelections: {
193462
+ ...compiled.resolvedSelections,
193463
+ headerLayoutId: compiled.resolvedSelections.headerLayoutId ?? input.selection.headerLayoutId ?? input.siteStyle.defaultHeaderSelection.layoutId,
193464
+ headerStyleId: compiled.resolvedSelections.headerStyleId ?? input.selection.headerStyleId ?? input.siteStyle.defaultHeaderSelection.styleId
193465
+ },
193466
+ chromeSelection: {
193467
+ headerLookId: input.selection.headerLookId,
193468
+ footerLookId: input.selection.footerLookId
193469
+ },
193470
+ warnings: compiled.warnings
193471
+ };
193472
+ }
193473
+ function compilationPlanForPreview(input) {
193474
+ const replacement = () => replaceSiteStyleCompilationPlan({
193475
+ headerLayoutId: input.selection.headerLayoutId,
193476
+ headerStyleId: input.selection.headerStyleId,
193477
+ headerLookId: input.selection.headerLookId,
193478
+ footerLookId: input.selection.footerLookId,
193479
+ headerSelectionContext: input.headerSelectionContext
193480
+ });
193481
+ if (input.compilation.kind === "replace-site-style") return replacement();
193482
+ const baseTheme = input.compilation.baseTheme;
193483
+ if (!baseTheme) return replacement();
193484
+ if (input.compilation.kind === "edit-chrome") return updateCompilationPlan({
193485
+ baseTheme,
193486
+ selection: input.selection,
193487
+ headerSelectionContext: input.headerSelectionContext,
193488
+ recompileHeader: input.compilation.surface === "header",
193489
+ applyFooterLook: input.compilation.surface === "footer"
193490
+ });
193491
+ if (input.compilation.baseSelection.siteStyleId !== input.selection.siteStyleId) return replacement();
193492
+ return updateCompilationPlan({
193493
+ baseTheme,
193494
+ selection: input.selection,
193495
+ headerSelectionContext: input.headerSelectionContext,
193496
+ recompileHeader: headerSelectionChanged(input.compilation.baseSelection, input.selection),
193497
+ applyFooterLook: input.compilation.baseSelection.footerLookId !== input.selection.footerLookId
193498
+ });
193499
+ }
193500
+ function updateCompilationPlan(input) {
193501
+ const selection = {
193502
+ headerLookId: input.selection.headerLookId,
193503
+ headerLayoutId: input.selection.headerLayoutId ?? null,
193504
+ headerStyleId: input.selection.headerStyleId ?? null
193505
+ };
193506
+ return {
193507
+ kind: "update-selection",
193508
+ header: input.recompileHeader ? {
193509
+ kind: "recompile",
193510
+ selection,
193511
+ context: completeHeaderSelectionContext(input.headerSelectionContext),
193512
+ brandPresentation: { kind: "apply-logo-context" }
193513
+ } : {
193514
+ kind: "preserve",
193515
+ header: input.baseTheme.header,
193516
+ selection
193517
+ },
193518
+ footer: input.applyFooterLook ? {
193519
+ kind: "apply-look",
193520
+ footer: input.baseTheme.footer,
193521
+ footerLookId: input.selection.footerLookId
193522
+ } : {
193523
+ kind: "preserve",
193524
+ footer: input.baseTheme.footer,
193525
+ footerLookId: input.selection.footerLookId
193526
+ }
193527
+ };
193528
+ }
193529
+ function headerSelectionChanged(base, previewed) {
193530
+ return base.headerLookId !== previewed.headerLookId || base.headerLayoutId !== previewed.headerLayoutId || base.headerStyleId !== previewed.headerStyleId;
193531
+ }
193532
+ //#endregion
194367
193533
  //#region ../preview-next/src/client/preview/siteChromeSavePlan.ts
194368
193534
  function buildSiteChromeSavePlan({ surface, selectionPersistence, siteStyle, selection, baseTheme, headerSelectionContext, headerBrandPreferences, headerNavPreferences, backgroundPreferences, themeId, selectionId, baseSelectionUpdatedAt }) {
194369
193535
  const compiled = planSiteStylePreviewChange({
@@ -194409,27 +193575,6 @@ function siteChromeSavePlanBodyForBaseRevision(plan, baseSelectionUpdatedAt) {
194409
193575
  }
194410
193576
  //#endregion
194411
193577
  //#region ../preview-next/src/client/preview/styleConfiguratorApplyPayload.ts
194412
- function paletteColorsFromTheme(theme) {
194413
- const parsed = paletteColorsFromEntries(theme.palette.colors);
194414
- if (!parsed.ok) throw new Error("Apply response contains invalid palette colors");
194415
- return parsed.colors;
194416
- }
194417
- function paletteModeFromTheme(theme) {
194418
- const mode = theme.palette.meta?.mode;
194419
- if (mode !== "light" && mode !== "dark") throw new Error("Apply response contains invalid palette mode");
194420
- return mode;
194421
- }
194422
- function planPaletteApplyCommand(input) {
194423
- const palette = input.previewed.palette;
194424
- if (palette.kind === "invalid") return {
194425
- ok: false,
194426
- error: "invalid-palette-state"
194427
- };
194428
- return {
194429
- ok: true,
194430
- command: planPaletteCommand(palette.editor)
194431
- };
194432
- }
194433
193578
  function buildApplySiteStyleSelectionBody(input) {
194434
193579
  const styleChanged = input.base.siteStyleId !== input.previewed.siteStyleId;
194435
193580
  const changes = [];
@@ -194441,17 +193586,10 @@ function buildApplySiteStyleSelectionBody(input) {
194441
193586
  kind: "set-button-style",
194442
193587
  buttonStyleSelection: input.previewed.buttonStyleSelection
194443
193588
  });
194444
- if (styleChanged || !paletteSelectionSnapshotsEqual(input.base.palette, input.previewed.palette)) {
194445
- const palettePlan = planPaletteApplyCommand(input);
194446
- if (!palettePlan.ok) return {
194447
- ok: false,
194448
- error: palettePlan.error
194449
- };
194450
- changes.push({
194451
- kind: "set-palette",
194452
- command: palettePlan.command
194453
- });
194454
- }
193589
+ if (styleChanged || !themePalettesEqual(input.base.palette, input.previewed.palette)) changes.push({
193590
+ kind: "set-palette",
193591
+ palette: input.previewed.palette
193592
+ });
194455
193593
  if (styleChanged || !typographyObjectsEqual(input.base.typography, input.previewed.typography)) changes.push({
194456
193594
  kind: "set-typography",
194457
193595
  typography: input.previewed.typography
@@ -194489,7 +193627,7 @@ function selectionSnapshotFromApplySiteStyleSelectionResponse(saved, fallback) {
194489
193627
  selectionVersion: saved.selectionVersion,
194490
193628
  selectionUpdatedAt: saved.selectionUpdatedAt ?? fallback.selectionUpdatedAt ?? null,
194491
193629
  buttonStyleSelection: saved.buttonStyleSelection,
194492
- palette: paletteSnapshotFromApplyResponse(saved),
193630
+ palette: saved.theme.palette,
194493
193631
  typography: saved.theme.typography,
194494
193632
  headerLookId: saved.headerLookId,
194495
193633
  headerLayoutId: saved.headerLayoutId ?? fallback.headerLayoutId,
@@ -194497,29 +193635,6 @@ function selectionSnapshotFromApplySiteStyleSelectionResponse(saved, fallback) {
194497
193635
  footerLookId: saved.footerLookId
194498
193636
  };
194499
193637
  }
194500
- function paletteSnapshotFromApplyResponse(saved) {
194501
- if (saved.activePaletteSelection.kind === "curated") return paletteSelectionSnapshotFromRuntime({
194502
- kind: "migrated",
194503
- authority: "curated",
194504
- selection: saved.activePaletteSelection,
194505
- colors: paletteColorsFromTheme(saved.theme),
194506
- mode: paletteModeFromTheme(saved.theme),
194507
- sitePaletteVersion: null
194508
- });
194509
- const version = parseSitePaletteVersion(saved.activeSitePaletteVersion);
194510
- if (version === null) return {
194511
- kind: "invalid",
194512
- reason: "invalid-active-site-palette-version"
194513
- };
194514
- return paletteSelectionSnapshotFromRuntime({
194515
- kind: "migrated",
194516
- authority: "site",
194517
- selection: saved.activePaletteSelection,
194518
- colors: paletteColorsFromTheme(saved.theme),
194519
- mode: paletteModeFromTheme(saved.theme),
194520
- sitePaletteVersion: version
194521
- });
194522
- }
194523
193638
  //#endregion
194524
193639
  //#region ../preview-next/src/client/preview/siteStyleHistoryState.ts
194525
193640
  function createSiteStyleHistoryState(selection) {
@@ -194625,7 +193740,7 @@ function confirmSiteStyleHistoryMutation(state, persisted) {
194625
193740
  case "idle":
194626
193741
  case "failed":
194627
193742
  case "stale": return state;
194628
- default: return assertNever$8(state.mutation, "Unhandled site style history mutation");
193743
+ default: return assertNever$5(state.mutation, "Unhandled site style history mutation");
194629
193744
  }
194630
193745
  }
194631
193746
  function rejectSiteStyleHistoryMutation(state, failure) {
@@ -194661,7 +193776,7 @@ function siteStyleHistoryFailureMessage(state) {
194661
193776
  case "idle":
194662
193777
  case "undoing":
194663
193778
  case "redoing": return null;
194664
- default: return assertNever$8(state.mutation, "Unhandled site style history mutation");
193779
+ default: return assertNever$5(state.mutation, "Unhandled site style history mutation");
194665
193780
  }
194666
193781
  }
194667
193782
  function skipReasonForHistoryMutation$1(state, command) {
@@ -194718,14 +193833,14 @@ function selectPreviewDesignHistoryDomain(state, command, capabilities) {
194718
193833
  switch (command) {
194719
193834
  case "undo": return domain.canUndo ? domainId : null;
194720
193835
  case "redo": return domain.canRedo ? domainId : null;
194721
- default: return assertNever$8(command, "Unhandled preview design history command");
193836
+ default: return assertNever$5(command, "Unhandled preview design history command");
194722
193837
  }
194723
193838
  }
194724
193839
  function previewDesignHistoryDomainForCommand(state, command) {
194725
193840
  switch (command) {
194726
193841
  case "undo": return state.past[state.past.length - 1] ?? null;
194727
193842
  case "redo": return state.future[0] ?? null;
194728
- default: return assertNever$8(command, "Unhandled preview design history command");
193843
+ default: return assertNever$5(command, "Unhandled preview design history command");
194729
193844
  }
194730
193845
  }
194731
193846
  //#endregion
@@ -194817,7 +193932,7 @@ function quickControlHistoryEntryFromSelectionChange(previous, next, target) {
194817
193932
  previous: previous.footerLookId,
194818
193933
  next: next.footerLookId
194819
193934
  };
194820
- default: return assertNever$8(target, "Unhandled site chrome quick-control target");
193935
+ default: return assertNever$5(target, "Unhandled site chrome quick-control target");
194821
193936
  }
194822
193937
  }
194823
193938
  function quickControlHistoryEntryFromBrandPreferenceChange(previous, next, target) {
@@ -194832,7 +193947,7 @@ function quickControlHistoryEntryFromBrandPreferenceChange(previous, next, targe
194832
193947
  previous: previous.logoSize,
194833
193948
  next: next.logoSize
194834
193949
  };
194835
- default: return assertNever$8(target, "Unhandled site chrome brand quick-control target");
193950
+ default: return assertNever$5(target, "Unhandled site chrome brand quick-control target");
194836
193951
  }
194837
193952
  }
194838
193953
  function quickControlHistoryEntryFromBackgroundPreferenceChange(previous, next, target) {
@@ -194847,7 +193962,7 @@ function quickControlHistoryEntryFromBackgroundPreferenceChange(previous, next,
194847
193962
  previous: previous.footer,
194848
193963
  next: next.footer
194849
193964
  };
194850
- default: return assertNever$8(target, "Unhandled site chrome background quick-control target");
193965
+ default: return assertNever$5(target, "Unhandled site chrome background quick-control target");
194851
193966
  }
194852
193967
  }
194853
193968
  function quickControlHistoryEntryFromNavPreferenceChange(previous, next, target) {
@@ -194862,7 +193977,7 @@ function quickControlHistoryEntryFromNavPreferenceChange(previous, next, target)
194862
193977
  previous: previous.fontSize,
194863
193978
  next: next.fontSize
194864
193979
  };
194865
- default: return assertNever$8(target, "Unhandled site chrome nav quick-control target");
193980
+ default: return assertNever$5(target, "Unhandled site chrome nav quick-control target");
194866
193981
  }
194867
193982
  }
194868
193983
  function beginSiteChromeQuickControlHistoryUndo(state) {
@@ -194914,7 +194029,7 @@ function confirmSiteChromeQuickControlHistoryMutation(state, persisted) {
194914
194029
  case "idle":
194915
194030
  case "failed":
194916
194031
  case "stale": return state;
194917
- default: return assertNever$8(state.mutation, "Unhandled site chrome quick-control history mutation");
194032
+ default: return assertNever$5(state.mutation, "Unhandled site chrome quick-control history mutation");
194918
194033
  }
194919
194034
  }
194920
194035
  function rejectSiteChromeQuickControlHistoryMutation(state, failure) {
@@ -194957,7 +194072,7 @@ function siteChromeQuickControlHistoryFailureMessage(state) {
194957
194072
  case "idle":
194958
194073
  case "undoing":
194959
194074
  case "redoing": return null;
194960
- default: return assertNever$8(state.mutation, "Unhandled site chrome quick-control history mutation");
194075
+ default: return assertNever$5(state.mutation, "Unhandled site chrome quick-control history mutation");
194961
194076
  }
194962
194077
  }
194963
194078
  function beginSiteChromeQuickControlHistoryMutation(state, mutationKind, entry) {
@@ -195058,7 +194173,7 @@ function quickControlReplayPlanForEntry(current, entry, command) {
195058
194173
  footer: command === "undo" ? entry.previous : entry.next
195059
194174
  }
195060
194175
  };
195061
- default: return assertNever$8(entry, "Unhandled site chrome quick-control history entry");
194176
+ default: return assertNever$5(entry, "Unhandled site chrome quick-control history entry");
195062
194177
  }
195063
194178
  }
195064
194179
  function skipReasonForHistoryMutation(state, command) {
@@ -195110,7 +194225,7 @@ function siteChromeQuickControlHistoryEntryEquals(left, right) {
195110
194225
  case "header-menu-font-size": return right.kind === left.kind && left.previous === right.previous && left.next === right.next;
195111
194226
  case "header-background":
195112
194227
  case "footer-background": return right.kind === left.kind && siteChromeBackgroundOverrideEquals(left.previous, right.previous) && siteChromeBackgroundOverrideEquals(left.next, right.next);
195113
- default: return assertNever$8(left, "Unhandled site chrome quick-control history entry");
194228
+ default: return assertNever$5(left, "Unhandled site chrome quick-control history entry");
195114
194229
  }
195115
194230
  }
195116
194231
  function headerBrandPreferencesEqual(left, right) {
@@ -195766,7 +194881,7 @@ function headerBrandSizeControlLabel(state) {
195766
194881
  case "title-only": return "Site title size";
195767
194882
  case "auto":
195768
194883
  case "logo-plus-title": return "Brand size";
195769
- default: return assertNever$8(state.preferences.brandDisplay, "Unhandled header brand display mode");
194884
+ default: return assertNever$5(state.preferences.brandDisplay, "Unhandled header brand display mode");
195770
194885
  }
195771
194886
  }
195772
194887
  function saveRequestFromQuickControlReplayPlan(plan, mutation) {
@@ -195804,7 +194919,7 @@ function saveRequestFromQuickControlReplayPlan(plan, mutation) {
195804
194919
  mutation
195805
194920
  }
195806
194921
  };
195807
- default: return assertNever$8(plan, "Unhandled site chrome quick-control replay plan");
194922
+ default: return assertNever$5(plan, "Unhandled site chrome quick-control replay plan");
195808
194923
  }
195809
194924
  }
195810
194925
  function selectionSnapshotFromSiteChromeSaveResponse({ saved, fallback, savePlan }) {
@@ -195847,4 +194962,4 @@ function useSiteChromeCustomizeOptional() {
195847
194962
  return useContext(SiteChromeCustomizeContext);
195848
194963
  }
195849
194964
  //#endregion
195850
- export { beginAutosaveBatch as $, getLocalDateKey as $a, toScheduledBookingDateTime as $c, curatedPalettes as $i, layoutTransforms as $n, renderAudio as $o, parseStoredCommerceCartState as $r, SearchInput as $s, redoHistory as $t, deriveStyleConfiguratorCapabilities as A, el as Aa, createCollection as Ac, componentRuntimeRulesForTheme as Ai, Redo2 as Al, DEFAULT_LAUNCH_READINESS_INPUT as An, isInlineTextEmpty as Ao, giftingBlockDefinition as Ar, mergeStyles as As, MediaField as At, previewButtonStyle as B, formatEventCompactDateRail as Ba, parseFooterModuleId as Bc, parseGradientPresetId as Bi, GripVertical as Bl, escapeStyleContent as Bn, ClockIcon as Bo, buildProductDetailInteractiveIslandProps as Br, unmapValueFromSelect as Bs, BlockEditor as Bt, usePreviewThemeOverlay as C, eventCollectionHydrationSchema as Ca, DropdownMenuContent as Cc, resolveBackgroundColorValue as Ci, Ticket as Cl, MediaEditorContextProvider as Cn, parseGeneratedIconSetId as Co, findPreSelectedEvent as Cr, pageDesignEditorBackgroundOverrideOwner as Cs, InlineTextField as Ct, committedPaletteForSnapshot as D, normalizeCsvIds as Da, DropdownMenuTrigger as Dc, retargetCompiledBoundaryRuntimeForContentAdjacency as Di, Smartphone as Dl, getPageDesignEditorState as Dn, logger$1 as Do, WIZARD_STEPS as Dr, normalizeBoxStylesCardVariant as Ds, ButtonVariantField as Dt, cancelPreview as E, getEventRuntimeFiltersKey as Ea, DropdownMenuSeparator as Ec, compileEditorModelRuntime as Ei, Sparkles as El, applyPageDesignEditorAction as En, isRecord$10 as Eo, resolveRegistrationTarget as Er, ICON_CONFIG as Es, EntryPickerWidgetProvider as Et, markApplySaving as F, eventCalendarListLayoutOptions as Fa, Button$1 as Fc, findFooterLook as Fi, Monitor as Fl, containerResponsiveThemeCss as Fn, ArrowDownIcon as Fo, resolveEventRegistrationScopedEvents as Fr, SdkConfigProvider as Fs, RichTextWidgetProvider as Ft, previewSitePalette as G, formatTime as Ga, formatBookingDateTime as Gc, getHeaderLayout as Gi, CircleMinus as Gl, siteFooterManifest as Gn, FileTextIcon as Go, buildProductCardDisplay as Gr, TooltipTrigger as Gs, classifyHistoryShortcut as Gt, previewFooterLook as H, formatEventPrice as Ha, unsafeAsEditorBlockValues as Hc, sectionTransitionFamilies as Hi, EllipsisVertical as Hl, generateDefaultAccordionSystem as Hn, FileArchiveIcon as Ho, buildShopInteractiveIslandProps as Hr, useField as Hs, prepareBlockEditorManifest as Ht, openRow as I, buildGoogleMapsDirectionsUrl as Ia, cva as Ic, gradientToCss as Ii, Minus as Il, createCustomBlockRegistry as In, ArrowRightIcon as Io, checkoutBlockDefinition as Ir, useSdkConfig as Is, EditorProvider as It, resetTypographyToSaved as J, groupEventsByDate as Ja, formatLocalScheduleDate as Jc, backgroundAppearanceColorTokenNames as Ji, ChevronDown as Jl, SITE_OVERLAY_HEADER_CLEARANCE_CSS_VAR as Jn, ImagePresets as Jo, formatInterval as Jr, SelectItem as Js, useOptionalEditorUiStoreInstance as Jt, previewSiteStyle as K, getCardOrientation as Ka, formatBookingInstant as Kc, getHeaderStyle as Ki, ChevronRight as Kl, siteHeaderManifest as Kn, MinusIcon as Ko, buildProductDetailDisplay as Kr, Select$1 as Ks, useEditorUiStore as Kt, paletteMutationCapability as L, normalizeLocationMapProps as La, useComposedRefs as Lc, GRADIENT_PRESETS as Li, Maximize2 as Ll, buildThemeRuntime as Ln, ChevronDownIcon as Lo, cartBlockDefinition as Lr, hasEmptyOption as Ls, useEditor$1 as Lt, isPreviewingChange as M, bindingSchema as Ma, createContextScope as Mc, designRuntimeRulesForTheme as Mi, Pencil as Ml, AMBIENT_BACKGROUND_ROLES as Mn, canonicalizePersistedBlockButtonRole as Mo, courseRegistrationBlockDefinition as Mr, textColorStyle as Ms, ReferenceWidgetProvider as Mt, markApplyFailed as N, previewStageSchema as Na, composeEventHandlers as Nc, getCuratedSiteStyle as Ni, PenLine as Nl, isSupportedLoaderEndpoint as Nn, isBlockButtonRole as No, buildCourseRegistrationInteractiveIslandProps as Nr, getFieldIntent as Ns, useRichTextImagePicker as Nt, createPalette as O, normalizeCsvString as Oa, useId$1 as Oc, retargetCompiledRuntimeFieldsForContentAdjacency as Oi, SlidersHorizontal as Ol, listEntryPageContentSlots as On, coerceInlineTextWithFallback as Oo, getStepNumber as Or, normalizeCardVariantRole as Os, ButtonWidgetProvider as Ot, markApplySaved as P, eventCalendarListLayoutCompatibleDisplayModeValues as Pa, Primitive as Pc, surfaceResolutionContextFromTheme as Pi, Palette as Pl, ThemeScope as Pn, getIconComponent as Po, normalizeEventRegistrationPageSurfaceSubject as Pr, isHeaderField as Ps, RichTextField as Pt, toggleRow as Q, getEventAvailabilityStatus as Qa, toBookingTimeZone as Qc, defaultThemeTokens as Qi, mediaTransforms as Qn, getCurrentResolveImageUrlContext as Qo, deriveCommerceCheckoutState as Qr, CalloutDescription as Qs, pushHistoryEntry as Qt, palettePreviewProjection as R, toLocationMapHydrationProps as Ra, cn$2 as Rc, GRADIENT_PRESET_IDS as Ri, LoaderCircle as Rl, DEFAULT_THEME_RESPONSIVE_MODE as Rn, CircleMinusIcon as Ro, buildCartInteractiveIslandProps as Rr, mapCurrentValueForSelect as Rs, LinkField as Rt, PreviewThemeOverlayProvider as S, eventCollectionDisplaySchemaShape as Sa, DropdownMenu as Sc, resolveSurfaceForegroundStyles as Si, TriangleAlert as Sl, MediaEditor as Sn, parseGeneratedIconAssetId as So, findEventByOccurrenceId as Sr, isThemeV2NormalEditorRawStyleFieldName as Ss, OfferingsPreviewWidgetProvider as St, applyTypographyDraftPatch as T, buildEventRuntimeFilters as Ta, DropdownMenuLabel as Tc, applyCompiledRuntimeFieldsToContent as Ti, Star as Tl, useApiMediaUploader as Tn, isObjectRecord$1 as To, resolveEventRequiresPayment as Tr, assertNever$8 as Ts, EntryPickerField as Tt, previewHeaderLayout as U, formatEventPriceDisplay as Ua, addLocalScheduleDays as Uc, sectionTransitionFamilyForBoundaryOptionId as Ui, CreditCard as Ul, getBlockDefinition as Un, FileAudioIcon as Uo, getShopDisplayForItems as Ur, Tooltip as Us, stripTopLevelRoutingUi as Ut, previewCuratedPalette as V, formatEventDateParts as Va, unsafeAsEditorBlockId as Vc, defaultSectionTransitionVariantForFamily as Vi, Eye as Vl, mergeContentWithBlockStyleOverrides as Vn, DownloadIcon as Vo, buildProductListInteractiveIslandProps as Vr, FieldFrame as Vs, hideThemeV2RawStyleFields as Vt, previewHeaderStyle as W, formatEventTeacherLine as Wa, formatBookingDate as Wc, sectionTransitionVariantForBoundaryOptionId as Wi, CirclePlus as Wl, projectRecurringSchedule as Wn, FileSpreadsheetIcon as Wo, buildCartDisplay as Wr, TooltipContent as Ws, getBlockManifestFromSdkConfig as Wt, styleConfiguratorHistoryEntryForPersistedSelection as X, resolveEventLinkProps as Xa, parseBookingLocalDate as Xc, foregroundTokenForBackgroundAppearanceColorToken as Xi, ArrowDown as Xl, visibleHeaderClearancePx as Xn, buildResolveImageUrlContext as Xo, buildPassCartItem as Xr, SelectValue as Xs, canUndoHistory as Xt, setPaletteColors as Y, resolveEventCta as Ya, getBookingLocalDateKey as Yc, backgroundAppearanceQuickColorTokenNames as Yi, Check as Yl, planSiteOverlayHeaderClearance as Yn, MediaPlaceholder as Yo, EMPTY_COMMERCE_CART_STATE as Yr, SelectTrigger as Ys, canRedoHistory as Yt, syncStyleConfiguratorState as Z, getEventAvailability as Za, resolveBookingTimeZoneId as Zc, parseBackgroundAppearanceColorToken as Zi, __exportAll as Zl, contentTransforms as Zn, computeMediaTransformStyle as Zo, buildProductCartItem as Zr, Callout as Zs, createHistoryState as Zt, planSiteChromeLookSelection as _, isSemanticSpacing as _a, Content$1 as _c, bodyCopyFragment as _i, err as _l, createManifestFormAdapter as _n, resolveFeatureCardGeneratedIconSizePx as _o, formBlockDefinition as _r, parseThemeForPersistence as _s, createSiteOptionApiLoader as _t, previewDesignHistoryDomainForCommand as a, createTransformRegistry as aa, TabsContent as ac, faqAccordionFragment as ai, publicEventScalarPrice as al, createRoutingHelpers as an, defineInteractiveIslandMetaKeys as ao, NAV_DROPDOWN_SHIFT_PROPERTY as ar, SECTION_BACKGROUND_MIN_SOURCE_WIDTH as as, createOptimisticActionRunner as at, PreviewDesignCoordinatorProvider as b, buildEventCollectionHydration as ba, createCollapsibleScope as bc, getAnchorClasses as bi, Upload as bl, evaluateVisibility as bn, parseBlockIconValue as bo, buildEventRegistrationInteractiveIslandProps as br, resolveOnColorForThemeToken as bs, SiteOptionWidgetProvider as bt, selectionSnapshotFromApplySiteStyleSelectionResponse as c, OFFERINGS_PREVIEW_DEFAULT_BUTTON_TEXT as ca, Dialog as cc, singleButtonFragment as ci, assertNever$9 as cl, isAdapterReferenceKind as cn, defineProgressiveBlockRuntime as co, productDetailBlockDefinition as cr, siblingPath$1 as cs, PreviewRichTextEditor as ct, PREVIEW_DESIGN_REFRESH_ERROR_MESSAGE as d, OFFERINGS_PREVIEW_EVENT_PRESET_DEFINITIONS as da, DialogFooter as dc, testimonialsCarouselFragment as di, parseSiteId as dl, resolvePageRouteSlug as dn, markEditableSurfaceForwarding as do, eventListingBlockDefinition as dr, resolveButtonStyleSelection as ds, ContentFieldsForm as dt, findCuratedPalette as ea, Popover as ec, productItemKey as ei, parseEventPageSurfaceSubject as el, undoHistory as en, getLocalMinuteOfDay as eo, uiTransforms as er, renderVideo as es, confirmAutosaveBatch as et, PREVIEW_DESIGN_SAVE_ERROR_MESSAGE as f, buildOfferingsPreviewRenderStates as fa, DialogHeader as fc, testimonialsHeadingFragment as fi, unsafeAsAppointmentResourceId as fl, resolveContentTitle as fn, splitPositioningClasses as fo, buildEventListingInteractiveIslandProps as fr, updateButtonStyleSelectionChoice as fs, useUISelector as ft, cycleableSiteChromeOptions as g, resolveOfferingsPreviewGroups as ga, CollapsibleTrigger as gc, heroCopyFragment as gi, unsafeAsPassId as gl, ManifestForm as gn, FEATURE_CARD_ICON_TREATMENTS as go, buildEventCalendarListingRender as gr, themeButtonClassName as gs, useEntryEditorController as gt, cycleSiteChromeLookId as h, resolveOfferingsPreviewGroupCta as ha, CollapsibleContent as hc, ctaRowFragment as hi, unsafeAsFormId as hl, validateBlockManifestIssues as hn, mediaSchema as ho, buildEventCalendarListingDisplay as hr, parseThemeButtonVariantId as hs, useEntryController as ht, usePreviewDesignHistoryOrder as i, paletteColorsSchema as ia, Tabs as ic, cardFragment as ii, publicEventPricingType as il, useDebouncedLatestSave as in, createInteractiveIslandCodec as io, useImageResolveContextOptional as ir, setContextResolveImageUrlContext as is, rejectAutosaveBatch as it, dismissWarnings as j, when as ja, useControllableState as jc, curatedSiteStyles as ji, Plus as jl, deriveLaunchReadiness as jn, parseInlineTextFromUnknown as jo, buildGiftingInteractiveIslandProps as jr, rgbColorValue as js, ReferenceField as jt, createStyleConfiguratorState as k, normalizeOptionalId as ka, useDirection as kc, planPageDesignLayoutLookCompatibility as ki, RotateCcw as kl, decodePublicProductCategorySelectorQuery as kn, inlineTextToPlainText as ko, getWizardStepsForContext as kr, backgroundColorStyle as ks, FileField as kt, resolveStyleConfiguratorInitialSnapshot as l, OFFERINGS_PREVIEW_DEFAULT_EMPTY_MESSAGE as la, DialogContent as lc, formEmbedFragment as li, expectParsedBrandedId as ll, parseReferenceKind as ln, EDITABLE_SURFACE_FORWARDING_PROP as lo, newsletterSignupBlockDefinition as lr, buttonStyleSelectionParameterValue as ls, PreviewInlineTextEditor as lt, buildSiteChromeLookModels as m, resolveOfferingsPreviewCoursePath as ma, Collapsible as mc, heroCtaRowFragment as mi, unsafeAsCustomerPassId as ml, usePalette as mn, PUBLIC_DOWNLOAD_MEDIA_TYPES as mo, buildEventCalendarInteractiveIslandProps as mr, AFFORDANCE_SUPPRESS_CLASS as ms, EntryControllerProvider as mt, useSiteChromeCustomizeOptional as n, paletteColorEntries as na, PopoverTrigger as nc, richTextFragment as ni, publicEventPricingCurrency as nl, recordsEqual as nn, blockBookingPaymentTermsSchema as no, createManifestValidator as nr, resolveMediaNodeResponsiveImage as ns, enqueueTransaction as nt, selectPreviewDesignHistoryDomain as o, runTransforms as oa, TabsList as oc, faqHeadingFragment as oi, publicEventTicketTypes as ol, createSnapshotFromPageRecord as on, createZodCodec as oo, shopBlockDefinition as or, attachRenderableMediaAssetFields as os, resolvePreviewSidebarTab as ot, reportPreviewDesignError as p, normalizeOfferingsPreviewItemLimit as pa, DialogTitle as pc, ctaCopyFragment as pi, unsafeAsAppointmentServiceId as pl, PaletteProvider as pn, planSiteChromePlacement as po, eventCalendarBlockDefinition as pr, buttonStyleSelectionKey as ps, EditableBlockProvider as pt, reconcilePaletteLibraryActive as q, getContainerClass as qa, formatBookingTime as qc, BACKGROUND_BODY_TEXT_MIN_CONTRAST_RATIO as qi, ChevronLeft as ql, SITE_CHROME_VISIBLE_HEADER_SELECTOR as qn, PlusIcon as qo, formatCommercePrice as qr, SelectContent as qs, useEditorUiStoreInstance as qt, PreviewDesignHistoryOrderProvider as r, paletteColorsEqual as ra, Input as rc, headingFragment as ri, publicEventPricingMode as rl, useMultiAutosave as rn, buildInteractiveIslandProps as ro, ImageResolveContextProvider as rr, resolveMediaStorageUrl as rs, idleEditorTransactionQueueState as rt, buildApplySiteStyleSelectionBody as s, ctaButton as sa, TabsTrigger as sc, blogFeaturedPostFragment as si, formatCurrencyAmount as sl, BUILT_IN_REFERENCE_KINDS as sn, defineClientOwnedBlockRuntime as so, productListBlockDefinition as sr, getAtPath as ss, FooterComposerPanel as st, SiteChromeCustomizeProvider as t, buildPaletteLibraryReadModel as ta, PopoverContent as tc, reduceCommerceCart as ti, formatBookingPriceDisplay as tl, unsafeAsLinkedContentEntryId as tn, resolveRuntimeEventPricing as to, formattingTransforms as tr, resolveImageUrlWithContext as ts, deriveTransactionCapabilities as tt, PREVIEW_DESIGN_LOAD_ERROR_MESSAGE as u, OFFERINGS_PREVIEW_DEFAULT_FAILED_MESSAGE as ua, DialogDescription as uc, formCopyFragment as ui, parseMediaAssetId as ul, deriveRouteMetadataPresentation as un, composeHeaderSectionWrapperClassName as uo, buildNewsletterFormInteractiveIslandProps as ur, findButtonStyleRecipe as us, PreviewTextEditor as ut, deriveSiteStylePreviewUpdate as v, resolveSpacing as va, Root$3 as vc, defineFragment as vi, ok$1 as vl, createManifestValidation as vn, shouldReserveFeatureCardIconZone as vo, buildFormInteractiveIslandProps as vr, getTextColorForBackground as vs, createSiteOptionWidgetAdapters as vt, applyResolvedSelections as w, eventCollectionSourceSchemaShape as wa, DropdownMenuItem as wc, formatSiteChromeBackgroundTokenLabel as wi, Tablet as wl, useMediaEditorOptional as wn, RichTextDocSchema as wo, resolveDiscountContext as wr, asDesignBlockId as ws, IconPickerField as wt, usePreviewDesignCoordinator as x, buildEventCollectionListingDisplay as xa, Surface as xc, boxStylesTransforms as xi, Undo2 as xl, createStoreBackend as xn, resolveBlockIconRenderValue as xo, toRegistrationEvents as xr, resolveTokenOrCssColorValue as xs, OfferingsPreviewGroupOrderField as xt, planSiteStylePreviewChange as y, buildEventCollectionDisplay as ya, Trigger$3 as yc, BACKGROUND_POSITION_PRESET_VALUES as yi, X as yl, FormRenderer as yn, buildGeneratedBlockIconRenderAssetLookupFromUnknown as yo, eventRegistrationBlockDefinition as yr, isCssColorLiteral as ys, SiteOptionPickerField as yt, prepareStalePaletteRetry as z, formatDate as za, clsx as zc, getGradientPreset as zi, Image as zl, getResponsiveScopeSpec as zn, CirclePlusIcon as zo, buildCheckoutInteractiveIslandProps as zr, mapOptionValueForSelect as zs, LinkWidgetProvider as zt };
194965
+ export { resolvePreviewSidebarTab as $, markEditableSurfaceForwarding as $a, expectParsedBrandedId as $c, normalizeOfferingsPreviewItemLimit as $i, shopBlockDefinition as $n, resolveButtonStyleSelection as $o, singleButtonFragment as $r, DialogContent as $s, createSnapshotFromPageRecord as $t, markApplyFailed as A, formatEventTeacherLine as Aa, parseFooterModuleId as Ac, getGradientPreset as Ai, GripVertical as Al, buildThemeRuntime as An, FileArchiveIcon as Ao, buildCheckoutInteractiveIslandProps as Ar, unmapValueFromSelect as As, useEditor$1 as At, previewSiteStyle as B, getLocalMinuteOfDay as Ba, parseBookingLocalDate as Bc, backgroundAppearanceQuickColorTokenNames as Bi, ArrowDown as Bl, SITE_CHROME_VISIBLE_HEADER_SELECTOR as Bn, getCurrentResolveImageUrlContext as Bo, EMPTY_COMMERCE_CART_STATE as Br, SelectValue as Bs, useEditorUiStoreInstance as Bt, applyResolvedSelections as C, normalizeLocationMapProps as Ca, composeEventHandlers as Cc, designRuntimeRulesForTheme as Ci, PenLine as Cl, DEFAULT_LAUNCH_READINESS_INPUT as Cn, ArrowDownIcon as Co, giftingBlockDefinition as Cr, getFieldIntent as Cs, MediaField as Ct, deriveStyleConfiguratorCapabilities as D, formatEventDateParts as Da, useComposedRefs as Dc, gradientToCss as Di, Maximize2 as Dl, ThemeScope as Dn, CirclePlusIcon as Do, checkoutBlockDefinition as Dr, hasEmptyOption as Ds, RichTextField as Dt, createStyleConfiguratorState as E, formatEventCompactDateRail as Ea, cva as Ec, findFooterLook as Ei, Minus as El, isSupportedLoaderEndpoint as En, CircleMinusIcon as Eo, buildCourseRegistrationInteractiveIslandProps as Er, useSdkConfig as Es, useRichTextImagePicker as Et, previewButtonStyle as F, resolveEventCta as Fa, formatBookingDateTime as Fc, sectionTransitionVariantForBoundaryOptionId as Fi, CircleMinus as Fl, generateDefaultAccordionSystem as Fn, PlusIcon as Fo, buildCartDisplay as Fr, TooltipTrigger as Fs, prepareBlockEditorManifest as Ft, toggleRow as G, buildInteractiveIslandProps as Ga, formatBookingPriceDisplay as Gc, createTransformRegistry as Gi, mediaTransforms as Gn, resolveMediaStorageUrl as Go, productItemKey as Gr, PopoverContent as Gs, pushHistoryEntry as Gt, setPaletteColors as H, normalizeEventRegistrationPageSurfaceSubject as Ha, toBookingTimeZone as Hc, parseBackgroundAppearanceColorToken as Hi, planSiteOverlayHeaderClearance as Hn, renderVideo as Ho, buildProductCartItem as Hr, CalloutDescription as Hs, canRedoHistory as Ht, previewCuratedPalette as I, resolveEventLinkProps as Ia, formatBookingInstant as Ic, getHeaderLayout as Ii, ChevronRight as Il, getBlockDefinition as In, ImagePresets as Io, buildProductCardDisplay as Ir, Select$1 as Is, stripTopLevelRoutingUi as It, deriveTransactionCapabilities as J, createZodCodec as Ja, publicEventPricingType as Jc, OFFERINGS_PREVIEW_DEFAULT_BUTTON_TEXT as Ji, formattingTransforms as Jn, attachRenderableMediaAssetFields as Jo, headingFragment as Jr, Tabs as Js, unsafeAsLinkedContentEntryId as Jt, beginAutosaveBatch as K, createInteractiveIslandCodec as Ka, publicEventPricingCurrency as Kc, runTransforms as Ki, layoutTransforms as Kn, setContextResolveImageUrlContext as Ko, reduceCommerceCart as Kr, PopoverTrigger as Ks, redoHistory as Kt, previewFooterLook as L, getEventAvailability as La, formatBookingTime as Lc, getHeaderStyle as Li, ChevronLeft as Ll, projectRecurringSchedule as Ln, MediaPlaceholder as Lo, buildProductDetailDisplay as Lr, SelectContent as Ls, getBlockManifestFromSdkConfig as Lt, markApplySaving as M, getCardOrientation as Ma, unsafeAsEditorBlockValues as Mc, defaultSectionTransitionVariantForFamily as Mi, EllipsisVertical as Ml, getResponsiveScopeSpec as Mn, FileSpreadsheetIcon as Mo, buildProductListInteractiveIslandProps as Mr, useField as Ms, LinkWidgetProvider as Mt, openRow as N, getContainerClass as Na, addLocalScheduleDays as Nc, sectionTransitionFamilies as Ni, CreditCard as Nl, escapeStyleContent as Nn, FileTextIcon as No, buildShopInteractiveIslandProps as Nr, Tooltip as Ns, BlockEditor as Nt, dismissWarnings as O, formatEventPrice as Oa, cn$2 as Oc, GRADIENT_PRESETS as Oi, LoaderCircle as Ol, containerResponsiveThemeCss as On, ClockIcon as Oo, cartBlockDefinition as Or, mapCurrentValueForSelect as Os, RichTextWidgetProvider as Ot, palettePreviewProjection as P, groupEventsByDate as Pa, formatBookingDate as Pc, sectionTransitionFamilyForBoundaryOptionId as Pi, CirclePlus as Pl, mergeContentWithBlockStyleOverrides as Pn, MinusIcon as Po, getShopDisplayForItems as Pr, TooltipContent as Ps, hideThemeV2RawStyleFields as Pt, createOptimisticActionRunner as Q, composeHeaderSectionWrapperClassName as Qa, assertNever$6 as Qc, buildOfferingsPreviewRenderStates as Qi, NAV_DROPDOWN_SHIFT_PROPERTY as Qn, findButtonStyleRecipe as Qo, blogFeaturedPostFragment as Qr, Dialog as Qs, createRoutingHelpers as Qt, previewHeaderLayout as R, getEventAvailabilityStatus as Ra, formatLocalScheduleDate as Rc, BACKGROUND_BODY_TEXT_MIN_CONTRAST_RATIO as Ri, ChevronDown as Rl, siteFooterManifest as Rn, buildResolveImageUrlContext as Ro, formatCommercePrice as Rr, SelectItem as Rs, classifyHistoryShortcut as Rt, usePreviewThemeOverlay as S, buildGoogleMapsDirectionsUrl as Sa, createContextScope as Sc, curatedSiteStyles as Si, Pencil as Sl, decodePublicProductCategorySelectorQuery as Sn, getIconComponent as So, getWizardStepsForContext as Sr, textColorStyle as Ss, FileField as St, cancelPreview as T, formatDate as Ta, Button$1 as Tc, surfaceResolutionContextFromTheme as Ti, Monitor as Tl, AMBIENT_BACKGROUND_ROLES as Tn, ChevronDownIcon as To, courseRegistrationBlockDefinition as Tr, SdkConfigProvider as Ts, ReferenceWidgetProvider as Tt, styleConfiguratorHistoryEntryForPersistedSelection as U, resolveEventRegistrationScopedEvents as Ua, toScheduledBookingDateTime as Uc, defaultThemeTokens as Ui, visibleHeaderClearancePx as Un, resolveImageUrlWithContext as Uo, deriveCommerceCheckoutState as Ur, SearchInput as Us, canUndoHistory as Ut, resetTypographyToSaved as V, resolveRuntimeEventPricing as Va, resolveBookingTimeZoneId as Vc, foregroundTokenForBackgroundAppearanceColorToken as Vi, __exportAll as Vl, SITE_OVERLAY_HEADER_CLEARANCE_CSS_VAR as Vn, renderAudio as Vo, buildPassCartItem as Vr, Callout as Vs, useOptionalEditorUiStoreInstance as Vt, syncStyleConfiguratorState as W, blockBookingPaymentTermsSchema as Wa, parseEventPageSurfaceSubject as Wc, curatedPalettes as Wi, contentTransforms as Wn, resolveMediaNodeResponsiveImage as Wo, parseStoredCommerceCartState as Wr, Popover as Ws, createHistoryState as Wt, idleEditorTransactionQueueState as X, defineProgressiveBlockRuntime as Xa, publicEventTicketTypes as Xc, OFFERINGS_PREVIEW_DEFAULT_FAILED_MESSAGE as Xi, ImageResolveContextProvider as Xn, siblingPath$1 as Xo, faqAccordionFragment as Xr, TabsList as Xs, useMultiAutosave as Xt, enqueueTransaction as Y, defineClientOwnedBlockRuntime as Ya, publicEventScalarPrice as Yc, OFFERINGS_PREVIEW_DEFAULT_EMPTY_MESSAGE as Yi, createManifestValidator as Yn, getAtPath as Yo, cardFragment as Yr, TabsContent as Ys, recordsEqual as Yt, rejectAutosaveBatch as Z, EDITABLE_SURFACE_FORWARDING_PROP as Za, formatCurrencyAmount as Zc, OFFERINGS_PREVIEW_EVENT_PRESET_DEFINITIONS as Zi, useImageResolveContextOptional as Zn, buttonStyleSelectionParameterValue as Zo, faqHeadingFragment as Zr, TabsTrigger as Zs, useDebouncedLatestSave as Zt, cycleableSiteChromeOptions as _, when as _a, DropdownMenuTrigger as _c, compileEditorModelRuntime as _i, Smartphone as _l, useMediaEditorOptional as _n, inlineTextToPlainText as _o, resolveDiscountContext as _r, paletteColorEntries as _s, IconPickerField as _t, previewDesignHistoryDomainForCommand as a, buildEventCollectionDisplay as aa, CollapsibleContent as ac, heroCtaRowFragment as ai, unsafeAsFormId as al, resolveContentTitle as an, resolveFeatureCardGeneratedIconSizePx as ao, buildEventListingInteractiveIslandProps as ar, parseThemeForPersistence as as, useUISelector as at, usePreviewDesignCoordinator as b, eventCalendarListLayoutCompatibleDisplayModeValues as ba, createCollection as bc, planPageDesignLayoutLookCompatibility as bi, Redo2 as bl, getPageDesignEditorState as bn, canonicalizePersistedBlockButtonRole as bo, WIZARD_STEPS as br, mergeStyles as bs, ButtonVariantField as bt, selectionSnapshotFromApplySiteStyleSelectionResponse as c, eventCollectionDisplaySchemaShape as ca, Root$3 as cc, bodyCopyFragment as ci, ok$1 as cl, validateBlockManifestIssues as cn, parseBlockIconValue as co, buildEventCalendarListingDisplay as cr, resolveOnColorForThemeToken as cs, useEntryController as ct, resolveStyleConfiguratorInitialSnapshot as d, buildEventRuntimeFilters as da, Surface as dc, getAnchorClasses as di, Undo2 as dl, createManifestValidation as dn, parseGeneratedIconSetId as do, buildFormInteractiveIslandProps as dr, pageDesignEditorBackgroundOverrideOwner as ds, createSiteOptionWidgetAdapters as dt, resolveOfferingsPreviewCoursePath as ea, DialogDescription as ec, formEmbedFragment as ei, parseMediaAssetId as el, BUILT_IN_REFERENCE_KINDS as en, splitPositioningClasses as eo, productListBlockDefinition as er, updateButtonStyleSelectionChoice as es, FooterComposerPanel as et, PREVIEW_DESIGN_LOAD_ERROR_MESSAGE as f, getEventRuntimeFiltersKey as fa, DropdownMenu as fc, boxStylesTransforms as fi, TriangleAlert as fl, FormRenderer as fn, RichTextDocSchema as fo, eventRegistrationBlockDefinition as fr, asDesignBlockId as fs, SiteOptionPickerField as ft, cycleSiteChromeLookId as g, el as ga, DropdownMenuSeparator as gc, applyCompiledRuntimeFieldsToContent as gi, Sparkles as gl, MediaEditorContextProvider as gn, coerceInlineTextWithFallback as go, findPreSelectedEvent as gr, normalizeCardVariantRole as gs, InlineTextField as gt, buildSiteChromeLookModels as h, normalizeOptionalId as ha, DropdownMenuLabel as hc, formatSiteChromeBackgroundTokenLabel as hi, Star as hl, MediaEditor as hn, logger$1 as ho, findEventByOccurrenceId as hr, normalizeBoxStylesCardVariant as hs, OfferingsPreviewWidgetProvider as ht, usePreviewDesignHistoryOrder as i, resolveSpacing as ia, Collapsible as ic, ctaCopyFragment as ii, unsafeAsCustomerPassId as il, resolvePageRouteSlug as in, FEATURE_CARD_ICON_TREATMENTS as io, eventListingBlockDefinition as ir, themeButtonClassName as is, ContentFieldsForm as it, markApplySaved as j, formatTime as ja, unsafeAsEditorBlockId as jc, parseGradientPresetId as ji, Eye as jl, DEFAULT_THEME_RESPONSIVE_MODE as jn, FileAudioIcon as jo, buildProductDetailInteractiveIslandProps as jr, FieldFrame as js, LinkField as jt, isPreviewingChange as k, formatEventPriceDisplay as ka, clsx as kc, GRADIENT_PRESET_IDS as ki, Image as kl, createCustomBlockRegistry as kn, DownloadIcon as ko, buildCartInteractiveIslandProps as kr, mapOptionValueForSelect as ks, EditorProvider as kt, deriveSiteStylePreviewUpdate as l, eventCollectionHydrationSchema as la, Trigger$3 as lc, defineFragment as li, X as ll, ManifestForm as ln, resolveBlockIconRenderValue as lo, buildEventCalendarListingRender as lr, resolveTokenOrCssColorValue as ls, useEntryEditorController as lt, reportPreviewDesignError as m, normalizeCsvString as ma, DropdownMenuItem as mc, resolveBackgroundColorValue as mi, Tablet as ml, createStoreBackend as mn, isRecord$10 as mo, toRegistrationEvents as mr, ICON_CONFIG as ms, OfferingsPreviewGroupOrderField as mt, useSiteChromeCustomizeOptional as n, resolveOfferingsPreviewGroups as na, DialogHeader as nc, testimonialsCarouselFragment as ni, unsafeAsAppointmentResourceId as nl, parseReferenceKind as nn, PUBLIC_DOWNLOAD_MEDIA_TYPES as no, newsletterSignupBlockDefinition as nr, AFFORDANCE_SUPPRESS_CLASS as ns, PreviewInlineTextEditor as nt, selectPreviewDesignHistoryDomain as o, buildEventCollectionHydration as oa, CollapsibleTrigger as oc, ctaRowFragment as oi, unsafeAsPassId as ol, PaletteProvider as on, shouldReserveFeatureCardIconZone as oo, eventCalendarBlockDefinition as or, getTextColorForBackground as os, EditableBlockProvider as ot, PREVIEW_DESIGN_SAVE_ERROR_MESSAGE as p, normalizeCsvIds as pa, DropdownMenuContent as pc, resolveSurfaceForegroundStyles as pi, Ticket as pl, evaluateVisibility as pn, isObjectRecord$1 as po, buildEventRegistrationInteractiveIslandProps as pr, assertNever$5 as ps, SiteOptionWidgetProvider as pt, confirmAutosaveBatch as q, defineInteractiveIslandMetaKeys as qa, publicEventPricingMode as qc, ctaButton as qi, uiTransforms as qn, SECTION_BACKGROUND_MIN_SOURCE_WIDTH as qo, richTextFragment as qr, Input as qs, undoHistory as qt, PreviewDesignHistoryOrderProvider as r, isSemanticSpacing as ra, DialogTitle as rc, testimonialsHeadingFragment as ri, unsafeAsAppointmentServiceId as rl, deriveRouteMetadataPresentation as rn, mediaSchema as ro, buildNewsletterFormInteractiveIslandProps as rr, parseThemeButtonVariantId as rs, PreviewTextEditor as rt, buildApplySiteStyleSelectionBody as s, buildEventCollectionListingDisplay as sa, Content$1 as sc, heroCopyFragment as si, err as sl, usePalette as sn, buildGeneratedBlockIconRenderAssetLookupFromUnknown as so, buildEventCalendarInteractiveIslandProps as sr, isCssColorLiteral as ss, EntryControllerProvider as st, SiteChromeCustomizeProvider as t, resolveOfferingsPreviewGroupCta as ta, DialogFooter as tc, formCopyFragment as ti, parseSiteId as tl, isAdapterReferenceKind as tn, planSiteChromePlacement as to, productDetailBlockDefinition as tr, buttonStyleSelectionKey as ts, PreviewRichTextEditor as tt, planSiteStylePreviewChange as u, eventCollectionSourceSchemaShape as ua, createCollapsibleScope as uc, BACKGROUND_POSITION_PRESET_VALUES as ui, Upload as ul, createManifestFormAdapter as un, parseGeneratedIconAssetId as uo, formBlockDefinition as ur, isThemeV2NormalEditorRawStyleFieldName as us, createSiteOptionApiLoader as ut, planSiteChromeLookSelection as v, bindingSchema as va, useId$1 as vc, retargetCompiledBoundaryRuntimeForContentAdjacency as vi, SlidersHorizontal as vl, useApiMediaUploader as vn, isInlineTextEmpty as vo, resolveEventRequiresPayment as vr, paletteColorsSchema as vs, EntryPickerField as vt, applyTypographyDraftPatch as w, toLocationMapHydrationProps as wa, Primitive as wc, getCuratedSiteStyle as wi, Palette as wl, deriveLaunchReadiness as wn, ArrowRightIcon as wo, buildGiftingInteractiveIslandProps as wr, isHeaderField as ws, ReferenceField as wt, PreviewThemeOverlayProvider as x, eventCalendarListLayoutOptions as xa, useControllableState as xc, componentRuntimeRulesForTheme as xi, Plus as xl, listEntryPageContentSlots as xn, isBlockButtonRole as xo, getStepNumber as xr, rgbColorValue as xs, ButtonWidgetProvider as xt, PreviewDesignCoordinatorProvider as y, previewStageSchema as ya, useDirection as yc, retargetCompiledRuntimeFieldsForContentAdjacency as yi, RotateCcw as yl, applyPageDesignEditorAction as yn, parseInlineTextFromUnknown as yo, resolveRegistrationTarget as yr, backgroundColorStyle as ys, EntryPickerWidgetProvider as yt, previewHeaderStyle as z, getLocalDateKey as za, getBookingLocalDateKey as zc, backgroundAppearanceColorTokenNames as zi, Check as zl, siteHeaderManifest as zn, computeMediaTransformStyle as zo, formatInterval as zr, SelectTrigger as zs, useEditorUiStore as zt };