@nylas/web-elements 2.3.0 → 2.3.1-canary-20260108155205

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 (64) hide show
  1. package/dist/cdn/nylas-scheduler-editor/nylas-scheduler-editor.es.js +1 -1
  2. package/dist/cdn/nylas-scheduling/nylas-scheduling.es.js +4941 -4925
  3. package/dist/cjs/google-logo-icon_6.cjs.entry.js +1 -1
  4. package/dist/cjs/loader.cjs.js +1 -1
  5. package/dist/cjs/nylas-booked-event-card_11.cjs.entry.js +8 -0
  6. package/dist/cjs/nylas-booked-event-card_11.cjs.entry.js.map +1 -1
  7. package/dist/cjs/nylas-scheduler-editor.cjs.entry.js +1 -1
  8. package/dist/cjs/nylas-scheduling.cjs.entry.js +16 -3
  9. package/dist/cjs/nylas-scheduling.cjs.entry.js.map +1 -1
  10. package/dist/cjs/nylas-scheduling.entry.cjs.js.map +1 -1
  11. package/dist/cjs/nylas-web-elements.cjs.js +1 -1
  12. package/dist/cjs/{version-DOUE1CF3.js → version-BIKhGgjH.js} +3 -3
  13. package/dist/cjs/{version-DOUE1CF3.js.map → version-BIKhGgjH.js.map} +1 -1
  14. package/dist/collection/components/scheduler/nylas-timeslot-picker/nylas-timeslot-picker.js +10 -0
  15. package/dist/collection/components/scheduler/nylas-timeslot-picker/nylas-timeslot-picker.js.map +1 -1
  16. package/dist/collection/connector/shared/api/scheduler.js +18 -2
  17. package/dist/collection/connector/shared/api/scheduler.js.map +1 -1
  18. package/dist/collection/version.js +1 -1
  19. package/dist/collection/version.js.map +1 -1
  20. package/dist/components/nylas-editor-tabs-group.js +1 -1
  21. package/dist/components/nylas-editor-tabs.js +1 -1
  22. package/dist/components/nylas-scheduler-editor.js +3 -3
  23. package/dist/components/nylas-scheduling.js +18 -5
  24. package/dist/components/nylas-scheduling.js.map +1 -1
  25. package/dist/components/nylas-timeslot-picker.js +1 -1
  26. package/dist/components/{p-Yb-Jmnhb.js → p-CUriRAxu.js} +3 -3
  27. package/dist/components/{p-Yb-Jmnhb.js.map → p-CUriRAxu.js.map} +1 -1
  28. package/dist/components/{p-ne-_OsQh.js → p-D_fU0kvl.js} +11 -2
  29. package/dist/components/p-D_fU0kvl.js.map +1 -0
  30. package/dist/components/{p-OF14LJnh.js → p-DkfG_oE2.js} +3 -3
  31. package/dist/components/{p-OF14LJnh.js.map → p-DkfG_oE2.js.map} +1 -1
  32. package/dist/components/{p-rnP3lTjZ.js → p-DzM_DEIH.js} +3 -3
  33. package/dist/components/{p-rnP3lTjZ.js.map → p-DzM_DEIH.js.map} +1 -1
  34. package/dist/esm/google-logo-icon_6.entry.js +1 -1
  35. package/dist/esm/loader.js +1 -1
  36. package/dist/esm/nylas-booked-event-card_11.entry.js +8 -0
  37. package/dist/esm/nylas-booked-event-card_11.entry.js.map +1 -1
  38. package/dist/esm/nylas-scheduler-editor.entry.js +1 -1
  39. package/dist/esm/nylas-scheduling.entry.js +17 -4
  40. package/dist/esm/nylas-scheduling.entry.js.map +1 -1
  41. package/dist/esm/nylas-web-elements.js +1 -1
  42. package/dist/esm/{version-Vj35JRt4.js → version-CXFvcHg5.js} +3 -3
  43. package/dist/esm/{version-Vj35JRt4.js.map → version-CXFvcHg5.js.map} +1 -1
  44. package/dist/nylas-web-elements/nylas-scheduling.entry.esm.js.map +1 -1
  45. package/dist/nylas-web-elements/nylas-web-elements.esm.js +1 -1
  46. package/dist/nylas-web-elements/{p-2f3336a6.entry.js → p-15e67701.entry.js} +2 -2
  47. package/dist/nylas-web-elements/p-3a989daf.entry.js +2 -0
  48. package/dist/nylas-web-elements/p-3a989daf.entry.js.map +1 -0
  49. package/dist/nylas-web-elements/{p-5ae85f94.entry.js → p-544c4297.entry.js} +2 -2
  50. package/dist/nylas-web-elements/p-544c4297.entry.js.map +1 -0
  51. package/dist/nylas-web-elements/{p-5eb93f5b.entry.js → p-60fb00a8.entry.js} +2 -2
  52. package/dist/nylas-web-elements/p-CXFvcHg5.js +2 -0
  53. package/dist/nylas-web-elements/{p-Vj35JRt4.js.map → p-CXFvcHg5.js.map} +1 -1
  54. package/dist/types/components/scheduler/nylas-timeslot-picker/nylas-timeslot-picker.d.ts +1 -0
  55. package/dist/types/connector/shared/api/scheduler.d.ts +1 -1
  56. package/dist/types/version.d.ts +1 -1
  57. package/package.json +1 -1
  58. package/dist/components/p-ne-_OsQh.js.map +0 -1
  59. package/dist/nylas-web-elements/p-5ae85f94.entry.js.map +0 -1
  60. package/dist/nylas-web-elements/p-Vj35JRt4.js +0 -2
  61. package/dist/nylas-web-elements/p-f32db1ab.entry.js +0 -2
  62. package/dist/nylas-web-elements/p-f32db1ab.entry.js.map +0 -1
  63. /package/dist/nylas-web-elements/{p-2f3336a6.entry.js.map → p-15e67701.entry.js.map} +0 -0
  64. /package/dist/nylas-web-elements/{p-5eb93f5b.entry.js.map → p-60fb00a8.entry.js.map} +0 -0
