1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7772,1513],{37772:function(e,t,n){n.r(t),n.d(t,{google_logo_icon:function(){return p},microsoft_logo_icon:function(){return h},nylas_editor_tabs:function(){return y},nylas_editor_tabs_group:function(){return v},nylas_list_configurations:function(){return w},nylas_select_event_type:function(){return C}});var o,i,a,r,s=n(39986),l=n(91513),d=n(99091),c=n(38182),u=n(63003);n(67294),n(85893),n(73935);let p=class{constructor(e){(0,s.r)(this,e),this.width="24",this.height="24"}render(){return(0,s.h)("svg",{key:"eb0615e5875a4d560edb09dd85fcf0b8bbeb5458",width:this.width,height:this.height,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},(0,s.h)("g",{key:"7d040d5b5bc8cf89eabff2ed2695f99bea692b4e","clip-path":"url(#clip0_959_12452)"},(0,s.h)("path",{key:"4ddc28c0799291a0c23538444f1c7f5a35959cac",d:"M23.745 12.27C23.745 11.48 23.675 10.73 23.555 10H12.255V14.51H18.725C18.435 15.99 17.585 17.24 16.325 18.09V21.09H20.185C22.445 19 23.745 15.92 23.745 12.27Z",fill:"#4285F4"}),(0,s.h)("path",{key:"d5b051bacfa0110b66c99273ba6fd591a68237d1",d:"M12.255 24C15.495 24 18.205 22.92 20.185 21.09L16.325 18.09C15.245 18.81 13.875 19.25 12.255 19.25C9.12504 19.25 6.47505 17.14 5.52505 14.29H1.54504V17.38C3.51504 21.3 7.56504 24 12.255 24Z",fill:"#34A853"}),(0,s.h)("path",{key:"6fc0685305b1c96ce35fbf87ccab73f161d648c0",d:"M5.52501 14.2901C5.27501 13.5701 5.145 12.8001 5.145 12.0001C5.145 11.2001 5.28501 10.4301 5.52501 9.71012V6.62012H1.545C0.725004 8.24012 0.255005 10.0601 0.255005 12.0001C0.255005 13.9401 0.725004 15.7601 1.545 17.3801L5.52501 14.2901Z",fill:"#FBBC05"}),(0,s.h)("path",{key:"5946c791195dd03d48b4938d8698ba8e01a7a0b3",d:"M12.255 4.75C14.025 4.75 15.605 5.36 16.855 6.55L20.275 3.13C18.205 1.19 15.495 0 12.255 0C7.56504 0 3.51504 2.7 1.54504 6.62L5.52505 9.71C6.47505 6.86 9.12504 4.75 12.255 4.75Z",fill:"#EA4335"})),(0,s.h)("defs",{key:"9d33e98420dbd0f952496686fd02f41894ab49f4"},(0,s.h)("clipPath",{key:"dd192b07d7651bbd74375c1a31e0f3027d9b9a10",id:"clip0_959_12452"},(0,s.h)("rect",{key:"98c2344df7d506d2579cd793d89fb42feeace8fd",width:24,height:24,fill:"white"}))))}};p.style=".sc-google-logo-icon-h{display:flex}";let h=class{constructor(e){(0,s.r)(this,e),this.width="22",this.height="22"}render(){return(0,s.h)("svg",{key:"a6a6af29ed81710f3f493d849c90871991e0be0f",width:this.width,height:this.height,viewBox:"0 0 22 22",fill:"none",xmlns:"http://www.w3.org/2000/svg"},(0,s.h)("path",{key:"025c40cab8337a37897481fb47580f219b3ad528",d:"M0.043457 0.043457H10.4782V10.4782H0.043457V0.043457Z",fill:"#F35325"}),(0,s.h)("path",{key:"d7e67a46de5217cfa54f8973616616a9fd4fb474",d:"M11.5217 0.043457H21.9565V10.4782H11.5217V0.043457Z",fill:"#81BC06"}),(0,s.h)("path",{key:"2f4162db32fb29afb4f88c3070e59e8dc574a732",d:"M0.043457 11.5217H10.4782V21.9565H0.043457V11.5217Z",fill:"#05A6F0"}),(0,s.h)("path",{key:"4ec074b89f50e66765e199ae112d063ca21b541a",d:"M11.5217 11.5217H21.9565V21.9565H11.5217V11.5217Z",fill:"#FFBA08"}))}};function b({id:e,formState:t,activeTab:n},o){return(0,s.h)(s.F,null,(0,s.h)("div",{key:`event-info-${e}`,class:{hide:n!==a.EventInfo}},(0,s.h)("nylas-event-info",null,(0,s.h)("div",{slot:"inputs"},(0,s.h)("nylas-event-title",{name:"title",exportparts:"net, net__title, net__dropdown-content"}),(0,s.h)("nylas-event-duration",{name:"duration",exportparts:"ned, ned__error, ned__dropdown, ned__dropdown-button, ned__dropdown-content, ned__input_dropdown, ned__input_dropdown-input, ned__input_dropdown-content"}),(0,s.h)("nylas-event-location",{name:"location",exportparts:"nel, nel__location, nel__dropdown, nel__dropdown-button, nel__dropdown-content"}),(0,s.h)("nylas-event-description",{name:"description",exportparts:"nedesc, nedesc__textarea"})))),(0,s.h)("div",{key:`availability-${e}`,class:{hide:n!==a.Availability}},(0,s.h)("nylas-participant-booking-calendars",{participants:t.participants,name:"participant-booking-calendars",exportparts:"npbc, npbc__header, npbc__content, npbc__participant-container, npbc__participant-title"}),(0,s.h)("nylas-connected-calendars",{participants:t.participants,name:"connected-calendars",exportparts:"nccals, nccals__header, nccals__content, nccals__container, nccals__title, nccals__toggle-container, npbc__participant-toggle-container"}),(0,s.h)("nylas-availability-picker",{name:"availability",exportparts:"nap, nap__header, nap__select-timezone, nap__select-timezone-button, nap__select-timezone-dropdown-content, nap__availability, nap__day, nap__time-ranges, nap__time-range, nap__add-time-range, nap__time-picker-container, nap__time-picker-input, nap__time-picker-times"})),(0,s.h)("div",{key:`booking-options-${e}`,class:{hide:n!==a.BookingOptions}},(0,s.h)("nylas-scheduling-method",{name:"availability-method",readOnly:!0,exportparts:"nsm, nsm__header, nsm__input-label, nsm__dropdown, nsm__dropdown-button, nsm__dropdown-content"}),(0,s.h)("nylas-custom-booking-flow",{exportparts:"ncbflow, ncbflow__header, ncbflow__title, ncbflow__content"},(0,s.h)("div",{slot:"inputs"},(0,s.h)("nylas-booking-confirmation-type",{name:"confirmation-type",exportparts:"nbct, nbct__header, nbct__dropdown, nbct__dropdown-button, nbct__dropdown-content"}),(0,s.h)("nylas-booking-confirmation-redirect",{name:"confirmation-redirect",exportparts:"nbcr, nbcr__header, nbcr__dropdown, nbcr__dropdown-button, nbcr__dropdown-content, nbcr__input-textfield"}))),(0,s.h)("nylas-buffer-time",{name:"buffer-time",exportparts:"nbt, nbt__header, nbt__body, nbt__dropdown-before, nbt__dropdown-button-before, nbt__dropdown-content-before, nbt__dropdown-after, nbt__dropdown-button-after, nbt__dropdown-content-after, nbt__preview"}),(0,s.h)("nylas-event-limits",null,(0,s.h)("div",{slot:"inputs"},(0,s.h)("nylas-min-booking-notice",{name:"min-booking-notice",exportparts:"nmbn, nmbn__number-dropdown, nmbn__number-dropdown-button, nmbn__number-dropdown-content, nmbn__period-dropdown, nmbn__period-dropdown-button, nmbn__period-dropdown-content"}),(0,s.h)("nylas-limit-future-bookings",{name:"limit-future-bookings",exportparts:"nlfb, nlfb__number-dropdown, nlfb__number-dropdown-button, nlfb__number-dropdown-content, nlfb__period-dropdown, nlfb__period-dropdown-button, nlfb__period-dropdown-content"}),(0,s.h)("nylas-min-cancellation-notice",{name:"min-cancellation-notice",exportparts:"nmcn, nmcn__number-dropdown, nmcn__number-dropdown-button, nmcn__number-dropdown-content, nmcn__peri
1od-dropdown, nmcn__period-dropdown-button, nmcn__period-dropdown-content"}),(0,s.h)("nylas-cancellation-policy",{name:"cancellation-policy",exportparts:"ncpolicy, ncpolicy__textarea"}))),(0,s.h)("nylas-timeslot-interval",{name:"timeslot-interval",exportparts:"nti, nti__header, nti__input-label, nti__dropdown, nti__dropdown-button, nti__dropdown-content"}),(0,s.h)("nylas-customize-booking-settings",{name:"customize-booking-settings",exportparts:"ncbs, ncbs__header, ncbs__settings, ncbs__settings-div, ncbs__additional_guests, ncbs__cancellation_options, ncbs__rescheduling_options"})),(0,s.h)("div",{key:`communications-${e}`,class:{hide:n!==a.Communications}},(0,s.h)("nylas-disable-emails",{name:"disable-emails",exportparts:"nde, nde__toggle-label, nde_toggle-input, nde_toggle-slider"}),!(null!=t&&t.disableEmails)&&(0,s.h)(s.F,null,(0,s.h)("nylas-confirmation-email",{name:"confirmation-email-template",exportparts:"nce, nce__tab-heading, nce__header, nce__body, nce__confirmation-email-toggle--container, nce__summary, nce__reminder-input_dropdown, nce__reminder-input_dropdown-input, nce__reminder-input_dropdown-content"}),(0,s.h)("nylas-reminder-emails",{name:"reminder-overrides",exportparts:"nre, nre__tab-heading, nre__header, nre__body, nre__confirmation-email-toggle--container, nre__summary, nrt, nrt__number-dropdown, nrt__number-dropdown-button, nrt__number-dropdown-content, nrt__period-dropdown, nrt__period-dropdown-button, nrt__period-dropdown-content, nrt__time-period-selector"}))),(0,s.h)("div",{key:`participants-${e}`,class:{hide:n!==a.Participants}},(0,s.h)("nylas-additional-participants",{name:"participants",exportparts:"nadtnlpart, nadtnlpart__title, nadtnlpart__subtitle, nadtnlpart__content, nadtnlpart__input_group, nadtnlpart__input_wrapper, nadtnlpart__input, nadtnlpart__remove-participant"}),(0,s.h)("nylas-participants-custom-availability",{participants:t.participants,name:"participant-custom-availability",exportparts:"npca, npca__header, npca__content, npca__participant-container, npca__participant-title, npca__participant-toggle--container, npca__toggle-label, npca__toggle-input, npca__toggle-slider"})),(0,s.h)("div",{key:`page-styles-${e}`,class:{hide:n!==a.PageStyles}},(0,s.h)("nylas-custom-event-slug",{name:"custom-event-slug",exportparts:"nces, nces__body, nces__header, nces__drawer-toggle--container, nces__input-textfield"}),(0,s.h)("nylas-page-name",{name:"page-name",exportparts:"npn, npn__body, npn__header, npn__drawer-toggle--container, npn__input-textfield"}),(0,s.h)("nylas-page-styling",{name:"page-styling",exportparts:"nps, nps__header, nps__drawer-toggle--container, nps__body, nps__title-input-textfield, nps__company-logo-input-textfield, nps__color-picker, nps__color-picker-button, nps__color-picker-button-label, nps__color-picker-selected-label, nps__submit-button-label-input-textfield, nps__message-textarea"},o)),(0,s.h)("div",{key:`booking-form-${e}`,class:{hide:n!==a.BookingForm}},(0,s.h)("nylas-booking-form-config",{name:"additional-fields",exportparts:"nbfc, nbfc__header, nbfc__add_field, nbfc__add_field-button, nbfc__add_field-content, nbfc__static_fields, nbfc__additional_fields, nbfc__form-field, nbfc__form-field-header, nbfc__form-field-content"})))}h.style=".sc-microsoft-logo-icon-h{display:flex}",(o=a||(a={})).EventInfo="eventInfo",o.Availability="availability",o.BookingOptions="bookingOptions",o.Communications="communications",o.Participants="participants",o.BookingForm="bookingForm",o.PageStyles="pageStyles";var g=function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)};let y=class{constructor(e){(0,s.r)(this,e),this.schedulerConfigChanged=(0,s.a)(this,"schedulerConfigChanged",7),this.schedulerConfigCreated=(0,s.a)(this,"schedulerConfigCreated",7),this.cancelButtonClick=(0,s.a)(this,"cancelButtonClick",7),this.formSubmitted=(0,s.a)(this,"formSubmitted",7),this.previewButtonClicked=(0,s.a)(this,"previewButtonClicked",7),this.schedulerEditorFormUpdated=(0,s.a)(this,"schedulerEditorFormUpdated",7),this.nylasSchedulerError=(0,s.a)(this,"nylasSchedulerError",6),this.dismissNotification=(0,s.a)(this,"dismissNotification",7),this.formSubmissionHandler=async e=>{var t,n,o,i,a,r,l,p,h,b,g,y,f,m,v,_,w;e.preventDefault();let k=await this.formSubmitted.emit();if((0,s.b)("[nylas-editor-tabs]","formSubmissionHandler",k),!this.formRef.checkValidity()||k.defaultPrevented){this.setError({message:this.formRef.validationMessage||s.i.t("fixFormErrors"),type:d.n.Error,category:u.E.Component,title:s.i.t("nylasEditorTabs.formErrorTitle")});return}this.isLoading=!0,this.hasUnsavedChanges=!1;let C=this.updateFormState();(0,s.b)("[nylas-editor-tabs]","formState",C);let{title:x,description:E,duration:S,availability:T,bookingCalendar:F,location:L,bookingType:P,buffer:O,availableDaysInFuture:B,minCancellationNotice:H,minBookingNotice:z,cancellationPolicy:N,timeslotInterval:R,additionalGuestsHidden:U,hideCancellationOptions:G,hideReschedulingOptions:I,participants:D,participantOpenHours:j,additionalFields:$,participantCalendars:M,conferencing:A,participantBookingCalendars:V,reminders:J,emailTemplate:q,redirectUrl:Z,availabilityMethod:W,slug:K,appearance:Q,name:X,disableEmails:Y,organizerLocale:ee}=C,et=(null==(n=null==(t=this.selectedConfiguration)?void 0:t.participants)?void 0:n.find(e=>e.is_organizer))||(null==D?void 0:D.find(e=>e.is_organizer)),en=M&&null!=et&&et.email?M[null==et?void 0:et.email]:[],eo=(null==(o=null==et?void 0:et.booking)?void 0:o.calendar_id)||F,ei=S?parseInt(S):30,ea=D&&(null==D?void 0:D.length)>0?D:[{name:(null==et?void 0:et.name)??(null==(i=this.currentUser)?void 0:i.name)??"",email:(null==et?void 0:et.email)??(null==(a=this.currentUser)?void 0:a.email)??"",is_organizer:!0,timezone:(null==T?void 0:T.timezone)??Intl.DateTimeFormat().resolvedOptions().timeZone,availability:{calendar_ids:F&&""!==F?[F]:["primary"],open_hours:[]},booking:{calendar_id:F&&""!==F?F:"primary"}}],er=W||((null==(p=null==(l=null==(r=this.selectedConfiguration)?void 0:r.availability)?void 0:l.availability_rules)?void 0:p.availability_method)??"collective");this.selectedEventType&&this.selectedEventType!==c.C.group&&(er=this.selectedEventType===c.C.one_on_one?c.C.collective:this.selectedEventType),console.log("availabilityMethodSelected",er);let es={...(null==(h=this.selectedConfiguration)?void 0:h.id)&&{id:this.selectedConfiguration.id},version:(null==(b=this.selectedConfiguration)?void 0:b.version)??"1.0.0",slug:K,name:X,availability:{duration_minutes:ei,interval_minutes:(null==R?void 0:R.interval)??ei,round_to:null==R?void 0:R.roun
1dTo,availability_rules:{availability_method:er,buffer:O||{before:0,after:0},default_open_hours:(null==T?void 0:T.openHours)??(null==(f=null==(y=null==(g=this.selectedConfiguration)?void 0:g.availability)?void 0:y.availability_rules)?void 0:f.default_open_hours)??c.D,round_robin_group_id:(null==(_=null==(v=null==(m=this.selectedConfiguration)?void 0:m.availability)?void 0:v.availability_rules)?void 0:_.round_robin_group_id)??""}},participants:[...ea?ea.map(e=>{var t,n,o,i,a,r;let s=(null==T?void 0:T.timezone)??Intl.DateTimeFormat().resolvedOptions().timeZone;if(null!=(t=null==j?void 0:j[e.email])&&t.length&&(s=null==(o=null==(n=null==j?void 0:j[e.email])?void 0:n[0])?void 0:o.timezone),e.is_organizer){let t=null!=V&&V[e.email]?null==V?void 0:V[e.email]:eo||"primary",n=null!=M&&M[e.email]?null==M?void 0:M[e.email]:null!=en&&en.length?en:["primary"],o=1===n.length&&"primary"===n[0];return{name:e.name??"",email:e.email,is_organizer:!0,timezone:s,availability:{calendar_ids:o?[t]:n,open_hours:(null==j?void 0:j[e.email])??(null==(i=e.availability)?void 0:i.open_hours)??[]},booking:{calendar_id:t}}}let l=null!=V&&V[e.email]?{calendar_id:null==V?void 0:V[e.email]}:(null==e?void 0:e.booking)??void 0,d=(null==M?void 0:M[e.email])??(null==(a=e.availability)?void 0:a.calendar_ids)??["primary"],c=1===d.length&&"primary"===d[0];return{...e,timezone:s,availability:e.availability?{calendar_ids:c&&"u">typeof l?[null==l?void 0:l.calendar_id]:d,open_hours:(null==j?void 0:j[e.email])??(null==(r=e.availability)?void 0:r.open_hours)??[]}:void 0,booking:l}}):[]],event_booking:{title:(null==x?void 0:x.toString())??"",description:(null==E?void 0:E.toString())??"",location:(null==L?void 0:L.toString())??"",booking_type:(null==P?void 0:P.toString())??"booking",timezone:(null==T?void 0:T.timezone)??Intl.DateTimeFormat().resolvedOptions().timeZone,conferencing:A,reminders:J,disable_emails:"boolean"==typeof Y&&Y},scheduler:{cancellation_policy:N??"",available_days_in_future:B??30,min_cancellation_notice:H??0,min_booking_notice:z??60,hide_additional_guests:U??!1,hide_cancellation_options:G??!1,hide_rescheduling_options:I??!1,additional_fields:$,email_template:q?{...q,organizer_locale:ee||"en",logo:q.logo||""}:void 0,confirmation_redirect_url:Z},appearance:Q},el=(0,s.q)(this.selectedConfiguration,es||{}),ed="create"===this.action?el:es;this.isConfigRoundRobin(ed)&&(ed.participants=ed.participants.map(e=>({...e,is_organizer:void 0})));let ec=this.checkForBookingFormErrors(ed),eu=(null==(w=this.configurations)?void 0:w.find(e=>{var t;return e.id===(null==(t=this.selectedConfiguration)?void 0:t.id)}))||{},ep=this.checkForOrganizerConfirmationError((0,s.q)(ed,eu));ec||ep||this.schedulerConfigChanged.emit({config:ed,resetLoadingState:e=>{this.isLoading=!1,this.changesSaved=!0,setTimeout(()=>{this.changesSaved=!1},5e3)},action:this.action,host:this.host})},this.isConfigRoundRobin=e=>{var t,n,o,i;return(null==(n=null==(t=null==e?void 0:e.availability)?void 0:t.availability_rules)?void 0:n.availability_method)==="max-availability"||(null==(i=null==(o=e.availability)?void 0:o.availability_rules)?void 0:i.availability_method)==="max-fairness"},this.checkForOrganizerConfirmationError=e=>{var t,n;let o=!1,i="",a=(null==(t=e.event_booking)?void 0:t.booking_type)==="organizer-confirmation",r=null==(n=e.scheduler)?void 0:n.organizer_confirmation_url;return a&&!r&&(i+="Organizer confirmation URL is required when using organizer confirmation booking type.",o=!0),o&&(this.isLoading=!1,this.host.setError({message:i,type:d.n.Error,category:u.E.Component,title:"Error:"})),o},this.checkForBookingFormErrors=e=>{var t;let n=!1,o="",i=null==(t=e.scheduler)?void 0:t.additional_fields;return i&&(o="",Object.entries(i).forEach(e=>{let t=e[1];if(""===t.label){o+=s.i.t("nylasEditorTabs.bookingFormError_label",{type:t.type}),n=!0;return}if(t.options){for(let e of t.options)if(""===e.trim()){o+=s.i.t("nylasEditorTabs.bookingFormError_option",{label:t.label,type:t.type}),n=!0;break}}})),n&&(this.isLoading=!1,this.host.setError({message:o,type:d.n.Error,category:u.E.Component,title:s.i.t("nylasEditorTabs.bookingFormError")})),n},this.calendars=void 0,this.selectedConfiguration=void 0,this.configurations=void 0,this.currentUser=void 0,this.schedulerPreviewLink="",this.mode="app",this.hideEditorTabs=[],this.enableUserFeedback=!0,this.selectedLanguage=void 0,this.selectedEventType=void 0,this.action="create",this.show
1FeedbackModal=!1,this.activeTab=a.EventInfo,this.isLoading=!1,this.hasUnsavedChanges=!1,this.changesSaved=!1,this.formState={},this.error={message:"",type:d.n.Error,category:u.E.Component,title:""}}configChangedHandler(e){(0,s.b)("[nylas-editor-tabs]","configChangedHandler",e,this.selectedConfiguration),this.formState={...this.getFormStateFromConfig(e)},null!=e&&e.id?this.action="edit":this.action="create"}userChangedHandler(e){(0,s.b)("[nylas-editor-tabs]","userChangedHandler",e),e&&(this.formState={...this.getFormStateFromConfig(this.selectedConfiguration)})}selectedLanguageChangedHandler(e,t){e!==t&&(s.i.changeLanguage(e),this.error&&this.error.message&&(this.error={...this.error,message:s.i.t("fixFormErrors")},this.showErrorNotification(this.error)))}async schedulerConfigCreatedEventHandler(e){return this.schedulerConfigCreated.emit(e)}async setError(e){var t;this.error={message:e.message,type:e.type,category:e.category,title:e.title||s.i.t("genericErrorTitle")},null!=(t=this.error)&&t.message&&this.showErrorNotification(this.error)}async resetError(){var e,t;null!=(e=this.error)&&e.message&&this.dismissNotification.emit({id:null==(t=this.error)?void 0:t.message.split(" ").join("-"),host:this.host}),this.error={message:"",type:d.n.Error,category:u.E.Component,title:""}}connectedCallback(){(0,s.b)("[nylas-editor-tabs]","connectedCallback")}componentWillLoad(){(0,s.b)("[nylas-editor-tabs]","componentWillLoad"),this.formState=this.getFormStateFromConfig(this.selectedConfiguration)}componentDidLoad(){var e,t;(0,s.b)("[nylas-editor-tabs]","componentDidLoad"),this.enableUserFeedback&&!(0,u.i)()&&(0,u.a)({dsn:"https://[email protected]/4507889638178816",release:"2.0.2",integrations:e=>[...e.filter(e=>!1),(0,u.f)({colorScheme:"system",autoInject:!1})],autoSessionTracking:!1,beforeSend:()=>null}),null!=(e=this.selectedConfiguration)&&e.id&&this.configChangedHandler(this.selectedConfiguration);let n=null==(t=this.host.querySelector("button.tab:not(.hide)"))?void 0:t.name;n&&(this.activeTab=n)}disconnectedCallback(){(0,s.b)("[nylas-editor-tabs]","disconnectedCallback")}handleValueChanged(e){(0,s.b)("[nylas-editor-tabs]","handleValueChanged",e);let{name:t,value:n}=e.detail;console.log("name",t,"value",n),this.setFormState(n,t),this.formState={...this.formState},this.resetError(),c.e.includes(t)&&(this.hasUnsavedChanges=!0),this.schedulerEditorFormUpdated.emit({value:e.detail.value,name:e.detail.name})}feedbackModalClosedHandler(){this.showFeedbackModal=!1}feedbackSubmittedHandler(e){var t,n,o,i,a,r;let s={eventId:(0,u.c)("Scheduler Editor User Feedback",{extra:{configId:null==(t=this.selectedConfiguration)?void 0:t.id,slug:null==(n=this.selectedConfiguration)?void 0:n.slug}}),message:e.detail.feedback};(0,u.b)(s,{includeReplay:!0,captureContext:{tags:{"nylas-web-element":"nylas-scheduler-editor","nylas-web-element-version":"2.0.2","nylas-config-id":null==(o=this.selectedConfiguration)?void 0:o.id,"nylas-slug":null==(i=this.selectedConfiguration)?void 0:i.slug,"host-url":window.location.href},extra:{configId:null==(a=this.selectedConfiguration)?void 0:a.id,slug:null==(r=this.selectedConfiguration)?void 0:r.slug}}}),this.showFeedbackModal=!1}showErrorNotification(e){e.message&&this.nylasSchedulerError.emit({notification:{title:e.title,category:e.category||u.E.Component,type:e.type||d.n.Error,description:e.message,id:e.message.split(" ").join("-"),ttl:"none"},host:this.host})}getFormStateFromConfig(e){var t,n,o,i,a,r,s,l,d,u,p,h,b,g,y,f,m,v,_,w,k,C,x,E,S,T,F,L,P,O,B,H,z,N,R,U,G;let I=null==(t=null==e?void 0:e.participants)?void 0:t.find(e=>e.is_organizer);return!I&&(null==(o=null==(n=null==e?void 0:e.availability)?void 0:n.availability_rules)?void 0:o.availability_method)!=="collective"&&(I=null==(i=null==e?void 0:e.participants)?void 0:i.find(e=>{var t;return e.email===(null==(t=this.currentUser)?void 0:t.email)}))&&(I.is_organizer=!0),null!=e&&e.appearance&&console.info("Appearance settings have been returned from the given configuration; please remember to grab them from the configSettingsLoaded event and apply them as desired."),{title:(null==(a=null==e?void 0:e.event_booking)?void 0:a.title)??"",description:(null==(r=null==e?void 0:e.event_booking)?void 0:r.description)??"",duration:(null==(l=null==(s=null==e?void 0:e.availability)?void 0:s.duration_minutes)?void 0:l.toString())??"30",availability:{timezone:(null==(d=null==e?void 0:e.event_booking)?void 0:d.timezone)??Intl.DateTimeFormat().resolvedOptions().timeZone,openHours:(null==(p=null==(u=null==e?void 0:e.availability)?void 0:u.availability_rules)?void 0:p.default_open_hours)??c.D}
1,additionalFields:(null==(h=null==e?void 0:e.scheduler)?void 0:h.additional_fields)??{},conferencing:(null==(b=null==e?void 0:e.event_booking)?void 0:b.conferencing)??{},calendarIds:(null==(g=null==I?void 0:I.availability)?void 0:g.calendar_ids)??[],participants:(null==e?void 0:e.participants)??[],bookingCalendar:(null==(y=null==I?void 0:I.booking)?void 0:y.calendar_id)??(null==I?void 0:I.email)??"",location:(null==(f=null==e?void 0:e.event_booking)?void 0:f.location)??"",bookingType:(null==(m=null==e?void 0:e.event_booking)?void 0:m.booking_type)??"booking",buffer:(null==(_=null==(v=null==e?void 0:e.availability)?void 0:v.availability_rules)?void 0:_.buffer)??{before:0,after:0},cancellationPolicy:(null==(w=null==e?void 0:e.scheduler)?void 0:w.cancellation_policy)??"",availableDaysInFuture:(null==(k=null==e?void 0:e.scheduler)?void 0:k.available_days_in_future)??30,minCancellationNotice:(null==(C=null==e?void 0:e.scheduler)?void 0:C.min_cancellation_notice)??0,minBookingNotice:(null==(x=null==e?void 0:e.scheduler)?void 0:x.min_booking_notice)??60,timeslotInterval:{interval:(null==(E=null==e?void 0:e.availability)?void 0:E.interval_minutes)??(null==(S=null==e?void 0:e.availability)?void 0:S.duration_minutes),roundTo:null==(T=null==e?void 0:e.availability)?void 0:T.round_to},additionalGuestsHidden:(null==(F=null==e?void 0:e.scheduler)?void 0:F.hide_additional_guests)??!1,hideCancellationOptions:(null==(L=null==e?void 0:e.scheduler)?void 0:L.hide_cancellation_options)??!1,hideReschedulingOptions:(null==(P=null==e?void 0:e.scheduler)?void 0:P.hide_rescheduling_options)??!1,participantBookingCalendars:(null==(O=null==e?void 0:e.participants)?void 0:O.reduce((e,t)=>{var n,o;return null!=(n=t.booking)&&n.calendar_id&&(e[t.email]=null==(o=t.booking)?void 0:o.calendar_id),e}))??{},participantCalendars:(null==(B=null==e?void 0:e.participants)?void 0:B.reduce((e,t)=>{var n;return e[t.email]=null==(n=t.availability)?void 0:n.calendar_ids,e},{}))??{},reminders:null==(H=null==e?void 0:e.event_booking)?void 0:H.reminders,emailTemplate:null==(z=null==e?void 0:e.scheduler)?void 0:z.email_template,redirectUrl:null==(N=null==e?void 0:e.scheduler)?void 0:N.confirmation_redirect_url,slug:null==e?void 0:e.slug,appearance:null==e?void 0:e.appearance,name:null==e?void 0:e.name,disableEmails:null==(R=null==e?void 0:e.event_booking)?void 0:R.disable_emails,organizerLocale:null==(G=null==(U=null==e?void 0:e.scheduler)?void 0:U.email_template)?void 0:G.organizer_locale}}setFormState(e,t){switch(t){case"title":this.formState.title=e.toString();break;case"description":this.formState.description=e.toString();break;case"duration":this.formState.duration=e.toString();break;case"availability":this.formState.availability=JSON.parse(e.toString());break;case"participants":this.formState.participants=JSON.parse(e.toString());break;case"booking-calendar":this.formState.bookingCalendar=e.toString();break;case"participant-booking-calendars":this.formState.participantBookingCalendars=JSON.parse(e.toString());break;case"location":this.formState.location=e.toString();break;case"conference":this.formState.conferencing=JSON.parse(e.toString());break;case"confirmation-type":this.formState.bookingType=e.toString();break;case"buffer-time":this.formState.buffer=JSON.parse(e.toString());break;case"limit-future-bookings":this.formState.availableDaysInFuture=parseInt(e.toString());break;case"min-cancellation-notice":this.formState.minCancellationNotice=parseInt(e.toString());break;case"min-booking-notice":this.formState.minBookingNotice=parseInt(e.toString());break;case"cancellation-policy":this.formState.cancellationPolicy=e.toString();break;case"timeslot-interval":this.formState.timeslotInterval=JSON.parse(e.toString());break;case"customize-booking-settings":{let t=JSON.parse(e.toString());this.formState.additionalGuestsHidden=t.additionalGuestsHidden,this.formState.hideCancellationOptions=t.hideCancellationOptions,this.formState.hideReschedulingOptions=t.hideReschedulingOptions;break}case"participant-custom-availability":{let t=JSON.parse(e.toString());this.formState.participantOpenHours=t;break}case"additional-fields":this.formState.additionalFields=JSON.parse(e.toString());break;case"connected-calendars":this.formState.participantCalendars=JSON.parse(e.toString());break;case"confirmation-email-template":this.formState.emailTemplate=JSON.parse(e.toString());break;case"disable-emails":{let{disableEmails:t,organizerLocale:n}=JSON.parse(e.toString());this.formState.disableEmails=t,this.formState.organizerLocale=n;break}case"reminder-overrides":this.formState.reminders=JSON.parse(e.toString());break;case"confirmation-redirect":this.formState.redirectUrl=e.toString();break;case"availability-method":this.formState.availabilityMethod=e.toString();break;case"custom-event-slug":console.debug("custom-event-slug",e),this.formState.slug=JSON.parse(e.toString());break;case"page-styling":this.formState.appearance=JSON.parse(e.toString());break;case"page-name":this.formState.name=JSON.parse(e.toString())}this.schedulerEditorFormUpdated.emit({value:e,name:t})}updateFormState(){return new FormData(this.formRef).forEach((e,t)=>{this.setFormState(e,t)}),this.formState={...this.formState},this.formState}setActiveTab(e,t){e.preventDefault(),this.updateFormState(),this.activeTab=t}hideTab(e){var t;return(null==(t=this.hideEditorTabs)?void 0:t.includes(e))||!1}
1onFeedbackClick(e){e.preventDefault(),this.showFeedbackModal=!0}render(){var e,t,n,o,i,r;return(0,s.b)("[nylas-editor-tabs]","render",this.formState),(0,s.h)(s.H,{key:"f0b2f93d4dfabf59fa928e870e7af76570ac6336"},(0,s.h)("nylas-notification",{key:"7e37ff4917cafd361b25e07e856d7b0453929eb2"}),(0,s.h)("form",{key:"bd3ca664b062446e6093c7a197ddcdd398fbd58c",onSubmit:this.formSubmissionHandler,class:"scheduler-editor",ref:e=>this.formRef=e,noValidate:!0},"app"===this.mode?(0,s.h)("div",{class:"form-contents",part:"editor__form-contents net__form-contents"},(0,s.h)("div",{class:"tabs",part:"editor__tabs net__tabs"},(0,s.h)("button",{name:a.EventInfo,class:{tab:!0,active:this.activeTab==a.EventInfo,hide:this.hideTab(a.EventInfo)},part:"editortab__event-info net__tab-event-info",onClick:e=>this.setActiveTab(e,a.EventInfo)},(0,s.h)("calendar-info-icon",{width:"16",height:"16"}),s.i.t("eventInfoTab")),(0,s.h)("button",{name:a.Availability,class:{tab:!0,active:this.activeTab==a.Availability,hide:this.hideTab(a.Availability)},part:"editortab__availability net__tab-availability",onClick:e=>this.setActiveTab(e,a.Availability)},(0,s.h)("calendar-patterns-icon",{width:"16",height:"16"}),s.i.t("availabilityTab")),(0,s.h)("button",{name:a.Participants,class:{tab:!0,active:this.activeTab==a.Participants,hide:this.hideTab(a.Participants)},part:"editortab__participants net__tab-participants",onClick:e=>this.setActiveTab(e,a.Participants)},(0,s.h)("people-icon",{width:"16",height:"16"}),s.i.t("participantsTab")),(0,s.h)("button",{name:a.BookingOptions,class:{tab:!0,active:this.activeTab==a.BookingOptions,hide:this.hideTab(a.BookingOptions)},part:"editortab__booking-options net__tab-booking-options",onClick:e=>this.setActiveTab(e,a.BookingOptions)},(0,s.h)("flow-icon",{width:"16",height:"16"}),s.i.t("bookingOptionsTab")),(0,s.h)("button",{name:a.BookingForm,class:{tab:!0,active:"bookingForm"==this.activeTab,hide:this.hideTab(a.BookingForm)},part:"editortab__booking-form net__tab-booking-form",onClick:e=>this.setActiveTab(e,a.BookingForm)},this.activeTab==a.BookingForm?(0,s.h)("calendar-agenda-fill-icon",{width:"16",height:"16"}):(0,s.h)("calendar-agenda-icon",{width:"16",height:"16"}),s.i.t("bookingFormTab")),(0,s.h)("button",{name:a.Communications,class:{tab:!0,active:"communications"==this.activeTab,hide:this.hideTab(a.Communications)},onClick:e=>this.setActiveTab(e,a.Communications),part:"editortab__communications net__tab-communications"},this.activeTab==a.Communications?(0,s.h)("envelope-fill-icon",{width:"16",height:"16"}):(0,s.h)("envelope-icon",{width:"16",height:"16"}),s.i.t("communicationsTab")),(0,s.h)("button",{name:a.PageStyles,class:{tab:!0,active:"pageStyles"==this.activeTab,hide:this.hideTab(a.PageStyles)},onClick:e=>this.setActiveTab(e,a.PageStyles),part:"editortab__page-styles net__tab-page-styles"},this.activeTab==a.PageStyles?(0,s.h)("paintbrush-fill-icon",{width:"16",height:"16"}):(0,s.h)("paintbrush-icon",{width:"16",height:"16"}),s.i.t("pageStylesTab"))),(0,s.h)("div",{class:"tab-content",part:"editor__tab-content net__tab-content"},(0,s.h)(b,{formState:this.formState,activeTab:this.activeTab,currentUser:this.currentUser,calendars:this.calendars,id:(null==(e=this.selectedConfiguration)?void 0:e.id)??"new",i18next:s.i}))):(0,s.h)("div",{class:"composable",key:null==(t=this.selectedConfiguration)?void 0:t.id},(0,s.h)("slot",null)),(0,s.h)("div",{key:"9e8d7e5aa02656528d7038968d0cf6032c8ed8c1",class:"footer",part:"editor__footer net__footer"},(0,s.h)("div",{key:"b4222c7530033584fdb945cd006f75b3dba1afa9",class:"preview",part:"editor__footer-preview net__footer-preview"},this.enableUserFeedback&&(0,s.h)("button-component",{title:"Share your feedback",id:"report-issue",variant:"basic",onClick:e=>this.onFeedbackClick(e)},(0,s.h)("feedback-icon",null))),(0,s.h)("div",{key:"1c04acfb85e835a4335c3998422cb43d102ef2f0",class:"buttons",part:"editor__footer-buttons net__footer-buttons"},(0,s.h)("p",{key:"303c5d952f4f8e96c54d133f20fffcc77cd2a2ef",class:{"unsaved-changes":this.hasUnsavedChanges&&!this.changesSaved,"saved-changes":this.changesSaved,error:(null==(n=this.error)?void 0:n.message)!=="","error-full-width":(null==(o=this.error)?void 0:o.message)!==""&&"create"===this.action}},(null==(i=this.error)?void 0:i.message)==""&&this.hasUnsavedChanges&&!this.changesSaved?s.i.t("unsavedChangesLabel"):(null==(r=this.error)?void 0:r.message)==""&&this.changesSaved?`${s.i.t("changesSavedLabel")}!`:""),""!==this.schedulerPreviewLink&&"edit"===this.action&&(0,s.h)("button-component",{title:"Preview",type:"button",disabled:this.isLoading,clickHandler:e=>
1{e.preventDefault(),this.previewButtonClicked.emit(this.host).defaultPrevented||window.open((0,s.s)(this.schedulerPreviewLink,this.selectedConfiguration),"_blank")},variant:"basic"},(0,s.h)("eye-icon",null)),(0,s.h)("button-component",{key:"ceabbc710e864739e6049334c99c8f9210824e27",type:"button",disabled:this.isLoading,clickHandler:e=>{e.preventDefault(),this.cancelButtonClick.emit(),this.host.resetError()},variant:"basic",part:"editor__footer-cancel net__footer-cancel"},s.i.t("backButton")),(0,s.h)("button-component",{key:"890a200707328b747773e99b2f6bc07f7a1d5db9",class:{"save-changes":"edit"===this.action},type:"submit",disabled:this.isLoading,part:"editor__footer-cta, net__footer-cta"},this.isLoading?(0,s.h)("span",null,s.i.t("savingButtonText"),(0,s.h)("loading-icon",null)," "):"create"===this.action?`${s.i.t("createButtonText")}`:`${s.i.t("saveChangesButtonText")}`)))),this.showFeedbackModal&&(0,s.h)("nylas-feedback-form",null))}get host(){return(0,s.g)(this)}static get watchers(){return{selectedConfiguration:["configChangedHandler"],currentUser:["userChangedHandler"],selectedLanguage:["selectedLanguageChangedHandler"]}}};function f({id:e,formState:t,activeTab:n},o){return(0,s.h)(s.F,null,n===r.CalendarView&&(0,s.h)("div",{key:`calendar-view-${e}`,class:{hide:n!==r.CalendarView,"calendar-view":!0}},(0,s.h)("nylas-event-calendar",null)),(0,s.h)("div",{key:`booking-options-${e}`,class:{hide:n!==r.BookingOptions}},(0,s.h)("nylas-scheduling-method",{name:"availability-method",readOnly:!0,exportparts:"nsm, nsm__header, nsm__input-label, nsm__dropdown, nsm__dropdown-button, nsm__dropdown-content"}),(0,s.h)("nylas-custom-booking-flow",{exportparts:"ncbflow, ncbflow__header, ncbflow__title, ncbflow__content"},(0,s.h)("div",{slot:"inputs"},(0,s.h)("nylas-booking-confirmation-type",{name:"confirmation-type",exportparts:"nbct, nbct__header, nbct__dropdown, nbct__dropdown-button, nbct__dropdown-content"}),(0,s.h)("nylas-booking-confirmation-redirect",{name:"confirmation-redirect",exportparts:"nbcr, nbcr__header, nbcr__dropdown, nbcr__dropdown-button, nbcr__dropdown-content, nbcr__input-textfield"}))),(0,s.h)("nylas-event-limits",null,(0,s.h)("div",{slot:"inputs"},(0,s.h)("nylas-min-booking-notice",{name:"min-booking-notice",exportparts:"nmbn, nmbn__number-dropdown, nmbn__number-dropdown-button, nmbn__number-dropdown-content, nmbn__period-dropdown, nmbn__period-dropdown-button, nmbn__period-dropdown-content"}),(0,s.h)("nylas-min-cancellation-notice",{name:"min-cancellation-notice",exportparts:"nmcn, nmcn__number-dropdown, nmcn__number-dropdown-button, nmcn__number-dropdown-content, nmcn__peri
1od-dropdown, nmcn__period-dropdown-button, nmcn__period-dropdown-content"}),(0,s.h)("nylas-cancellation-policy",{name:"cancellation-policy",exportparts:"ncpolicy, ncpolicy__textarea"}))),(0,s.h)("nylas-customize-booking-settings",{showSettings:["hideCancellationOptions","hideReschedulingOptions"],name:"customize-booking-settings",exportparts:"ncbs, ncbs__header, ncbs__settings, ncbs__settings-div, ncbs__additional_guests, ncbs__cancellation_options, ncbs__rescheduling_options"})),(0,s.h)("div",{key:`communications-${e}`,class:{hide:n!==r.Communications}},(0,s.h)("nylas-disable-emails",{name:"disable-emails",exportparts:"nde, nde__toggle-label, nde_toggle-input, nde_toggle-slider"}),!(null!=t&&t.disableEmails)&&(0,s.h)(s.F,null,(0,s.h)("nylas-confirmation-email",{name:"confirmation-email-template",exportparts:"nce, nce__tab-heading, nce__header, nce__body, nce__confirmation-email-toggle--container, nce__summary, nce__reminder-input_dropdown, nce__reminder-input_dropdown-input, nce__reminder-input_dropdown-content"}),(0,s.h)("nylas-reminder-emails",{name:"reminder-overrides",exportparts:"nre, nre__tab-heading, nre__header, nre__body, nre__confirmation-email-toggle--container, nre__summary, nrt, nrt__number-dropdown, nrt__number-dropdown-button, nrt__number-dropdown-content, nrt__period-dropdown, nrt__period-dropdown-button, nrt__period-dropdown-content, nrt__time-period-selector"}))),(0,s.h)("div",{key:`page-styles-${e}`,class:{hide:n!==r.PageStyles}},(0,s.h)("nylas-custom-event-slug",{name:"custom-event-slug",exportparts:"nces, nces__body, nces__header, nces__drawer-toggle--container, nces__input-textfield"}),(0,s.h)("nylas-page-name",{name:"page-name",requirePageName:!0,exportparts:"npn, npn__body, npn__header, npn__drawer-toggle--container, npn__input-textfield"}),(0,s.h)("nylas-page-styling",{name:"page-styling",exportparts:"nps, nps__header, nps__drawer-toggle--container, nps__body, nps__title-input-textfield, nps__company-logo-input-textfield, nps__color-picker, nps__color-picker-button, nps__color-picker-button-label, nps__color-picker-selected-label, nps__submit-button-label-input-textfield, nps__message-textarea"},o)),(0,s.h)("div",{key:`booking-form-${e}`,class:{hide:n!==r.BookingForm}},(0,s.h)("nylas-booking-form-config",{name:"additional-fields",exportparts:"nbfc, nbfc__header, nbfc__add_field, nbfc__add_field-button, nbfc__add_field-content, nbfc__static_fields, nbfc__additional_fields, nbfc__form-field, nbfc__form-field-header, nbfc__form-field-content"})))}!function(e,t,n,o){var i,a=arguments.length,r=a<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,n):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,n,o);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(r=(a<3?i(r):a>3?i(t,n,r):i(t,n))||r);a>3&&r&&Object.defineProperty(t,n,r)}([(0,l.R)({name:"nylas-editor-tabs",stateToProps:new Map([["schedulerConfig.calendars","calendars"],["schedulerConfig.selectedConfiguration","selectedConfiguration"],["schedulerConfig.currentUser","currentUser"],["schedulerConfig.configurations","configurations"],["schedulerConfig.selectedLanguage","selectedLanguage"],["schedulerConfig.selectedEventType","selectedEventType"]]),eventToProps:{schedulerConfigChanged:async(e,t)=>{let{resetLoadingState:n,host:o,action:i,config:a}=e.detail,r=(a,r)=>{let[l,c]=a;!l&&c?o.setError({message:c.message||s.i.t("genericErrorTitle"),type:d.n.Error,category:u.E.Component,title:r}):l&&!c&&"create"===i&&(o.schedulerConfigCreatedEventHandler({config:l,action:i,host:o}),t.schedulerConfigStore.set("selectedEventType",void 0)),n&&n(e)};"edit"===i?r(await t.schedulerConfig.updateConfiguration(a),s.i.t("nylasEditorTabs.updateConfigError")):r(await t.schedulerConfig.createConfiguration(a),s.i.t("nylasEditorTabs.createConfigError"))},cancelButtonClick:async(e,t)=>{t.schedulerConfigStore.state.action=null,t.schedulerConfigStore.set("selectedEventType",void 0)},previewButtonClicked:async(e,t)=>{(0,s.b)("[nylas-editor-tabs]","previewButtonClicked",t)},formSubmitted:async(e,t)=>{(0,s.b)("[nylas-editor-tabs]","formSubmitted",t)},schedulerEditorFormUpdated:async(e,t)=>{(0,s.b)("[nylas-editor-tabs]","schedulerEditorFormUpdated",e)},schedulerConfigCreated:async(e,t)=>{(0,s.b)("[nylas-editor-tabs]","schedulerConfigCreated",e)}},localPropsToProp:new Map([["schedulerPreviewLink","schedulerPreviewLink"],["enableUserFeedback","enableUserFeedback"],["hideEditorTabs","hideEditorTabs"]]),fireRegisterEvent:!0}),g("design:type",Function),g("design:paramtypes",[]),g("design:returntype",void 0)],y.prototype,"render",null),y.style='.sc-nylas-editor-tabs-h{display:block;--nylas-primary:#2563eb;--nylas-error:#cc4841;--nylas-error-pressed:#992222;--nylas-wraning:#f06c00;--nylas-success:#16a392;--nylas-info:#2b8fc2;--nylas-base-0:#ffffff;--nylas-base-25:#fcfcfd;--nylas-base-50:#f8f9fc;--nylas-base-100:#eaecf5;--nylas-base-200:#d5d9eb;--nylas-base-300:#b3b8d8;--nylas-base-400:#717bbc;--nylas-base-500:#4e5ba6;--nylas-base-600:#3e4784;--nylas-base-700:#263f72;--nylas-base-800:#293056;--nylas-base-900:#101323;--nylas-base-950:#0e101b;--nylas-color-blue-100:#e0e6f9;--nylas-border-radius:0.25rem;--nylas-border-radius-2x:0.5rem;--nylas-border-radius-3x:0.75rem;--nylas-font-family:"Inter", sans-serif;--nylas-color-black:#000000;--nylas-color-grey-900:#2c2c2c;--nylas-color-grey-800:#4b4b4b;--nylas-color-grey-700:#6e6e6e;--nylas-color-grey-600:#8e8e8e;--nylas-color-grey-500:#b3b3b3;--nylas-color-grey-400:#cacaca;--nylas-color-grey-300:#e1e1e1;--nylas-color-grey-200:#eaeaea;--nylas-color-grey-100:#f5f5f5;--nylas-color-grey-50:#fbfcfe;--nylas-color-white:#ffffff;--nylas-color-red-900:#992222;--nylas-color-red-700:#cc4841;--nylas-color-red-500:#ff786a;--nylas-color-red-300:#ffa79e;--nylas-color-red-100:#ffc5bf;--nylas-color-red-50:#ffeae8;--nylas-color-blue-900:#213571;--nylas-color-blue-700:#314fa9;--nylas-color-blue-500:#4169e1;--nylas-color-blue-300:#bdccf9;--nylas-color-blue-100:#e0e6f9;--nylas-color-blue-50:#f6f8fd;--nylas-color-yellow-900:#7c6506;--nylas-color-yellow-700:#c29f09;--nylas-color-yellow-500:#f7c90b;--nylas-color-yellow-300:#f9de70;--nylas-color-yellow-100:#fceba9;--nylas-color-yellow-50:#fdf4ce;--nylas-color-green-900:#0e6b60;--nylas-color-green-700:#16a392;--nylas-color-green-500:#17c3b2;--nylas-color-green-300:#74dbd1;--nylas-color-green-100:#a2e7e0;--nylas-color-green-50:#d1f3f0;--nylas-color-purple-900:#643554;--nylas-color-purple-700:#954f7d;--nylas-color-purple-500:#c769a7;--nylas-color-purple-300:#dda5ca;--nylas-color-purple-100:#e0bdd6;--nylas-color-purple-50:#e9dde5;--nylas-color-sky-900:#20698f;--nylas-color-sky-700:#2b8fc2;--nylas-color-sky-500:#6dceff;--nylas-color-sky-300:#8fdaff;--nylas-color-sky-100:#b8e7ff;--nylas-color-sky-50:#d9f2ff}.scheduler-editor.sc-nylas-editor-tabs{display:flex;flex-direction:column;height:inherit}.scheduler-editor.sc-nylas-editor-tabs .form-contents.sc-nylas-editor-tabs{height:calc(100% - 80px);
1display:grid;grid-template-columns:minmax(224px, 25%) 1fr}@media screen and (max-width: 768px){.scheduler-editor.sc-nylas-editor-tabs .form-contents.sc-nylas-editor-tabs{display:table-column-group;height:auto}}.scheduler-editor.sc-nylas-editor-tabs .form-contents.sc-nylas-editor-tabs .tabs.sc-nylas-editor-tabs{display:flex;flex-direction:column;border-right:1px solid var(--nylas-base-200);background-color:var(--nylas-base-25)}@media screen and (max-width: 768px){.scheduler-editor.sc-nylas-editor-tabs .form-contents.sc-nylas-editor-tabs .tabs.sc-nylas-editor-tabs{border-right:none}}.scheduler-editor.sc-nylas-editor-tabs .form-contents.sc-nylas-editor-tabs .tabs.sc-nylas-editor-tabs .tab.sc-nylas-editor-tabs{display:flex;align-items:center;text-align:left;gap:0.5rem;padding:0.5rem 1rem;color:var(--nylas-base-900);background:var(--nylas-base-0);border:none;height:56px;font-family:var(--nylas-font-family);font-size:16px;font-weight:500;line-height:24px;cursor:pointer}.scheduler-editor.sc-nylas-editor-tabs .form-contents.sc-nylas-editor-tabs .tabs.sc-nylas-editor-tabs .tab.sc-nylas-editor-tabs:not(:first-of-type){margin-top:0.25rem}.scheduler-editor.sc-nylas-editor-tabs .form-contents.sc-nylas-editor-tabs .tabs.sc-nylas-editor-tabs .tab.sc-nylas-editor-tabs:last-of-type{margin-bottom:0.25rem}.scheduler-editor.sc-nylas-editor-tabs .form-contents.sc-nylas-editor-tabs .tabs.sc-nylas-editor-tabs .tab.active.sc-nylas-editor-tabs{font-weight:600;background:var(--nylas-base-0);color:var(--nylas-primary);border-left:4px solid var(--nylas-primary);box-shadow:0px 1px 2px 0px rgba(0, 0, 0, 0.0588235294);box-shadow:0px 1px 3px 0px rgba(0, 0, 0, 0.1019607843)}.scheduler-editor.sc-nylas-editor-tabs .form-contents.sc-nylas-editor-tabs .tabs.sc-nylas-editor-tabs .tab.hide.sc-nylas-editor-tabs{display:none}.scheduler-editor.sc-nylas-editor-tabs .form-contents.sc-nylas-editor-tabs .tab-content.sc-nylas-editor-tabs{max-width:692px;overflow-y:auto;overflow-x:hidden}.scheduler-editor.sc-nylas-editor-tabs .form-contents.sc-nylas-editor-tabs .tab-content.sc-nylas-editor-tabs .hide.sc-nylas-editor-tabs{display:none}.scheduler-editor.sc-nylas-editor-tabs .form-contents.sc-nylas-editor-tabs .tab-content.sc-nylas-editor-tabs nylas-event-info.sc-nylas-editor-tabs,.scheduler-editor.sc-nylas-editor-tabs .form-contents.sc-nylas-editor-tabs .tab-content.sc-nylas-editor-tabs nylas-event-limits.sc-nylas-editor-tabs{width:inherit}.scheduler-editor.sc-nylas-editor-tabs .form-contents.sc-nylas-editor-tabs .tab-content.sc-nylas-editor-tabs nylas-event-info.sc-nylas-editor-tabs div[slot=inputs].sc-nylas-editor-tabs,.scheduler-editor.sc-nylas-editor-tabs .form-contents.sc-nylas-editor-tabs .tab-content.sc-nylas-editor-tabs nylas-event-limits.sc-nylas-editor-tabs div[slot=inputs].sc-nylas-editor-tabs{display:flex;flex-direction:column;gap:1rem}.scheduler-editor.sc-nylas-editor-tabs .form-contents.sc-nylas-editor-tabs .tab-content.sc-nylas-editor-tabs .tab-header.sc-nylas-editor-tabs{display:flex;flex-direction:column;margin:1rem 1rem 0.5rem;row-gap:4px}.scheduler-editor.sc-nylas-editor-tabs .form-contents.sc-nylas-editor-tabs .tab-content.sc-nylas-editor-tabs .tab-header.sc-nylas-editor-tabs h3.sc-nylas-editor-tabs{margin:0;font-size:16px;font-weight:600;line-height:20px;color:var(--nylas-base-900);text-align:left}.scheduler-editor.sc-nylas-editor-tabs .form-contents.sc-nylas-editor-tabs .tab-content.sc-nylas-editor-tabs .tab-header.sc-nylas-editor-tabs p.sc-nylas-editor-tabs{margin:0;font-size:0.875rem;font-weight:400;line-height:20px;color:var(--nylas-base-600);text-align:left}.footer.sc-nylas-editor-tabs{display:flex;justify-content:space-between;align-items:center;gap:1rem;min-height:80px;padding:0 1rem;border-top:1px solid var(--nylas-base-200)}@media screen and (max-width: 768px){.footer.sc-nylas-editor-tabs{flex-direction:column;height:auto}}@media screen and (max-width: 768px){.footer.sc-nylas-editor-tabs .preview.sc-nylas-editor-tabs{margin-top:1rem;width:100%}}.footer.sc-nylas-editor-tabs .buttons.sc-nylas-editor-tabs{display:flex;justify-content:flex-end;align-items:center;justify-self:flex-end;
1gap:1rem}@media screen and (max-width: 768px){.footer.sc-nylas-editor-tabs .buttons.sc-nylas-editor-tabs{flex-direction:column-reverse;width:100%}}.footer.sc-nylas-editor-tabs .buttons.sc-nylas-editor-tabs p.sc-nylas-editor-tabs{max-width:524px}.footer.sc-nylas-editor-tabs .buttons.sc-nylas-editor-tabs p.unsaved-changes.sc-nylas-editor-tabs{color:var(--nylas-base-600)}.footer.sc-nylas-editor-tabs .buttons.sc-nylas-editor-tabs p.saved-changes.sc-nylas-editor-tabs{color:var(--nylas-success)}.footer.sc-nylas-editor-tabs .buttons.sc-nylas-editor-tabs p.error.sc-nylas-editor-tabs{color:var(--nylas-error)}.footer.sc-nylas-editor-tabs .buttons.sc-nylas-editor-tabs p.error-full-width.sc-nylas-editor-tabs{max-width:660px}@media screen and (max-width: 768px){.footer.sc-nylas-editor-tabs .buttons.sc-nylas-editor-tabs button-component.sc-nylas-editor-tabs{width:100%}}.footer.sc-nylas-editor-tabs .buttons.sc-nylas-editor-tabs button.sc-nylas-editor-tabs{background:var(--nylas-primary);color:var(--nylas-base-0);height:48px;border:none;border-radius:var(--nylas-border-radius-2x);font-size:16px;line-height:24px;padding:0 1rem;cursor:pointer;width:148px}.footer.sc-nylas-editor-tabs .buttons.sc-nylas-editor-tabs button.sc-nylas-editor-tabs:hover{background:var(--nylas-base-600)}.footer.sc-nylas-editor-tabs .buttons.sc-nylas-editor-tabs button.sc-nylas-editor-tabs:active{background:var(--nylas-base-800)}.footer.sc-nylas-editor-tabs .buttons.sc-nylas-editor-tabs button.sc-nylas-editor-tabs:disabled{background:var(--nylas-base-300);cursor:not-allowed}.footer.sc-nylas-editor-tabs .buttons.sc-nylas-editor-tabs button.sc-nylas-editor-tabs span.sc-nylas-editor-tabs{display:flex;align-items:center;justify-content:center;gap:0.5rem}.footer.sc-nylas-editor-tabs .buttons.sc-nylas-editor-tabs button-component.save-changes.sc-nylas-editor-tabs{min-width:140px}button-component#report-issue.sc-nylas-editor-tabs{width:auto}nylas-feedback-form.sc-nylas-editor-tabs{position:absolute;top:0;height:100%;width:100%;display:flex;flex-direction:column;justify-content:center;align-items:center;background:rgba(0, 0, 0, 0.6);z-index:2;border-radius:inherit}',(i=r||(r={})).BookingOptions="bookingOptions",i.Communications="communications",i.BookingForm="bookingForm",i.PageStyles="pageStyles",i.CalendarView="calendarView";var m=function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)};let v=class{constructor(e){(0,s.r)(this,e),this.schedulerConfigChanged=(0,s.a)(this,"schedulerConfigChanged",7),this.schedulerConfigCreated=(0,s.a)(this,"schedulerConfigCreated",7),this.cancelButtonClick=(0,s.a)(this,"cancelButtonClick",7),this.formSubmitted=(0,s.a)(this,"formSubmitted",7),this.previewButtonClicked=(0,s.a)(this,"previewButtonClicked",7),this.schedulerEditorFormUpdated=(0,s.a)(this,"schedulerEditorFormUpdated",7),this.groupEventCreateTriggered=(0,s.a)(this,"groupEventCreateTriggered",7),this.groupEventUpdateTriggered=(0,s.a)(this,"groupEventUpdateTriggered",7),this.groupEventDeleteTriggered=(0,s.a)(this,"groupEventDeleteTriggered",7),this.groupEventImportTriggered=(0,s.a)(this,"groupEventImportTriggered",7),this.saveGroupEventChangesError=(0,s.a)(this,"saveGroupEventChangesError",7),this.nylasSchedulerError=(0,s.a)(this,"nylasSchedulerError",6),this.dismissNotification=(0,s.a)(this,"dismissNotification",6),this.formSubmissionHandler=async e=>{var t,n,o,i,a,r,l,p,h,b,g;e.preventDefault();let y=await this.formSubmitted.emit();if((0,s.b)("[nylas-editor-tabs-group]","formSubmissionHandler",y),!this.formRef.checkValidity()||y.defaultPrevented){await this.host.setError({message:this.formRef.validationMessage||s.i.t("fixFormErrors"),type:d.n.Error,category:u.E.Component,title:s.i.t("nylasEditorTabs.formErrorTitle")});return}this.isLoading=!0,this.hasUnsavedChanges=!1;let f=this.updateFormState();(0,s.b)("[nylas-editor-tabs-group]","formState",f);let{title:m,description:v,bookingCalendar:_,location:w,bookingType:k,minCancellationNotice:C,minBookingNotice:x,cancellationPolicy:E,hideCancellationOptions:S,hideReschedulingOptions:T,additionalFields:F,conferencing:L,reminders:P,emailTemplate:O,redirectUrl:B,slug:H,appearance:z,name:N,eventCapacity:R,eventTimeslot:U,participants:G,disableEmails:I,organizerLocale:D}=f,j={...(null==(t=this.selectedConfiguration)?void 0:t.id)&&{id:this.selectedConfiguration.id},slug:H,name:N,type:this.selectedEventType===c.C.group?c.C.group:void 0,scheduler:{cancellation_policy:E??"",min_cancellation_notice:C??0,min_booking_notice:x??60,hide_cancellation_options:S??!1,hide_rescheduling_options:T??!1,additional_fields:F,email_template:O?{...O,organizer_locale:D||"en",logo:O.logo||""}:void 0,confirmation_redirect_url:B},appearance:z,group_booking:{booking_type:k||"booking",disable_emails:"boolean"==typeof I&&I,reminders:P,conferencing:L,calendar_id:_||"primary",default_capacity:R||10}},$=(0,s.q)(this.selectedConfiguration,j||{}),M="create"===this.action?$:j;if(delete M.availability,delete M.participants,delete M.event_booking,this.checkForBookingFormErrors(M))return;let A={name:(null==(n=this.currentUser)?void 0:n.name)??(null==(o=this.currentUser)?void 0:o.email)??"",email:(null==(i=this.currentUser)?void 0:i.email)??""},V=(null==(a=this.calendars)?void 0:a.find(e=>e.is_primary))??(null==(r=this.calendars)?void 0:r[0]),J=[{...A,is_organizer:!0}],q=null!=(l=this.selectedConfiguration)&&l.id?void 0:{title:m,description:v,location:L?void 0:w,conferencing:w?void 0:L,when:{start_time:(null==(p=null==U?void 0:U.when)?void 0:p.start_time)??0,end_time:(null==(h=null==U?void 0:U.when)?void 0:h.end_time)??0,start_timezone:(null==(b=null==U?void 0:U.when)?void 0:b.start_timezone)??"",end_timezone:(null==(g=null==U?void 0:U.when)?void 0:g.end_timezone)??""},recurrence:(null==U?void 0:U.recurrence)??[],calendar_id:_||(null==V?void 0:V.id)||"primary",participants:null!=G&&G.length?G:J,organizer:A,capacity:R||10};this.schedulerConfigChanged.emit({groupEvent:q||void 0,config:M,resetLoadingState:e=>{this.isLoading=!1,this.changesSaved=!0,setTimeout(()=>{this.changesSaved=!1},3e3)},action:this.action,host:this.host})},this.checkForBookingFormErrors=e=>{var t;let n=!1,o="",i=null==(t=e.scheduler)?void 0:t.additional_fields;
1return i&&(o="",Object.entries(i).forEach(e=>{let t=e[1];if(""===t.label){o+=s.i.t("nylasEditorTabs.bookingFormError_label",{type:t.type}),n=!0;return}if(t.options){for(let e of t.options)if(""===e.trim()){o+=s.i.t("nylasEditorTabs.bookingFormError_option",{label:t.label,type:t.type}),n=!0;break}}})),n&&(this.isLoading=!1,this.host.setError({message:o,type:d.n.Error,category:u.E.Component,title:s.i.t("nylasEditorTabs.bookingFormError")})),n},this.calendars=void 0,this.selectedConfiguration=void 0,this.configurations=void 0,this.currentUser=void 0,this.schedulerPreviewLink="",this.mode="app",this.hideEditorTabs=[],this.enableUserFeedback=!0,this.selectedLanguage=void 0,this.selectedEventType=void 0,this.selectedGroupEvent=void 0,this.action="create",this.showFeedbackModal=!1,this.activeTab=r.CalendarView,this.isLoading=!1,this.componentLoaded=!1,this.hasUnsavedChanges=!1,this.changesSaved=!1,this.formState={},this.error={message:"",type:d.n.Error,category:u.E.Component,title:""}}configChangedHandler(e){(0,s.b)("[nylas-editor-tabs-group]","configChangedHandler",e,this.selectedConfiguration),this.formState={...this.getFormStateFromConfig(e)},null!=e&&e.id?this.action="edit":this.action="create"}selectedGroupEventChangedHandler(e){var t,n,o,i,a,r,l,d,c,u,p,h,b,g,y,f,m,v,_,w,k,C,x,E,S,T,F,L,P,O,B;(0,s.b)("[nylas-editor-tabs-group]","selectedGroupEventChangedHandler",e,this.selectedConfiguration),this.formState={...this.formState,title:null==(n=null==(t=this.selectedGroupEvent)?void 0:t.event)?void 0:n.title,description:null==(i=null==(o=this.selectedGroupEvent)?void 0:o.event)?void 0:i.description,location:null==(r=null==(a=this.selectedGroupEvent)?void 0:a.event)?void 0:r.location,conferencing:null==(d=null==(l=this.selectedGroupEvent)?void 0:l.event)?void 0:d.conferencing,eventCapacity:null==(u=null==(c=this.selectedGroupEvent)?void 0:c.group_event_info)?void 0:u.capacity,participants:null==(b=null==(h=null==(p=this.selectedGroupEvent)?void 0:p.group_event_info)?void 0:h.participants)?void 0:b.map(e=>({name:e.name,email:e.email,is_organizer:!!e.is_organizer})),eventTimeslot:null!=(y=null==(g=this.selectedGroupEvent)?void 0:g.event)&&y.when?{when:{start_time:null==(v=null==(m=null==(f=this.selectedGroupEvent)?void 0:f.event)?void 0:m.when)?void 0:v.start_time,end_time:null==(k=null==(w=null==(_=this.selectedGroupEvent)?void 0:_.event)?void 0:w.when)?void 0:k.end_time,start_timezone:null==(E=null==(x=null==(C=this.selectedGroupEvent)?void 0:C.event)?void 0:x.when)?void 0:E.start_timezone,end_timezone:null==(F=null==(T=null==(S=this.selectedGroupEvent)?void 0:S.event)?void 0:T.when)?void 0:F.end_timezone},recurrence:null!=(P=null==(L=this.selectedGroupEvent)?void 0:L.group_event_info)&&P.rrule?null==(B=null==(O=this.selectedGroupEvent)?void 0:O.group_event_info)?void 0:B.rrule:[]}:void 0}}userChangedHandler(e){(0,s.b)("[nylas-editor-tabs-group]","userChangedHandler",e),e&&(this.formState={...this.getFormStateFromConfig(this.selectedConfiguration)})}selectedLanguageChangedHandler(e,t){e!==t&&(s.i.changeLanguage(e),this.error&&this.error.message&&(this.error={...this.error,message:s.i.t("fixFormErrors")},this.showErrorNotification(this.error)))}async schedulerConfigCreatedEventHandler(e){return this.schedulerConfigCreated.emit(e)}async setError(e){var t;this.error={message:e.message,type:e.type,category:e.category,title:e.title||s.i.t("genericErrorTitle")},null!=(t=this.error)&&t.message&&this.showErrorNotification(this.error)}async resetError(){var e,t;null!=(e=this.error)&&e.message&&this.dismissNotification.emit({id:null==(t=this.error)?void 0:t.message.split(" ").join("-"),host:this.host}),this.error={message:"",type:d.n.Error,category:u.E.Component,title:""}}connectedCallback(){(0,s.b)("[nylas-editor-tabs-group]","connectedCallback")}componentWillLoad(){(0,s.b)("[nylas-editor-tabs-group]","componentWillLoad"),this.formState=this.getFormStateFromConfig(this.selectedConfiguration)}componentDidLoad(){var e,t,n;(0,s.b)("[nylas-editor-tabs-group]","componentDidLoad"),this.enableUserFeedback&&!(0,u.i)()&&(0,u.a)({dsn:"https://[email protected]/4507889638178816",release:"2.0.2",integrations:e=>[...e.filter(e=>!1),(0,u.f)({colorScheme:"system",autoInject:!1})],autoSessionTracking:!1,beforeSend:()=>null}),null!=(e=this.selectedConfiguration)&&e.id&&this.configChangedHandler(this.selectedConfiguration);let o=null==(t=this.host.querySelector("button.tab:not(.hide)"))?void 0:t.name;o&&null!=(n=this.hideEditorTabs)&&n.includes(this.activeTab)&&(this.activeTab=o),this.updateFormState(),this.componentLoaded=!0}disconnectedCallback(){(0,s.b)("[nylas-editor-tabs-group]","disconnectedCallback")}handleValueChanged(e){(0,s.b)("[nylas-editor-tabs-group]","handleValueChanged",e);let{name:t,value:n}=e.detail;console.log("name",t,"value",n),this.setFormState(n,t),this.formState={...this.formState},c.b.includes(t)&&(this.hasUnsavedChanges=!0),this.host.resetError(),this.schedulerEditorFormUpdated.emit({value:e.detail.value,name:e.detail.name})}
1feedbackModalClosedHandler(){this.showFeedbackModal=!1}feedbackSubmittedHandler(e){var t,n;let o={eventId:(0,u.c)("Scheduler Editor User Feedback"),message:e.detail.feedback};(0,u.b)(o,{includeReplay:!0,captureContext:{tags:{"nylas-web-element":"nylas-scheduler-editor","nylas-web-element-version":"2.0.2"},extra:{configId:null==(t=this.selectedConfiguration)?void 0:t.id,slug:null==(n=this.selectedConfiguration)?void 0:n.slug}}}),this.showFeedbackModal=!1}importGroupEventHandler(e){var t;this.groupEventImportTriggered.emit({groupEvent:e.detail,configId:(null==(t=this.selectedConfiguration)?void 0:t.id)??"",host:this.host})}saveGroupEventChangesHandler(e){var t,n,o,i,a,r,l,c,p;(0,s.b)("saveGroupEventChangesHandler",e.detail,this.selectedGroupEvent);let h=this.formRef.checkValidity(),b=this.getGroupEventDetailsFromFormState();if(this.resetError(),b.title||this.setError({message:s.i.t("nylasEditorTabsGroup.eventTitleRequired"),type:d.n.Error,category:u.E.Component,title:s.i.t("nylasEditorTabs.formErrorTitle")}),null!=(t=b.when)&&t.start_time&&null!=(n=b.when)&&n.end_time||this.setError({message:s.i.t("nylasEditorTabsGroup.eventTimeRequired"),type:d.n.Error,category:u.E.Component,title:s.i.t("nylasEditorTabs.formErrorTitle")}),null!=(o=b.participants)&&o.length||this.setError({message:s.i.t("nylasEditorTabsGroup.participantsRequired"),type:d.n.Error,category:u.E.Component,title:s.i.t("nylasEditorTabs.formErrorTitle")}),null!=(i=b.participants)&&i.length&&null!=(a=b.participants)&&a.some(e=>!e.email)&&this.setError({message:s.i.t("nylasEditorTabsGroup.participantEmailRequired"),type:d.n.Error,category:u.E.Component,title:s.i.t("nylasEditorTabs.formErrorTitle")}),(null==(r=this.error)?void 0:r.message)!==""||!h){this.saveGroupEventChangesError.emit({error:(null==(l=this.error)?void 0:l.message)??s.i.t("nylasEditorTabsGroup.errorOccured"),configId:(null==(c=this.selectedConfiguration)?void 0:c.id)??"",host:this.host});return}this.groupEventUpdateTriggered.emit({groupEvent:b,chosenOption:e.detail.action,configId:(null==(p=this.selectedConfiguration)?void 0:p.id)??"",host:this.host})}deleteGroupEventHandler(e){var t;(0,s.b)("deleteGroupEventHandler",e.detail);let n=this.getGroupEventDetailsFromFormState();this.groupEventDeleteTriggered.emit({groupEvent:n,chosenOption:e.detail.action,configId:(null==(t=this.selectedConfiguration)?void 0:t.id)??"",host:this.host})}createGroupEventHandler(e){var t,n,o,i,a,r,s;let l=e.detail,d={name:(null==(t=this.currentUser)?void 0:t.name)??(null==(n=this.currentUser)?void 0:n.email)??"",email:(null==(o=this.currentUser)?void 0:o.email)??""},c=(null==(i=this.calendars)?void 0:i.find(e=>e.is_primary))??(null==(a=this.calendars)?void 0:a[0]),u=(null==(r=this.formState)?void 0:r.conferencing)||l.conferencing,p={title:l.title,description:l.description,location:u?void 0:l.location,participants:l.participants,organizer:d,conferencing:l.location?{}:u,when:l.eventTimeslot.when,recurrence:l.eventTimeslot.recurrence,calendar_id:(null==c?void 0:c.id)||"primary",capacity:l.eventCapacity};this.groupEventCreateTriggered.emit({groupEvent:p,configId:(null==(s=this.selectedConfiguration)?void 0:s.id)??"",host:this.host})}showErrorNotification(e){this.nylasSchedulerError.emit({notification:{title:e.title,category:e.category||u.E.Component,type:e.type||d.n.Error,description:e.message,id:e.message.split(" ").join("-"),ttl:"none"},host:this.host})}getGroupEventDetailsFromFormState(){var e,t,n,o,i,a,r,s,l;let d=(null==(e=this.calendars)?void 0:e.find(e=>e.is_primary))??(null==(t=this.calendars)?void 0:t[0]),c={name:(null==(n=this.currentUser)?void 0:n.name)??(null==(o=this.currentUser)?void 0:o.email)??"",email:(null==(i=this.currentUser)?void 0:i.email)??""},u=[{...c,is_organizer:!0}],{title:p,description:h,bookingCalendar:b,location:g,conferencing:y,eventCapacity:f,eventTimeslot:m,participants:v}=this.formState;return{title:p,description:h,location:y?void 0:g,conferencing:g?void 0:y,when:{start_time:(null==(a=null==m?void 0:m.when)?void 0:a.start_time)??0,end_time:(null==(r=null==m?void 0:m.when)?void 0:r.end_time)??0,start_timezone:(null==(s=null==m?void 0:m.when)?void 0:s.start_timezone)??"",end_timezone:(null==(l=null==m?void 0:m.when)?void 0:l.end_timezone)??""},recurrence:(null==m?void 0:m.recurrence)??[],calendar_id:b||(null==d?void 0:d.id)||"primary",participants:null!=v&&v.length?v:u,organizer:c,capacity:f||10}}getFormStateFromConfig(e){var t,n,o,i,a,r,s,l,d,c,u,p,h,b;return null!=e&&e.appearance&&console.info("Appearance settings have been returned from the given configuration; please remember to grab them from the configSettingsLoaded event and apply them as desired."),{additionalFields:(null==(t=null==e?void 0:e.sc
1heduler)?void 0:t.additional_fields)??{},bookingType:(null==(n=null==e?void 0:e.group_booking)?void 0:n.booking_type)??"booking",cancellationPolicy:(null==(o=null==e?void 0:e.scheduler)?void 0:o.cancellation_policy)??"",minCancellationNotice:(null==(i=null==e?void 0:e.scheduler)?void 0:i.min_cancellation_notice)??0,minBookingNotice:(null==(a=null==e?void 0:e.scheduler)?void 0:a.min_booking_notice)??60,hideCancellationOptions:(null==(r=null==e?void 0:e.scheduler)?void 0:r.hide_cancellation_options)??!1,hideReschedulingOptions:(null==(s=null==e?void 0:e.scheduler)?void 0:s.hide_rescheduling_options)??!1,reminders:null==(l=null==e?void 0:e.group_booking)?void 0:l.reminders,emailTemplate:null==(d=null==e?void 0:e.scheduler)?void 0:d.email_template,redirectUrl:null==(c=null==e?void 0:e.scheduler)?void 0:c.confirmation_redirect_url,slug:null==e?void 0:e.slug,appearance:null==e?void 0:e.appearance,name:null==e?void 0:e.name,bookingCalendar:null==(u=null==e?void 0:e.group_booking)?void 0:u.calendar_id,disableEmails:null==(p=null==e?void 0:e.group_booking)?void 0:p.disable_emails,organizerLocale:null==(b=null==(h=null==e?void 0:e.scheduler)?void 0:h.email_template)?void 0:b.organizer_locale}}setFormState(e,t){switch(t){case"title":this.formState.title=e.toString();break;case"description":this.formState.description=e.toString();break;case"location":this.formState.location=e.toString();break;case"conference":this.formState.conferencing=JSON.parse(e.toString());break;case"confirmation-type":this.formState.bookingType=e.toString();break;case"min-cancellation-notice":this.formState.minCancellationNotice=parseInt(e.toString());break;case"min-booking-notice":this.formState.minBookingNotice=parseInt(e.toString());break;case"cancellation-policy":this.formState.cancellationPolicy=e.toString();break;case"customize-booking-settings":{let t=JSON.parse(e.toString());this.formState.hideCancellationOptions=t.hideCancellationOptions,this.formState.hideReschedulingOptions=t.hideReschedulingOptions;break}case"booking-calendar":this.formState.bookingCalendar=e.toString();break;case"event-capacity":this.formState.eventCapacity=parseInt(String(e));break;case"additional-fields":this.formState.additionalFields=JSON.parse(e.toString());break;case"confirmation-email-template":this.formState.emailTemplate=JSON.parse(e.toString());break;case"reminder-overrides":this.formState.reminders=JSON.parse(e.toString());break;case"confirmation-redirect":this.formState.redirectUrl=e.toString();break;case"custom-event-slug":console.debug("custom-event-slug",e),this.formState.slug=JSON.parse(e.toString());break;case"page-styling":this.formState.appearance=JSON.parse(e.toString());break;case"page-name":this.formState.name=JSON.parse(e.toString());break;case"participants":{let t=JSON.parse(e.toString());this.formState.participants=t.map(e=>({name:e.name,email:e.email,is_organizer:e.is_organizer}));break}case"event-timeslot":this.formState.eventTimeslot=JSON.parse(e.toString());break;case"disable-emails":{let{disableEmails:t,organizerLocale:n}=JSON.parse(e.toString());this.formState.disableEmails=t,this.formState.organizerLocale=n}}this.schedulerEditorFormUpdated.emit({value:e,name:t})}updateFormState(){return new FormData(this.formRef).forEach((e,t)=>{this.setFormState(e,t)}),this.formState={...this.formState},this.formState}setActiveTab(e,t){e.preventDefault(),this.updateFormState(),this.activeTab=t}hideTab(e){var t;return(null==(t=this.hideEditorTabs)?void 0:t.includes(e))||!1}onFeedbackClick(e){e.preventDefault(),this.showFeedbackModal=!0}render(){var e,t,n,o,i,a;return(0,s.b)("[nylas-editor-tabs-group]","render",this.formState),(0,s.h)(s.H,{key:"f1f9489924f24e9e70b03f29ca492f952447857e"},(0,s.h)("nylas-notification",{key:"55313223571d2279f7371dee53422b682484a8f0"}),(0,s.h)("form",{key:"127ab3460883730d9519df3995e12a29375cf3c5",onSubmit:this.formSubmissionHandler,class:"scheduler-editor",ref:e=>this.formRef=e,noValidate:!0},"app"===this.mode?(0,s.h)("div",{class:"return-to-calendar-view",part:"editor__return-to-calendar-view net__return-to-calendar-view"},(0,s.h)("button-component",{id:"return-to-calendar-view-button",variant:"invisible",part:"nset__header__back-button",type:"button",onClick:e=>{this.setActiveTab(e,r.CalendarView)}},(0,s.h)("chevron-icon",{width:"16",height:"16"}),(0,s.h)("span",null,s.i.t("returnToCalendarView")))):null,"app"===this.mode?(0,s.h)("div",{class:"form-contents",part:"editor__form-contents net__form-contents"},(0,s.h)("div",{class:"tabs",part:"editor__tabs net__tabs"},(0,s.h)("button",{name:r.BookingOptions,class:{tab:!0,active:this.activeTab==r.BookingOptions,hide:this.hideTab(r.BookingOptions)},part:"editortab__booking-options net__tab-booking-options",onClick:e=>this.setActiveTab(e,r.BookingOptions)},(0,s.h)("flow-icon",{width:"16",height:"16"}),s.i.t("bookingOptionsTab")),(0,s.h)("button",{name:r.BookingForm,class:{tab:!0,active:this.activeTab==r.BookingForm,hide:this.hideTab(r.BookingForm)},part:"editortab__booking-form net__tab-booking-form",onClick:e=>this.setActiveTab(e,r.BookingForm)},this.activeTab==r.BookingForm?(0,s.h)("calendar-agenda-fill-icon",{width:"16",height:"16"}):(0,s.h)("calendar-agenda-icon",{width:"16",height:"16"}),s.i.t("bookingFormTab")),(0,s.h)("button",{name:r.Communications,class:{tab:!0,active:this.activeTab==r.Communications,hide:this.hideTab(r.Communications)},onClick:e=>this.setActiveTab(e,r.Communications),part:"editortab__communications net__tab-communications"},this.activeTab==r.Communications?(0,s.h)("envelope-fill-icon",{width:"16",height:"16"}):(0,s.h)("envelope-icon",{width:"16",height:"16"}),s.i.t("communicationsTab")),(0,s.h)("button",{name:r.PageStyles,class:{tab:!0,active:this.activeTab==r.PageStyles,hide:this.hideTab(r.PageStyles)},onClick:e=>this.setActiveTab(e,r.PageStyles),part:"editortab__page-styles net__tab-page-styles"},this.activeTab==r.PageStyles?(0,s.h)("paintbrush-fill-icon",{width:"16",height:"16"}):(0,s.h)("paintbrush-icon",{width:"16",height:"16"}),s.i.t("pageStylesTab"))),(0,s.h)("div",{class:"tab-content",part:"editor__tab-content net__tab-content"},(0,s.h)(f,{formState:this.formState,activeTab:this.activeTab,currentUser:this.currentUser,calendars:this.calendars,id:(null==(e=this.selectedConfiguration)?void 0:e.id)??"new",i18next:s.i}))):(0,s.h)("div",{class:"composable",key:null==(t=this.selectedConfiguration)?void 0:t.id},(0,s.h)("slot",null)),(0,s.h)("div",{key:"58a9ed32c7fde8663e25a05461e7dbbe8bc3d879",class:"footer",part:"editor__footer net__footer"},(0,s.h)("div",{key:"dddf1ddc9b444fc7f8f8f965d1a84a87678a9fa8",class:"preview",part:"editor__footer-preview net__footer-preview"},this.enableUserFeedback&&(0,s.h)("button-component",{title:"Share your feedback",i
1d:"report-issue",variant:"basic",onClick:e=>this.onFeedbackClick(e)},(0,s.h)("feedback-icon",null)),this.activeTab===r.CalendarView&&(0,s.h)("button-component",{class:"page-settings-button",title:"Go to page settings",id:"page-settings",variant:"basic",onClick:e=>this.setActiveTab(e,r.BookingOptions)},s.i.t("pageSettingsButton"))),(0,s.h)("div",{key:"be3ea7e9a341b7495d32c076505462b5845b1c66",class:"buttons",part:"editor__footer-buttons net__footer-buttons"},(0,s.h)("p",{key:"42bf3aaae3eb30d443d4b45b1be81100eb95ac23",class:{"unsaved-changes":this.hasUnsavedChanges&&!this.changesSaved,"saved-changes":this.changesSaved,error:(null==(n=this.error)?void 0:n.message)!=="","error-full-width":(null==(o=this.error)?void 0:o.message)!==""&&"create"===this.action}},(null==(i=this.error)?void 0:i.message)==""&&this.hasUnsavedChanges&&!this.changesSaved&&this.activeTab!==r.CalendarView?s.i.t("unsavedChangesLabel"):(null==(a=this.error)?void 0:a.message)==""&&this.changesSaved?`${s.i.t("changesSavedLabel")}!`:""),(0,s.h)("div",{key:"6380b051bd4bc445092fd71be43e949c12629cd7",class:"footer-buttons__row"},""!==this.schedulerPreviewLink&&"edit"===this.action&&(0,s.h)("button-component",{title:"Preview",type:"button",disabled:this.isLoading,clickHandler:e=>{e.preventDefault(),this.previewButtonClicked.emit(this.host).defaultPrevented||window.open((0,s.s)(this.schedulerPreviewLink,this.selectedConfiguration),"_blank")},variant:"basic"}
1,(0,s.h)("eye-icon",null)),(0,s.h)("button-component",{key:"b78b23bc721251da33f803a46e23b66cea112095",type:"button",disabled:this.isLoading,clickHandler:e=>{e.preventDefault(),this.cancelButtonClick.emit(),this.host.resetError()},variant:"basic",part:"editor__footer-cancel net__footer-cancel"},s.i.t("backButton")),(0,s.h)("button-component",{key:"aaefcecf3c7247c085813831066bf79298b17263",class:{"save-changes":"edit"===this.action},type:"submit",disabled:this.isLoading,part:"editor__footer-cta, net__footer-cta"},this.componentLoaded?this.isLoading?(0,s.h)("span",null,s.i.t("savingButtonText"),(0,s.h)("loading-icon",null)," "):"create"===this.action?`${s.i.t("createButtonText")}`:`${s.i.t("saveChangesButtonText")}`:(0,s.h)("span",null,(0,s.h)("loading-icon",null)," ")))))),this.showFeedbackModal&&(0,s.h)("nylas-feedback-form",null))}get host(){return(0,s.g)(this)}static get watchers(){return{selectedConfiguration:["configChangedHandler"],selectedGroupEvent:["selectedGroupEventChangedHandler"],currentUser:["userChangedHandler"],selectedLanguage:["selectedLanguageChangedHandler"]}}};!function(e,t,n,o){var i,a=arguments.length,r=a<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,n):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,n,o);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(r=(a<3?i(r):a>3?i(t,n,r):i(t,n))||r);a>3&&r&&Object.defineProperty(t,n,r)}([(0,l.R)({name:"nylas-editor-tabs-group",stateToProps:new Map([["schedulerConfig.calendars","calendars"],["schedulerConfig.selectedConfiguration","selectedConfiguration"],["schedulerConfig.currentUser","currentUser"],["schedulerConfig.configurations","configurations"],["schedulerConfig.selectedLanguage","selectedLanguage"],["schedulerConfig.selectedEventType","selectedEventType"],["schedulerConfig.selectedGroupEvent","selectedGroupEvent"]]),eventToProps:{schedulerConfigChanged:async(e,t)=>{let{resetLoadingState:n,host:o,action:i,config:a,groupEvent:r}=e.detail,l=(e,t)=>{let[n,a]=e;!n&&a?o.setError({message:a.message||s.i.t("genericErrorTitle"),type:d.n.Error,category:u.E.Component,title:t}):n&&!a&&"create"===i&&o.schedulerConfigCreatedEventHandler({config:n,action:i,host:o})};if("edit"===i)l(await t.schedulerConfig.updateConfiguration(a),s.i.t("nylasEditorTabs.updateConfigurationError")),n&&n(e);else{let o=await t.schedulerConfig.createConfiguration(a);l(o,s.i.t("nylasEditorTabs.createConfigurationError"));let[i,d]=o,c=null==i?void 0:i.id;c&&r&&l(await t.schedulerConfig.createGroupEvent(r,c),s.i.t("nylasEditorTabsGroup.createGroupEventError")),n&&n(e)}},cancelButtonClick:async(e,t)=>{t.schedulerConfigStore.state.action=null,t.schedulerConfigStore.set("selectedEventType",void 0),t.schedulerConfigStore.set("selectedGroupEvent",void 0),t.schedulerConfigStore.set("groupEvents",[])},previewButtonClicked:async(e,t)=>{(0,s.b)("[nylas-editor-tabs-group]","previewButtonClicked",t)},formSubmitted:async(e,t)=>{(0,s.b)("[nylas-editor-tabs-group]","formSubmitted",t)},schedulerEditorFormUpdated:async(e,t)=>{(0,s.b)("[nylas-editor-tabs-group]","schedulerEditorFormUpdated",e)},schedulerConfigCreated:async(e,t)=>{(0,s.b)("[nylas-editor-tabs-group]","schedulerConfigCreated",e)},groupEventUpdateTriggered:async(e,t)=>{let{groupEvent:n,host:o,chosenOption:i,configId:a}=e.detail,[r,l]=await t.schedulerConfig.updateGroupEvent(n,i,a);!r&&l&&o.setError({message:l.message||s.i.t("genericErrorTitle"),type:d.n.Error,category:u.E.Component,title:s.i.t("nylasEditorTabsGroup.updateGroupEventError")})},groupEventDeleteTriggered:async(e,t)=>{let{groupEvent:n,chosenOption:o,configId:i,host:a}=e.detail,[r,l]=await t.schedulerConfig.deleteGroupEvent(n,o,i);!r&&l&&a.setError({message:l.message||s.i.t("genericErrorTitle"),type:d.n.Error,category:u.E.Component,title:s.i.t("nylasEditorTabsGroup.deleteGroupEventError")})},groupEventCreateTriggered:async(e,t)=>{let{groupEvent:n,configId:o,host:i}=e.detail,[a,r]=await t.schedulerConfig.createGroupEvent(n,o);!a&&r&&i.setError({message:r.message||s.i.t("genericErrorTitle"),type:d.n.Error,category:u.E.Component,title:s.i.t("nylasEditorTabsGroup.createGroupEventError")})},groupEventImportTriggered:async(e,t)=>{let{groupEvent:n,configId:o,host:i}=e.detail,[a,r]=await t.schedulerConfig.importGroupEvent([n],o);if(!a&&r&&i.setError({message:r.message||s.i.t("genericErrorTitle"),type:d.n.Error,category:u.E.Component,title:s.i.t("nylasEditorTabsGroup.importGroupEventError")}),a&&a.import_failed&&a.import_failed.length>0){let e=a.import_failed.map(e=>e.reason).join(` 2`);i.setError({message:e,type:d.n.Error,category:u.E.Component,title:s.i.t("nylasEditorTabsGroup.importGroupEventError")}),setTimeout(()=>{i.resetError()},5e3)}},saveGroupEventChangesError:async(e,t)=>{let{error:n,host:o}=e.detail;(0,s.b)("[nylas-editor-tabs-group]","saveGroupEventChangesError",n,o)}},localPropsToProp:new Map([["schedulerPreviewLink","schedulerPreviewLink"],["enableUserFeedback","enableUserFeedback"],["hideEditorTabs","hideEditorTabs"]]),fireRegisterEvent:!0}),m("design:type",Function),m("design:paramtypes",[]),m("design:returntype",void 0)],v.prototype,"render",null),v.style='.sc-nylas-editor-tabs-group-h{display:block;--nylas-primary:#2563eb;--nylas-error:#cc4841;--nylas-error-pressed:#992222;--nylas-wraning:#f06c00;--nylas-success:#16a392;--nylas-info:#2b8fc2;--nylas-base-0:#ffffff;--nylas-base-25:#fcfcfd;--nylas-base-50:#f8f9fc;--nylas-base-100:#eaecf5;--nylas-base-200:#d5d9eb;--nylas-base-300:#b3b8d8;--nylas-base-400:#717bbc;--nylas-base-500:#4e5ba6;--nylas-base-600:#3e4784;--nylas-base-700:#263f72;--nylas-base-800:#293056;--nylas-base-900:#101323;--nylas-base-950:#0e101b;--nylas-color-blue-100:#e0e6f9;--nylas-border-radius:0.25rem;--nylas-border-radius-2x:0.5rem;--nylas-border-radius-3x:0.75rem;--nylas-font-family:"Inter", sans-serif;--nylas-color-black:#000000;--nylas-color-grey-900:#2c2c2c;--nylas-color-grey-800:#4b4b4b;--nylas-color-grey-700:#6e6e6e;--nylas-color-grey-600:#8e8e8e;--nylas-color-grey-500:#b3b3b3;--nylas-color-grey-400:#cacaca;--nylas-color-grey-300:#e1e1e1;--nylas-color-grey-200:#eaeaea;--nylas-color-grey-100:#f5f5f5;--nylas-color-grey-50:#fbfcfe;--nylas-color-white:#ffffff;--nylas-color-red-900:#992222;--nylas-color-red-700:#cc4841;--nylas-color-red-500:#ff786a;--nylas-color-red-300:#ffa79e;--nylas-color-red-100:#ffc5bf;--nylas-color-red-50:#ffeae8;--nylas-color-blue-900:#213571;--nylas-color-blue-700:#314fa9;--nylas-color-blue-500:#4169e1;--nylas-color-blue-300:#bdccf9;--nylas-color-blue-100:#e0e6f9;--nylas-color-blue-50:#f6f8fd;--nylas-color-yellow-900:#7c6506;--nylas-color-yellow-700:#c29f09;--nylas-color-yellow-500:#f7c90b;--nylas-color-yellow-300:#f9de70;--nylas-color-yellow-100:#fceba9;--nylas-color-yellow-50:#fdf4ce;--nylas-color-green-900:#0e6b60;--nylas-color-green-700:#16a392;--nylas-color-green-500:#17c3b2;--nylas-color-green-300:#74dbd1;--nylas-color-green-100:#a2e7e0;--nylas-color-green-50:#d1f3f0;--nylas-color-purple-900:#643554;--nylas-color-purple-700:#954f7d;--nylas-color-purple-500:#c769a7;--nylas-color-purple-300:#dda5ca;--nylas-color-purple-100:#e0bdd6;--nylas-color-purple-50:#e9dde5;--nylas-color-sky-900:#20698f;--nylas-color-sky-700:#2b8fc2;--nylas-color-sky-500:#6dceff;--nylas-color-sky-300:#8fdaff;--nylas-color-sky-100:#b8e7ff;--nylas-color-sky-50:#d9f2ff}
2.scheduler-editor.sc-nylas-editor-tabs-group{display:flex;flex-direction:column;height:inherit;position:relative}.scheduler-editor.sc-nylas-editor-tabs-group div.return-to-calendar-view.sc-nylas-editor-tabs-group{display:flex;border-bottom:1px solid var(--nylas-base-200)}.scheduler-editor.sc-nylas-editor-tabs-group .form-contents.sc-nylas-editor-tabs-group{display:grid;grid-template-columns:minmax(224px, 25%) 1fr;height:auto;overflow-y:auto;min-height:calc(100% - 80px - 48px)}@media screen and (max-width: 768px){.scheduler-editor.sc-nylas-editor-tabs-group .form-contents.sc-nylas-editor-tabs-group{display:table-column-group;height:auto;min-height:calc(100% - 80px - 196px - 48px)}}.scheduler-editor.sc-nylas-editor-tabs-group .form-contents.sc-nylas-editor-tabs-group .tabs.sc-nylas-editor-tabs-group{display:flex;flex-direction:column;border-right:1px solid var(--nylas-base-200);background-color:var(--nylas-base-25)}@media screen and (max-width: 768px){.scheduler-editor.sc-nylas-editor-tabs-group .form-contents.sc-nylas-editor-tabs-group .tabs.sc-nylas-editor-tabs-group{border-right:none}}.scheduler-editor.sc-nylas-editor-tabs-group .form-contents.sc-nylas-editor-tabs-group .tabs.sc-nylas-editor-tabs-group .tab.sc-nylas-editor-tabs-group{display:flex;align-items:center;text-align:left;gap:0.5rem;padding:0.5rem 1rem;color:var(--nylas-base-900);background:var(--nylas-base-0);border:none;height:56px;font-family:var(--nylas-font-family);font-size:16px;font-weight:500;line-height:24px;cursor:pointer}.scheduler-editor.sc-nylas-editor-tabs-group .form-contents.sc-nylas-editor-tabs-group .tabs.sc-nylas-editor-tabs-group .tab.sc-nylas-editor-tabs-group:not(:first-of-type){margin-top:0.25rem}.scheduler-editor.sc-nylas-editor-tabs-group .form-contents.sc-nylas-editor-tabs-group .tabs.sc-nylas-editor-tabs-group .tab.sc-nylas-editor-tabs-group:last-of-type{margin-bottom:0.25rem}.scheduler-editor.sc-nylas-editor-tabs-group .form-contents.sc-nylas-editor-tabs-group .tabs.sc-nylas-editor-tabs-group .tab.active.sc-nylas-editor-tabs-group{font-weight:600;background:var(--nylas-base-0);color:var(--nylas-primary);border-left:4px solid var(--nylas-primary);box-shadow:0px 1px 2px 0px rgba(0, 0, 0, 0.0588235294);box-shadow:0px 1px 3px 0px rgba(0, 0, 0, 0.1019607843)}.scheduler-editor.sc-nylas-editor-tabs-group .form-contents.sc-nylas-editor-tabs-group .tabs.sc-nylas-editor-tabs-group .tab.hide.sc-nylas-editor-tabs-group{display:none}.scheduler-editor.sc-nylas-editor-tabs-group .form-contents.sc-nylas-editor-tabs-group .tab-content.sc-nylas-editor-tabs-group{max-width:692px;overflow-y:auto;overflow-x:hidden}.scheduler-editor.sc-nylas-editor-tabs-group .form-contents.sc-nylas-editor-tabs-group .tab-content.sc-nylas-editor-tabs-group .hide.sc-nylas-editor-tabs-group{display:none}.scheduler-editor.sc-nylas-editor-tabs-group .form-contents.sc-nylas-editor-tabs-group .tab-content.sc-nylas-editor-tabs-group .calendar-view.sc-nylas-editor-tabs-group{position:absolute;top:0;left:0;height:calc(100% - 80px);width:-webkit-fill-available;background:var(--nylas-base-0)}.scheduler-editor.sc-nylas-editor-tabs-group .form-contents.sc-nylas-editor-tabs-group .tab-content.sc-nylas-editor-tabs-group nylas-event-info.sc-nylas-editor-tabs-group,.scheduler-editor.sc-nylas-editor-tabs-group .form-contents.sc-nylas-editor-tabs-group .tab-content.sc-nylas-editor-tabs-group nylas-event-limits.sc-nylas-editor-tabs-group{width:inherit}.scheduler-editor.sc-nylas-editor-tabs-group .form-contents.sc-nylas-editor-tabs-group .tab-content.sc-nylas-editor-tabs-group nylas-event-info.sc-nylas-editor-tabs-group div[slot=inputs].sc-nylas-editor-tabs-group,.scheduler-editor.sc-nylas-editor-tabs-group .form-contents.sc-nylas-editor-tabs-group .tab-content.sc-nylas-editor-tabs-group nylas-event-limits.sc-nylas-editor-tabs-group div[slot=inputs].sc-nylas-editor-tabs-group{display:flex;flex-direction:column;gap:1rem}.scheduler-editor.sc-nylas-editor-tabs-group .form-contents.sc-nylas-editor-tabs-group .tab-content.sc-nylas-editor-tabs-group .tab-header.sc-nylas-editor-tabs-group{display:flex;flex-direction:column;margin:1rem 1rem 0.5rem;row-gap:4px}.scheduler-editor.sc-nylas-editor-tabs-group .form-contents.sc-nylas-editor-tabs-group .tab-content.sc-nylas-editor-tabs-group .tab-header.sc-nylas-editor-tabs-group h3.sc-nylas-editor-tabs-group{margin:0;font-size:16px;font-weight:600;line-height:20px;color:var(--nylas-base-900);text-align:left}.scheduler-editor.sc-nylas-editor-tabs-group .form-contents.sc-nylas-editor-tabs-group .tab-content.sc-nylas-editor-tabs-group .tab-header.sc-nylas-editor-tabs-group p.sc-nylas-editor-tabs-group{margin:0;font-size:0.875rem;font-weight:400;line-height:20px;color:var(--nylas-base-600);text-align:left}
2.footer.sc-nylas-editor-tabs-group{display:flex;justify-content:space-between;align-items:center;gap:1rem;min-height:80px;padding:0 1rem;border-top:1px solid var(--nylas-base-200)}@media screen and (max-width: 768px){.footer.sc-nylas-editor-tabs-group{flex-direction:column;height:auto;z-index:2}}.footer.sc-nylas-editor-tabs-group .preview.sc-nylas-editor-tabs-group{display:flex;gap:16px}@media screen and (max-width: 768px){.footer.sc-nylas-editor-tabs-group .preview.sc-nylas-editor-tabs-group{margin-top:1rem;width:100%}}.footer.sc-nylas-editor-tabs-group .preview.sc-nylas-editor-tabs-group button-component.page-settings-button.sc-nylas-editor-tabs-group{min-width:140px}.footer.sc-nylas-editor-tabs-group .buttons.sc-nylas-editor-tabs-group{display:flex;justify-content:flex-end;align-items:center;justify-self:flex-end;gap:1rem}@media screen and (max-width: 768px){.footer.sc-nylas-editor-tabs-group .buttons.sc-nylas-editor-tabs-group{flex-direction:column-reverse;width:100%}}.footer.sc-nylas-editor-tabs-group .buttons.sc-nylas-editor-tabs-group .footer-buttons__row.sc-nylas-editor-tabs-group{display:flex;gap:16px}@media screen and (max-width: 768px){.footer.sc-nylas-editor-tabs-group .buttons.sc-nylas-editor-tabs-group .footer-buttons__row.sc-nylas-editor-tabs-group{width:100%}.footer.sc-nylas-editor-tabs-group .buttons.sc-nylas-editor-tabs-group .footer-buttons__row.sc-nylas-editor-tabs-group button-component[title=Preview].sc-nylas-editor-tabs-group{width:48px}}.footer.sc-nylas-editor-tabs-group .buttons.sc-nylas-editor-tabs-group p.sc-nylas-editor-tabs-group{max-width:524px}.footer.sc-nylas-editor-tabs-group .buttons.sc-nylas-editor-tabs-group p.unsaved-changes.sc-nylas-editor-tabs-group{color:var(--nylas-base-600)}.footer.sc-nylas-editor-tabs-group .buttons.sc-nylas-editor-tabs-group p.saved-changes.sc-nylas-editor-tabs-group{color:var(--nylas-success)}.footer.sc-nylas-editor-tabs-group .buttons.sc-nylas-editor-tabs-group p.error.sc-nylas-editor-tabs-group{color:var(--nylas-error)}.footer.sc-nylas-editor-tabs-group .buttons.sc-nylas-editor-tabs-group p.error-full-width.sc-nylas-editor-tabs-group{max-width:660px}@media screen and (max-width: 768px){.footer.sc-nylas-editor-tabs-group .buttons.sc-nylas-editor-tabs-group button-component.sc-nylas-editor-tabs-group{width:100%}}.footer.sc-nylas-editor-tabs-group .buttons.sc-nylas-editor-tabs-group button.sc-nylas-editor-tabs-group{background:var(--nylas-primary);color:var(--nylas-base-0);height:48px;border:none;border-radius:var(--nylas-border-radius-2x);font-size:16px;line-height:24px;padding:0 1rem;cursor:pointer;width:148px}.footer.sc-nylas-editor-tabs-group .buttons.sc-nylas-editor-tabs-group button.sc-nylas-editor-tabs-group:hover{background:var(--nylas-base-600)}.footer.sc-nylas-editor-tabs-group .buttons.sc-nylas-editor-tabs-group button.sc-nylas-editor-tabs-group:active{background:var(--nylas-base-800)}.footer.sc-nylas-editor-tabs-group .buttons.sc-nylas-editor-tabs-group button.sc-nylas-editor-tabs-group:disabled{background:var(--nylas-base-300);cursor:not-allowed}.footer.sc-nylas-editor-tabs-group .buttons.sc-nylas-editor-tabs-group button.sc-nylas-editor-tabs-group span.sc-nylas-editor-tabs-group{display:flex;align-items:center;justify-content:center;gap:0.5rem}.footer.sc-nylas-editor-tabs-group .buttons.sc-nylas-editor-tabs-group button-component.save-changes.sc-nylas-editor-tabs-group{min-width:140px}button-component#report-issue.sc-nylas-editor-tabs-group{width:auto}nylas-feedback-form.sc-nylas-editor-tabs-group{position:absolute;top:0;height:100%;width:100%;display:flex;flex-direction:column;justify-content:center;align-items:center;background:rgba(0, 0, 0, 0.6);z-index:2;border-radius:inherit}';var _=function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)};let w=class{constructor(e){(0,s.r)(this,e),this.initListConfigurations=(0,s.a)(this,"initListConfigurations",7),this.createButtonClick=(0,s.a)(this,"createButtonClick",7),this.editButtonClick=(0,s.a)(this,"editButtonClick",7),this.deleteButtonClick=(0,s.a)(this,"deleteButtonClick",7),this.nylasSchedulerError=(0,s.a)(this,"nylasSchedulerError",6),this.dismissNotification=(0,s.a)(this,"dismissNotification",6),this.configurations=[],this.selectedLanguage=void 0,this.schedulerPreviewLink="",this.listConfigurationsNextCursor=void 0,this.state="loading",this.error={message:"",type:d.n.Error,category:u.E.Component,title:""},this.currentCursor=null,this.previousCursors=[],this.disableNextPageButton=!1,this.deleteConfigurationId="",this.showDeleteButtonLoading=!1,this.editButtonLoadingId=""}listConfigurationsNextCursorChangedHandler(e,t){if(!e||e===t){null===e&&(this.disableNextPageButton=!0);return}this.disableNextPageButton=!1,this.currentCursor=e}selectedLanguageChangedHandler(e,t){e!==t&&s.i.changeLanguage(e)}connectedCallback(){(0,s.b)("[nylas-list-configurations]","connectedCallback")}componentWillLoad(){(0,s.b)("[nylas-list-configurations]","componentWillLoad"),this.configurations&&this.configurations.length>0&&(this.state="loaded")}componentDidLoad(){(0,s.b)("[nylas-list-configurations]","componentDidLoad"),this.initListConfigurations.emit({host:this.host})}disconnectedCallback(){(0,s.b)("[nylas-list-configurations]","disconnectedCallback")}async handleNylasFormDropdownChanged(e){var t;(0,s.b)("[nylas-list-configurations]","handleNylasFormDropdownChanged",e.detail);let{value:n}=e.detail,[o,i]=n.split("-");switch(e.preventDefault(),o){case"delete":this.deleteConfigurationId=null==(t=this.configurations[i])?void 0:t.id;break;case"preview":window.open((0,s.s)(this.schedulerPreviewLink,this.configurations[i]),"_blank");break;case"copy":await navigator.clipboard.writeText((0,s.s)(this.schedulerPreviewLink,this.configurations[i]))}}async registerCallback(){this.initListConfigurations.emit({host:this.host})}async getState(){return this.state}async setState(e){this.state=e}async setError(e){var t;this.error={message:e.message,type:e.type,category:e.category,title:e.title||s.i.t("genericErrorTitle")},null!=(t=this.error)&&t.message&&this.showErrorNotification(this.error)}async hideDeleteConfirmation(){this.deleteConfigurationId="",this.showDeleteButtonLoading=!1}async hideEditButtonLoading(){this.editButtonLoadingId=""}
2showErrorNotification(e){this.nylasSchedulerError.emit({notification:{id:e.message.split(" ").join("-"),type:e.type||d.n.Error,title:e.title,category:e.category||u.E.Component,description:e.message,ttl:"none"},host:this.host})}closeModal(e){e.preventDefault(),this.deleteConfigurationId=""}handleConfirmDeleteButtonClicked(e){e.preventDefault(),this.showDeleteButtonLoading=!0;let t=this.configurations.find(e=>e.id===this.deleteConfigurationId);t&&null!=t&&t.id&&this.deleteButtonClick.emit({host:this.host,configuration:t})}getDurationString(e){if(!e)return"â";let t=Math.floor(e/60),n=e%60;return`${t||""} ${t?`${t>1?"hours":"hour"}`:""} ${n||""} ${n?`${n>1?"mins":"min"}`:""}`}getActionLabelHTML(e){let t={display:"inline-flex",alignItems:"center",gap:"0.5rem"};switch(e){case"preview":return(0,s.h)("span",{style:t},(0,s.h)("eye-icon",{width:"16",height:"16"}),s.i.t("nylasListConfigurations.previewButtonText"));case"copy":return(0,s.h)("span",{style:t},(0,s.h)("copy-icon",{width:"16",height:"16"}),s.i.t("nylasListConfigurations.copyLinkButtonText"));case"delete":return(0,s.h)("span",{style:{...t,color:"var(--nylas-error)"}},(0,s.h)("delete-icon",{width:"15",height:"17"}),s.i.t("nylasListConfigurations.deleteButtonText"));default:return""}}previousPageClickedHandler(){if(0===this.previousCursors.length)return;this.currentCursor=this.previousCursors.pop()||null;let e=this.previousCursors[this.previousCursors.length-1]||void 0;this.initListConfigurations.emit({host:this.host,cursor:e})}nextPageClickedHandler(){this.currentCursor&&(this.previousCursors=[...this.previousCursors,this.currentCursor],this.initListConfigurations.emit({host:this.host,cursor:this.currentCursor}))}render(){var e;return(0,s.h)(s.H,null,(0,s.h)("nylas-notification",null),(0,s.h)("div",{class:"header"},(0,s.h)("div",{class:"description"},(0,s.h)("h2",null,s.i.t("allSchedulingPages")),(0,s.h)("p",null,s.i.t("createAndManageSchedulingPages"))),this.configurations&&this.configurations.length>0&&(0,s.h)("div",{class:"actions"},(0,s.h)("button-component",{part:"nlc__create-new-cta",clickHandler:()=>{this.createButtonClick.emit(this.host)}},s.i.t("createNewSchedulingPageButtonText")))),(0,s.h)("div",{class:"configurations"},(0,s.h)("div",{class:"table-container"},(0,s.h)("table",{class:{"no-configurations":"loading"!==this.state&&(!this.configurations||0===this.configurations.length)}},(0,s.h)("tr",{class:{hide:"loading"===this.state||this.configurations&&0===this.configurations.length}},(0,s.h)("th",null,s.i.t("pageTitle")),(0,s.h)("th",null,s.i.t("durationTitle")),(0,s.h)("th",null)),"loading"===this.state&&(0,s.h)("tr",{class:"no-configurations"},(0,s.h)("td",{colSpan:3},(0,s.h)("div",null,(0,s.h)("h3",null,s.i.t("loading"),"..."),(0,s.h)("p",null,s.i.t("loadingPagesDescription"))))),"loading"!==this.state&&(!this.configurations||0===this.configurations.length)&&(0,s.h)("tr",{class:"no-configurations"},(0,s.h)("td",{colSpan:3},(0,s.h)("div",null,(0,s.h)("calendar-icon",{width:"48",height:"48"}),(0,s.h)("h3",null,s.i.t("noSchedulingPages")),(0,s.h)("p",null,s.i.t("createFirstSchedulingPage")),(0,s.h)("button-component",{part:"nlc__create-new-cta",clickHandler:()=>{this.createButtonClick.emit(this.host)}},s.i.t("createNewSchedulingPageButtonText"))))),"loading"!==this.state&&(null==(e=this.configurations)?void 0:e.map((e,t)=>{var n,o,i,a;let r=(t===this.configurations.length-1||t===this.configurations.length-2)&&this.configurations.length>3;return(0,s.h)("tr",{key:null==e?void 0:e.id},(0,s.h)("td",null,(0,s.h)("div",{class:"title"},(0,s.h)("div",{class:"config-event-title",title:null==(n=null==e?void 0:e.event_booking)?void 0:n.title},(null==(o=null==e?void 0:e.event_booking)?void 0:o.title)||(null==e?void 0:e.name)),(0,s.h)("div",{class:"config-event-description"},null==(i=null==e?void 0:e.event_booking)?void 0:i.description))),(0,s.h)("td",null,(0,s.h)("div",{class:"duration"},this.getDurationString(null==(a=null==e?void 0:e.availability)?void 0:a.duration_minutes))),(0,s.h)("td",null,(0,s.h)("div",{class:"actions"},(0,s.h)("button-component",{class:"edit-button",variant:"basic",key:`edit-${t}`,disabled:this.editButtonLoadingId===`edit-${t}`,isLoading:this.editButtonLoadingId===`edit-${t}`,clickHandler:n=>{n.preventDefault(),this.editButtonLoadingId=`edit-${t}`,this.editButtonClick.emit({host:this.host,configuration:e})}},this.editButtonLoadingId===`edit-${t}`?null:(0,s.h)("edit-icon",{width:"16",height:"16"}),s.i.t("editSchedulingPageButtonText")),(0,s.h)("select-dropdown",{class:{last:r},name:"actions",options:[{value:`preview-${t}`,label:"Preview",labelHTML:this.getActionLabelHTML("preview")},{value:`copy-${t}`,label:"Copy link",labelHTML:this.getActionLabelHTML("copy")},{value:`delete-${t}`,label:"Delete",labelHTML:this.getActionLabelHTML("delete")}],defaultSelectedOption:{value:"",label:""},dropdownButtonText:"...",withSearch:!1,withChevron:!1,exportparts:"sd_dropdown: actions__dropdown, sd_dropdown-button: actions__dropdown-button, sd_dropdown-content: actions__dropdown-content, actions-Copy, actions-Preview, actions-Delete"}))))})))),(0,s.h)("div",{class:"pagination"},(0,s.h)("button",{class:"arrow left",onClick:()=>this.previousPageClickedHandler(),disabled:this.previousCursors.length<=0},(0,s.h)("chevron-icon",null)),(0,s.h)("button",{class:"arrow right",onClick:()=>this.nextPageClickedHandler(),disabled:this.disableNextPageButton},(0,s.h)("chevron-icon",null)))),!!this.deleteConfigurationId&&(0,s.h)("div",{class:"card-wrapper"},(0,s.h)("div",{class:"card-modal"},(0,s.h)("div",{class:"close-button"}
2,(0,s.h)("button-component",{tooltip:"Close",id:"close",variant:"invisible",onClick:e=>this.closeModal(e),part:"nfbf__close-button"},(0,s.h)("close-icon",null))),(0,s.h)("div",{class:"header"},(0,s.h)("h2",{slot:"card-title",part:"nfbf__title"},s.i.t("deleteSchedulingPageTitle"))),(0,s.h)("div",{class:"description title-desc"},(0,s.h)("p",null,s.i.t("deleteSchedulingPageDescription"))),(0,s.h)("div",{class:{footer:!0}},(0,s.h)("button-component",{variant:"basic",onClick:e=>this.closeModal(e),part:"nfbf__button-outline nfbf__cancel-cta"},`${s.i.t("deleteSchedulingPageCancelButton")}`),(0,s.h)("button-component",{variant:"destructive",onClick:e=>this.handleConfirmDeleteButtonClicked(e),disabled:this.showDeleteButtonLoading,isLoading:this.showDeleteButtonLoading,part:"nfbf__button-outline nfbf__reschedule-cta"},`${s.i.t("deleteSchedulingPageConfirmButton")}`)))))}get host(){return(0,s.g)(this)}static get watchers(){return{listConfigurationsNextCursor:["listConfigurationsNextCursorChangedHandler"],selectedLanguage:["selectedLanguageChangedHandler"]}}};!function(e,t,n,o){var i,a=arguments.length,r=a<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,n):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,n,o);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(r=(a<3?i(r):a>3?i(t,n,r):i(t,n))||r);a>3&&r&&Object.defineProperty(t,n,r)}([(0,l.R)({name:"nylas-list-configurations",stateToProps:new Map([["schedulerConfig.configurations","configurations"],["schedulerConfig.listConfigurationsNextCursor","listConfigurationsNextCursor"],["schedulerConfig.selectedLanguage","selectedLanguage"]]),localPropsToProp:new Map([["schedulerPreviewLink","schedulerPreviewLink"]]),eventToProps:{initListConfigurations:async(e,t)=>{let{host:n,cursor:o}=e.detail;await n.setState("loading");let[i,a]=await t.schedulerConfig.getConfigurations(o);if(!i&&a&&a.message){await n.setState("error"),await n.setError({message:a.message,type:d.n.Error,category:u.E.Component,title:s.i.t("nylasEditorTabs.getConfigsError")});return}await n.setState("loaded")},createButtonClick:async(e,t)=>{t.schedulerConfigStore.resetSelectedConfiguration();let n=Object.entries(t.schedulerConfigStore.state.enableEventTypes||{}).filter(([e,t])=>t);1===n.length?(t.schedulerConfigStore.state.action="create",t.schedulerConfigStore.state.selectedEventType=c.C[n[0][0]]):t.schedulerConfigStore.state.action="create-select"},deleteButtonClick:async(e,t)=>{let{host:n,configuration:o}=e.detail,[i,a]=await t.schedulerConfig.deleteConfiguration(o.id);!i&&a&&a.message&&(await n.setState("error"),await n.setError({message:a.message,type:d.n.Error,category:u.E.Component,title:s.i.t("nylasEditorTabs.deleteConfigError")})),await n.hideDeleteConfirmation()},editButtonClick:async(e,t)=>{let{host:n,configuration:o}=e.detail;if("group"===o.type){let{startTime:e,endTime:i}=(0,s.j)(new Date().toISOString(),"week");t.schedulerConfigStore.state.calendarViewDateRange={start_time:e.toString(),end_time:i.toString()};let[a,r]=await t.schedulerConfig.getGroupEvents(o.id,o);if(!a&&r&&r.message){await n.setError({message:r.message,type:d.n.Error,category:u.E.Component,title:s.i.t("nylasEditorTabsGroup.getGroupEventsError")}),n.hideEditButtonLoading();return}}t.schedulerConfigStore.state.action="edit",t.schedulerConfigStore.state.selectedConfiguration=o,n.hideEditButtonLoading()}},fireRegisterEvent:!0}),_("design:type",Function),_("design:paramtypes",[]),_("design:returntype",void 0)],w.prototype,"render",null),w.style=':host{display:grid;grid-auto-flow:row;width:100%;font-family:inherit;font-optical-sizing:auto;--nylas-primary:#2563eb;--nylas-error:#cc4841
vendor: 5,088 bytes, line 2
2;--nylas-error-pressed:#992222;--nylas-wraning:#f06c00;--nylas-success:#16a392;--nylas-info:#2b8fc2;--nylas-base-0:#ffffff;--nylas-base-25:#fcfcfd;--nylas-base-50:#f8f9fc;--nylas-base-100:#eaecf5;--nylas-base-200:#d5d9eb;--nylas-base-300:#b3b8d8;--nylas-base-400:#717bbc;--nylas-base-500:#4e5ba6;--nylas-base-600:#3e4784;--nylas-base-700:#263f72;--nylas-base-800:#293056;--nylas-base-900:#101323;--nylas-base-950:#0e101b;--nylas-color-blue-100:#e0e6f9;--nylas-border-radius:0.25rem;--nylas-border-radius-2x:0.5rem;--nylas-border-radius-3x:0.75rem;--nylas-font-family:"Inter", sans-serif;--nylas-color-black:#000000;--nylas-color-grey-900:#2c2c2c;--nylas-color-grey-800:#4b4b4b;--nylas-color-grey-700:#6e6e6e;--nylas-color-grey-600:#8e8e8e;--nylas-color-grey-500:#b3b3b3;--nylas-color-grey-400:#cacaca;--nylas-color-grey-300:#e1e1e1;--nylas-color-grey-200:#eaeaea;--nylas-color-grey-100:#f5f5f5;--nylas-color-grey-50:#fbfcfe;--nylas-color-white:#ffffff;--nylas-color-red-900:#992222;--nylas-color-red-700:#cc4841;--nylas-color-red-500:#ff786a;--nylas-color-red-300:#ffa79e;--nylas-color-red-100:#ffc5bf;--nylas-color-red-50:#ffeae8;--nylas-color-blue-900:#213571;--nylas-color-blue-700:#314fa9;--nylas-color-blue-500:#4169e1;--nylas-color-blue-300:#bdccf9;--nylas-color-blue-100:#e0e6f9;--nylas-color-blue-50:#f6f8fd;--nylas-color-yellow-900:#7c6506;--nylas-color-yellow-700:#c29f09;--nylas-color-yellow-500:#f7c90b;--nylas-color-yellow-300:#f9de70;--nylas-color-yellow-100:#fceba9;--nylas-color-yellow-50:#fdf4ce;--nylas-color-green-900:#0e6b60;--nylas-color-green-700:#16a392;--nylas-color-green-500:#17c3b2;--nylas-color-green-300:#74dbd1;--nylas-color-green-100:#a2e7e0;--nylas-color-green-50:#d1f3f0;--nylas-color-purple-900:#643554;--nylas-color-purple-700:#954f7d;--nylas-color-purple-500:#c769a7;--nylas-color-purple-300:#dda5ca;--nylas-color-purple-100:#e0bdd6;--nylas-color-purple-50:#e9dde5;--nylas-color-sky-900:#20698f;--nylas-color-sky-700:#2b8fc2;--nylas-color-sky-500:#6dceff;--nylas-color-sky-300:#8fdaff;--nylas-color-sky-100:#b8e7ff;--nylas-color-sky-50:#d9f2ff}.header{display:flex;align-items:center;justify-content:space-between;margin-bottom:1rem;gap:1rem}@media screen and (max-width: 768px){.header{flex-direction:column;gap:0.5rem;align-items:unset}}.header h2{margin:0;font-size:1.25rem;color:var(--nylas-base-900);font-weight:600}.header p{margin:0;font-size:16px;color:var(--nylas-base-700)}.header .actions{justify-self:end}@media screen and (max-width: 768px){.header .actions{width:100%}}.configurations{border:1px solid var(--nylas-base-200);border-radius:var(--nylas-border-radius-2x);background:var(--nylas-base-0);height:100%;display:flex;flex-direction:column;position:relative;overflow-y:hidden}.configurations .table-container{overflow-y:auto;flex:1}@media screen and (max-width: 768px){.configurations .table-container{min-height:624px}}.configurations .table-container table{width:100%;border-spacing:0;border-collapse:collapse;font-family:inherit;height:max-content}.configurations .table-container table.no-configurations{height:100%}.configurations .table-container table tr{color:var(--nylas-base-800);border-bottom:1px solid var(--nylas-base-200);font-family:inherit}.configurations .table-container table tr.hide{display:none}.configurations .table-container table th{font-weight:600;text-transform:uppercase;font-size:14px;line-height:20px}.configurations .table-container table tr.no-configurations td>div{display:flex;height:100%;justify-content:center;align-items:center;flex-direction:column;padding:var(--nylas-border-radius-3x)}.configurations .table-container table tr.no-configurations td>div h3{margin:0 0 1rem 0;color:var(--nylas-base-700)}.configurations .table-container table tr.no-configurations td>div p{margin:0 0 1rem 0;color:var(--nylas-base-600)}.configurations .table-container table tr.no-configurations td>div calendar-icon{margin-bottom:1rem;color:var(--nylas-base-200)}.configurations .table-container table th,.configurations .table-container table td{text-align:left;padding:1rem;font-family:inherit}.configurations .table-container table .actions{display:flex;justify-content:flex-end;gap:1rem;text-align:right}.configurations .table-container table .actions button-component.edit-button{min-width:98px}@media screen and (max-width: 768px){.configurations .table-container table .actions{flex-direction:column;gap:0.5rem}}.configurations .table-container table .actions select-dropdown.last::part(sd_dropdown-content){bottom:54px}.configurations .table-container table .title{width:100%;max-width:300px}@media screen and (max-width: 768px){.configurations .table-container table .title{max-width:96px}}.configurations .table-container table .title div{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.configurations .table-container table .title div.config-event-title{font-weight:600}.configurations .table-container table .title div.config-event-description{font-size:0.75rem}.configurations .pagination{padding:1rem;position:sticky;top:100%;display:flex;justify-content:flex-end;gap:0.5rem;background:
2white;width:calc(100% - 2rem);z-index:2}.configurations .pagination td.arrows{display:flex;justify-content:flex-end;gap:0.5rem}.configurations .pagination button{display:flex;flex-direction:row;justify-content:center;align-items:center;height:3vh;width:3vh;min-width:3em;min-height:3em;cursor:pointer;border-radius:var(--nylas-border-radius-2x);border:1px solid var(--nylas-base-300);background-color:transparent;color:var(--nylas-base-800);cursor:pointer}.configurations .pagination button:hover:not(:disabled){border:1px solid var(--nylas-primary)}.configurations .pagination button:active{border:1px solid var(--nylas-base-800)}.configurations .pagination button:disabled{border:1px solid var(--nylas-base-100);background-color:transparent;color:var(--nylas-base-300);cursor:not-allowed}.configurations .pagination button.right{transform:rotate(180deg)}.error-container{margin-top:1.5rem}.error-container .error{color:var(--nylas-error);padding:0.5rem 0;margin:1rem 0 0}button-component#copy button{width:108px}select-dropdown{width:auto}select-dropdown::part(sd_dropdown-button){display:block;height:48px;padding:0px 16px 8px}@media screen and (max-width: 768px){select-dropdown::part(sd_dropdown-button){width:92px}}select-dropdown::part(sd_dropdown-content){width:120px;right:0}select-dropdown::part(sd_dropdown-labelhtml){display:flex;gap:0.5rem;align-items:center;color:var(--nylas-base-900)}select-dropdown::part(sd_dropdown-labelhtml):hover{color:var(--nylas-primary)}.card-wrapper{position:absolute;top:0;left:0;height:calc(100% + 4rem);width:-webkit-fill-available;width:-moz-available;width:fill-available;display:flex;flex-direction:column;justify-content:center;align-items:center;background:rgba(0, 0, 0, 0.6);z-index:2;border-radius:var(--nylas-border-radius-2x)}@media screen and (max-width: 768px){.card-wrapper{justify-content:start;height:100%}}.card-modal{background:var(--nylas-base-0);display:flex;flex-direction:column;font-family:var(--nylas-font-family);background-color:var(--nylas-base-0);color:var(--nylas-base-900);border-radius:var(--nylas-border-radius-3x);padding:32px;width:562px;box-shadow:0px 1px 4px rgba(0, 0, 0, 0.1), 0px 3px 6px rgba(0, 0, 0, 0.06)}@media screen and (max-width: 768px){.card-modal{width:auto;border-radius:0px}}.description.title-desc{margin-bottom:2rem}.description p{margin:0;font-size:18px;color:var(--nylas-base-600)}.footer{margin-top:1rem;padding-top:1rem;display:flex;justify-content:flex-end;gap:0.5rem;box-sizing:border-box;background-color:var(--nylas-base-25);width:100%;border-radius:0 0 var(--nylas-border-radius-2x) var(--nylas-border-radius-2x)}.close-button{width:100%;display:flex;justify-content:flex-end}.close-button button-component button{padding:0;height:auto}.close-button button-component button:hover{background-color:transparent !important}button-component{--dot-color:var(--nylas-base-700)}';var k=function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)};let C=class{constructor(e){(0,s.r)(this,e),this.returnToAllSchedulingPagesEvent=(0,s.a)(this,"returnToAllSchedulingPagesEvent",7),this.createEventTypeSelected=(0,s.a)(this,"createEventTypeSelected",7),this.participantOptions=void 0,this.name="select-event-type",this.selectedLanguage=void 0,this.enableEventTypes={one_on_one:!0,collective:!0,max_fairness:!0,max_availability:!0,group:!0}}connectedCallback(){(0,s.b)("nylas-select-event-type","connectedCallback")}disconnectedCallback(){(0,s.b)("nylas-select-event-type","disconnectedCallback")}componentWillLoad(){(0,s.b)("nylas-select-event-type","componentWillLoad"),this.host.setAttribute("name",this.name)}componentDidLoad(){(0,s.b)("nylas-select-event-type","componentDidLoad")}elementNameChangedHandler(e){(0,s.b)("nylas-select-event-type","elementNameChangedHandler",e),this.host.setAttribute("name",e)}selectedLanguageChangedHandler(e,t){e!==t&&s.i.changeLanguage(e)}render(){var e;let t={"one-on-one":"one_on_one",collective:"collective","max-fairness":"max_fairness","max-availability":"max_availability",group:"group"},n=[{label:s.i.t("nylasSelectEventType.eventTypeOptions.oneOnOne.label"),value:c.C.one_on_one,description:s.i.t("nylasSelectEventType.eventTypeOptions.oneOnOne.desc")},{label:s.i.t("nylasSelectEventType.eventTypeOptions.collective.label"),value:c.C.collective,description:s.i.t("nylasSelectEventType.eventTypeOptions.collective.de
2sc")},{label:s.i.t("nylasSelectEventType.eventTypeOptions.maxFairness.label"),value:c.C.max_fairness,description:s.i.t("nylasSelectEventType.eventTypeOptions.maxFairness.desc")},{label:s.i.t("nylasSelectEventType.eventTypeOptions.maxAvailability.label"),value:c.C.max_availability,description:s.i.t("nylasSelectEventType.eventTypeOptions.maxAvailability.desc")},{label:s.i.t("nylasSelectEventType.eventTypeOptions.group.label"),value:c.C.group,description:s.i.t("nylasSelectEventType.eventTypeOptions.group.desc")}],o=[c.C.collective,c.C.max_availability,c.C.max_fairness],i=this.participantOptions&&(null==(e=this.participantOptions)?void 0:e.length)>0&&!!this.participantOptions[0].email&&!!this.participantOptions[0].name&&!!this.participantOptions[0].calendars&&this.participantOptions[0].calendars.length>0,a=this.enableEventTypes?n.filter(e=>{let n=e.value,a=t[n];return console.log("key",n,this.enableEventTypes?this.enableEventTypes[a]:"no enableEventTypes"),(!o.includes(n)||!!i)&&this.enableEventTypes&&this.enableEventTypes[a]}):n;return(0,s.h)(s.H,null,(0,s.h)("div",{class:"nylas-select-event-type",part:"nset"},(0,s.h)("div",{class:"header",part:"nset__header"},(0,s.h)("h2",null,s.i.t("nylasSelectEventType.createEventHeaderTitle")),(0,s.h)("button-component",{variant:"invisible",part:"nset__header__back-button",onClick:e=>{this.returnToAllSchedulingPagesEvent.emit()}},(0,s.h)("chevron-icon",{width:"16",height:"16"}),(0,s.h)("span",null,s.i.t("nylasSelectEventType.returnToAllSchedulingPages")))),(0,s.h)("div",{class:"content",part:"nset__content"},(0,s.h)("h3",null,s.i.t("nylasSelectEventType.eventTypeHeaderTitle")),(0,s.h)("div",{class:"event-type",part:"nset__content__event-type"},0===a.length&&(0,s.h)("p",null,s.i.t("nylasSelectEventType.noEventTypesEnabled")),a.map(e=>(0,s.h)("div",{class:"event-type-option",onClick:t=>{this.createEventTypeSelected.emit({eventType:e.value})},part:`nset__content__event-type-option-${e.value}`},(0,s.h)("h4",null,e.label),(0,s.h)("p",null,e.description)))))))}get host(){return(0,s.g)(this)}static get watchers(){return{name:["elementNameChangedHandler"],selectedLanguage:["selectedLanguageChangedHandler"]}}};!function(e,t,n,o){var i,a=arguments.length,r=a<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,n):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,n,o);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(r=(a<3?i(r):a>3?i(t,n,r):i(t,n))||r);a>3&&r&&Object.defineProperty(t,n,r)}([(0,l.R)({name:"nylas-select-event-type",stateToProps:new Map([["schedulerConfig.selectedLanguage","selectedLanguage"],["schedulerConfig.additionalParticipants","participantOptions"],["schedulerConfig.enableEventTypes","enableEventTypes"]]),eventToProps:{returnToAllSchedulingPagesEvent:async(e,t)=>{t.schedulerConfigStore.state.action=null,t.schedulerConfigStore.set("selectedEventType",void 0)},createEventTypeSelected:async(e,t)=>{let{eventType:n}=e.detail;t.schedulerConfigStore.state.action="create",t.schedulerConfigStore.state.selectedEventType=n}},fireRegisterEvent:!0}),k("design:type",Function),k("design:paramtypes",[]),k("design:returntype",void 0)],C.prototype,"render",null),C.style=':host{display:block;--nylas-primary:#2563eb;--nylas-error:#cc4841;--nylas-error-pressed:#992222;--nylas-wraning:#f06c00;--nylas-success:#16a392;--nylas-info:#2b8fc2;--nylas-base-0:#ffffff;--nylas-base-25:#fcfcfd;--nylas-base-50:#f8f9fc;--nylas-base-100:#eaecf5;--nylas-base-200:#d5d9eb;--nylas-base-300:#b3b8d8;--nylas-base-400:#717bbc;--nylas-base-500:#4e5ba6;--nylas-base-600:#3e4784;--nylas-base-700:#263f72;--nylas-base-800:#293056;--nylas-base-900:#101323;--nylas-base-950:#0e101b;--nylas-color-blue-100:#e0e6f9;--nylas-border-radius:0.25rem;--nylas-border-radius-2x:0.5rem;--nylas-border-radius-3x:0.75rem;--nylas-font-family:"Inter", sans-serif;--nylas-color-black:#000000;--nylas-color-grey-900:#2c2c2c;--nylas-color-grey-800:#4b4b4b;--nylas-color-grey-700:#6e6e6e;--nylas-color-grey-600:#8e8e8e;--nylas-color-grey-500:#b3b3b3;--nylas-color-grey-400:#cacaca;--nylas-color-grey-300:#e1e1e1;--nylas-color-grey-200:#eaeaea;--nylas-color-grey-100:#f5f5f5;--nylas-color-grey-50:#fbfcfe;--nylas-color-white:#ffffff;--nylas-color-red-900:#992222;--nylas-color-red-700:#cc4841;--nylas-color-red-500:#ff786a;--nylas-color-red-300:#ffa79e;--nylas-color-red-100:#ffc5bf;--nylas-color-red-50:#ffeae8;--nylas-color-blue-900:#213571;--nylas-color-blue-700:#314fa9;--nylas-color-blue-500:#4169e1;--nylas-color-blue-300:#bdccf9;--nylas-color-blue-100:#e0e6f9;--nylas-color-blue-50:#f6f8fd;--nylas-color-yellow-900:#7c6506;--nylas-color-yellow-700:#c29f09;--nylas-color-yellow-500:#f7c90b;--nylas-color-yellow-300:#f9de70;--nylas-color-yellow-100:#fceba9;--nylas-color-yellow-50:#fdf4ce;--nylas-color-green-900:#0e6b60;--nylas-color-green-700:#16a392;--nylas-color-green-500:#17c3b2;--nylas-color-green-300:#74dbd1;--nylas-color-green-100:#a2e7e0;--nylas-color-green-50:#d1f3f0;--nylas-color-purple-900:#643554;--nylas-color-purple-700:#954f7d;--nylas-color-purple-500:#c769a7;--nylas-color-purple-300:#dda5ca;--nylas-color-purple-100:#e0bdd6;--nylas-color-purple-50:#e9dde5;--nylas-color-sky-900:#20698f;--nylas-color-sky-700:#2b8fc2;--nylas-color-sky-500:#6dceff;--nylas-color-sky-300:#8fdaff;--nylas-color-sky-100:#b8e7ff;--nylas-color-sky-50:#d9f2ff;width:inherit}.nylas-select-event-type{height:inherit;overflow-y:auto}.nylas-select-event-type div.header{display:flex;justify-content:space-between;align-items:center;border-bottom:1px solid var(--nylas-base-200)}.nylas-select-event-type div.header h2{font-size:18px;padding:0 24px;line-height:24px;margin:0;font-weight:600;color:var(--nylas-base-800)}.nylas-select-event-type div.header button-component button{background:transparent;border:none;cursor:pointer}.nylas-select-event-type div.header button-component button:hover,.nylas-select-event-type div.header button-component button:active{color:var(--nylas-primary);background-color:transparent}.nylas-select-event-type div.header button-component button:disabled{cursor:not-allowed}.nylas-select-event-type div.content{padding:40px}.nylas-select-event-type div.content h3{margin:0 0 32px 0;font-size:18px;line-height:24px;font-weight:600}.nylas-select-event-type div.content div.event-type{display:flex;flex-direction:column;gap:8px}.nylas-select-event-type div.content div.event-type div.event-type-option{padding:16px;border:1px solid var(--nylas-base-200);border-radius:var(--nylas-border-radius-3x);width:inherit;cursor:pointer;display:flex;flex-direction:column;gap:8px}.nylas-select-event-type div.content div.event-type div.event-type-option h4{margin:0;font-size:16px;line-height:24px;font-weight:600;color:var(--nylas-base-900)}.nylas-select-event-type div.content div.event-type div.event-type-option p{margin:0;font-size:14px;line-height:21px;font-weight:400;color:var(--nylas-base-800)}'},91513:function(e,t,n){n.d(t,{R:function(){return i}});var o=n(39986);function i(e){return(t,n)=>{let i=e.name;(0,o.b)(`[${i}] Registering component ${i} being called on ${n}`);let a=t.componentWillLoad;if(!a){(0,o.V)(`[${i}] componentWillLoad lifecycle method in ${i} missing. Required for RegisterComponent decorator.`);return}let r=t.connectedCallback;if(!r){(0,o.V)(`[${i}] connectedCallback lifecycle method in ${i} missing. Required for RegisterComponent decorator.`);return}let s=t.disconnectedCallback;if(!s){(0,o.V)(`[${i}] disconnectedCallback lifecycle method in ${i} missing. Required for RegisterComponent decorator.`);return}if(e.storeToProps&&e.stateToProps){let t=Array.from(e.storeToProps.values()),n=Array.from(e.stateToProps.values()),a=t.filter(e=>n.includes(e));if(a.length>0){(0,o.V)(`[${i}] Overlapping prop keys detected in ${i} for storeToProps and stateToProps. Make sure to only define them once. Overlapping keys: ${a.join(", ")}`);return}}let l=new Map;
2e.eventToProps&&Object.keys(e.eventToProps).forEach(t=>{var n;l.set(t,null==(n=e.eventToProps)?void 0:n[t])}),t.connectedCallback=function(){(0,o.b)(`[~${i}] connectedCallback called`);let t=null==r?void 0:r.call(this),n=(0,o.g)(this);return n.dataset.nylasId||(Object.defineProperty(n,"registerNylasComponent",{get:()=>!0,enumerable:!0}),Object.defineProperty(n,"stateToProps",{get:()=>e.stateToProps,enumerable:!0}),Object.defineProperty(n,"getStoresToProp",{get:()=>e.getStoresToProp,enumerable:!0}),Object.defineProperty(n,"storeToProps",{get:()=>e.storeToProps,enumerable:!0}),Object.defineProperty(n,"eventToProps",{get:()=>l,enumerable:!0}),Object.defineProperty(n,"authToProp",{get:()=>e.authToProp,enumerable:!0}),Object.defineProperty(n,"connectorToProp",{get:()=>e.connectorToProp,enumerable:!0}),Object.defineProperty(n,"localPropsToProp",{get:()=>e.localPropsToProp,enumerable:!0})),t},e.fireRegisterEvent&&(t.componentWillLoad=function(){let t=null==a?void 0:a.call(this),n=(0,o.g)(this),r=function(e,t,n="registerComponent"){return new CustomEvent(n,{bubbles:!0,composed:!0,detail:t})}(0,{element:n,...e,eventToProps:l},e.registrationEventName);return n.dispatchEvent(r)&&(0,o.b)(`[${i}] Component ${i} successfully fired registration event`),t},t.disconnectedCallback=function(){let t=null==s?void 0:s.call(this),n=(0,o.g)(this),a=function(e,t,n="unregisterComponent"){return new CustomEvent(n,{bubbles:!0,composed:!0,detail:t})}(0,{element:n,...e,eventToProps:l},e.unregistrationEventName);return n.dispatchEvent(a)&&(0,o.b)(`[${i}] Component ${i} successfully fired unregistration event`),t})}}}}]); 3//# sourceMappingURL=7772.6fe7985ec5cf80d1.js.map
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.