@loczer/storefront-sdk 0.147.0 → 0.149.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/BookingPage.d.ts +6 -0
- package/dist/CheckoutPage.d.ts +6 -0
- package/dist/CheckoutPaymentPage.d.ts +6 -0
- package/dist/CheckoutSuccessPage.d.ts +6 -0
- package/dist/ContractSaleDocumentPage.d.ts +116 -0
- package/dist/ErrorPage.d.ts +6 -0
- package/dist/HomePage.d.ts +6 -0
- package/dist/I18nProvider.d.ts +23 -0
- package/dist/NotFoundPage.d.ts +6 -0
- package/dist/PaymentLinkPage.d.ts +40 -0
- package/dist/PaymentLinkSuccessPage.d.ts +40 -0
- package/dist/ProductPage.d.ts +6 -0
- package/dist/StorefrontProvider.d.ts +1119 -0
- package/dist/StorefrontProvider.js +95 -0
- package/dist/accessories.d.ts +42 -0
- package/dist/apiCall.d.ts +7 -0
- package/dist/assets/dev.svg +4 -0
- package/dist/assets/playground-hero-preview.svg +4 -0
- package/dist/assets/whatsapp.svg +4 -0
- package/dist/badge.d.ts +14 -0
- package/dist/bikes.d.ts +107 -0
- package/dist/booking-period-time-slots.d.ts +279 -0
- package/dist/booking-period.d.ts +173 -0
- package/dist/booking.d.ts +384 -0
- package/dist/button.d.ts +16 -0
- package/dist/card.d.ts +18 -0
- package/dist/cart.d.ts +30 -0
- package/dist/cartSummary.d.ts +205 -0
- package/dist/checkoutPaymentDecision.d.ts +48 -0
- package/dist/checkoutPaymentSession.d.ts +65 -0
- package/dist/checkoutSubmit.d.ts +61 -0
- package/dist/checkoutVerifyCoupon.d.ts +45 -0
- package/dist/chunks/node_modules/react-day-picker/dist/esm/components/DayButton-D9KJeDKs.js +10 -0
- package/dist/chunks/pkg/booking-engine/dist/models/LocalizedString--6q77SPQ.js +36 -0
- package/dist/chunks/pkg/booking-engine/dist/models/Price-BlFRDHXV.js +13 -0
- package/dist/chunks/pkg/booking-engine/dist/models/Product.shared-BiDGmurZ.js +85 -0
- package/dist/chunks/pkg/booking-engine/dist/models/types-DLcvzW5b.js +13 -0
- package/dist/chunks/pkg/booking-engine/dist/schemas/base-asset-GJ9eIvIL.js +18 -0
- package/dist/chunks/pkg/booking-engine/dist/schemas/base-booking-D9k8ehGi.js +75 -0
- package/dist/chunks/pkg/booking-engine/dist/schemas/booking-engine-configuration-CnBdp3jk.js +104 -0
- package/dist/chunks/pkg/booking-engine/dist/schemas/cart-inputs-DYgEGJ5M.js +73 -0
- package/dist/chunks/pkg/booking-engine/dist/schemas/money-Dy4b9loa.js +23 -0
- package/dist/chunks/pkg/booking-engine/dist/schemas/public-booking-engine-configuration-C9VB-WhU.js +17 -0
- package/dist/chunks/pkg/booking-engine/dist/schemas/rich-text-CqXhNDN3.js +15 -0
- package/dist/chunks/pkg/booking-engine/dist/schemas/shop-opening-hours-B47MMaoD.js +45 -0
- package/dist/chunks/pkg/booking-engine/dist/utils/pricing-DcnUXaeI.js +36 -0
- package/dist/chunks/pkg/ui/dist/Button-CEl4MEmL.js +44 -0
- package/dist/chunks/pkg/ui/dist/Dialog-COr6fnKd.js +283 -0
- package/dist/chunks/pkg/ui/dist/Drawer/index-BxM7gmh_.js +226 -0
- package/dist/chunks/pkg/ui/dist/Map/MapContent-BqCzk6pD.js +292 -0
- package/dist/chunks/pkg/ui/dist/Map/constants-AiBwXZf6.js +4 -0
- package/dist/chunks/pkg/ui/dist/Map-Cqn7INdm.js +50 -0
- package/dist/chunks/pkg/ui/dist/MorphingModalWizard-D7hc-dDP.js +30 -0
- package/dist/chunks/pkg/ui/dist/ResponsiveDialog-D8YzB_3J.js +154 -0
- package/dist/chunks/pkg/ui/dist/ScrollArea-D9UdixQL.js +67 -0
- package/dist/chunks/pkg/ui/dist/SsrHydratablePortal/index-Ue09qUAi.js +40 -0
- package/dist/chunks/pkg/ui/dist/_virtual/_commonjsHelpers-W3dGiUWw.js +6 -0
- package/dist/chunks/pkg/ui/dist/_virtual/index-C9tmbAjU.js +5 -0
- package/dist/chunks/pkg/ui/dist/_virtual/index2-Cr2SmWQI.js +4 -0
- package/dist/chunks/pkg/ui/dist/_virtual/mapbox-gl-8G326Xvx.js +27 -0
- package/dist/chunks/pkg/ui/dist/_virtual/mapbox-gl2-CffgHKjA.js +4 -0
- package/dist/chunks/pkg/ui/dist/_virtual/use-sync-external-store-shim.development-DmH-ks33.js +4 -0
- package/dist/chunks/pkg/ui/dist/_virtual/use-sync-external-store-shim.production-BjPWYSZb.js +4 -0
- package/dist/chunks/pkg/ui/dist/_virtual/with-selector-BTwk-iW5.js +5 -0
- package/dist/chunks/pkg/ui/dist/_virtual/with-selector.development-DmH-ks33.js +4 -0
- package/dist/chunks/pkg/ui/dist/_virtual/with-selector.production-xTL6w2lb.js +4 -0
- package/dist/chunks/pkg/ui/dist/_virtual/with-selector2-Cr2SmWQI.js +4 -0
- package/dist/chunks/pkg/ui/dist/lib/body-pointer-events-CyPsDvc9.js +16 -0
- package/dist/chunks/pkg/ui/dist/lib/isAutomationRuntime-Cu2aNI6_.js +5 -0
- package/dist/chunks/pkg/ui/dist/lib/slot-CklkPb7k.js +50 -0
- package/dist/chunks/pkg/ui/dist/lib/useMediaQuery-DhKGnWgn.js +20 -0
- package/dist/chunks/pkg/ui/dist/lib/utils-B6zhukbw.js +8 -0
- package/dist/chunks/pkg/ui/dist/node_modules/@base-ui/react/esm/csp-provider/CSPContext-9LViUOEN.js +13 -0
- package/dist/chunks/pkg/ui/dist/node_modules/@base-ui/react/esm/dialog/backdrop/DialogBackdrop-dfhPbhun.js +40 -0
- package/dist/chunks/pkg/ui/dist/node_modules/@base-ui/react/esm/dialog/close/DialogClose-CiEiuP0S.js +41 -0
- package/dist/chunks/pkg/ui/dist/node_modules/@base-ui/react/esm/dialog/description/DialogDescription-C793yEmX.js +25 -0
- package/dist/chunks/pkg/ui/dist/node_modules/@base-ui/react/esm/dialog/popup/DialogPopup-Ce1MaHNd.js +80 -0
- package/dist/chunks/pkg/ui/dist/node_modules/@base-ui/react/esm/dialog/popup/DialogPopupCssVars-Bt8y0AZk.js +6 -0
- package/dist/chunks/pkg/ui/dist/node_modules/@base-ui/react/esm/dialog/popup/DialogPopupDataAttributes-C1piwkT4.js +7 -0
- package/dist/chunks/pkg/ui/dist/node_modules/@base-ui/react/esm/dialog/portal/DialogPortal-DCoXyUCa.js +30 -0
- package/dist/chunks/pkg/ui/dist/node_modules/@base-ui/react/esm/dialog/portal/DialogPortalContext-CtWBuvRl.js +14 -0
- package/dist/chunks/pkg/ui/dist/node_modules/@base-ui/react/esm/dialog/root/DialogRoot-DYrthiUT.js +64 -0
- package/dist/chunks/pkg/ui/dist/node_modules/@base-ui/react/esm/dialog/root/DialogRootContext-D__rrg4-.js +14 -0
- package/dist/chunks/pkg/ui/dist/node_modules/@base-ui/react/esm/dialog/root/useDialogRoot-Dmki7CJG.js +81 -0
- package/dist/chunks/pkg/ui/dist/node_modules/@base-ui/react/esm/dialog/store/DialogStore-ltMcMpnh.js +69 -0
- package/dist/chunks/pkg/ui/dist/node_modules/@base-ui/react/esm/dialog/title/DialogTitle-BYe_-O2U.js +25 -0
- package/dist/chunks/pkg/ui/dist/node_modules/@base-ui/react/esm/dialog/trigger/DialogTrigger-CDsWAaqd.js +56 -0
- package/dist/chunks/pkg/ui/dist/node_modules/@base-ui/react/esm/dialog/viewport/DialogViewport-CoAyzYQs.js +54 -0
- package/dist/chunks/pkg/ui/dist/node_modules/@base-ui/react/esm/dialog/viewport/DialogViewportDataAttributes-C_9BMPUj.js +7 -0
- package/dist/chunks/pkg/ui/dist/node_modules/@base-ui/react/esm/drawer/backdrop/DrawerBackdrop-BqcC6xGK.js +45 -0
- package/dist/chunks/pkg/ui/dist/node_modules/@base-ui/react/esm/drawer/backdrop/DrawerBackdropCssVars-BtzwweRf.js +6 -0
- package/dist/chunks/pkg/ui/dist/node_modules/@base-ui/react/esm/drawer/close/DrawerClose-K9toitLg.js +5 -0
- package/dist/chunks/pkg/ui/dist/node_modules/@base-ui/react/esm/drawer/content/DrawerContent-DAER5HEH.js +22 -0
- package/dist/chunks/pkg/ui/dist/node_modules/@base-ui/react/esm/drawer/content/DrawerContentDataAttributes-CpDnPAXP.js +4 -0
- package/dist/chunks/pkg/ui/dist/node_modules/@base-ui/react/esm/drawer/description/DrawerDescription-CmzTECJs.js +5 -0
- package/dist/chunks/pkg/ui/dist/node_modules/@base-ui/react/esm/drawer/popup/DrawerPopup-BXOe4Llu.js +241 -0
- package/dist/chunks/pkg/ui/dist/node_modules/@base-ui/react/esm/drawer/popup/DrawerPopupCssVars-Ct685Bcm.js +6 -0
- package/dist/chunks/pkg/ui/dist/node_modules/@base-ui/react/esm/drawer/popup/DrawerPopupDataAttributes-BsZri5W4.js +7 -0
- package/dist/chunks/pkg/ui/dist/node_modules/@base-ui/react/esm/drawer/portal/DrawerPortal-BfTFM1p8.js +5 -0
- package/dist/chunks/pkg/ui/dist/node_modules/@base-ui/react/esm/drawer/provider/DrawerProviderContext-euW_U5h8.js +10 -0
- package/dist/chunks/pkg/ui/dist/node_modules/@base-ui/react/esm/drawer/root/DrawerRoot-DuO16Hl3.js +148 -0
- package/dist/chunks/pkg/ui/dist/node_modules/@base-ui/react/esm/drawer/root/DrawerRootContext-Cyaf-7qv.js +14 -0
- package/dist/chunks/pkg/ui/dist/node_modules/@base-ui/react/esm/drawer/root/useDrawerSnapPoints-CVbKGPMi.js +105 -0
- package/dist/chunks/pkg/ui/dist/node_modules/@base-ui/react/esm/drawer/title/DrawerTitle-DPojAJP6.js +5 -0
- package/dist/chunks/pkg/ui/dist/node_modules/@base-ui/react/esm/drawer/trigger/DrawerTrigger-BKWBskBD.js +5 -0
- package/dist/chunks/pkg/ui/dist/node_modules/@base-ui/react/esm/drawer/viewport/DrawerViewport-BA1WyQud.js +593 -0
- package/dist/chunks/pkg/ui/dist/node_modules/@base-ui/react/esm/drawer/viewport/DrawerViewportContext-xR35hPcl.js +10 -0
- package/dist/chunks/pkg/ui/dist/node_modules/@base-ui/react/esm/floating-ui-react/components/FloatingFocusManager-B-v_gyUI.js +264 -0
- package/dist/chunks/pkg/ui/dist/node_modules/@base-ui/react/esm/floating-ui-react/components/FloatingPortal-6JOqLjHM.js +129 -0
- package/dist/chunks/pkg/ui/dist/node_modules/@base-ui/react/esm/floating-ui-react/components/FloatingRootStore-D8M2d4pp.js +74 -0
- package/dist/chunks/pkg/ui/dist/node_modules/@base-ui/react/esm/floating-ui-react/components/FloatingTree-BJGeWpX5.js +15 -0
- package/dist/chunks/pkg/ui/dist/node_modules/@base-ui/react/esm/floating-ui-react/hooks/useClick-C3V1YAJN.js +68 -0
- package/dist/chunks/pkg/ui/dist/node_modules/@base-ui/react/esm/floating-ui-react/hooks/useDismiss-BzvyAPc1.js +265 -0
- package/dist/chunks/pkg/ui/dist/node_modules/@base-ui/react/esm/floating-ui-react/hooks/useInteractions-BWCpGAad.js +48 -0
- package/dist/chunks/pkg/ui/dist/node_modules/@base-ui/react/esm/floating-ui-react/hooks/useRole-DfMbRaU2.js +76 -0
- package/dist/chunks/pkg/ui/dist/node_modules/@base-ui/react/esm/floating-ui-react/hooks/useSyncedFloatingRootContext-Cczfd0Dg.js +35 -0
- package/dist/chunks/pkg/ui/dist/node_modules/@base-ui/react/esm/floating-ui-react/utils/composite-keZdnJD9.js +11 -0
- package/dist/chunks/pkg/ui/dist/node_modules/@base-ui/react/esm/floating-ui-react/utils/constants-B-72x4uQ.js +7 -0
- package/dist/chunks/pkg/ui/dist/node_modules/@base-ui/react/esm/floating-ui-react/utils/createAttribute-DQjmnndx.js +6 -0
- package/dist/chunks/pkg/ui/dist/node_modules/@base-ui/react/esm/floating-ui-react/utils/createEventEmitter-156NFNq-.js +17 -0
- package/dist/chunks/pkg/ui/dist/node_modules/@base-ui/react/esm/floating-ui-react/utils/element-7_beKIST.js +29 -0
- package/dist/chunks/pkg/ui/dist/node_modules/@base-ui/react/esm/floating-ui-react/utils/enqueueFocus-BoxfANJQ.js +22 -0
- package/dist/chunks/pkg/ui/dist/node_modules/@base-ui/react/esm/floating-ui-react/utils/event-BJf3Eroa.js +29 -0
- package/dist/chunks/pkg/ui/dist/node_modules/@base-ui/react/esm/floating-ui-react/utils/getEmptyRootContext-AtxQDZdS.js +18 -0
- package/dist/chunks/pkg/ui/dist/node_modules/@base-ui/react/esm/floating-ui-react/utils/markOthers-im_zgP9x.js +80 -0
- package/dist/chunks/pkg/ui/dist/node_modules/@base-ui/react/esm/floating-ui-react/utils/nodes-BbaFB8UD.js +15 -0
- package/dist/chunks/pkg/ui/dist/node_modules/@base-ui/react/esm/floating-ui-react/utils/tabbable-BUkXLKOZ.js +140 -0
- package/dist/chunks/pkg/ui/dist/node_modules/@base-ui/react/esm/internals/clamp--orC6ThW.js +6 -0
- package/dist/chunks/pkg/ui/dist/node_modules/@base-ui/react/esm/internals/composite/composite-Bl9mbNwg.js +14 -0
- package/dist/chunks/pkg/ui/dist/node_modules/@base-ui/react/esm/internals/composite/root/CompositeRootContext-hBCEpdkp.js +14 -0
- package/dist/chunks/pkg/ui/dist/node_modules/@base-ui/react/esm/internals/constants-DrTrmCr_.js +12 -0
- package/dist/chunks/pkg/ui/dist/node_modules/@base-ui/react/esm/internals/createBaseUIEventDetails-WO93mcXE.js +26 -0
- package/dist/chunks/pkg/ui/dist/node_modules/@base-ui/react/esm/internals/direction-context/DirectionContext-DHsnfCgz.js +10 -0
- package/dist/chunks/pkg/ui/dist/node_modules/@base-ui/react/esm/internals/getStateAttributesProps-rQvCQegA.js +16 -0
- package/dist/chunks/pkg/ui/dist/node_modules/@base-ui/react/esm/internals/reason-parts-DKJ_-O8k.js +13 -0
- package/dist/chunks/pkg/ui/dist/node_modules/@base-ui/react/esm/internals/shadowDom-DTBRPFkJ.js +31 -0
- package/dist/chunks/pkg/ui/dist/node_modules/@base-ui/react/esm/internals/stateAttributesMapping-B17IMmGk.js +16 -0
- package/dist/chunks/pkg/ui/dist/node_modules/@base-ui/react/esm/internals/use-button/useButton-CW30d95j.js +113 -0
- package/dist/chunks/pkg/ui/dist/node_modules/@base-ui/react/esm/internals/useAnimationsFinished-B8I0rTuq.js +54 -0
- package/dist/chunks/pkg/ui/dist/node_modules/@base-ui/react/esm/internals/useBaseUiId-BhlhP3ZP.js +7 -0
- package/dist/chunks/pkg/ui/dist/node_modules/@base-ui/react/esm/internals/useOpenChangeComplete-Doxu2x_W.js +22 -0
- package/dist/chunks/pkg/ui/dist/node_modules/@base-ui/react/esm/internals/useRenderElement-CktkgllD.js +71 -0
- package/dist/chunks/pkg/ui/dist/node_modules/@base-ui/react/esm/internals/useTransitionStatus-D7bNijs9.js +42 -0
- package/dist/chunks/pkg/ui/dist/node_modules/@base-ui/react/esm/internals/useValueChanged-DNmBrXYR.js +14 -0
- package/dist/chunks/pkg/ui/dist/node_modules/@base-ui/react/esm/merge-props/mergeProps-taN4tP1i.js +102 -0
- package/dist/chunks/pkg/ui/dist/node_modules/@base-ui/react/esm/scroll-area/constants-BMXX3oM8.js +5 -0
- package/dist/chunks/pkg/ui/dist/node_modules/@base-ui/react/esm/scroll-area/corner/ScrollAreaCorner-z0cNScNF.js +31 -0
- package/dist/chunks/pkg/ui/dist/node_modules/@base-ui/react/esm/scroll-area/root/ScrollAreaRoot-Cw_gyhhI.js +166 -0
- package/dist/chunks/pkg/ui/dist/node_modules/@base-ui/react/esm/scroll-area/root/ScrollAreaRootContext-CQVTL1yg.js +14 -0
- package/dist/chunks/pkg/ui/dist/node_modules/@base-ui/react/esm/scroll-area/root/ScrollAreaRootCssVars-UMzfvqzf.js +6 -0
- package/dist/chunks/pkg/ui/dist/node_modules/@base-ui/react/esm/scroll-area/root/ScrollAreaRootDataAttributes-DYAeFs1E.js +6 -0
- package/dist/chunks/pkg/ui/dist/node_modules/@base-ui/react/esm/scroll-area/root/stateAttributes-e5OzHsp_.js +25 -0
- package/dist/chunks/pkg/ui/dist/node_modules/@base-ui/react/esm/scroll-area/scrollbar/ScrollAreaScrollbar-DGyLPhKe.js +132 -0
- package/dist/chunks/pkg/ui/dist/node_modules/@base-ui/react/esm/scroll-area/scrollbar/ScrollAreaScrollbarContext-Cn2tB9KX.js +14 -0
- package/dist/chunks/pkg/ui/dist/node_modules/@base-ui/react/esm/scroll-area/scrollbar/ScrollAreaScrollbarCssVars-CVtQQfDD.js +6 -0
- package/dist/chunks/pkg/ui/dist/node_modules/@base-ui/react/esm/scroll-area/scrollbar/ScrollAreaScrollbarDataAttributes-CcesYZ2Y.js +6 -0
- package/dist/chunks/pkg/ui/dist/node_modules/@base-ui/react/esm/scroll-area/thumb/ScrollAreaThumb-08Mmzry4.js +50 -0
- package/dist/chunks/pkg/ui/dist/node_modules/@base-ui/react/esm/scroll-area/utils/getOffset-D1-wFs-x.js +9 -0
- package/dist/chunks/pkg/ui/dist/node_modules/@base-ui/react/esm/scroll-area/viewport/ScrollAreaViewport-CadjBxEp.js +201 -0
- package/dist/chunks/pkg/ui/dist/node_modules/@base-ui/react/esm/scroll-area/viewport/ScrollAreaViewportContext-O9cXognJ.js +6 -0
- package/dist/chunks/pkg/ui/dist/node_modules/@base-ui/react/esm/scroll-area/viewport/ScrollAreaViewportCssVars-Dttwkr3N.js +6 -0
- package/dist/chunks/pkg/ui/dist/node_modules/@base-ui/react/esm/utils/FocusGuard-BkeVKSkX.js +24 -0
- package/dist/chunks/pkg/ui/dist/node_modules/@base-ui/react/esm/utils/InternalBackdrop-CZUtC9bU.js +30 -0
- package/dist/chunks/pkg/ui/dist/node_modules/@base-ui/react/esm/utils/getElementAtPoint-CR7qt9tE.js +6 -0
- package/dist/chunks/pkg/ui/dist/node_modules/@base-ui/react/esm/utils/popupStateMapping-DVUopj_P.js +32 -0
- package/dist/chunks/pkg/ui/dist/node_modules/@base-ui/react/esm/utils/popups/popupStoreUtils-DSjS8g02.js +95 -0
- package/dist/chunks/pkg/ui/dist/node_modules/@base-ui/react/esm/utils/popups/popupTriggerMap-RUMkUgDU.js +64 -0
- package/dist/chunks/pkg/ui/dist/node_modules/@base-ui/react/esm/utils/popups/store-Bz3dUxiI.js +52 -0
- package/dist/chunks/pkg/ui/dist/node_modules/@base-ui/react/esm/utils/resolveClassName-D2IlO_XQ.js +6 -0
- package/dist/chunks/pkg/ui/dist/node_modules/@base-ui/react/esm/utils/resolveRef-Csx4Vghu.js +6 -0
- package/dist/chunks/pkg/ui/dist/node_modules/@base-ui/react/esm/utils/resolveStyle-MTmYMe0U.js +6 -0
- package/dist/chunks/pkg/ui/dist/node_modules/@base-ui/react/esm/utils/scrollEdges-DZboWB_y.js +12 -0
- package/dist/chunks/pkg/ui/dist/node_modules/@base-ui/react/esm/utils/scrollable-D1F6TRF5.js +34 -0
- package/dist/chunks/pkg/ui/dist/node_modules/@base-ui/react/esm/utils/styles-BrbvX9PD.js +16 -0
- package/dist/chunks/pkg/ui/dist/node_modules/@base-ui/react/esm/utils/useFocusableWhenDisabled-CJZi1M5y.js +24 -0
- package/dist/chunks/pkg/ui/dist/node_modules/@base-ui/react/esm/utils/useOpenInteractionType-CW--rAaF.js +30 -0
- package/dist/chunks/pkg/ui/dist/node_modules/@base-ui/react/esm/utils/useSwipeDismiss-ZcIND0Ss.js +530 -0
- package/dist/chunks/pkg/ui/dist/node_modules/@base-ui/utils/esm/addEventListener-DnnRp2CB.js +8 -0
- package/dist/chunks/pkg/ui/dist/node_modules/@base-ui/utils/esm/detectBrowser-CntSiJrj.js +43 -0
- package/dist/chunks/pkg/ui/dist/node_modules/@base-ui/utils/esm/empty-C3-x9M2q.js +7 -0
- package/dist/chunks/pkg/ui/dist/node_modules/@base-ui/utils/esm/error-KZbzusBH.js +11 -0
- package/dist/chunks/pkg/ui/dist/node_modules/@base-ui/utils/esm/formatErrorMessage-BJfWDcMI.js +11 -0
- package/dist/chunks/pkg/ui/dist/node_modules/@base-ui/utils/esm/getReactElementRef-CB7CT3xn.js +11 -0
- package/dist/chunks/pkg/ui/dist/node_modules/@base-ui/utils/esm/inertValue-C-Qws-Vy.js +7 -0
- package/dist/chunks/pkg/ui/dist/node_modules/@base-ui/utils/esm/mergeCleanups-vij8IUwv.js +11 -0
- package/dist/chunks/pkg/ui/dist/node_modules/@base-ui/utils/esm/mergeObjects-DodLCs_x.js +14 -0
- package/dist/chunks/pkg/ui/dist/node_modules/@base-ui/utils/esm/owner-CfKP3-Rk.js +6 -0
- package/dist/chunks/pkg/ui/dist/node_modules/@base-ui/utils/esm/reactVersion-oVIlFc4q.js +8 -0
- package/dist/chunks/pkg/ui/dist/node_modules/@base-ui/utils/esm/safeReact-C4X27Y1Z.js +7 -0
- package/dist/chunks/pkg/ui/dist/node_modules/@base-ui/utils/esm/store/ReactStore-CfPgecP0.js +145 -0
- package/dist/chunks/pkg/ui/dist/node_modules/@base-ui/utils/esm/store/Store-CRAQANWM.js +86 -0
- package/dist/chunks/pkg/ui/dist/node_modules/@base-ui/utils/esm/store/createSelector-SDRl3LYE.js +17 -0
- package/dist/chunks/pkg/ui/dist/node_modules/@base-ui/utils/esm/store/useStore-BsRFFm2l.js +21 -0
- package/dist/chunks/pkg/ui/dist/node_modules/@base-ui/utils/esm/useAnimationFrame-C0av1dS7.js +68 -0
- package/dist/chunks/pkg/ui/dist/node_modules/@base-ui/utils/esm/useControlled-BYl9LGEz.js +53 -0
- package/dist/chunks/pkg/ui/dist/node_modules/@base-ui/utils/esm/useEnhancedClickHandler-Cu2E1baO.js +19 -0
- package/dist/chunks/pkg/ui/dist/node_modules/@base-ui/utils/esm/useId-D8NyJjt3.js +20 -0
- package/dist/chunks/pkg/ui/dist/node_modules/@base-ui/utils/esm/useIsoLayoutEffect-oOMudEAz.js +6 -0
- package/dist/chunks/pkg/ui/dist/node_modules/@base-ui/utils/esm/useMergedRefs-p9UujHQn.js +69 -0
- package/dist/chunks/pkg/ui/dist/node_modules/@base-ui/utils/esm/useOnFirstRender-IB3XPZ7h.js +8 -0
- package/dist/chunks/pkg/ui/dist/node_modules/@base-ui/utils/esm/useOnMount-DjNCK2YI.js +8 -0
- package/dist/chunks/pkg/ui/dist/node_modules/@base-ui/utils/esm/useRefWithInit-BObJZm23.js +9 -0
- package/dist/chunks/pkg/ui/dist/node_modules/@base-ui/utils/esm/useScrollLock-kV6bksFe.js +125 -0
- package/dist/chunks/pkg/ui/dist/node_modules/@base-ui/utils/esm/useStableCallback-DyHa2qMJ.js +32 -0
- package/dist/chunks/pkg/ui/dist/node_modules/@base-ui/utils/esm/useTimeout-BPZmm8PE.js +32 -0
- package/dist/chunks/pkg/ui/dist/node_modules/@base-ui/utils/esm/useValueAsRef-CCfi_eqC.js +19 -0
- package/dist/chunks/pkg/ui/dist/node_modules/@base-ui/utils/esm/visuallyHidden-CQbAGmCA.js +18 -0
- package/dist/chunks/pkg/ui/dist/node_modules/@base-ui/utils/esm/warn-eK9kQMmi.js +11 -0
- package/dist/chunks/pkg/ui/dist/node_modules/@floating-ui/utils/dist/floating-ui.utils.dom-BULZuLW5.js +71 -0
- package/dist/chunks/pkg/ui/dist/node_modules/class-variance-authority/dist/index-DEupJ0QT.js +35 -0
- package/dist/chunks/pkg/ui/dist/node_modules/clsx/dist/clsx-DPl_DXM-.js +16 -0
- package/dist/chunks/pkg/ui/dist/node_modules/framer-motion/dist/es/animation/optimized-appear/data-id-DunDwGdX.js +6 -0
- package/dist/chunks/pkg/ui/dist/node_modules/framer-motion/dist/es/context/LayoutGroupContext-BWutRI4l.js +2 -0
- package/dist/chunks/pkg/ui/dist/node_modules/framer-motion/dist/es/context/LazyContext-yIDUGdfR.js +2 -0
- package/dist/chunks/pkg/ui/dist/node_modules/framer-motion/dist/es/context/MotionConfigContext-C3EPauom.js +6 -0
- package/dist/chunks/pkg/ui/dist/node_modules/framer-motion/dist/es/context/SwitchLayoutGroupContext-BWutRI4l.js +2 -0
- package/dist/chunks/pkg/ui/dist/node_modules/framer-motion/dist/es/projection/node/create-projection-node-BDwaGtmx.js +9 -0
- package/dist/chunks/pkg/ui/dist/node_modules/framer-motion/dist/es/render/dom/utils/camel-to-dash-h54_qXon.js +4 -0
- package/dist/chunks/pkg/ui/dist/node_modules/framer-motion/dist/es/render/dom/utils/filter-props-DZcjZ2yt.js +9 -0
- package/dist/chunks/pkg/ui/dist/node_modules/lucide-react/dist/esm/Icon-BNiQfVqr.js +35 -0
- package/dist/chunks/pkg/ui/dist/node_modules/lucide-react/dist/esm/createLucideIcon-5_J8fxOF.js +21 -0
- package/dist/chunks/pkg/ui/dist/node_modules/lucide-react/dist/esm/defaultAttributes-C1BTxN61.js +14 -0
- package/dist/chunks/pkg/ui/dist/node_modules/lucide-react/dist/esm/icons/arrow-left-asE1l_Qw.js +9 -0
- package/dist/chunks/pkg/ui/dist/node_modules/lucide-react/dist/esm/icons/x-Cdi8GS7U.js +9 -0
- package/dist/chunks/pkg/ui/dist/node_modules/lucide-react/dist/esm/shared/src/utils-nzQUBs6v.js +18 -0
- package/dist/chunks/pkg/ui/dist/node_modules/mapbox-gl/dist/mapbox-gl-BWrsjoOR.js +35536 -0
- package/dist/chunks/pkg/ui/dist/node_modules/motion-dom/dist/es/animation/keyframes/utils/unit-conversion-Cc0tLlFf.js +5 -0
- package/dist/chunks/pkg/ui/dist/node_modules/motion-dom/dist/es/render/utils/keys-transform-DY2FRn5v.js +22 -0
- package/dist/chunks/pkg/ui/dist/node_modules/motion-dom/dist/es/value/types/color/hex-BN1laQGd.js +19 -0
- package/dist/chunks/pkg/ui/dist/node_modules/motion-dom/dist/es/value/types/color/hsla-CflwzkVO.js +12 -0
- package/dist/chunks/pkg/ui/dist/node_modules/motion-dom/dist/es/value/types/color/index-D1GFyA5S.js +15 -0
- package/dist/chunks/pkg/ui/dist/node_modules/motion-dom/dist/es/value/types/color/rgba-BIy7YqPw.js +16 -0
- package/dist/chunks/pkg/ui/dist/node_modules/motion-dom/dist/es/value/types/color/utils-IDKsSWKt.js +18 -0
- package/dist/chunks/pkg/ui/dist/node_modules/motion-dom/dist/es/value/types/complex/filter-AXB6Rjjs.js +4 -0
- package/dist/chunks/pkg/ui/dist/node_modules/motion-dom/dist/es/value/types/complex/index-Z9QmZfw0.js +51 -0
- package/dist/chunks/pkg/ui/dist/node_modules/motion-dom/dist/es/value/types/complex/mask-AXB6Rjjs.js +4 -0
- package/dist/chunks/pkg/ui/dist/node_modules/motion-dom/dist/es/value/types/int-CwcJvGhp.js +4 -0
- package/dist/chunks/pkg/ui/dist/node_modules/motion-dom/dist/es/value/types/numbers/index-CWjqASeJ.js +16 -0
- package/dist/chunks/pkg/ui/dist/node_modules/motion-dom/dist/es/value/types/numbers/units-DNXf-Ngr.js +11 -0
- package/dist/chunks/pkg/ui/dist/node_modules/motion-dom/dist/es/value/types/utils/color-regex-DKss3XP5.js +4 -0
- package/dist/chunks/pkg/ui/dist/node_modules/motion-dom/dist/es/value/types/utils/float-regex-Dw3Xm45S.js +4 -0
- package/dist/chunks/pkg/ui/dist/node_modules/motion-dom/dist/es/value/types/utils/is-nullish-B7IIKRzS.js +6 -0
- package/dist/chunks/pkg/ui/dist/node_modules/motion-dom/dist/es/value/types/utils/sanitize-DYfJ2EAL.js +4 -0
- package/dist/chunks/pkg/ui/dist/node_modules/motion-dom/dist/es/value/types/utils/single-color-regex-CjD_eR3p.js +4 -0
- package/dist/chunks/pkg/ui/dist/node_modules/motion-utils/dist/es/clamp-BMGeQDyI.js +4 -0
- package/dist/chunks/pkg/ui/dist/node_modules/motion-utils/dist/es/errors-CBdvTtJZ.js +2 -0
- package/dist/chunks/pkg/ui/dist/node_modules/motion-utils/dist/es/format-error-message-BwUIYuzJ.js +6 -0
- package/dist/chunks/pkg/ui/dist/node_modules/motion-utils/dist/es/noop-BGdtcOlD.js +4 -0
- package/dist/chunks/pkg/ui/dist/node_modules/tailwind-merge/dist/bundle-mjs-2e7LjAK7.js +2763 -0
- package/dist/chunks/pkg/ui/dist/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim/with-selector.development-PEz9rQUM.js +58 -0
- package/dist/chunks/pkg/ui/dist/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim/with-selector.production-1dR2oH6_.js +57 -0
- package/dist/chunks/pkg/ui/dist/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.development-Bjtnv0KW.js +58 -0
- package/dist/chunks/pkg/ui/dist/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.production-BvTUQFJj.js +46 -0
- package/dist/chunks/pkg/ui/dist/node_modules/use-sync-external-store/shim/index-g__WfpEy.js +10 -0
- package/dist/chunks/pkg/ui/dist/node_modules/use-sync-external-store/shim/with-selector-DFIcfxeX.js +10 -0
- package/dist/chunks/pkg/ui/dist/static/strings-lR4Uv4ze.js +4 -0
- package/dist/components/AboutSection/index.d.ts +7 -0
- package/dist/components/AboutSection/index.js +94 -0
- package/dist/components/AddressAutocompleteInput/index.d.ts +17 -0
- package/dist/components/AddressAutocompleteInput/index.js +143 -0
- package/dist/components/BikeProductCard/index.d.ts +17 -0
- package/dist/components/BikeProductCard/index.js +78 -0
- package/dist/components/BookingBikeVariantDialog/index.d.ts +2 -0
- package/dist/components/BookingBikeVariantDialog/index.js +216 -0
- package/dist/components/BookingFlowSteps/index.d.ts +9 -0
- package/dist/components/BookingFlowSteps/index.js +59 -0
- package/dist/components/BookingPeriodSelector/BookingPeriodContext.js +16 -0
- package/dist/components/BookingPeriodSelector/components/BookingEndDateField.js +333 -0
- package/dist/components/BookingPeriodSelector/components/BookingEndTimeField.js +112 -0
- package/dist/components/BookingPeriodSelector/components/BookingPeriodFieldErrorMessage.js +7 -0
- package/dist/components/BookingPeriodSelector/components/BookingStartDateField.js +156 -0
- package/dist/components/BookingPeriodSelector/components/BookingStartTimeField.js +130 -0
- package/dist/components/BookingPeriodSelector/components/internal/ModalDayPickerField.js +302 -0
- package/dist/components/BookingPeriodSelector/components/internal/ModalHourPickerField.js +368 -0
- package/dist/components/BookingPeriodSelector/index.d.ts +12 -0
- package/dist/components/BookingPeriodSelector/index.js +27 -0
- package/dist/components/BookingPeriodSelector/useBookingPeriodController.js +241 -0
- package/dist/components/ContactSection/index.d.ts +6 -0
- package/dist/components/ContactSection/index.js +228 -0
- package/dist/components/ContractSaleDocument/AcceptanceModal.js +36 -0
- package/dist/components/ContractSaleDocument/Invoice.js +402 -0
- package/dist/components/ContractSaleDocument/InvoiceDetails.js +180 -0
- package/dist/components/ContractSaleDocument/Page.js +14 -0
- package/dist/components/ContractSaleDocument/PageFooter.js +26 -0
- package/dist/components/ContractSaleDocument/PageHeader.js +26 -0
- package/dist/components/ContractSaleDocument/SignatureModal.js +131 -0
- package/dist/components/ContractSaleDocument/TermsAndConditionsContent.js +46 -0
- package/dist/components/ContractSaleDocument/ThumbnailSidebar.js +59 -0
- package/dist/components/ContractSaleDocument/index.d.ts +3 -0
- package/dist/components/ContractSaleDocument/index.js +4 -0
- package/dist/components/ContractSaleDocument/language.js +36 -0
- package/dist/components/DelayedReveal/index.d.ts +15 -0
- package/dist/components/DelayedReveal/index.js +61 -0
- package/dist/components/DeliveryAddressSelector/index.d.ts +23 -0
- package/dist/components/DeliveryAddressSelector/index.js +95 -0
- package/dist/components/Footer/BusinessHours.js +125 -0
- package/dist/components/Footer/businessHoursUtils.js +27 -0
- package/dist/components/Footer/index.d.ts +11 -0
- package/dist/components/Footer/index.js +127 -0
- package/dist/components/FulfillmentSection/index.d.ts +23 -0
- package/dist/components/FulfillmentSection/index.js +107 -0
- package/dist/components/Header/index.d.ts +10 -0
- package/dist/components/Header/index.js +119 -0
- package/dist/components/Layout/index.d.ts +7 -0
- package/dist/components/Layout/index.js +47 -0
- package/dist/components/Map/createMarkerElement.js +17 -0
- package/dist/components/Map/index.d.ts +3 -0
- package/dist/components/Map/index.js +6 -0
- package/dist/components/PlatformFooter/index.d.ts +2 -0
- package/dist/components/PlatformFooter/index.js +51 -0
- package/dist/components/PlaygroundDevFloatingButton/index.d.ts +2 -0
- package/dist/components/PlaygroundDevFloatingButton/index.js +216 -0
- package/dist/components/PoweredByLoczerBadge/index.d.ts +9 -0
- package/dist/components/PoweredByLoczerBadge/index.js +73 -0
- package/dist/components/ProductPriceBadge/index.d.ts +9 -0
- package/dist/components/ProductPriceBadge/index.js +229 -0
- package/dist/components/ProductWarningNotice/index.d.ts +7 -0
- package/dist/components/ProductWarningNotice/index.js +22 -0
- package/dist/components/StepSectionTitle/index.d.ts +8 -0
- package/dist/components/StepSectionTitle/index.js +6 -0
- package/dist/components/StorefrontCartPanel/index.d.ts +25 -0
- package/dist/components/StorefrontCartPanel/index.js +131 -0
- package/dist/components/StorefrontPopupMessages/index.d.ts +7 -0
- package/dist/components/StorefrontPopupMessages/index.js +172 -0
- package/dist/components/TestimonialsSection/index.d.ts +2 -0
- package/dist/components/TestimonialsSection/index.js +349 -0
- package/dist/components/WhatsAppFloatingButton/WhatsAppFloatingButton.js +24 -0
- package/dist/components/WhatsAppFloatingButton/index.d.ts +4 -0
- package/dist/components/WhatsAppFloatingButton/index.js +6 -0
- package/dist/components/WhatsAppFloatingButton/useWhatsAppFloatingButton.js +74 -0
- package/dist/components/payment/MollieCardFieldsForm.js +135 -0
- package/dist/components/payment/StripeCardFieldsForm.js +100 -0
- package/dist/components/payment/index.d.ts +3 -0
- package/dist/components/payment/index.js +6 -0
- package/dist/config.d.ts +19 -0
- package/dist/contactForm.d.ts +22 -0
- package/dist/contractSaleDocument.d.ts +242 -0
- package/dist/contractSaleDocumentApi.d.ts +481 -0
- package/dist/data/accessories.d.ts +30 -0
- package/dist/data/accessories.js +145 -0
- package/dist/data/bikes.d.ts +101 -0
- package/dist/data/bikes.js +418 -0
- package/dist/data/config.d.ts +15 -0
- package/dist/data/config.js +28 -0
- package/dist/en.d.ts +369 -0
- package/dist/form.d.ts +44 -0
- package/dist/fr.d.ts +369 -0
- package/dist/i18n/I18nProvider.d.ts +16 -0
- package/dist/i18n/I18nProvider.js +120 -0
- package/dist/i18n/en.d.ts +368 -0
- package/dist/i18n/en.js +370 -0
- package/dist/i18n/fr.d.ts +368 -0
- package/dist/i18n/fr.js +370 -0
- package/dist/index.d.ts +20 -0
- package/dist/index.js +331 -0
- package/dist/input.d.ts +5 -0
- package/dist/isAutomationRuntime.d.ts +3 -0
- package/dist/label.d.ts +7 -0
- package/dist/lib/apiCall.d.ts +4 -0
- package/dist/lib/apiCall.js +6 -0
- package/dist/lib/booking-period-time-slots.d.ts +61 -0
- package/dist/lib/booking-period-time-slots.js +273 -0
- package/dist/lib/booking-period.d.ts +147 -0
- package/dist/lib/booking-period.js +349 -0
- package/dist/lib/booking.d.ts +39 -0
- package/dist/lib/booking.js +159 -0
- package/dist/lib/cart.d.ts +25 -0
- package/dist/lib/cart.js +87 -0
- package/dist/lib/cartSummary.d.ts +31 -0
- package/dist/lib/cartSummary.js +41 -0
- package/dist/lib/checkoutPaymentDecision.d.ts +40 -0
- package/dist/lib/checkoutPaymentDecision.js +33 -0
- package/dist/lib/checkoutPaymentSession.d.ts +55 -0
- package/dist/lib/checkoutPaymentSession.js +44 -0
- package/dist/lib/checkoutSubmit.d.ts +53 -0
- package/dist/lib/checkoutSubmit.js +59 -0
- package/dist/lib/checkoutVerifyCoupon.d.ts +39 -0
- package/dist/lib/checkoutVerifyCoupon.js +32 -0
- package/dist/lib/contactForm.d.ts +16 -0
- package/dist/lib/contactForm.js +16 -0
- package/dist/lib/contractSaleDocument.d.ts +216 -0
- package/dist/lib/contractSaleDocument.js +70 -0
- package/dist/lib/contractSaleDocumentApi.d.ts +449 -0
- package/dist/lib/contractSaleDocumentApi.js +77 -0
- package/dist/lib/isAutomationRuntime.d.ts +2 -0
- package/dist/lib/isAutomationRuntime.js +5 -0
- package/dist/lib/mollieComponentStyles.d.ts +2 -0
- package/dist/lib/mollieComponentStyles.js +31 -0
- package/dist/lib/playgroundDevSettings.d.ts +11 -0
- package/dist/lib/playgroundDevSettings.js +61 -0
- package/dist/lib/pricing.d.ts +14 -0
- package/dist/lib/pricing.js +50 -0
- package/dist/lib/productImageStyles.d.ts +9 -0
- package/dist/lib/productImageStyles.js +8 -0
- package/dist/lib/productVariants.d.ts +13 -0
- package/dist/lib/productVariants.js +26 -0
- package/dist/lib/products.d.ts +37 -0
- package/dist/lib/products.js +58 -0
- package/dist/lib/richAddress.d.ts +21 -0
- package/dist/lib/richAddress.js +24 -0
- package/dist/lib/securePaymentLink.d.ts +105 -0
- package/dist/lib/securePaymentLink.js +79 -0
- package/dist/lib/storefrontAvailability.d.ts +82 -0
- package/dist/lib/storefrontAvailability.js +54 -0
- package/dist/lib/storefrontImage.d.ts +9 -0
- package/dist/lib/storefrontImage.js +16 -0
- package/dist/lib/storefrontProducts.d.ts +369 -0
- package/dist/lib/storefrontProducts.js +89 -0
- package/dist/lib/storefrontReviews.d.ts +72 -0
- package/dist/lib/storefrontReviews.js +36 -0
- package/dist/lib/utils.d.ts +16 -0
- package/dist/lib/utils.js +27 -0
- package/dist/lib/whatsapp.d.ts +17 -0
- package/dist/lib/whatsapp.js +60 -0
- package/dist/localization.d.ts +13 -0
- package/dist/localization.js +16 -0
- package/dist/mollieComponentStyles.d.ts +3 -0
- package/dist/pages/BookingPage.d.ts +2 -0
- package/dist/pages/BookingPage.js +535 -0
- package/dist/pages/CheckoutPage.d.ts +2 -0
- package/dist/pages/CheckoutPage.js +428 -0
- package/dist/pages/CheckoutPaymentPage.d.ts +2 -0
- package/dist/pages/CheckoutPaymentPage.js +243 -0
- package/dist/pages/CheckoutSuccessPage.d.ts +2 -0
- package/dist/pages/CheckoutSuccessPage.js +24 -0
- package/dist/pages/ContractSaleDocumentPage.d.ts +109 -0
- package/dist/pages/ContractSaleDocumentPage.js +342 -0
- package/dist/pages/ErrorPage.d.ts +2 -0
- package/dist/pages/ErrorPage.js +47 -0
- package/dist/pages/HomePage.d.ts +2 -0
- package/dist/pages/HomePage.js +501 -0
- package/dist/pages/NotFoundPage.d.ts +2 -0
- package/dist/pages/NotFoundPage.js +28 -0
- package/dist/pages/PaymentLinkPage.d.ts +34 -0
- package/dist/pages/PaymentLinkPage.js +258 -0
- package/dist/pages/PaymentLinkSuccessPage.d.ts +34 -0
- package/dist/pages/PaymentLinkSuccessPage.js +140 -0
- package/dist/pages/ProductPage.d.ts +2 -0
- package/dist/pages/ProductPage.js +255 -0
- package/dist/pages/checkout/components/CheckoutCouponCard.js +72 -0
- package/dist/pages/checkout/components/CheckoutDetailsCard.js +68 -0
- package/dist/pages/checkout/components/CheckoutPaymentSummaryCard.js +90 -0
- package/dist/pages/checkout/components/CheckoutSummaryColumn.js +41 -0
- package/dist/pages/checkout/types.js +10 -0
- package/dist/playgroundDevSettings.d.ts +19 -0
- package/dist/pricing.d.ts +35 -0
- package/dist/productImageStyles.d.ts +25 -0
- package/dist/productVariants.d.ts +16 -0
- package/dist/products.d.ts +224 -0
- package/dist/radio-group.d.ts +14 -0
- package/dist/richAddress.d.ts +24 -0
- package/dist/routes.d.ts +6 -0
- package/dist/routes.js +32 -0
- package/dist/securePaymentLink.d.ts +125 -0
- package/dist/select.d.ts +41 -0
- package/dist/slot.d.ts +15 -0
- package/dist/static/strings.js +4 -0
- package/dist/storefront.css +1 -0
- package/dist/storefrontAvailability.d.ts +103 -0
- package/dist/storefrontImage.d.ts +14 -0
- package/dist/storefrontProducts.d.ts +396 -0
- package/dist/storefrontReviews.d.ts +84 -0
- package/dist/storefrontSchemas.d.ts +588 -0
- package/dist/storefrontSchemas.js +132 -0
- package/dist/textarea.d.ts +5 -0
- package/dist/tooltip.d.ts +43 -0
- package/dist/ui/badge.d.ts +10 -0
- package/dist/ui/badge.js +39 -0
- package/dist/ui/button.d.ts +12 -0
- package/dist/ui/button.js +44 -0
- package/dist/ui/card.d.ts +10 -0
- package/dist/ui/card.js +93 -0
- package/dist/ui/form.d.ts +25 -0
- package/dist/ui/form.js +135 -0
- package/dist/ui/input.d.ts +4 -0
- package/dist/ui/input.js +24 -0
- package/dist/ui/label.d.ts +5 -0
- package/dist/ui/label.js +18 -0
- package/dist/ui/radio-group.d.ts +10 -0
- package/dist/ui/radio-group.js +55 -0
- package/dist/ui/select.d.ts +22 -0
- package/dist/ui/select.js +255 -0
- package/dist/ui/slot.d.ts +11 -0
- package/dist/ui/slot.js +33 -0
- package/dist/ui/textarea.d.ts +4 -0
- package/dist/ui/textarea.js +20 -0
- package/dist/ui/tooltip.d.ts +20 -0
- package/dist/ui/tooltip.js +73 -0
- package/dist/utils.d.ts +23 -0
- package/dist/whatsapp.d.ts +318 -0
- package/package.json +9 -1
|
@@ -0,0 +1,349 @@
|
|
|
1
|
+
const k = (t) => {
|
|
2
|
+
const e = Math.max(0, t), n = Math.floor(e / 60) % 24, a = e % 60;
|
|
3
|
+
return `${String(n).padStart(2, "0")}:${String(a).padStart(2, "0")}`;
|
|
4
|
+
}, O = (t) => {
|
|
5
|
+
if (!t) return null;
|
|
6
|
+
const [e, n] = t.split(":"), a = Number(e), s = Number(n);
|
|
7
|
+
return !Number.isFinite(a) || !Number.isFinite(s) || a < 0 || s < 0 ? null : a * 60 + s;
|
|
8
|
+
}, X = (t) => {
|
|
9
|
+
const e = t.includes("-") ? t.replace(/-/g, "") : t;
|
|
10
|
+
return /^\d{8}$/.test(e) ? Number(e) : null;
|
|
11
|
+
}, Z = (t) => {
|
|
12
|
+
const e = String(Math.trunc(t)).padStart(8, "0");
|
|
13
|
+
return `${e.slice(0, 4)}-${e.slice(4, 6)}-${e.slice(6, 8)}`;
|
|
14
|
+
}, H = (t) => {
|
|
15
|
+
const e = t.getFullYear(), n = t.getMonth() + 1, a = t.getDate(), s = String(n).padStart(2, "0"), r = String(a).padStart(2, "0");
|
|
16
|
+
return +`${e}${s}${r}`;
|
|
17
|
+
}, E = (t) => {
|
|
18
|
+
if (!t)
|
|
19
|
+
return null;
|
|
20
|
+
if (t instanceof Date)
|
|
21
|
+
return Number.isNaN(t.getTime()) ? null : H(t);
|
|
22
|
+
const e = X(t);
|
|
23
|
+
if (e != null)
|
|
24
|
+
return e;
|
|
25
|
+
const n = new Date(t);
|
|
26
|
+
return Number.isNaN(n.getTime()) ? null : H(n);
|
|
27
|
+
}, B = (t, e) => {
|
|
28
|
+
const n = t ? E(t) : null;
|
|
29
|
+
return n != null ? Z(n) : t || Z(e);
|
|
30
|
+
}, tt = (t) => {
|
|
31
|
+
const e = Z(t), [n, a, s] = e.split("-").map(Number), o = new Date(n, (a || 1) - 1, s || 1).getDay();
|
|
32
|
+
return Number.isNaN(o) ? 0 : (o + 6) % 7;
|
|
33
|
+
}, Y = (t) => Array.isArray(t) ? t.map((e) => {
|
|
34
|
+
if (!e || typeof e != "object")
|
|
35
|
+
return null;
|
|
36
|
+
const n = typeof e.start == "string" ? e.start : "", a = typeof e.end == "string" ? e.end : "";
|
|
37
|
+
return !n || !a ? null : { start: n, end: a };
|
|
38
|
+
}).filter((e) => !!e) : [], et = (t) => {
|
|
39
|
+
const e = O(t.start), n = O(t.end);
|
|
40
|
+
if (e == null || n == null || n <= e)
|
|
41
|
+
return null;
|
|
42
|
+
const a = k(e), s = k(n);
|
|
43
|
+
return {
|
|
44
|
+
startMinutes: e,
|
|
45
|
+
endMinutes: n,
|
|
46
|
+
startLabel: a,
|
|
47
|
+
endLabel: s,
|
|
48
|
+
rangeLabel: `${a} - ${s}`
|
|
49
|
+
};
|
|
50
|
+
}, nt = (t, e) => {
|
|
51
|
+
const n = e.map(et).filter((r) => !!r).sort((r, o) => r.startMinutes - o.startMinutes);
|
|
52
|
+
if (!n.length)
|
|
53
|
+
return {
|
|
54
|
+
day: t,
|
|
55
|
+
isClosed: !0,
|
|
56
|
+
openingSlots: [],
|
|
57
|
+
openingMinutes: null,
|
|
58
|
+
closingMinutes: null,
|
|
59
|
+
summaryLabel: null
|
|
60
|
+
};
|
|
61
|
+
const a = n[0], s = n[n.length - 1];
|
|
62
|
+
return {
|
|
63
|
+
day: t,
|
|
64
|
+
isClosed: !1,
|
|
65
|
+
openingSlots: n,
|
|
66
|
+
openingMinutes: a.startMinutes,
|
|
67
|
+
closingMinutes: s.endMinutes,
|
|
68
|
+
summaryLabel: n.map((r) => r.rangeLabel).join(" / ")
|
|
69
|
+
};
|
|
70
|
+
}, I = (t, e, n = {}) => {
|
|
71
|
+
const a = Array.isArray(t) ? t : [], s = Array.isArray(e) ? e : [], r = /* @__PURE__ */ new Map();
|
|
72
|
+
for (const i of s) {
|
|
73
|
+
if (!i || typeof i != "object")
|
|
74
|
+
continue;
|
|
75
|
+
const l = E(i.date);
|
|
76
|
+
l != null && r.set(l, Y(i.openingSlots));
|
|
77
|
+
}
|
|
78
|
+
const o = E(n.referenceDate) ?? H(/* @__PURE__ */ new Date()), y = tt(o), c = r.get(o);
|
|
79
|
+
let f, m;
|
|
80
|
+
for (const i of a) {
|
|
81
|
+
if (!i || typeof i != "object")
|
|
82
|
+
continue;
|
|
83
|
+
const l = E(i.startDate), h = E(i.endDate);
|
|
84
|
+
if (l == null || h == null) {
|
|
85
|
+
m || (m = i);
|
|
86
|
+
continue;
|
|
87
|
+
}
|
|
88
|
+
const w = Math.min(l, h), F = Math.max(l, h);
|
|
89
|
+
if (o >= w && o <= F) {
|
|
90
|
+
f = i;
|
|
91
|
+
break;
|
|
92
|
+
}
|
|
93
|
+
m || (m = i);
|
|
94
|
+
}
|
|
95
|
+
const u = f ?? m ?? null, S = Array.isArray(u?.openingHours) ? u.openingHours : [], M = /* @__PURE__ */ new Map();
|
|
96
|
+
for (const i of S) {
|
|
97
|
+
if (!i || typeof i.day != "number")
|
|
98
|
+
continue;
|
|
99
|
+
const l = (i.day % 7 + 7) % 7, h = Y(i.openingSlots);
|
|
100
|
+
M.set(l, h);
|
|
101
|
+
}
|
|
102
|
+
c && M.set(y, c);
|
|
103
|
+
const b = [];
|
|
104
|
+
for (let i = 0; i < 7; i += 1) {
|
|
105
|
+
const l = i, h = M.get(l) ?? [];
|
|
106
|
+
b.push(nt(l, h));
|
|
107
|
+
}
|
|
108
|
+
const T = b.flatMap((i) => i.openingSlots);
|
|
109
|
+
if (!T.length)
|
|
110
|
+
return {
|
|
111
|
+
days: b,
|
|
112
|
+
defaultOpeningMinutes: 0,
|
|
113
|
+
defaultClosingMinutes: 0,
|
|
114
|
+
defaultOpeningLabel: "00:00",
|
|
115
|
+
defaultClosingLabel: "00:00",
|
|
116
|
+
defaultSummaryLabel: "",
|
|
117
|
+
season: u ? {
|
|
118
|
+
name: typeof u.name == "string" ? u.name : void 0,
|
|
119
|
+
startDate: B(u.startDate, o),
|
|
120
|
+
endDate: B(u.endDate, o)
|
|
121
|
+
} : null
|
|
122
|
+
};
|
|
123
|
+
const C = T.reduce((i, l) => l.startMinutes < i.startMinutes ? l : i), x = T.reduce((i, l) => l.endMinutes > i.endMinutes ? l : i), g = b.find((i) => !i.isClosed && i.summaryLabel) ?? b[0];
|
|
124
|
+
return {
|
|
125
|
+
days: b,
|
|
126
|
+
defaultOpeningMinutes: C.startMinutes,
|
|
127
|
+
defaultClosingMinutes: x.endMinutes,
|
|
128
|
+
defaultOpeningLabel: C.startLabel,
|
|
129
|
+
defaultClosingLabel: x.endLabel,
|
|
130
|
+
defaultSummaryLabel: g.summaryLabel ?? `${C.startLabel} - ${x.endLabel}`,
|
|
131
|
+
season: u ? {
|
|
132
|
+
name: typeof u.name == "string" ? u.name : void 0,
|
|
133
|
+
startDate: B(u.startDate, o),
|
|
134
|
+
endDate: B(u.endDate, o)
|
|
135
|
+
} : null
|
|
136
|
+
};
|
|
137
|
+
}, G = (t) => {
|
|
138
|
+
const { timing: e, openingHours: n, openingHoursOverrides: a, timeZone: s } = t, r = e.slotIntervalMinutes, o = I(n, a), y = I(n, []), c = (d) => d?.dateString ? I(n, a, {
|
|
139
|
+
referenceDate: d.dateString
|
|
140
|
+
}) : o, f = (d) => d?.dateString ? I(n, [], {
|
|
141
|
+
referenceDate: d.dateString
|
|
142
|
+
}) : y, m = (d, D) => c(D).days.find((p) => p.day === d), u = (d, D) => m(d, D)?.openingSlots ?? [], S = (d, D) => f(D).days.find((p) => p.day === d), M = (d, D) => S(d, D)?.openingSlots ?? [], b = (d, D, L) => {
|
|
143
|
+
const p = u(d, L);
|
|
144
|
+
if (!p.length)
|
|
145
|
+
return null;
|
|
146
|
+
const z = typeof D == "number" ? Math.max(D, 0) : Number.NEGATIVE_INFINITY;
|
|
147
|
+
for (const $ of p) {
|
|
148
|
+
const N = $.startMinutes, V = $.endMinutes - r;
|
|
149
|
+
if (V < N)
|
|
150
|
+
continue;
|
|
151
|
+
const Q = Math.max(N, z), K = Math.ceil(Q / r) * r;
|
|
152
|
+
if (!(K < N) && !(K > V))
|
|
153
|
+
return K;
|
|
154
|
+
}
|
|
155
|
+
return null;
|
|
156
|
+
}, T = (d, D) => {
|
|
157
|
+
const L = u(d, D);
|
|
158
|
+
for (let p = L.length - 1; p >= 0; p -= 1) {
|
|
159
|
+
const z = L[p], $ = z.startMinutes, N = z.endMinutes - r;
|
|
160
|
+
if (!(N < $))
|
|
161
|
+
return N;
|
|
162
|
+
}
|
|
163
|
+
return null;
|
|
164
|
+
}, C = (d, D, L) => {
|
|
165
|
+
if (D == null)
|
|
166
|
+
return !1;
|
|
167
|
+
const p = u(d, L);
|
|
168
|
+
return p.length ? p.some((z) => {
|
|
169
|
+
const $ = z.startMinutes, N = z.endMinutes - r;
|
|
170
|
+
return N < $ ? !1 : D >= $ && D <= N;
|
|
171
|
+
}) : !1;
|
|
172
|
+
}, g = o.days.find((d) => !d.isClosed && d.openingSlots.length)?.day ?? o.days[0]?.day ?? 0, l = y.days.find((d) => !d.isClosed && d.openingSlots.length)?.day ?? y.days[0]?.day ?? 0, h = Math.ceil(Math.max(0, o.defaultOpeningMinutes) / r) * r, w = b(g) ?? h;
|
|
173
|
+
let F = w + r;
|
|
174
|
+
const J = Math.floor(Math.max(0, o.defaultClosingMinutes - r) / r) * r, _ = T(g) ?? J;
|
|
175
|
+
(!Number.isFinite(F) || F > _) && (F = w), Number.isFinite(F) || (F = Math.max(0, o.defaultOpeningMinutes));
|
|
176
|
+
const j = Math.max(0, F), R = Math.max(j, _);
|
|
177
|
+
return {
|
|
178
|
+
timeZone: s,
|
|
179
|
+
slotIntervalMinutes: r,
|
|
180
|
+
autoFillCutoffMinutes: e.autoFillCutoffMinutes,
|
|
181
|
+
pastToleranceMinutes: e.pastToleranceMinutes,
|
|
182
|
+
minBufferMinutes: e.minBufferMinutes,
|
|
183
|
+
defaultOpeningMinutes: o.defaultOpeningMinutes,
|
|
184
|
+
defaultClosingMinutes: o.defaultClosingMinutes,
|
|
185
|
+
defaultOpeningLabel: o.defaultOpeningLabel,
|
|
186
|
+
defaultClosingLabel: o.defaultClosingLabel,
|
|
187
|
+
defaultSummaryLabel: o.defaultSummaryLabel,
|
|
188
|
+
defaultWeekday: g,
|
|
189
|
+
defaultSeasonWeekday: l,
|
|
190
|
+
defaultStartMinutes: j,
|
|
191
|
+
defaultStartTime: k(j),
|
|
192
|
+
defaultEndMinutes: R,
|
|
193
|
+
defaultEndTime: k(R),
|
|
194
|
+
getDayHours: m,
|
|
195
|
+
getIntervalsForWeekday: u,
|
|
196
|
+
getSeasonDayHours: S,
|
|
197
|
+
getSeasonIntervalsForWeekday: M,
|
|
198
|
+
getFirstStartMinutesForWeekday: b,
|
|
199
|
+
getLastStartMinutesForWeekday: T,
|
|
200
|
+
isValidStartMinutesForWeekday: C,
|
|
201
|
+
getNormalizedOpeningHours: c,
|
|
202
|
+
getSeasonNormalizedOpeningHours: f
|
|
203
|
+
};
|
|
204
|
+
}, at = (t, e, n) => new Intl.DateTimeFormat("en-CA", {
|
|
205
|
+
timeZone: e,
|
|
206
|
+
...n
|
|
207
|
+
}).format(t), A = (t, e) => {
|
|
208
|
+
const a = new Intl.DateTimeFormat("en-CA", {
|
|
209
|
+
timeZone: e,
|
|
210
|
+
hour12: !1,
|
|
211
|
+
year: "numeric",
|
|
212
|
+
month: "2-digit",
|
|
213
|
+
day: "2-digit",
|
|
214
|
+
hour: "2-digit",
|
|
215
|
+
minute: "2-digit"
|
|
216
|
+
}).formatToParts(t), s = Object.fromEntries(a.map((c) => [c.type, c.value])), r = `${s.year}-${s.month}-${s.day}`, o = `${s.hour}:${s.minute}`, y = Number(s.hour) * 60 + Number(s.minute);
|
|
217
|
+
return { dateString: r, timeString: o, minutesFromMidnight: y };
|
|
218
|
+
}, q = (t) => {
|
|
219
|
+
const n = (t.includes("-") ? t.replace(/-/g, "") : t).match(/^(\d{4})(\d{2})(\d{2})$/);
|
|
220
|
+
if (!n)
|
|
221
|
+
return { year: Number.NaN, month: Number.NaN, day: Number.NaN };
|
|
222
|
+
const [, a, s, r] = n;
|
|
223
|
+
return { year: Number(a), month: Number(s), day: Number(r) };
|
|
224
|
+
}, rt = (t, e) => {
|
|
225
|
+
const n = new Date(t.getTime());
|
|
226
|
+
return n.setUTCDate(n.getUTCDate() + e), n;
|
|
227
|
+
}, st = (t, e) => {
|
|
228
|
+
const { dateString: n, minutesFromMidnight: a } = A(t, e.timeZone), s = W(n);
|
|
229
|
+
if (Number.isNaN(s.getTime()))
|
|
230
|
+
return { baseDate: /* @__PURE__ */ new Date(), minutesFromMidnight: a };
|
|
231
|
+
const r = new Date(s.getFullYear(), s.getMonth(), s.getDate());
|
|
232
|
+
return a >= e.autoFillCutoffMinutes && r.setDate(r.getDate() + 1), { baseDate: r, minutesFromMidnight: a };
|
|
233
|
+
}, ot = (t) => {
|
|
234
|
+
const e = t.referenceDate ?? /* @__PURE__ */ new Date(), n = G(t.config), { baseDate: a } = st(e, n), s = new Date(a.getTime()), r = new Date(a.getTime()), o = n.defaultStartTime, y = n.defaultEndTime, c = it(
|
|
235
|
+
{
|
|
236
|
+
startDate: s,
|
|
237
|
+
startTime: o,
|
|
238
|
+
endDate: r,
|
|
239
|
+
endTime: y
|
|
240
|
+
},
|
|
241
|
+
{ referenceDate: e, config: t.config }
|
|
242
|
+
), f = c.startDateString ? W(c.startDateString) : s, m = c.shouldResetEnd ? new Date(f.getTime()) : c.endDateString ? W(c.endDateString) : r, u = c.startTime ?? o, S = c.endTime ?? y;
|
|
243
|
+
return {
|
|
244
|
+
startDate: new Date(f.getTime()),
|
|
245
|
+
startTime: u,
|
|
246
|
+
endDate: new Date(m.getTime()),
|
|
247
|
+
endTime: S
|
|
248
|
+
};
|
|
249
|
+
}, U = (t, e) => {
|
|
250
|
+
if (t) {
|
|
251
|
+
if (typeof t == "string") {
|
|
252
|
+
const { year: n, month: a, day: s } = q(t);
|
|
253
|
+
return !Number.isFinite(n) || !Number.isFinite(a) || !Number.isFinite(s) ? void 0 : `${String(n).padStart(4, "0")}-${String(a).padStart(2, "0")}-${String(s).padStart(2, "0")}`;
|
|
254
|
+
}
|
|
255
|
+
return at(t, e, { year: "numeric", month: "2-digit", day: "2-digit" });
|
|
256
|
+
}
|
|
257
|
+
}, W = (t) => {
|
|
258
|
+
const { year: e, month: n, day: a } = q(t);
|
|
259
|
+
return new Date(e, n - 1, a);
|
|
260
|
+
}, v = (t) => {
|
|
261
|
+
const n = W(t).getDay();
|
|
262
|
+
return Number.isNaN(n) ? 0 : (n + 6) % 7;
|
|
263
|
+
}, P = (t, e, n) => {
|
|
264
|
+
const { dateString: a, minutesFromMidnight: s } = A(t, e.timeZone), r = e.slotIntervalMinutes, o = v(a), y = typeof n == "number" ? n : s + e.minBufferMinutes;
|
|
265
|
+
let c = Math.ceil(Math.max(y, 0) / r) * r, f = t, m = a, u = o, S = 0;
|
|
266
|
+
for (; S < 14; ) {
|
|
267
|
+
const M = e.getFirstStartMinutesForWeekday(
|
|
268
|
+
u,
|
|
269
|
+
S === 0 ? c : null,
|
|
270
|
+
{ dateString: m }
|
|
271
|
+
);
|
|
272
|
+
if (typeof M == "number")
|
|
273
|
+
return {
|
|
274
|
+
dateString: m,
|
|
275
|
+
time: k(M)
|
|
276
|
+
};
|
|
277
|
+
S += 1, f = rt(f, 1), m = A(f, e.timeZone).dateString, u = v(m), c = 0;
|
|
278
|
+
}
|
|
279
|
+
return {
|
|
280
|
+
dateString: a,
|
|
281
|
+
time: k(e.defaultStartMinutes)
|
|
282
|
+
};
|
|
283
|
+
}, it = (t, e) => {
|
|
284
|
+
const n = e.referenceDate ?? /* @__PURE__ */ new Date(), a = G(e.config), s = e.toleranceMinutes ?? a.pastToleranceMinutes, r = U(t.startDate, a.timeZone), o = U(t.endDate, a.timeZone), y = t.startTime ?? null;
|
|
285
|
+
if (!r)
|
|
286
|
+
return {
|
|
287
|
+
startDateString: r,
|
|
288
|
+
startTime: y,
|
|
289
|
+
endDateString: o,
|
|
290
|
+
endTime: t.endTime ?? null,
|
|
291
|
+
wasAdjusted: !1,
|
|
292
|
+
shouldResetEnd: !1
|
|
293
|
+
};
|
|
294
|
+
const c = A(n, a.timeZone);
|
|
295
|
+
let f = r, m = y, u, S = !1;
|
|
296
|
+
if (r < c.dateString) {
|
|
297
|
+
const g = P(n, a);
|
|
298
|
+
f = g.dateString, m = g.time, u = "start_date_in_past", S = !0;
|
|
299
|
+
} else if (r === c.dateString) {
|
|
300
|
+
const g = O(y), i = c.minutesFromMidnight - s;
|
|
301
|
+
if (g == null || g < i) {
|
|
302
|
+
const l = P(n, a);
|
|
303
|
+
f = l.dateString, m = l.time, u = "start_time_in_past", S = !0;
|
|
304
|
+
}
|
|
305
|
+
}
|
|
306
|
+
const M = f ?? r;
|
|
307
|
+
if (M) {
|
|
308
|
+
const g = v(M), i = O(m);
|
|
309
|
+
if (!a.isValidStartMinutesForWeekday(g, i, {
|
|
310
|
+
dateString: M
|
|
311
|
+
})) {
|
|
312
|
+
const l = a.getFirstStartMinutesForWeekday(g, null, {
|
|
313
|
+
dateString: M
|
|
314
|
+
});
|
|
315
|
+
if (typeof l == "number")
|
|
316
|
+
m = k(l), S = !0;
|
|
317
|
+
else {
|
|
318
|
+
const h = W(M), w = P(h, a, 0);
|
|
319
|
+
f = w.dateString, m = w.time, S = !0;
|
|
320
|
+
}
|
|
321
|
+
}
|
|
322
|
+
}
|
|
323
|
+
const b = S, T = b ? void 0 : o, C = (() => {
|
|
324
|
+
const g = f ?? r;
|
|
325
|
+
if (!g)
|
|
326
|
+
return a.defaultEndTime;
|
|
327
|
+
const i = v(g), l = a.getLastStartMinutesForWeekday(i, { dateString: g });
|
|
328
|
+
return typeof l == "number" ? k(l) : a.defaultEndTime;
|
|
329
|
+
})(), x = b ? C : t.endTime ?? null;
|
|
330
|
+
return {
|
|
331
|
+
startDateString: f,
|
|
332
|
+
startTime: m,
|
|
333
|
+
endDateString: T,
|
|
334
|
+
endTime: x,
|
|
335
|
+
wasAdjusted: S,
|
|
336
|
+
adjustmentReason: u,
|
|
337
|
+
shouldResetEnd: b
|
|
338
|
+
};
|
|
339
|
+
};
|
|
340
|
+
export {
|
|
341
|
+
it as adjustBookingPeriod,
|
|
342
|
+
W as businessDateStringToDate,
|
|
343
|
+
G as createBookingPeriodConstants,
|
|
344
|
+
U as dateToBusinessDateString,
|
|
345
|
+
ot as getDefaultBookingPeriod,
|
|
346
|
+
k as minutesToTimeString,
|
|
347
|
+
I as normalizeOpeningHours,
|
|
348
|
+
O as parseTimeToMinutes
|
|
349
|
+
};
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { StorefrontConfiguration } from '../storefrontSchemas';
|
|
2
|
+
import { BookingPeriodConfig } from './booking-period';
|
|
3
|
+
export declare const BOOKING_SEARCH_KEYS: readonly ["fulfillment", "start_date", "start_time", "end_date", "end_time", "start_address", "end_address"];
|
|
4
|
+
export type BookingFulfillment = "pickup" | "delivery";
|
|
5
|
+
export type StorefrontBookingParams = {
|
|
6
|
+
fulfillment: BookingFulfillment;
|
|
7
|
+
start_date: string;
|
|
8
|
+
start_time: string;
|
|
9
|
+
end_date: string;
|
|
10
|
+
end_time: string;
|
|
11
|
+
start_address: string;
|
|
12
|
+
end_address: string;
|
|
13
|
+
};
|
|
14
|
+
type BookingSearchStorage = Pick<Storage, "getItem" | "removeItem" | "setItem"> | null | undefined;
|
|
15
|
+
export declare const TIME_OPTIONS: string[];
|
|
16
|
+
export declare const getDefaultBookingParams: (now?: Date) => StorefrontBookingParams;
|
|
17
|
+
export declare const createBookingPeriodConfigFromStorefrontConfiguration: (storefrontConfiguration: StorefrontConfiguration) => BookingPeriodConfig;
|
|
18
|
+
export declare const getDefaultBookingParamsForStorefrontConfiguration: (storefrontConfiguration: StorefrontConfiguration, now?: Date) => StorefrontBookingParams;
|
|
19
|
+
export declare const getBookingParamsFromSearch: (searchParams: URLSearchParams, fallback?: Partial<StorefrontBookingParams>) => StorefrontBookingParams;
|
|
20
|
+
export declare const applyBookingParamsToSearch: (searchParams: URLSearchParams, booking: Partial<StorefrontBookingParams>) => URLSearchParams;
|
|
21
|
+
export declare const pickBookingSearchParams: (searchParams: URLSearchParams) => URLSearchParams;
|
|
22
|
+
export declare const getBookingSessionStorageKey: (storeSlug?: string) => string;
|
|
23
|
+
export declare const readBookingSearchParamsFromStorage: (storage: BookingSearchStorage, storeSlug?: string) => URLSearchParams;
|
|
24
|
+
export declare const writeBookingSearchParamsToStorage: (storage: BookingSearchStorage, storeSlug: string | undefined, booking: Partial<StorefrontBookingParams> | URLSearchParams) => void;
|
|
25
|
+
export declare const readBookingSearchParamsFromSessionStorage: (storeSlug?: string) => URLSearchParams;
|
|
26
|
+
export declare const writeBookingSearchParamsToSessionStorage: (storeSlug: string | undefined, booking: Partial<StorefrontBookingParams> | URLSearchParams) => void;
|
|
27
|
+
export declare const resolveBookingSearchParams: (searchParams: URLSearchParams, options?: {
|
|
28
|
+
storage?: BookingSearchStorage;
|
|
29
|
+
storeSlug?: string;
|
|
30
|
+
}) => URLSearchParams;
|
|
31
|
+
export declare const resolveBookingSearchParamsFromSessionStorage: (searchParams: URLSearchParams, storeSlug?: string) => URLSearchParams;
|
|
32
|
+
export declare const getBookingDurationMinutes: (booking: StorefrontBookingParams) => number;
|
|
33
|
+
export declare const getBookingDurationLabel: (booking: StorefrontBookingParams) => {
|
|
34
|
+
hours: number;
|
|
35
|
+
minutes: number;
|
|
36
|
+
label: string;
|
|
37
|
+
};
|
|
38
|
+
export {};
|
|
39
|
+
//# sourceMappingURL=booking.d.ts.map
|
|
@@ -0,0 +1,159 @@
|
|
|
1
|
+
import { differenceInMinutes as p, format as T } from "date-fns";
|
|
2
|
+
import { getDefaultBookingPeriod as h, parseTimeToMinutes as B } from "./booking-period.js";
|
|
3
|
+
const E = [
|
|
4
|
+
"fulfillment",
|
|
5
|
+
"start_date",
|
|
6
|
+
"start_time",
|
|
7
|
+
"end_date",
|
|
8
|
+
"end_time",
|
|
9
|
+
"start_address",
|
|
10
|
+
"end_address"
|
|
11
|
+
], P = "loczer_storefront_booking:", i = (t) => T(t, "yyyy-MM-dd"), D = () => {
|
|
12
|
+
const t = [];
|
|
13
|
+
for (let e = 8; e <= 18; e += 1)
|
|
14
|
+
for (const n of [0, 30])
|
|
15
|
+
e === 18 && n > 0 || t.push(`${String(e).padStart(2, "0")}:${String(n).padStart(2, "0")}`);
|
|
16
|
+
return t;
|
|
17
|
+
}, u = D(), I = (t = /* @__PURE__ */ new Date()) => {
|
|
18
|
+
const e = i(t);
|
|
19
|
+
return {
|
|
20
|
+
fulfillment: "pickup",
|
|
21
|
+
start_date: e,
|
|
22
|
+
start_time: u[3] ?? "09:30",
|
|
23
|
+
end_date: e,
|
|
24
|
+
end_time: u.at(-1) ?? "18:00",
|
|
25
|
+
start_address: "",
|
|
26
|
+
end_address: ""
|
|
27
|
+
};
|
|
28
|
+
}, M = 30, U = 15, k = 10, w = 960, y = (t) => B(t) ?? w, L = (t) => (Math.trunc(t) % 7 + 7) % 7, F = (t) => ({
|
|
29
|
+
timing: {
|
|
30
|
+
slotIntervalMinutes: M,
|
|
31
|
+
autoFillCutoffMinutes: y(t.settings.sameDayCutoff),
|
|
32
|
+
pastToleranceMinutes: U,
|
|
33
|
+
minBufferMinutes: k
|
|
34
|
+
},
|
|
35
|
+
openingHours: t.bookingEngine.shop.openingHours.map((e) => ({
|
|
36
|
+
...e,
|
|
37
|
+
openingHours: e.openingHours.map((n) => ({
|
|
38
|
+
...n,
|
|
39
|
+
day: L(n.day)
|
|
40
|
+
}))
|
|
41
|
+
})),
|
|
42
|
+
openingHoursOverrides: t.bookingEngine.shop.openingHoursOverrides ?? [],
|
|
43
|
+
timeZone: t.bookingEngine.shop.timeZone
|
|
44
|
+
}), C = (t, e = /* @__PURE__ */ new Date()) => {
|
|
45
|
+
const n = F(t), r = h({
|
|
46
|
+
config: n,
|
|
47
|
+
referenceDate: e
|
|
48
|
+
});
|
|
49
|
+
return {
|
|
50
|
+
fulfillment: "pickup",
|
|
51
|
+
start_date: i(r.startDate),
|
|
52
|
+
start_time: r.startTime,
|
|
53
|
+
end_date: i(r.endDate),
|
|
54
|
+
end_time: r.endTime,
|
|
55
|
+
start_address: "",
|
|
56
|
+
end_address: ""
|
|
57
|
+
};
|
|
58
|
+
}, a = (t, e, n) => {
|
|
59
|
+
const r = t.get(e);
|
|
60
|
+
return r == null || r.trim() === "" ? n : r;
|
|
61
|
+
}, K = (t, e) => {
|
|
62
|
+
const n = { ...I(), ...e }, r = t.get("fulfillment") === "delivery" ? "delivery" : t.get("fulfillment") === "pickup" ? "pickup" : n.fulfillment, s = a(t, "start_date", n.start_date), o = a(t, "start_time", n.start_time), _ = a(t, "end_date", n.end_date), f = a(t, "end_time", n.end_time), S = a(t, "start_address", n.start_address), g = a(t, "end_address", n.end_address);
|
|
63
|
+
return {
|
|
64
|
+
fulfillment: r,
|
|
65
|
+
start_date: s,
|
|
66
|
+
start_time: o,
|
|
67
|
+
end_date: _,
|
|
68
|
+
end_time: f,
|
|
69
|
+
start_address: S,
|
|
70
|
+
end_address: g
|
|
71
|
+
};
|
|
72
|
+
}, N = (t, e) => {
|
|
73
|
+
const n = new URLSearchParams(t), r = (s, o) => {
|
|
74
|
+
if (o != null) {
|
|
75
|
+
if (o.trim() === "") {
|
|
76
|
+
n.delete(s);
|
|
77
|
+
return;
|
|
78
|
+
}
|
|
79
|
+
n.set(s, o);
|
|
80
|
+
}
|
|
81
|
+
};
|
|
82
|
+
return r("fulfillment", e.fulfillment), r("start_date", e.start_date), r("start_time", e.start_time), r("end_date", e.end_date), r("end_time", e.end_time), r("start_address", e.start_address), r("end_address", e.end_address), n;
|
|
83
|
+
}, d = (t) => {
|
|
84
|
+
const e = new URLSearchParams();
|
|
85
|
+
for (const n of E) {
|
|
86
|
+
const r = t.get(n);
|
|
87
|
+
if (r == null) continue;
|
|
88
|
+
const s = r.trim();
|
|
89
|
+
s.length !== 0 && e.set(n, s);
|
|
90
|
+
}
|
|
91
|
+
return e;
|
|
92
|
+
}, c = () => {
|
|
93
|
+
if (typeof window > "u")
|
|
94
|
+
return null;
|
|
95
|
+
try {
|
|
96
|
+
return window.sessionStorage;
|
|
97
|
+
} catch {
|
|
98
|
+
return null;
|
|
99
|
+
}
|
|
100
|
+
}, O = (t) => t instanceof URLSearchParams ? d(t) : N(new URLSearchParams(), t), m = (t) => {
|
|
101
|
+
const e = t?.trim() ?? "";
|
|
102
|
+
return e ? `${P}${e}` : "";
|
|
103
|
+
}, l = (t, e) => {
|
|
104
|
+
const n = m(e);
|
|
105
|
+
if (!n || !t)
|
|
106
|
+
return new URLSearchParams();
|
|
107
|
+
try {
|
|
108
|
+
const r = t.getItem(n);
|
|
109
|
+
return r ? d(new URLSearchParams(r)) : new URLSearchParams();
|
|
110
|
+
} catch {
|
|
111
|
+
return new URLSearchParams();
|
|
112
|
+
}
|
|
113
|
+
}, R = (t, e, n) => {
|
|
114
|
+
const r = m(e);
|
|
115
|
+
if (!r || !t)
|
|
116
|
+
return;
|
|
117
|
+
const s = O(n).toString();
|
|
118
|
+
try {
|
|
119
|
+
if (!s) {
|
|
120
|
+
t.removeItem(r);
|
|
121
|
+
return;
|
|
122
|
+
}
|
|
123
|
+
t.setItem(r, s);
|
|
124
|
+
} catch {
|
|
125
|
+
}
|
|
126
|
+
}, z = (t) => l(c(), t), x = (t, e) => {
|
|
127
|
+
R(c(), t, e);
|
|
128
|
+
}, $ = (t, e) => {
|
|
129
|
+
const n = d(t);
|
|
130
|
+
return n.toString() ? n : l(e?.storage, e?.storeSlug);
|
|
131
|
+
}, G = (t, e) => $(t, {
|
|
132
|
+
storage: c(),
|
|
133
|
+
storeSlug: e
|
|
134
|
+
}), A = (t) => {
|
|
135
|
+
const e = /* @__PURE__ */ new Date(`${t.start_date}T${t.start_time}:00`), n = /* @__PURE__ */ new Date(`${t.end_date}T${t.end_time}:00`);
|
|
136
|
+
return Number.isNaN(e.getTime()) || Number.isNaN(n.getTime()) ? 0 : Math.max(0, p(n, e));
|
|
137
|
+
}, V = (t) => {
|
|
138
|
+
const e = A(t), n = Math.floor(e / 60), r = e % 60;
|
|
139
|
+
return r === 0 ? { hours: n, minutes: r, label: `${n}h` } : { hours: n, minutes: r, label: `${n}h${String(r).padStart(2, "0")}` };
|
|
140
|
+
};
|
|
141
|
+
export {
|
|
142
|
+
E as BOOKING_SEARCH_KEYS,
|
|
143
|
+
u as TIME_OPTIONS,
|
|
144
|
+
N as applyBookingParamsToSearch,
|
|
145
|
+
F as createBookingPeriodConfigFromStorefrontConfiguration,
|
|
146
|
+
V as getBookingDurationLabel,
|
|
147
|
+
A as getBookingDurationMinutes,
|
|
148
|
+
K as getBookingParamsFromSearch,
|
|
149
|
+
m as getBookingSessionStorageKey,
|
|
150
|
+
I as getDefaultBookingParams,
|
|
151
|
+
C as getDefaultBookingParamsForStorefrontConfiguration,
|
|
152
|
+
d as pickBookingSearchParams,
|
|
153
|
+
z as readBookingSearchParamsFromSessionStorage,
|
|
154
|
+
l as readBookingSearchParamsFromStorage,
|
|
155
|
+
$ as resolveBookingSearchParams,
|
|
156
|
+
G as resolveBookingSearchParamsFromSessionStorage,
|
|
157
|
+
x as writeBookingSearchParamsToSessionStorage,
|
|
158
|
+
R as writeBookingSearchParamsToStorage
|
|
159
|
+
};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
export type StorefrontCartItem = {
|
|
3
|
+
key: string;
|
|
4
|
+
kind: "bike" | "e-bike" | "accessory";
|
|
5
|
+
productId: string;
|
|
6
|
+
productVariantId?: string;
|
|
7
|
+
quantity: number;
|
|
8
|
+
};
|
|
9
|
+
type StorefrontCartContextValue = {
|
|
10
|
+
items: StorefrontCartItem[];
|
|
11
|
+
itemCount: number;
|
|
12
|
+
addItem: (item: Omit<StorefrontCartItem, "key"> & {
|
|
13
|
+
key?: string;
|
|
14
|
+
}) => void;
|
|
15
|
+
setQuantity: (key: string, quantity: number) => void;
|
|
16
|
+
removeItem: (key: string) => void;
|
|
17
|
+
clear: () => void;
|
|
18
|
+
};
|
|
19
|
+
export declare function StorefrontCartProvider({ storeSlug, children }: {
|
|
20
|
+
storeSlug: string;
|
|
21
|
+
children: ReactNode;
|
|
22
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
23
|
+
export declare const useStorefrontCart: () => StorefrontCartContextValue;
|
|
24
|
+
export {};
|
|
25
|
+
//# sourceMappingURL=cart.d.ts.map
|
package/dist/lib/cart.js
ADDED
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
import { jsx as q } from "react/jsx-runtime";
|
|
2
|
+
import { createContext as v, useContext as M, useState as w, useEffect as C, useCallback as I, useMemo as h } from "react";
|
|
3
|
+
const g = v(void 0), V = "loczer.storefront.cart.v4", b = (r) => {
|
|
4
|
+
const i = r.productVariantId ? `variant:${r.productVariantId}` : "product";
|
|
5
|
+
return `${r.kind}:${r.productId}:${i}`.toLowerCase();
|
|
6
|
+
}, $ = (r) => {
|
|
7
|
+
if (!r) return { items: [] };
|
|
8
|
+
try {
|
|
9
|
+
const i = JSON.parse(r);
|
|
10
|
+
return { items: (Array.isArray(i.items) ? i.items : []).map((c) => {
|
|
11
|
+
const t = c ?? {}, s = t.kind === "accessory" ? "accessory" : t.kind === "e-bike" ? "e-bike" : t.kind === "bike" ? "bike" : null, m = typeof t.productId == "string" ? t.productId.trim() : "", f = typeof t.productVariantId == "string" ? t.productVariantId.trim() : "", y = typeof t.quantity == "number" ? Math.floor(t.quantity) : 0;
|
|
12
|
+
if (!s || m.length === 0 || y <= 0) return null;
|
|
13
|
+
const p = {
|
|
14
|
+
kind: s,
|
|
15
|
+
productId: m,
|
|
16
|
+
...f ? { productVariantId: f } : {},
|
|
17
|
+
quantity: y
|
|
18
|
+
};
|
|
19
|
+
return { key: b(p), ...p };
|
|
20
|
+
}).filter((c) => c !== null) };
|
|
21
|
+
} catch {
|
|
22
|
+
return { items: [] };
|
|
23
|
+
}
|
|
24
|
+
};
|
|
25
|
+
function K({ storeSlug: r, children: i }) {
|
|
26
|
+
const u = `${V}.${r || "unknown"}`, [k, c] = w(!1), [t, s] = w({ items: [] });
|
|
27
|
+
C(() => {
|
|
28
|
+
if (typeof window > "u") return;
|
|
29
|
+
const e = $(window.localStorage.getItem(u));
|
|
30
|
+
s((o) => !k && o.items.length > 0 ? o : e), c(!0);
|
|
31
|
+
}, [u]), C(() => {
|
|
32
|
+
typeof window > "u" || k && window.localStorage.setItem(u, JSON.stringify(t));
|
|
33
|
+
}, [k, t, u]);
|
|
34
|
+
const m = I((e) => {
|
|
35
|
+
s((o) => {
|
|
36
|
+
const n = e.key?.trim() ? e.key.trim().toLowerCase() : b(e), l = Math.max(1, Math.floor(e.quantity));
|
|
37
|
+
return o.items.find((d) => d.key === n) ? {
|
|
38
|
+
items: o.items.map(
|
|
39
|
+
(d) => d.key === n ? { ...d, quantity: d.quantity + l } : d
|
|
40
|
+
)
|
|
41
|
+
} : {
|
|
42
|
+
items: [
|
|
43
|
+
...o.items,
|
|
44
|
+
{
|
|
45
|
+
key: n,
|
|
46
|
+
kind: e.kind,
|
|
47
|
+
productId: e.productId,
|
|
48
|
+
productVariantId: e.productVariantId,
|
|
49
|
+
quantity: l
|
|
50
|
+
}
|
|
51
|
+
]
|
|
52
|
+
};
|
|
53
|
+
});
|
|
54
|
+
}, []), f = I((e, o) => {
|
|
55
|
+
s((n) => {
|
|
56
|
+
const l = Math.max(0, Math.floor(o));
|
|
57
|
+
return l <= 0 ? { items: n.items.filter((a) => a.key !== e) } : {
|
|
58
|
+
items: n.items.map((a) => a.key === e ? { ...a, quantity: l } : a)
|
|
59
|
+
};
|
|
60
|
+
});
|
|
61
|
+
}, []), y = I((e) => {
|
|
62
|
+
s((o) => ({ items: o.items.filter((n) => n.key !== e) }));
|
|
63
|
+
}, []), p = I(() => {
|
|
64
|
+
s({ items: [] });
|
|
65
|
+
}, []), S = h(() => t.items.reduce((e, o) => e + o.quantity, 0), [t.items]), x = h(
|
|
66
|
+
() => ({
|
|
67
|
+
items: t.items,
|
|
68
|
+
itemCount: S,
|
|
69
|
+
addItem: m,
|
|
70
|
+
setQuantity: f,
|
|
71
|
+
removeItem: y,
|
|
72
|
+
clear: p
|
|
73
|
+
}),
|
|
74
|
+
[m, p, S, y, f, t.items]
|
|
75
|
+
);
|
|
76
|
+
return /* @__PURE__ */ q(g.Provider, { value: x, children: i });
|
|
77
|
+
}
|
|
78
|
+
const P = () => {
|
|
79
|
+
const r = M(g);
|
|
80
|
+
if (!r)
|
|
81
|
+
throw new Error("useStorefrontCart must be used within StorefrontCartProvider");
|
|
82
|
+
return r;
|
|
83
|
+
};
|
|
84
|
+
export {
|
|
85
|
+
K as StorefrontCartProvider,
|
|
86
|
+
P as useStorefrontCart
|
|
87
|
+
};
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { StorefrontCartItem } from './cart';
|
|
2
|
+
import { StorefrontAvailabilityIssue } from './storefrontAvailability';
|
|
3
|
+
import { StorefrontProductsCollections } from './products';
|
|
4
|
+
export type StorefrontCartSummaryLine = StorefrontCartItem & {
|
|
5
|
+
checkoutProductId: string;
|
|
6
|
+
productName: string;
|
|
7
|
+
productWarning?: string;
|
|
8
|
+
productVariantLabel?: string;
|
|
9
|
+
productVariantDescription?: string;
|
|
10
|
+
productVariantIsSize: boolean;
|
|
11
|
+
unitPriceMinor: number;
|
|
12
|
+
lineTotalMinor: number;
|
|
13
|
+
estimatedLineTotalMinor?: number;
|
|
14
|
+
availabilityStatus?: "AVAILABLE" | "LOW_STOCK" | "OUT_OF_STOCK";
|
|
15
|
+
insufficientCapacity?: boolean;
|
|
16
|
+
availabilityIssue?: StorefrontAvailabilityIssue;
|
|
17
|
+
};
|
|
18
|
+
export type StorefrontCartSummary = {
|
|
19
|
+
lines: StorefrontCartSummaryLine[];
|
|
20
|
+
totalPerDayMinor: number;
|
|
21
|
+
estimatedDays?: number;
|
|
22
|
+
estimatedTotalMinor?: number;
|
|
23
|
+
};
|
|
24
|
+
export declare const buildStorefrontCartSummary: (params: {
|
|
25
|
+
items: StorefrontCartItem[];
|
|
26
|
+
language: string;
|
|
27
|
+
fallbackLanguage?: string;
|
|
28
|
+
products: StorefrontProductsCollections;
|
|
29
|
+
estimatedDays?: number;
|
|
30
|
+
}) => StorefrontCartSummary;
|
|
31
|
+
//# sourceMappingURL=cartSummary.d.ts.map
|