@@ -1 +0,0 @@
1
- {"version":3,"names":["nylasBookedEventCardCss","NylasBookedEventCard","constructor","hostRef","this","selectedTimezone","Intl","DateTimeFormat","resolvedOptions","timeZone","selectedLanguage","navigator","language","startTime","endTime","handleCancelBookingButtonClicked","Date","selectedTimeslot","start_time","minCancellationNotice","configSettings","scheduler","min_cancellation_notice","cancelBookingButtonClicked","emit","bookingId","eventInfo","booking_id","dateTillCancellation","getTime","cancelBookedEventValidationError","error","title","message","handleRescheduleButtonClicked","errorHandler","rescheduleBookedEventError","rescheduleButtonClicked","getPaticipantType","type","themeConfigChanged","newThemeConfig","applyThemeConfig","selectedLanguageChangedHandler","newVal","oldVal","i18next","changeLanguage","connectedCallback","queueMicrotask","themeConfig","host","setAttribute","disconnectedCallback","componentWillLoad","debug","componentDidLoad","bookingInfo","locale","LANGUAGE_CODE_TO_LOCALE_MAP","timeFormat","hour","minute","hour12","format","end_time","key","value","Object","entries","style","setProperty","render","bookingType","booking_type","isManualConfirmation","h","Host","part","class","TIMEZONE_MAP","slot","rescheduleBookingId","isLoading","t","capitalizeFirstLetter","formatBookedEventDate","footer","hide_cancellation_options","hide_rescheduling_options","variant","onClick","disabled","__decorate","RegisterComponent","name","stateToProps","Map","eventToProps","async","event","nylasSchedulerConnector","setCancel","detail","result","setReschedule","_nylasSchedulerConnector","fireRegisterEvent","prototype","nylasBookingFormCss","emailRegex","NylasBookingForm","email","guestEmails","guestEmailErrors","isNameValid","isEmailValid","additionalFields","namePatternError","nameRequiredError","emailPatternError","emailRequiredError","validationError","backButtonLoading","firstRender","handleGuestChange","guestIndex","resetGuestEmailError","guests","sanitizeHtml","handleGuestBlur","field","test","addGuestButtonClickedHandler","e","preventDefault","removeGuestButtonClickHandler","splice","handleBackButtonClicked","backButtonClicked","bookButtonClickedHandler","formSubmittedEvent","bookingFormSubmitted","defaultPrevented","bookingFormError","description","length","hasError","forEach","i","map","trim","bookingInfoAdditionalFields","configAdditionalFields","additional_fields","configSettingsBookingAdditionalFields","booking","obj","default","detailsConfirmed","primaryParticipant","updateAdditionalFields","configSettingsChangedHandler","bookingInfoChangedHandler","componentDidRender","newValue","Array","isArray","guest","additional_guests","iterateFormComponents","form","formRef","customComponentsList","customComponents","traverseElements","element","from","children","child","tagName","toLowerCase","includes","push","component","shadowRoot","changeName","sanitize","nameChanged","changeEmail","emailChanged","errors","nylasFormInputChangedHandler","selectOptionChangedHandler","selecedOptionsChangedHandler","values","toString","switchToggledHandler","checked","checkboxToggledHandler","radioChangedHandler","dropdownDefaultSelectedHandler","isGroupEvent","event_id","capacity","showConsentMessage","notetaker_settings","show_ui_consent_message","onSubmit","ref","el","noValidate","label","id","defaultValue","placeholder","readOnly","nameReadOnly","required","requiredError","patternError","pattern","emailReadOnly","hide_additional_guests","index","maxLength","onBlur","target","onInput","tooltip","sort","a","b","order","x","fieldReadOnly","withSearch","emptyValue","defaultSelectedOption","undefined","options","option","errorMessage","exportparts","defaultSelectedValue","defaultValues","split","item","selectAtLeastOneOptionLabel","multipleOptionsSelectedLabel","selected","_event","toggleAdditionalData","setParticipantName","setParticipantEmail","nylasCancelBookingFormCss","NylasCancelBookingForm","cancellationReason","cancellationError","cancellationPolicy","cancellation_policy","handleGoBackClicked","goBackButtonClicked","handleSubmitCancelBooking","triggerValidation","cancelBookingFormError","cancelBookedEventError","cancelBookingId","cancelBookingFormSubmitted","action","reason","rejectBookingId","textareaRef","handleNylasFormInputChanged","cancelBooking","updateBooking","status","goBack","nylasCancelledEventCardCss","NylasCancelledEventCard","isClosing","handleCloseClicked","cancelledEventCardError","closeCancelEventCardClicked","cancelledEventInfo","organizer","_","nylasschedulerconnector","resetCancel","_nylasschedulerconnector","nylasConfirmedEventCardCss","NylasConfirmedEventCard","confirmedEventCardError","closeConfirmEventCardClicked","confirmedEventInfo","resetConfirm","t0","t1","timeInterval","floori","offseti","count","interval","date","arguments","floor","ceil","round","d0","d1","offset","step","Math","range","start","stop","previous","filter","setTime","end","every","isFinite","d","durationSecond","durationMinute","durationHour","durationDay","timeDay","setHours","setDate","getDate","getTimezoneOffset","setUTCHours","setUTCDate","getUTCDate","nylasDatePickerCss","dayjs","extend","utc","timezone","NylasDatePicker","month","selectedDate","dates","getDates","disableNextMonthButton","selectableDatesTimezone","configSettingsChanged","newConfigSettings","nextMonth","getFullYear","getMonth","availableDaysInFuture","available_days_in_future","endDate","addDaysToCurrentDate","selectedLanguageChanged","newLanguage","selectedDateChanged","newSelectedDate","isSameMonth","convertDatesToTimezone","targetTimezone","tzDate","tz","year","selectedTimezoneChanged","newSelectedTimezone","selectableDates","selectableDatesChanged","newSelectableDates","lastDayOfMonth","getLastDayOfMonth","firstDayOfMonth","getFirstDayOfMonth","getDay","selectDate","dateSelected","changeMonth","change","monthChanged","isSelected","isSameDay","isDisabled","some","eventDuration","convertMinutesToHoursAndMinutes","translateMonth","toLocaleDateString","button","day","animationDelay","dateStyle","nylasLocaleSwitchCss","NylasLocaleSwitch","searchPlaceholder","changeTimezone","timezoneRef","languageRef","timezoneChanged","languageChanged","nylasFormDropdownChangedHandler","getTimezoneLabelHTML","display","alignItems","justifyContent","width","fontSize","fontWeight","color","timezoneOptions","keys","labelHTML","languageOptions","LANGUAGE_MAP","find","op","height","lang","selectTimezone","selectLanguage","iconCss","NylasLogo","viewBox","fill","xmlns","transform","nylasOrganizerConfirmationCardCss","NylasOrganizerConfirmationCard","handleConfirmBookingButtonClicked","confirmBookingError","organizerConfirmationBookingId","confirmBookingButtonClicked","handleRejectBookingButtonClicked","rejectBookingButtonClicked","resetAction","setReject","nylasSelectedEventCardCss","NylasSelectedEventCard","updateTimes","selectedTimeslotChangedHandler","selectedTimezoneChangedHandler","hour12ChangedHandler","nylasTimeslotPickerCss","NylasTimeslotPicker","times","handleConfirmedTimeslot","timeslot","timeslotConfirmed","handleMouseEnter","hoveredTimeslotIndex","handleMouseLeave","selectedTimeslotIndex","availableTimes","availability","isSameDayTimezone","availabilityChanged","getTimeslotId","eventId","onClickSelectTime","timeslotSelected","emails","master_id","calendar_id","emitValidateTimeslotError","validateTimeslotError","getTimeSlotLabel","filteredTimes","groupEvent","showCapacity","time","onMouseEnter","onMouseLeave","toLocaleTimeString","selectTime","validateGroupEventTimeslot"],"sources":["src/components/scheduler/nylas-booked-event-card/nylas-booked-event-card.scss?tag=nylas-booked-event-card&encapsulation=shadow","src/components/scheduler/nylas-booked-event-card/nylas-booked-event-card.tsx","src/components/scheduler/nylas-booking-form/nylas-booking-form.scss?tag=nylas-booking-form&encapsulation=shadow","src/components/scheduler/nylas-booking-form/nylas-booking-form.tsx","src/components/scheduler/nylas-cancel-booking-form/nylas-cancel-booking-form.scss?tag=nylas-cancel-booking-form&encapsulation=shadow","src/components/scheduler/nylas-cancel-booking-form/nylas-cancel-booking-form.tsx","src/components/scheduler/nylas-cancelled-event-card/nylas-cancelled-event-card.scss?tag=nylas-cancelled-event-card&encapsulation=shadow","src/components/scheduler/nylas-cancelled-event-card/nylas-cancelled-event-card.tsx","src/components/scheduler/nylas-confirmed-event-card/nylas-confirmed-event-card.scss?tag=nylas-confirmed-event-card&encapsulation=shadow","src/components/scheduler/nylas-confirmed-event-card/nylas-confirmed-event-card.tsx","../../node_modules/.pnpm/d3-time@3.1.0/node_modules/d3-time/src/interval.js","../../node_modules/.pnpm/d3-time@3.1.0/node_modules/d3-time/src/duration.js","../../node_modules/.pnpm/d3-time@3.1.0/node_modules/d3-time/src/day.js","src/components/scheduler/nylas-date-picker/nylas-date-picker.scss?tag=nylas-date-picker&encapsulation=shadow","src/components/scheduler/nylas-date-picker/nylas-date-picker.tsx","src/components/scheduler/nylas-locale-switch/nylas-locale-switch.scss?tag=nylas-locale-switch&encapsulation=shadow","src/components/scheduler/nylas-locale-switch/nylas-locale-switch.tsx","src/common/icons/icon.css?tag=nylas-logo&encapsulation=scoped","src/common/icons/nylas-logo.tsx","src/components/scheduler/nylas-organizer-confirmation-card/nylas-organizer-confirmation-card.scss?tag=nylas-organizer-confirmation-card&encapsulation=shadow","src/components/scheduler/nylas-organizer-confirmation-card/nylas-organizer-confirmation-card.tsx","src/components/scheduler/nylas-selected-event-card/nylas-selected-event-card.scss?tag=nylas-selected-event-card&encapsulation=shadow","src/components/scheduler/nylas-selected-event-card/nylas-selected-event-card.tsx","src/components/scheduler/nylas-timeslot-picker/nylas-timeslot-picker.scss?tag=nylas-timeslot-picker&encapsulation=shadow","src/components/scheduler/nylas-timeslot-picker/nylas-timeslot-picker.tsx"],"sourcesContent":["@use '../../../common/styles/variables' as *;\n\n:host {\n display: block;\n @include default-css-variables;\n}\n\n.nylas-booked-event-card {\n height: inherit;\n display: flex;\n flex-direction: column;\n justify-content: space-between;\n align-items: center;\n font-family: var(--nylas-font-family);\n}\n\n.event-card-wrapper {\n display: flex;\n align-items: center;\n flex-direction: column;\n background-color: var(--nylas-base-0);\n color: var(--nylas-base-900);\n border-radius: var(--nylas-border-radius-3x);\n position: relative;\n margin-top: 1rem;\n margin-bottom: 2rem;\n width: 424px;\n box-shadow:\n 0px 1px 4px rgba(0, 0, 0, 0.1),\n 0px 3px 6px rgba(0, 0, 0, 0.06);\n\n @media #{$mobile} {\n width: 100%;\n border-radius: 0px;\n }\n}\n\n.calendar-icon {\n display: flex;\n align-items: center;\n justify-content: center;\n width: 3rem;\n height: 3rem;\n border-radius: 50%;\n position: absolute;\n top: -1.25rem;\n left: 50%;\n transform: translateX(-50%);\n background-color: var(--nylas-base-0);\n border: 1px solid var(--nylas-base-200);\n color: var(--nylas-base-700);\n}\n\n.booked-event-header {\n margin: 1.5rem 0;\n overflow-wrap: anywhere;\n display: flex;\n align-items: center;\n flex-direction: column;\n font-size: 16px;\n font-weight: 400;\n border-bottom: 1px solid var(--nylas-base-200);\n width: inherit;\n padding: 0 0 1.5rem;\n\n h2 {\n color: var(--nylas-base-600);\n margin-top: 1.5rem;\n margin-bottom: 0.25rem;\n font-size: 1.125rem;\n font-weight: 600;\n }\n\n .card-description {\n text-align: center;\n }\n}\n\n.booking-date-time,\n.booking-participants {\n padding: 0 1rem;\n margin-top: 1.5rem;\n margin-left: 3rem;\n display: flex;\n flex-direction: column;\n justify-content: space-between;\n align-self: flex-start;\n position: relative;\n\n svg {\n color: var(--nylas-base-700);\n position: absolute;\n left: -10px;\n }\n\n .block {\n display: block;\n }\n\n h3 {\n color: var(--nylas-base-600);\n margin: 0;\n font-size: 16px;\n font-weight: 600;\n line-height: 1.25rem;\n text-align: justify;\n margin-bottom: 4px;\n }\n\n p {\n font-size: 16px;\n margin: 0;\n font-weight: 400;\n text-align: justify;\n color: var(--nylas-base-800);\n }\n}\n\n.booking-participants {\n margin-bottom: 1.5rem;\n}\n\n.booked-event-timezone {\n display: flex;\n color: var(--nylas-base-600);\n margin-bottom: 1.5rem;\n gap: 4px;\n margin: 2rem;\n align-items: center;\n align-self: flex-end;\n}\n\n.button-container {\n width: inherit;\n}\n\n.footer {\n padding: 0.5rem;\n display: grid;\n grid-template-columns: 1fr 1fr;\n gap: 0.5rem;\n box-sizing: border-box;\n background-color: var(--nylas-base-25);\n border-top: 1px solid var(--nylas-base-200);\n width: 100%;\n border-radius: 0 0 var(--nylas-border-radius-2x) var(--nylas-border-radius-2x);\n\n &.no-template-cols {\n grid-template-columns: 1fr;\n }\n\n &.no-footer {\n display: none;\n }\n}\n\nsp-divider {\n background-color: var(--nylas-base-200);\n height: 1px;\n}\n\ncalendar-check-icon {\n display: flex;\n align-items: center;\n justify-content: center;\n height: 100%;\n}\n","import { RegisterComponent } from '@/common/register-component';\nimport { Component, Element, EventEmitter, h, Host, Prop, State, Watch } from '@stencil/core';\nimport { NylasSchedulerConnector } from '../../..';\nimport type { NylasSchedulerBookingData } from '@/common/types';\nimport { ConfigSettings } from '@/stores/scheduler-store';\nimport { NylasScheduling } from '../nylas-scheduling/nylas-scheduling';\nimport { capitalizeFirstLetter, debug, formatBookedEventDate } from '@/utils/utils';\nimport { LANGUAGE_CODE, LANGUAGE_CODE_TO_LOCALE_MAP, TIMEZONE_MAP } from '@/common/constants';\nimport { NylasEvent } from '@/common/types';\nimport { Event } from '@stencil/core';\nimport { NylasSchedulerErrorResponse, ThemeConfig, Timeslot } from '@nylas/core';\nimport i18next from '@/utils/i18n';\n\n/**\n * The `nylas-booked-event-card` component is a UI component that displays the booked event card.\n *\n * @part nbec - The booked event card host.\n * @part nbec__card - The booked event card.\n * @part nbec__title - The title of the booked event card.\n * @part nbec__description - The description of the booked event card.\n * @part nbec__button-outline - The cancel & reschedule button CTA.\n * @part nbec__cancel-cta - The cancel button CTA.\n * @part nbec__reschedule-cta - The reschedule button CTA.\n */\n@Component({\n tag: 'nylas-booked-event-card',\n styleUrl: 'nylas-booked-event-card.scss',\n shadow: true,\n})\nexport class NylasBookedEventCard {\n /**\n * The host element.\n * Used to manage the host element of the provider.\n */\n @Element() private host!: HTMLNylasBookedEventCardElement;\n\n /**\n * @standalone\n * The booked event.\n */\n @Prop() readonly eventInfo!: NylasEvent;\n\n /**\n * @standalone\n * Booking flow type.\n */\n @Prop() readonly rescheduleBookingId?: string;\n\n /**\n * @standalone\n * The booking info used to book / reschedule the event.\n */\n @Prop() readonly bookingInfo?: NylasSchedulerBookingData;\n\n /**\n * @standalone\n * The config settings for the scheduler.\n */\n @Prop() readonly configSettings?: ConfigSettings;\n\n /**\n * @standalone\n * The loading state prop. Used to display loading state when fetching availability.\n */\n @Prop() readonly isLoading?: boolean;\n\n /**\n * @standalone\n * The theme configuration.\n */\n @Prop({ attribute: 'theme-config' }) readonly themeConfig?: any;\n\n /**\n * The selected timezone.\n */\n @Prop() readonly selectedTimezone: string = Intl.DateTimeFormat().resolvedOptions().timeZone;\n\n /**\n * The selected timeslot.\n */\n @Prop() readonly selectedTimeslot!: Timeslot;\n\n /**\n * The selected language.\n */\n @Prop({ attribute: 'selected-language' }) readonly selectedLanguage: string = navigator.language;\n /**\n * The 12-hour time format.\n */\n @Prop() hour12?: boolean;\n\n @State() startTime: string = '';\n @State() endTime: string = '';\n\n /**\n * Cancel booking button clicked event.\n */\n @Event() readonly cancelBookingButtonClicked!: EventEmitter<{ bookingId: string }>;\n\n /**\n * Reschedule button clicked event.\n * */\n @Event() readonly rescheduleButtonClicked!: EventEmitter<{ bookingId: string; errorHandler?: (error: NylasSchedulerErrorResponse) => void }>;\n\n /**\n * This event is fired when an error occurs while rescheduling the booking.\n */\n @Event() readonly rescheduleBookedEventError!: EventEmitter<NylasSchedulerErrorResponse>;\n\n /**\n * This event is fired when an error occurs while cancelling the booking.\n */\n @Event() readonly cancelBookedEventValidationError!: EventEmitter<{\n error: {\n title: string;\n message: string;\n };\n }>;\n\n @Watch('themeConfig')\n themeConfigChanged(newThemeConfig: ThemeConfig) {\n this.applyThemeConfig(newThemeConfig);\n }\n\n @Watch('selectedLanguage')\n selectedLanguageChangedHandler(newVal: LANGUAGE_CODE, oldVal: LANGUAGE_CODE) {\n if (newVal === oldVal) return;\n i18next.changeLanguage(newVal);\n }\n\n connectedCallback() {\n // Use queueMicrotask to defer theme application until after React has set props.\n // This fixes the timing issue where connectedCallback fires before React sets themeConfig.\n queueMicrotask(() => {\n if (this.themeConfig) {\n this.applyThemeConfig(this.themeConfig);\n this.host.setAttribute('data-themed', '');\n }\n });\n }\n\n disconnectedCallback() {}\n\n async componentWillLoad() {\n debug(`[nylas-booked-event-card] Component will load`);\n }\n\n async componentDidLoad() {\n debug(`[nylas-booked-event-card] Component did load`);\n if (!this.eventInfo) {\n debug('[nylas-booked-event-card] \"eventInfo\" prop missing. Please provide the event info to display the event details in the booked event card component.');\n }\n if (!this.bookingInfo) {\n debug('[nylas-booked-event-card] \"bookingInfo\" prop missing. Please provide the booking info to display the guest details in the booked event card component.');\n }\n const locale = LANGUAGE_CODE_TO_LOCALE_MAP[this.selectedLanguage || 'en'];\n\n const timeFormat = new Intl.DateTimeFormat(locale, {\n hour: '2-digit',\n minute: '2-digit',\n timeZone: this.selectedTimezone,\n hour12: this.hour12,\n });\n this.startTime = timeFormat.format(this.selectedTimeslot?.start_time as Date);\n this.endTime = timeFormat.format(this.selectedTimeslot?.end_time as Date);\n }\n\n applyThemeConfig(themeConfig?: ThemeConfig) {\n if (themeConfig) {\n for (const [key, value] of Object.entries(themeConfig)) {\n this.host.style.setProperty(`${key}`, value);\n }\n }\n }\n\n private handleCancelBookingButtonClicked = () => {\n const startTime = new Date(this.selectedTimeslot.start_time);\n const minCancellationNotice = this.configSettings?.scheduler?.min_cancellation_notice;\n if (!minCancellationNotice) {\n this.cancelBookingButtonClicked.emit({ bookingId: this.eventInfo.booking_id });\n return;\n }\n const dateTillCancellation = startTime.getTime() - minCancellationNotice * 60 * 1000;\n if (dateTillCancellation < new Date().getTime()) {\n this.cancelBookedEventValidationError.emit({\n error: {\n title: 'Cancellation Error',\n message: `You cannot cancel the booking within ${minCancellationNotice} minutes of the event.`,\n },\n });\n } else {\n this.cancelBookingButtonClicked.emit({ bookingId: this.eventInfo.booking_id });\n }\n };\n\n private handleRescheduleButtonClicked = () => {\n const errorHandler = (error: NylasSchedulerErrorResponse) => {\n this.rescheduleBookedEventError.emit(error);\n };\n this.rescheduleButtonClicked.emit({ bookingId: this.eventInfo.booking_id, errorHandler });\n };\n\n getPaticipantType = (type: string) => {\n switch (type) {\n case 'host':\n return 'Host';\n case 'you':\n return 'You';\n default:\n return '';\n }\n };\n\n @RegisterComponent<NylasBookedEventCard, NylasSchedulerConnector, Exclude<NylasScheduling['stores'], undefined>>({\n name: 'nylas-booked-event-card',\n stateToProps: new Map([\n ['scheduler.bookingInfo', 'bookingInfo'],\n ['scheduler.rescheduleBookingId', 'rescheduleBookingId'],\n ['scheduler.selectedTimezone', 'selectedTimezone'],\n ['scheduler.selectedTimeslot', 'selectedTimeslot'],\n ['scheduler.isLoading', 'isLoading'],\n ['scheduler.selectedLanguage', 'selectedLanguage'],\n ['scheduler.configSettings', 'configSettings'],\n ['scheduler.themeConfig', 'themeConfig'],\n ['scheduler.hour12', 'hour12'],\n ]),\n eventToProps: {\n cancelBookingButtonClicked: async (event: CustomEvent<{ bookingId: string }>, nylasSchedulerConnector: NylasSchedulerConnector) => {\n nylasSchedulerConnector.scheduler.setCancel(event.detail.bookingId);\n },\n rescheduleButtonClicked: async (\n event: CustomEvent<{ bookingId: string; errorHandler?: (error: NylasSchedulerErrorResponse) => void }>,\n nylasSchedulerConnector: NylasSchedulerConnector,\n ) => {\n const result = await nylasSchedulerConnector.scheduler.setReschedule(event.detail.bookingId);\n const { errorHandler } = event.detail;\n if (errorHandler && (!result || 'error' in result)) {\n errorHandler(result);\n }\n },\n rescheduleBookedEventError: async (event: CustomEvent<NylasSchedulerErrorResponse>, _nylasSchedulerConnector: NylasSchedulerConnector) => {\n debug('nylas-booked-event-card', 'rescheduleBookedEventError', event.detail);\n },\n cancelBookedEventValidationError: async (event: CustomEvent<{ error: { title: string; message: string } }>, _nylasSchedulerConnector: NylasSchedulerConnector) => {\n debug('nylas-booked-event-card', 'cancelBookedEventValidationError', event.detail);\n },\n },\n fireRegisterEvent: true,\n })\n render() {\n const bookingType = this.configSettings?.booking_type;\n const isManualConfirmation = bookingType && bookingType !== 'booking';\n\n return (\n <Host part=\"nbec\">\n <div class=\"nylas-booked-event-card\">\n <div class=\"booked-event-timezone\">\n <globe-icon></globe-icon>\n {TIMEZONE_MAP[this.selectedTimezone]}\n </div>\n <div class=\"event-card-wrapper\" part=\"nbec__card\">\n <div class=\"calendar-icon\">\n <calendar-check-icon />\n </div>\n <div class=\"booked-event-header\">\n <h2 slot=\"card-title\" part=\"nbec__title\">\n {!!this.rescheduleBookingId && !this.isLoading\n ? `${i18next.t('bookingRescheduled')}`\n : isManualConfirmation && !this.isLoading\n ? `${i18next.t('bookingSent')}`\n : `${i18next.t('bookingConfirmed')}`}\n !\n </h2>\n <div class=\"card-description\" part=\"nbec__description\">\n {isManualConfirmation ? i18next.t('bookingSentDescription') : <span>{i18next.t('bookingConfirmedDescription')}</span>}\n </div>\n </div>\n <div class=\"booking-date-time\">\n <checkmark-circle-icon></checkmark-circle-icon>\n <h3>{i18next.t('bookingDateAndTimeHeader')}</h3>\n <p>\n {this.selectedTimeslot?.start_time\n ? capitalizeFirstLetter(\n formatBookedEventDate(this.selectedTimeslot?.start_time as Date, this.selectedTimezone, LANGUAGE_CODE_TO_LOCALE_MAP[this.selectedLanguage]),\n )\n : '-'}{' '}\n <br />\n {this.startTime} - {this.endTime}\n </p>\n </div>\n <div class=\"booking-participants\">\n {/* <people-icon></people-icon>\n <h3>All participants</h3>\n {this.eventInfo?.participants && (\n <p>\n {this.eventInfo?.participants?.map((participant: NylasEvent['participants'][0]) => {\n return (\n <span class=\"block\">\n {participant.email} {this.getPaticipantType(participant.type) && `(${this.getPaticipantType(participant.type)})`}\n </span>\n );\n })}\n </p>\n )} */}\n </div>\n\n {!isManualConfirmation && (\n <div class=\"button-container\">\n <div\n class={{\n 'footer': true,\n 'no-footer':\n (this.configSettings?.scheduler?.hide_cancellation_options && this.configSettings?.scheduler?.hide_rescheduling_options) ||\n this.configSettings?.booking_type === 'organizer-confirmation',\n 'no-template-cols': !!this.configSettings?.scheduler?.hide_cancellation_options || !!this.configSettings?.scheduler?.hide_rescheduling_options,\n }}\n >\n {!this.configSettings?.scheduler?.hide_cancellation_options && (\n <button-component variant={'destructive'} onClick={this.handleCancelBookingButtonClicked} part=\"nbec__button-outline nbec__cancel-cta\">\n {`${i18next.t('cancelBookingButton')}`}\n </button-component>\n )}\n {!this.configSettings?.scheduler?.hide_rescheduling_options && (\n <button-component variant={'basic'} onClick={this.handleRescheduleButtonClicked} disabled={this.isLoading} part=\"nbec__button-outline nbec__reschedule-cta\">\n {`${i18next.t('rescheduleBookingButton')}`}\n </button-component>\n )}\n </div>\n </div>\n )}\n </div>\n </div>\n </Host>\n );\n }\n}\n","@use '../../../common/mixins/inputs' as *;\n@use '../../../common/styles/variables' as *;\n\n:host {\n display: block;\n height: 100%;\n @include default-css-variables;\n}\n\n.nylas-booking-form {\n width: 100%;\n padding: 1.5rem;\n box-sizing: border-box;\n height: 450px;\n overflow-y: auto;\n height: 100%;\n}\n\nform {\n height: 100%;\n display: flex;\n flex-direction: column;\n justify-content: space-between;\n align-items: center;\n}\n\n.cta {\n width: 100%;\n display: grid;\n grid-template-columns: 1fr 1fr;\n gap: 0.5rem;\n\n align-items: flex-start;\n justify-content: space-between;\n gap: 0.5rem;\n padding: 14px;\n box-sizing: border-box;\n border-top: 1px solid var(--nylas-base-200);\n\n @media #{$mobile} {\n grid-template-columns: 1fr;\n }\n\n .consent-disclaimer {\n grid-column: 1 / -1;\n width: 100%;\n font-size: 12px;\n line-height: 1.4;\n color: var(--nylas-base-600);\n text-align: center;\n margin-bottom: 0.75rem;\n padding: 0 0.5rem;\n word-wrap: break-word;\n overflow-wrap: break-word;\n }\n}\n\n.input-wrapper {\n width: 100%;\n display: flex;\n flex-direction: column;\n align-items: flex-start;\n gap: 4px;\n margin-bottom: 1rem;\n\n input::placeholder {\n color: var(--nylas-base-300);\n }\n\n label,\n input {\n font-family: var(--nylas-font-family);\n font-size: 16px;\n }\n\n .help-text {\n margin: 0;\n color: var(--nylas-error);\n }\n}\n\n.button-wrapper {\n width: 100%;\n align-items: flex-start;\n height: max-content;\n position: relative;\n}\n\n.button-content {\n display: flex;\n gap: 4px;\n align-items: center;\n}\n\ninput[type='text'],\ninput[type='email'] {\n @include textfield;\n\n &.guest-email {\n color: var(--nylas-base-900);\n padding-right: 52px; // Infield button width\n }\n}\n\nlabel {\n @include input-label;\n}\n\nbutton-component.remove-guest {\n position: absolute;\n height: 51px;\n right: 0;\n\n &.error {\n button {\n border-color: var(--nylas-error);\n }\n }\n\n button {\n height: inherit;\n border-top-left-radius: initial;\n border-bottom-left-radius: initial;\n border: none !important;\n border-left: 1px solid var(--nylas-base-300) !important;\n\n &:hover,\n &:focus {\n outline: 1px solid var(--nylas-primary) !important;\n color: var(--nylas-primary);\n }\n }\n}\n\nbutton-component.back {\n button {\n --dot-color: var(--nylas-base-800);\n }\n}\n\n.guest-email-input {\n position: relative;\n display: flex;\n width: 100%;\n}\n\nmulti-select-dropdown {\n &::part(msd_dropdown-label) {\n margin-bottom: 4px;\n }\n\n &::part(msd_dropdown_error) {\n font-size: 16px;\n }\n\n &::part(msd_dropdown-button) {\n height: 52px;\n border-color: var(--nylas-base-300);\n }\n\n &::part(msd_dropdown-button--error) {\n border-width: 2px;\n border-color: var(--nylas-error);\n }\n}\n","import { Component, Element, Event, EventEmitter, Host, Listen, Prop, State, Watch, h } from '@stencil/core';\nimport { RegisterComponent } from '@/common/register-component';\nimport { NylasSchedulerConnector } from '@/connector/nylas-scheduler-connector';\nimport { ConfigSettings } from '@/stores/scheduler-store';\nimport type { NylasSchedulerBookingDataWithFlatFields, NylasSchedulerBookingData, NylasEvent } from '@/common/types';\nimport { NylasScheduling } from '../nylas-scheduling/nylas-scheduling';\nimport { debug, sanitize } from '@/utils/utils';\nimport { Notification, NylasSchedulerBookingParticipant, ThemeConfig, Timeslot } from '@nylas/core';\nimport sanitizeHtml from 'sanitize-html';\nimport i18next from '@/utils/i18n';\nimport { LANGUAGE_CODE } from '@/common/constants';\n\nconst emailRegex = /^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/;\n\n/**\n * The `nylas-booking-form` component is a UI component that allows users to book an event.\n *\n * The booking form component.\n * @part nbf - The booking form host.\n * @part nbf__input-textfield - The input textfield.\n * @part nbf__button-ghost - The ghost button.\n * @part nbf__button-outline - The outline button.\n * @part nbf__button-primary - The primary button.\n * @part nbf__input-wrapper - The input wrapper.\n * @part nbf__checkbox-component - The checkbox component.\n * @part nbf__radio-button-group - The radio button group.\n * @part nbf__textarea-component - The textarea component.\n * @part nbf__dropdown - The dropdown component.\n * @part nbf__dropdown-button - The dropdown button.\n * @part nbf__dropdown-content - The dropdown content.\n *\n */\n@Component({\n tag: 'nylas-booking-form',\n styleUrl: 'nylas-booking-form.scss',\n shadow: true,\n})\nexport class NylasBookingForm {\n private formRef?: HTMLFormElement;\n /**\n * The host element\n */\n @Element() readonly host!: HTMLNylasBookingFormElement;\n\n /**\n * @standalone\n * The loading state.\n */\n @Prop() readonly isLoading?: boolean;\n\n /**\n * @standalone\n * The booking info.\n */\n @Prop() readonly bookingInfo?: NylasSchedulerBookingData;\n\n /**\n * @standalone\n * The booked event (Used to track if a booking is created in an eventOverride).\n */\n @Prop() readonly eventInfo?: NylasEvent;\n\n /**\n * @standalone\n * The config settings for the scheduler.\n */\n @Prop() readonly configSettings?: ConfigSettings;\n\n /**\n * @standalone\n * The theme configuration.\n */\n @Prop({ attribute: 'theme-config' }) readonly themeConfig?: any;\n\n /**\n * The selected time.\n */\n @Prop({ attribute: 'selected-timeslot' }) readonly selectedTimeslot?: Timeslot;\n\n /**\n * The selected language.\n */\n @Prop({ attribute: 'selected-language' }) readonly selectedLanguage?: LANGUAGE_CODE;\n\n /**\n * This event is fired when the name is changed.\n */\n @Event() nameChanged!: EventEmitter<string>;\n\n /**\n * This event is fired when the email is changed.\n */\n @Event() emailChanged!: EventEmitter<string>;\n\n /**\n * This event is fired when the cancel button is clicked.\n */\n @Event() backButtonClicked!: EventEmitter<boolean>;\n\n /**\n * This event is fired when the book button is clicked and the form validation is complete and successful.\n * This event is fired before the booking request is sent.\n */\n @Event() detailsConfirmed!: EventEmitter<NylasSchedulerBookingDataWithFlatFields>;\n\n /**\n * This event is fired when an error occurs in the booking form validation.\n */\n @Event() bookingFormError!: EventEmitter<Partial<Notification>>;\n\n /**\n * This event is fired immediately after the book button is clicked.\n * The booking form validation is not complete at this point.\n */\n @Event() bookingFormSubmitted!: EventEmitter<void>;\n\n /**\n * The name of the user.\n */\n @State() name: string = '';\n\n /**\n * The email address of the user.\n */\n @State() email: string = '';\n\n /**\n * The guests of the user.\n */\n @State() guestEmails: string[] = [];\n\n /**\n * Guest email input errors.\n */\n @State() guestEmailErrors: { [key: number]: string } = {};\n\n /**\n * State to check if name is valid.\n */\n @State() isNameValid: boolean = true;\n\n /**\n * State to check if email is valid.\n */\n @State() isEmailValid: boolean = true;\n\n @State() additionalFields?: Record<string, string> = {};\n\n @State() namePatternError: string = '';\n\n @State() nameRequiredError: string = '';\n\n @State() emailPatternError: string = '';\n\n @State() emailRequiredError: string = '';\n\n /**\n * Error message state.\n */\n @State() validationError: { name: string; email: string } = { name: '', email: '' };\n\n @State() backButtonLoading: boolean = false;\n\n @State() firstRender: boolean = true;\n\n connectedCallback() {\n // Use queueMicrotask to defer theme application until after React has set props.\n // This fixes the timing issue where connectedCallback fires before React sets themeConfig.\n queueMicrotask(() => {\n if (this.themeConfig) {\n this.applyThemeConfig(this.themeConfig);\n this.host.setAttribute('data-themed', '');\n }\n });\n }\n\n disconnectedCallback() {}\n\n componentWillLoad() {\n debug('nylas-booking-form', 'componentWillLoad', this.bookingInfo);\n }\n\n componentDidLoad() {\n debug('nylas-booking-form', 'componentDidLoad', this.bookingInfo);\n // Set the name and email from the bookingInfo if it exists,\n // otherwise set it from the config settings.\n if (this.configSettings?.booking) {\n this.configSettingsChangedHandler(this.configSettings);\n } else if (this.bookingInfo) {\n this.bookingInfoChangedHandler(this.bookingInfo);\n }\n }\n\n componentDidRender() {\n // Theme already applied in connectedCallback via queueMicrotask\n }\n\n @Watch('bookingInfo')\n bookingInfoChangedHandler(newValue: NylasSchedulerBookingData | undefined) {\n if (newValue && newValue.primaryParticipant) {\n this.name = newValue.primaryParticipant.name || this.name;\n this.email = newValue.primaryParticipant.email || this.email;\n }\n if (newValue?.guests && Array.isArray(newValue.guests)) {\n this.guestEmails = newValue.guests.map(guest => guest.email);\n }\n }\n\n @Watch('configSettings')\n configSettingsChangedHandler(newValue: ConfigSettings | undefined) {\n if (!this.bookingInfo?.primaryParticipant?.name && newValue && newValue.booking?.guest?.name) {\n this.name = newValue.booking.guest.name || this.name;\n }\n if (!this.bookingInfo?.primaryParticipant?.email && newValue && newValue.booking?.guest?.email) {\n this.email = newValue.booking.guest.email || this.email;\n }\n\n if (!this.bookingInfo?.guests && newValue?.booking?.additional_guests && Array.isArray(newValue.booking.additional_guests)) {\n this.guestEmails = newValue.booking.additional_guests.map(guest => guest.email);\n }\n }\n\n @Watch('themeConfig')\n themeConfigChanged(newThemeConfig: ThemeConfig) {\n this.applyThemeConfig(newThemeConfig);\n }\n\n @Watch('selectedLanguage')\n selectedLanguageChangedHandler(newVal: LANGUAGE_CODE, oldVal: LANGUAGE_CODE) {\n if (newVal === oldVal) return;\n i18next.changeLanguage(newVal);\n this.namePatternError = i18next.t('invalidInputFormat', { field: i18next.t('name') });\n this.nameRequiredError = i18next.t('fieldRequired', { field: i18next.t('name') });\n this.emailPatternError = i18next.t('invalidInputFormat', { field: i18next.t('email') });\n this.emailRequiredError = i18next.t('fieldRequired', { field: i18next.t('email') });\n }\n\n iterateFormComponents() {\n // Select the form element\n const form = this.formRef;\n const customComponentsList = [\n 'input-component',\n 'button-component',\n 'select-dropdown',\n 'checkbox-component',\n 'radio-button-group',\n 'textarea-component',\n 'nylas-date-component',\n 'multi-select-dropdown',\n ];\n\n const customComponents: unknown[] = [];\n if (form) {\n // Recursive function to traverse all children\n const traverseElements = (element: HTMLElement) => {\n Array.from(element.children).forEach(child => {\n const tagName = child.tagName.toLowerCase();\n if (customComponentsList.includes(tagName)) {\n customComponents.push(child as HTMLElement);\n }\n // Recursively traverse child elements\n traverseElements(child as HTMLElement);\n });\n };\n\n // Start traversal from the form\n traverseElements(form);\n }\n return customComponents;\n }\n\n applyThemeConfig(themeConfig?: ThemeConfig) {\n if (themeConfig) {\n for (const [key, value] of Object.entries(themeConfig)) {\n this.host.style.setProperty(`${key}`, value);\n const customComponents = this.iterateFormComponents();\n customComponents.forEach(component => {\n (component as any).style.setProperty(`${key}`, value);\n (component as any).shadowRoot?.host.style.setProperty(`${key}`, value);\n });\n }\n }\n }\n\n /**\n * Change the name.\n * @param name The name to select.\n */\n changeName(name: string) {\n // Reset the validation error\n this.isNameValid = true;\n this.validationError.name = '';\n\n this.name = sanitize(name);\n this.nameChanged.emit(name);\n }\n\n /**\n * Change the email.\n * @param email The email to select.\n */\n changeEmail(email: string) {\n // Reset the validation error\n this.isEmailValid = true;\n this.validationError.email = '';\n\n this.email = sanitizeHtml(email);\n this.emailChanged.emit(email);\n }\n\n resetGuestEmailError(guestIndex: number) {\n const errors = { ...this.guestEmailErrors };\n delete errors[guestIndex];\n this.guestEmailErrors = { ...errors };\n }\n\n /**\n * Handle guest emails changed.\n */\n handleGuestChange = (guestIndex: number, email: string) => {\n // Reset the validation error\n this.resetGuestEmailError(guestIndex);\n const guests = [...this.guestEmails];\n guests[guestIndex] = sanitizeHtml(email);\n this.guestEmails = [...guests];\n };\n\n /**\n * Handle guest input blur.\n */\n handleGuestBlur = (guestIndex: number, email: string) => {\n this.resetGuestEmailError(guestIndex);\n\n if (email === '') {\n this.guestEmailErrors[guestIndex] = i18next.t('fieldRequired', { field: i18next.t('email') });\n return;\n }\n if (!emailRegex.test(email)) {\n this.guestEmailErrors[guestIndex] = i18next.t('invalidInputFormat', { field: i18next.t('email') });\n return;\n }\n this.handleGuestChange(guestIndex, email);\n };\n\n /**\n * Handle add guest button clicked.\n */\n addGuestButtonClickedHandler = e => {\n e.preventDefault();\n this.guestEmails = [...this.guestEmails, ''];\n };\n\n /**\n * Handle remove guest button clicked.\n */\n removeGuestButtonClickHandler = (e: Event, guestIndex: number) => {\n e.preventDefault();\n this.resetGuestEmailError(guestIndex);\n\n const guests = [...this.guestEmails];\n guests.splice(guestIndex, 1);\n this.guestEmails = [...guests];\n };\n\n /**\n * Handle back button clicked.\n */\n handleBackButtonClicked = e => {\n e.preventDefault();\n this.backButtonLoading = true;\n this.backButtonClicked.emit();\n };\n\n /**\n * Handle book button clicked.\n */\n bookButtonClickedHandler = async (e: Event) => {\n e.preventDefault();\n const formSubmittedEvent = this.bookingFormSubmitted.emit();\n if (formSubmittedEvent.defaultPrevented) {\n return;\n }\n\n debug('nylas-booking-form', 'bookButtonClickedHandler', this.bookingInfo);\n const name = this.name;\n const email = this.email;\n\n if (!name || name === '') {\n this.isNameValid = false;\n this.validationError.name = i18next.t('fieldRequired', { field: i18next.t('name') }) || 'Name is required';\n this.bookingFormError.emit({\n title: 'Booking form error',\n description: 'Name is required',\n });\n return;\n }\n if (!email || email === '') {\n this.isEmailValid = false;\n this.validationError.email = i18next.t('fieldRequired', { field: i18next.t('email') }) || 'Email is required';\n this.bookingFormError.emit({\n title: 'Booking form error',\n description: 'Email is required',\n });\n return;\n }\n if (!emailRegex.test(email)) {\n this.isEmailValid = false;\n this.validationError.email = i18next.t('invalidInputFormat', { field: i18next.t('email') });\n this.bookingFormError.emit({\n title: 'Booking form error',\n description: i18next.t('invalidInputFormat', { field: i18next.t('email') }) || 'Invalid email',\n });\n return;\n }\n\n let guests: NylasSchedulerBookingParticipant[] = [];\n if (this.guestEmails.length > 0) {\n let hasError = false;\n this.guestEmails.forEach((email: string, i: number) => {\n if (email === '') {\n hasError = true;\n this.guestEmailErrors = { ...this.guestEmailErrors, [i]: i18next.t('fieldRequired', { field: i18next.t('email') }) };\n } else if (!emailRegex.test(email)) {\n hasError = true;\n this.guestEmailErrors = { ...this.guestEmailErrors, [i]: i18next.t('invalidInputFormat', { field: i18next.t('email') }) };\n }\n });\n if (hasError) {\n this.bookingFormError.emit({\n title: 'Booking form error',\n description: i18next.t('invalidInputFormat', { field: i18next.t('guestEmail') }) || 'Invalid guest email',\n });\n return;\n }\n guests = this.guestEmails.map((email: string) => ({ name: email.trim(), email: email.trim() }));\n }\n\n const bookingInfoAdditionalFields = {};\n const configAdditionalFields = this.configSettings?.scheduler?.additional_fields || {};\n const configSettingsBookingAdditionalFields = this.configSettings?.booking?.additional_fields || {};\n if (this.bookingInfo?.additionalFields) {\n Object.entries(this.bookingInfo.additionalFields).forEach(([key, obj]) => {\n if (key in configAdditionalFields && typeof obj.value !== 'undefined') {\n bookingInfoAdditionalFields[key] = obj.value;\n }\n });\n }\n // If the additional field is not passed in the bookingInfo, set it to the default value if it exists\n Object.entries(configAdditionalFields).forEach(([key, obj]) => {\n if (!(key in bookingInfoAdditionalFields)) {\n const value = configSettingsBookingAdditionalFields[key] || obj.default || '';\n bookingInfoAdditionalFields[key] = value;\n }\n });\n\n this.detailsConfirmed.emit({\n primaryParticipant: {\n name: name,\n email: email,\n },\n guests: guests,\n additionalFields: { ...bookingInfoAdditionalFields, ...this.additionalFields },\n });\n };\n\n updateAdditionalFields = (name: string, value: string) => {\n if (this.additionalFields) {\n this.additionalFields[name] = value;\n }\n };\n\n @Listen('nylasFormInputChanged')\n nylasFormInputChangedHandler(event: CustomEvent<{ value: string; name: string; error: string; label: string; type?: string }>) {\n switch (event.detail.name) {\n case 'name':\n this.changeName(event.detail.value);\n break;\n case 'email':\n this.changeEmail(event.detail.value);\n break;\n default:\n if (event.detail.error) {\n this.bookingFormError.emit({\n title: 'Booking form error',\n description: event.detail.error,\n });\n return;\n }\n this.updateAdditionalFields(event.detail.name, event.detail.value);\n break;\n }\n }\n\n @Listen('nylasFormDropdownChanged')\n selectOptionChangedHandler(event: CustomEvent<{ value: string; name: string; label: string; error?: string }>) {\n if (event.detail.error) {\n this.bookingFormError.emit({\n title: 'Booking form error',\n description: event.detail.error,\n });\n return;\n }\n this.updateAdditionalFields(event.detail.name, event.detail.value);\n }\n\n @Listen('selectedOptionsChanged')\n selecedOptionsChangedHandler(event: CustomEvent<{ value: string; name: string; label: string; error?: string }>) {\n if (event.detail.error) {\n this.bookingFormError.emit({\n title: 'Booking form error',\n description: event.detail.error,\n });\n return;\n }\n const values = event.detail.value.toString();\n this.updateAdditionalFields(event.detail.name, values);\n }\n\n @Listen('nylasFormSwitchToggled')\n switchToggledHandler(event: CustomEvent<{ checked: boolean; name: string; label: string }>) {\n this.updateAdditionalFields(event.detail.name, event.detail.checked ? 'true' : 'false');\n }\n\n @Listen('nylasFormCheckboxToggled')\n checkboxToggledHandler(event: CustomEvent<{ checked: boolean; name: string; label: string }>) {\n this.updateAdditionalFields(event.detail.name, event.detail.checked ? 'true' : 'false');\n }\n\n @Listen('nylasFormRadioChanged')\n radioChangedHandler(event: CustomEvent<{ value: string; name: string; label: string; type: string }>) {\n this.updateAdditionalFields(event.detail.name, event.detail.value);\n }\n\n @Listen('nylasFormDropdownDefaultSelected')\n dropdownDefaultSelectedHandler(event: CustomEvent<{ value: string; name: string; label: string; error?: string }>) {\n this.updateAdditionalFields(event.detail.name, event.detail.value);\n }\n\n @RegisterComponent<NylasBookingForm, NylasSchedulerConnector, Exclude<NylasScheduling['stores'], undefined>>({\n name: 'nylas-booking-form',\n stateToProps: new Map([\n ['scheduler.isLoading', 'isLoading'],\n ['scheduler.bookingInfo', 'bookingInfo'],\n ['scheduler.eventInfo', 'eventInfo'],\n ['scheduler.configSettings', 'configSettings'],\n ['scheduler.themeConfig', 'themeConfig'],\n ['scheduler.selectedTimeslot', 'selectedTimeslot'],\n ['scheduler.selectedLanguage', 'selectedLanguage'],\n ]),\n eventToProps: {\n backButtonClicked: async (_event: CustomEvent<boolean>, nylasSchedulerConnector: NylasSchedulerConnector) => {\n nylasSchedulerConnector.scheduler.toggleAdditionalData(false);\n },\n nameChanged: async (event: CustomEvent<string>, nylasSchedulerConnector: NylasSchedulerConnector) => {\n nylasSchedulerConnector.scheduler.setParticipantName(event.detail);\n },\n emailChanged: async (event: CustomEvent<string>, nylasSchedulerConnector: NylasSchedulerConnector) => {\n nylasSchedulerConnector.scheduler.setParticipantEmail(event.detail);\n },\n detailsConfirmed: async (event: CustomEvent<NylasSchedulerBookingDataWithFlatFields>, _nylasSchedulerConnector: NylasSchedulerConnector) => {\n debug('nylas-booking-form', 'detailsConfirmed', event.detail);\n },\n bookingFormSubmitted: async (event: CustomEvent<void>, _nylasSchedulerConnector: NylasSchedulerConnector) => {\n debug('nylas-booking-form', 'bookingFormSubmitted', event.detail);\n },\n bookingFormError: async (event: CustomEvent<Partial<Notification>>, _nylasSchedulerConnector: NylasSchedulerConnector) => {\n debug('nylas-booking-form', 'bookingFormError', event.detail);\n },\n },\n fireRegisterEvent: true,\n })\n render() {\n const isGroupEvent = !!this.selectedTimeslot?.event_id && !!this.selectedTimeslot?.capacity;\n const showConsentMessage = this.configSettings?.scheduler?.notetaker_settings?.show_ui_consent_message === true;\n return (\n <Host>\n <form onSubmit={e => this.bookButtonClickedHandler(e)} ref={el => (this.formRef = el)} noValidate>\n <div class=\"nylas-booking-form\" part=\"nbf\">\n <div class=\"input-wrapper\" part=\"nbf__input-wrapper\">\n <input-component\n label={i18next.t('name')}\n name=\"name\"\n id=\"name\"\n defaultValue={this.bookingInfo?.primaryParticipant?.name || this.configSettings?.booking?.guest?.name || this.name}\n placeholder={i18next.t('namePlaceholder')}\n type=\"text\"\n readOnly={this.bookingInfo?.primaryParticipant?.nameReadOnly || false}\n required={true}\n requiredError={this.nameRequiredError}\n patternError={this.namePatternError}\n themeConfig={this.themeConfig}\n part=\"nbf__input-textfield\"\n />\n </div>\n <div class=\"input-wrapper\" part=\"nbf__input-wrapper\">\n <input-component\n label={i18next.t('email')}\n name=\"email\"\n id=\"email\"\n pattern={emailRegex}\n defaultValue={this.bookingInfo?.primaryParticipant?.email || this.configSettings?.booking?.guest?.email || this.email}\n placeholder={i18next.t('emailPlaceholder')}\n type=\"email\"\n readOnly={this.bookingInfo?.primaryParticipant?.emailReadOnly || false}\n required={true}\n requiredError={this.emailRequiredError}\n patternError={this.emailPatternError}\n themeConfig={this.themeConfig}\n part=\"nbf__input-textfield\"\n />\n </div>\n {this.configSettings?.scheduler?.hide_additional_guests !== true && (\n <div class=\"input-wrapper\" part=\"nbf__input-wrapper\">\n {this.guestEmails.map((email, index) => (\n <div class=\"input-wrapper button-wrapper\">\n <label\n class={{\n error: !!this.guestEmailErrors[index],\n }}\n >\n {i18next.t('guestEmail')}\n </label>\n <div class=\"guest-email-input\">\n <input\n type=\"email\"\n id={`guest-email-${index}`}\n maxLength={100}\n class={{\n 'guest-email': true,\n 'error': !!this.guestEmailErrors[index],\n }}\n placeholder={i18next.t('guestEmailPlaceholder')}\n value={email}\n data-index={index}\n part=\"nbf__input-textfield\"\n onBlur={(e: Event) => this.handleGuestBlur(index, (e.target as HTMLInputElement)?.value)}\n onInput={(e: Event) => this.handleGuestChange(index, (e.target as HTMLInputElement)?.value)}\n ></input>\n <button-component\n variant=\"basic\"\n tooltip=\"Remove guest\"\n onClick={(e: Event) => this.removeGuestButtonClickHandler(e, index)}\n class={{\n 'remove-guest': true,\n 'error': !!this.guestEmailErrors[index],\n }}\n >\n <close-icon />\n </button-component>\n </div>\n <p class=\"help-text\">{this.guestEmailErrors[index]}</p>\n </div>\n ))}\n {!isGroupEvent && (\n <button-component class=\"add-guest\" variant=\"invisible\" part=\"nbf__button-ghost\" onClick={e => this.addGuestButtonClickedHandler(e)}>\n <div class=\"button-content\">\n <add-circle-icon slot=\"icon\"></add-circle-icon>\n {this.guestEmails.length > 0 ? `${i18next.t('addAnotherGuest')}` : `${i18next.t('addGuest')}`}\n </div>\n </button-component>\n )}\n </div>\n )}\n {Object.entries(\n (this.configSettings?.scheduler?.additional_fields || {}) as Record<\n string,\n {\n required: boolean;\n type: 'email' | 'text' | 'phone_number' | 'dropdown' | 'checkbox' | 'radio_button' | 'multi_line_text' | 'metadata' | 'date' | 'multi_select';\n order: number;\n options?: string[];\n label: string;\n default?: string;\n }\n >,\n )\n ?.sort((a, b) => a[1].order - b[1].order)\n .map(x => {\n const field = x[1];\n const label = field.label;\n const key = x[0];\n const defaultValue = this.bookingInfo?.additionalFields?.[key]?.value || this.configSettings?.booking?.additional_fields?.[key] || field.default || '';\n const fieldReadOnly = this.bookingInfo?.additionalFields?.[key]?.readOnly || false;\n\n switch (field.type) {\n case 'dropdown':\n return (\n <div class=\"input-wrapper\" part=\"nbf__input-wrapper\">\n <select-dropdown\n label={label}\n name={key}\n id={key}\n readOnly={fieldReadOnly}\n withSearch={false}\n emptyValue={i18next.t('nylasBookingCalendarPicker.selectOptionLabel')}\n defaultSelectedOption={defaultValue ? { value: defaultValue, label: defaultValue } : undefined}\n options={[\n { value: '', label: i18next.t('nylasBookingCalendarPicker.selectOptionLabel') },\n ...(field.options?.map(option => ({ value: option, label: option })) || []),\n ]}\n required={field.required}\n themeConfig={this.themeConfig}\n errorMessage={i18next.t('fieldRequired', { field: label })}\n exportparts=\"sd_dropdown: nbf__dropdown, sd_dropdown-button: nbf__dropdown-button, sd_dropdown-content: nbf__dropdown-content\"\n />\n </div>\n );\n case 'checkbox':\n return (\n <div class=\"input-wrapper\" part=\"nbf__input-wrapper\">\n <checkbox-component\n readOnly={fieldReadOnly}\n label={label}\n name={key}\n id={key}\n checked={defaultValue === 'true'}\n required={field.required}\n themeConfig={this.themeConfig}\n errorMessage={i18next.t('fieldRequired', { field: label })}\n part=\"nbf__checkbox-component\"\n />\n </div>\n );\n case 'radio_button':\n return (\n <div class=\"input-wrapper\" part=\"nbf__input-wrapper\">\n <radio-button-group\n label={label}\n name={key}\n id={key}\n readOnly={fieldReadOnly}\n defaultSelectedValue={defaultValue && field.options?.includes(defaultValue) ? defaultValue : field.options?.[0] || ''}\n options={field.options?.map(option => ({ value: option, label: option }))}\n required={field.required}\n themeConfig={this.themeConfig}\n errorMessage={i18next.t('fieldRequired', { field: label })}\n part=\"nbf__radio-button-group\"\n />\n </div>\n );\n case 'multi_line_text':\n return (\n <div class=\"input-wrapper\" part=\"nbf__input-wrapper\">\n <textarea-component\n readOnly={fieldReadOnly}\n label={label}\n defaultValue={defaultValue}\n name={key}\n id={key}\n required={field.required}\n themeConfig={this.themeConfig}\n errorMessage={i18next.t('fieldRequired', { field: label })}\n part=\"nbf__textarea-component\"\n />\n </div>\n );\n case 'date':\n return (\n <div class=\"input-wrapper\" part=\"nbf__input-wrapper\">\n <nylas-date-component\n readOnly={fieldReadOnly}\n label={label}\n defaultValue={defaultValue}\n name={key}\n id={key}\n required={field.required}\n themeConfig={this.themeConfig}\n errorMessage={i18next.t('invalidDate')}\n patternError={i18next.t('invalidInputFormat', { field: label })}\n requiredError={i18next.t('fieldRequired', { field: label })}\n part=\"nbf__date-component\"\n />\n </div>\n );\n case 'multi_select': {\n const defaultValues = defaultValue?.split(',').map(item => item.trim()) || [];\n return (\n <div>\n <multi-select-dropdown\n label={label}\n name={key}\n id={key}\n readOnly={fieldReadOnly}\n selectAtLeastOneOptionLabel={i18next.t('selectOneOrMoreOptions')}\n multipleOptionsSelectedLabel={i18next.t('multipleOptionsSelected')}\n options={field.options?.map(option => ({ value: option, label: option, selected: defaultValues.includes(option) }))}\n required={field.required}\n themeConfig={this.themeConfig}\n errorMessage={i18next.t('selectAtLeastOneOption')}\n exportparts=\"msd_dropdown: nbf__ms_dropdown, msd_dropdown-label: nbf__ms_dropdown-label, msd_dropdown-button: nbf__ms_dropdown-button, msd_dropdown-content: nbf__ms_dropdown-content, msd_dropdown_error: nbf__ms_dropdown_error, msd_dropdown-button--error: nbf__ms_dropdown-button--error\"\n ></multi-select-dropdown>\n </div>\n );\n }\n case 'metadata':\n return null;\n default:\n return (\n <div class=\"input-wrapper\" part=\"nbf__input-wrapper\">\n <input-component\n label={label}\n name={key}\n id={key}\n type={field.type}\n readOnly={fieldReadOnly}\n defaultValue={defaultValue || ''}\n requiredError={i18next.t('fieldRequired', { field: label })}\n patternError={i18next.t('invalidInputFormat', { field: label })}\n required={field.required}\n part=\"nbf__input-textfield\"\n themeConfig={this.themeConfig}\n />\n </div>\n );\n }\n })}\n {/* <slot name=\"custom-booking-form\"></slot> */}\n </div>\n <div class=\"cta\">\n {showConsentMessage && <div class=\"consent-disclaimer\">{i18next.t('notetakerConsentMessage')}</div>}\n <button-component variant={'basic'} class=\"back\" part=\"nbf__button-outline\" isLoading={this.backButtonLoading && this.isLoading} onClick={this.handleBackButtonClicked}>\n <slot name=\"booking-form-back-label\">{`${i18next.t('backButton')}`}</slot>\n </button-component>\n <button-component variant={'primary'} isLoading={!this.backButtonLoading && this.isLoading} disabled={this.isLoading} part=\"nbf__button-primary\" type=\"submit\">\n <slot name=\"booking-form-book-label\">{`${i18next.t('bookNowButton')}`}</slot>\n </button-component>\n </div>\n </form>\n </Host>\n );\n }\n}\n","@use '../../../common/styles/variables' as *;\n\n:host {\n @include default-css-variables;\n display: block;\n width: 400px;\n font-family: var(--nylas-font-family);\n}\n\n.nylas-cancel-booking-form {\n form {\n width: 100%;\n }\n\n display: flex;\n align-items: center;\n flex-direction: column;\n background-color: var(--nylas-base-0);\n color: var(--nylas-base-800);\n border-radius: var(--nylas-border-radius-2x);\n padding: 1.5rem;\n position: relative;\n box-shadow:\n 0px 1px 4px rgba(0, 0, 0, 0.1),\n 0px 3px 6px rgba(0, 0, 0, 0.06);\n}\n\n.nylas-cancel-booking-form__title {\n font-size: 18px;\n font-weight: 600;\n margin-bottom: 0;\n color: var(--nylas-base-900);\n}\n\n.nylas-cancel-booking-form__description {\n font-size: 16px;\n font-style: normal;\n font-weight: 400;\n line-height: 140%;\n color: var(--nylas-base-600);\n padding-bottom: 1.25rem;\n}\n\n.nylas-cancel-booking-form__calendar-icon {\n width: 3rem;\n height: 3rem;\n border-radius: 50%;\n position: absolute;\n top: -1.25rem;\n left: 50%;\n transform: translateX(-50%);\n background-color: var(--nylas-base-0);\n border: 1px solid var(--nylas-base-200);\n}\n\ncalendar-cancel-icon {\n display: flex;\n align-items: center;\n justify-content: center;\n height: 100%;\n}\n\n.footer {\n display: grid;\n grid-template-columns: 1fr 1fr;\n width: 100%;\n padding-top: 1.25rem;\n gap: 1rem;\n border-top: 1px solid var(--nylas-base-200);\n margin-top: 1.25rem;\n}\n","import { RegisterComponent } from '@/common/register-component';\nimport { Component, Element, Event, EventEmitter, h, Host, Listen, Prop, State, Watch } from '@stencil/core';\nimport { NylasSchedulerConnector } from '../../..';\nimport { NylasScheduling } from '../nylas-scheduling/nylas-scheduling';\nimport { debug } from '@/utils/utils';\nimport { Notification, NylasSchedulerErrorResponse, ThemeConfig, Timeslot } from '@nylas/core';\nimport { ConfigSettings } from '@/stores/scheduler-store';\nimport i18next from '@/utils/i18n';\nimport { NylasEvent } from '@/common/types';\nimport { LANGUAGE_CODE } from '@/common/constants';\n\n/**\n * The `nylas-cancel-booking-form` component is a UI component that allows users to cancel a booking (DELETE request).\n * This component is also used to reject a booking (PUT request) by the organizer, if the prop `rejectBookingId` is provided.\n *\n * @part ncbf - The cancel booking form container.\n * @part ncbf__icon - The calendar icon.\n * @part ncbf__title - The title of the cancel booking form.\n * @part ncbf__description - The description of the cancel booking form.\n * @part ncbf__reason-textarea - The reason textarea.\n * @part ncbf__button-cta - The cancel booking form CTA button.\n * @part ncbf__button-outline - The cancel booking form outline button.\n * @part ncbf__card - The cancel booking form card.\n */\n@Component({\n tag: 'nylas-cancel-booking-form',\n styleUrl: 'nylas-cancel-booking-form.scss',\n shadow: true,\n})\nexport class NylasCancelBookingForm {\n private textareaRef?: HTMLTextareaComponentElement;\n /**\n * The host element.\n * Used to manage the host element of the provider.\n */\n @Element() private host!: HTMLNylasCancelBookingFormElement;\n\n /**\n * The booking ID to cancel.\n */\n @Prop() readonly cancelBookingId?: string;\n\n /**\n * The booking ID to reject.\n */\n @Prop() readonly rejectBookingId?: string;\n\n /**\n * The selected timeslot.\n */\n @Prop() readonly selectedTimeslot!: Timeslot;\n\n /**\n * @standalone\n * The config settings.\n */\n @Prop() readonly configSettings?: ConfigSettings;\n\n /**\n * @standalone\n * The event info.\n */\n @Prop() readonly eventInfo?: NylasEvent;\n\n /**\n * @standalone\n * The loading state.\n */\n @Prop() readonly isLoading?: boolean;\n\n /**\n * @standalone\n * The theme configuration.\n */\n @Prop({ attribute: 'theme-config' }) readonly themeConfig?: any;\n\n /**\n * @standalone\n * The default language.\n */\n @Prop() readonly selectedLanguage?: LANGUAGE_CODE;\n\n /**\n * This event is fired when the Go back button is clicked on the cancel booking form.\n */\n @Event() readonly goBackButtonClicked!: EventEmitter<void>;\n\n /**\n * This event is fired when the cancel booking form is submitted.\n */\n @Event() readonly cancelBookingFormSubmitted!: EventEmitter<{\n bookingId: string;\n action: 'reject' | 'cancel';\n reason: string;\n errorHandler?: (error: NylasSchedulerErrorResponse) => void;\n }>;\n\n /**\n * This event is only for triggering the validation on the text area for cancellation reason. This is for internal purposes only.\n */\n @Event() readonly triggerValidation!: EventEmitter<{}>;\n /**\n * This event is fired when an error occurs while cancelling the booking.\n */\n @Event() readonly cancelBookedEventError!: EventEmitter<NylasSchedulerErrorResponse>;\n\n /**\n * This event is fired when an error occurs in the booking form.\n */\n @Event() cancelBookingFormError!: EventEmitter<Partial<Notification>>;\n\n /**\n * The reason for cancellation.\n */\n @State() cancellationReason: string = '';\n\n @State() cancellationError: string = '';\n\n @State() cancellationPolicy: string = this.configSettings?.scheduler?.cancellation_policy || 'Your current timeslot will become available to others.';\n\n @Watch('configSettings')\n configSettingsChangedHandler(newValue: ConfigSettings) {\n this.cancellationPolicy = newValue?.scheduler?.cancellation_policy || 'Your current timeslot will become available to others.';\n }\n\n @Watch('themeConfig')\n themeConfigChanged(newThemeConfig: ThemeConfig) {\n this.applyThemeConfig(newThemeConfig);\n }\n\n @Watch('selectedLanguage')\n selectedLanguageChangedHandler(newVal: LANGUAGE_CODE, oldVal: LANGUAGE_CODE) {\n if (newVal === oldVal) return;\n i18next.changeLanguage(newVal);\n }\n\n connectedCallback() {\n debug(`[nylas-cancel-booking-form] Component connected`);\n // Use queueMicrotask to defer theme application until after React has set props.\n // This fixes the timing issue where connectedCallback fires before React sets themeConfig.\n queueMicrotask(() => {\n if (this.themeConfig) {\n this.applyThemeConfig(this.themeConfig);\n this.host.setAttribute('data-themed', '');\n }\n });\n }\n\n async componentWillLoad() {\n debug(`[nylas-cancel-booking-form] Component will load`);\n }\n\n async componentDidLoad() {\n debug(`[nylas-cancel-booking-form] Component did load`);\n if (!this.cancelBookingId) {\n debug(`[nylas-cancel-booking-form] No booking ID provided, \"cancelBookingId\" prop is required.`);\n }\n }\n\n disconnectedCallback() {\n debug(`[nylas-cancel-booking-form] Component disconnected`);\n }\n\n applyThemeConfig(themeConfig?: ThemeConfig) {\n if (themeConfig) {\n for (const [key, value] of Object.entries(themeConfig)) {\n this.host.style.setProperty(`${key}`, value);\n this.textareaRef?.style.setProperty(`${key}`, value);\n }\n }\n }\n\n private handleGoBackClicked = () => {\n this.goBackButtonClicked.emit();\n };\n\n private handleSubmitCancelBooking = (event: Event) => {\n this.triggerValidation.emit({});\n event.preventDefault();\n if (!this.cancellationReason) {\n this.cancellationError = i18next.t('cancellationErrorMessage');\n this.cancelBookingFormError.emit({ title: i18next.t('cancelBokingFormError'), description: i18next.t('cancellationErrorMessage') });\n return;\n }\n\n const minCancellationNotice = this.configSettings?.scheduler?.min_cancellation_notice;\n if (this.selectedTimeslot && minCancellationNotice) {\n const startTime = new Date(this.selectedTimeslot?.start_time);\n const dateTillCancellation = startTime.getTime() - minCancellationNotice * 60 * 1000;\n\n if (dateTillCancellation < new Date().getTime()) {\n this.cancelBookedEventError.emit({\n error: {\n title: i18next.t('cancellationErrorTitle'),\n message: i18next.t('minimumCancellationNoticeErrorMessage', { minCancellationNotice }),\n },\n });\n return;\n }\n }\n\n debug(`[nylas-cancel-booking-form] Cancel booking form submitted with reason: ${this.cancellationReason}`);\n const errorHandler = (error: NylasSchedulerErrorResponse) => {\n this.cancelBookedEventError.emit(error);\n };\n if (this.cancelBookingId) {\n this.cancelBookingFormSubmitted.emit({ bookingId: this.cancelBookingId, action: 'cancel', reason: this.cancellationReason, errorHandler });\n } else if (this.rejectBookingId) {\n this.cancelBookingFormSubmitted.emit({ bookingId: this.rejectBookingId, action: 'reject', reason: this.cancellationReason, errorHandler });\n }\n };\n\n @Listen('nylasFormInputChanged')\n handleNylasFormInputChanged(event: CustomEvent<{ value: string; name: string; error: string; label: string; type: string }>) {\n this.triggerValidation.emit({});\n if (event.detail.name === 'cancel-reason') {\n this.cancellationReason = event.detail.value;\n this.cancellationError = event.detail.error;\n }\n }\n\n @RegisterComponent<NylasCancelBookingForm, NylasSchedulerConnector, Exclude<NylasScheduling['stores'], undefined>>({\n name: 'nylas-cancel-booking-form',\n stateToProps: new Map([\n ['scheduler.configSettings', 'configSettings'],\n ['scheduler.selectedTimeslot', 'selectedTimeslot'],\n ['scheduler.eventInfo', 'eventInfo'],\n ['scheduler.isLoading', 'isLoading'],\n ['scheduler.cancelBookingId', 'cancelBookingId'],\n ['scheduler.rejectBookingId', 'rejectBookingId'],\n ['scheduler.themeConfig', 'themeConfig'],\n ['scheduler.selectedLanguage', 'selectedLanguage'],\n ]),\n eventToProps: {\n cancelBookingFormSubmitted: async (\n event: CustomEvent<{ bookingId: string; action: 'reject' | 'cancel'; reason: string; errorHandler?: (error: NylasSchedulerErrorResponse) => void }>,\n nylasSchedulerConnector: NylasSchedulerConnector,\n ) => {\n const { action, errorHandler } = event.detail;\n if (action === 'cancel') {\n const result = await nylasSchedulerConnector.scheduler.cancelBooking(event.detail.bookingId, event.detail.reason);\n if (errorHandler && (!result || 'error' in result)) {\n errorHandler(result);\n }\n } else if (action === 'reject') {\n const result = await nylasSchedulerConnector.scheduler.updateBooking({\n bookingId: event.detail.bookingId,\n status: 'cancelled',\n reason: event.detail.reason,\n });\n if (errorHandler && (!result || 'error' in result)) {\n errorHandler(result);\n }\n }\n },\n goBackButtonClicked: async (event: CustomEvent<void>, nylasSchedulerConnector: NylasSchedulerConnector) => {\n debug('nylas-cancel-booking-form', 'goBackButtonClicked', event.detail);\n nylasSchedulerConnector.scheduler.goBack();\n },\n cancelBookedEventError: async (event: CustomEvent<NylasSchedulerErrorResponse>, _nylasSchedulerConnector: NylasSchedulerConnector) => {\n debug('nylas-cancel-booking-form', 'cancelBookedEventError', event.detail);\n },\n cancelBookingFormError: async (event: CustomEvent<Partial<Notification>>, _nylasSchedulerConnector: NylasSchedulerConnector) => {\n debug('nylas-cancel-booking-form', 'cancelBookingFormError', event.detail);\n },\n },\n fireRegisterEvent: true,\n })\n render() {\n return (\n <Host part=\"ncbf\">\n <div class=\"nylas-cancel-booking-form\" part=\"ncbf__card\">\n <div class=\"nylas-cancel-booking-form__calendar-icon\" part=\"ncbf__icon\">\n <calendar-cancel-icon />\n </div>\n <h3 class=\"nylas-cancel-booking-form__title\" part=\"ncbf__title\">\n {i18next.t('cancelBookingTitle')}\n </h3>\n <div class=\"nylas-cancel-booking-form__description\" part=\"ncbf__description\">\n {!this.configSettings?.scheduler?.cancellation_policy ? `${i18next.t('cancelBookingMessage')}` : this.cancellationPolicy}\n </div>\n <form onSubmit={this.handleSubmitCancelBooking}>\n <textarea-component\n id=\"cancel-reason\"\n name=\"cancel-reason\"\n ref={el => (this.textareaRef = el)}\n required={true}\n label={i18next.t('reasonForCancellation')}\n class={this.cancellationError ? 'error' : ''}\n part=\"ncbf__reason-textarea\"\n defaultValue={this.cancellationReason}\n ></textarea-component>\n <div class=\"footer\">\n <button-component variant={'destructive'} class=\"cancel\" type=\"submit\" part=\"ncbf__button-cta\" disabled={this.isLoading}>\n {i18next.t('cancelBookingButton')}\n </button-component>\n {!!this.eventInfo && (\n <button-component variant={'basic'} class=\"back\" part=\"ncbf__button-outline\" onClick={this.handleGoBackClicked}>\n {i18next.t('goBackButton')}\n </button-component>\n )}\n </div>\n </form>\n </div>\n </Host>\n );\n }\n}\n","@use '../../../common/styles/variables' as *;\n\n:host {\n display: block;\n @include default-css-variables;\n}\n\n.nylas-cancelled-event-card {\n height: inherit;\n display: flex;\n flex-direction: column;\n justify-content: space-between;\n align-items: center;\n font-family: var(--nylas-font-family);\n width: 400px;\n background-color: var(--nylas-base-0);\n color: var(--nylas-base-800);\n border-radius: var(--nylas-border-radius-2x);\n padding: 1.5rem;\n position: relative;\n box-shadow:\n 0px 1px 4px rgba(0, 0, 0, 0.1),\n 0px 3px 6px rgba(0, 0, 0, 0.06);\n\n @media #{$mobile} {\n width: inherit;\n }\n}\n\n.nylas-cancelled-event-card__title {\n font-size: 18px;\n font-weight: 600;\n line-height: 24px;\n color: var(--nylas-base-900);\n text-align: center;\n}\n\n.nylas-cancelled-event-description {\n font-size: 16px;\n font-weight: 500;\n color: var(--nylas-base-600);\n}\n\n.nylas-cancelled-event-card__calendar-icon {\n width: 3rem;\n height: 3rem;\n border-radius: 50%;\n position: absolute;\n top: -1.25rem;\n left: 50%;\n transform: translateX(-50%);\n background-color: var(--nylas-base-0);\n border: 1px solid var(--nylas-base-200);\n}\n\n.nylas-cancelled-event-card__cta {\n width: 100%;\n display: flex;\n flex-direction: row;\n align-items: flex-start;\n margin-top: 1rem;\n}\n\ncalendar-cancel-icon {\n display: flex;\n align-items: center;\n justify-content: center;\n height: 100%;\n}\n\nbutton-component {\n width: 100%;\n}\n","import { RegisterComponent } from '@/common/register-component';\nimport { Component, Element, Event, EventEmitter, h, Host, Prop, State, Watch } from '@stencil/core';\nimport { LANGUAGE_CODE, NylasEvent, NylasSchedulerConnector, NylasSchedulerErrorResponse } from '../../..';\nimport { NylasScheduling } from '../nylas-scheduling/nylas-scheduling';\nimport { debug } from '@/utils/utils';\nimport { ConfigSettings } from '@/stores/scheduler-store';\nimport i18next from '@/utils/i18n';\nimport { ThemeConfig } from '@nylas/core';\n\n/**\n * The `nylas-cancelled-event-card` component is a UI component that displays the cancelled event card.\n *\n * @part ncec - The cancelled event card host.\n * @part ncec__icon - The calendar icon.\n * @part ncec__title - The title of the cancelled event card.\n * @part ncec__description - The description of the cancelled event card.\n * @part ncec__button-outline - The close button CTA.\n * @part ncec__card - The cancelled event card.\n */\n@Component({\n tag: 'nylas-cancelled-event-card',\n styleUrl: 'nylas-cancelled-event-card.scss',\n shadow: true,\n})\nexport class NylasCancelledEventCard {\n /**\n * The host element.\n * Used to manage the host element of the provider.\n */\n @Element() private host!: HTMLNylasCancelledEventCardElement;\n\n /**\n * @standalone\n * The config settings for the scheduler.\n */\n @Prop() readonly configSettings?: ConfigSettings;\n\n /**\n * @standalone\n * The theme configuration.\n */\n @Prop({ attribute: 'theme-config' }) readonly themeConfig?: any;\n\n /**\n * The selected language.\n */\n @Prop({ attribute: 'selected-language' }) readonly selectedLanguage?: LANGUAGE_CODE;\n\n /**\n * The participant's name who booked the event / is logged in.\n */\n @Prop() readonly cancelledEventInfo!: Partial<NylasEvent>;\n\n /**\n * Closing state of the cancelled event card button.\n */\n @State() isClosing: boolean = false;\n\n /**\n * This event is fired when the close button is clicked on the cancelled event card.\n */\n @Event() readonly closeCancelEventCardClicked!: EventEmitter<{ errorHandler?: (error: NylasSchedulerErrorResponse) => void }>;\n\n /**\n * This event is fired when an error occurs.\n */\n @Event() readonly cancelledEventCardError!: EventEmitter<NylasSchedulerErrorResponse>;\n\n @Watch('selectedLanguage')\n selectedLanguageChangedHandler(newVal: LANGUAGE_CODE, oldVal: LANGUAGE_CODE) {\n if (newVal === oldVal) return;\n i18next.changeLanguage(newVal);\n }\n\n @Watch('themeConfig')\n themeConfigChanged(newThemeConfig: ThemeConfig) {\n this.applyThemeConfig(newThemeConfig);\n }\n\n connectedCallback() {\n debug(`[nylas-cancelled-event-card] Component connected`);\n // Use queueMicrotask to defer theme application until after React has set props.\n // This fixes the timing issue where connectedCallback fires before React sets themeConfig.\n queueMicrotask(() => {\n if (this.themeConfig) {\n this.applyThemeConfig(this.themeConfig);\n this.host.setAttribute('data-themed', '');\n }\n });\n }\n\n async componentWillLoad() {\n debug(`[nylas-cancelled-event-card] Component will load`);\n }\n\n async componentDidLoad() {\n debug(`[nylas-cancelled-event-card] Component did load`);\n if (!this.cancelledEventInfo) {\n debug(`[nylas-cancelled-event-card] No cancelled event info provided, \"cancelledEventInfo\" prop is required.`);\n }\n }\n\n disconnectedCallback() {\n debug(`[nylas-cancelled-event-card] Component disconnected`);\n }\n\n applyThemeConfig(themeConfig?: ThemeConfig) {\n if (themeConfig) {\n for (const [key, value] of Object.entries(themeConfig)) {\n this.host.style.setProperty(`${key}`, value);\n }\n }\n }\n\n private handleCloseClicked = () => {\n this.isClosing = true;\n const errorHandler = (error: NylasSchedulerErrorResponse) => {\n this.cancelledEventCardError.emit(error);\n this.isClosing = false;\n };\n this.closeCancelEventCardClicked.emit({ errorHandler });\n };\n\n @RegisterComponent<NylasCancelledEventCard, NylasSchedulerConnector, Exclude<NylasScheduling['stores'], undefined>>({\n name: 'nylas-cancelled-event-card',\n stateToProps: new Map([\n ['scheduler.configSettings', 'configSettings'],\n ['scheduler.themeConfig', 'themeConfig'],\n ['scheduler.selectedLanguage', 'selectedLanguage'],\n ]),\n eventToProps: {\n closeCancelEventCardClicked: async (_: CustomEvent<{ errorHandler?: (error: NylasSchedulerErrorResponse) => void }>, nylasschedulerconnector: NylasSchedulerConnector) => {\n const result = await nylasschedulerconnector.scheduler.resetCancel();\n\n const { errorHandler } = _.detail;\n if (errorHandler && (!result || 'error' in result)) {\n errorHandler(result);\n }\n },\n cancelledEventCardError: async (event: CustomEvent<NylasSchedulerErrorResponse>, _nylasschedulerconnector: NylasSchedulerConnector) => {\n debug('nylas-cancelled-event-card', 'cancelledEventCardError', event.detail);\n },\n },\n fireRegisterEvent: true,\n })\n render() {\n return (\n <Host part=\"ncec\">\n <div class=\"nylas-cancelled-event-card\" part=\"ncec__card\">\n <div class=\"nylas-cancelled-event-card__calendar-icon\" part=\"ncec__icon\">\n <calendar-cancel-icon />\n </div>\n <h3 class=\"nylas-cancelled-event-card__title\" part=\"ncec__title\">\n {i18next.t('bookingCancelledTitle')}!\n </h3>\n <div class=\"nylas-cancelled-event-card__description\" part=\"ncec__description\">\n {i18next.t('bookingCancelledMessage')} {this.configSettings?.organizer?.name || i18next.t('bookingCancelledMessage_theParticipants')}.\n </div>\n <div class=\"nylas-cancelled-event-card__cta\">\n <button-component variant=\"basic\" disabled={this.isClosing} part=\"ncec__button-outline\" onClick={this.handleCloseClicked}>\n {this.isClosing ? `${i18next.t('closingButton')}...` : `${i18next.t('closeButton')}`}\n </button-component>\n </div>\n </div>\n </Host>\n );\n }\n}\n","@use '../../../common/styles/variables' as *;\n\n:host {\n display: block;\n @include default-css-variables;\n}\n\n.nylas-confirmed-event-card {\n height: inherit;\n display: flex;\n flex-direction: column;\n justify-content: space-between;\n align-items: center;\n font-family: var(--nylas-font-family);\n width: 400px;\n\n background-color: var(--nylas-base-0);\n color: var(--nylas-base-800);\n border-radius: var(--nylas-border-radius-2x);\n padding: 1.5rem;\n position: relative;\n box-shadow:\n 0px 1px 4px rgba(0, 0, 0, 0.1),\n 0px 3px 6px rgba(0, 0, 0, 0.06);\n\n @media #{$mobile} {\n width: inherit;\n }\n}\n\n.nylas-confirmed-event-card__title {\n font-size: 18px;\n font-weight: 600;\n line-height: 24px;\n color: var(--nylas-base-900);\n text-align: center;\n}\n\n.nylas-confirmed-event-description {\n font-size: 16px;\n font-weight: 500;\n color: var(--nylas-base-600);\n}\n\n.nylas-confirmed-event-card__calendar-icon {\n width: 3rem;\n height: 3rem;\n border-radius: 50%;\n position: absolute;\n top: -1.25rem;\n left: 50%;\n transform: translateX(-50%);\n background-color: var(--nylas-base-0);\n border: 1px solid var(--nylas-base-200);\n}\n\n.nylas-confirmed-event-card__cta {\n width: 100%;\n display: flex;\n flex-direction: row;\n align-items: flex-start;\n margin-top: 1rem;\n}\n\ncalendar-check-icon {\n display: flex;\n align-items: center;\n justify-content: center;\n height: 100%;\n}\n\nbutton-component {\n width: 100%;\n}\n","import { RegisterComponent } from '@/common/register-component';\nimport { Component, Element, Event, EventEmitter, h, Host, Prop, State, Watch } from '@stencil/core';\nimport { LANGUAGE_CODE, NylasEvent, NylasSchedulerConnector, NylasSchedulerErrorResponse } from '../../..';\nimport { NylasScheduling } from '../nylas-scheduling/nylas-scheduling';\nimport { debug } from '@/utils/utils';\nimport { ConfigSettings } from '@/stores/scheduler-store';\nimport i18next from '@/utils/i18n';\nimport { ThemeConfig } from '@nylas/core';\n\n/**\n * The `nylas-confirmed-event-card` component is a UI component that displays the confirmed event card.\n *\n * @part ncec - The confirmed event card host.\n * @part ncec__icon - The calendar icon.\n * @part ncec__title - The title of the confirmed event card.\n * @part ncec__description - The description of the confirmed event card.\n * @part ncec__button-outline - The close button CTA.\n * @part ncec__card - The confirmed event card.\n */\n@Component({\n tag: 'nylas-confirmed-event-card',\n styleUrl: 'nylas-confirmed-event-card.scss',\n shadow: true,\n})\nexport class NylasConfirmedEventCard {\n /**\n * The host element.\n * Used to manage the host element of the provider.\n */\n @Element() private host!: HTMLNylasConfirmedEventCardElement;\n\n /**\n * @standalone\n * The config settings for the scheduler.\n */\n @Prop() readonly configSettings?: ConfigSettings;\n\n /**\n * @standalone\n * The theme configuration.\n */\n @Prop({ attribute: 'theme-config' }) readonly themeConfig?: any;\n\n /**\n * The selected language.\n */\n @Prop({ attribute: 'selected-language' }) readonly selectedLanguage?: LANGUAGE_CODE;\n\n /**\n * The participant's name who booked the event / is logged in.\n */\n @Prop() readonly confirmedEventInfo!: Partial<NylasEvent>;\n\n /**\n * Closing state of the confirmed event card button.\n */\n @State() isClosing: boolean = false;\n\n /**\n * This event is fired when the close button is clicked on the confirmed event card.\n */\n @Event() readonly closeConfirmEventCardClicked!: EventEmitter<{ errorHandler?: (error: NylasSchedulerErrorResponse) => void }>;\n\n /**\n * This event is fired when an error occurs.\n */\n @Event() readonly confirmedEventCardError!: EventEmitter<NylasSchedulerErrorResponse>;\n\n @Watch('themeConfig')\n themeConfigChanged(newThemeConfig: ThemeConfig) {\n this.applyThemeConfig(newThemeConfig);\n }\n\n @Watch('selectedLanguage')\n selectedLanguageChangedHandler(newVal: LANGUAGE_CODE, oldVal: LANGUAGE_CODE) {\n if (newVal === oldVal) return;\n i18next.changeLanguage(newVal);\n }\n\n connectedCallback() {\n debug(`[nylas-confirmed-event-card] Component connected`);\n // Use queueMicrotask to defer theme application until after React has set props.\n // This fixes the timing issue where connectedCallback fires before React sets themeConfig.\n queueMicrotask(() => {\n if (this.themeConfig) {\n this.applyThemeConfig(this.themeConfig);\n this.host.setAttribute('data-themed', '');\n }\n });\n }\n\n async componentWillLoad() {\n debug(`[nylas-confirmed-event-card] Component will load`);\n }\n\n async componentDidLoad() {\n debug(`[nylas-confirmed-event-card] Component did load`);\n if (!this.confirmedEventInfo) {\n debug(`[nylas-confirmed-event-card] No confirmed event info provided, \"confirmedEventInfo\" prop is required.`);\n }\n }\n\n disconnectedCallback() {\n debug(`[nylas-confirmed-event-card] Component disconnected`);\n }\n\n applyThemeConfig(themeConfig?: ThemeConfig) {\n if (themeConfig) {\n for (const [key, value] of Object.entries(themeConfig)) {\n this.host.style.setProperty(`${key}`, value);\n }\n }\n }\n\n private handleCloseClicked = () => {\n this.isClosing = true;\n const errorHandler = (error: NylasSchedulerErrorResponse) => {\n this.confirmedEventCardError.emit(error);\n this.isClosing = false;\n };\n this.closeConfirmEventCardClicked.emit({ errorHandler });\n };\n\n @RegisterComponent<NylasConfirmedEventCard, NylasSchedulerConnector, Exclude<NylasScheduling['stores'], undefined>>({\n name: 'nylas-confirmed-event-card',\n stateToProps: new Map([\n ['scheduler.configSettings', 'configSettings'],\n ['scheduler.themeConfig', 'themeConfig'],\n ['scheduler.selectedLanguage', 'selectedLanguage'],\n ]),\n eventToProps: {\n closeConfirmEventCardClicked: async (_: CustomEvent<{ errorHandler?: (error: NylasSchedulerErrorResponse) => void }>, nylasschedulerconnector: NylasSchedulerConnector) => {\n const result = await nylasschedulerconnector.scheduler.resetConfirm();\n\n const { errorHandler } = _.detail;\n if (errorHandler && (!result || 'error' in result)) {\n errorHandler(result);\n }\n },\n },\n fireRegisterEvent: true,\n })\n render() {\n return (\n <Host part=\"ncec\">\n <div class=\"nylas-confirmed-event-card\" part=\"ncec__card\">\n <div class=\"nylas-confirmed-event-card__calendar-icon\" part=\"ncec__icon\">\n <calendar-check-icon />\n </div>\n <h3 class=\"nylas-confirmed-event-card__title\" part=\"ncec__title\">\n {i18next.t('confirmedEventCardTitle')}!\n </h3>\n <div class=\"nylas-confirmed-event-card__description\" part=\"ncec__description\">\n {i18next.t('confirmedEventCardDescription')} {this.configSettings?.organizer?.name || 'the participants'}.\n </div>\n <div class=\"nylas-confirmed-event-card__cta\">\n <button-component variant=\"basic\" disabled={this.isClosing} part=\"ncec__button-outline\" onClick={this.handleCloseClicked}>\n {this.isClosing ? `${i18next.t('closingButton')}...` : `${i18next.t('closeButton')}`}\n </button-component>\n </div>\n </div>\n </Host>\n );\n }\n}\n","const t0 = new Date, t1 = new Date;\n\nexport function timeInterval(floori, offseti, count, field) {\n\n function interval(date) {\n return floori(date = arguments.length === 0 ? new Date : new Date(+date)), date;\n }\n\n interval.floor = (date) => {\n return floori(date = new Date(+date)), date;\n };\n\n interval.ceil = (date) => {\n return floori(date = new Date(date - 1)), offseti(date, 1), floori(date), date;\n };\n\n interval.round = (date) => {\n const d0 = interval(date), d1 = interval.ceil(date);\n return date - d0 < d1 - date ? d0 : d1;\n };\n\n interval.offset = (date, step) => {\n return offseti(date = new Date(+date), step == null ? 1 : Math.floor(step)), date;\n };\n\n interval.range = (start, stop, step) => {\n const range = [];\n start = interval.ceil(start);\n step = step == null ? 1 : Math.floor(step);\n if (!(start < stop) || !(step > 0)) return range; // also handles Invalid Date\n let previous;\n do range.push(previous = new Date(+start)), offseti(start, step), floori(start);\n while (previous < start && start < stop);\n return range;\n };\n\n interval.filter = (test) => {\n return timeInterval((date) => {\n if (date >= date) while (floori(date), !test(date)) date.setTime(date - 1);\n }, (date, step) => {\n if (date >= date) {\n if (step < 0) while (++step <= 0) {\n while (offseti(date, -1), !test(date)) {} // eslint-disable-line no-empty\n } else while (--step >= 0) {\n while (offseti(date, +1), !test(date)) {} // eslint-disable-line no-empty\n }\n }\n });\n };\n\n if (count) {\n interval.count = (start, end) => {\n t0.setTime(+start), t1.setTime(+end);\n floori(t0), floori(t1);\n return Math.floor(count(t0, t1));\n };\n\n interval.every = (step) => {\n step = Math.floor(step);\n return !isFinite(step) || !(step > 0) ? null\n : !(step > 1) ? interval\n : interval.filter(field\n ? (d) => field(d) % step === 0\n : (d) => interval.count(0, d) % step === 0);\n };\n }\n\n return interval;\n}\n","export const durationSecond = 1000;\nexport const durationMinute = durationSecond * 60;\nexport const durationHour = durationMinute * 60;\nexport const durationDay = durationHour * 24;\nexport const durationWeek = durationDay * 7;\nexport const durationMonth = durationDay * 30;\nexport const durationYear = durationDay * 365;\n","import {timeInterval} from \"./interval.js\";\nimport {durationDay, durationMinute} from \"./duration.js\";\n\nexport const timeDay = timeInterval(\n date => date.setHours(0, 0, 0, 0),\n (date, step) => date.setDate(date.getDate() + step),\n (start, end) => (end - start - (end.getTimezoneOffset() - start.getTimezoneOffset()) * durationMinute) / durationDay,\n date => date.getDate() - 1\n);\n\nexport const timeDays = timeDay.range;\n\nexport const utcDay = timeInterval((date) => {\n date.setUTCHours(0, 0, 0, 0);\n}, (date, step) => {\n date.setUTCDate(date.getUTCDate() + step);\n}, (start, end) => {\n return (end - start) / durationDay;\n}, (date) => {\n return date.getUTCDate() - 1;\n});\n\nexport const utcDays = utcDay.range;\n\nexport const unixDay = timeInterval((date) => {\n date.setUTCHours(0, 0, 0, 0);\n}, (date, step) => {\n date.setUTCDate(date.getUTCDate() + step);\n}, (start, end) => {\n return (end - start) / durationDay;\n}, (date) => {\n return Math.floor(date / durationDay);\n});\n\nexport const unixDays = unixDay.range;\n","@use '../../../common/styles/variables' as *;\n\n:host {\n display: block;\n min-height: 444px;\n @include default-css-variables;\n\n @media #{$mobile} {\n min-height: auto;\n }\n}\n\n.nylas-date-picker {\n display: flex;\n gap: 1rem;\n flex-direction: column;\n}\n\n.header {\n margin: 0 0.5rem;\n height: 48px;\n\n h2 {\n font-size: 1.3125rem;\n font-weight: 400;\n line-height: 1rem;\n color: var(--nylas-base-800);\n\n strong {\n font-weight: 600;\n }\n }\n}\n\n.title {\n margin: 0 -1.25rem;\n display: flex;\n flex-direction: column;\n padding: 0 1.5rem;\n gap: 0.5rem;\n border-bottom: 1px solid var(--nylas-base-200);\n font-family: var(--nylas-font-family);\n color: var(--nylas-base-800);\n\n h1 {\n max-width: 376px;\n margin-bottom: 0;\n font-size: 18px;\n line-height: 20px;\n font-weight: 600;\n display: flex;\n gap: 0.5rem;\n align-items: center;\n }\n\n p {\n margin-top: 0;\n font-size: 16px;\n display: flex;\n gap: 0.5rem;\n align-items: center;\n }\n}\n\n@keyframes pulsate {\n 0% {\n background-color: var(--nylas-base-50);\n }\n\n 50% {\n background-color: var(--nylas-base-100);\n }\n\n 100% {\n background-color: var(--nylas-base-50);\n }\n}\n\n.dates {\n display: grid;\n justify-items: center;\n grid-template-columns: repeat(7, 1fr);\n gap: 0.5rem;\n margin-bottom: 24px;\n\n .date {\n position: relative;\n display: flex;\n flex-direction: row;\n justify-content: center;\n align-items: center;\n height: 48px;\n width: 48px;\n min-width: 2rem;\n min-height: 2rem;\n cursor: pointer;\n border-radius: var(--nylas-border-radius-2x);\n font-size: 16px;\n font-weight: 600;\n font-family: inherit;\n color: var(--nylas-base-text);\n background-color: var(--nylas-base-100);\n cursor: pointer;\n\n &:hover:not(:disabled) {\n box-shadow: 0 0 0 2px var(--nylas-base-500) inset;\n }\n\n border: none;\n\n &.date.current-month {\n color: var(--nylas-base-800);\n }\n\n &.date.selected {\n background-color: var(--nylas-primary);\n color: var(--nylas-base-0);\n font-weight: 700;\n }\n\n &.date.day-skeleton {\n color: var(--nylas-base-300);\n }\n\n &:disabled {\n color: var(--nylas-base-300);\n background-color: transparent;\n font-weight: 400;\n cursor: not-allowed;\n }\n\n @media #{$mobile} {\n width: -webkit-fill-available;\n width: -moz-available;\n width: fill-available;\n }\n\n @media #{$x-small-mobile} {\n height: 38px;\n min-width: none;\n }\n }\n\n .day {\n font-size: 12px;\n color: var(--nylas-base-800);\n font-weight: 600;\n letter-spacing: 0.5px;\n height: 32px;\n display: flex;\n align-items: center;\n\n @media #{$mobile} {\n font-size: 14px;\n }\n }\n\n .date.day-skeleton {\n height: 48px;\n width: 48px;\n border-radius: var(--nylas-border-radius-2x);\n animation: pulsate 1.5s infinite ease-in-out;\n background-color: var(--nylas-base-50);\n\n @media #{$x-small-mobile} {\n width: 38px;\n height: 38px;\n min-width: none;\n }\n }\n\n .date.current-day::after {\n content: '';\n position: absolute;\n bottom: 6px;\n left: 50%;\n transform: translateX(-50%);\n width: 6px;\n height: 6px;\n border-radius: 50%;\n background-color: var(--nylas-base-500);\n }\n\n .date.current-day.selected::after {\n background-color: var(--nylas-base-100);\n }\n}\n\n.pagination {\n display: flex;\n flex-direction: row;\n justify-content: space-between;\n align-items: center;\n min-width: 92px;\n\n .chevron-right {\n transform: rotate(180deg);\n }\n\n .button {\n display: flex;\n flex-direction: row;\n justify-content: center;\n align-items: center;\n height: 3vh;\n width: 3vh;\n min-width: 3em;\n min-height: 3em;\n cursor: pointer;\n border-radius: var(--nylas-border-radius-2x);\n\n background-color: transparent;\n color: var(--nylas-base-800);\n cursor: pointer;\n\n &:hover {\n background-color: var(--nylas-base-50);\n }\n\n border: none;\n\n &:active {\n background-color: var(--nylas-base-100);\n }\n\n &:disabled {\n background-color: transparent;\n color: var(--nylas-base-300);\n cursor: not-allowed;\n }\n }\n}\n\n.flex-row {\n display: flex;\n flex-direction: row;\n justify-content: space-between;\n align-items: center;\n color: var(--nylas-base-500);\n}","import { RegisterComponent } from '@/common/register-component';\nimport { addDaysToCurrentDate, convertMinutesToHoursAndMinutes, getFirstDayOfMonth, getLastDayOfMonth, isSameDay, isSameMonth, translateMonth } from '@/utils/utils';\nimport { Component, Element, Event, EventEmitter, Host, Prop, State, Watch, h } from '@stencil/core';\nimport { timeDay } from 'd3-time';\nimport { NylasSchedulerConnector } from '../../..';\nimport { LANGUAGE_CODE } from '@/common/constants';\nimport { NylasScheduling } from '../nylas-scheduling/nylas-scheduling';\nimport { ConfigSettings } from '@/stores/scheduler-store';\nimport i18next from '@/utils/i18n';\nimport { debug } from '@/utils/utils';\nimport { ThemeConfig } from '@nylas/core';\nimport dayjs from 'dayjs';\nimport timezone from 'dayjs/plugin/timezone';\nimport utc from 'dayjs/plugin/utc';\n\n// Initialize dayjs plugins needed for timezone handling\ndayjs.extend(utc);\ndayjs.extend(timezone);\n\n/**\n * The `nylas-date-picker` component is a UI component that allows users to select a date.\n *\n * @part ndp - The date picker host.\n * @part ndp__title - The title.\n * @part ndp__month-header - The month header.\n * @part ndp__month-button - The month button.\n * @part ndp__day - The day.\n * @part ndp__date - The date.\n * @part ndp__date--selected - The selected date.\n * @part ndp__date--current-day - The current day.\n * @part ndp__date--current-month - The dates in the current month.\n * @part ndp__date--disabled - The disabled dates.\n */\n@Component({\n tag: 'nylas-date-picker',\n styleUrl: 'nylas-date-picker.scss',\n shadow: true,\n})\nexport class NylasDatePicker {\n /**\n * The host element.\n * Used to manage the host element of the provider.\n */\n @Element() private host!: HTMLNylasDatePickerElement;\n\n /**\n * @standalone\n * The dates that are selectable.\n */\n @Prop() selectableDates?: Date[];\n\n /**\n * @standalone\n * The config settings.\n */\n @Prop() configSettings?: ConfigSettings;\n\n /**\n * @standalone\n * The theme configuration.\n */\n @Prop({ attribute: 'theme-config' }) readonly themeConfig?: any;\n\n /**\n * The selected timezone.\n */\n @Prop({ attribute: 'selected-timezone' }) readonly selectedTimezone: string = Intl.DateTimeFormat().resolvedOptions().timeZone;\n\n /**\n * The selected date.\n */\n @Prop() selectedDate?: Date;\n\n /**\n * The selected language.\n */\n @Prop() selectedLanguage?: LANGUAGE_CODE;\n\n /**\n * The loading state.\n */\n @Prop() readonly isLoading?: boolean;\n\n /**\n * The event duration.\n */\n @Prop() readonly eventDuration?: number;\n\n /**\n * The month to display.\n */\n @State() month: Date = this.selectedDate || new Date();\n\n /**\n * The dates to render.\n */\n @State() dates: Date[] = this.getDates();\n\n /**\n * The state to disable the next month button.\n */\n @State() disableNextMonthButton: boolean = false;\n\n /**\n * The state to store the selected dates as per the timezone.\n */\n @State() selectableDatesTimezone: Date[] = [];\n\n /**\n * This event is fired when a date is selected.\n */\n @Event() dateSelected!: EventEmitter<Date>;\n\n /**\n * This event is fired when the month is changed.\n */\n @Event() monthChanged!: EventEmitter<Date>;\n\n @Watch('configSettings')\n configSettingsChanged(newConfigSettings: ConfigSettings) {\n const nextMonth = new Date(this.month.getFullYear(), this.month.getMonth() + 1, 1);\n const availableDaysInFuture = newConfigSettings?.scheduler?.available_days_in_future;\n if (availableDaysInFuture === undefined) {\n return;\n }\n const endDate = addDaysToCurrentDate(new Date(), availableDaysInFuture);\n if (endDate.getTime() < nextMonth.getTime()) {\n this.disableNextMonthButton = true;\n } else {\n this.disableNextMonthButton = false;\n }\n }\n\n @Watch('selectedLanguage')\n selectedLanguageChanged(newLanguage: string) {\n i18next.changeLanguage(newLanguage);\n }\n\n @Watch('themeConfig')\n themeConfigChanged(newThemeConfig: ThemeConfig) {\n this.applyThemeConfig(newThemeConfig);\n }\n\n @Watch('selectedDate')\n selectedDateChanged(newSelectedDate: Date) {\n if (!newSelectedDate || !isSameMonth(newSelectedDate, this.month)) {\n this.month = newSelectedDate || new Date();\n }\n this.dates = this.getDates();\n }\n\n /**\n * Helper method to convert dates to the specified timezone, preserving only the date part\n */\n private convertDatesToTimezone(dates: Date[] | undefined, targetTimezone: string): Date[] {\n if (!dates || dates.length === 0) {\n return [];\n }\n\n return dates.map(d => {\n const tzDate = dayjs(d).tz(targetTimezone);\n return new Date(tzDate.year(), tzDate.month(), tzDate.date());\n });\n }\n\n @Watch('selectedTimezone')\n selectedTimezoneChanged(newSelectedTimezone: string) {\n this.selectableDatesTimezone = this.convertDatesToTimezone(this.selectableDates, newSelectedTimezone);\n }\n\n @Watch('selectableDates')\n selectableDatesChanged(newSelectableDates: Date[] | undefined) {\n this.selectableDatesTimezone = this.convertDatesToTimezone(newSelectableDates, this.selectedTimezone);\n }\n\n connectedCallback() {\n // Use queueMicrotask to defer theme application until after React has set props.\n // This fixes the timing issue where connectedCallback fires before React sets themeConfig.\n queueMicrotask(() => {\n if (this.themeConfig) {\n this.applyThemeConfig(this.themeConfig);\n this.host.setAttribute('data-themed', '');\n }\n });\n }\n\n disconnectedCallback() {}\n\n componentWillLoad() {}\n\n componentDidLoad() {\n debug(`[nylas-date-picker] Component did load`);\n this.month = this.selectedDate || new Date();\n this.dates = this.getDates();\n this.selectableDatesTimezone = this.convertDatesToTimezone(this.selectableDates, this.selectedTimezone);\n }\n\n applyThemeConfig(themeConfig?: ThemeConfig) {\n if (themeConfig) {\n for (const [key, value] of Object.entries(themeConfig)) {\n this.host.style.setProperty(`${key}`, value);\n }\n }\n }\n\n /**\n * Get the dates to render, including the days from the previous and next months.\n * @returns The dates to render.\n */\n private getDates() {\n const lastDayOfMonth = getLastDayOfMonth(this.month);\n const firstDayOfMonth = getFirstDayOfMonth(this.month);\n\n return timeDay.range(timeDay.offset(firstDayOfMonth, -firstDayOfMonth.getDay()), timeDay.offset(lastDayOfMonth, 7 - lastDayOfMonth.getDay()));\n }\n\n /**\n * Select a date.\n * @param date The date to select.\n */\n private selectDate(date?: Date) {\n this.dateSelected.emit(date);\n }\n\n /**\n * Change the month.\n * @param change The change in months.\n */\n private changeMonth(change: number) {\n this.month = new Date(this.month.getFullYear(), this.month.getMonth() + change, 1);\n const nextMonth = new Date(this.month.getFullYear(), this.month.getMonth() + 1, 1);\n const availableDaysInFuture = this.configSettings?.scheduler?.available_days_in_future;\n const endDate = addDaysToCurrentDate(new Date(), availableDaysInFuture);\n if (endDate.getTime() < nextMonth.getTime()) {\n this.disableNextMonthButton = true;\n } else {\n this.disableNextMonthButton = false;\n }\n this.dates = this.getDates();\n this.monthChanged.emit(this.month);\n }\n\n private isSelected(date: Date | undefined, selectedDate: Date | undefined, selectableDates: Date[] | undefined) {\n return date && selectedDate && isSameDay(date, selectedDate) && selectableDates && selectableDates?.length > 0;\n }\n\n private isDisabled(date: Date | undefined) {\n if (!date || !this.selectableDatesTimezone || this.selectableDatesTimezone.length === 0) {\n return true;\n }\n\n // Compare only the date parts (year, month, day), ignoring time\n return !this.selectableDatesTimezone.some(d => {\n return date.getFullYear() === d.getFullYear() && date.getMonth() === d.getMonth() && date.getDate() === d.getDate();\n });\n }\n\n @RegisterComponent<NylasDatePicker, NylasSchedulerConnector, Exclude<NylasScheduling['stores'], undefined>>({\n name: 'nylas-date-picker',\n stateToProps: new Map([\n ['scheduler.selectableDates', 'selectableDates'],\n ['scheduler.selectedDate', 'selectedDate'],\n ['scheduler.isLoading', 'isLoading'],\n ['scheduler.configSettings', 'configSettings'],\n ['scheduler.eventDuration', 'eventDuration'],\n ['scheduler.selectedLanguage', 'selectedLanguage'],\n ['scheduler.themeConfig', 'themeConfig'],\n ['scheduler.selectedTimezone', 'selectedTimezone'],\n ]),\n eventToProps: {\n dateSelected: async (event: CustomEvent<Date>, nylasSchedulerConnector: NylasSchedulerConnector) => {\n debug('nylas-date-picker', 'dateSelected', event.detail);\n nylasSchedulerConnector.scheduler.selectDate(event.detail);\n },\n monthChanged: async (event: CustomEvent<Date>, _nylasSchedulerConnector: NylasSchedulerConnector) => {\n debug('nylas-date-picker', 'monthChanged', event.detail);\n },\n },\n fireRegisterEvent: true,\n })\n render() {\n return (\n <Host part=\"ndp\">\n <div class=\"nylas-date-picker\">\n <div class=\"title\" part=\"ndp__title\">\n {this.configSettings?.name ? (\n <h1>{this.configSettings?.name}</h1>\n ) : (\n this.configSettings?.organizer?.name && (\n <h1>\n <person-icon />\n {this.configSettings?.organizer?.name || 'Organizer'}\n </h1>\n )\n )}\n <p>\n <clock-icon />\n {this.eventDuration ? convertMinutesToHoursAndMinutes(this.eventDuration) : `- ${i18next.t('time.minutes')}`}\n </p>\n </div>\n <div class={'header flex-row'}>\n <h2 part={'ndp__month-header'}>\n <strong>{translateMonth(this.month.toLocaleDateString('en-US', { month: 'long' }).toLowerCase())}</strong>\n &nbsp;\n {this.month.toLocaleDateString(undefined, { year: 'numeric' })}\n </h2>\n <div class={'pagination'}>\n <button\n title=\"Previous month\"\n onClick={() => this.changeMonth(-1)}\n class={{ 'chevron-left': true, 'button': true }}\n disabled={this.month <= new Date()}\n part=\"ndp__month-button\"\n >\n <chevron-icon />\n </button>\n <button\n title=\"Next month\"\n onClick={() => this.changeMonth(1)}\n class={{ 'chevron-right': true, 'button': true }}\n disabled={this.disableNextMonthButton}\n part=\"ndp__month-button\"\n >\n <chevron-icon />\n </button>\n </div>\n </div>\n\n <div class={'dates'}>\n {[\n i18next.t('days.sunday'),\n i18next.t('days.monday'),\n i18next.t('days.tuesday'),\n i18next.t('days.wednesday'),\n i18next.t('days.thursday'),\n i18next.t('days.friday'),\n i18next.t('days.saturday'),\n ].map(day => {\n return (\n <div class={'day'} part=\"ndp__day\">\n {day}\n </div>\n );\n })}\n {this.dates.map((date, i) => {\n const isDisabled = this.isDisabled(date);\n\n if (this.isLoading) {\n return (\n <button\n disabled\n class={{\n 'date day-skeleton': true,\n 'current-month': isSameMonth(date, this.month),\n }}\n style={{ animationDelay: `${i * 20}ms` }}\n part={`ndp__date ndp__date--disabled`}\n >\n {date.getDate()}\n </button>\n );\n }\n return (\n <button\n class={{\n 'date': true,\n 'selected': !!(this.selectedDate && isSameDay(date, this.selectedDate) && this.selectableDates && this.selectableDates?.length > 0),\n 'current-day': isSameDay(date, new Date()),\n 'current-month': isSameMonth(date, this.month),\n }}\n aria-label={date.toLocaleDateString(undefined, { dateStyle: 'full' })}\n disabled={isDisabled}\n onClick={() => this.selectDate(date)}\n part={`ndp__date ${this.isSelected(date, this.selectedDate, this.selectableDates) ? 'ndp__date--selected' : ''} ${isSameDay(date, new Date()) ? 'ndp__date--current-day' : ''} ${isSameMonth(date, this.month) ? 'ndp__date--current-month' : ''}`}\n >\n {date.getDate()}\n </button>\n );\n })}\n </div>\n </div>\n </Host>\n );\n }\n}\n","@use '../../../common/styles/variables' as *;\n\n:host {\n display: block;\n @include default-css-variables;\n}\n\n.nylas-locale-switch {\n display: flex;\n flex-direction: row;\n justify-content: space-between;\n align-items: center;\n border-left: none;\n border-right: none;\n color: var(--nylas-base-50);\n font-size: 14px;\n font-weight: 600;\n cursor: pointer;\n transition: all 0.2s ease-in-out;\n font-family: inherit;\n\n @media #{$mobile} {\n font-size: 16px;\n }\n}\n\n.select-wrapper {\n display: flex;\n align-items: center;\n gap: 0.5rem;\n}\n\nselect {\n border: none;\n background: transparent;\n cursor: pointer;\n outline: none;\n background-color: transparent;\n margin: 0 0 1px;\n padding: 4px;\n vertical-align: middle;\n\n &#timezone {\n width: 140px;\n }\n\n &#language {\n width: 80px;\n }\n}\n\nspan.timezone-label {\n display: flex;\n width: -webkit-fill-available;\n justify-content: space-between;\n}\n\nselect-dropdown {\n width: auto;\n}\n\nselect-dropdown::part(sd_dropdown-button) {\n border: none;\n padding: 10px;\n}\n\nselect-dropdown::part(sd_dropdown-content) {\n max-width: 306px;\n}\n\n@media #{$mobile} {\n select-dropdown::part(sd_dropdown-button-selected-label) {\n max-width: 80px; // To make sure the selected label doesn't overflow on mobile\n }\n\n select-dropdown::part(sd_dropdown-content) {\n width: 100%;\n max-width: none;\n }\n}","import { Component, Element, Event, EventEmitter, Host, Listen, Prop, State, Watch, h } from '@stencil/core';\nimport { LANGUAGE_MAP, TIMEZONE_MAP } from '@/common/constants';\nimport { RegisterComponent } from '@/common/register-component';\nimport { NylasSchedulerConnector } from '../../../components';\nimport type { NylasSchedulerBookingData } from '@/common/types';\nimport { NylasScheduling } from '../nylas-scheduling/nylas-scheduling';\nimport { debug, getTimezoneOffset } from '@/utils/utils';\nimport { ThemeConfig } from '@nylas/core';\nimport i18next from '@/utils/i18n';\n/**\n * The `nylas-locale-switch` component is a UI component that allows users to select a timezone and language.\n * @part nls - The locale switch container\n * @part nls__timezone - The timezone select container\n * @part nls__timezone-dropdown - The timezone dropdown\n * @part nls__timezone-drop-button - The timezone dropdown button\n * @part nls__timezone-drop-button-selected-label - The timezone dropdown button selected label\n * @part nls__timezone-drop-content - The timezone dropdown content\n * @part nls__timezone-drop-label - The timezone dropdown label\n * @part nls__language - The language select container\n * @part nls__language-dropdown - The language dropdown\n * @part nls__language-drop-button - The language dropdown button\n * @part nls__language-drop-content - The language dropdown content\n * @part nls__language-drop-label - The language dropdown label\n *\n */\n@Component({\n tag: 'nylas-locale-switch',\n styleUrl: 'nylas-locale-switch.scss',\n shadow: true,\n})\nexport class NylasLocaleSwitch {\n private timezoneRef?: HTMLSelectDropdownElement;\n private languageRef?: HTMLSelectDropdownElement;\n /**\n * The host element.\n * Used to manage the host element of the provider.\n */\n @Element() private host!: HTMLNylasLocaleSwitchElement;\n /**\n * @standalone\n * The theme configuration.\n */\n @Prop({ attribute: 'theme-config' }) readonly themeConfig?: any;\n /**\n * @standalone\n * The booking info.\n */\n @Prop() readonly bookingInfo?: NylasSchedulerBookingData;\n\n /**\n * The selected timezone.\n */\n @Prop({ mutable: true }) selectedTimezone: string = this.bookingInfo?.timezone || Intl.DateTimeFormat().resolvedOptions().timeZone;\n\n /**\n * The selected language.\n */\n @Prop({ mutable: true }) selectedLanguage: string = this.bookingInfo?.language || navigator.language;\n\n @State() searchPlaceholder: string = i18next.t('search');\n\n /**\n * This event is fired when the timezone is changed.\n */\n @Event() timezoneChanged!: EventEmitter<string>;\n\n /**\n * This event is fired when the language is changed.\n */\n @Event() languageChanged!: EventEmitter<string>;\n\n @Watch('themeConfig')\n themeConfigChanged(newThemeConfig: ThemeConfig) {\n this.applyThemeConfig(newThemeConfig);\n }\n\n @Watch('bookingInfo')\n bookingInfoChangedHandler(newValue: NylasSchedulerBookingData | undefined) {\n if (newValue && newValue?.timezone) {\n this.changeTimezone(newValue.timezone);\n }\n if (newValue && newValue?.language) {\n this.changeLanguage(newValue.language);\n }\n }\n\n connectedCallback() {\n // Use queueMicrotask to defer theme application until after React has set props.\n // This fixes the timing issue where connectedCallback fires before React sets themeConfig.\n queueMicrotask(() => {\n if (this.themeConfig) {\n this.applyThemeConfig(this.themeConfig);\n this.host.setAttribute('data-themed', '');\n }\n });\n }\n\n disconnectedCallback() {}\n\n componentWillLoad() {}\n\n componentDidLoad() {\n debug(`[nylas-locale-switch] Component did load`);\n if (this.bookingInfo && this.bookingInfo?.timezone) {\n this.changeTimezone(this.bookingInfo.timezone);\n }\n if (this.bookingInfo && this.bookingInfo?.language) {\n this.changeLanguage(this.bookingInfo.language);\n }\n }\n\n applyThemeConfig(themeConfig?: ThemeConfig) {\n if (themeConfig) {\n for (const [key, value] of Object.entries(themeConfig)) {\n this.host.style.setProperty(`${key}`, value);\n this.timezoneRef?.style.setProperty(`${key}`, value);\n this.languageRef?.style.setProperty(`${key}`, value);\n }\n }\n }\n\n /**\n * Change the timezone.\n * @param timezone The timezone to select.\n */\n private changeTimezone(timezone: string) {\n this.selectedTimezone = timezone;\n this.timezoneChanged.emit(timezone);\n }\n\n /**\n * Change the language.\n * @param language The language to select.\n */\n private changeLanguage(language: string) {\n this.selectedLanguage = language;\n i18next.changeLanguage(language);\n this.searchPlaceholder = i18next.t('search');\n this.languageChanged.emit(language);\n }\n\n @Listen('nylasFormDropdownChanged')\n nylasFormDropdownChangedHandler(\n event: CustomEvent<{\n value: string;\n name: string;\n }>,\n ) {\n const { name, value } = event.detail;\n if (name === 'timezone') {\n this.changeTimezone(value);\n } else if (name === 'language') {\n this.changeLanguage(value);\n }\n }\n\n getTimezoneLabelHTML(timezone: string) {\n const offset = getTimezoneOffset(timezone);\n return (\n <span\n class=\"timezone-label\"\n style={{\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'space-between',\n width: '-webkit-fill-available',\n }}\n >\n {TIMEZONE_MAP[timezone]}{' '}\n <span\n class=\"timezone-offset\"\n style={{\n fontSize: '14px',\n fontWeight: '400',\n color: 'var(--nylas-base-500)',\n }}\n >\n {offset}\n </span>\n </span>\n );\n }\n\n @RegisterComponent<NylasLocaleSwitch, NylasSchedulerConnector, Exclude<NylasScheduling['stores'], undefined>>({\n name: 'nylas-locale-switch',\n stateToProps: new Map([\n ['scheduler.selectedLanguage', 'selectedLanguage'],\n ['scheduler.selectedTimezone', 'selectedTimezone'],\n ['scheduler.bookingInfo', 'bookingInfo'],\n ['scheduler.themeConfig', 'themeConfig'],\n ]),\n eventToProps: {\n timezoneChanged: async (event: CustomEvent<string>, nylasSchedulerConnector: NylasSchedulerConnector) => {\n debug('nylas-locale-switch', 'timezoneChanged', event.detail);\n nylasSchedulerConnector.scheduler.selectTimezone(event.detail);\n },\n languageChanged: async (event: CustomEvent<string>, nylasSchedulerConnector: NylasSchedulerConnector) => {\n debug('nylas-locale-switch', 'languageChanged', event.detail);\n nylasSchedulerConnector.scheduler.selectLanguage(event.detail);\n },\n },\n fireRegisterEvent: true,\n })\n render() {\n const timezoneOptions = Object.keys(TIMEZONE_MAP).map(key => ({\n labelHTML: this.getTimezoneLabelHTML(key),\n label: TIMEZONE_MAP[key],\n value: key,\n }));\n const languageOptions = Object.keys(LANGUAGE_MAP).map(key => ({\n label: LANGUAGE_MAP[key],\n value: key,\n }));\n\n return (\n <Host>\n <div class=\"nylas-locale-switch\" part=\"nls\">\n <div\n class={{\n 'select-wrapper': true,\n 'timezone': true,\n }}\n part=\"nls__timezone\"\n >\n <select-dropdown\n name=\"timezone\"\n searchPlaceholder={this.searchPlaceholder}\n options={timezoneOptions}\n ref={el => (this.timezoneRef = el)}\n defaultSelectedOption={timezoneOptions.find(op => op.value == this.selectedTimezone)}\n exportparts=\"sd_dropdown: nls__timezone-dropdown, sd_dropdown-button: nls__timezone-drop-button, sd_dropdown-button-selected-label: nls__timezone-drop-button-selected-label, sd_dropdown-content: nls__timezone-drop-content, sd_dropdown_label: nls__timezone-drop-label\"\n >\n <span slot=\"select-icon\">\n <globe-icon width=\"20\" height=\"20\" />\n </span>\n </select-dropdown>\n </div>\n <div\n class={{\n 'select-wrapper': true,\n 'language': true,\n }}\n part=\"nls__language\"\n >\n <select-dropdown\n name=\"language\"\n searchPlaceholder={this.searchPlaceholder}\n options={languageOptions}\n ref={el => (this.languageRef = el)}\n defaultSelectedOption={languageOptions.find(lang => lang.value == this.selectedLanguage)}\n exportparts=\"sd_dropdown: nls__language-dropdown, sd_dropdown-button: nls__language-drop-button, sd_dropdown-content: nls__language-drop-content, sd_dropdown_label: nls__language-drop-label\"\n >\n <span slot=\"select-icon\">\n <translate-icon width=\"20\" height=\"20\" />\n </span>\n </select-dropdown>\n </div>\n </div>\n </Host>\n );\n }\n}\n",":host {\n display: flex;\n}\n","import { Component, Prop, h } from '@stencil/core';\n\n@Component({\n tag: 'nylas-logo',\n styleUrl: 'icon.css',\n scoped: true,\n})\nexport class NylasLogo {\n @Prop() width: string = '69';\n @Prop() height: string = '24';\n\n render() {\n return (\n <svg width={this.width} height={this.height} viewBox=\"0 0 69 20\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <g clip-path=\"url(#clip0_455_3543)\">\n <path\n d=\"M15.8092 3.03248C14.6497 1.86996 13.1076 1.23047 11.4646 1.23047C9.82156 1.23047 8.27753 1.86996 7.11999 3.03248L0.835347 9.33381C0.686846 9.4827 0.60498 9.68123 0.60498 9.89312C0.60498 10.105 0.686846 10.3035 0.835347 10.4524C0.983848 10.6013 1.18185 10.6834 1.39318 10.6834C1.60451 10.6834 1.80251 10.6013 1.95101 10.4524L8.23374 4.15111C10.0139 2.36627 12.9134 2.36627 14.6935 4.15111C16.4736 5.93785 16.4756 8.84322 14.6935 10.6281L8.4108 16.9275C8.10428 17.2348 8.10428 17.7368 8.4108 18.0461C8.5593 18.195 8.75731 18.2771 8.96863 18.2771C9.17996 18.2771 9.37796 18.195 9.52646 18.0461L15.8092 11.7467C16.9687 10.5841 17.6064 9.03793 17.6064 7.39053C17.6064 5.74314 16.9687 4.19501 15.8092 3.03439V3.03248Z\"\n fill=\"currentColor\"\n />\n <path\n d=\"M14.9296 7.39038C14.9296 6.46074 14.5698 5.58837 13.9148 4.93361C12.5631 3.57828 10.3641 3.57828 9.01239 4.93361L0.663961 13.3023C0.51546 13.4512 0.433594 13.6497 0.433594 13.8616C0.433594 14.0735 0.51546 14.272 0.663961 14.4209C0.812462 14.5698 1.01046 14.6519 1.22179 14.6519C1.43312 14.6519 1.63112 14.5698 1.77962 14.4209L10.0367 6.1515L10.05 6.13623C10.0747 6.10759 10.1014 6.07705 10.128 6.05033C10.1585 6.01978 10.1928 5.99115 10.2251 5.96252L10.2442 5.94534C10.9886 5.31349 12.1119 5.3593 12.8011 6.05033C13.4903 6.74135 13.536 7.78171 12.9705 8.53192L12.9648 8.53955C12.9058 8.61591 12.8544 8.67699 12.8011 8.73044C12.7497 8.78198 12.6906 8.83352 12.6069 8.90033L4.45264 17.0991C4.30414 17.248 4.22227 17.4465 4.22227 17.6584C4.22227 17.8703 4.30414 18.0689 4.45264 18.2177C4.60114 18.3666 4.79914 18.4487 5.01047 18.4487C5.2218 18.4487 5.4198 18.3666 5.5683 18.2177L13.9167 9.84716C14.5698 9.1924 14.9315 8.31812 14.9315 7.39038H14.9296Z\"\n fill=\"currentColor\"\n />\n <path\n d=\"M10.6821 9.11238C10.4727 9.01694 10.2861 8.88904 10.1281 8.7306C9.97008 8.57216 9.84252 8.38508 9.74733 8.1751L9.69021 8.05103L0.467916 17.2978C0.287049 17.4792 0.174721 17.7082 0.149971 17.9411C0.125221 18.1778 0.19376 18.3897 0.344165 18.5405C0.471724 18.6684 0.65259 18.739 0.850592 18.739C1.11142 18.739 1.37796 18.6207 1.58358 18.4145L10.8059 9.16774L10.6821 9.11047V9.11238Z\"\n fill=\"currentColor\"\n />\n <path\n d=\"M68.401 10.6185C68.2126 10.2692 67.9593 9.97334 67.6433 9.73854C67.3235 9.49993 66.956 9.31094 66.5486 9.17541C66.1316 9.03606 65.7033 8.91771 65.2749 8.81844C64.7951 8.70582 64.3039 8.57983 63.8165 8.44811C63.3196 8.31258 62.9065 8.14269 62.5905 7.94225C62.4743 7.88689 62.3391 7.76663 62.3391 7.50129C62.3391 7.39821 62.3639 7.29704 62.4153 7.19587L62.4248 7.18059C62.5352 7.02216 62.7142 6.8828 62.975 6.75109C63.234 6.62128 63.609 6.55829 64.1231 6.55829C64.5286 6.55829 64.877 6.61365 65.1569 6.72436C65.4348 6.83508 65.6652 6.96871 65.8442 7.12524C66.0212 7.27986 66.1659 7.45357 66.2782 7.63873C66.3563 7.76854 66.4267 7.89262 66.4858 8.00525L68.2754 6.84081C68.1669 6.59456 68.0146 6.33495 67.8204 6.0677C67.6033 5.768 67.3254 5.4893 66.9922 5.23732C66.659 4.98534 66.2516 4.77345 65.7813 4.60929C65.3111 4.44512 64.7532 4.36304 64.1231 4.36304C63.3844 4.36304 62.7599 4.46421 62.2706 4.66083C61.7813 4.85935 61.3815 5.09988 61.0845 5.37667C60.7875 5.65346 60.5628 5.95125 60.4143 6.2605C60.2639 6.57547 60.1611 6.85799 60.1078 7.10233C60.0945 7.18059 60.0812 7.27031 60.0678 7.36767C60.0545 7.4593 60.0469 7.5452 60.0469 7.62537C60.0469 8.13314 60.1745 8.56074 60.4239 8.89671C60.679 9.24222 61.0045 9.53429 61.391 9.76336C61.7813 9.99624 62.2116 10.1852 62.6704 10.3227C63.1388 10.462 63.5862 10.5823 64.0012 10.6796C64.4067 10.777 64.7932 10.8782 65.1531 10.9774C65.5224 11.0786 65.8289 11.2122 66.0631 11.3745C66.2801 11.5425 66.3887 11.7448 66.3887 11.9777C66.3887 12.2278 66.2916 12.4263 66.0993 12.5695C65.9279 12.6954 65.7261 12.7985 65.4958 12.8711C65.273 12.9436 65.0407 12.9913 64.8066 13.0142C64.58 13.0352 64.3915 13.0467 64.2468 13.0467C63.8032 13.0467 63.4224 13.0028 63.1197 12.915C62.8151 12.8272 62.5638 12.7241 62.3734 12.6057C62.1811 12.4874 62.0288 12.3614 61.9222 12.2316C61.8213 12.1094 61.747 12.0082 61.7014 11.9319L61.4957 11.6303L59.708 12.7928C59.8508 13.0161 60.0298 13.2643 60.2392 13.5296C60.4772 13.8293 60.7837 14.1138 61.153 14.3734C61.5224 14.633 61.966 14.8525 62.4724 15.0243C62.9788 15.1961 63.5748 15.282 64.2468 15.282C64.797 15.282 65.2901 15.2324 65.7166 15.137C66.1412 15.0396 66.5162 14.9117 66.8285 14.7552C67.1388 14.6005 67.4015 14.4192 67.6109 14.2149C67.8223 14.0107 67.9974 13.8026 68.1326 13.6003C68.4563 13.1135 68.6409 12.5504 68.6828 11.9262C68.6828 11.4069 68.5876 10.9641 68.401 10.6166V10.6185Z\"\n fill=\"currentColor\"\n />\n <path\n d=\"M26.3585 4.27905C23.7901 4.27905 21.6997 6.37504 21.6997 8.95017V15.0701H23.9291V8.95017C23.9291 7.6082 25.0181 6.5163 26.3565 6.5163C27.695 6.5163 28.784 7.6082 28.784 8.95017V15.0701H31.0134V8.95017C31.0134 6.37504 28.9229 4.27905 26.3546 4.27905H26.3585Z\"\n fill=\"currentColor\"\n />\n <path\n d=\"M53.4522 4.27905C50.4251 4.27905 47.9634 6.74728 47.9634 9.78245C47.9634 12.8176 50.427 15.2859 53.4522 15.2859C54.5545 15.2859 55.6188 14.9594 56.5288 14.3409L56.7116 14.2169V15.0682H58.941V9.78245C58.941 6.74728 56.4793 4.27905 53.4522 4.27905ZM53.4522 13.0505C51.655 13.0505 50.1928 11.5845 50.1928 9.78245C50.1928 7.98044 51.655 6.51439 53.4522 6.51439C55.2494 6.51439 56.7116 7.98044 56.7116 9.78245C56.7116 11.5845 55.2494 13.0505 53.4522 13.0505Z\"\n fill=\"currentColor\"\n />\n <path\n d=\"M45.5795 10.6166V0.356201H43.3501V10.6166C43.3501 13.1517 45.3758 15.2228 47.8908 15.2858V13.0486C46.6057 12.9875 45.5795 11.9204 45.5795 10.6166Z\"\n fill=\"currentColor\"\n />\n <path\n d=\"M39.5428 4.4967V10.63C39.5428 11.6761 38.8669 12.621 37.9016 12.9284C37.1249 13.1746 36.3157 13.0486 35.6817 12.5829C35.0592 12.1247 34.6879 11.3917 34.6879 10.6186V4.4967H32.4585V10.5995C32.4585 12.7165 33.8388 14.57 35.8131 15.1084C37.0354 15.4424 38.2995 15.2973 39.3695 14.7037L39.5428 14.6063V14.9747C39.5428 16.2766 38.5166 17.3437 37.2315 17.4067V19.6439C39.7465 19.5809 41.7722 17.5117 41.7722 14.9747V4.4967H39.5428Z\"\n fill=\"currentColor\"\n />\n </g>\n <defs>\n <clipPath id=\"clip0_455_3543\">\n <rect width=\"68.7123\" height=\"19.2877\" fill=\"white\" transform=\"translate(0.144043 0.356201)\" />\n </clipPath>\n </defs>\n </svg>\n );\n }\n}\n","@use '../../../common/styles/variables' as *;\n\n:host {\n display: block;\n @include default-css-variables;\n}\n\n.event-card-wrapper {\n height: inherit;\n display: flex;\n flex-direction: column;\n justify-content: space-between;\n align-items: center;\n font-family: var(--nylas-font-family);\n background-color: var(--nylas-base-0);\n color: var(--nylas-base-900);\n border-radius: var(--nylas-border-radius-3x);\n position: relative;\n margin-top: 1rem;\n width: 424px;\n\n box-shadow:\n 0px 1px 4px rgba(0, 0, 0, 0.1),\n 0px 3px 6px rgba(0, 0, 0, 0.06);\n\n @media #{$mobile} {\n width: 100%;\n border-radius: 0px;\n }\n}\n\n.calendar-icon {\n display: flex;\n align-items: center;\n justify-content: center;\n width: 3rem;\n height: 3rem;\n border-radius: 50%;\n position: absolute;\n top: -1.25rem;\n left: 50%;\n transform: translateX(-50%);\n background-color: var(--nylas-base-0);\n border: 1px solid var(--nylas-base-200);\n color: var(--nylas-base-700);\n}\n\n.booked-event-header {\n margin: 1.5rem 4rem;\n overflow-wrap: anywhere;\n display: flex;\n align-items: center;\n flex-direction: column;\n font-size: 16px;\n font-weight: 400;\n\n h2 {\n color: var(--nylas-base-600);\n margin-top: 1.5rem;\n margin-bottom: 0.25rem;\n font-size: 1.125rem;\n font-weight: 600;\n }\n}\n\n.manage-booking-description {\n border-top: 1px solid var(--nylas-base-200);\n\n p {\n font-size: 16px;\n margin: 1rem;\n padding: 0.5rem 1rem;\n font-weight: 400;\n color: var(--nylas-base-800);\n }\n}\n\n.footer {\n padding: 0.5rem;\n display: grid;\n grid-template-columns: 1fr 1fr;\n gap: 0.5rem;\n box-sizing: border-box;\n background-color: var(--nylas-base-25);\n width: 100%;\n border-radius: 0 0 var(--nylas-border-radius-2x) var(--nylas-border-radius-2x);\n\n &.no-template-cols {\n grid-template-columns: 1fr;\n }\n\n &.no-footer {\n display: none;\n }\n}\n\nsp-divider {\n background-color: var(--nylas-base-200);\n height: 1px;\n}\n\ncalendar-check-icon {\n display: flex;\n align-items: center;\n justify-content: center;\n height: 100%;\n}\n\nbutton-component {\n --dot-color: var(--nylas-base-700);\n}\n","import { RegisterComponent } from '@/common/register-component';\nimport { Component, Element, EventEmitter, h, Host, Method, Prop, State, Watch } from '@stencil/core';\nimport { NylasSchedulerConnector } from '../../..';\nimport { LANGUAGE_CODE } from '@/common/constants';\nimport { ConfigSettings } from '@/stores/scheduler-store';\nimport { NylasScheduling } from '../nylas-scheduling/nylas-scheduling';\nimport { debug } from '@/utils/utils';\nimport { Event } from '@stencil/core';\nimport { NylasSchedulerErrorResponse, ThemeConfig } from '@nylas/core';\nimport i18next from '@/utils/i18n';\n\n/**\n * The `nylas-organizer-confirmation-card` component is a UI component that displays the booked event card.\n *\n * @part nmcc - The booked event card host.\n * @part nmcc__card - The booked event card.\n * @part nmcc__title - The title of the booked event card.\n * @part nmcc__description - The description of the booked event card.\n * @part nmcc__button-outline - The cancel & reschedule button CTA.\n * @part nmcc__cancel-cta - The cancel button CTA.\n * @part nmcc__reschedule-cta - The reschedule button CTA.\n */\n@Component({\n tag: 'nylas-organizer-confirmation-card',\n styleUrl: 'nylas-organizer-confirmation-card.scss',\n shadow: true,\n})\nexport class NylasOrganizerConfirmationCard {\n /**\n * The host element.\n */\n @Element() host!: HTMLNylasOrganizerConfirmationCardElement;\n\n /**\n * @standalone\n * The config settings for the scheduler.\n */\n @Prop() readonly configSettings?: ConfigSettings;\n\n /**\n * @standalone\n * The loading state prop. Used to display loading state when fetching availability.\n */\n @Prop() readonly isLoading?: boolean;\n\n /**\n * @standalone\n * The theme configuration.\n */\n @Prop({ attribute: 'theme-config' }) readonly themeConfig?: any;\n\n /**\n * Booking flow type.\n */\n @Prop() readonly organizerConfirmationBookingId?: string;\n\n /**\n * The selected language.\n */\n @Prop({ attribute: 'selected-language' }) readonly selectedLanguage: string = navigator.language;\n\n /**\n * The state to identify which action is being performed.\n */\n @State() action: 'confirm' | 'reject' | null = null;\n\n /**\n * Reject booking button clicked event.\n */\n @Event() readonly rejectBookingButtonClicked!: EventEmitter<{ bookingId: string; host: HTMLNylasOrganizerConfirmationCardElement }>;\n\n /**\n * Reschedule button clicked event.\n * */\n @Event() readonly confirmBookingButtonClicked!: EventEmitter<{\n bookingId: string;\n host: HTMLNylasOrganizerConfirmationCardElement;\n errorHandler?: (error: NylasSchedulerErrorResponse) => void;\n }>;\n\n /**\n * This event is fired when an error occurs while rescheduling the booking.\n */\n @Event() readonly confirmBookingError!: EventEmitter<NylasSchedulerErrorResponse>;\n\n @Watch('themeConfig')\n themeConfigChanged(newThemeConfig: ThemeConfig) {\n this.applyThemeConfig(newThemeConfig);\n }\n\n @Watch('selectedLanguage')\n selectedLanguageChangedHandler(newVal: LANGUAGE_CODE, oldVal: LANGUAGE_CODE) {\n if (newVal === oldVal) return;\n i18next.changeLanguage(newVal);\n }\n\n connectedCallback() {\n // Use queueMicrotask to defer theme application until after React has set props.\n // This fixes the timing issue where connectedCallback fires before React sets themeConfig.\n queueMicrotask(() => {\n if (this.themeConfig) {\n this.applyThemeConfig(this.themeConfig);\n this.host.setAttribute('data-themed', '');\n }\n });\n }\n\n disconnectedCallback() {}\n\n async componentWillLoad() {\n debug(`[nylas-organizer-confirmation-card] Component will load`);\n }\n\n async componentDidLoad() {\n debug(`[nylas-organizer-confirmation-card] Component did load`);\n }\n\n applyThemeConfig(themeConfig?: ThemeConfig) {\n if (themeConfig) {\n for (const [key, value] of Object.entries(themeConfig)) {\n this.host.style.setProperty(`${key}`, value);\n }\n }\n }\n\n private handleConfirmBookingButtonClicked = () => {\n this.action = 'confirm';\n const errorHandler = (error: NylasSchedulerErrorResponse) => {\n this.confirmBookingError.emit(error);\n };\n if (this.organizerConfirmationBookingId && !this.isLoading) {\n this.confirmBookingButtonClicked.emit({ bookingId: this.organizerConfirmationBookingId, host: this.host, errorHandler });\n }\n };\n\n private handleRejectBookingButtonClicked = () => {\n this.action = 'reject';\n if (this.organizerConfirmationBookingId && !this.isLoading) {\n this.rejectBookingButtonClicked.emit({ bookingId: this.organizerConfirmationBookingId, host: this.host });\n }\n };\n\n @Method()\n async resetAction() {\n this.action = null;\n }\n\n @RegisterComponent<NylasOrganizerConfirmationCard, NylasSchedulerConnector, Exclude<NylasScheduling['stores'], undefined>>({\n name: 'nylas-organizer-confirmation-card',\n stateToProps: new Map([\n ['scheduler.organizerConfirmationBookingId', 'organizerConfirmationBookingId'],\n ['scheduler.configSettings', 'configSettings'],\n ['scheduler.isLoading', 'isLoading'],\n ['scheduler.selectedLanguage', 'selectedLanguage'],\n ['scheduler.themeConfig', 'themeConfig'],\n ]),\n eventToProps: {\n rejectBookingButtonClicked: async (\n event: CustomEvent<{ bookingId: string; host: HTMLNylasOrganizerConfirmationCardElement }>,\n nylasSchedulerConnector: NylasSchedulerConnector,\n ) => {\n nylasSchedulerConnector.scheduler.setReject(event.detail.bookingId);\n },\n confirmBookingButtonClicked: async (\n event: CustomEvent<{ bookingId: string; host: HTMLNylasOrganizerConfirmationCardElement; errorHandler?: (error: NylasSchedulerErrorResponse) => void }>,\n nylasSchedulerConnector: NylasSchedulerConnector,\n ) => {\n const { host } = event.detail;\n const result = await nylasSchedulerConnector.scheduler.updateBooking({\n bookingId: event.detail.bookingId,\n status: 'confirmed',\n });\n const { errorHandler } = event.detail;\n if (errorHandler && (!result || 'error' in result)) {\n errorHandler(result);\n }\n await host.resetAction();\n },\n },\n fireRegisterEvent: true,\n })\n render() {\n return (\n <Host part=\"nmcc\">\n <div class=\"event-card-wrapper\" part=\"nmccc__card\">\n <div class=\"calendar-icon\">\n <calendar-check-icon />\n </div>\n <div class=\"booked-event-header\">\n <h2 slot=\"card-title\" part=\"nmcc__title\">\n {!!this.organizerConfirmationBookingId && `${i18next.t('bookingPendingTitle')}!`}\n </h2>\n </div>\n <div class=\"manage-booking-description\">\n <p>{i18next.t('bookingPendingnDescription')}</p>\n </div>\n <div\n class={{\n footer: true,\n }}\n >\n <button-component\n variant={'destructive'}\n onClick={this.handleRejectBookingButtonClicked}\n isLoading={this.isLoading && this.action === 'reject'}\n part=\"nmcc__button-outline nmcc__cancel-cta\"\n >\n {`${i18next.t('rejectBookingButton')}`}\n </button-component>\n <button-component\n variant={'basic'}\n onClick={this.handleConfirmBookingButtonClicked}\n isLoading={this.isLoading && this.action === 'confirm'}\n part=\"nmcc__button-outline nmcc__reschedule-cta\"\n >\n {`${i18next.t('confirmBookingButton')}`}\n </button-component>\n </div>\n </div>\n </Host>\n );\n }\n}\n","@use '../../../common/styles/variables' as *;\n\n:host {\n @include default-css-variables;\n display: block;\n position: relative;\n height: inherit;\n display: flex;\n flex-direction: column;\n justify-content: center;\n align-items: center;\n font-family: var(--nylas-font-family);\n}\n\n.event-card {\n display: flex;\n align-items: center;\n flex-direction: column;\n gap: 4px;\n width: calc(100% - 3rem);\n background-color: var(--nylas-base-0);\n color: var(--nylas-base-800);\n border-radius: var(--nylas-border-radius-2x);\n padding: 3rem 1.5rem 1.5rem 1.5rem;\n position: relative;\n box-shadow:\n 0px 1px 3px 0px rgba(0, 0, 0, 0.1),\n 0px 1px 2px 0px rgba(0, 0, 0, 0.06);\n\n @media #{$mobile} {\n margin-bottom: 2rem;\n }\n}\n\n.nylas-selected-event-card__date {\n font-size: min(max(16px, 3vw), 18px);\n font-weight: 600;\n}\n\n.nylas-selected-event-card__time {\n font-size: 16px;\n font-weight: 500;\n}\n\n.calendar-icon {\n width: 3rem;\n height: 3rem;\n border-radius: 50%;\n position: absolute;\n top: -1.25rem;\n left: 50%;\n transform: translateX(-50%);\n background-color: var(--nylas-base-0);\n border: 1px solid var(--nylas-base-200);\n}\n\ncalendar-icon {\n display: flex;\n align-items: center;\n justify-content: center;\n height: 100%;\n}\n\n.event-timezone {\n display: flex;\n color: var(--nylas-base-600);\n margin-bottom: 8px;\n\n gap: 4px;\n align-items: center;\n\n @media #{$mobile} {\n margin-bottom: 16px;\n }\n}\n","import { RegisterComponent } from '@/common/register-component';\nimport { Component, Element, h, Host, Prop, State, Watch } from '@stencil/core';\nimport type { NylasSchedulerConnector } from '../../..';\nimport type { ThemeConfig, Timeslot } from '@nylas/core';\nimport { NylasScheduling } from '../nylas-scheduling/nylas-scheduling';\nimport { capitalizeFirstLetter, debug, formatBookedEventDate } from '@/utils/utils';\nimport { LANGUAGE_CODE, LANGUAGE_CODE_TO_LOCALE_MAP, TIMEZONE_MAP } from '@/common/constants';\nimport i18next from '@/utils/i18n';\n\n/**\n * The `nylas-selected-event-card` component is a UI component that displays the selected event card.\n *\n * @part nsec - The selected event card component.\n * @part nsec__card - The card component.\n * @part nsec__icon - The calendar icon.\n * @part nsec__date - The date selected.\n * @part nsec__time - The timeslot selected.\n * @part nsec__timezone - The timezone selected.\n */\n@Component({\n tag: 'nylas-selected-event-card',\n styleUrl: 'nylas-selected-event-card.scss',\n shadow: true,\n})\nexport class NylasSelectedEventCard {\n /**\n * The host element.\n * Used to manage the host element of the provider.\n */\n @Element() private host!: HTMLNylasSelectedEventCardElement;\n\n /**\n * @standalone\n * The theme configuration.\n */\n @Prop({ attribute: 'theme-config' }) readonly themeConfig?: any;\n\n /**\n * The selected date.\n */\n @Prop({ attribute: 'selected-date' }) readonly selectedDate?: Date;\n\n /**\n * The selected time.\n */\n @Prop({ attribute: 'selected-timeslot' }) readonly selectedTimeslot?: Timeslot;\n\n /**\n * The selected timezone.\n */\n @Prop({ attribute: 'selected-timezone' }) readonly selectedTimezone: string = Intl.DateTimeFormat().resolvedOptions().timeZone;\n\n /**\n * The selected language.\n */\n @Prop({ attribute: 'selected-language' }) readonly selectedLanguage?: LANGUAGE_CODE;\n /**\n * The 12-hour time format.\n */\n @Prop() hour12?: boolean;\n\n @State() startTime: string = '';\n @State() endTime: string = '';\n\n @Watch('themeConfig')\n themeConfigChanged(newThemeConfig: ThemeConfig) {\n this.applyThemeConfig(newThemeConfig);\n }\n\n @Watch('selectedLanguage')\n selectedLanguageChangedHandler(newVal: LANGUAGE_CODE, oldVal: LANGUAGE_CODE) {\n if (newVal === oldVal) return;\n i18next.changeLanguage(newVal);\n this.updateTimes();\n }\n\n @Watch('selectedTimeslot')\n selectedTimeslotChangedHandler() {\n this.updateTimes();\n }\n\n @Watch('selectedTimezone')\n selectedTimezoneChangedHandler() {\n this.updateTimes();\n }\n\n @Watch('hour12')\n hour12ChangedHandler() {\n this.updateTimes();\n }\n\n connectedCallback() {\n // Use queueMicrotask to defer theme application until after React has set props.\n // This fixes the timing issue where connectedCallback fires before React sets themeConfig.\n queueMicrotask(() => {\n if (this.themeConfig) {\n this.applyThemeConfig(this.themeConfig);\n this.host.setAttribute('data-themed', '');\n }\n });\n }\n\n disconnectedCallback() {}\n\n async componentWillLoad() {\n debug(`[nylas-selected-event-card] Component will load`);\n }\n\n async componentDidLoad() {\n debug(`[nylas-selected-event-card] Component did load`);\n if (!this.selectedDate) {\n debug('[nylas-selected-event-card] \"selectedDate\" prop is not provided.');\n }\n if (!this.selectedTimeslot) {\n debug('[nylas-selected-event-card] \"selectedTimeslot\" prop is not provided.');\n }\n this.updateTimes();\n }\n\n private updateTimes() {\n if (!this.selectedTimeslot?.start_time || !this.selectedTimeslot?.end_time) {\n this.startTime = '';\n this.endTime = '';\n return;\n }\n\n const locale = LANGUAGE_CODE_TO_LOCALE_MAP[this.selectedLanguage || 'en'];\n const timeFormat = new Intl.DateTimeFormat(locale, {\n hour: '2-digit',\n minute: '2-digit',\n timeZone: this.selectedTimezone,\n hour12: this.hour12,\n });\n\n this.startTime = timeFormat.format(new Date(this.selectedTimeslot.start_time));\n this.endTime = timeFormat.format(new Date(this.selectedTimeslot.end_time));\n }\n\n applyThemeConfig(themeConfig?: ThemeConfig) {\n if (themeConfig) {\n for (const [key, value] of Object.entries(themeConfig)) {\n this.host.style.setProperty(`${key}`, value);\n }\n }\n }\n\n @RegisterComponent<NylasSelectedEventCard, NylasSchedulerConnector, Exclude<NylasScheduling['stores'], undefined>>({\n name: 'nylas-selected-event-card',\n stateToProps: new Map([\n ['scheduler.selectedDate', 'selectedDate'],\n ['scheduler.selectedTimeslot', 'selectedTimeslot'],\n ['scheduler.selectedTimezone', 'selectedTimezone'],\n ['scheduler.selectedLanguage', 'selectedLanguage'],\n ['scheduler.themeConfig', 'themeConfig'],\n ['scheduler.hour12', 'hour12'],\n ]),\n eventToProps: {},\n fireRegisterEvent: true,\n })\n render() {\n return (\n <Host part=\"nsec\">\n <div class=\"event-card\" part=\"nsec__card\">\n <div class=\"calendar-icon\" part=\"nsec__icon\">\n <calendar-icon />\n </div>\n <div class=\"nylas-selected-event-card__date\" part=\"nsec__date\">\n {this.selectedDate\n ? capitalizeFirstLetter(\n formatBookedEventDate(this.selectedTimeslot?.start_time as Date, this.selectedTimezone, LANGUAGE_CODE_TO_LOCALE_MAP[this.selectedLanguage || 'en']),\n )\n : '-'}\n </div>\n <div class=\"nylas-selected-event-card__time\" part=\"nsec__time\">\n {this.startTime} - {this.endTime}\n </div>\n </div>\n <div class=\"event-timezone\" part=\"nsec__timezone\">\n <globe-icon></globe-icon>\n {TIMEZONE_MAP[this.selectedTimezone]}\n </div>\n </Host>\n );\n }\n}\n","@use '../../../common/styles/variables' as *;\n\n:host {\n display: block;\n height: calc(100% - 48px); //48px is the height of the header\n @include default-css-variables;\n}\n\n.time-picker-wrapper {\n display: flex;\n flex-direction: column;\n height: 100%;\n}\n\n.timeslots {\n position: relative;\n display: flex;\n flex-direction: column;\n gap: 0.75rem;\n align-items: center;\n overflow-y: scroll;\n padding: 0.5rem 1.5rem 1.5rem;\n flex: 1;\n}\n\n.time {\n /* Frame 12 */\n box-sizing: border-box;\n\n /* Auto layout */\n\n display: flex;\n flex-direction: column;\n justify-content: center;\n align-items: center;\n padding: 4px 12px;\n gap: 0.5rem;\n font-size: 16px;\n font-weight: 500;\n font-family: inherit;\n\n width: 100%;\n height: 48px;\n\n color: var(--nylas-base-800);\n background: var(--nylas-base-0);\n border: none;\n outline: 1.5px solid var(--nylas-base-200);\n border-radius: var(--nylas-border-radius-2x);\n\n flex: none;\n order: 4;\n align-self: stretch;\n flex-grow: 0;\n\n cursor: pointer;\n\n &:hover,\n &:focus {\n color: var(--nylas-primary);\n outline-color: var(--nylas-primary);\n }\n\n &.selected {\n font-weight: 600;\n color: var(--nylas-primary);\n outline: 2px solid var(--nylas-primary);\n border-color: transparent;\n box-shadow: 0 0 0 2px var(--nylas-primary);\n }\n\n .time-label {\n display: flex;\n flex-direction: column;\n align-items: center;\n gap: 4px;\n\n span.spots {\n font-size: 14px;\n font-family: var(--nylas-font-family);\n font-weight: 400;\n color: var(--nylas-base-600);\n }\n }\n}\n\n.empty {\n text-align: center;\n padding: 0 1.5rem;\n color: var(--nylas-base-600);\n font-size: min(max(12px, 2vw), 14px);\n height: 450px;\n display: flex;\n align-items: center;\n justify-content: center;\n}\n\n@keyframes pulsate {\n 0% {\n background-color: var(--nylas-base-50);\n }\n\n 50% {\n background-color: var(--nylas-base-100);\n }\n\n 100% {\n background-color: var(--nylas-base-50);\n }\n}\n\n.loading {\n padding: 0 1.5rem;\n\n .timeslot-skeleton {\n width: 100%;\n height: 4rem;\n background-color: var(--nylas-base-50);\n margin-bottom: 0.5rem;\n border-radius: var(--nylas-border-radius-2x);\n animation: pulsate 1.5s infinite ease-in-out;\n }\n}\n\n.footer {\n width: 100%;\n padding: 14px;\n box-sizing: border-box;\n border-top: 1px solid var(--nylas-base-200);\n}","import { RegisterComponent } from '@/common/register-component';\nimport { debug, isSameDayTimezone } from '@/utils/utils';\nimport { Component, Element, Event, EventEmitter, Host, Method, Prop, State, Watch, h } from '@stencil/core';\nimport { NylasSchedulerConnector } from '../../..';\nimport { NylasScheduling } from '../nylas-scheduling/nylas-scheduling';\nimport { AvailabilityTimeslot } from '@/stores/scheduler-store';\nimport type { ThemeConfig, Timeslot } from '@nylas/core';\nimport i18next from '@/utils/i18n';\nimport { LANGUAGE_CODE, LANGUAGE_CODE_TO_LOCALE_MAP } from '@/common/constants';\n\n/**\n * The `nylas-timeslot-picker` component is a UI component that allows users to select a timeslot from a list of available timeslots.\n *\n * @slot timeslot-picker-cta-label - The label for the timeslot picker CTA. Default is \"Next\".\n * @part ntp - The timeslot picker component.\n * @part ntp__timeslot - The timeslot button.\n * @part ntp__timeslot--selected - The selected timeslot button.\n * @part ntp__button-primary - The timeslot picker CTA.\n * @part ntp__time-picker-wrapper - The timeslot picker wrapper.\n * @part ntp__timeslots - The timeslot picker timeslots.\n */\n@Component({\n tag: 'nylas-timeslot-picker',\n styleUrl: 'nylas-timeslot-picker.scss',\n shadow: true,\n})\nexport class NylasTimeslotPicker {\n /**\n * The host element.\n * Used to manage the host element of the provider.\n */\n @Element() private host!: HTMLNylasTimeslotPickerElement;\n /**\n * @standalone\n * The available timeslots.\n */\n @Prop({ attribute: 'availability' }) readonly availability?: AvailabilityTimeslot[];\n /**\n * @standalone\n * The loading state prop. Used to display loading state when fetching availability.\n */\n @Prop({ attribute: 'loading-state' }) readonly isLoading?: boolean;\n /**\n * @standalone\n * The theme configuration.\n */\n @Prop({ attribute: 'theme-config' }) readonly themeConfig?: any;\n /**\n * The selected timeslot.\n */\n @Prop({ attribute: 'selected-timeslot' }) readonly selectedTimeslot?: Timeslot;\n /**\n * The selected timezone.\n */\n @Prop({ attribute: 'selected-timezone' }) readonly selectedTimezone: string = Intl.DateTimeFormat().resolvedOptions().timeZone;\n /**\n * The selected date.\n */\n @Prop({ attribute: 'selected-date' }) readonly selectedDate?: Date = new Date();\n /**\n * The selected language.\n */\n @Prop() selectedLanguage?: string;\n /**\n * The 12-hour time format.\n */\n @Prop() hour12?: boolean;\n\n /**\n * This event is fired when a timeslot is selected.\n */\n @Event() readonly timeslotSelected!: EventEmitter<Timeslot>;\n /**\n * This event is fired when a timeslot is confirmed. By default, this will proceed to the booking form page.\n */\n @Event() readonly timeslotConfirmed!: EventEmitter<{ timeslot: Timeslot; host: HTMLNylasTimeslotPickerElement }>;\n\n @Event() readonly validateTimeslotError!: EventEmitter<{ error: string; type: 'error' | 'info' }>;\n\n @State() times: AvailabilityTimeslot[] = [];\n @State() hoveredTimeslotIndex?: number;\n @State() selectedTimeslotIndex?: string;\n\n @Watch('selectedLanguage')\n selectedLanguageChanged(newLanguage: LANGUAGE_CODE) {\n i18next.changeLanguage(newLanguage);\n }\n\n @Watch('selectedDate')\n selectedDateChanged(newVal: Date | null | undefined) {\n debug(`[nylas-timeslot-picker] Selected date changed`, { newVal });\n\n if (newVal) {\n this.selectedTimeslotIndex = '';\n if (typeof newVal !== 'undefined') {\n const availableTimes = this.availability?.filter(timeslot => isSameDayTimezone(timeslot.start_time, newVal, this.selectedTimezone)).map(timeslot => timeslot);\n this.times = availableTimes || [];\n }\n }\n }\n\n @Watch('availability')\n availabilityChanged(newVal: AvailabilityTimeslot[] | undefined) {\n debug(`[nylas-timeslot-picker] Available times changed`, { newVal, selectedDate: this.selectedDate });\n if (typeof newVal !== 'undefined') {\n const availableTimes = newVal\n ?.filter(timeslot => this.selectedDate && isSameDayTimezone(timeslot.start_time, this.selectedDate, this.selectedTimezone))\n .map(timeslot => timeslot);\n this.times = availableTimes || [];\n }\n }\n\n @Watch('themeConfig')\n themeConfigChanged(newThemeConfig: ThemeConfig) {\n this.applyThemeConfig(newThemeConfig);\n }\n\n connectedCallback() {\n // Use queueMicrotask to defer theme application until after React has set props.\n // This fixes the timing issue where connectedCallback fires before React sets themeConfig.\n queueMicrotask(() => {\n if (this.themeConfig) {\n this.applyThemeConfig(this.themeConfig);\n this.host.setAttribute('data-themed', '');\n }\n });\n }\n\n disconnectedCallback() {}\n\n async componentWillLoad() {\n debug(`[nylas-timeslot-picker] Component will load`, { selectedDate: this.selectedDate, availability: this.availability, times: this.times });\n }\n\n async componentDidLoad() {\n debug(`[nylas-timeslot-picker] Component did load`);\n const availableTimes = this.availability\n ?.filter(timeslot => this.selectedDate && isSameDayTimezone(timeslot.start_time, this.selectedDate, this.selectedTimezone))\n .map(timeslot => timeslot);\n this.times = availableTimes || [];\n }\n\n applyThemeConfig(themeConfig?: ThemeConfig) {\n if (themeConfig) {\n for (const [key, value] of Object.entries(themeConfig)) {\n this.host.style.setProperty(`${key}`, value);\n }\n }\n }\n\n private getTimeslotId(timeslot: Timeslot, index: number) {\n const date = new Date(timeslot.start_time);\n const eventId = timeslot.event_id;\n return `${date.toLocaleDateString()}-${index}${eventId ? `-${eventId}` : ''}`;\n }\n\n private onClickSelectTime(timeslot: Timeslot, index: number) {\n debug(`[nylas-timeslot-picker] Time selected`, timeslot, index);\n this.selectedTimeslotIndex = this.getTimeslotId(timeslot, index);\n this.timeslotSelected.emit({\n start_time: timeslot.start_time,\n end_time: timeslot.end_time,\n emails: timeslot.emails,\n capacity: timeslot?.capacity,\n event_id: timeslot?.event_id,\n master_id: timeslot?.master_id,\n calendar_id: timeslot?.calendar_id,\n });\n }\n\n private handleConfirmedTimeslot = async (event: Event, timeslot: Timeslot | undefined) => {\n event.preventDefault();\n debug(`[nylas-timeslot-picker] Confirm timeslot`, timeslot);\n if (timeslot) {\n this.timeslotConfirmed.emit({ timeslot, host: this.host });\n }\n };\n\n @Method()\n async emitValidateTimeslotError(error: string, type: 'error' | 'info') {\n this.validateTimeslotError.emit({ error, type });\n }\n\n private handleMouseEnter = (index: number) => {\n this.hoveredTimeslotIndex = index;\n };\n\n private handleMouseLeave = () => {\n this.hoveredTimeslotIndex = -1;\n };\n\n private getTimeSlotLabel(timeslot: Timeslot) {\n const locale = LANGUAGE_CODE_TO_LOCALE_MAP[this.selectedLanguage || 'en'];\n const timeFormat = new Intl.DateTimeFormat(locale, {\n hour: '2-digit',\n minute: '2-digit',\n timeZone: this.selectedTimezone,\n hour12: this.hour12,\n });\n return `${timeFormat.format(timeslot.start_time)} - ${timeFormat.format(timeslot.end_time)}`;\n }\n\n @RegisterComponent<NylasTimeslotPicker, NylasSchedulerConnector, Exclude<NylasScheduling['stores'], undefined>>({\n name: 'nylas-timeslot-picker',\n stateToProps: new Map([\n ['scheduler.selectedDate', 'selectedDate'],\n ['scheduler.availability', 'availability'],\n ['scheduler.selectedTimeslot', 'selectedTimeslot'],\n ['scheduler.selectedTimezone', 'selectedTimezone'],\n ['scheduler.selectedLanguage', 'selectedLanguage'],\n ['scheduler.isLoading', 'isLoading'],\n ['scheduler.themeConfig', 'themeConfig'],\n ['scheduler.hour12', 'hour12'],\n ]),\n eventToProps: {\n timeslotSelected: async (event: CustomEvent<Timeslot>, nylasSchedulerConnector: NylasSchedulerConnector) => {\n debug('nylas-timeslot-picker', 'timeslotSelected', event.detail);\n nylasSchedulerConnector.scheduler.selectTime(event.detail);\n },\n timeslotConfirmed: async (event: CustomEvent<{ timeslot: Timeslot; host: HTMLNylasTimeslotPickerElement }>, nylasSchedulerConnector: NylasSchedulerConnector) => {\n debug('nylas-timeslot-picker', 'timeslotConfirmed', event.detail);\n const { timeslot, host } = event.detail;\n if (timeslot && timeslot?.event_id && timeslot?.capacity) {\n const result = await nylasSchedulerConnector.scheduler.validateGroupEventTimeslot(timeslot);\n if (result && 'error' in result) {\n const errorMessage = result.error?.message || 'An error occurred while validating the timeslot';\n if (errorMessage === 'Event is full') {\n host.emitValidateTimeslotError(errorMessage, 'info');\n } else {\n host.emitValidateTimeslotError(errorMessage, 'error');\n }\n }\n } else {\n nylasSchedulerConnector.scheduler.toggleAdditionalData(true);\n }\n },\n validateTimeslotError: async (event: CustomEvent<{ error: string }>, _nylasSchedulerConnector: NylasSchedulerConnector) => {\n debug('nylas-timeslot-picker', 'validateTimeslotError', event.detail);\n },\n },\n fireRegisterEvent: true,\n })\n render() {\n const locale = LANGUAGE_CODE_TO_LOCALE_MAP[this.selectedLanguage || 'en'];\n if (this.isLoading) {\n return (\n <Host>\n <div class={'loading'}>\n {new Array(6).fill(0).map((_, i) => (\n <div class={'timeslot-skeleton'} style={{ animationDelay: `${i * 20}ms` }} />\n ))}\n </div>\n </Host>\n );\n }\n\n if (this.availability && this.availability.length === 0) {\n return (\n <Host>\n <div class={'empty'}>\n <span>No dates available</span>\n </div>\n </Host>\n );\n }\n\n const filteredTimes = this.times.filter(timeslot => {\n const groupEvent = timeslot?.event_id || timeslot?.master_id;\n const showCapacity = typeof timeslot?.capacity === 'number' && timeslot?.capacity > 0;\n return !(groupEvent && !showCapacity);\n });\n\n if ((!this.times || this.times.length === 0 || filteredTimes.length === 0) && !!this.selectedDate) {\n return (\n <Host>\n <div class={'empty'}>\n <span>No time slots available for selected date</span>\n </div>\n </Host>\n );\n }\n\n if (!this.selectedDate) return <Host></Host>;\n\n return (\n <Host part=\"ntp\">\n <div class={'time-picker-wrapper'} part=\"ntp__time-picker-wrapper\">\n <div class={'timeslots'} part=\"ntp__timeslots\">\n {filteredTimes.map((timeslot, index) => {\n const showCapacity = typeof timeslot?.capacity === 'number' && timeslot?.capacity > 0;\n const isSelected = this.selectedTimeslotIndex == this.getTimeslotId(timeslot, index);\n return (\n <button\n part={`ntp__timeslot ${this.selectedTimeslot?.start_time?.getTime() === timeslot.start_time.getTime() ? 'ntp__timeslot--selected' : ''}`}\n class={{\n time: true,\n selected: typeof this.selectedTimeslot !== 'undefined' && isSelected,\n }}\n onClick={() => this.onClickSelectTime(timeslot, index)}\n onMouseEnter={() => this.handleMouseEnter(index)}\n onMouseLeave={() => this.handleMouseLeave()}\n >\n <div class=\"time-label\" part=\"ntp__time-label\">\n {this.hoveredTimeslotIndex == index || isSelected\n ? this.getTimeSlotLabel(timeslot)\n : timeslot.start_time.toLocaleTimeString(locale, { hour: '2-digit', minute: '2-digit', timeZone: this.selectedTimezone, hour12: this.hour12 })}\n <span class=\"spots\">{showCapacity ? i18next.t('spotsLeft', { count: timeslot?.capacity }) : null}</span>\n </div>\n </button>\n );\n })}\n </div>\n {this.selectedTimeslot && (\n <div class={'footer'}>\n <button-component variant={'primary'} onClick={(event: Event) => this.handleConfirmedTimeslot(event, this.selectedTimeslot)} part=\"ntp__button-primary\">\n <slot name=\"timeslot-picker-cta-label\">{i18next.t('nextButton')}</slot>\n </button-component>\n </div>\n )}\n </div>\n </Host>\n );\n }\n}\n"],"mappings":"iTAAA,MAAMA,EAA0B,+wJ,ugBC6BnBC,EAAoB,MALjC,WAAAC,CAAAC,G,4SAmDmBC,KAAgBC,iBAAWC,KAAKC,iBAAiBC,kBAAkBC,SAUjCL,KAAAM,iBAA2BC,UAAUC,SAM/ER,KAASS,UAAW,GACpBT,KAAOU,QAAW,GAmFnBV,KAAgCW,iCAAG,KACzC,MAAMF,EAAY,IAAIG,KAAKZ,KAAKa,iBAAiBC,YACjD,MAAMC,EAAwBf,KAAKgB,gBAAgBC,WAAWC,wBAC9D,IAAKH,EAAuB,CAC1Bf,KAAKmB,2BAA2BC,KAAK,CAAEC,UAAWrB,KAAKsB,UAAUC,aACjE,M,CAEF,MAAMC,EAAuBf,EAAUgB,UAAYV,EAAwB,GAAK,IAChF,GAAIS,GAAuB,IAAIZ,MAAOa,UAAW,CAC/CzB,KAAK0B,iCAAiCN,KAAK,CACzCO,MAAO,CACLC,MAAO,qBACPC,QAAS,wCAAwCd,4B,KAGhD,CACLf,KAAKmB,2BAA2BC,KAAK,CAAEC,UAAWrB,KAAKsB,UAAUC,Y,GAI7DvB,KAA6B8B,8BAAG,KACtC,MAAMC,EAAgBJ,IACpB3B,KAAKgC,2BAA2BZ,KAAKO,EAAM,EAE7C3B,KAAKiC,wBAAwBb,KAAK,CAAEC,UAAWrB,KAAKsB,UAAUC,WAAYQ,gBAAe,EAG3F/B,KAAAkC,kBAAqBC,IACnB,OAAQA,GACN,IAAK,OACH,MAAO,OACT,IAAK,MACH,MAAO,MACT,QACE,MAAO,G,CA8Hd,CAvNC,kBAAAC,CAAmBC,GACjBrC,KAAKsC,iBAAiBD,E,CAIxB,8BAAAE,CAA+BC,E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sc,2BAA2B5B,GAClF,GAAIvV,GAAU,UAAWA,EAAQ,CAC/B,MAAM0I,EAAe1I,EAAOzE,OAAOE,SAAW,kDAC9C,GAAIiN,IAAiB,gBAAiB,CACpC/L,EAAK6Z,0BAA0B9N,EAAc,O,KACxC,CACL/L,EAAK6Z,0BAA0B9N,EAAc,Q,OAG5C,CACL7I,EAAwBhF,UAAUuO,qBAAqB,K,GAG3DqN,sBAAuB9W,MAAOC,EAAuCM,KACnEnD,EAAM,wBAAyB,wBAAyB6C,EAAMG,OAAO,GAGzEI,kBAAmB,O,sFAkFpBiV,GAAAhV,UAAA,e","ignoreList":[]}
@@ -1,2 +0,0 @@
1
- var r=(r=>(r.Error="error",r.Warning="warning",r.Info="info",r.Success="success",r))(r||{});const o=r=>r!==null&&typeof r=="object"&&"error"in r;const n="2.3.0";export{o,r as u,n as v};
2
- //# sourceMappingURL=p-Vj35JRt4.js.map