@sonordev/site-kit 2.8.0 → 2.8.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (45) hide show
  1. package/dist/{chunk-EATGSR46.js → chunk-EHJANA5C.js} +4 -80
  2. package/dist/chunk-EHJANA5C.js.map +1 -0
  3. package/dist/{chunk-AT2ZF3TL.mjs → chunk-FMZOZQBV.mjs} +91 -15
  4. package/dist/chunk-FMZOZQBV.mjs.map +1 -0
  5. package/dist/chunk-GSRT66PA.js +80 -0
  6. package/dist/chunk-GSRT66PA.js.map +1 -0
  7. package/dist/{chunk-ZQINTH5K.js → chunk-I2GTT2DG.js} +91 -15
  8. package/dist/chunk-I2GTT2DG.js.map +1 -0
  9. package/dist/chunk-MU7DTEUF.mjs +77 -0
  10. package/dist/chunk-MU7DTEUF.mjs.map +1 -0
  11. package/dist/{chunk-UUDE46TZ.mjs → chunk-VIGRGMWR.mjs} +4 -78
  12. package/dist/chunk-VIGRGMWR.mjs.map +1 -0
  13. package/dist/commerce/index.d.mts +3 -3
  14. package/dist/commerce/index.d.ts +3 -3
  15. package/dist/commerce/server.d.mts +1 -1
  16. package/dist/commerce/server.d.ts +1 -1
  17. package/dist/index.d.mts +6 -191
  18. package/dist/index.d.ts +6 -191
  19. package/dist/index.js +19 -18
  20. package/dist/index.js.map +1 -1
  21. package/dist/index.mjs +4 -3
  22. package/dist/index.mjs.map +1 -1
  23. package/dist/reputation/index.d.mts +3 -55
  24. package/dist/reputation/index.d.ts +3 -55
  25. package/dist/reputation/index.js +5 -4
  26. package/dist/reputation/index.mjs +2 -1
  27. package/dist/reputation/server.d.mts +55 -0
  28. package/dist/reputation/server.d.ts +55 -0
  29. package/dist/reputation/server.js +17 -0
  30. package/dist/reputation/server.js.map +1 -0
  31. package/dist/reputation/server.mjs +4 -0
  32. package/dist/reputation/server.mjs.map +1 -0
  33. package/dist/sync/index.d.mts +213 -0
  34. package/dist/sync/index.d.ts +213 -0
  35. package/dist/sync/index.js +13 -13
  36. package/dist/sync/index.mjs +1 -1
  37. package/dist/{types-B0xmgGw-.d.mts → types-iZM4Lz71.d.mts} +1 -1
  38. package/dist/{types-B0xmgGw-.d.ts → types-iZM4Lz71.d.ts} +1 -1
  39. package/dist/{useEventModal-CJLCmH5Y.d.ts → useEventModal-CcxNZOvp.d.ts} +2 -2
  40. package/dist/{useEventModal-4W_y1SYY.d.mts → useEventModal-qJfX_1XG.d.mts} +2 -2
  41. package/package.json +7 -2
  42. package/dist/chunk-AT2ZF3TL.mjs.map +0 -1
  43. package/dist/chunk-EATGSR46.js.map +0 -1
  44. package/dist/chunk-UUDE46TZ.mjs.map +0 -1
  45. package/dist/chunk-ZQINTH5K.js.map +0 -1
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/reputation/TestimonialSection.tsx"],"names":[],"mappings":";;;;AAeO,SAAS,kBAAA,CAAmB;AAAA,EACjC,KAAA;AAAA,EACA,QAAA;AAAA,EACA,QAAA,GAAW,IAAA;AAAA,EACX,gBAAA,GAAmB,GAAA;AAAA,EACnB,UAAA,GAAa,IAAA;AAAA,EACb,UAAA;AAAA,EACA,YAAA,GAAe,KAAA;AAAA,EACf,OAAA;AAAA,EACA,SAAA,GAAY;AACd,CAAA,EAA4B;AAC1B,EAAA,MAAM,CAAC,OAAA,EAAS,UAAU,CAAA,GAAI,QAAA,CAAmB,EAAE,CAAA;AACnD,EAAA,MAAM,CAAC,YAAA,EAAc,eAAe,CAAA,GAAI,SAAS,CAAC,CAAA;AAClD,EAAA,MAAM,CAAC,SAAA,EAAW,YAAY,CAAA,GAAI,SAAS,IAAI,CAAA;AAC/C,EAAA,MAAM,CAAC,SAAA,EAAW,YAAY,CAAA,GAAI,SAA0B,MAAM,CAAA;AAGlE,EAAA,SAAA,CAAU,MAAM;AACd,IAAA,eAAe,WAAA,GAAc;AAC3B,MAAA,YAAA,CAAa,IAAI,CAAA;AACjB,MAAA,MAAM,IAAA,GAAO,MAAM,YAAA,CA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,CAAA;AAEJ","file":"chunk-VIGRGMWR.mjs","sourcesContent":["/**\n * @sonordev/site-kit/reputation - Testimonial Section\n * \n * Displays client reviews in a rotating carousel\n * Fetches published reviews from Portal API public endpoint\n * \n * Minimal styling - let site CSS control appearance\n */\n\n'use client'\n\nimport React, { useEffect, useState, useCallback } from 'react'\nimport { fetchReviews } from './api'\nimport type { Review, TestimonialSectionProps } from './types'\n\nexport function TestimonialSection({\n title,\n subtitle,\n autoplay = true,\n autoplayInterval = 5000,\n showRating = true,\n maxReviews,\n featuredOnly = false,\n service,\n className = '',\n}: TestimonialSectionProps) {\n const [reviews, setReviews] = useState<Review[]>([])\n const [currentIndex, setCurrentIndex] = useState(0)\n const [isLoading, setIsLoading] = useState(true)\n const [direction, setDirection] = useState<'next' | 'prev'>('next')\n\n // Load reviews\n useEffect(() => {\n async function loadReviews() {\n setIsLoading(true)\n const data = await fetchReviews({\n service,\n limit: maxReviews,\n featured: featuredOnly,\n })\n setReviews(data)\n setIsLoading(false)\n }\n loadReviews()\n }, [service, maxReviews, featuredOnly])\n\n // Auto-rotate\n useEffect(() => {\n if (!autoplay || reviews.length <= 1) return\n\n const interval = setInterval(() => {\n setDirection('next')\n setCurrentIndex((prev) => (prev + 1) % reviews.length)\n }, autoplayInterval)\n\n return () => clearInterval(interval)\n }, [autoplay, autoplayInterval, reviews.length])\n\n const goToSlide = useCallback((index: number) => {\n setDirection(index > currentIndex ? 'next' : 'prev')\n setCurrentIndex(index)\n }, [currentIndex])\n\n const nextSlide = useCallback(() => {\n setDirection('next')\n setCurrentIndex((prev) => (prev + 1) % reviews.length)\n }, [reviews.length])\n\n const prevSlide = useCallback(() => {\n setDirection('prev')\n setCurrentIndex((prev) => (prev - 1 + reviews.length) % reviews.length)\n }, [reviews.length])\n\n if (isLoading) {\n return null // Let site handle loading state\n }\n\n if (!reviews.length) {\n return null\n }\n\n const currentReview = reviews[currentIndex]\n\n return (\n <section className={`testimonial-section ${className}`} data-site-kit-testimonials>\n <style>{`\n .testimonial-section {\n position: relative;\n padding: 4rem 1rem;\n }\n \n .testimonial-content {\n position: relative;\n overflow: hidden;\n }\n \n .testimonial-slide {\n animation: ${direction === 'next' ? 'slideInRight' : 'slideInLeft'} 0.6s cubic-bezier(0.4, 0, 0.2, 1);\n }\n \n @keyframes slideInRight {\n from {\n opacity: 0;\n transform: translateX(50px);\n }\n to {\n opacity: 1;\n transform: translateX(0);\n }\n }\n \n @keyframes slideInLeft {\n from {\n opacity: 0;\n transform: translateX(-50px);\n }\n to {\n opacity: 1;\n transform: translateX(0);\n }\n }\n \n .testimonial-quote-icon {\n font-size: 4rem;\n line-height: 1;\n text-align: center;\n margin-bottom: 1.5rem;\n opacity: 0.15;\n }\n \n .testimonial-stars {\n display: flex;\n justify-content: center;\n gap: 0.25rem;\n margin-bottom: 1.5rem;\n }\n \n .testimonial-quote {\n text-align: center;\n font-size: 1.25rem;\n line-height: 1.8;\n margin-bottom: 2rem;\n }\n \n .testimonial-author {\n display: flex;\n flex-direction: column;\n align-items: center;\n gap: 1rem;\n }\n \n .testimonial-avatar {\n width: 4rem;\n height: 4rem;\n border-radius: 50%;\n display: flex;\n align-items: center;\n justify-content: center;\n font-size: 1.5rem;\n }\n \n .testimonial-name {\n font-weight: 600;\n font-size: 1.125rem;\n }\n \n .testimonial-role {\n font-size: 0.875rem;\n opacity: 0.7;\n }\n \n .testimonial-nav {\n display: flex;\n align-items: center;\n justify-content: center;\n gap: 1.5rem;\n margin-top: 2rem;\n }\n \n .testimonial-nav-button {\n border: none;\n background: none;\n cursor: pointer;\n padding: 0.5rem;\n transition: opacity 0.2s;\n font-size: 1.5rem;\n }\n \n .testimonial-nav-button:hover {\n opacity: 0.7;\n }\n \n .testimonial-nav-button:disabled {\n opacity: 0.3;\n cursor: not-allowed;\n }\n `}</style>\n\n <div className=\"container\">\n {title && <h2 className=\"testimonial-title\">{title}</h2>}\n {subtitle && <p className=\"testimonial-subtitle\">{subtitle}</p>}\n\n <div className=\"testimonial-content\">\n <div className=\"testimonial-slide\" key={currentIndex}>\n {/* Quote Icon - site can style this */}\n <div className=\"testimonial-quote-icon\">&ldquo;</div>\n\n {/* Stars */}\n {showRating && (\n <div className=\"testimonial-stars\">\n {[...Array(5)].map((_, i) => (\n <span\n key={i}\n className={`star ${i < currentReview.rating ? 'star-filled' : 'star-empty'}`}\n aria-hidden=\"true\"\n >\n ★\n </span>\n ))}\n </div>\n )}\n\n {/* Quote Text */}\n <blockquote className=\"testimonial-quote\">\n &ldquo;{currentReview.quote}&rdquo;\n </blockquote>\n\n {/* Author */}\n <div className=\"testimonial-author\">\n <div className=\"testimonial-avatar\" aria-hidden=\"true\">\n {currentReview.image ? (\n <img src={currentReview.image} alt=\"\" />\n ) : (\n <span>👤</span>\n )}\n </div>\n <div className=\"testimonial-author-info\">\n <div className=\"testimonial-name\">{currentReview.name}</div>\n {currentReview.role && (\n <div className=\"testimonial-role\">{currentReview.role}</div>\n )}\n </div>\n </div>\n </div>\n </div>\n\n {/* Navigation */}\n {reviews.length > 1 && (\n <div className=\"testimonial-nav\">\n <button\n onClick={prevSlide}\n className=\"testimonial-nav-button testimonial-nav-prev\"\n aria-label=\"Previous review\"\n disabled={reviews.length <= 1}\n >\n ‹\n </button>\n\n <button\n onClick={nextSlide}\n className=\"testimonial-nav-button testimonial-nav-next\"\n aria-label=\"Next review\"\n disabled={reviews.length <= 1}\n >\n ›\n </button>\n </div>\n )}\n </div>\n </section>\n )\n}\n"]}
@@ -1,6 +1,6 @@
1
- import { C as CommerceOffering, a as CommerceVariant, b as CheckoutResult, S as SizeChart$1, c as CommerceSchedule } from '../types-B0xmgGw-.mjs';
2
- export { o as AdditionalField, A as AdditionalFieldOption, g as Cart, f as CartItem, h as CheckoutCustomer, n as CheckoutFormProps, p as CommerceApiConfig, e as CommerceCategory, m as EventEmbedProps, E as EventTileProps, q as FetchEventsOptions, F as FetchOfferingsOptions, i as OfferingCardProps, k as OfferingDetailProps, j as OfferingListProps, d as OfferingStatus, O as OfferingType, P as PriceType, l as ProductEmbedProps, R as RegistrationFormProps, U as UpcomingEventsProps } from '../types-B0xmgGw-.mjs';
3
- export { A as CalendarView, x as CheckoutForm, s as CheckoutLineItem, C as CreateCheckoutOptions, D as DiscountValidationResult, F as EventCalendar, y as EventCheckout, z as EventCheckoutProps, w as EventEmbed, B as EventModal, E as EventTile, O as OfferingCard, t as OfferingList, P as ProcessorConfig, u as ProductEmbed, R as RegistrationForm, S as ShippingAddress, q as ShippingRate, U as UpcomingEvents, V as ValidateAddressResult, l as createCheckoutSession, m as createPaymentIntent, n as fetchActiveProcessor, g as fetchCategories, b as fetchLatestOffering, j as fetchNextEvent, a as fetchOffering, f as fetchOfferings, o as fetchProcessorConfig, e as fetchProductBySlug, c as fetchProducts, d as fetchProductsPublic, h as fetchServices, k as fetchShippingRates, i as fetchUpcomingEvents, I as formatDate, L as formatDateRange, J as formatDateTime, H as formatPrice, K as formatTime, T as getOfferingUrl, M as getRelativeTimeUntil, N as getSpotsRemaining, Q as isEventSoldOut, r as registerForEvent, G as useEventModal, v as validateAddress, p as validateDiscountCode } from '../useEventModal-4W_y1SYY.mjs';
1
+ import { C as CommerceOffering, b as CommerceVariant, f as CheckoutResult, S as SizeChart$1, c as CommerceSchedule } from '../types-iZM4Lz71.mjs';
2
+ export { o as AdditionalField, A as AdditionalFieldOption, d as Cart, e as CartItem, h as CheckoutCustomer, n as CheckoutFormProps, p as CommerceApiConfig, a as CommerceCategory, m as EventEmbedProps, E as EventTileProps, q as FetchEventsOptions, F as FetchOfferingsOptions, i as OfferingCardProps, k as OfferingDetailProps, j as OfferingListProps, g as OfferingStatus, O as OfferingType, P as PriceType, l as ProductEmbedProps, R as RegistrationFormProps, U as UpcomingEventsProps } from '../types-iZM4Lz71.mjs';
3
+ export { d as CalendarView, C as CheckoutForm, t as CheckoutLineItem, I as CreateCheckoutOptions, K as DiscountValidationResult, f as EventCalendar, c as EventCheckout, s as EventCheckoutProps, b as EventEmbed, e as EventModal, E as EventTile, O as OfferingCard, a as OfferingList, J as ProcessorConfig, P as ProductEmbed, R as RegistrationForm, S as ShippingAddress, H as ShippingRate, U as UpcomingEvents, V as ValidateAddressResult, m as createCheckoutSession, B as createPaymentIntent, D as fetchActiveProcessor, y as fetchCategories, v as fetchLatestOffering, l as fetchNextEvent, h as fetchOffering, g as fetchOfferings, F as fetchProcessorConfig, x as fetchProductBySlug, i as fetchProducts, w as fetchProductsPublic, j as fetchServices, z as fetchShippingRates, k as fetchUpcomingEvents, o as formatDate, M as formatDateRange, p as formatDateTime, n as formatPrice, L as formatTime, q as getOfferingUrl, N as getRelativeTimeUntil, Q as getSpotsRemaining, T as isEventSoldOut, r as registerForEvent, u as useEventModal, A as validateAddress, G as validateDiscountCode } from '../useEventModal-qJfX_1XG.mjs';
4
4
  import * as react_jsx_runtime from 'react/jsx-runtime';
5
5
  import React__default from 'react';
6
6
 
@@ -1,6 +1,6 @@
1
- import { C as CommerceOffering, a as CommerceVariant, b as CheckoutResult, S as SizeChart$1, c as CommerceSchedule } from '../types-B0xmgGw-.js';
2
- export { o as AdditionalField, A as AdditionalFieldOption, g as Cart, f as CartItem, h as CheckoutCustomer, n as CheckoutFormProps, p as CommerceApiConfig, e as CommerceCategory, m as EventEmbedProps, E as EventTileProps, q as FetchEventsOptions, F as FetchOfferingsOptions, i as OfferingCardProps, k as OfferingDetailProps, j as OfferingListProps, d as OfferingStatus, O as OfferingType, P as PriceType, l as ProductEmbedProps, R as RegistrationFormProps, U as UpcomingEventsProps } from '../types-B0xmgGw-.js';
3
- export { A as CalendarView, x as CheckoutForm, s as CheckoutLineItem, C as CreateCheckoutOptions, D as DiscountValidationResult, F as EventCalendar, y as EventCheckout, z as EventCheckoutProps, w as EventEmbed, B as EventModal, E as EventTile, O as OfferingCard, t as OfferingList, P as ProcessorConfig, u as ProductEmbed, R as RegistrationForm, S as ShippingAddress, q as ShippingRate, U as UpcomingEvents, V as ValidateAddressResult, l as createCheckoutSession, m as createPaymentIntent, n as fetchActiveProcessor, g as fetchCategories, b as fetchLatestOffering, j as fetchNextEvent, a as fetchOffering, f as fetchOfferings, o as fetchProcessorConfig, e as fetchProductBySlug, c as fetchProducts, d as fetchProductsPublic, h as fetchServices, k as fetchShippingRates, i as fetchUpcomingEvents, I as formatDate, L as formatDateRange, J as formatDateTime, H as formatPrice, K as formatTime, T as getOfferingUrl, M as getRelativeTimeUntil, N as getSpotsRemaining, Q as isEventSoldOut, r as registerForEvent, G as useEventModal, v as validateAddress, p as validateDiscountCode } from '../useEventModal-CJLCmH5Y.js';
1
+ import { C as CommerceOffering, b as CommerceVariant, f as CheckoutResult, S as SizeChart$1, c as CommerceSchedule } from '../types-iZM4Lz71.js';
2
+ export { o as AdditionalField, A as AdditionalFieldOption, d as Cart, e as CartItem, h as CheckoutCustomer, n as CheckoutFormProps, p as CommerceApiConfig, a as CommerceCategory, m as EventEmbedProps, E as EventTileProps, q as FetchEventsOptions, F as FetchOfferingsOptions, i as OfferingCardProps, k as OfferingDetailProps, j as OfferingListProps, g as OfferingStatus, O as OfferingType, P as PriceType, l as ProductEmbedProps, R as RegistrationFormProps, U as UpcomingEventsProps } from '../types-iZM4Lz71.js';
3
+ export { d as CalendarView, C as CheckoutForm, t as CheckoutLineItem, I as CreateCheckoutOptions, K as DiscountValidationResult, f as EventCalendar, c as EventCheckout, s as EventCheckoutProps, b as EventEmbed, e as EventModal, E as EventTile, O as OfferingCard, a as OfferingList, J as ProcessorConfig, P as ProductEmbed, R as RegistrationForm, S as ShippingAddress, H as ShippingRate, U as UpcomingEvents, V as ValidateAddressResult, m as createCheckoutSession, B as createPaymentIntent, D as fetchActiveProcessor, y as fetchCategories, v as fetchLatestOffering, l as fetchNextEvent, h as fetchOffering, g as fetchOfferings, F as fetchProcessorConfig, x as fetchProductBySlug, i as fetchProducts, w as fetchProductsPublic, j as fetchServices, z as fetchShippingRates, k as fetchUpcomingEvents, o as formatDate, M as formatDateRange, p as formatDateTime, n as formatPrice, L as formatTime, q as getOfferingUrl, N as getRelativeTimeUntil, Q as getSpotsRemaining, T as isEventSoldOut, r as registerForEvent, u as useEventModal, A as validateAddress, G as validateDiscountCode } from '../useEventModal-CcxNZOvp.js';
4
4
  import * as react_jsx_runtime from 'react/jsx-runtime';
5
5
  import React__default from 'react';
6
6
 
@@ -1,4 +1,4 @@
1
- import { O as OfferingType, C as CommerceOffering } from '../types-B0xmgGw-.mjs';
1
+ import { O as OfferingType, C as CommerceOffering } from '../types-iZM4Lz71.mjs';
2
2
 
3
3
  /**
4
4
  * @sonordev/site-kit/commerce - Server-side utilities
@@ -1,4 +1,4 @@
1
- import { O as OfferingType, C as CommerceOffering } from '../types-B0xmgGw-.js';
1
+ import { O as OfferingType, C as CommerceOffering } from '../types-iZM4Lz71.js';
2
2
 
3
3
  /**
4
4
  * @sonordev/site-kit/commerce - Server-side utilities
package/dist/index.d.mts CHANGED
@@ -3,14 +3,16 @@ export { c as AnalyticsConfig, b as AnalyticsEvent, P as PageView } from './type
3
3
  export { C as ChatConfig, c as EngageElement, d as WidgetConfig } from './types-BnCwwUX3.mjs';
4
4
  export { a as FormField, F as FormSubmission, M as ManagedFormConfig } from './types-0dmq3k20.mjs';
5
5
  export { a as BlogAuthor, b as BlogCategory, B as BlogPostType } from './types-5P5B9RgV.mjs';
6
- export { g as Cart, f as CartItem, e as CommerceCategory, C as CommerceOffering, c as CommerceSchedule, a as CommerceVariant, O as OfferingType } from './types-B0xmgGw-.mjs';
7
- export { A as CalendarView, x as CheckoutForm, s as CheckoutLineItem, F as EventCalendar, y as EventCheckout, z as EventCheckoutProps, w as EventEmbed, B as EventModal, E as EventTile, O as OfferingCard, t as OfferingList, u as ProductEmbed, R as RegistrationForm, U as UpcomingEvents, l as createCheckoutSession, j as fetchNextEvent, a as fetchOffering, f as fetchOfferings, c as fetchProducts, h as fetchServices, i as fetchUpcomingEvents, I as formatDate, J as formatDateTime, H as formatPrice, T as getOfferingUrl, r as registerForEvent, G as useEventModal } from './useEventModal-4W_y1SYY.mjs';
6
+ export { d as Cart, e as CartItem, a as CommerceCategory, C as CommerceOffering, c as CommerceSchedule, b as CommerceVariant, O as OfferingType } from './types-iZM4Lz71.mjs';
7
+ export { d as CalendarView, C as CheckoutForm, t as CheckoutLineItem, f as EventCalendar, c as EventCheckout, s as EventCheckoutProps, b as EventEmbed, e as EventModal, E as EventTile, O as OfferingCard, a as OfferingList, P as ProductEmbed, R as RegistrationForm, U as UpcomingEvents, m as createCheckoutSession, l as fetchNextEvent, h as fetchOffering, g as fetchOfferings, i as fetchProducts, j as fetchServices, k as fetchUpcomingEvents, o as formatDate, p as formatDateTime, n as formatPrice, q as getOfferingUrl, r as registerForEvent, u as useEventModal } from './useEventModal-qJfX_1XG.mjs';
8
8
  import * as react_jsx_runtime from 'react/jsx-runtime';
9
9
  import React__default from 'react';
10
10
  export { RedirectConfig, RedirectRule, clearRedirectCache, fetchRedirectRules, generateNextRedirects, handleManagedRedirects } from './redirects/index.mjs';
11
11
  export { g as ImageApiConfig, I as ImageFile, M as ManagedImage, b as ManagedImageData, a as ManagedImageProps, d as assignImageToSlot, e as clearImageSlot, f as fetchManagedImage, c as fetchManagedImages, l as listImageFiles, u as uploadImage } from './api-DTKSHh_w.mjs';
12
12
  export { EngageOverride, ExperimentAssignment, ExperimentConfig, ExperimentConversion, ExperimentVariant, MetaOverride, PriceOverride, SignalBridge, SignalBridgeProps, SignalConfig, SignalContextValue, SignalEvent, SignalExperiment, SignalOutcome, useExperimentVariant, useSignal, useSignalConfig, useSignalEvent, useSignalExperiment, useSignalOutcome } from './signal/index.mjs';
13
- export { Review, ReviewStats, TestimonialSection, TestimonialSectionProps, fetchReviewStats, fetchReviews } from './reputation/index.mjs';
13
+ export { TestimonialSection } from './reputation/index.mjs';
14
+ export { Review, ReviewStats, TestimonialSectionProps, fetchReviewStats, fetchReviews } from './reputation/server.mjs';
15
+ export { BookingResult, BookingType, BookingWidget, BookingWidgetProps, GuestInfo, Host, SlotHold, SyncWidgetConfig, TimeSlot, createBooking, createSlotHold, detectTimezone, fetchAvailability, fetchAvailableDates, fetchBookingTypeDetails, fetchBookingTypes, formatDate as formatBookingDate, formatTime as formatBookingTime, formatDuration, releaseSlotHold } from './sync/index.mjs';
14
16
  import 'next';
15
17
  import 'next/server';
16
18
 
@@ -220,191 +222,4 @@ interface AffiliatesWidgetProps {
220
222
  */
221
223
  declare function AffiliatesWidget({ className, loadingComponent, emptyComponent, errorComponent, showOffers, renderAffiliate, limit, }: AffiliatesWidgetProps): string | number | bigint | true | Iterable<React__default.ReactNode> | Promise<string | number | bigint | boolean | React__default.ReactPortal | React__default.ReactElement<unknown, string | React__default.JSXElementConstructor<any>> | Iterable<React__default.ReactNode> | null | undefined> | react_jsx_runtime.JSX.Element | null;
222
224
 
223
- /**
224
- * Sync Module Types - Booking Widget for Client Sites
225
- */
226
- interface BookingType {
227
- id: string;
228
- slug: string;
229
- name: string;
230
- description?: string;
231
- duration_minutes: number;
232
- buffer_before?: number;
233
- buffer_after?: number;
234
- color?: string;
235
- location_type: 'video' | 'phone' | 'in_person' | 'custom';
236
- location_details?: string;
237
- price_cents?: number;
238
- currency?: string;
239
- is_active: boolean;
240
- }
241
- interface TimeSlot {
242
- start: string;
243
- end: string;
244
- hostId?: string;
245
- available: boolean;
246
- }
247
- interface Host {
248
- id: string;
249
- name: string;
250
- email?: string;
251
- avatar?: string;
252
- title?: string;
253
- bio?: string;
254
- }
255
- interface SlotHold {
256
- holdId: string;
257
- expiresAt: string;
258
- expiresInSeconds: number;
259
- }
260
- interface BookingResult {
261
- success: boolean;
262
- booking: {
263
- id: string;
264
- confirmationCode: string;
265
- scheduledAt: string;
266
- durationMinutes: number;
267
- hostName?: string;
268
- timezone: string;
269
- };
270
- cancelUrl: string;
271
- rescheduleUrl: string;
272
- calendarLinks: {
273
- google: string;
274
- outlook: string;
275
- ics: string;
276
- };
277
- }
278
- interface BookingWidgetProps {
279
- /** Organization slug – required for public (unauthenticated) mode, optional with apiKey */
280
- orgSlug?: string;
281
- /** API key – when provided, uses authenticated /sync/widget/* endpoints (no orgSlug needed) */
282
- apiKey?: string;
283
- /** API base URL - defaults to https://api.sonor.io */
284
- apiUrl?: string;
285
- /** Specific booking type slug to show (optional - shows all if not provided) */
286
- bookingTypeSlug?: string;
287
- /** Guest's timezone (auto-detected if not provided) */
288
- timezone?: string;
289
- /** Custom class name for styling */
290
- className?: string;
291
- /** Number of days to show availability for */
292
- daysToShow?: number;
293
- /** Called when booking is completed */
294
- onBookingComplete?: (result: BookingResult) => void;
295
- /** Called when an error occurs */
296
- onError?: (error: Error) => void;
297
- /** Hide the booking type selector (for single type embed) */
298
- hideTypeSelector?: boolean;
299
- /** Custom styles */
300
- styles?: {
301
- primaryColor?: string;
302
- borderRadius?: string;
303
- fontFamily?: string;
304
- /** Dark mode colors */
305
- backgroundColor?: string;
306
- surfaceColor?: string;
307
- elevatedColor?: string;
308
- textPrimary?: string;
309
- textSecondary?: string;
310
- textTertiary?: string;
311
- borderColor?: string;
312
- inputBorderColor?: string;
313
- };
314
- }
315
- interface GuestInfo {
316
- name: string;
317
- email: string;
318
- phone?: string;
319
- notes?: string;
320
- }
321
- interface SyncWidgetConfig {
322
- apiUrl: string;
323
- orgSlug: string;
324
- timezone: string;
325
- }
326
-
327
- declare function BookingWidget({ orgSlug, apiKey: propApiKey, apiUrl: propApiUrl, bookingTypeSlug, timezone: propTimezone, className, daysToShow, onBookingComplete, onError, hideTypeSelector, styles, }: BookingWidgetProps): react_jsx_runtime.JSX.Element;
328
-
329
- /**
330
- * Sync API Functions - Client-side API calls for booking widget
331
- *
332
- * Two modes:
333
- * 1. API-key flow (preferred): Uses x-api-key header → /sync/widget/* endpoints.
334
- * Project is resolved server-side from the key. No orgSlug needed.
335
- * 2. Public/orgSlug flow (legacy): Uses /sync/public/:org/* endpoints. No auth.
336
- */
337
-
338
- /**
339
- * Fetch booking types.
340
- * - With apiKey → GET /sync/widget/types
341
- * - With orgSlug → GET /sync/public/:org/types
342
- */
343
- declare function fetchBookingTypes(orgSlug?: string, apiUrl?: string, apiKey?: string): Promise<BookingType[]>;
344
- /**
345
- * Fetch booking type details
346
- */
347
- declare function fetchBookingTypeDetails(typeSlug: string, orgSlug?: string, apiUrl?: string, apiKey?: string): Promise<BookingType>;
348
- /**
349
- * Fetch available time slots for a specific date
350
- */
351
- declare function fetchAvailability(typeSlug: string, date: string, // YYYY-MM-DD format
352
- orgSlug?: string, apiUrl?: string, apiKey?: string, timezone?: string, hostId?: string): Promise<TimeSlot[]>;
353
- /**
354
- * Hold a time slot temporarily (5-10 minutes)
355
- */
356
- declare function createSlotHold(holdData: {
357
- bookingType: string;
358
- slotStart: string;
359
- slotEnd: string;
360
- hostId: string;
361
- sessionId: string;
362
- guestEmail?: string;
363
- }, apiUrl?: string, apiKey?: string): Promise<SlotHold>;
364
- /**
365
- * Release a slot hold
366
- */
367
- declare function releaseSlotHold(holdId: string, apiUrl?: string, apiKey?: string): Promise<void>;
368
- /**
369
- * Create a booking
370
- */
371
- declare function createBooking(bookingData: {
372
- bookingType: string;
373
- scheduledAt: string;
374
- hostId: string;
375
- name: string;
376
- email: string;
377
- phone?: string;
378
- company?: string;
379
- message?: string;
380
- source: string;
381
- timezone?: string;
382
- holdId?: string;
383
- sessionId?: string;
384
- sourceUrl?: string;
385
- }, apiUrl?: string, apiKey?: string): Promise<BookingResult>;
386
- /**
387
- * Get available dates for a month (helper for calendar view)
388
- * Returns dates that have at least one available slot
389
- */
390
- declare function fetchAvailableDates(typeSlug: string, startDate: string, // YYYY-MM-DD
391
- endDate: string, // YYYY-MM-DD
392
- orgSlug?: string, apiUrl?: string, apiKey?: string, timezone?: string): Promise<string[]>;
393
- /**
394
- * Detect user's timezone
395
- */
396
- declare function detectTimezone(): string;
397
- /**
398
- * Format time for display
399
- */
400
- declare function formatTime(isoString: string, timezone: string): string;
401
- /**
402
- * Format date for display
403
- */
404
- declare function formatDate(isoString: string, timezone: string): string;
405
- /**
406
- * Format duration for display
407
- */
408
- declare function formatDuration(minutes: number): string;
409
-
410
- export { type Affiliate, AffiliateCard, type AffiliateCardProps, type AffiliateOffer, type AffiliateWithOffers, AffiliatesWidget, type AffiliatesWidgetProps, type BookingResult, type BookingType, BookingWidget, type BookingWidgetProps, type GuestInfo, type Host, type SiteKitConfig, type SlotHold, type SyncWidgetConfig, type TimeSlot, type UseAffiliatesResult, createBooking, createSlotHold, detectTimezone, fetchAffiliates, fetchAvailability, fetchAvailableDates, fetchBookingTypeDetails, fetchBookingTypes, formatDate as formatBookingDate, formatTime as formatBookingTime, formatDuration, getTrackingUrl, releaseSlotHold, useAffiliates };
225
+ export { type Affiliate, AffiliateCard, type AffiliateCardProps, type AffiliateOffer, type AffiliateWithOffers, AffiliatesWidget, type AffiliatesWidgetProps, type SiteKitConfig, type UseAffiliatesResult, fetchAffiliates, getTrackingUrl, useAffiliates };
package/dist/index.d.ts CHANGED
@@ -3,14 +3,16 @@ export { c as AnalyticsConfig, b as AnalyticsEvent, P as PageView } from './type
3
3
  export { C as ChatConfig, c as EngageElement, d as WidgetConfig } from './types-BnCwwUX3.js';
4
4
  export { a as FormField, F as FormSubmission, M as ManagedFormConfig } from './types-0dmq3k20.js';
5
5
  export { a as BlogAuthor, b as BlogCategory, B as BlogPostType } from './types-5P5B9RgV.js';
6
- export { g as Cart, f as CartItem, e as CommerceCategory, C as CommerceOffering, c as CommerceSchedule, a as CommerceVariant, O as OfferingType } from './types-B0xmgGw-.js';
7
- export { A as CalendarView, x as CheckoutForm, s as CheckoutLineItem, F as EventCalendar, y as EventCheckout, z as EventCheckoutProps, w as EventEmbed, B as EventModal, E as EventTile, O as OfferingCard, t as OfferingList, u as ProductEmbed, R as RegistrationForm, U as UpcomingEvents, l as createCheckoutSession, j as fetchNextEvent, a as fetchOffering, f as fetchOfferings, c as fetchProducts, h as fetchServices, i as fetchUpcomingEvents, I as formatDate, J as formatDateTime, H as formatPrice, T as getOfferingUrl, r as registerForEvent, G as useEventModal } from './useEventModal-CJLCmH5Y.js';
6
+ export { d as Cart, e as CartItem, a as CommerceCategory, C as CommerceOffering, c as CommerceSchedule, b as CommerceVariant, O as OfferingType } from './types-iZM4Lz71.js';
7
+ export { d as CalendarView, C as CheckoutForm, t as CheckoutLineItem, f as EventCalendar, c as EventCheckout, s as EventCheckoutProps, b as EventEmbed, e as EventModal, E as EventTile, O as OfferingCard, a as OfferingList, P as ProductEmbed, R as RegistrationForm, U as UpcomingEvents, m as createCheckoutSession, l as fetchNextEvent, h as fetchOffering, g as fetchOfferings, i as fetchProducts, j as fetchServices, k as fetchUpcomingEvents, o as formatDate, p as formatDateTime, n as formatPrice, q as getOfferingUrl, r as registerForEvent, u as useEventModal } from './useEventModal-CcxNZOvp.js';
8
8
  import * as react_jsx_runtime from 'react/jsx-runtime';
9
9
  import React__default from 'react';
10
10
  export { RedirectConfig, RedirectRule, clearRedirectCache, fetchRedirectRules, generateNextRedirects, handleManagedRedirects } from './redirects/index.js';
11
11
  export { g as ImageApiConfig, I as ImageFile, M as ManagedImage, b as ManagedImageData, a as ManagedImageProps, d as assignImageToSlot, e as clearImageSlot, f as fetchManagedImage, c as fetchManagedImages, l as listImageFiles, u as uploadImage } from './api-DTKSHh_w.js';
12
12
  export { EngageOverride, ExperimentAssignment, ExperimentConfig, ExperimentConversion, ExperimentVariant, MetaOverride, PriceOverride, SignalBridge, SignalBridgeProps, SignalConfig, SignalContextValue, SignalEvent, SignalExperiment, SignalOutcome, useExperimentVariant, useSignal, useSignalConfig, useSignalEvent, useSignalExperiment, useSignalOutcome } from './signal/index.js';
13
- export { Review, ReviewStats, TestimonialSection, TestimonialSectionProps, fetchReviewStats, fetchReviews } from './reputation/index.js';
13
+ export { TestimonialSection } from './reputation/index.js';
14
+ export { Review, ReviewStats, TestimonialSectionProps, fetchReviewStats, fetchReviews } from './reputation/server.js';
15
+ export { BookingResult, BookingType, BookingWidget, BookingWidgetProps, GuestInfo, Host, SlotHold, SyncWidgetConfig, TimeSlot, createBooking, createSlotHold, detectTimezone, fetchAvailability, fetchAvailableDates, fetchBookingTypeDetails, fetchBookingTypes, formatDate as formatBookingDate, formatTime as formatBookingTime, formatDuration, releaseSlotHold } from './sync/index.js';
14
16
  import 'next';
15
17
  import 'next/server';
16
18
 
@@ -220,191 +222,4 @@ interface AffiliatesWidgetProps {
220
222
  */
221
223
  declare function AffiliatesWidget({ className, loadingComponent, emptyComponent, errorComponent, showOffers, renderAffiliate, limit, }: AffiliatesWidgetProps): string | number | bigint | true | Iterable<React__default.ReactNode> | Promise<string | number | bigint | boolean | React__default.ReactPortal | React__default.ReactElement<unknown, string | React__default.JSXElementConstructor<any>> | Iterable<React__default.ReactNode> | null | undefined> | react_jsx_runtime.JSX.Element | null;
222
224
 
223
- /**
224
- * Sync Module Types - Booking Widget for Client Sites
225
- */
226
- interface BookingType {
227
- id: string;
228
- slug: string;
229
- name: string;
230
- description?: string;
231
- duration_minutes: number;
232
- buffer_before?: number;
233
- buffer_after?: number;
234
- color?: string;
235
- location_type: 'video' | 'phone' | 'in_person' | 'custom';
236
- location_details?: string;
237
- price_cents?: number;
238
- currency?: string;
239
- is_active: boolean;
240
- }
241
- interface TimeSlot {
242
- start: string;
243
- end: string;
244
- hostId?: string;
245
- available: boolean;
246
- }
247
- interface Host {
248
- id: string;
249
- name: string;
250
- email?: string;
251
- avatar?: string;
252
- title?: string;
253
- bio?: string;
254
- }
255
- interface SlotHold {
256
- holdId: string;
257
- expiresAt: string;
258
- expiresInSeconds: number;
259
- }
260
- interface BookingResult {
261
- success: boolean;
262
- booking: {
263
- id: string;
264
- confirmationCode: string;
265
- scheduledAt: string;
266
- durationMinutes: number;
267
- hostName?: string;
268
- timezone: string;
269
- };
270
- cancelUrl: string;
271
- rescheduleUrl: string;
272
- calendarLinks: {
273
- google: string;
274
- outlook: string;
275
- ics: string;
276
- };
277
- }
278
- interface BookingWidgetProps {
279
- /** Organization slug – required for public (unauthenticated) mode, optional with apiKey */
280
- orgSlug?: string;
281
- /** API key – when provided, uses authenticated /sync/widget/* endpoints (no orgSlug needed) */
282
- apiKey?: string;
283
- /** API base URL - defaults to https://api.sonor.io */
284
- apiUrl?: string;
285
- /** Specific booking type slug to show (optional - shows all if not provided) */
286
- bookingTypeSlug?: string;
287
- /** Guest's timezone (auto-detected if not provided) */
288
- timezone?: string;
289
- /** Custom class name for styling */
290
- className?: string;
291
- /** Number of days to show availability for */
292
- daysToShow?: number;
293
- /** Called when booking is completed */
294
- onBookingComplete?: (result: BookingResult) => void;
295
- /** Called when an error occurs */
296
- onError?: (error: Error) => void;
297
- /** Hide the booking type selector (for single type embed) */
298
- hideTypeSelector?: boolean;
299
- /** Custom styles */
300
- styles?: {
301
- primaryColor?: string;
302
- borderRadius?: string;
303
- fontFamily?: string;
304
- /** Dark mode colors */
305
- backgroundColor?: string;
306
- surfaceColor?: string;
307
- elevatedColor?: string;
308
- textPrimary?: string;
309
- textSecondary?: string;
310
- textTertiary?: string;
311
- borderColor?: string;
312
- inputBorderColor?: string;
313
- };
314
- }
315
- interface GuestInfo {
316
- name: string;
317
- email: string;
318
- phone?: string;
319
- notes?: string;
320
- }
321
- interface SyncWidgetConfig {
322
- apiUrl: string;
323
- orgSlug: string;
324
- timezone: string;
325
- }
326
-
327
- declare function BookingWidget({ orgSlug, apiKey: propApiKey, apiUrl: propApiUrl, bookingTypeSlug, timezone: propTimezone, className, daysToShow, onBookingComplete, onError, hideTypeSelector, styles, }: BookingWidgetProps): react_jsx_runtime.JSX.Element;
328
-
329
- /**
330
- * Sync API Functions - Client-side API calls for booking widget
331
- *
332
- * Two modes:
333
- * 1. API-key flow (preferred): Uses x-api-key header → /sync/widget/* endpoints.
334
- * Project is resolved server-side from the key. No orgSlug needed.
335
- * 2. Public/orgSlug flow (legacy): Uses /sync/public/:org/* endpoints. No auth.
336
- */
337
-
338
- /**
339
- * Fetch booking types.
340
- * - With apiKey → GET /sync/widget/types
341
- * - With orgSlug → GET /sync/public/:org/types
342
- */
343
- declare function fetchBookingTypes(orgSlug?: string, apiUrl?: string, apiKey?: string): Promise<BookingType[]>;
344
- /**
345
- * Fetch booking type details
346
- */
347
- declare function fetchBookingTypeDetails(typeSlug: string, orgSlug?: string, apiUrl?: string, apiKey?: string): Promise<BookingType>;
348
- /**
349
- * Fetch available time slots for a specific date
350
- */
351
- declare function fetchAvailability(typeSlug: string, date: string, // YYYY-MM-DD format
352
- orgSlug?: string, apiUrl?: string, apiKey?: string, timezone?: string, hostId?: string): Promise<TimeSlot[]>;
353
- /**
354
- * Hold a time slot temporarily (5-10 minutes)
355
- */
356
- declare function createSlotHold(holdData: {
357
- bookingType: string;
358
- slotStart: string;
359
- slotEnd: string;
360
- hostId: string;
361
- sessionId: string;
362
- guestEmail?: string;
363
- }, apiUrl?: string, apiKey?: string): Promise<SlotHold>;
364
- /**
365
- * Release a slot hold
366
- */
367
- declare function releaseSlotHold(holdId: string, apiUrl?: string, apiKey?: string): Promise<void>;
368
- /**
369
- * Create a booking
370
- */
371
- declare function createBooking(bookingData: {
372
- bookingType: string;
373
- scheduledAt: string;
374
- hostId: string;
375
- name: string;
376
- email: string;
377
- phone?: string;
378
- company?: string;
379
- message?: string;
380
- source: string;
381
- timezone?: string;
382
- holdId?: string;
383
- sessionId?: string;
384
- sourceUrl?: string;
385
- }, apiUrl?: string, apiKey?: string): Promise<BookingResult>;
386
- /**
387
- * Get available dates for a month (helper for calendar view)
388
- * Returns dates that have at least one available slot
389
- */
390
- declare function fetchAvailableDates(typeSlug: string, startDate: string, // YYYY-MM-DD
391
- endDate: string, // YYYY-MM-DD
392
- orgSlug?: string, apiUrl?: string, apiKey?: string, timezone?: string): Promise<string[]>;
393
- /**
394
- * Detect user's timezone
395
- */
396
- declare function detectTimezone(): string;
397
- /**
398
- * Format time for display
399
- */
400
- declare function formatTime(isoString: string, timezone: string): string;
401
- /**
402
- * Format date for display
403
- */
404
- declare function formatDate(isoString: string, timezone: string): string;
405
- /**
406
- * Format duration for display
407
- */
408
- declare function formatDuration(minutes: number): string;
409
-
410
- export { type Affiliate, AffiliateCard, type AffiliateCardProps, type AffiliateOffer, type AffiliateWithOffers, AffiliatesWidget, type AffiliatesWidgetProps, type BookingResult, type BookingType, BookingWidget, type BookingWidgetProps, type GuestInfo, type Host, type SiteKitConfig, type SlotHold, type SyncWidgetConfig, type TimeSlot, type UseAffiliatesResult, createBooking, createSlotHold, detectTimezone, fetchAffiliates, fetchAvailability, fetchAvailableDates, fetchBookingTypeDetails, fetchBookingTypes, formatDate as formatBookingDate, formatTime as formatBookingTime, formatDuration, getTrackingUrl, releaseSlotHold, useAffiliates };
225
+ export { type Affiliate, AffiliateCard, type AffiliateCardProps, type AffiliateOffer, type AffiliateWithOffers, AffiliatesWidget, type AffiliatesWidgetProps, type SiteKitConfig, type UseAffiliatesResult, fetchAffiliates, getTrackingUrl, useAffiliates };
package/dist/index.js CHANGED
@@ -1,12 +1,13 @@
1
1
  'use strict';
2
2
 
3
3
  var chunkW6K7MQCC_js = require('./chunk-W6K7MQCC.js');
4
+ require('./chunk-JP5WGL75.js');
4
5
  var chunkIFVMZFNT_js = require('./chunk-IFVMZFNT.js');
5
6
  require('./chunk-GCPPXUAI.js');
6
- var chunkEATGSR46_js = require('./chunk-EATGSR46.js');
7
- require('./chunk-JP5WGL75.js');
7
+ var chunkEHJANA5C_js = require('./chunk-EHJANA5C.js');
8
+ var chunkGSRT66PA_js = require('./chunk-GSRT66PA.js');
8
9
  var chunk4LC4KETS_js = require('./chunk-4LC4KETS.js');
9
- var chunkZQINTH5K_js = require('./chunk-ZQINTH5K.js');
10
+ var chunkI2GTT2DG_js = require('./chunk-I2GTT2DG.js');
10
11
  require('./chunk-LPSWITNZ.js');
11
12
  require('./chunk-SYNJOJTP.js');
12
13
  var chunkGQU4LXOP_js = require('./chunk-GQU4LXOP.js');
@@ -202,15 +203,15 @@ Object.defineProperty(exports, "uploadImage", {
202
203
  });
203
204
  Object.defineProperty(exports, "TestimonialSection", {
204
205
  enumerable: true,
205
- get: function () { return chunkEATGSR46_js.TestimonialSection; }
206
+ get: function () { return chunkEHJANA5C_js.TestimonialSection; }
206
207
  });
207
208
  Object.defineProperty(exports, "fetchReviewStats", {
208
209
  enumerable: true,
209
- get: function () { return chunkEATGSR46_js.fetchReviewStats; }
210
+ get: function () { return chunkGSRT66PA_js.fetchReviewStats; }
210
211
  });
211
212
  Object.defineProperty(exports, "fetchReviews", {
212
213
  enumerable: true,
213
- get: function () { return chunkEATGSR46_js.fetchReviews; }
214
+ get: function () { return chunkGSRT66PA_js.fetchReviews; }
214
215
  });
215
216
  Object.defineProperty(exports, "CalendarView", {
216
217
  enumerable: true,
@@ -314,51 +315,51 @@ Object.defineProperty(exports, "useEventModal", {
314
315
  });
315
316
  Object.defineProperty(exports, "BookingWidget", {
316
317
  enumerable: true,
317
- get: function () { return chunkZQINTH5K_js.BookingWidget; }
318
+ get: function () { return chunkI2GTT2DG_js.BookingWidget; }
318
319
  });
319
320
  Object.defineProperty(exports, "createBooking", {
320
321
  enumerable: true,
321
- get: function () { return chunkZQINTH5K_js.createBooking; }
322
+ get: function () { return chunkI2GTT2DG_js.createBooking; }
322
323
  });
323
324
  Object.defineProperty(exports, "createSlotHold", {
324
325
  enumerable: true,
325
- get: function () { return chunkZQINTH5K_js.createSlotHold; }
326
+ get: function () { return chunkI2GTT2DG_js.createSlotHold; }
326
327
  });
327
328
  Object.defineProperty(exports, "detectTimezone", {
328
329
  enumerable: true,
329
- get: function () { return chunkZQINTH5K_js.detectTimezone; }
330
+ get: function () { return chunkI2GTT2DG_js.detectTimezone; }
330
331
  });
331
332
  Object.defineProperty(exports, "fetchAvailability", {
332
333
  enumerable: true,
333
- get: function () { return chunkZQINTH5K_js.fetchAvailability; }
334
+ get: function () { return chunkI2GTT2DG_js.fetchAvailability; }
334
335
  });
335
336
  Object.defineProperty(exports, "fetchAvailableDates", {
336
337
  enumerable: true,
337
- get: function () { return chunkZQINTH5K_js.fetchAvailableDates; }
338
+ get: function () { return chunkI2GTT2DG_js.fetchAvailableDates; }
338
339
  });
339
340
  Object.defineProperty(exports, "fetchBookingTypeDetails", {
340
341
  enumerable: true,
341
- get: function () { return chunkZQINTH5K_js.fetchBookingTypeDetails; }
342
+ get: function () { return chunkI2GTT2DG_js.fetchBookingTypeDetails; }
342
343
  });
343
344
  Object.defineProperty(exports, "fetchBookingTypes", {
344
345
  enumerable: true,
345
- get: function () { return chunkZQINTH5K_js.fetchBookingTypes; }
346
+ get: function () { return chunkI2GTT2DG_js.fetchBookingTypes; }
346
347
  });
347
348
  Object.defineProperty(exports, "formatBookingDate", {
348
349
  enumerable: true,
349
- get: function () { return chunkZQINTH5K_js.formatDate; }
350
+ get: function () { return chunkI2GTT2DG_js.formatDate; }
350
351
  });
351
352
  Object.defineProperty(exports, "formatBookingTime", {
352
353
  enumerable: true,
353
- get: function () { return chunkZQINTH5K_js.formatTime; }
354
+ get: function () { return chunkI2GTT2DG_js.formatTime; }
354
355
  });
355
356
  Object.defineProperty(exports, "formatDuration", {
356
357
  enumerable: true,
357
- get: function () { return chunkZQINTH5K_js.formatDuration; }
358
+ get: function () { return chunkI2GTT2DG_js.formatDuration; }
358
359
  });
359
360
  Object.defineProperty(exports, "releaseSlotHold", {
360
361
  enumerable: true,
361
- get: function () { return chunkZQINTH5K_js.releaseSlotHold; }
362
+ get: function () { return chunkI2GTT2DG_js.releaseSlotHold; }
362
363
  });
363
364
  Object.defineProperty(exports, "ExperimentConversion", {
364
365
  enumerable: true,