@riverbankcms/sdk 0.162.0 → 0.164.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/CHANGELOG.md +9 -0
- package/README.md +12 -1
- package/dist/_dts/{BlocksIslandsHydrator-PZUoA872.d.ts → BlocksIslandsHydrator-CubPwupc.d.ts} +1 -1
- package/dist/_dts/{Page-CdQS6C7i.d.ts → Page-CDzsagB2.d.ts} +15 -12
- package/dist/_dts/{SdkPreviewMode-CNGO-5f1.d.ts → SdkPreviewMode-CPRQbRCI.d.ts} +2 -3
- package/dist/_dts/{client-DGa53rjL.d.ts → client-CbeYTSry.d.ts} +13 -41
- package/dist/_dts/{content-types-K9R7P-KF.d.ts → content-types--uYRIcIF.d.ts} +2 -2
- package/dist/_dts/{contracts-CyBaPaIq.d.ts → contracts-DJQYAOsv.d.ts} +5 -4
- package/dist/_dts/{footerPageOutline-B6jmKmon.d.ts → footerPageOutline-CKkhBwgJ.d.ts} +6 -6
- package/dist/_dts/{generatePageMetadata-iemoR3AN.d.ts → generatePageMetadata--qd7NCIA.d.ts} +2 -2
- package/dist/_dts/{index-DEu85xBt.d.ts → index-BZE-1azr.d.ts} +1 -1
- package/dist/_dts/{index-Wm62sXf2.d.ts → index-BpEbwDM7.d.ts} +4 -4
- package/dist/_dts/index-CXsnaCGe.d.ts +10 -0
- package/dist/_dts/{index-8CN0Nd-Z.d.ts → index-CjdIn9-_.d.ts} +2 -2
- package/dist/_dts/{index-BtnsA14K.d.ts → index-DYQFmf--.d.ts} +4 -3
- package/dist/_dts/{index-Dbd0Sn0G.d.ts → index-D_pQO-AS.d.ts} +21723 -21361
- package/dist/_dts/{index-Du1IRglc.d.ts → index-DriYVLfT.d.ts} +2 -2
- package/dist/_dts/{index-DI2yaSPY.d.ts → index-JS8WYgD3.d.ts} +31248 -30975
- package/dist/_dts/{index-Jlcq6w69.d.ts → index-wegfy7lf.d.ts} +3 -3
- package/dist/_dts/{loadContent-BPfAAZDW.d.ts → loadContent-DUi94Qfk.d.ts} +15 -30
- package/dist/_dts/{resolvePageContent-DWbrtKf8.d.ts → resolvePageContent-JDE0ry6T.d.ts} +2 -2
- package/dist/_dts/sdk/src/bookings/index.d.ts +3 -4
- package/dist/_dts/sdk/src/client/types.d.ts +2 -2
- package/dist/_dts/sdk/src/client.d.ts +6 -6
- package/dist/_dts/sdk/src/config/index.d.ts +6 -6
- package/dist/_dts/sdk/src/config/template-validation.d.ts +1 -1
- package/dist/_dts/sdk/src/config/validation.d.ts +1 -1
- package/dist/_dts/sdk/src/index.d.ts +8 -8
- package/dist/_dts/sdk/src/manifest/index.d.ts +3 -3
- package/dist/_dts/sdk/src/metadata/index.d.ts +1 -1
- package/dist/_dts/sdk/src/navigation/index.d.ts +2 -2
- package/dist/_dts/sdk/src/next/index.d.ts +7 -7
- package/dist/_dts/sdk/src/next/middleware.d.ts +2 -2
- package/dist/_dts/sdk/src/page-converter/index.d.ts +3 -3
- package/dist/_dts/sdk/src/portal/client.d.ts +1 -1
- package/dist/_dts/sdk/src/prebuild/index.d.ts +1 -1
- package/dist/_dts/sdk/src/preview-next/before-render.d.ts +2 -2
- package/dist/_dts/sdk/src/preview-next/client/index.d.ts +2 -2
- package/dist/_dts/sdk/src/preview-next/client/runtime.d.ts +1 -1
- package/dist/_dts/sdk/src/rendering/client.d.ts +2 -2
- package/dist/_dts/sdk/src/rendering/index.d.ts +13 -7
- package/dist/_dts/sdk/src/rendering/islands/client.d.ts +1 -1
- package/dist/_dts/sdk/src/rendering/server.d.ts +2 -2
- package/dist/_dts/sdk/src/routing/index.d.ts +5 -5
- package/dist/_dts/sdk/src/server.d.ts +5 -5
- package/dist/_dts/sdk/src/spam-protection/index.d.ts +32 -52
- package/dist/_dts/sdk/src/theme/index.d.ts +1 -1
- package/dist/_dts/{types-ClZ-BQL_.d.ts → types-DiciZDrk.d.ts} +3 -3
- package/dist/_dts/{types-CVv2H4AT.d.ts → types-DubJnBnI.d.ts} +7 -7
- package/dist/_dts/{types-CfNG5koF.d.ts → types-W40f2olO.d.ts} +3 -2
- package/dist/_dts/{validation-BJ6Lf_Dr.d.ts → validation-BF4_zNkR.d.ts} +4 -4
- package/dist/client/{BlocksIslandsHydrator-COqlgWYU.mjs → BlocksIslandsHydrator-64hFxF02.mjs} +20 -20
- package/dist/client/{BookingMailingListNote-CFYPDEHH.mjs → BookingMailingListNote-CSQyFm9J.mjs} +1 -1
- package/dist/client/{CalendarNavigationChevron-COBVxgHb.mjs → CalendarNavigationChevron-Bvkx8Z7Y.mjs} +6 -6
- package/dist/client/{CheckboxChoice-C7X9dJ8A.mjs → CheckboxChoice-3PhxDxgR.mjs} +1 -1
- package/dist/client/{DemoBookingPortalAccess-CvT0E9AR.mjs → DemoBookingPortalAccess-pt2xXBQp.mjs} +5 -5
- package/dist/client/{DemoPortalSignInLink-EBOBN5dT.mjs → DemoPortalSignInLink-Qw780EfW.mjs} +1 -1
- package/dist/client/{EventCalendar.client-U6pKcntV.mjs → EventCalendar.client-DWoboRW5.mjs} +9 -9
- package/dist/client/{EventCombined.client-CNzwEHws.mjs → EventCombined.client-C98ucpcP.mjs} +8 -8
- package/dist/client/{EventEmbeddedCheckoutStep-B9yAWV_k.mjs → EventEmbeddedCheckoutStep-DHRlFfkp.mjs} +2 -1
- package/dist/client/{EventItem-M5rpaHxi.mjs → EventItem-hrSyTApW.mjs} +102 -22
- package/dist/client/{EventListWeekNavigation-D4ieBLDY.mjs → EventListWeekNavigation-C3t7H13W.mjs} +1 -1
- package/dist/client/{EventListing.client-B8F40Rmn.mjs → EventListing.client-Cp11sBX_.mjs} +3 -3
- package/dist/client/{EventListing.view-k4lhuCn5.mjs → EventListing.view-Dd5QHIAf.mjs} +7 -56
- package/dist/client/{EventRegistrationPayment-C3g8_Hqb.mjs → EventRegistrationPayment-ByT88VHR.mjs} +18 -22
- package/dist/client/{LocationMapActions-CAjt7qVo.mjs → LocationMapActions-BsepG5Vv.mjs} +2 -2
- package/dist/client/{MapDrawingSvg-_aIK2ojv.mjs → MapDrawingSvg-R4JMT4yd.mjs} +1 -1
- package/dist/client/{Page-DJBIQBOw.mjs → Page-Dub71o3c.mjs} +956 -378
- package/dist/client/ProtectedSubmitButton-DGbgGvdh.mjs +14 -0
- package/dist/client/SpamProtectionWidget-CRsKTQV-.mjs +139 -0
- package/dist/client/{StepIndicator-CFacB1z6.mjs → StepIndicator-Bp7MyutT.mjs} +2 -2
- package/dist/client/{TabBarFragment-BLsfQskO.mjs → TabBarFragment-C4WJyybx.mjs} +1 -1
- package/dist/client/{ThemedButton-BWsDgjMC.mjs → ThemedButton-BGVwNwE-.mjs} +2 -898
- package/dist/client/{accordion-CtO2XF7M.mjs → accordion-vCG_JC5t.mjs} +1 -1
- package/dist/client/altchaProtection-BWchRM3v.mjs +12 -0
- package/dist/client/{booking-form.client-RICCQ0h2.mjs → booking-form.client-CHTbcZJM.mjs} +23 -56
- package/dist/client/{bookingForm-SvjLPx8i.mjs → bookingForm-BxbUbzUr.mjs} +4 -4
- package/dist/client/bookings.mjs +23 -32
- package/dist/client/{carousel-BR-zCD3O.mjs → carousel-FM1mkkL0.mjs} +2 -2
- package/dist/client/{carousel.client-CEWtoZd3.mjs → carousel.client-ChoLiWwD.mjs} +1 -1
- package/dist/client/{cart-C6YpKbZZ.mjs → cart-BDFhbh9j.mjs} +3 -3
- package/dist/client/{cart.client-dC938WrX.mjs → cart.client-x3HOke6T.mjs} +1 -1
- package/dist/client/{checkout-Dy9RlREI.mjs → checkout-BibhwnTd.mjs} +3 -3
- package/dist/client/{checkout.client-CefG0d2F.mjs → checkout.client-CE4jUi0G.mjs} +1 -1
- package/dist/client/client.mjs +216 -109
- package/dist/client/{context-BFwxgZpB.mjs → context-BNAM7NsW.mjs} +17 -3
- package/dist/client/{cta-DtA42Xio.mjs → cta-ChiN1Vgg.mjs} +1 -1
- package/dist/client/{dateFormatting-yP1B7F0O.mjs → dateFormatting-QwBSo0hK.mjs} +1 -1
- package/dist/client/{demoPortalMagicLink-WOiT5Ryi.mjs → demoPortalMagicLink-NwKJk6gn.mjs} +1 -1
- package/dist/client/{enhanceHeaderSection-Dh8c_Lq-.mjs → enhanceHeaderSection-D4zqEBDl.mjs} +3 -3
- package/dist/client/{event-details.client-BFgsLqTj.mjs → event-details.client-jFyFjOIC.mjs} +1 -1
- package/dist/client/{event-registration.client-BaXZ1-Ky.mjs → event-registration.client-BK_jVv3R.mjs} +37 -55
- package/dist/client/{eventCalendar-COLwF80U.mjs → eventCalendar-DSkzejQh.mjs} +4 -4
- package/dist/client/{eventCombined-D3Ltwu03.mjs → eventCombined-BG-BEaYh.mjs} +4 -4
- package/dist/client/{eventDetails-CBrkimXu.mjs → eventDetails-BhIwXAKe.mjs} +2 -2
- package/dist/client/{eventListing-CedKVA1S.mjs → eventListing-DQtyO1Xj.mjs} +4 -4
- package/dist/client/{eventRegistration-DkQQfR1b.mjs → eventRegistration-DRTz8X0M.mjs} +4 -4
- package/dist/client/{form-XFy9uXSJ.mjs → form-GXqjObPC.mjs} +3 -3
- package/dist/client/{form.client-B0iancFK.mjs → form.client-CoKNba2e.mjs} +33 -24
- package/dist/client/{form.parts-DMbolu9Y.mjs → form.parts-magB_epJ.mjs} +6 -5
- package/dist/client/{formatDate-Jm5MQOCA.mjs → formatDate-BiloOyjS.mjs} +1 -1
- package/dist/client/gifting/client.mjs +4 -3
- package/dist/client/{headerSection-WjlECjtV.mjs → headerSection-BMQCPHT3.mjs} +2 -2
- package/dist/client/mediaAssets-BX-vWwQc.mjs +43 -0
- package/dist/client/{mediaContext-CNzWmoA4.mjs → mediaContext-CdqGYlWl.mjs} +1 -1
- package/dist/client/{newsletter-form.client-D-XwJTjN.mjs → newsletter-form.client-8orCez1z.mjs} +99 -84
- package/dist/client/{newsletter-form.parts-H92f30y0.mjs → newsletter-form.parts-D8NgHY_F.mjs} +11 -7
- package/dist/client/{newsletterForm-DMuxzu6I.mjs → newsletterForm-BhBNsS3n.mjs} +3 -3
- package/dist/client/{noop-B3RNPVrt.mjs → noop-C2vZse15.mjs} +3 -3
- package/dist/client/portal/client.mjs +13 -12
- package/dist/client/{product-detail.client-B3HuuykE.mjs → product-detail.client-CQ0k0fbH.mjs} +1 -1
- package/dist/client/{product-list.client-CzsDrHQO.mjs → product-list.client-Xlr1P0x9.mjs} +1 -1
- package/dist/client/{productDetail-CbBUVWgd.mjs → productDetail-BsCao6X4.mjs} +3 -3
- package/dist/client/{productList-vqOKH2mh.mjs → productList-Cc-PmbEe.mjs} +3 -3
- package/dist/client/{propsDecoder-CkSUep5a.mjs → propsDecoder-DikkDJ9x.mjs} +3 -3
- package/dist/client/protection-C0PoH1lT.mjs +104 -0
- package/dist/client/purchase-BMsWpx8y.mjs +894 -0
- package/dist/client/{registry.server-cZ24QwtW.mjs → registry.server-BpLZo3bC.mjs} +27 -24
- package/dist/client/rendering/client.mjs +27 -27
- package/dist/client/rendering/islands.mjs +1 -1
- package/dist/client/rendering.mjs +23 -19
- package/dist/client/{richText-coerce-DDcCKvBJ.mjs → richText-coerce-WuMYrBm3.mjs} +1 -1
- package/dist/client/{routeIslandApiConfig-DYBioANh.mjs → routeIslandApiConfig-DNx6b07x.mjs} +1 -1
- package/dist/client/{schema-DNHLlze-.mjs → schema-DMUkBtIO.mjs} +3517 -3147
- package/dist/client/{shop-CF0dhnfH.mjs → shop-DyXtB5TD.mjs} +3 -3
- package/dist/client/{shop-commerce-store-Ba8zPlIg.mjs → shop-commerce-store-CbBsS1kD.mjs} +1 -1
- package/dist/client/{shop-commerce-DQznNBEo.mjs → shop-commerce-xjWH7-Ym.mjs} +11 -11
- package/dist/client/{shop.client-DqfYoqWH.mjs → shop.client-QOKqQPgK.mjs} +12 -12
- package/dist/client/{shop.interactive-CreQ0I7i.mjs → shop.interactive-BQdm441g.mjs} +62 -34
- package/dist/client/{shopShared-D-yh-P7g.mjs → shopShared-CyW6MU48.mjs} +2 -2
- package/dist/client/{site-styles-B9HgmY07.mjs → site-styles-BLHYJ8S7.mjs} +755 -35
- package/dist/client/spam-protection.mjs +4 -69
- package/dist/client/{timetableModel-DCdVErTJ.mjs → timetableModel-BgdkhRuA.mjs} +10 -10
- package/dist/client/{useAvailableSlots-Cvgdp2DH.mjs → useAvailableSlots-wmdo6uZ8.mjs} +3 -3
- package/dist/client/{useBookingNowIso-DrTnGNzD.mjs → useBookingNowIso-CUExAee1.mjs} +1 -1
- package/dist/client/{useDiscountApply-CULjnXGl.mjs → useDiscountApply-BRM-OoTN.mjs} +2 -2
- package/dist/client/{useDiscountCodeUi-Gn_m7e0o.mjs → useDiscountCodeUi-BEIvL31G.mjs} +1 -1
- package/dist/client/{useEventPagination-CsysCF22.mjs → useEventPagination-Dk3g64we.mjs} +6 -6
- package/dist/client/{view-DMyTchi7.mjs → view-BnaOmrap.mjs} +4 -4
- package/dist/client/{view-BpBjo9Te.mjs → view-vhKGFfC3.mjs} +7 -7
- package/dist/client/{wizardSteps-BO2OmMO9.mjs → wizardSteps-xqU4q63H.mjs} +14 -14
- package/dist/preview-next/before-render.mjs +1 -1
- package/dist/preview-next/chrome.css +1 -1
- package/dist/preview-next/client/{EventEmbeddedCheckoutStep-DLsSmZbO.mjs → EventEmbeddedCheckoutStep-43wIAWr4.mjs} +1 -1
- package/dist/preview-next/client/{PreviewEditorSidebar-ChrW9VEo.mjs → PreviewEditorSidebar-C3AQVxQt.mjs} +74 -72
- package/dist/preview-next/client/{PreviewEditorUI-VaHvYtrA.mjs → PreviewEditorUI-C-1zDCR_.mjs} +151 -126
- package/dist/preview-next/client/{SdkPreviewModeRuntime-DWwktlWs.mjs → SdkPreviewModeRuntime-B47yHFL0.mjs} +371 -1433
- package/dist/preview-next/client/{SdkPreviewModeRuntime-Bz7jR6nl.mjs → SdkPreviewModeRuntime-C6Rhm2NQ.mjs} +1 -1
- package/dist/preview-next/client/{ThemedButton-CHKOWXxl.mjs → ThemedButton-g7NPrsGp.mjs} +462 -110
- package/dist/preview-next/client/{previewAuthStore-C0VUwEHz.mjs → previewAuthStore-By_zfrS5.mjs} +164988 -163471
- package/dist/preview-next/client/{previewChromeSurface-Dhyx2YrS.mjs → previewChromeSurface-Cjwxv90x.mjs} +1 -1
- package/dist/preview-next/client/runtime.mjs +3 -3
- package/dist/preview-next/client/{sdk-runtime-C2GWOCyj.mjs → sdk-runtime-BG2HYvQj.mjs} +1 -1
- package/dist/preview-next/client/{siteStyleAccess-DHyzUpv4.mjs → siteStyleAccess-BiSyYyyr.mjs} +10854 -9509
- package/dist/preview-next/client/{spinner-BeR2S8oG.mjs → spinner-DnWpeDp2.mjs} +1 -1
- package/dist/preview-next/edit-map.css +37 -0
- package/dist/preview-next/keepAlive.mjs +1 -1
- package/dist/preview-next/maplibre-gl.css +1 -0
- package/dist/preview-next/middleware.mjs +1 -1
- package/dist/preview-next/{route-contract-CkrFDMrl.mjs → route-contract-D5tHZEz5.mjs} +40 -42
- package/dist/preview-next/upload-structure.css +18 -0
- package/dist/server/{Block.shared-DxvNGDig.mjs → Block.shared-Iy7g11iP.mjs} +17 -16
- package/dist/server/{bindings-BuhKvYkE.mjs → bindings-BVJGgUT0.mjs} +2 -2
- package/dist/server/{client-BobW6DOz.mjs → client-CiKaE8ms.mjs} +215 -109
- package/dist/server/config-validation.mjs +1 -1
- package/dist/server/config.mjs +2 -2
- package/dist/server/{effectiveNavLinkStyle-B-MKSt0p.mjs → effectiveNavLinkStyle-EDSdd_oK.mjs} +725 -18
- package/dist/server/index.mjs +3 -3
- package/dist/server/{loadContent-CCG_3mbY.mjs → loadContent-BuintpdO.mjs} +6 -4
- package/dist/server/loadPage-BwjncpJf.mjs +2 -0
- package/dist/server/{loadPage-jntGoMrf.mjs → loadPage-Dk4wea8M.mjs} +3 -2
- package/dist/server/next.mjs +9 -9
- package/dist/server/{overrideResolution-BBOlgn4Z.mjs → overrideResolution-BDiQWM7D.mjs} +1 -1
- package/dist/server/{overrides-DByQwIyW.mjs → overrides-DVemf-GV.mjs} +231 -114
- package/dist/server/page-converter.mjs +1 -1
- package/dist/server/{prebuild-DrwcTk2t.mjs → prebuild-DubLNgRH.mjs} +1 -1
- package/dist/server/prebuild.mjs +1 -1
- package/dist/server/{prefetchBlockData-LfgxSJYE.mjs → prefetchBlockData-Bnbwoe5n.mjs} +53 -28
- package/dist/server/{publicProducts-8A3T5v4M.mjs → publicProducts-D3Fc5TKk.mjs} +85 -70
- package/dist/server/{registry-Digv02oV.mjs → registry-zjd1P2Dl.mjs} +127 -59
- package/dist/server/rendering/server.mjs +4 -4
- package/dist/server/rendering.mjs +8 -8
- package/dist/server/{resolveBlockData-C23t8-77.mjs → resolveBlockData-CZJ--nH6.mjs} +1 -1
- package/dist/server/routing.mjs +1 -1
- package/dist/server/{schema-BiqpDRwB.mjs → schema-BlTWmTSl.mjs} +4163 -3793
- package/dist/server/server.mjs +3 -3
- package/dist/server/{site-styles-DrkprQPL.mjs → site-styles-yHytcXIB.mjs} +33 -20
- package/dist/server/{siteChromeOverlayClearance-BmKKkkbh.mjs → siteChromeOverlayClearance-D0uCNZ7E.mjs} +159 -107
- package/dist/server/{src-08GY1njw.mjs → src-cbbK3Bho.mjs} +547 -147
- package/dist/server/theme-bridge.mjs +1 -1
- package/dist/server/theme.mjs +1 -1
- package/dist/server/{themeAdmission-CSd_Vusz.mjs → themeAdmission-BdY8lP-K.mjs} +3 -2
- package/dist/server/{validation-DdUTkBOZ.mjs → validation-CGH-Xs4E.mjs} +2 -2
- package/dist/server/{version-DdIOqIDe.mjs → version-DoOG6F13.mjs} +1 -1
- package/dist/styles/index.css +399 -112
- package/package.json +2 -3
- package/dist/_dts/AltchaWidget-COIYJ7DF.d.ts +0 -33
- package/dist/_dts/index-C39F9KaB.d.ts +0 -77
- package/dist/client/mediaAssets-BkoW_PEn.mjs +0 -16
- package/dist/client/src-BNZzXgWu.mjs +0 -102
- package/dist/server/loadPage-Bk9HDh9K.mjs +0 -2
package/dist/client/{newsletter-form.client-D-XwJTjN.mjs → newsletter-form.client-8orCez1z.mjs}
RENAMED
|
@@ -1,14 +1,15 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import {
|
|
2
|
+
import { I as newsletterBlockSubmissionMessage, P as NEWSLETTER_SIGNUPS_PAUSED_MESSAGE, dn as parseMailingListVisitorSelection } from "./shop.interactive-BQdm441g.mjs";
|
|
3
3
|
import { c as assertNever$1, t as assertNever } from "./src-VIsPY-kw.mjs";
|
|
4
|
-
import { Pr as listLookSlot } from "./wizardSteps-
|
|
5
|
-
import {
|
|
4
|
+
import { Pr as listLookSlot } from "./wizardSteps-xqU4q63H.mjs";
|
|
5
|
+
import { C as clsx } from "./ThemedButton-BGVwNwE-.mjs";
|
|
6
6
|
import { t as FeedbackMessage } from "./FeedbackMessage-CSJrAuXH.mjs";
|
|
7
|
-
import { a as partitionNewsletterFields, i as TOPIC_CHOICE_FIELD_ID, n as NewsletterSubmitRow, r as NewsletterTopicChips, t as NewsletterExtraField } from "./newsletter-form.parts-
|
|
8
|
-
import { n as useBlockApi, r as BlockApiError } from "./context-
|
|
9
|
-
import { i as AltchaWidget, r as isSpamProtectionEnabled, t as getChallengeUrl } from "./src-BNZzXgWu.mjs";
|
|
7
|
+
import { a as partitionNewsletterFields, i as TOPIC_CHOICE_FIELD_ID, n as NewsletterSubmitRow, r as NewsletterTopicChips, t as NewsletterExtraField } from "./newsletter-form.parts-D8NgHY_F.mjs";
|
|
8
|
+
import { n as useBlockApi, r as BlockApiError } from "./context-BNAM7NsW.mjs";
|
|
10
9
|
import { t as MAILING_LIST_CONFIRMATION_MESSAGE } from "./mailingListSignupCopy-CX4sDozG.mjs";
|
|
11
|
-
import {
|
|
10
|
+
import { t as SpamProtectionWidget } from "./SpamProtectionWidget-CRsKTQV-.mjs";
|
|
11
|
+
import { t as useAltchaProtection } from "./altchaProtection-BWchRM3v.mjs";
|
|
12
|
+
import { useEffect, useReducer, useRef } from "react";
|
|
12
13
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
13
14
|
//#region ../blocks/src/system/runtime/nodes/newsletter-form.client.state.ts
|
|
14
15
|
const initialNewsletterFormSubmissionState = { tag: "idle" };
|
|
@@ -89,6 +90,7 @@ function mapNewsletterFormFieldsToSubscriberInput(fields) {
|
|
|
89
90
|
}
|
|
90
91
|
function resolveNewsletterSubmitTarget(input) {
|
|
91
92
|
switch (input.tag) {
|
|
93
|
+
case "demo": return { tag: "demo" };
|
|
92
94
|
case "block-source": return input.sourceRef ? publishedSourceTarget(input.sourceRef) : {
|
|
93
95
|
tag: "unavailable",
|
|
94
96
|
reason: "missing_block_source"
|
|
@@ -118,21 +120,69 @@ function readOptionalSubmittedText(value) {
|
|
|
118
120
|
function readSubmittedText(value) {
|
|
119
121
|
return typeof value === "string" ? value.trim() : "";
|
|
120
122
|
}
|
|
123
|
+
/** Demo completion and live source readiness are decided before any request. */
|
|
124
|
+
function planNewsletterSubmission(fields, hydration, availability) {
|
|
125
|
+
if (fields.honeypot) return {
|
|
126
|
+
kind: "settled",
|
|
127
|
+
action: {
|
|
128
|
+
type: "succeeded",
|
|
129
|
+
outcome: "subscribed"
|
|
130
|
+
},
|
|
131
|
+
diagnostic: null
|
|
132
|
+
};
|
|
133
|
+
if (!fields.email) return {
|
|
134
|
+
kind: "settled",
|
|
135
|
+
action: {
|
|
136
|
+
type: "failed",
|
|
137
|
+
error: newsletterFieldError("email", "Email is required")
|
|
138
|
+
},
|
|
139
|
+
diagnostic: null
|
|
140
|
+
};
|
|
141
|
+
const target = resolveNewsletterSubmitTarget(hydration.target);
|
|
142
|
+
if (target.tag === "demo") return {
|
|
143
|
+
kind: "settled",
|
|
144
|
+
action: {
|
|
145
|
+
type: "succeeded",
|
|
146
|
+
outcome: "demo"
|
|
147
|
+
},
|
|
148
|
+
diagnostic: null
|
|
149
|
+
};
|
|
150
|
+
const reason = target.tag === "unavailable" ? target.reason : hydration.setupRevision === null ? "setup_not_configured" : availability === "unavailable" ? "destination_unavailable" : null;
|
|
151
|
+
if (target.tag === "ready" && hydration.setupRevision !== null && reason === null) return {
|
|
152
|
+
kind: "submit",
|
|
153
|
+
sourceRef: target.sourceRef,
|
|
154
|
+
setupRevision: hydration.setupRevision
|
|
155
|
+
};
|
|
156
|
+
return {
|
|
157
|
+
kind: "settled",
|
|
158
|
+
action: {
|
|
159
|
+
type: "failed",
|
|
160
|
+
error: newsletterFormError(NEWSLETTER_SIGNUPS_PAUSED_MESSAGE)
|
|
161
|
+
},
|
|
162
|
+
diagnostic: reason
|
|
163
|
+
};
|
|
164
|
+
}
|
|
165
|
+
function reportNewsletterAdmission(diagnostic) {
|
|
166
|
+
if (diagnostic) reportNewsletterSignupRefusal(diagnostic);
|
|
167
|
+
}
|
|
121
168
|
//#endregion
|
|
122
169
|
//#region ../blocks/src/system/runtime/nodes/newsletter-form.client.tsx
|
|
123
170
|
function NewsletterFormClient({ render }) {
|
|
124
171
|
const submissionMessage = newsletterBlockSubmissionMessage(render.hydration.target);
|
|
125
172
|
const api = useBlockApi();
|
|
126
173
|
const [submissionState, dispatchSubmission] = useReducer(newsletterFormSubmissionReducer, initialNewsletterFormSubmissionState);
|
|
127
|
-
const
|
|
174
|
+
const protection = useAltchaProtection({
|
|
175
|
+
apiBaseUrl: api.config.baseUrl,
|
|
176
|
+
enabled: render.hydration.spamProtectionEnabled
|
|
177
|
+
});
|
|
128
178
|
const successRef = useRef(null);
|
|
129
179
|
const succeeded = isNewsletterFormSuccess(submissionState);
|
|
130
180
|
useEffect(() => {
|
|
131
181
|
if (succeeded) successRef.current?.focus();
|
|
132
182
|
}, [succeeded]);
|
|
133
|
-
const showSpamProtection = render.hydration.spamProtectionEnabled ?? isSpamProtectionEnabled();
|
|
134
183
|
const handleSubmit = async (e) => {
|
|
135
184
|
e.preventDefault();
|
|
185
|
+
if (protection.submission.kind !== "ready" || isNewsletterFormSubmitting(submissionState)) return;
|
|
136
186
|
const formData = new FormData(e.currentTarget);
|
|
137
187
|
const submittedFields = mapNewsletterFormFieldsToSubscriberInput({
|
|
138
188
|
email: formData.get("email"),
|
|
@@ -143,43 +193,10 @@ function NewsletterFormClient({ render }) {
|
|
|
143
193
|
phone: formData.get("phone"),
|
|
144
194
|
website: formData.get("website")
|
|
145
195
|
});
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
});
|
|
151
|
-
return;
|
|
152
|
-
}
|
|
153
|
-
if (!submittedFields.email) {
|
|
154
|
-
dispatchSubmission({
|
|
155
|
-
type: "failed",
|
|
156
|
-
error: newsletterFieldError("email", "Email is required")
|
|
157
|
-
});
|
|
158
|
-
return;
|
|
159
|
-
}
|
|
160
|
-
const submitTarget = resolveNewsletterSubmitTarget(render.hydration.target);
|
|
161
|
-
if (submitTarget.tag === "unavailable") {
|
|
162
|
-
reportNewsletterSignupRefusal(submitTarget.reason, { target: render.hydration.target });
|
|
163
|
-
dispatchSubmission({
|
|
164
|
-
type: "failed",
|
|
165
|
-
error: newsletterFormError(NEWSLETTER_SIGNUPS_PAUSED_MESSAGE)
|
|
166
|
-
});
|
|
167
|
-
return;
|
|
168
|
-
}
|
|
169
|
-
if (render.hydration.setupRevision === null) {
|
|
170
|
-
reportNewsletterSignupRefusal("setup_not_configured");
|
|
171
|
-
dispatchSubmission({
|
|
172
|
-
type: "failed",
|
|
173
|
-
error: newsletterFormError(NEWSLETTER_SIGNUPS_PAUSED_MESSAGE)
|
|
174
|
-
});
|
|
175
|
-
return;
|
|
176
|
-
}
|
|
177
|
-
if (render.display.availability === "unavailable") {
|
|
178
|
-
reportNewsletterSignupRefusal("destination_unavailable", { setupRevision: render.hydration.setupRevision });
|
|
179
|
-
dispatchSubmission({
|
|
180
|
-
type: "failed",
|
|
181
|
-
error: newsletterFormError(NEWSLETTER_SIGNUPS_PAUSED_MESSAGE)
|
|
182
|
-
});
|
|
196
|
+
const admission = planNewsletterSubmission(submittedFields, render.hydration, render.display.availability);
|
|
197
|
+
if (admission.kind === "settled") {
|
|
198
|
+
reportNewsletterAdmission(admission.diagnostic);
|
|
199
|
+
dispatchSubmission(admission.action);
|
|
183
200
|
return;
|
|
184
201
|
}
|
|
185
202
|
const selection = readVisitorSelection(formData, render.hydration);
|
|
@@ -194,36 +211,19 @@ function NewsletterFormClient({ render }) {
|
|
|
194
211
|
}
|
|
195
212
|
const visitorSelection = selection.tag === "chosen" ? selection.value : void 0;
|
|
196
213
|
dispatchSubmission({ type: "submitted" });
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
altchaSolution
|
|
211
|
-
}
|
|
212
|
-
});
|
|
213
|
-
if (result.tag === "subscribed" || result.tag === "confirmation_required") dispatchSubmission({
|
|
214
|
-
type: "succeeded",
|
|
215
|
-
outcome: result.tag
|
|
216
|
-
});
|
|
217
|
-
else dispatchSubmission({
|
|
218
|
-
type: "failed",
|
|
219
|
-
error: newsletterFormError(publicSignupError(result))
|
|
220
|
-
});
|
|
221
|
-
} catch (err) {
|
|
222
|
-
dispatchSubmission({
|
|
223
|
-
type: "failed",
|
|
224
|
-
error: newsletterFormError(transportFailureMessage(err))
|
|
225
|
-
});
|
|
226
|
-
}
|
|
214
|
+
dispatchSubmission(await sendNewsletterSubscription(api, {
|
|
215
|
+
authorization: protection.submission.authorization,
|
|
216
|
+
email: submittedFields.email,
|
|
217
|
+
firstName: submittedFields.firstName,
|
|
218
|
+
lastName: submittedFields.lastName,
|
|
219
|
+
name: submittedFields.name,
|
|
220
|
+
company: submittedFields.company,
|
|
221
|
+
phone: submittedFields.phone,
|
|
222
|
+
sourceRef: admission.sourceRef,
|
|
223
|
+
setupRevision: admission.setupRevision,
|
|
224
|
+
...visitorSelection ? { visitorSelection } : {},
|
|
225
|
+
meta: { honeypot: submittedFields.honeypot }
|
|
226
|
+
}));
|
|
227
227
|
};
|
|
228
228
|
const submitting = isNewsletterFormSubmitting(submissionState);
|
|
229
229
|
const formError = getNewsletterSubmissionFormError(submissionState);
|
|
@@ -259,8 +259,7 @@ function NewsletterFormClient({ render }) {
|
|
|
259
259
|
submitting,
|
|
260
260
|
submissionMessage,
|
|
261
261
|
formError,
|
|
262
|
-
|
|
263
|
-
onAltchaSolution: setAltchaSolution
|
|
262
|
+
protection
|
|
264
263
|
}),
|
|
265
264
|
render.display.privacyNote && /* @__PURE__ */ jsx("p", {
|
|
266
265
|
className: "newsletter-privacy-note",
|
|
@@ -271,6 +270,24 @@ function NewsletterFormClient({ render }) {
|
|
|
271
270
|
})
|
|
272
271
|
});
|
|
273
272
|
}
|
|
273
|
+
/** Effect shell: send the admitted request and map its public outcome to form state. */
|
|
274
|
+
async function sendNewsletterSubscription(api, request) {
|
|
275
|
+
try {
|
|
276
|
+
const result = await api.subscribeNewsletter(request);
|
|
277
|
+
return result.tag === "subscribed" || result.tag === "confirmation_required" ? {
|
|
278
|
+
type: "succeeded",
|
|
279
|
+
outcome: result.tag
|
|
280
|
+
} : {
|
|
281
|
+
type: "failed",
|
|
282
|
+
error: newsletterFormError(publicSignupError(result))
|
|
283
|
+
};
|
|
284
|
+
} catch (error) {
|
|
285
|
+
return {
|
|
286
|
+
type: "failed",
|
|
287
|
+
error: newsletterFormError(transportFailureMessage(error))
|
|
288
|
+
};
|
|
289
|
+
}
|
|
290
|
+
}
|
|
274
291
|
function NewsletterSuccessMessage({ lookSlots, message }) {
|
|
275
292
|
return lookSlots ? /* @__PURE__ */ jsx("p", {
|
|
276
293
|
role: "status",
|
|
@@ -283,7 +300,7 @@ function NewsletterSuccessMessage({ lookSlots, message }) {
|
|
|
283
300
|
children: message
|
|
284
301
|
});
|
|
285
302
|
}
|
|
286
|
-
function NewsletterFormFields({ render, submissionState, submitting, submissionMessage, formError,
|
|
303
|
+
function NewsletterFormFields({ render, submissionState, submitting, submissionMessage, formError, protection }) {
|
|
287
304
|
const { email: emailField, extra: extraFields } = partitionNewsletterFields(render.display.fields);
|
|
288
305
|
const fieldError = (id) => getNewsletterSubmissionFieldError(submissionState, id);
|
|
289
306
|
return /* @__PURE__ */ jsxs("div", {
|
|
@@ -305,12 +322,9 @@ function NewsletterFormFields({ render, submissionState, submitting, submissionM
|
|
|
305
322
|
error: fieldError(field.id)
|
|
306
323
|
}, field.id))
|
|
307
324
|
}) : null,
|
|
308
|
-
|
|
325
|
+
protection.widget && /* @__PURE__ */ jsx("div", {
|
|
309
326
|
className: "newsletter-altcha",
|
|
310
|
-
children: /* @__PURE__ */ jsx(
|
|
311
|
-
challengeUrl: getChallengeUrl(),
|
|
312
|
-
onSolutionChange: onAltchaSolution
|
|
313
|
-
})
|
|
327
|
+
children: /* @__PURE__ */ jsx(SpamProtectionWidget, { protection })
|
|
314
328
|
}),
|
|
315
329
|
formError && /* @__PURE__ */ jsx(FeedbackMessage, {
|
|
316
330
|
tone: "error",
|
|
@@ -323,6 +337,7 @@ function NewsletterFormFields({ render, submissionState, submitting, submissionM
|
|
|
323
337
|
emailField,
|
|
324
338
|
buttonVariant: render.display.buttonVariant,
|
|
325
339
|
buttonLabel: submitting ? "Subscribing..." : render.display.buttonLabel,
|
|
340
|
+
submission: protection.submission,
|
|
326
341
|
disabled: submitting || submissionMessage !== null,
|
|
327
342
|
error: emailField ? fieldError(emailField.id) : null
|
|
328
343
|
}),
|
package/dist/client/{newsletter-form.parts-H92f30y0.mjs → newsletter-form.parts-D8NgHY_F.mjs}
RENAMED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import {
|
|
3
|
-
import { Pr as listLookSlot } from "./wizardSteps-BO2OmMO9.mjs";
|
|
2
|
+
import { Pr as listLookSlot } from "./wizardSteps-xqU4q63H.mjs";
|
|
4
3
|
import { n as getFieldValidationControlProps, t as FieldValidationMessage } from "./FieldValidationMessage-CsqxShw4.mjs";
|
|
4
|
+
import { t as ProtectedSubmitButton } from "./ProtectedSubmitButton-DGbgGvdh.mjs";
|
|
5
5
|
import "react";
|
|
6
6
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
7
7
|
//#region ../blocks/src/system/runtime/nodes/newsletter-form.parts.tsx
|
|
@@ -59,7 +59,7 @@ function NewsletterExtraField({ field, disabled, error, lookSlots }) {
|
|
|
59
59
|
});
|
|
60
60
|
}
|
|
61
61
|
/** The email field and submit button sharing one input-styled shell. */
|
|
62
|
-
function NewsletterEmailEntry({ field, buttonVariant, buttonLabel, disabled, error }) {
|
|
62
|
+
function NewsletterEmailEntry({ field, buttonVariant, buttonLabel, submission, disabled, error }) {
|
|
63
63
|
const inputId = inputIdFor(field);
|
|
64
64
|
const errorId = `${inputId}-error`;
|
|
65
65
|
return /* @__PURE__ */ jsxs("div", {
|
|
@@ -86,7 +86,8 @@ function NewsletterEmailEntry({ field, buttonVariant, buttonLabel, disabled, err
|
|
|
86
86
|
messageId: errorId
|
|
87
87
|
})
|
|
88
88
|
}),
|
|
89
|
-
/* @__PURE__ */ jsx(
|
|
89
|
+
/* @__PURE__ */ jsx(ProtectedSubmitButton, {
|
|
90
|
+
submission,
|
|
90
91
|
type: "submit",
|
|
91
92
|
variant: buttonVariant,
|
|
92
93
|
size: "md",
|
|
@@ -105,7 +106,7 @@ function NewsletterEmailEntry({ field, buttonVariant, buttonLabel, disabled, err
|
|
|
105
106
|
* The submit action: joined to the email field when the preset has one
|
|
106
107
|
* (every current preset does), otherwise a plain themed button.
|
|
107
108
|
*/
|
|
108
|
-
function NewsletterSubmitRow({ emailField, lookSlots, buttonVariant, buttonLabel, disabled, error }) {
|
|
109
|
+
function NewsletterSubmitRow({ emailField, lookSlots, buttonVariant, buttonLabel, submission, disabled, error }) {
|
|
109
110
|
if (lookSlots) return /* @__PURE__ */ jsxs(Fragment, { children: [emailField && /* @__PURE__ */ jsx(NewsletterExtraField, {
|
|
110
111
|
field: emailField,
|
|
111
112
|
lookSlots,
|
|
@@ -113,7 +114,8 @@ function NewsletterSubmitRow({ emailField, lookSlots, buttonVariant, buttonLabel
|
|
|
113
114
|
error
|
|
114
115
|
}), /* @__PURE__ */ jsx("div", {
|
|
115
116
|
...listLookSlot({ lookSlots }, "actions"),
|
|
116
|
-
children: /* @__PURE__ */ jsx(
|
|
117
|
+
children: /* @__PURE__ */ jsx(ProtectedSubmitButton, {
|
|
118
|
+
submission,
|
|
117
119
|
...listLookSlot({ lookSlots }, "action"),
|
|
118
120
|
type: "submit",
|
|
119
121
|
variant: buttonVariant,
|
|
@@ -126,12 +128,14 @@ function NewsletterSubmitRow({ emailField, lookSlots, buttonVariant, buttonLabel
|
|
|
126
128
|
field: emailField,
|
|
127
129
|
buttonVariant,
|
|
128
130
|
buttonLabel,
|
|
131
|
+
submission,
|
|
129
132
|
disabled,
|
|
130
133
|
error
|
|
131
134
|
});
|
|
132
135
|
return /* @__PURE__ */ jsx("div", {
|
|
133
136
|
className: "newsletter-submit",
|
|
134
|
-
children: /* @__PURE__ */ jsx(
|
|
137
|
+
children: /* @__PURE__ */ jsx(ProtectedSubmitButton, {
|
|
138
|
+
submission,
|
|
135
139
|
type: "submit",
|
|
136
140
|
variant: buttonVariant,
|
|
137
141
|
size: "md",
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { t as defineIslandPropsDecoder } from "./propsDecoder-
|
|
3
|
-
import { t as BlockApiProvider } from "./context-
|
|
4
|
-
import { t as NewsletterFormClient } from "./newsletter-form.client-
|
|
2
|
+
import { t as defineIslandPropsDecoder } from "./propsDecoder-DikkDJ9x.mjs";
|
|
3
|
+
import { t as BlockApiProvider } from "./context-BNAM7NsW.mjs";
|
|
4
|
+
import { t as NewsletterFormClient } from "./newsletter-form.client-8orCez1z.mjs";
|
|
5
5
|
import { t as mountReactIsland } from "./reactMount-BGJVsHRb.mjs";
|
|
6
6
|
import "react";
|
|
7
7
|
import { jsx } from "react/jsx-runtime";
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { c as addMonths } from "./src-1PJxc8KO.mjs";
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import "./site-styles-
|
|
3
|
+
import { Mr as err, Nr as ok, _t as arrangementModes, sr as runtimeMediaSchema, xr as parseSiteTermsVersionId } from "./schema-DMUkBtIO.mjs";
|
|
4
|
+
import { h as validateBookingPaymentOptionKinds, s as confirmationPaymentSchema } from "./purchase-BMsWpx8y.mjs";
|
|
5
|
+
import "./site-styles-BLHYJ8S7.mjs";
|
|
6
6
|
import { z } from "zod";
|
|
7
7
|
//#region ../core/src/date-time-formatter.ts
|
|
8
8
|
/** Shared Intl engine, internal to core's date presentation owners. */
|
|
@@ -1,22 +1,23 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
"use client";
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
3
|
+
import { Cr as unsafeAsAppointmentResourceId } from "../schema-DMUkBtIO.mjs";
|
|
4
|
+
import { b as formatCurrencyAmount, g as formatOrderInstalmentStatusLabel$1, v as resolveFlexibleBalancePaymentEligibility, y as parsePositiveMoneyInputToCents } from "../purchase-BMsWpx8y.mjs";
|
|
5
5
|
import { c as assertNever$1, t as assertNever } from "../src-VIsPY-kw.mjs";
|
|
6
|
-
import { t as logger } from "../noop-
|
|
6
|
+
import { t as logger } from "../noop-C2vZse15.mjs";
|
|
7
7
|
import { t as generateUuidV4 } from "../uuid-BETKW8rS.mjs";
|
|
8
|
+
import { C as clsx, i as ThemedButtonLink, o as ThemedFileChooser, r as ThemedButton, t as ThemedActionsButton, u as SpinnerNode } from "../ThemedButton-BGVwNwE-.mjs";
|
|
8
9
|
import { t as resolveDedicatedBookingHref } from "../bookingRoute-Bqlyu5Vb.mjs";
|
|
9
|
-
import { t as CheckboxChoice } from "../CheckboxChoice-
|
|
10
|
-
import { t as DemoPortalSignInLink } from "../DemoPortalSignInLink-
|
|
10
|
+
import { t as CheckboxChoice } from "../CheckboxChoice-3PhxDxgR.mjs";
|
|
11
|
+
import { t as DemoPortalSignInLink } from "../DemoPortalSignInLink-Qw780EfW.mjs";
|
|
11
12
|
import { t as ModalShell } from "../ModalShell-B_fHWK71.mjs";
|
|
12
|
-
import { t as TabBarFragment } from "../TabBarFragment-
|
|
13
|
+
import { t as TabBarFragment } from "../TabBarFragment-C4WJyybx.mjs";
|
|
13
14
|
import { i as getPortalCreditProductCreditNoun, r as getCreditProductTypeLabel, t as deriveCreditProductLabels } from "../creditProducts-BOWi1QLp.mjs";
|
|
14
|
-
import { t as formatDate } from "../formatDate-
|
|
15
|
-
import { i as createBlockApi, n as useBlockApi, r as BlockApiError, t as BlockApiProvider } from "../context-
|
|
16
|
-
import { n as useAvailableDates, t as useAvailableSlots } from "../useAvailableSlots-
|
|
17
|
-
import { t as useBookingNowIso } from "../useBookingNowIso-
|
|
18
|
-
import { n as buildPortalCallbackUrl, r as requestDemoPortalMagicLink } from "../demoPortalMagicLink-
|
|
19
|
-
import { a as formatPortalSessionDay, c as isPast, i as formatPortalSession, l as portalSessionDisplay, n as formatDateTime, o as formatPortalSessionTime, r as formatEntitlementEnd, s as formatPortalSessionWithWeekday, t as formatDate$1 } from "../dateFormatting-
|
|
15
|
+
import { t as formatDate } from "../formatDate-BiloOyjS.mjs";
|
|
16
|
+
import { i as createBlockApi, n as useBlockApi, r as BlockApiError, t as BlockApiProvider } from "../context-BNAM7NsW.mjs";
|
|
17
|
+
import { n as useAvailableDates, t as useAvailableSlots } from "../useAvailableSlots-wmdo6uZ8.mjs";
|
|
18
|
+
import { t as useBookingNowIso } from "../useBookingNowIso-CUExAee1.mjs";
|
|
19
|
+
import { n as buildPortalCallbackUrl, r as requestDemoPortalMagicLink } from "../demoPortalMagicLink-NwKJk6gn.mjs";
|
|
20
|
+
import { a as formatPortalSessionDay, c as isPast, i as formatPortalSession, l as portalSessionDisplay, n as formatDateTime, o as formatPortalSessionTime, r as formatEntitlementEnd, s as formatPortalSessionWithWeekday, t as formatDate$1 } from "../dateFormatting-QwBSo0hK.mjs";
|
|
20
21
|
import * as React$1 from "react";
|
|
21
22
|
import React, { createContext, forwardRef, useCallback, useContext, useEffect, useId, useMemo, useReducer, useRef, useState } from "react";
|
|
22
23
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
package/dist/client/{product-detail.client-B3HuuykE.mjs → product-detail.client-CQ0k0fbH.mjs}
RENAMED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { r as ProductDetailController } from "./shop-commerce-
|
|
2
|
+
import { r as ProductDetailController } from "./shop-commerce-xjWH7-Ym.mjs";
|
|
3
3
|
import "react";
|
|
4
4
|
import { jsx } from "react/jsx-runtime";
|
|
5
5
|
//#region ../blocks/src/system/runtime/nodes/product-detail.client.tsx
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { i as ProductListController } from "./shop-commerce-
|
|
2
|
+
import { i as ProductListController } from "./shop-commerce-xjWH7-Ym.mjs";
|
|
3
3
|
import "react";
|
|
4
4
|
import { jsx } from "react/jsx-runtime";
|
|
5
5
|
//#region ../blocks/src/system/runtime/nodes/product-list.client.tsx
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { t as defineIslandPropsDecoder } from "./propsDecoder-
|
|
3
|
-
import { t as ProductDetailClient } from "./product-detail.client-
|
|
4
|
-
import { t as mountShopBlockIsland } from "./shopShared-
|
|
2
|
+
import { t as defineIslandPropsDecoder } from "./propsDecoder-DikkDJ9x.mjs";
|
|
3
|
+
import { t as ProductDetailClient } from "./product-detail.client-CQ0k0fbH.mjs";
|
|
4
|
+
import { t as mountShopBlockIsland } from "./shopShared-CyW6MU48.mjs";
|
|
5
5
|
//#region src/rendering/islands/enhancers/productDetail.tsx
|
|
6
6
|
const decode = defineIslandPropsDecoder("product-detail");
|
|
7
7
|
const enhance = (root, props) => mountShopBlockIsland(root, props, ProductDetailClient, "product-detail");
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { t as defineIslandPropsDecoder } from "./propsDecoder-
|
|
3
|
-
import { t as ProductListClient } from "./product-list.client-
|
|
4
|
-
import { t as mountShopBlockIsland } from "./shopShared-
|
|
2
|
+
import { t as defineIslandPropsDecoder } from "./propsDecoder-DikkDJ9x.mjs";
|
|
3
|
+
import { t as ProductListClient } from "./product-list.client-Xlr1P0x9.mjs";
|
|
4
|
+
import { t as mountShopBlockIsland } from "./shopShared-CyW6MU48.mjs";
|
|
5
5
|
//#region src/rendering/islands/enhancers/productList.tsx
|
|
6
6
|
const decode = defineIslandPropsDecoder("product-list");
|
|
7
7
|
const enhance = (root, props) => mountShopBlockIsland(root, props, ProductListClient, "product-list");
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
2
|
+
import { $t as headerChromeRuntimeContractSchema, Dt as eventCalendarInteractiveIslandPropsCodec, G as formInteractiveIslandPropsCodec, Mt as eventListingInteractiveIslandPropsCodec, R as newsletterFormInteractiveIslandPropsCodec, St as eventCombinedInteractiveIslandPropsCodec, V as giftingInteractiveIslandPropsCodec, X as eventRegistrationInteractiveIslandPropsCodec, f as productDetailInteractiveIslandPropsCodec, g as shopInteractiveIslandPropsCodec, l as checkoutInteractiveIslandPropsCodec, m as productListInteractiveIslandPropsCodec, on as publicMembershipProductCollectionSchema, s as cartInteractiveIslandPropsCodec, sn as publicPassProductCollectionSchema } from "./shop.interactive-BQdm441g.mjs";
|
|
3
|
+
import { Fr as lookListPresentationSchemaShape, Or as createZodCodec, Pn as bookingFormInteractiveIslandPropsCodec, Tr as eventRegistrationPageSurfaceSubjectSchema, jr as isDecodeSuccess } from "./wizardSteps-xqU4q63H.mjs";
|
|
4
|
+
import { V as eventVenueDrawingSchema, W as publicEventSchema } from "./noop-C2vZse15.mjs";
|
|
5
5
|
import { t as eventAutoApplyDiscountPreviewSchema } from "./events-BmqPeeQm.mjs";
|
|
6
6
|
import { z } from "zod";
|
|
7
7
|
//#region ../blocks/src/system/runtime/nodes/event-details/lookPresentation.ts
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
//#region ../altcha/src/protection.ts
|
|
3
|
+
/** Authorization is issued only by the live verification owner, never from a caller's string. */
|
|
4
|
+
const proof = Symbol("submission-proof");
|
|
5
|
+
const VERIFICATION_REQUIRED_MESSAGE = "We couldn’t verify this submission. Please try again.";
|
|
6
|
+
var VerificationPendingError = class extends Error {
|
|
7
|
+
constructor() {
|
|
8
|
+
super(VERIFICATION_REQUIRED_MESSAGE);
|
|
9
|
+
this.name = "VerificationPendingError";
|
|
10
|
+
}
|
|
11
|
+
};
|
|
12
|
+
/** A retained ready authorization is checked again immediately before transport. */
|
|
13
|
+
function submissionProof(authorization) {
|
|
14
|
+
return authorization[proof]();
|
|
15
|
+
}
|
|
16
|
+
/** Parse the signed expiry once; the server remains responsible for signature/work verification. */
|
|
17
|
+
function readVerifiedProof(payload) {
|
|
18
|
+
if (payload === null) return null;
|
|
19
|
+
try {
|
|
20
|
+
const decoded = JSON.parse(atob(payload));
|
|
21
|
+
if (typeof decoded !== "object" || decoded === null || !("salt" in decoded) || typeof decoded.salt !== "string") return null;
|
|
22
|
+
const expires = new URLSearchParams(decoded.salt.split("?")[1]).get("expires");
|
|
23
|
+
const expiresAt = Number(expires) * 1e3;
|
|
24
|
+
return expires !== null && Number.isSafeInteger(expiresAt) && expiresAt > 0 ? {
|
|
25
|
+
payload,
|
|
26
|
+
expiresAt
|
|
27
|
+
} : null;
|
|
28
|
+
} catch {
|
|
29
|
+
return null;
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
/** Check live identity and wall-clock expiry at the last possible moment, even with suspended timers. */
|
|
33
|
+
function issueAuthorization(state, verified, refresh) {
|
|
34
|
+
const authorization = { [proof]: () => {
|
|
35
|
+
const current = state.snapshot.submission;
|
|
36
|
+
if (!state.active || current.kind !== "ready" || current.authorization !== authorization) throw new VerificationPendingError();
|
|
37
|
+
if (verified !== null && Date.now() >= verified.expiresAt) {
|
|
38
|
+
refresh();
|
|
39
|
+
throw new VerificationPendingError();
|
|
40
|
+
}
|
|
41
|
+
return verified?.payload ?? null;
|
|
42
|
+
} };
|
|
43
|
+
return authorization;
|
|
44
|
+
}
|
|
45
|
+
/** Mutable widget lifetime; snapshots are the only state exposed to React consumers. */
|
|
46
|
+
function createSpamProtection(policy) {
|
|
47
|
+
const listeners = /* @__PURE__ */ new Set();
|
|
48
|
+
const state = {
|
|
49
|
+
snapshot: {
|
|
50
|
+
submission: { kind: "waiting" },
|
|
51
|
+
generation: 0
|
|
52
|
+
},
|
|
53
|
+
active: true,
|
|
54
|
+
verified: null
|
|
55
|
+
};
|
|
56
|
+
const publish = (submission, generation = state.snapshot.generation, verified = null) => {
|
|
57
|
+
state.snapshot = {
|
|
58
|
+
submission,
|
|
59
|
+
generation
|
|
60
|
+
};
|
|
61
|
+
state.verified = verified;
|
|
62
|
+
listeners.forEach((notify) => notify());
|
|
63
|
+
};
|
|
64
|
+
const issue = (verified) => {
|
|
65
|
+
publish({
|
|
66
|
+
kind: "ready",
|
|
67
|
+
authorization: issueAuthorization(state, verified, reset)
|
|
68
|
+
}, state.snapshot.generation, verified);
|
|
69
|
+
};
|
|
70
|
+
const reset = () => {
|
|
71
|
+
publish({ kind: "waiting" }, state.snapshot.generation + 1);
|
|
72
|
+
if (state.active && policy.kind === "not-required") issue(null);
|
|
73
|
+
};
|
|
74
|
+
if (policy.kind === "not-required") issue(null);
|
|
75
|
+
return {
|
|
76
|
+
getSnapshot: () => state.snapshot,
|
|
77
|
+
subscribe: (notify) => {
|
|
78
|
+
listeners.add(notify);
|
|
79
|
+
return () => {
|
|
80
|
+
listeners.delete(notify);
|
|
81
|
+
};
|
|
82
|
+
},
|
|
83
|
+
activate: () => {
|
|
84
|
+
if (!state.active) {
|
|
85
|
+
state.active = true;
|
|
86
|
+
reset();
|
|
87
|
+
}
|
|
88
|
+
},
|
|
89
|
+
deactivate: () => {
|
|
90
|
+
state.active = false;
|
|
91
|
+
reset();
|
|
92
|
+
},
|
|
93
|
+
reset,
|
|
94
|
+
receive: (generation, solution) => {
|
|
95
|
+
if (!state.active || generation !== state.snapshot.generation || policy.kind === "not-required") return;
|
|
96
|
+
const verified = readVerifiedProof(solution);
|
|
97
|
+
if (verified === null) publish({ kind: "waiting" });
|
|
98
|
+
else if (verified.expiresAt <= Date.now()) reset();
|
|
99
|
+
else if (state.snapshot.submission.kind !== "ready" || state.verified?.payload !== verified.payload) issue(verified);
|
|
100
|
+
}
|
|
101
|
+
};
|
|
102
|
+
}
|
|
103
|
+
//#endregion
|
|
104
|
+
export { submissionProof as n, createSpamProtection as t };
|