riverbankcms 0.34.0 → 0.36.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.
- package/dist/acceptance/matrix.mjs +3 -3
- package/dist/cli/index.mjs +424 -311
- package/dist/cli/init-docs/content/getting-started.md +4 -4
- package/dist/cli/init-docs/content/workflow-isr-revalidation.md +2 -0
- package/dist/{entryCommands-DoJE41hf.mjs → entryCommands-Cx1aj859.mjs} +321 -53
- package/dist/{eventUpsertInputSchema-o-ntZyOs.mjs → eventUpsertInputSchema-Dj2LtxCt.mjs} +3 -2
- package/dist/load-config-D7f6MXJV.mjs +4 -0
- package/dist/{load-config-FQqihBPt.mjs → load-config-k3XF8V97.mjs} +2 -2
- package/dist/{plan-DQbhrxOI.mjs → plan-D-bOngd3.mjs} +8 -11
- package/dist/scaffold/index.mjs +2 -2
- package/dist/{sdk-event-upsert-DNjdjBVm.mjs → sdk-event-upsert-n4in1E4v.mjs} +3 -1
- package/dist/{src-B3ufN6kf.mjs → src-DHIn60_q.mjs} +871 -767
- package/dist/testing.mjs +4 -4
- package/package.json +1 -1
- package/dist/load-config-CwqwHzX8.mjs +0 -4
package/dist/cli/index.mjs
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import { $ as walkAndCollectImageAttrs, $t as flatInkParametersSchema, A as parseSiteChromeBackgroundColorToken, An as buildEntryScaffold, Ar as createContentEntryRef, At as getMimeType, B as sectionStylesOverrideSchema, Bn as isResolvedInternalLinkEntityType, Bt as footerPreferencesSchema, C as blockOrderIdentifiersForCommand, Cn as bookingPaymentCollectionOptionSchema, Cr as makeBoundaryId, Ct as parseCanonicalMediaIdentifier, D as pagePathForCommand, Dn as RichTextDocSchema, Dr as createBlockRef, Dt as deriveVideoSlotPolicy, E as pageIdentifierForCommand, Er as ianaTimezoneSchema, F as defaultHeaderBrandPreferences, Fn as entryLinkSchema$1, Fr as createNavigationRef, G as headerInteractionQuietPalette, Gn as parseGradientPresetId, Gt as cardVariantRoleValues, H as skinBookingBarSchema, Hn as pageLinkSchema$1, Hr as __toESM, Ht as boxlessCardVariantValue, In as externalLinkSchema$1, Ir as createPageRef, It as classifyKnownMimeType, J as boxBackgroundOverlaySchema, Jn as asHeaderLayoutId, Jt as surfaceCardRoleValues, K as blockCustomCssRuleSchema, Kt as itemRoleValues, L as cardStylesOverrideSchema, Ln as internalLinkSchema, Lt as managementMediaLibraryUploadLimitForMimeType, M as defaultHeaderPreferences, Mn as findUnfilledSentinels, Mr as createEventSeriesRef, N as defaultHeaderNavPreferences, Nn as RESOLVED_INTERNAL_LINK_ENTITY_TYPES, Nr as createFooterRef, Nt as parseRelativeStoragePath, O as hasConfiguredBookingVertical, On as isRichTextDoc, Or as createBlocksRef, Ot as resolveVideoSelectionIntentForMediaField, P as defaultHeaderBrandPresentation, Pn as customLinkSchema$1, Pr as createFormRef, Pt as FILE_SIZE_LIMITS, Q as summarizePortableMediaReferences, Qt as flatInkHoverTreatmentSchema, R as containerStylesOverrideSchema, Rn as internalResolvedLinkSchema, Rr as createVenueRef, Rt as parseSafeDownloadFilename, S as blockIdentifierForCommand, Sr as asSiteStyleId, St as buildMediaIdentifierFromFilename, T as pageIdentifierForBlockCommand, Tn as eventCommandScheduleSchema, U as headerVariantValues, Un as ICON_PICKER_PRESETS, Ut as cardRoleSchema, V as themeSchema, Vn as linkSchema, Vr as __commonJSMin, Vt as getFontWidthRange, W as headerInteractionPaletteValues, Wn as gradientPresetIdValues, Wt as cardRoleValues, X as runtimeBoxBackgroundSchema, Xn as bookingPageLookIdValues, Xt as buttonStyleSelectionSchema, Y as boxBackgroundSchema, Yn as asHeaderStyleId, Yt as BUTTON_STYLE_IDS, Z as collectPortableMediaReferencesFromContent, Zt as editorialLinkParametersSchema, _ as mapEventCommandContent, _n as paletteTokenNameSchema, _t as resolveManagedMediaReference, an as buttonVariantIdSchema, ar as arrangementModes, at as parseAspectRatioValue, bn as changeBookingQuestionsInputSchema, br as asLayoutVariantKey, bt as mediaTypeDiscriminants, c as isEventVisibility, cn as parseOpaqueButtonColourToken, cr as headingDecorationColorTokenValues, ct as getDirectImageUrlForSiteScopedPath, d as venueManagementFields, dn as hexColorSchema, dr as visibleHeadingDecorationFamilyValues, dt as imageMediaSchema, en as quietArrowParametersSchema, er as pageDesignEditorBackgroundOverrideOwner, et as deleteEnvSpecificKeys, f as sortRecord, fn as normalizePaletteHex, fr as asAppearancePresetId, ft as mediaSchema, g as resolveEventSeriesWaitlistMapping, gn as paletteModeSchema, gr as asDesignBlockId, gt as buildRenderableMediaAssetIndex, hn as paletteColorsSchema, hr as asBoundaryOptionId, ht as videoMediaSchema, i as sdkEventUpsertOptionalFieldSchemas, in as buttonSystemSchema, ir as VARIANT_ROLES, it as isExplicitRectCrop, j as backgroundAppearanceColorTokenNames, jn as validateEntryInstance, jr as createEventCategoryRef, jt as asRecord, k as headerPreferencesSchema, kn as sanitizeHref, kr as createCommandRef, ln as PALETTE_TOKEN_NAMES, lr as isArrangementMode, lt as getImageUrl, mn as paletteColorsFromEntries, mr as asBlockOrderIndex, mt as runtimeMediaSchema, nn as buttonEffectApplicationSchema, nr as siteChromeBackgroundOverrideOwner, nt as rotateNormalizedPoint, o as classifySdkEventBookingOffer, on as buttonVisualStatesSchema, or as eventListTreatmentValues, ot as resolveMediaTransformForAspect, p as stableStringify, pn as paletteColorEntries, pr as asBlockContentVersionId, pt as persistableMediaSchema, q as customCssRuleSchema, qn as asFooterLookId, qt as openCardRoleValue, rn as buttonPressOffsetSchema, rt as normalizeWidthCandidates, sn as opaqueButtonColourTokenSchema, sr as eyebrowTreatmentValues, st as getDirectImageUrlForRelativePath, t as classifySdkEventTiming, tn as squareOutlineParametersSchema, tr as parseBookingPageLookId, tt as looksLikeUuid, u as eventCategoryManagementFields, un as blockColorTokenNames, ur as tileTreatmentValues, ut as isSiteScopedDirectImageStoragePath, vn as parseColorTokenParts, vr as asDesignPageId, vt as PUBLIC_FILE_FIELD_KINDS, w as entryIdentifierForCommand, wn as bookingPaymentTermsSchema, wt as parseMediaIdentifier, x as eventManagementTiming, xr as asPageFlowPresetId, xt as mediaIdentifierSchema, yn as parseThemeColorToken, yr as asDesignSystemTemplateId, z as headerPositioningValues, zn as internalRouteOnlyLinkSchema, zr as refSlug, zt as defaultFooterPreferences } from "../sdk-event-upsert-
|
|
3
|
-
import { $ as footerLayoutForLookId,
|
|
4
|
-
import { $ as walkLocalContentMedia, $n as extractApiErrorMessage, $r as ApiEnvelopeError, $t as commandContexts, A as formatDiffSummary, An as isLocalConfigured, Ar as getBookingLaterInstalments, At as navigationIdentityMap, B as formatFieldChange, Bn as DEFAULT_MEDIA_FIELD_KINDS, Br as publicProductSchema, Bt as ACCOUNT_SITE_SEARCH_MAX_LENGTH, C as reportFromOutcomes, Cn as ErrorCodes, Cr as planFlexibleBalanceCreditFirst, Ct as listFiles, D as calculateDiff, Dr as resolveAvailableBookingCollectionOptions, Dt as isMediaValue, E as createEmptySyncResult, En as CliExit, Er as repriceBookingCollectionOptions, Et as writeJsonFileAtomic, F as buildJsonDiff, Fn as cardListKnobBlocks, Fr as eventCalendarListLayoutValues, Ft as createBearerAccountApi, G as applyLocalMediaPush, Gn as MAX_REPEATER_GRID_COLUMNS, Gr as calendarMonthWindowSchema, Gt as createPushConfigCommand, H as revalidateLocalMediaPushPlan, Hn as blockContentSourceSchema, Hr as purchasablePublicPassProductSchema, Ht as navigationCommandItemToManagementInput, I as hasPageOperations, In as lookKnobBlocks, Ir as publicMapLocationResultSchema, It as ACCOUNT_SITE_CURSOR_MAX_LENGTH, J as readStableBinaryFile, Jn as resolveRepeaterGridColumnFieldId, Jr as eventSurfacePresetValues, Jt as revalidatePushConfigPlan, K as prepareLocalMediaForPush, Kn as isAcceptedRepeaterGridSpan, Kr as calendarSourceCursorSchema, Kt as loadPushConfigTarget, L as pageMetadataForUpsert, Ln as NodeSchema, Lr as publicVenueMapLocationSchema, Lt as ACCOUNT_SITE_LIST_LIMIT_DEFAULT, M as findChangedFieldsWithValues, Mn as loadSdkEnvironment, Mr as eventCalendarDefaultViewValues, Mt as convertPulledNavigationToLocal, N as formatHumanDiff, Nn as cardListBlockParts, Nr as eventCalendarDisplayModeValues, Nt as convertPulledPagesToLocal, O as calculateFooterDiff, On as getEnvPrefix, Or as resolveBookingCollectionOptionFacts, Ot as duplicateNavigationIdentityMessage, P as calculatePullDiff, Pn as cardListFamilyBlocks, Pr as eventCalendarListLayoutCompatibleDisplayModeValues, Pt as AccountApiMalformedResponseError, Q as normalizeMediaValueToIdentifierOnly, Qn as ManagementApiError, Qr as publicEventLoaderQuerySchemaShape, Qt as CommandFailure, Rn as NodeTreeSchema, Rr as publicMembershipProductSchema, Rt as ACCOUNT_SITE_LIST_LIMIT_MAX, S as planCliCommandBatchForBindings, Sn as withRiverbankEnv, Sr as planCheckoutPaymentFlow, St as fileExists, T as executeResidualSettingsSyncPlan, Tn as transportSuggestion, Tr as isBookingCollectionEquivalentToUpfront, Tt as writeJsonFile, Un as blockRequiredFeatureSchema, Ur as CALENDAR_SSR_PAGE_SIZE, Ut as normalizeNavigationConfigItemForCommand, V as formatFieldPath, Vn as blockCategoryEnum, Vr as purchasablePublicMembershipProductSchema, Vt as ACCOUNT_SITE_TITLE_MAX_LENGTH, W as syncLocalMediaForPull, Wn as fieldSchema$1, Wr as calendarMonthDate, Wt as applyPushConfigPlan, X as sha256, Xn as resolveRepeaterGridSpanFieldId, Xr as monthNumber, Xt as deriveCmsApiUrlFromDashboardUrl, Y as writeBinaryFileAtomic, Yn as resolveRepeaterGridRowFieldId, Yr as eventSurfaceScopeValues, Yt as createBearerAPIClient, Z as normalizeMediaIdentifierInput, Zn as visibilityLevels, Zr as normalizeCalendarFilterId, Zt as mapEnvironmentExecutionOutcomesJson, _ as commandExecutionToReport, _n as executeEnvironmentPlan, _r as nextCombinationHint, _t as metadataTargetFromEnvironment, a as executeEntryCommandPlanAsReport, an as confirmAction, ar as linkPayloadSchema, at as readAllMeta, b as executeCompiledCliCommandPlanAsReport, bn as planEnvironmentWriteAuthorization, br as checkoutCopy, bt as writeMetadataRecordMap, c as titleFromEntryData, cn as formatDateShort, cr as pageDesignIntentSchemaVersion, ct as readFooterMeta, d as unsafeAsCliEntryIdentifier, dn as managementClientFor, dr as areEventBookingRequirementsIdentical, dt as readPagesMeta, ei as unwrapResponse, en as defineCommand, er as normalizeApiError, et as buildStorageUrl, f as unsafeAsCliFormSlug, fn as mapEntryForOutput, fr as eventBookingConsentContentKey, ft as readSettingsMeta, g as commandCompileFailureToReport, gn as runWithInvocation, gr as checkoutStatusArms, gt as metadataFilePath, h as mutationCounterForEffect, hn as resolveCommandPath, hr as resolveSelectionAttendanceMode, ht as ensureMetadataDir, i as entrySiteCommandTypes, in as bindRequestTimeout, ir as sdkSettingsUpdateSchema, it as readEntries, j as hasPendingChanges, jn as isRemoteConfigured, jr as MAX_EVENT_BOOKING_SELECTION_ITEMS, jt as convertPulledFooterToLocal, k as formatDiffDetail, kn as getEnvironmentDebugInfo, kr as getStripeMinimumChargeRequirement, kt as navigationIdentity, l as unsafeAsCliBlockIdentifier, ln as handleCommandError, lr as sdkConfiguredBookingVerticalConfigSchema, lt as readFormsMeta, m as commandReportToSyncResult, mn as parseJsonData, mr as decideSelectionAttendance, mt as writeMediaManifest, n as entryCommandCompileErrorToReport, nn as registerCommand, nr as ApiRequestError, nt as extractMediaIdentifiers, o as executeEntryCommandPlanAsSyncResult, on as createOutputForCommand, or as portablePageDesignSchema, ot as readEventCategoriesMeta, p as unsafeAsCliPageIdentifier, pn as parseJsonArray, pr as INCOMPATIBLE_ATTENDANCE_MESSAGE, pt as readVenuesMeta, q as admitBinaryWriteDestination, qn as parseRepeaterGridInteger, qr as eventScheduleScopeValues, qt as preparePushConfigTarget, r as entryCommandReportToSyncResult, rn as renderedByOwner, rr as sdkEventScheduleSchema, rt as findLegacyEntryFiles, s as syncResultForEntryCommandCompileError, sn as currentInvocationEnvelope, sr as pageDesignDecisionsV2Schema, st as readEventsMeta, t as compileEntryPushCommands, tn as defineCommandGroup, tr as isRecord$2, tt as downloadMedia, u as unsafeAsCliContentTypeKey, un as loadManagementTarget, ur as API_ENDPOINTS, ut as readNavigationMeta, v as commandReportHasFailures, vn as parseEnvironmentSelection, vr as planSelectionCombinationPrices, vt as readMetadataFile, w as mergeManySyncResults, wn as formatError, wr as flexibleBalanceDueDay, wt as readJsonFile, x as formatManagementError, xn as requireEnvironmentWriteAuthorization, xr as unsafeAsPositiveCheckoutQuantity, xt as ensureDir, y as executeCliCommandPlan, yn as planEnvironmentExecution, yr as eventRegistrationErrors, yt as writeMetadataFile, z as buildFieldChanges, zn as bindingSchema, zr as publicPassProductSchema, zt as ACCOUNT_SITE_LIST_LIMIT_MIN } from "../entryCommands-
|
|
5
|
-
import { r as CLI_VERSION, t as loadConfigFile } from "../load-config-
|
|
6
|
-
import { t as eventUpsertInputSchema } from "../eventUpsertInputSchema-
|
|
7
|
-
import { a as prepareScaffoldExecution, c as LOCAL_PACKAGE_VENDOR_DIR, d as loadGeneratedPackageRanges, i as preflightScaffoldTargets, n as createScaffoldCompletion, s as deriveScaffoldLocalManifest, t as deriveScaffoldPlan } from "../plan-
|
|
2
|
+
import { $ as walkAndCollectImageAttrs, $t as flatInkParametersSchema, A as parseSiteChromeBackgroundColorToken, An as buildEntryScaffold, Ar as createContentEntryRef, At as getMimeType, B as sectionStylesOverrideSchema, Bn as isResolvedInternalLinkEntityType, Bt as footerPreferencesSchema, C as blockOrderIdentifiersForCommand, Cn as bookingPaymentCollectionOptionSchema, Cr as makeBoundaryId, Ct as parseCanonicalMediaIdentifier, D as pagePathForCommand, Dn as RichTextDocSchema, Dr as createBlockRef, Dt as deriveVideoSlotPolicy, E as pageIdentifierForCommand, Er as ianaTimezoneSchema, F as defaultHeaderBrandPreferences, Fn as entryLinkSchema$1, Fr as createNavigationRef, G as headerInteractionQuietPalette, Gn as parseGradientPresetId, Gt as cardVariantRoleValues, H as skinBookingBarSchema, Hn as pageLinkSchema$1, Hr as __toESM, Ht as boxlessCardVariantValue, In as externalLinkSchema$1, Ir as createPageRef, It as classifyKnownMimeType, J as boxBackgroundOverlaySchema, Jn as asHeaderLayoutId, Jt as surfaceCardRoleValues, K as blockCustomCssRuleSchema, Kt as itemRoleValues, L as cardStylesOverrideSchema, Ln as internalLinkSchema, Lt as managementMediaLibraryUploadLimitForMimeType, M as defaultHeaderPreferences, Mn as findUnfilledSentinels, Mr as createEventSeriesRef, N as defaultHeaderNavPreferences, Nn as RESOLVED_INTERNAL_LINK_ENTITY_TYPES, Nr as createFooterRef, Nt as parseRelativeStoragePath, O as hasConfiguredBookingVertical, On as isRichTextDoc, Or as createBlocksRef, Ot as resolveVideoSelectionIntentForMediaField, P as defaultHeaderBrandPresentation, Pn as customLinkSchema$1, Pr as createFormRef, Pt as FILE_SIZE_LIMITS, Q as summarizePortableMediaReferences, Qt as flatInkHoverTreatmentSchema, R as containerStylesOverrideSchema, Rn as internalResolvedLinkSchema, Rr as createVenueRef, Rt as parseSafeDownloadFilename, S as blockIdentifierForCommand, Sr as asSiteStyleId, St as buildMediaIdentifierFromFilename, T as pageIdentifierForBlockCommand, Tn as eventCommandScheduleSchema, U as headerVariantValues, Un as ICON_PICKER_PRESETS, Ut as cardRoleSchema, V as themeSchema, Vn as linkSchema, Vr as __commonJSMin, Vt as getFontWidthRange, W as headerInteractionPaletteValues, Wn as gradientPresetIdValues, Wt as cardRoleValues, X as runtimeBoxBackgroundSchema, Xn as bookingPageLookIdValues, Xt as buttonStyleSelectionSchema, Y as boxBackgroundSchema, Yn as asHeaderStyleId, Yt as BUTTON_STYLE_IDS, Z as collectPortableMediaReferencesFromContent, Zt as editorialLinkParametersSchema, _ as mapEventCommandContent, _n as paletteTokenNameSchema, _t as resolveManagedMediaReference, an as buttonVariantIdSchema, ar as arrangementModes, at as parseAspectRatioValue, bn as changeBookingQuestionsInputSchema, br as asLayoutVariantKey, bt as mediaTypeDiscriminants, c as isEventVisibility, cn as parseOpaqueButtonColourToken, cr as headingDecorationColorTokenValues, ct as getDirectImageUrlForSiteScopedPath, d as venueManagementFields, dn as hexColorSchema, dr as visibleHeadingDecorationFamilyValues, dt as imageMediaSchema, en as quietArrowParametersSchema, er as pageDesignEditorBackgroundOverrideOwner, et as deleteEnvSpecificKeys, f as sortRecord, fn as normalizePaletteHex, fr as asAppearancePresetId, ft as mediaSchema, g as resolveEventSeriesWaitlistMapping, gn as paletteModeSchema, gr as asDesignBlockId, gt as buildRenderableMediaAssetIndex, hn as paletteColorsSchema, hr as asBoundaryOptionId, ht as videoMediaSchema, i as sdkEventUpsertOptionalFieldSchemas, in as buttonSystemSchema, ir as VARIANT_ROLES, it as isExplicitRectCrop, j as backgroundAppearanceColorTokenNames, jn as validateEntryInstance, jr as createEventCategoryRef, jt as asRecord, k as headerPreferencesSchema, kn as sanitizeHref, kr as createCommandRef, ln as PALETTE_TOKEN_NAMES, lr as isArrangementMode, lt as getImageUrl, mn as paletteColorsFromEntries, mr as asBlockOrderIndex, mt as runtimeMediaSchema, nn as buttonEffectApplicationSchema, nr as siteChromeBackgroundOverrideOwner, nt as rotateNormalizedPoint, o as classifySdkEventBookingOffer, on as buttonVisualStatesSchema, or as eventListTreatmentValues, ot as resolveMediaTransformForAspect, p as stableStringify, pn as paletteColorEntries, pr as asBlockContentVersionId, pt as persistableMediaSchema, q as customCssRuleSchema, qn as asFooterLookId, qt as openCardRoleValue, rn as buttonPressOffsetSchema, rt as normalizeWidthCandidates, sn as opaqueButtonColourTokenSchema, sr as eyebrowTreatmentValues, st as getDirectImageUrlForRelativePath, t as classifySdkEventTiming, tn as squareOutlineParametersSchema, tr as parseBookingPageLookId, tt as looksLikeUuid, u as eventCategoryManagementFields, un as blockColorTokenNames, ur as tileTreatmentValues, ut as isSiteScopedDirectImageStoragePath, vn as parseColorTokenParts, vr as asDesignPageId, vt as PUBLIC_FILE_FIELD_KINDS, w as entryIdentifierForCommand, wn as bookingPaymentTermsSchema, wt as parseMediaIdentifier, x as eventManagementTiming, xr as asPageFlowPresetId, xt as mediaIdentifierSchema, yn as parseThemeColorToken, yr as asDesignSystemTemplateId, z as headerPositioningValues, zn as internalRouteOnlyLinkSchema, zr as refSlug, zt as defaultFooterPreferences } from "../sdk-event-upsert-n4in1E4v.mjs";
|
|
3
|
+
import { $ as footerLayoutForLookId, $t as resolveBookingDisplayContext, B as parseManagementKey, Bt as deriveTotalTicketQuantity, Cn as publicEventPricingDisplay, Ct as mapDrawingSchema, Dn as resolveExactOrFreePriceDisplay, En as publicEventPricingType, F as orderedLiveRunSessions, Fr as blockInteractionContextSchema, G as parseMailingListRuntimeContext, Gt as hasBookingClosed, H as parseMailingListBlockId, Hn as formatDurationUnitLabel, Ht as bookingCutOffHoursBetween, I as resolveWholeSeriesBookingPhase, In as toNonNegativeCents, Jn as parseSiteTermsVersionId, Jt as formatDateTime, K as assessMailingListTargeting, Kt as formatDate, L as resolveWholeSeriesRunLifecycle, M as CANCELLED_SESSION_STATUS, Mt as getBookingInstalmentPlanIntervalCount, N as firstLiveRunSessionStartMs, Nr as err, Nt as getBookingInstalmentProtectedDepositAmountCents, On as resolvePricingOptionsPriceDisplay, P as nextLiveRunSessionStartMs, Pr as ok, Q as parseFooterCompositionV1, Qt as inferSiteDateLocale, R as createSecret, S as EVENT_PRESET_VALUES, Sn as publicEventPricingCurrency, Sr as parseUserId, St as trimmedStringOrNull, T as WHOLE_SERIES_EVENT_PRESET_VALUES, Tn as publicEventPricingStrategy, Tr as parseEventSeriesId, Tt as buildBookingUtcDateWindow, U as parseMailingListContentVersionId, Ut as formatBookingClosedTime, V as slugify, Vn as assertNever, W as parseMailingListSignedSourceToken, Wn as unsafeAsDemoCapability, Wt as formatBookingCutOffHours, X as DEFAULT_MAILING_LIST_SUCCESS_MESSAGE, Xt as formatTime$1, Y as DEFAULT_MAILING_LIST_PRIVACY_NOTE, Yt as formatDateTimeRange, Zt as formatTimeRange, _n as parsePageSurfaceSubject, _t as parseLocationValue, a as authoredValuesEqual, an as getBookingLocalDateKey, ar as unsafeAsMediaAssetId, at as formatOpeningHoursRows, b as resolveSiteVerticalBookingConfig, bn as formatEventPricing, br as parseApiKeyId, bt as toLocationCoordinates, d as formatCreditProductUnits, dn as parseUtcIsoDateTimeString, dt as decideLocationSave, en as toScheduledBookingDateTime, et as parseMailingListPlacementTargeting, fn as toUtcIsoDateTimeString, ft as stableJsonStringify, gt as normalizeLocationAddressText, h as NAVIGATION_LOCATIONS, hn as toBookingTimeZone, ht as locationValueSchema, i as isRecord$27, in as formatLocalScheduleTime, it as richTextHasText, jn as mapReadonlyNonEmptyArray, l as creditProductUnitNoun, ln as parseBookingLocalDate, mn as resolveBookingTimeZoneId, mt as EVENT_ADDRESS_AFTER_BOOKING_LABEL, nn as compareLocalScheduleDates, nt as planMailingListChoicePresentation, on as getLocalScheduleDate, pn as resolveBookingBusinessTimeZone, pt as locationMapLinks, qt as formatDateRange, rn as formatLocalScheduleDate, rt as isCanonicalRichTextDoc, sn as getLocalScheduleTime, sr as unsafeAsPositiveByteCount, st as parseWeeklyOpeningHours, tt as DEFAULT_MAILING_LIST_TARGETING, u as formatCreditProductPayment, un as parseLocalScheduleTime, vn as EVENT_PRESET_VOCABULARY, vt as projectPublicLocation, wn as publicEventPricingOptions, wt as selectCategoryView, xn as isPublicEventPricingOptionDisplayable, xr as parseSiteId, yn as formatBookingPriceDisplay, yt as publicLocationSchema, z as exposeSecret, zn as formatCurrencyAmount } from "../src-DHIn60_q.mjs";
|
|
4
|
+
import { $ as walkLocalContentMedia, $n as extractApiErrorMessage, $r as ApiEnvelopeError, $t as commandContexts, A as formatDiffSummary, An as isLocalConfigured, Ar as getBookingLaterInstalments, At as navigationIdentityMap, B as formatFieldChange, Bn as DEFAULT_MEDIA_FIELD_KINDS, Br as publicProductSchema, Bt as ACCOUNT_SITE_SEARCH_MAX_LENGTH, C as reportFromOutcomes, Cn as ErrorCodes, Cr as planFlexibleBalanceCreditFirst, Ct as listFiles, D as calculateDiff, Dr as resolveAvailableBookingCollectionOptions, Dt as isMediaValue, E as createEmptySyncResult, En as CliExit, Er as repriceBookingCollectionOptions, Et as writeJsonFileAtomic, F as buildJsonDiff, Fn as cardListKnobBlocks, Fr as eventCalendarListLayoutValues, Ft as createBearerAccountApi, G as applyLocalMediaPush, Gn as MAX_REPEATER_GRID_COLUMNS, Gr as calendarMonthWindowSchema, Gt as createPushConfigCommand, H as revalidateLocalMediaPushPlan, Hn as blockContentSourceSchema, Hr as purchasablePublicPassProductSchema, Ht as navigationCommandItemToManagementInput, I as hasPageOperations, In as lookKnobBlocks, Ir as publicMapLocationResultSchema, It as ACCOUNT_SITE_CURSOR_MAX_LENGTH, J as readStableBinaryFile, Jn as resolveRepeaterGridColumnFieldId, Jr as eventSurfacePresetValues, Jt as revalidatePushConfigPlan, K as prepareLocalMediaForPush, Kn as isAcceptedRepeaterGridSpan, Kr as calendarSourceCursorSchema, Kt as loadPushConfigTarget, L as pageMetadataForUpsert, Ln as NodeSchema, Lr as publicVenueMapLocationSchema, Lt as ACCOUNT_SITE_LIST_LIMIT_DEFAULT, M as findChangedFieldsWithValues, Mn as loadSdkEnvironment, Mr as eventCalendarDefaultViewValues, Mt as convertPulledNavigationToLocal, N as formatHumanDiff, Nn as cardListBlockParts, Nr as eventCalendarDisplayModeValues, Nt as convertPulledPagesToLocal, O as calculateFooterDiff, On as getEnvPrefix, Or as resolveBookingCollectionOptionFacts, Ot as duplicateNavigationIdentityMessage, P as calculatePullDiff, Pn as cardListFamilyBlocks, Pr as eventCalendarListLayoutCompatibleDisplayModeValues, Pt as AccountApiMalformedResponseError, Q as normalizeMediaValueToIdentifierOnly, Qn as ManagementApiError, Qr as publicEventLoaderQuerySchemaShape, Qt as CommandFailure, Rn as NodeTreeSchema, Rr as publicMembershipProductSchema, Rt as ACCOUNT_SITE_LIST_LIMIT_MAX, S as planCliCommandBatchForBindings, Sn as withRiverbankEnv, Sr as planCheckoutPaymentFlow, St as fileExists, T as executeResidualSettingsSyncPlan, Tn as transportSuggestion, Tr as isBookingCollectionEquivalentToUpfront, Tt as writeJsonFile, Un as blockRequiredFeatureSchema, Ur as CALENDAR_SSR_PAGE_SIZE, Ut as normalizeNavigationConfigItemForCommand, V as formatFieldPath, Vn as blockCategoryEnum, Vr as purchasablePublicMembershipProductSchema, Vt as ACCOUNT_SITE_TITLE_MAX_LENGTH, W as syncLocalMediaForPull, Wn as fieldSchema$1, Wr as calendarMonthDate, Wt as applyPushConfigPlan, X as sha256, Xn as resolveRepeaterGridSpanFieldId, Xr as monthNumber, Xt as deriveCmsApiUrlFromDashboardUrl, Y as writeBinaryFileAtomic, Yn as resolveRepeaterGridRowFieldId, Yr as eventSurfaceScopeValues, Yt as createBearerAPIClient, Z as normalizeMediaIdentifierInput, Zn as visibilityLevels, Zr as normalizeCalendarFilterId, Zt as mapEnvironmentExecutionOutcomesJson, _ as commandExecutionToReport, _n as executeEnvironmentPlan, _r as nextCombinationHint, _t as metadataTargetFromEnvironment, a as executeEntryCommandPlanAsReport, an as confirmAction, ar as linkPayloadSchema, at as readAllMeta, b as executeCompiledCliCommandPlanAsReport, bn as planEnvironmentWriteAuthorization, br as checkoutCopy, bt as writeMetadataRecordMap, c as titleFromEntryData, cn as formatDateShort, cr as pageDesignIntentSchemaVersion, ct as readFooterMeta, d as unsafeAsCliEntryIdentifier, dn as managementClientFor, dr as areEventBookingRequirementsIdentical, dt as readPagesMeta, ei as unwrapResponse, en as defineCommand, er as normalizeApiError, et as buildStorageUrl, f as unsafeAsCliFormSlug, fn as mapEntryForOutput, fr as eventBookingConsentContentKey, ft as readSettingsMeta, g as commandCompileFailureToReport, gn as runWithInvocation, gr as checkoutStatusArms, gt as metadataFilePath, h as mutationCounterForEffect, hn as resolveCommandPath, hr as resolveSelectionAttendanceMode, ht as ensureMetadataDir, i as entrySiteCommandTypes, in as bindRequestTimeout, ir as sdkSettingsUpdateSchema, it as readEntries, j as hasPendingChanges, jn as isRemoteConfigured, jr as MAX_EVENT_BOOKING_SELECTION_ITEMS, jt as convertPulledFooterToLocal, k as formatDiffDetail, kn as getEnvironmentDebugInfo, kr as getStripeMinimumChargeRequirement, kt as navigationIdentity, l as unsafeAsCliBlockIdentifier, ln as handleCommandError, lr as sdkConfiguredBookingVerticalConfigSchema, lt as readFormsMeta, m as commandReportToSyncResult, mn as parseJsonData, mr as decideSelectionAttendance, mt as writeMediaManifest, n as entryCommandCompileErrorToReport, nn as registerCommand, nr as ApiRequestError, nt as extractMediaIdentifiers, o as executeEntryCommandPlanAsSyncResult, on as createOutputForCommand, or as portablePageDesignSchema, ot as readEventCategoriesMeta, p as unsafeAsCliPageIdentifier, pn as parseJsonArray, pr as INCOMPATIBLE_ATTENDANCE_MESSAGE, pt as readVenuesMeta, q as admitBinaryWriteDestination, qn as parseRepeaterGridInteger, qr as eventScheduleScopeValues, qt as preparePushConfigTarget, r as entryCommandReportToSyncResult, rn as renderedByOwner, rr as sdkEventScheduleSchema, rt as findLegacyEntryFiles, s as syncResultForEntryCommandCompileError, sn as currentInvocationEnvelope, sr as pageDesignDecisionsV2Schema, st as readEventsMeta, t as compileEntryPushCommands, tn as defineCommandGroup, tr as isRecord$2, tt as downloadMedia, u as unsafeAsCliContentTypeKey, un as loadManagementTarget, ur as API_ENDPOINTS, ut as readNavigationMeta, v as commandReportHasFailures, vn as parseEnvironmentSelection, vr as planSelectionCombinationPrices, vt as readMetadataFile, w as mergeManySyncResults, wn as formatError, wr as flexibleBalanceDueDay, wt as readJsonFile, x as formatManagementError, xn as requireEnvironmentWriteAuthorization, xr as unsafeAsPositiveCheckoutQuantity, xt as ensureDir, y as executeCliCommandPlan, yn as planEnvironmentExecution, yr as eventRegistrationErrors, yt as writeMetadataFile, z as buildFieldChanges, zn as bindingSchema, zr as publicPassProductSchema, zt as ACCOUNT_SITE_LIST_LIMIT_MIN } from "../entryCommands-Cx1aj859.mjs";
|
|
5
|
+
import { r as CLI_VERSION, t as loadConfigFile } from "../load-config-k3XF8V97.mjs";
|
|
6
|
+
import { t as eventUpsertInputSchema } from "../eventUpsertInputSchema-Dj2LtxCt.mjs";
|
|
7
|
+
import { a as prepareScaffoldExecution, c as LOCAL_PACKAGE_VENDOR_DIR, d as loadGeneratedPackageRanges, i as preflightScaffoldTargets, n as createScaffoldCompletion, s as deriveScaffoldLocalManifest, t as deriveScaffoldPlan } from "../plan-D-bOngd3.mjs";
|
|
8
8
|
import { config } from "dotenv";
|
|
9
9
|
import { z } from "zod";
|
|
10
10
|
import { Command, CommanderError } from "commander";
|
|
@@ -1399,6 +1399,9 @@ function parseLocalEventRun(raw, filePath) {
|
|
|
1399
1399
|
if (!sdkEventUpsertOptionalFieldSchemas.waitlistMode.safeParse(fields$1.waitlistMode).success) {
|
|
1400
1400
|
throw new InvalidLocalEventScheduleIdentityError(filePath, "waitlistMode must be inherit, off or on");
|
|
1401
1401
|
}
|
|
1402
|
+
if (!sdkEventUpsertOptionalFieldSchemas.bookingCutOffHours.safeParse(fields$1.bookingCutOffHours).success) {
|
|
1403
|
+
throw new InvalidLocalEventScheduleIdentityError(filePath, "bookingCutOffHours must be a whole number of hours from 0 to 720, or null");
|
|
1404
|
+
}
|
|
1402
1405
|
if ("categoryRef" in fields$1) {
|
|
1403
1406
|
throw new InvalidLocalEventScheduleIdentityError(filePath, "Move categoryRef to the parent Event file");
|
|
1404
1407
|
}
|
|
@@ -2310,6 +2313,7 @@ function mapEventRunToComparable(run) {
|
|
|
2310
2313
|
occurrences: run.occurrences,
|
|
2311
2314
|
capacity: run.capacity,
|
|
2312
2315
|
waitlistMode: run.waitlistMode,
|
|
2316
|
+
bookingCutOffHours: run.bookingCutOffHours,
|
|
2313
2317
|
bookingOffer: run.bookingOffer,
|
|
2314
2318
|
venueRef: run.venueRef,
|
|
2315
2319
|
settings: run.settings,
|
|
@@ -4273,6 +4277,7 @@ function normalizeRemoteRun(run) {
|
|
|
4273
4277
|
occurrences: [...run.occurrences],
|
|
4274
4278
|
capacity: run.capacity,
|
|
4275
4279
|
waitlistMode: nullishToNull(run.waitlistMode),
|
|
4280
|
+
bookingCutOffHours: nullishToNull(run.bookingCutOffHours),
|
|
4276
4281
|
bookingOffer: normalizeCanonicalBookingOffer(run.bookingOffer),
|
|
4277
4282
|
venueRef: run.venueRef,
|
|
4278
4283
|
settings: run.settings,
|
|
@@ -4294,6 +4299,7 @@ function normalizeLocalRun(local, remote) {
|
|
|
4294
4299
|
occurrences: [...local.occurrences],
|
|
4295
4300
|
capacity: overrideWhenDefined(local.capacity, base.capacity, (value) => typeof value === "number" ? value : null),
|
|
4296
4301
|
waitlistMode: local.waitlistMode === undefined ? base.waitlistMode : local.waitlistMode,
|
|
4302
|
+
bookingCutOffHours: local.bookingCutOffHours === undefined ? base.bookingCutOffHours : local.bookingCutOffHours,
|
|
4297
4303
|
bookingOffer: overrideWhenDefined(local.bookingOffer, base.bookingOffer, normalizeCanonicalBookingOffer),
|
|
4298
4304
|
venueRef: overrideWhenDefined(local.venueRef, base.venueRef, normalizeNullableString),
|
|
4299
4305
|
settings: overrideWhenDefined(local.settings, base.settings, (value) => isRecord$29(value) ? value : {}),
|
|
@@ -4332,6 +4338,7 @@ function normalizeNewLocalRun(run) {
|
|
|
4332
4338
|
occurrences: [...run.occurrences],
|
|
4333
4339
|
capacity: run.capacity ?? null,
|
|
4334
4340
|
waitlistMode: nullishToNull(run.waitlistMode),
|
|
4341
|
+
bookingCutOffHours: nullishToNull(run.bookingCutOffHours),
|
|
4335
4342
|
bookingOffer: normalizeCanonicalBookingOffer(run.bookingOffer),
|
|
4336
4343
|
venueRef: run.venueRef ?? null,
|
|
4337
4344
|
settings: run.settings ?? {},
|
|
@@ -68015,6 +68022,7 @@ const publicWholeSeriesRunSchema = z.object({
|
|
|
68015
68022
|
eventSeriesId: z.string(),
|
|
68016
68023
|
eventOfferingId: z.string(),
|
|
68017
68024
|
enrollmentOpen: z.boolean(),
|
|
68025
|
+
bookingClosesAt: z.string().optional(),
|
|
68018
68026
|
visibility: z.enum(["public", "unlisted"]),
|
|
68019
68027
|
lifecycle: z.enum([
|
|
68020
68028
|
"upcoming",
|
|
@@ -68060,6 +68068,7 @@ const publicEventBaseSchema = z.object({
|
|
|
68060
68068
|
requiresRegistration: z.boolean(),
|
|
68061
68069
|
bookingAvailability: publicEventBookingAvailabilitySchema,
|
|
68062
68070
|
bookingClosedDetail: publicEventBookingClosedDetailSchema.optional(),
|
|
68071
|
+
bookingClosesAt: z.string().optional(),
|
|
68063
68072
|
deliveryMode: z.enum([
|
|
68064
68073
|
"in_person",
|
|
68065
68074
|
"online",
|
|
@@ -72564,11 +72573,12 @@ function renderCalendarFeedIcs(feed, timezoneGenerator) {
|
|
|
72564
72573
|
language: "EN"
|
|
72565
72574
|
},
|
|
72566
72575
|
timezone: feed.timezone === "UTC" ? null : {
|
|
72567
|
-
name:
|
|
72576
|
+
name: null,
|
|
72568
72577
|
generator: timezoneGenerator
|
|
72569
72578
|
},
|
|
72570
72579
|
url: feed.url ?? null
|
|
72571
72580
|
});
|
|
72581
|
+
if (feed.timezone !== "UTC") calendar.x("X-WR-TIMEZONE", feed.timezone);
|
|
72572
72582
|
const generatedAt = new Date();
|
|
72573
72583
|
feed.entries.forEach((entry) => calendar.createEvent(calendarEvent(entry, generatedAt)));
|
|
72574
72584
|
return calendar.toString();
|
|
@@ -79773,32 +79783,22 @@ function rowFor(rows, mode) {
|
|
|
79773
79783
|
* capacity comes from the shared event-domain helpers so uncapped, fallback,
|
|
79774
79784
|
* and hybrid attendance-mode cases agree with the registration runtime.
|
|
79775
79785
|
*/
|
|
79776
|
-
function isBookableEvent(event) {
|
|
79786
|
+
function isBookableEvent(event, now) {
|
|
79777
79787
|
if (!event.requiresRegistration) return false;
|
|
79778
79788
|
if (event.bookingAvailability.kind !== "open") return false;
|
|
79789
|
+
if (now && hasEventBookingClosedEarly(event, now)) return false;
|
|
79779
79790
|
return !isEventFull(event) || canJoinEventWaitlistOnAnyMode(event);
|
|
79780
79791
|
}
|
|
79792
|
+
/**
|
|
79793
|
+
* Whether a date has passed its cut-off by this clock. The projected availability
|
|
79794
|
+
* can be older than the page it's on, and a cut-off makes that gap matter more.
|
|
79795
|
+
*/
|
|
79796
|
+
function hasEventBookingClosedEarly(event, now) {
|
|
79797
|
+
return event.bookingClosesAt !== undefined && hasBookingClosed(event.bookingClosesAt, now);
|
|
79798
|
+
}
|
|
79781
79799
|
|
|
79782
79800
|
//#endregion
|
|
79783
79801
|
//#region ../blocks/src/system/blocks/events/shared/pageSelection.ts
|
|
79784
|
-
/**
|
|
79785
|
-
* What a system-managed Event URL actually selected.
|
|
79786
|
-
*
|
|
79787
|
-
* The resolver used to assume that one returned `PublicEvent` meant one
|
|
79788
|
-
* occurrence. A whole-series Event breaks that assumption in two directions: a
|
|
79789
|
-
* parent Event path selects nothing concrete until a run is chosen, and a run
|
|
79790
|
-
* path selects a run whose identity spans every one of its sessions. This
|
|
79791
|
-
* module parses those cases once, so the renderer switches over a closed set of
|
|
79792
|
-
* page states instead of probing booking scopes at render time.
|
|
79793
|
-
*
|
|
79794
|
-
* Everything here is pure. Loading events and resolving run slugs is the
|
|
79795
|
-
* resolver's job; deciding what the page is and which runs the chooser
|
|
79796
|
-
* advertises happens here. When a run is open to join, and where it sits in its
|
|
79797
|
-
* own life, come from `@riverbankcms/core`: the same authority the
|
|
79798
|
-
* public read projection and the write-side run-facts loader use, so a run
|
|
79799
|
-
* cannot report itself open on the storefront and closed at the point of
|
|
79800
|
-
* booking.
|
|
79801
|
-
*/
|
|
79802
79802
|
function planWholeSeriesParentBooking(eligibleRuns) {
|
|
79803
79803
|
const [first, second, ...rest] = eligibleRuns;
|
|
79804
79804
|
if (!second) return {
|
|
@@ -79838,7 +79838,7 @@ function planOrdinarySeriesSelection(events) {
|
|
|
79838
79838
|
const ordinary = events.filter(isOrdinaryPublicEvent);
|
|
79839
79839
|
const firstSeriesId = ordinary[0]?.seriesId;
|
|
79840
79840
|
if (!firstSeriesId || ordinary.some((event$1) => event$1.seriesId !== firstSeriesId)) return null;
|
|
79841
|
-
const bookable = ordinary.filter(isBookableEvent);
|
|
79841
|
+
const bookable = ordinary.filter((event$1) => isBookableEvent(event$1));
|
|
79842
79842
|
const [first, second] = bookable;
|
|
79843
79843
|
if (first && second) {
|
|
79844
79844
|
const [a$1, b$1, ...rest] = [...ordinary].filter(isOpenForBooking).sort((left, right) => Date.parse(left.startsAt) - Date.parse(right.startsAt));
|
|
@@ -80096,6 +80096,248 @@ function isCancelledOrdinaryDate(event) {
|
|
|
80096
80096
|
//#region ../blocks/src/system/blocks/shared/bookingPageKind.ts
|
|
80097
80097
|
const bookingPageKindSchema = z.enum(["fullPage", "bookingPage"]);
|
|
80098
80098
|
|
|
80099
|
+
//#endregion
|
|
80100
|
+
//#region ../blocks/src/system/runtime/nodes/events/domain/dates.ts
|
|
80101
|
+
/** Event presentation adapters; core owns projection, clocks and ranges. */
|
|
80102
|
+
function eventDateLocale(siteTimeZone) {
|
|
80103
|
+
return inferSiteDateLocale(siteTimeZone);
|
|
80104
|
+
}
|
|
80105
|
+
function eventCalendarWeekStart(timeZone, override) {
|
|
80106
|
+
return override ?? (inferSiteDateLocale(resolveBookingBusinessTimeZone(timeZone)) === "en-US" ? "sunday" : "monday");
|
|
80107
|
+
}
|
|
80108
|
+
/** Admit older wire zones once; the booking business fallback remains London. */
|
|
80109
|
+
function eventDateOptions(place) {
|
|
80110
|
+
const siteTimeZone = resolveBookingBusinessTimeZone(place.siteTimeZone);
|
|
80111
|
+
const resolved = resolveBookingDisplayContext({
|
|
80112
|
+
sessionTimeZone: resolveBookingTimeZoneId(place.timeZone, siteTimeZone),
|
|
80113
|
+
siteTimeZone,
|
|
80114
|
+
locale: inferSiteDateLocale(siteTimeZone),
|
|
80115
|
+
isOnline: place.isOnline === true || place.deliveryMode === "online" || place.deliveryMode === "hybrid",
|
|
80116
|
+
surface: "public"
|
|
80117
|
+
});
|
|
80118
|
+
return {
|
|
80119
|
+
...resolved.context,
|
|
80120
|
+
zone: resolved.zone
|
|
80121
|
+
};
|
|
80122
|
+
}
|
|
80123
|
+
/** Overnight spans keep their end day; folds retain both distinct offsets. */
|
|
80124
|
+
function formatEventTimeRange(times, options) {
|
|
80125
|
+
const start = toUtcIsoDateTimeString(times.startsAt);
|
|
80126
|
+
const end = toUtcIsoDateTimeString(times.endsAt);
|
|
80127
|
+
const startDay = getLocalScheduleDate(new Date(start), options.timeZone);
|
|
80128
|
+
const endDay = getLocalScheduleDate(new Date(end), options.timeZone);
|
|
80129
|
+
return startDay.year === endDay.year && startDay.month === endDay.month && startDay.day === endDay.day ? formatTimeRange(start, end, options, { zone: options.zone }) : formatDateTimeRange({
|
|
80130
|
+
start,
|
|
80131
|
+
end
|
|
80132
|
+
}, options, {
|
|
80133
|
+
date: "short",
|
|
80134
|
+
zone: options.zone
|
|
80135
|
+
});
|
|
80136
|
+
}
|
|
80137
|
+
function resolveEventTimeZone(event, calendarTimeZone) {
|
|
80138
|
+
return resolveBookingTimeZoneId(event.timeZone, resolveBookingBusinessTimeZone(calendarTimeZone));
|
|
80139
|
+
}
|
|
80140
|
+
function formatDate$1(isoTimestamp, options) {
|
|
80141
|
+
return formatDate({
|
|
80142
|
+
kind: "instant",
|
|
80143
|
+
value: toUtcIsoDateTimeString(isoTimestamp)
|
|
80144
|
+
}, options, {
|
|
80145
|
+
date: "short",
|
|
80146
|
+
weekday: "long"
|
|
80147
|
+
});
|
|
80148
|
+
}
|
|
80149
|
+
function formatTime(isoTimestamp, options) {
|
|
80150
|
+
return formatTime$1(toUtcIsoDateTimeString(isoTimestamp), options, { zone: options.zone });
|
|
80151
|
+
}
|
|
80152
|
+
function formatEventDateParts(args) {
|
|
80153
|
+
return {
|
|
80154
|
+
date: formatDate$1(args.startsAt, args),
|
|
80155
|
+
timeRange: formatEventTimeRange(args, args)
|
|
80156
|
+
};
|
|
80157
|
+
}
|
|
80158
|
+
/** A course run's first to last session date, such as `8–22 Sept 2026`. */
|
|
80159
|
+
function formatEventRunDates(first, last, options) {
|
|
80160
|
+
return formatDateRange({
|
|
80161
|
+
kind: "instant",
|
|
80162
|
+
value: toUtcIsoDateTimeString(first.startsAt)
|
|
80163
|
+
}, {
|
|
80164
|
+
kind: "instant",
|
|
80165
|
+
value: toUtcIsoDateTimeString(last.startsAt)
|
|
80166
|
+
}, options, {
|
|
80167
|
+
date: "short",
|
|
80168
|
+
order: "session"
|
|
80169
|
+
});
|
|
80170
|
+
}
|
|
80171
|
+
/** Civil calendar headings never acquire an instant's timezone shift. */
|
|
80172
|
+
function formatCalendarTitle(viewDate, view, days, timeZone) {
|
|
80173
|
+
const context = eventDateOptions({
|
|
80174
|
+
siteTimeZone: timeZone,
|
|
80175
|
+
timeZone
|
|
80176
|
+
});
|
|
80177
|
+
const first = days[0];
|
|
80178
|
+
const last = days[6];
|
|
80179
|
+
return view === "week" && first && last ? formatDateRange({
|
|
80180
|
+
kind: "civil",
|
|
80181
|
+
value: first
|
|
80182
|
+
}, {
|
|
80183
|
+
kind: "civil",
|
|
80184
|
+
value: last
|
|
80185
|
+
}, context, { date: "short" }) : formatDate({
|
|
80186
|
+
kind: "civil",
|
|
80187
|
+
value: viewDate
|
|
80188
|
+
}, context, {
|
|
80189
|
+
date: "long",
|
|
80190
|
+
day: "omit"
|
|
80191
|
+
});
|
|
80192
|
+
}
|
|
80193
|
+
function buildCalendarViewport(input) {
|
|
80194
|
+
const viewport = buildCalendarViewport$1(input);
|
|
80195
|
+
return {
|
|
80196
|
+
...viewport,
|
|
80197
|
+
title: formatCalendarTitle(input.anchorDate, input.view, viewport.days, input.timeZone)
|
|
80198
|
+
};
|
|
80199
|
+
}
|
|
80200
|
+
/** Tick digits are civil clock values, not session instants. */
|
|
80201
|
+
function formatEventHourLabel(hour, timeZone) {
|
|
80202
|
+
return formatEventClockLabel(`${String(hour % 24).padStart(2, "0")}:00`, eventDateLocale(timeZone));
|
|
80203
|
+
}
|
|
80204
|
+
/** Weekly cadence and tick clocks are civil values; UTC only carries their components. */
|
|
80205
|
+
function formatEventClockLabel(value, locale) {
|
|
80206
|
+
const clock = parseLocalScheduleTime(value);
|
|
80207
|
+
return formatTime$1(toUtcIsoDateTimeString(new Date(Date.UTC(2e3, 0, 1, clock.hour, clock.minute)).toISOString()), {
|
|
80208
|
+
locale,
|
|
80209
|
+
timeZone: resolveBookingBusinessTimeZone("UTC")
|
|
80210
|
+
}, { zone: "omit" });
|
|
80211
|
+
}
|
|
80212
|
+
function formatEventCompactDateRail(isoTimestamp, options, letterCase = "capitals") {
|
|
80213
|
+
const instant = {
|
|
80214
|
+
kind: "instant",
|
|
80215
|
+
value: toUtcIsoDateTimeString(isoTimestamp)
|
|
80216
|
+
};
|
|
80217
|
+
const cased = (value) => letterCase === "capitals" ? value.toLocaleUpperCase(options.locale) : value;
|
|
80218
|
+
return {
|
|
80219
|
+
weekday: cased(formatDate(instant, options, {
|
|
80220
|
+
date: "omit",
|
|
80221
|
+
weekday: "short",
|
|
80222
|
+
year: "omit"
|
|
80223
|
+
})),
|
|
80224
|
+
fullWeekday: formatDate(instant, options, {
|
|
80225
|
+
date: "omit",
|
|
80226
|
+
weekday: "long",
|
|
80227
|
+
year: "omit"
|
|
80228
|
+
}),
|
|
80229
|
+
day: formatDate(instant, options, {
|
|
80230
|
+
date: "omit",
|
|
80231
|
+
day: "numeric",
|
|
80232
|
+
year: "omit"
|
|
80233
|
+
}),
|
|
80234
|
+
month: cased(formatDate(instant, options, {
|
|
80235
|
+
date: "short",
|
|
80236
|
+
day: "omit",
|
|
80237
|
+
year: "omit"
|
|
80238
|
+
}).slice(0, 3)),
|
|
80239
|
+
label: formatDate(instant, options, {
|
|
80240
|
+
date: "long",
|
|
80241
|
+
weekday: "long"
|
|
80242
|
+
})
|
|
80243
|
+
};
|
|
80244
|
+
}
|
|
80245
|
+
/**
|
|
80246
|
+
* Format the next occurrence for the image-free catalogue card treatment.
|
|
80247
|
+
*
|
|
80248
|
+
* The compact rail already owns this short, booking-local date vocabulary;
|
|
80249
|
+
* keep the fact panel on the same date and timezone rules as event rows.
|
|
80250
|
+
*/
|
|
80251
|
+
function formatEventNextDateFact(event) {
|
|
80252
|
+
const rail = formatEventCompactDateRail(event.startsAt, eventDateOptions(event));
|
|
80253
|
+
return {
|
|
80254
|
+
dateTime: event.startsAt,
|
|
80255
|
+
value: `${rail.weekday} ${rail.day} ${rail.month}`,
|
|
80256
|
+
label: rail.label
|
|
80257
|
+
};
|
|
80258
|
+
}
|
|
80259
|
+
/**
|
|
80260
|
+
* Group events by their local date (YYYY-MM-DD key in each event's own
|
|
80261
|
+
* timezone). Thin domain wrapper over `groupItemsByDate` from the calendar
|
|
80262
|
+
* package; preserves the historical `Map<string, PublicEvent[]>` shape.
|
|
80263
|
+
*/
|
|
80264
|
+
function groupEventsByDate(events, calendarTimeZone) {
|
|
80265
|
+
const grouped = groupItemsByDate(events, {
|
|
80266
|
+
getStartsAt: (event) => event.startsAt,
|
|
80267
|
+
getTimeZone: () => calendarTimeZone
|
|
80268
|
+
});
|
|
80269
|
+
return new Map([...grouped].map(([dateKey, bucket]) => [dateKey, [...bucket]]));
|
|
80270
|
+
}
|
|
80271
|
+
/** Stable local-day identity shared by ledger continuations and day groups. */
|
|
80272
|
+
function eventLocalDateKey(event) {
|
|
80273
|
+
return getBookingLocalDateKey(toScheduledBookingDateTime({
|
|
80274
|
+
startsAt: event.startsAt,
|
|
80275
|
+
timeZone: resolveBookingBusinessTimeZone(event.timeZone),
|
|
80276
|
+
locale: "en-GB"
|
|
80277
|
+
}));
|
|
80278
|
+
}
|
|
80279
|
+
/** Full weekday and the existing zone-aware time range for a weekly running list. */
|
|
80280
|
+
function formatEventWeekdayTime(event) {
|
|
80281
|
+
const options = eventDateOptions(event);
|
|
80282
|
+
const weekday = formatDate({
|
|
80283
|
+
kind: "instant",
|
|
80284
|
+
value: toUtcIsoDateTimeString(event.startsAt)
|
|
80285
|
+
}, options, {
|
|
80286
|
+
date: "omit",
|
|
80287
|
+
weekday: "long",
|
|
80288
|
+
year: "omit"
|
|
80289
|
+
});
|
|
80290
|
+
return `${weekday} · ${formatEventTimeRange(event, options)}`;
|
|
80291
|
+
}
|
|
80292
|
+
|
|
80293
|
+
//#endregion
|
|
80294
|
+
//#region ../blocks/src/system/runtime/nodes/event-registration/closedEarlyCopy.ts
|
|
80295
|
+
const isWeekly$1 = (event) => event.scheduleScope === "recurring";
|
|
80296
|
+
function eventTimeZone(event) {
|
|
80297
|
+
return eventDateOptions(event).timeZone;
|
|
80298
|
+
}
|
|
80299
|
+
/** On a date's own read both `path` and the destination name that date; its event's page is one level up. */
|
|
80300
|
+
function eventOwnPagePath(event) {
|
|
80301
|
+
const path$3 = getPublicEventCanonicalPath(event);
|
|
80302
|
+
const dateSegment = `/${event.occurrenceId}`;
|
|
80303
|
+
return path$3?.endsWith(dateSegment) ? path$3.slice(0, -dateSegment.length) || "/" : path$3;
|
|
80304
|
+
}
|
|
80305
|
+
/** "Bookings close 2 hours before the start.", while they're still open. */
|
|
80306
|
+
function openBookingLine(event) {
|
|
80307
|
+
if (!event.bookingClosesAt) return null;
|
|
80308
|
+
const before = formatBookingCutOffHours(bookingCutOffHoursBetween(event.startsAt, event.bookingClosesAt));
|
|
80309
|
+
return isWeekly$1(event) ? `Bookings for each date close ${before} before the start.` : `Bookings close ${before} before the start.`;
|
|
80310
|
+
}
|
|
80311
|
+
/** The course's open line, counted from its first session still running. */
|
|
80312
|
+
function openRunBookingLine(run) {
|
|
80313
|
+
const first = orderedLiveRunSessions(run.sessions)[0];
|
|
80314
|
+
if (!run.bookingClosesAt || !first) return null;
|
|
80315
|
+
return `Bookings close ${formatBookingCutOffHours(bookingCutOffHoursBetween(first.startsAt, run.bookingClosesAt))} before the first session.`;
|
|
80316
|
+
}
|
|
80317
|
+
/** One date between its cut-off and its start, or null. */
|
|
80318
|
+
function closedDateCopy(event, now) {
|
|
80319
|
+
const closesAt = event.bookingClosesAt;
|
|
80320
|
+
if (!closesAt || !hasBookingClosed(closesAt, now) || Date.parse(event.startsAt) <= now.getTime()) return null;
|
|
80321
|
+
const zone = eventTimeZone(event);
|
|
80322
|
+
const closed = formatBookingClosedTime(closesAt, event.startsAt, zone);
|
|
80323
|
+
const start = formatBookingClosedTime(event.startsAt, event.startsAt, zone);
|
|
80324
|
+
const before = formatBookingCutOffHours(bookingCutOffHoursBetween(event.startsAt, closesAt));
|
|
80325
|
+
const weekly = isWeekly$1(event);
|
|
80326
|
+
return {
|
|
80327
|
+
titleText: weekly ? "Bookings for this date have closed" : "Bookings for this event have closed",
|
|
80328
|
+
bodyText: `Bookings closed at ${closed}, ${before} before the ${start} start. The organiser may still be able to help if you’d like to come.`,
|
|
80329
|
+
otherDatesHref: weekly ? eventOwnPagePath(event) : null
|
|
80330
|
+
};
|
|
80331
|
+
}
|
|
80332
|
+
/** The body of a course past its cut-off, or null if the run doesn't say when. */
|
|
80333
|
+
function closedRunBody(run) {
|
|
80334
|
+
const first = orderedLiveRunSessions(run.sessions)[0];
|
|
80335
|
+
if (!run.bookingClosesAt || !first) return null;
|
|
80336
|
+
const closed = formatBookingClosedTime(run.bookingClosesAt, first.startsAt, first.timeZone);
|
|
80337
|
+
const before = formatBookingCutOffHours(bookingCutOffHoursBetween(first.startsAt, run.bookingClosesAt));
|
|
80338
|
+
return `Bookings closed at ${closed}, ${before} before the first session. The organiser may still be able to help if you’d like to join.`;
|
|
80339
|
+
}
|
|
80340
|
+
|
|
80099
80341
|
//#endregion
|
|
80100
80342
|
//#region ../blocks/src/system/runtime/nodes/event-registration/closedRunCopy.ts
|
|
80101
80343
|
const copy = {
|
|
@@ -80111,6 +80353,10 @@ const copy = {
|
|
|
80111
80353
|
titleText: "These dates have finished",
|
|
80112
80354
|
bodyText: "The details are kept here for reference."
|
|
80113
80355
|
},
|
|
80356
|
+
"bookings-closed": {
|
|
80357
|
+
titleText: "Bookings for these dates have closed",
|
|
80358
|
+
bodyText: "Bookings for these dates have closed. The organiser may still be able to help if you’d like to join."
|
|
80359
|
+
},
|
|
80114
80360
|
"enrolment-closed": {
|
|
80115
80361
|
titleText: "Booking closed",
|
|
80116
80362
|
bodyText: "Bookings are no longer being taken for these dates."
|
|
@@ -80120,8 +80366,28 @@ const copy = {
|
|
|
80120
80366
|
bodyText: "There are no dates to book at the moment. The organiser may add more, and anything already booked still stands."
|
|
80121
80367
|
}
|
|
80122
80368
|
};
|
|
80123
|
-
|
|
80124
|
-
|
|
80369
|
+
/** A run past its cut-off says when it closed, if it can. */
|
|
80370
|
+
function closedRunCopy(reason, run) {
|
|
80371
|
+
const body = reason === "bookings-closed" && run ? closedRunBody(run) : null;
|
|
80372
|
+
return body ? {
|
|
80373
|
+
...copy[reason],
|
|
80374
|
+
bodyText: body
|
|
80375
|
+
} : copy[reason];
|
|
80376
|
+
}
|
|
80377
|
+
/**
|
|
80378
|
+
* A list of dates closes once none is left to book and at least one stopped at
|
|
80379
|
+
* its cut-off. Until then the closed ones just leave the list. There's nothing
|
|
80380
|
+
* further to point at, so the copy offers no other dates.
|
|
80381
|
+
*/
|
|
80382
|
+
function closedDatesCopy(dates, now) {
|
|
80383
|
+
const stillOpen = dates.some((date) => Date.parse(date.startsAt) > now.getTime() && !(date.bookingClosesAt && hasBookingClosed(date.bookingClosesAt, now)));
|
|
80384
|
+
if (stillOpen) return null;
|
|
80385
|
+
const [firstClosed] = dates.flatMap((date) => closedDateCopy(date, now) ?? []);
|
|
80386
|
+
if (!firstClosed) return null;
|
|
80387
|
+
return {
|
|
80388
|
+
...dates.length > 1 ? copy["bookings-closed"] : firstClosed,
|
|
80389
|
+
otherDatesHref: null
|
|
80390
|
+
};
|
|
80125
80391
|
}
|
|
80126
80392
|
|
|
80127
80393
|
//#endregion
|
|
@@ -80531,9 +80797,17 @@ function occurrenceCardAvailability(event, count) {
|
|
|
80531
80797
|
status: availability.isFull ? "full" : availability.status === "filling" ? "low" : "available"
|
|
80532
80798
|
} : null;
|
|
80533
80799
|
}
|
|
80534
|
-
/** Preserve projected closure reasons; only an open native
|
|
80800
|
+
/** Preserve projected closure reasons; only an open native booking needs its clock rechecked. */
|
|
80535
80801
|
function renderClockClosedCta(event, now) {
|
|
80536
|
-
if (!now || event.
|
|
80802
|
+
if (!now || event.destination.kind !== "native") return null;
|
|
80803
|
+
if (event.bookingScope !== "whole_series") {
|
|
80804
|
+
return hasEventBookingClosedEarly(event, now) ? {
|
|
80805
|
+
label: "Registration closed",
|
|
80806
|
+
href: resolveEventHref(event),
|
|
80807
|
+
external: false,
|
|
80808
|
+
hidden: true
|
|
80809
|
+
} : null;
|
|
80810
|
+
}
|
|
80537
80811
|
const phase = resolveWholeSeriesBookingPhase(event.run, now);
|
|
80538
80812
|
if (phase.kind === "open") return null;
|
|
80539
80813
|
const label$1 = (() => {
|
|
@@ -80541,6 +80815,7 @@ function renderClockClosedCta(event, now) {
|
|
|
80541
80815
|
case "cancelled": return "Cancelled";
|
|
80542
80816
|
case "completed": return "Completed";
|
|
80543
80817
|
case "in-progress":
|
|
80818
|
+
case "bookings-closed":
|
|
80544
80819
|
case "enrolment-closed":
|
|
80545
80820
|
case "no-sessions": return "Registration closed";
|
|
80546
80821
|
default: return assertNever(phase.reason);
|
|
@@ -80550,204 +80825,10 @@ function renderClockClosedCta(event, now) {
|
|
|
80550
80825
|
label: label$1,
|
|
80551
80826
|
href: resolveEventHref(event),
|
|
80552
80827
|
external: false,
|
|
80553
|
-
hidden: phase.reason !== "enrolment-closed"
|
|
80828
|
+
hidden: phase.reason !== "enrolment-closed" && phase.reason !== "bookings-closed"
|
|
80554
80829
|
};
|
|
80555
80830
|
}
|
|
80556
80831
|
|
|
80557
|
-
//#endregion
|
|
80558
|
-
//#region ../blocks/src/system/runtime/nodes/events/domain/dates.ts
|
|
80559
|
-
/** Event presentation adapters; core owns projection, clocks and ranges. */
|
|
80560
|
-
function eventDateLocale(siteTimeZone) {
|
|
80561
|
-
return inferSiteDateLocale(siteTimeZone);
|
|
80562
|
-
}
|
|
80563
|
-
function eventCalendarWeekStart(timeZone, override) {
|
|
80564
|
-
return override ?? (inferSiteDateLocale(resolveBookingBusinessTimeZone(timeZone)) === "en-US" ? "sunday" : "monday");
|
|
80565
|
-
}
|
|
80566
|
-
/** Admit older wire zones once; the booking business fallback remains London. */
|
|
80567
|
-
function eventDateOptions(place) {
|
|
80568
|
-
const siteTimeZone = resolveBookingBusinessTimeZone(place.siteTimeZone);
|
|
80569
|
-
const resolved = resolveBookingDisplayContext({
|
|
80570
|
-
sessionTimeZone: resolveBookingTimeZoneId(place.timeZone, siteTimeZone),
|
|
80571
|
-
siteTimeZone,
|
|
80572
|
-
locale: inferSiteDateLocale(siteTimeZone),
|
|
80573
|
-
isOnline: place.isOnline === true || place.deliveryMode === "online" || place.deliveryMode === "hybrid",
|
|
80574
|
-
surface: "public"
|
|
80575
|
-
});
|
|
80576
|
-
return {
|
|
80577
|
-
...resolved.context,
|
|
80578
|
-
zone: resolved.zone
|
|
80579
|
-
};
|
|
80580
|
-
}
|
|
80581
|
-
/** Overnight spans keep their end day; folds retain both distinct offsets. */
|
|
80582
|
-
function formatEventTimeRange(times, options) {
|
|
80583
|
-
const start = toUtcIsoDateTimeString(times.startsAt);
|
|
80584
|
-
const end = toUtcIsoDateTimeString(times.endsAt);
|
|
80585
|
-
const startDay = getLocalScheduleDate(new Date(start), options.timeZone);
|
|
80586
|
-
const endDay = getLocalScheduleDate(new Date(end), options.timeZone);
|
|
80587
|
-
return startDay.year === endDay.year && startDay.month === endDay.month && startDay.day === endDay.day ? formatTimeRange(start, end, options, { zone: options.zone }) : formatDateTimeRange({
|
|
80588
|
-
start,
|
|
80589
|
-
end
|
|
80590
|
-
}, options, {
|
|
80591
|
-
date: "short",
|
|
80592
|
-
zone: options.zone
|
|
80593
|
-
});
|
|
80594
|
-
}
|
|
80595
|
-
function resolveEventTimeZone(event, calendarTimeZone) {
|
|
80596
|
-
return resolveBookingTimeZoneId(event.timeZone, resolveBookingBusinessTimeZone(calendarTimeZone));
|
|
80597
|
-
}
|
|
80598
|
-
function formatDate$1(isoTimestamp, options) {
|
|
80599
|
-
return formatDate({
|
|
80600
|
-
kind: "instant",
|
|
80601
|
-
value: toUtcIsoDateTimeString(isoTimestamp)
|
|
80602
|
-
}, options, {
|
|
80603
|
-
date: "short",
|
|
80604
|
-
weekday: "long"
|
|
80605
|
-
});
|
|
80606
|
-
}
|
|
80607
|
-
function formatTime(isoTimestamp, options) {
|
|
80608
|
-
return formatTime$1(toUtcIsoDateTimeString(isoTimestamp), options, { zone: options.zone });
|
|
80609
|
-
}
|
|
80610
|
-
function formatEventDateParts(args) {
|
|
80611
|
-
return {
|
|
80612
|
-
date: formatDate$1(args.startsAt, args),
|
|
80613
|
-
timeRange: formatEventTimeRange(args, args)
|
|
80614
|
-
};
|
|
80615
|
-
}
|
|
80616
|
-
/** A course run's first to last session date, such as `8–22 Sept 2026`. */
|
|
80617
|
-
function formatEventRunDates(first, last, options) {
|
|
80618
|
-
return formatDateRange({
|
|
80619
|
-
kind: "instant",
|
|
80620
|
-
value: toUtcIsoDateTimeString(first.startsAt)
|
|
80621
|
-
}, {
|
|
80622
|
-
kind: "instant",
|
|
80623
|
-
value: toUtcIsoDateTimeString(last.startsAt)
|
|
80624
|
-
}, options, {
|
|
80625
|
-
date: "short",
|
|
80626
|
-
order: "session"
|
|
80627
|
-
});
|
|
80628
|
-
}
|
|
80629
|
-
/** Civil calendar headings never acquire an instant's timezone shift. */
|
|
80630
|
-
function formatCalendarTitle(viewDate, view, days, timeZone) {
|
|
80631
|
-
const context = eventDateOptions({
|
|
80632
|
-
siteTimeZone: timeZone,
|
|
80633
|
-
timeZone
|
|
80634
|
-
});
|
|
80635
|
-
const first = days[0];
|
|
80636
|
-
const last = days[6];
|
|
80637
|
-
return view === "week" && first && last ? formatDateRange({
|
|
80638
|
-
kind: "civil",
|
|
80639
|
-
value: first
|
|
80640
|
-
}, {
|
|
80641
|
-
kind: "civil",
|
|
80642
|
-
value: last
|
|
80643
|
-
}, context, { date: "short" }) : formatDate({
|
|
80644
|
-
kind: "civil",
|
|
80645
|
-
value: viewDate
|
|
80646
|
-
}, context, {
|
|
80647
|
-
date: "long",
|
|
80648
|
-
day: "omit"
|
|
80649
|
-
});
|
|
80650
|
-
}
|
|
80651
|
-
function buildCalendarViewport(input) {
|
|
80652
|
-
const viewport = buildCalendarViewport$1(input);
|
|
80653
|
-
return {
|
|
80654
|
-
...viewport,
|
|
80655
|
-
title: formatCalendarTitle(input.anchorDate, input.view, viewport.days, input.timeZone)
|
|
80656
|
-
};
|
|
80657
|
-
}
|
|
80658
|
-
/** Tick digits are civil clock values, not session instants. */
|
|
80659
|
-
function formatEventHourLabel(hour, timeZone) {
|
|
80660
|
-
return formatEventClockLabel(`${String(hour % 24).padStart(2, "0")}:00`, eventDateLocale(timeZone));
|
|
80661
|
-
}
|
|
80662
|
-
/** Weekly cadence and tick clocks are civil values; UTC only carries their components. */
|
|
80663
|
-
function formatEventClockLabel(value, locale) {
|
|
80664
|
-
const clock = parseLocalScheduleTime(value);
|
|
80665
|
-
return formatTime$1(toUtcIsoDateTimeString(new Date(Date.UTC(2e3, 0, 1, clock.hour, clock.minute)).toISOString()), {
|
|
80666
|
-
locale,
|
|
80667
|
-
timeZone: resolveBookingBusinessTimeZone("UTC")
|
|
80668
|
-
}, { zone: "omit" });
|
|
80669
|
-
}
|
|
80670
|
-
function formatEventCompactDateRail(isoTimestamp, options, letterCase = "capitals") {
|
|
80671
|
-
const instant = {
|
|
80672
|
-
kind: "instant",
|
|
80673
|
-
value: toUtcIsoDateTimeString(isoTimestamp)
|
|
80674
|
-
};
|
|
80675
|
-
const cased = (value) => letterCase === "capitals" ? value.toLocaleUpperCase(options.locale) : value;
|
|
80676
|
-
return {
|
|
80677
|
-
weekday: cased(formatDate(instant, options, {
|
|
80678
|
-
date: "omit",
|
|
80679
|
-
weekday: "short",
|
|
80680
|
-
year: "omit"
|
|
80681
|
-
})),
|
|
80682
|
-
fullWeekday: formatDate(instant, options, {
|
|
80683
|
-
date: "omit",
|
|
80684
|
-
weekday: "long",
|
|
80685
|
-
year: "omit"
|
|
80686
|
-
}),
|
|
80687
|
-
day: formatDate(instant, options, {
|
|
80688
|
-
date: "omit",
|
|
80689
|
-
day: "numeric",
|
|
80690
|
-
year: "omit"
|
|
80691
|
-
}),
|
|
80692
|
-
month: cased(formatDate(instant, options, {
|
|
80693
|
-
date: "short",
|
|
80694
|
-
day: "omit",
|
|
80695
|
-
year: "omit"
|
|
80696
|
-
}).slice(0, 3)),
|
|
80697
|
-
label: formatDate(instant, options, {
|
|
80698
|
-
date: "long",
|
|
80699
|
-
weekday: "long"
|
|
80700
|
-
})
|
|
80701
|
-
};
|
|
80702
|
-
}
|
|
80703
|
-
/**
|
|
80704
|
-
* Format the next occurrence for the image-free catalogue card treatment.
|
|
80705
|
-
*
|
|
80706
|
-
* The compact rail already owns this short, booking-local date vocabulary;
|
|
80707
|
-
* keep the fact panel on the same date and timezone rules as event rows.
|
|
80708
|
-
*/
|
|
80709
|
-
function formatEventNextDateFact(event) {
|
|
80710
|
-
const rail = formatEventCompactDateRail(event.startsAt, eventDateOptions(event));
|
|
80711
|
-
return {
|
|
80712
|
-
dateTime: event.startsAt,
|
|
80713
|
-
value: `${rail.weekday} ${rail.day} ${rail.month}`,
|
|
80714
|
-
label: rail.label
|
|
80715
|
-
};
|
|
80716
|
-
}
|
|
80717
|
-
/**
|
|
80718
|
-
* Group events by their local date (YYYY-MM-DD key in each event's own
|
|
80719
|
-
* timezone). Thin domain wrapper over `groupItemsByDate` from the calendar
|
|
80720
|
-
* package; preserves the historical `Map<string, PublicEvent[]>` shape.
|
|
80721
|
-
*/
|
|
80722
|
-
function groupEventsByDate(events, calendarTimeZone) {
|
|
80723
|
-
const grouped = groupItemsByDate(events, {
|
|
80724
|
-
getStartsAt: (event) => event.startsAt,
|
|
80725
|
-
getTimeZone: () => calendarTimeZone
|
|
80726
|
-
});
|
|
80727
|
-
return new Map([...grouped].map(([dateKey, bucket]) => [dateKey, [...bucket]]));
|
|
80728
|
-
}
|
|
80729
|
-
/** Stable local-day identity shared by ledger continuations and day groups. */
|
|
80730
|
-
function eventLocalDateKey(event) {
|
|
80731
|
-
return getBookingLocalDateKey(toScheduledBookingDateTime({
|
|
80732
|
-
startsAt: event.startsAt,
|
|
80733
|
-
timeZone: resolveBookingBusinessTimeZone(event.timeZone),
|
|
80734
|
-
locale: "en-GB"
|
|
80735
|
-
}));
|
|
80736
|
-
}
|
|
80737
|
-
/** Full weekday and the existing zone-aware time range for a weekly running list. */
|
|
80738
|
-
function formatEventWeekdayTime(event) {
|
|
80739
|
-
const options = eventDateOptions(event);
|
|
80740
|
-
const weekday = formatDate({
|
|
80741
|
-
kind: "instant",
|
|
80742
|
-
value: toUtcIsoDateTimeString(event.startsAt)
|
|
80743
|
-
}, options, {
|
|
80744
|
-
date: "omit",
|
|
80745
|
-
weekday: "long",
|
|
80746
|
-
year: "omit"
|
|
80747
|
-
});
|
|
80748
|
-
return `${weekday} · ${formatEventTimeRange(event, options)}`;
|
|
80749
|
-
}
|
|
80750
|
-
|
|
80751
80832
|
//#endregion
|
|
80752
80833
|
//#region ../blocks/src/system/runtime/nodes/events/domain/duration.ts
|
|
80753
80834
|
function formatEventDuration(event, style = "legacy") {
|
|
@@ -80800,8 +80881,8 @@ const QUICK_EVENT_DATE_LIMIT = 4;
|
|
|
80800
80881
|
* Sorting before deduplication means a duplicate occurrence keeps its earliest
|
|
80801
80882
|
* deterministic representation.
|
|
80802
80883
|
*/
|
|
80803
|
-
function selectQuickDateEvents(events) {
|
|
80804
|
-
return orderedUniqueEventOccurrences(events.filter((event) => event.bookingScope !== "whole_series" && isBookableEvent(event))).slice(0, QUICK_EVENT_DATE_LIMIT);
|
|
80884
|
+
function selectQuickDateEvents(events, now) {
|
|
80885
|
+
return orderedUniqueEventOccurrences(events.filter((event) => event.bookingScope !== "whole_series" && isBookableEvent(event, now))).slice(0, QUICK_EVENT_DATE_LIMIT);
|
|
80805
80886
|
}
|
|
80806
80887
|
/** Shared ordering and identity selection, independent of booking capacity. */
|
|
80807
80888
|
function orderedUniqueEventOccurrences(events) {
|
|
@@ -84046,6 +84127,7 @@ function transformRegistrationOptionsResponse(response) {
|
|
|
84046
84127
|
const eventAcceptsMemberships = response.entitlements.requiresLoginForMemberships || eligibleMemberships.length > 0 || response.entitlements.availableForPurchase.memberships.length > 0;
|
|
84047
84128
|
const monetaryPaymentAvailable = hasMonetaryPaymentOption(response);
|
|
84048
84129
|
return {
|
|
84130
|
+
discountPreview: response.discountPreview,
|
|
84049
84131
|
availability: response.availability,
|
|
84050
84132
|
registration: response.registration,
|
|
84051
84133
|
paymentOptions: response.paymentOptions,
|
|
@@ -85558,6 +85640,7 @@ function bookingCalendar(event, outcome) {
|
|
|
85558
85640
|
function toRegistrationEvent(event) {
|
|
85559
85641
|
return {
|
|
85560
85642
|
...event,
|
|
85643
|
+
...bookingCloseLine(openBookingLine(event)),
|
|
85561
85644
|
selectionId: event.id,
|
|
85562
85645
|
registrationSubject: {
|
|
85563
85646
|
kind: "occurrence",
|
|
@@ -85565,6 +85648,9 @@ function toRegistrationEvent(event) {
|
|
|
85565
85648
|
}
|
|
85566
85649
|
};
|
|
85567
85650
|
}
|
|
85651
|
+
function bookingCloseLine(line) {
|
|
85652
|
+
return line ? { bookingCloseLine: line } : {};
|
|
85653
|
+
}
|
|
85568
85654
|
function toRegistrationEvents(events) {
|
|
85569
85655
|
return events.filter((event) => event.bookingScope === "single_occurrence").map(toRegistrationEvent);
|
|
85570
85656
|
}
|
|
@@ -85583,6 +85669,7 @@ function toWholeSeriesRegistrationEvent(group) {
|
|
|
85583
85669
|
const lastSession = sessions[sessions.length - 1] ?? firstSession;
|
|
85584
85670
|
return {
|
|
85585
85671
|
...representative,
|
|
85672
|
+
...bookingCloseLine(openRunBookingLine(run)),
|
|
85586
85673
|
selectionId: run.eventSeriesId,
|
|
85587
85674
|
registrationSubject: {
|
|
85588
85675
|
kind: "wholeSeries",
|
|
@@ -88042,6 +88129,11 @@ function resolveWaitlistClaimRestoration(input) {
|
|
|
88042
88129
|
message: "This waiting list invitation is for a different event. Please open the link in your invitation email."
|
|
88043
88130
|
};
|
|
88044
88131
|
}
|
|
88132
|
+
/** A place held on a run or date that's closed is still theirs, so it stays on the list they see. */
|
|
88133
|
+
function withOfferedEvent(choices, invitation) {
|
|
88134
|
+
const offered$1 = invitation.kind === "ready" ? invitation.restoration.event : null;
|
|
88135
|
+
return offered$1 && !choices.some((event) => event.selectionId === offered$1.selectionId) ? [offered$1, ...choices] : choices;
|
|
88136
|
+
}
|
|
88045
88137
|
|
|
88046
88138
|
//#endregion
|
|
88047
88139
|
//#region ../blocks/src/system/runtime/nodes/event-registration/registrationBrowserDraft.ts
|
|
@@ -88615,7 +88707,21 @@ function resolveHeadlessEventRegistrationStatus(wizard) {
|
|
|
88615
88707
|
default: return assertNever$4(wizard.flow);
|
|
88616
88708
|
}
|
|
88617
88709
|
}
|
|
88710
|
+
const BOOKING_CLOSED_MESSAGE = "Booking is currently closed for this event. Please contact the organiser if you’d like to find out more.";
|
|
88618
88711
|
function registrationSurfaceUnavailable(wizard) {
|
|
88712
|
+
if (wizard.bookingClosure.kind === "underway") return null;
|
|
88713
|
+
if (wizard.bookingClosure.kind === "closedEarly") {
|
|
88714
|
+
return {
|
|
88715
|
+
kind: "unavailable",
|
|
88716
|
+
message: wizard.bookingClosure.copy.bodyText
|
|
88717
|
+
};
|
|
88718
|
+
}
|
|
88719
|
+
if (wizard.bookingClosure.kind === "started") {
|
|
88720
|
+
return {
|
|
88721
|
+
kind: "unavailable",
|
|
88722
|
+
message: BOOKING_CLOSED_MESSAGE
|
|
88723
|
+
};
|
|
88724
|
+
}
|
|
88619
88725
|
if (wizard.scopedEvents.length === 0 && !wizard.occurrenceContext) {
|
|
88620
88726
|
return {
|
|
88621
88727
|
kind: "empty",
|
|
@@ -88626,7 +88732,7 @@ function registrationSurfaceUnavailable(wizard) {
|
|
|
88626
88732
|
if (!hasRegistrableEvents && !wizard.occurrenceContext) {
|
|
88627
88733
|
return {
|
|
88628
88734
|
kind: "unavailable",
|
|
88629
|
-
message:
|
|
88735
|
+
message: BOOKING_CLOSED_MESSAGE
|
|
88630
88736
|
};
|
|
88631
88737
|
}
|
|
88632
88738
|
return null;
|
|
@@ -90922,7 +91028,7 @@ function resolveEventRegistrationChoices(events, context, now) {
|
|
|
90922
91028
|
return scoped;
|
|
90923
91029
|
}
|
|
90924
91030
|
const eligibleRunIds = new Set(runs.filter((group) => resolveWholeSeriesChooserEligibility(group, now).kind === "eligible").map((group) => group.eventSeriesId));
|
|
90925
|
-
return scoped.filter((event) => event.bookingScope === "whole_series" ? eligibleRunIds.has(event.seriesId) : Date.parse(event.startsAt) > now.getTime());
|
|
91031
|
+
return scoped.filter((event) => event.bookingScope === "whole_series" ? eligibleRunIds.has(event.seriesId) : Date.parse(event.startsAt) > now.getTime() && !hasEventBookingClosedEarly(event, now));
|
|
90926
91032
|
}
|
|
90927
91033
|
|
|
90928
91034
|
//#endregion
|
|
@@ -91135,7 +91241,7 @@ function closedRegistrationCopy(source, events) {
|
|
|
91135
91241
|
if (hasCancelledRegistrationDate(events, source.occurrenceContext?.id)) return cancelledDateCopy;
|
|
91136
91242
|
const selectedRun = resolveSelectedWholeSeriesRun(events);
|
|
91137
91243
|
const phase = selectedRun ? resolveWholeSeriesBookingPhase(selectedRun.run, new Date(source.now)) : null;
|
|
91138
|
-
return phase?.kind === "closed" ? closedRunCopy(phase.reason) : null;
|
|
91244
|
+
return phase?.kind === "closed" ? closedRunCopy(phase.reason, selectedRun?.run) : null;
|
|
91139
91245
|
}
|
|
91140
91246
|
function buildEventRegistrationShellStepLabels(source, scopedSourceEvents) {
|
|
91141
91247
|
const selectedRun = resolveSelectedWholeSeriesRun(scopedSourceEvents);
|
|
@@ -95810,8 +95916,8 @@ function EventQuickDates({ events, pathname, buttonVariant = "primary", dateStyl
|
|
|
95810
95916
|
* Null when the date has no registration path (closed, paused, not open yet,
|
|
95811
95917
|
* no registration, or full with no waitlist), so no caller repeats that gate.
|
|
95812
95918
|
*/
|
|
95813
|
-
function eventDateBookingLink(event, pathname, dateLabel$1) {
|
|
95814
|
-
if (!isBookableEvent(event)) return null;
|
|
95919
|
+
function eventDateBookingLink(event, pathname, dateLabel$1, now) {
|
|
95920
|
+
if (!isBookableEvent(event, now)) return null;
|
|
95815
95921
|
const cta = resolveEventCta(event);
|
|
95816
95922
|
const destination = resolveRuntimeEventDestination(event);
|
|
95817
95923
|
const href = destination.kind === "external" ? cta.href : resolveDedicatedBookingHref(pathname, {
|
|
@@ -112810,6 +112916,7 @@ function bookingClosedReason(reason) {
|
|
|
112810
112916
|
case "cancelled": return "These dates have been cancelled.";
|
|
112811
112917
|
case "in-progress": return "Bookings closed when the first session began.";
|
|
112812
112918
|
case "completed": return "These dates have finished.";
|
|
112919
|
+
case "bookings-closed":
|
|
112813
112920
|
case "enrolment-closed": return "Bookings for these dates have closed.";
|
|
112814
112921
|
case "no-sessions": return "No dates are currently scheduled.";
|
|
112815
112922
|
}
|
|
@@ -113101,40 +113208,8 @@ function withLookParts(props$1, arrangement) {
|
|
|
113101
113208
|
|
|
113102
113209
|
//#endregion
|
|
113103
113210
|
//#region ../blocks/src/system/runtime/nodes/event-details.server.tsx
|
|
113104
|
-
function eventDetailsIslandValue({ props: props$1, presentation: presentation$1, scopedEvents, subject }) {
|
|
113105
|
-
return {
|
|
113106
|
-
...props$1.arrangement ? {
|
|
113107
|
-
arrangement: props$1.arrangement,
|
|
113108
|
-
entryTitle: props$1.entryTitle,
|
|
113109
|
-
actionSize: props$1.actionSize,
|
|
113110
|
-
lookSlots: props$1.lookSlots,
|
|
113111
|
-
surfacePresentation: props$1.surfacePresentation,
|
|
113112
|
-
panelHeading: props$1.panelHeading
|
|
113113
|
-
} : {},
|
|
113114
|
-
quickFacts: props$1.quickFacts,
|
|
113115
|
-
occurrenceContext: props$1.occurrenceContext ?? null,
|
|
113116
|
-
subject,
|
|
113117
|
-
events: scopedEvents,
|
|
113118
|
-
venueDrawing: props$1.venueDrawing ?? null,
|
|
113119
|
-
showVenue: presentation$1.showVenue,
|
|
113120
|
-
showMap: presentation$1.showMap,
|
|
113121
|
-
showOtherDates: presentation$1.showOtherDates,
|
|
113122
|
-
otherDatesLimit: props$1.otherDatesLimit,
|
|
113123
|
-
showCost: presentation$1.showCost,
|
|
113124
|
-
showTitle: presentation$1.showTitle,
|
|
113125
|
-
showDescription: presentation$1.showDescription,
|
|
113126
|
-
showCapacity: presentation$1.showCapacity,
|
|
113127
|
-
showAcceptedPasses: presentation$1.showAcceptedPasses,
|
|
113128
|
-
showAcceptedMemberships: presentation$1.showAcceptedMemberships,
|
|
113129
|
-
sitePasses: props$1.sitePasses,
|
|
113130
|
-
siteMemberships: props$1.siteMemberships,
|
|
113131
|
-
autoApplyDiscount: presentation$1.autoApplyDiscount,
|
|
113132
|
-
className: props$1.className,
|
|
113133
|
-
now: props$1.now
|
|
113134
|
-
};
|
|
113135
|
-
}
|
|
113136
113211
|
function EventDetailsSSR(props$1) {
|
|
113137
|
-
const {
|
|
113212
|
+
const { occurrenceContext = null, subject, events = null, className, children } = props$1;
|
|
113138
113213
|
const normalizedSubject = normalizeEventRegistrationPageSurfaceSubject(subject);
|
|
113139
113214
|
const scopedEvents = events === null ? null : resolveEventRegistrationScopedEvents(events, {
|
|
113140
113215
|
occurrenceContext,
|
|
@@ -113146,19 +113221,9 @@ function EventDetailsSSR(props$1) {
|
|
|
113146
113221
|
occurrenceContext,
|
|
113147
113222
|
subject: normalizedSubject
|
|
113148
113223
|
});
|
|
113149
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
|
|
113150
|
-
|
|
113151
|
-
|
|
113152
|
-
attributes: {
|
|
113153
|
-
className: `event-details ${className ?? ""}`.trim(),
|
|
113154
|
-
"data-block": "event-details"
|
|
113155
|
-
},
|
|
113156
|
-
value: eventDetailsIslandValue({
|
|
113157
|
-
props: props$1,
|
|
113158
|
-
presentation: presentation$1,
|
|
113159
|
-
scopedEvents,
|
|
113160
|
-
subject: normalizedSubject
|
|
113161
|
-
}),
|
|
113224
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
|
|
113225
|
+
className: `event-details ${className ?? ""}`.trim(),
|
|
113226
|
+
"data-block": "event-details",
|
|
113162
113227
|
children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)(EventDetailsView, {
|
|
113163
113228
|
...presentation$1,
|
|
113164
113229
|
mapClassName: "venue-map event-details-map"
|
|
@@ -113515,12 +113580,12 @@ function cardsListDates(props$1) {
|
|
|
113515
113580
|
return props$1.lookSlots !== undefined && props$1.datesMode === "next-dates";
|
|
113516
113581
|
}
|
|
113517
113582
|
/** One offering has room for a Book link on each date; several keep plain rows. */
|
|
113518
|
-
function catalogueDateBooking(shape, pathname) {
|
|
113519
|
-
return shape === "single" ? (event, dateLabel$1) => eventDateBookingLink(event, pathname ?? "/", dateLabel$1) : undefined;
|
|
113583
|
+
function catalogueDateBooking(shape, pathname, now) {
|
|
113584
|
+
return shape === "single" ? (event, dateLabel$1) => eventDateBookingLink(event, pathname ?? "/", dateLabel$1, now) : undefined;
|
|
113520
113585
|
}
|
|
113521
113586
|
function renderOfferingsCatalogueGroups({ props: props$1, groups, shape }) {
|
|
113522
113587
|
const enabledSeriesIds = new Set(groups.flatMap((load) => load.kind === "items" ? load.items.map((item) => item.kind === "event" ? item.event.seriesId : item.run.eventSeriesId) : []));
|
|
113523
|
-
const quickDateEvents = cardsListDates(props$1) ? [] : selectQuickDateEvents((props$1.quickDateEvents ?? []).filter((event) => enabledSeriesIds.has(event.seriesId)));
|
|
113588
|
+
const quickDateEvents = cardsListDates(props$1) ? [] : selectQuickDateEvents((props$1.quickDateEvents ?? []).filter((event) => enabledSeriesIds.has(event.seriesId)), props$1.now);
|
|
113524
113589
|
const populated = groups.flatMap(catalogueGroupItems);
|
|
113525
113590
|
const frames = listGroupFrames(props$1);
|
|
113526
113591
|
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
|
|
@@ -113585,7 +113650,7 @@ function renderCatalogueItems({ props: props$1, items: items$1, shape, groupTitl
|
|
|
113585
113650
|
}
|
|
113586
113651
|
/** Dates are a display sample; the series card never infers availability from them. */
|
|
113587
113652
|
function catalogueDates(events, now, shape, pathname) {
|
|
113588
|
-
return offeringDatesBySeries(events, now, catalogueDateBooking(shape, pathname));
|
|
113653
|
+
return offeringDatesBySeries(events, now, catalogueDateBooking(shape, pathname, now));
|
|
113589
113654
|
}
|
|
113590
113655
|
function catalogueCardContent(item, now, dates, typeLabel) {
|
|
113591
113656
|
const event = item.kind === "event" ? item.event : item.run.representative;
|
|
@@ -116419,7 +116484,11 @@ function EventBookingPanelBody({ panel }) {
|
|
|
116419
116484
|
});
|
|
116420
116485
|
case "dropIn": return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(DropInPanel, { panel: panel.panel });
|
|
116421
116486
|
case "bookingClosed": return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(BookingClosedPanel, { detail: panel.detail });
|
|
116422
|
-
case "closedRun": return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ClosedRunPanel, {
|
|
116487
|
+
case "closedRun": return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ClosedRunPanel, { copy: closedRunCopy(panel.reason, panel.run) });
|
|
116488
|
+
case "closedDate": return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ClosedRunPanel, {
|
|
116489
|
+
copy: panel.copy,
|
|
116490
|
+
otherDatesHref: panel.copy.otherDatesHref
|
|
116491
|
+
});
|
|
116423
116492
|
case "single": return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(SingleDateBooking, { run: panel.run });
|
|
116424
116493
|
case "choice": return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(RunChooser, { runs: panel.runs });
|
|
116425
116494
|
case "unavailable": return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
|
|
@@ -116491,17 +116560,27 @@ function BookingClosedPanel({ detail }) {
|
|
|
116491
116560
|
});
|
|
116492
116561
|
}
|
|
116493
116562
|
/** Dates that cannot be booked keep their details and say why. */
|
|
116494
|
-
function ClosedRunPanel({
|
|
116495
|
-
const copy$1 = closedRunCopy(reason);
|
|
116563
|
+
function ClosedRunPanel({ copy: copy$1, otherDatesHref }) {
|
|
116496
116564
|
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
|
|
116497
116565
|
className: "event-booking-panel__closed-run",
|
|
116498
|
-
children: [
|
|
116499
|
-
|
|
116500
|
-
|
|
116501
|
-
|
|
116502
|
-
|
|
116503
|
-
|
|
116504
|
-
|
|
116566
|
+
children: [
|
|
116567
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("h2", {
|
|
116568
|
+
className: "card-title rb-mb-3",
|
|
116569
|
+
children: copy$1.titleText
|
|
116570
|
+
}),
|
|
116571
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", {
|
|
116572
|
+
className: "status-muted rb-text-base rb-leading-relaxed",
|
|
116573
|
+
children: copy$1.bodyText
|
|
116574
|
+
}),
|
|
116575
|
+
otherDatesHref ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", {
|
|
116576
|
+
className: "rb-mt-4 rb-text-base",
|
|
116577
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("a", {
|
|
116578
|
+
className: "rb-underline",
|
|
116579
|
+
href: otherDatesHref,
|
|
116580
|
+
children: "See the other dates"
|
|
116581
|
+
})
|
|
116582
|
+
}) : null
|
|
116583
|
+
]
|
|
116505
116584
|
});
|
|
116506
116585
|
}
|
|
116507
116586
|
/**
|
|
@@ -116641,40 +116720,53 @@ function planEventBookingPanel({ selection, subject }, now) {
|
|
|
116641
116720
|
...nonBookingPanel,
|
|
116642
116721
|
registration
|
|
116643
116722
|
};
|
|
116644
|
-
|
|
116645
|
-
|
|
116646
|
-
kind: "closedRun",
|
|
116647
|
-
reason: phase.reason,
|
|
116648
|
-
registration
|
|
116649
|
-
} : {
|
|
116650
|
-
kind: "registration",
|
|
116723
|
+
return {
|
|
116724
|
+
...closedDatePanel(selection, now) ?? closedRunPanel(selection, now) ?? { kind: "registration" },
|
|
116651
116725
|
registration
|
|
116652
116726
|
};
|
|
116653
116727
|
}
|
|
116654
116728
|
case "wholeSeriesParent": {
|
|
116729
|
+
const registration = parentRegistrationTarget(selection, subject);
|
|
116655
116730
|
if (nonBookingPanel) return {
|
|
116656
116731
|
...nonBookingPanel,
|
|
116657
|
-
registration
|
|
116732
|
+
registration
|
|
116658
116733
|
};
|
|
116659
116734
|
const panel = planWholeSeriesParentBooking(selection.eligibleRuns);
|
|
116660
116735
|
return panel.kind === "bookTogether" ? {
|
|
116661
116736
|
kind: "registration",
|
|
116662
|
-
registration
|
|
116663
|
-
events: panel.runs.map((run) => run.representative),
|
|
116664
|
-
subject,
|
|
116665
|
-
occurrenceContext: null
|
|
116666
|
-
}
|
|
116737
|
+
registration
|
|
116667
116738
|
} : {
|
|
116668
116739
|
...panel,
|
|
116669
|
-
registration
|
|
116740
|
+
registration
|
|
116670
116741
|
};
|
|
116671
116742
|
}
|
|
116672
116743
|
case "wholeSeriesParentUnavailable": return {
|
|
116673
116744
|
...nonBookingPanel ?? { kind: "unavailable" },
|
|
116674
|
-
registration:
|
|
116745
|
+
registration: parentRegistrationTarget(selection, subject)
|
|
116675
116746
|
};
|
|
116676
116747
|
}
|
|
116677
116748
|
}
|
|
116749
|
+
/**
|
|
116750
|
+
* A date past its cut-off, however old the page's data is. A list of dates only
|
|
116751
|
+
* closes when every date has: until then the closed ones just leave the list.
|
|
116752
|
+
*/
|
|
116753
|
+
function closedRunPanel(selection, now) {
|
|
116754
|
+
if (selection.kind !== "wholeSeriesRun") return null;
|
|
116755
|
+
const phase = resolveWholeSeriesBookingPhase(selection.run.run, now);
|
|
116756
|
+
return phase.kind === "closed" ? {
|
|
116757
|
+
kind: "closedRun",
|
|
116758
|
+
reason: phase.reason,
|
|
116759
|
+
run: selection.run.run
|
|
116760
|
+
} : null;
|
|
116761
|
+
}
|
|
116762
|
+
function closedDatePanel(selection, now) {
|
|
116763
|
+
if (selection.kind === "wholeSeriesRun") return null;
|
|
116764
|
+
const copy$1 = selection.kind === "occurrence" ? closedDateCopy(selection.event, now) : closedDatesCopy(selection.dates, now);
|
|
116765
|
+
return copy$1 ? {
|
|
116766
|
+
kind: "closedDate",
|
|
116767
|
+
copy: copy$1
|
|
116768
|
+
} : null;
|
|
116769
|
+
}
|
|
116678
116770
|
/** Drop-in and page-level closure take precedence over fresh booking and run selection. */
|
|
116679
116771
|
function planNonBookingPanel(selection) {
|
|
116680
116772
|
if (!selectionRepresentativeEvent(selection).requiresRegistration) {
|
|
@@ -116708,6 +116800,18 @@ function selectionRegistrationTarget(selection, subject) {
|
|
|
116708
116800
|
};
|
|
116709
116801
|
}
|
|
116710
116802
|
}
|
|
116803
|
+
/**
|
|
116804
|
+
* Every run the course page admits, not just those still taking bookings. An
|
|
116805
|
+
* invitation emailed for a run links here, and stays good after that run closes.
|
|
116806
|
+
* The wizard narrows these to the runs it offers for a new booking.
|
|
116807
|
+
*/
|
|
116808
|
+
function parentRegistrationTarget(selection, subject) {
|
|
116809
|
+
return {
|
|
116810
|
+
events: selection.admittedRuns.map((run) => run.representative),
|
|
116811
|
+
occurrenceContext: null,
|
|
116812
|
+
subject
|
|
116813
|
+
};
|
|
116814
|
+
}
|
|
116711
116815
|
/** Cancelled dates have no new-booking or recovery form, including old direct links. */
|
|
116712
116816
|
function isCancelledDateSelection(selection) {
|
|
116713
116817
|
return selection.kind === "occurrence" && hasCancelledRegistrationDate([selection.event]);
|
|
@@ -116715,7 +116819,7 @@ function isCancelledDateSelection(selection) {
|
|
|
116715
116819
|
|
|
116716
116820
|
//#endregion
|
|
116717
116821
|
//#region ../blocks/src/system/runtime/nodes/event-registration/RegistrationClosedState.tsx
|
|
116718
|
-
function RegistrationClosedState({ title, body }) {
|
|
116822
|
+
function RegistrationClosedState({ title, body, otherDatesHref }) {
|
|
116719
116823
|
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
|
|
116720
116824
|
id: EVENT_REGISTRATION_ANCHOR_ID,
|
|
116721
116825
|
className: "rb-reg-surface er-container er-registration-closed",
|
|
@@ -116734,7 +116838,15 @@ function RegistrationClosedState({ title, body }) {
|
|
|
116734
116838
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", {
|
|
116735
116839
|
className: "er-text er-text--muted",
|
|
116736
116840
|
children: body
|
|
116737
|
-
})
|
|
116841
|
+
}),
|
|
116842
|
+
otherDatesHref ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", {
|
|
116843
|
+
className: "er-text",
|
|
116844
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("a", {
|
|
116845
|
+
className: "rb-underline",
|
|
116846
|
+
href: otherDatesHref,
|
|
116847
|
+
children: "See the other dates"
|
|
116848
|
+
})
|
|
116849
|
+
}) : null
|
|
116738
116850
|
] })
|
|
116739
116851
|
})
|
|
116740
116852
|
});
|
|
@@ -131740,7 +131852,7 @@ async function loadConfig(configPath, output) {
|
|
|
131740
131852
|
return { errorMessage: "No config path provided." };
|
|
131741
131853
|
}
|
|
131742
131854
|
try {
|
|
131743
|
-
const { loadConfigFile: loadConfigFile$1 } = await import("../load-config-
|
|
131855
|
+
const { loadConfigFile: loadConfigFile$1 } = await import("../load-config-D7f6MXJV.mjs");
|
|
131744
131856
|
const rawConfig = await loadConfigFile$1(configPath);
|
|
131745
131857
|
const parsed = z.safeParse(riverbankSiteConfigSchema, rawConfig);
|
|
131746
131858
|
if (!parsed.success) {
|
|
@@ -134902,6 +135014,7 @@ function cancelledRunInput(run) {
|
|
|
134902
135014
|
visibility: run.visibility,
|
|
134903
135015
|
capacity: run.capacity,
|
|
134904
135016
|
waitlistMode: run.waitlistMode,
|
|
135017
|
+
bookingCutOffHours: run.bookingCutOffHours,
|
|
134905
135018
|
bookingOffer: run.bookingOffer,
|
|
134906
135019
|
venueRef: run.venueRef,
|
|
134907
135020
|
settings: run.settings,
|