@nylas/react 3.2.14 → 3.2.15
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/components.js +2 -2
- package/dist/cjs/components.js.map +1 -1
- package/dist/cjs/p-DVWbg8if.js.map +1 -1
- package/dist/cjs/utils.js.map +1 -1
- package/dist/es/components.js +5 -3
- package/dist/es/components.js.map +1 -1
- package/dist/es/p-DVWbg8if.js.map +1 -1
- package/dist/es/utils.js.map +1 -1
- package/package.json +2 -2
package/dist/cjs/components.js
CHANGED
|
@@ -480,7 +480,7 @@ ${iw}
|
|
|
480
480
|
border-left: none;
|
|
481
481
|
border-top: none;
|
|
482
482
|
}
|
|
483
|
-
`,a&&e.setAttribute("nonce",a),e}function uw({hooks:a}){return function({onBeforeScreenshot:t,onScreenshot:i,onAfterScreenshot:o,onError:s}){a.useEffect(()=>{(async()=>{t();const f=await no.mediaDevices.getDisplayMedia({video:{width:jn.innerWidth*jn.devicePixelRatio,height:jn.innerHeight*jn.devicePixelRatio},audio:!1,monitorTypeSurfaces:"exclude",preferCurrentTab:!0,selfBrowserSurface:"include",surfaceSwitching:"exclude"}),h=mt.createElement("video");await new Promise((m,g)=>{h.srcObject=f,h.onloadedmetadata=()=>{i(h),f.getTracks().forEach(b=>b.stop()),m()},h.play().catch(g)}),o()})().catch(s)},[])}}const mn="/home/runner/work/sentry-javascript/sentry-javascript/packages/feedback/src/screenshot/components/ScreenshotEditor.tsx",ao=30,Jn=3,ua=ao+Jn,Kt=jn.devicePixelRatio,Xi=a=>({x:Math.min(a.startX,a.endX),y:Math.min(a.startY,a.endY),width:Math.abs(a.startX-a.endX),height:Math.abs(a.startY-a.endY)}),yc=a=>{const e=a.clientHeight,t=a.clientWidth,i=a.width/a.height;let o=e*i,s=e;o>t&&(o=t,s=t/i);const l=(t-o)/2,f=(e-s)/2;return{startX:l,startY:f,endX:o+l,endY:s+f}};function hw({h:a,hooks:e,imageBuffer:t,dialog:i,options:o}){const s=uw({hooks:e});return function({onError:f}){const h=e.useMemo(()=>({__html:fw(o.styleNonce).innerText}),[]),m=dw({h:a}),g=e.useRef(null),b=e.useRef(null),T=e.useRef(null),[x,H]=e.useState({startX:0,startY:0,endX:0,endY:0}),[V,U]=e.useState(!1),[X,q]=e.useState(!1);e.useEffect(()=>{jn.addEventListener("resize",de,!1)},[]);function de(){const re=T.current,he=Xi(yc(t));if(re){re.width=he.width*Kt,re.height=he.height*Kt,re.style.width=`${he.width}px`,re.style.height=`${he.height}px`;const ue=re.getContext("2d");ue&&ue.scale(Kt,Kt)}const ye=b.current;ye&&(ye.style.width=`${he.width}px`,ye.style.height=`${he.height}px`),H({startX:0,startY:0,endX:he.width,endY:he.height})}e.useEffect(()=>{const re=T.current;if(!re)return;const he=re.getContext("2d");if(!he)return;const ye=Xi(yc(t)),ue=Xi(x);he.clearRect(0,0,ye.width,ye.height),he.fillStyle="rgba(0, 0, 0, 0.5)",he.fillRect(0,0,ye.width,ye.height),he.clearRect(ue.x,ue.y,ue.width,ue.height),he.strokeStyle="#ffffff",he.lineWidth=3,he.strokeRect(ue.x+1,ue.y+1,ue.width-2,ue.height-2),he.strokeStyle="#000000",he.lineWidth=1,he.strokeRect(ue.x+3,ue.y+3,ue.width-6,ue.height-6)},[x]);function ge(re,he){U(!1),q(!0);const ye=De(he),ue=()=>{mt.removeEventListener("mousemove",ye),mt.removeEventListener("mouseup",ue),U(!0),q(!1)};mt.addEventListener("mouseup",ue),mt.addEventListener("mousemove",ye)}const De=e.useCallback(re=>function(he){if(!T.current)return;const ye=T.current,ue=ye.getBoundingClientRect(),we=he.clientX-ue.x,Ae=he.clientY-ue.y;switch(re){case"top-left":H(Re=>({...Re,startX:Math.min(Math.max(0,we),Re.endX-ua),startY:Math.min(Math.max(0,Ae),Re.endY-ua)}));break;case"top-right":H(Re=>({...Re,endX:Math.max(Math.min(we,ye.width/Kt),Re.startX+ua),startY:Math.min(Math.max(0,Ae),Re.endY-ua)}));break;case"bottom-left":H(Re=>({...Re,startX:Math.min(Math.max(0,we),Re.endX-ua),endY:Math.max(Math.min(Ae,ye.height/Kt),Re.startY+ua)}));break;case"bottom-right":H(Re=>({...Re,endX:Math.max(Math.min(we,ye.width/Kt),Re.startX+ua),endY:Math.max(Math.min(Ae,ye.height/Kt),Re.startY+ua)}));break}},[]),ke=e.useRef({initialX:0,initialY:0});function xe(re){if(X)return;ke.current={initialX:re.clientX,initialY:re.clientY};const he=ue=>{const we=T.current;if(!we)return;const Ae=ue.clientX-ke.current.initialX,Re=ue.clientY-ke.current.initialY;H(je=>{const $e=Math.max(0,Math.min(je.startX+Ae,we.width/Kt-(je.endX-je.startX))),ze=Math.max(0,Math.min(je.startY+Re,we.height/Kt-(je.endY-je.startY))),Be=$e+(je.endX-je.startX),R=ze+(je.endY-je.startY);return ke.current.initialX=ue.clientX,ke.current.initialY=ue.clientY,{startX:$e,startY:ze,endX:Be,endY:R}})},ye=()=>{mt.removeEventListener("mousemove",he),mt.removeEventListener("mouseup",ye)};mt.addEventListener("mousemove",he),mt.addEventListener("mouseup",ye)}function ve(){const re=mt.createElement("canvas"),he=Xi(yc(t)),ye=Xi(x);re.width=ye.width*Kt,re.height=ye.height*Kt;const ue=re.getContext("2d");ue&&t&&ue.drawImage(t,ye.x/he.width*t.width,ye.y/he.height*t.height,ye.width/he.width*t.width,ye.height/he.height*t.height,0,0,re.width,re.height);const we=t.getContext("2d");we&&(we.clearRect(0,0,t.width,t.height),t.width=re.width,t.height=re.height,t.style.width=`${ye.width}px`,t.style.height=`${ye.height}px`,we.drawImage(re,0,0),de())}return s({onBeforeScreenshot:e.useCallback(()=>{i.el.style.display="none"},[]),onScreenshot:e.useCallback(re=>{const he=t.getContext("2d");if(!he)throw new Error("Could not get canvas context");t.width=re.videoWidth,t.height=re.videoHeight,t.style.width="100%",t.style.height="100%",he.drawImage(re,0,0)},[t]),onAfterScreenshot:e.useCallback(()=>{i.el.style.display="block";const re=g.current;re&&re.appendChild(t),de()},[]),onError:e.useCallback(re=>{i.el.style.display="block",f(re)},[])}),a("div",{class:"editor",__self:this,__source:{fileName:mn,lineNumber:315}},a("style",{nonce:o.styleNonce,dangerouslySetInnerHTML:h,__self:this,__source:{fileName:mn,lineNumber:316}}),a("div",{class:"editor__canvas-container",ref:g,__self:this,__source:{fileName:mn,lineNumber:317}},a("div",{class:"editor__crop-container",style:{position:"absolute",zIndex:1},ref:b,__self:this,__source:{fileName:mn,lineNumber:318}},a("canvas",{onMouseDown:xe,style:{position:"absolute",cursor:V?"move":"auto"},ref:T,__self:this,__source:{fileName:mn,lineNumber:319}}),a(m,{left:x.startX-Jn,top:x.startY-Jn,onGrabButton:ge,corner:"top-left",__self:this,__source:{fileName:mn,lineNumber:324}}),a(m,{left:x.endX-ao+Jn,top:x.startY-Jn,onGrabButton:ge,corner:"top-right",__self:this,__source:{fileName:mn,lineNumber:330}}),a(m,{left:x.startX-Jn,top:x.endY-ao+Jn,onGrabButton:ge,corner:"bottom-left",__self:this,__source:{fileName:mn,lineNumber:336}}),a(m,{left:x.endX-ao+Jn,top:x.endY-ao+Jn,onGrabButton:ge,corner:"bottom-right",__self:this,__source:{fileName:mn,lineNumber:342}}),a("div",{style:{left:Math.max(0,x.endX-191),top:Math.max(0,x.endY+8),display:V?"flex":"none"},class:"editor__crop-btn-group",__self:this,__source:{fileName:mn,lineNumber:348}},a("button",{onClick:re=>{re.preventDefault(),T.current&&H({startX:0,startY:0,endX:T.current.width/Kt,endY:T.current.height/Kt}),U(!1)},class:"btn btn--default",__self:this,__source:{fileName:mn,lineNumber:356}},o.cancelButtonLabel),a("button",{onClick:re=>{re.preventDefault(),ve(),U(!1)},class:"btn btn--primary",__self:this,__source:{fileName:mn,lineNumber:373}},o.confirmButtonLabel)))))}}const pw=()=>({name:"FeedbackScreenshot",setupOnce(){},createInput:({h:a,hooks:e,dialog:t,options:i})=>{const o=mt.createElement("canvas");return{input:hw({h:a,hooks:e,imageBuffer:o,dialog:t,options:i}),value:async()=>{const s=await new Promise(l=>{o.toBlob(l,"image/png")});if(s)return{data:new Uint8Array(await s.arrayBuffer()),filename:"screenshot.png",contentType:"application/png"}}}}}),Ff=D9({lazyLoadIntegration:t9,getModalIntegration:()=>lw,getScreenshotIntegration:()=>pw}),oa="2.5.16",mw=':host{display:block;--nylas-primary:#2563eb;--nylas-error:#cc4841;--nylas-error-50:#ffeae8;--nylas-error-100:#ffc5bf;--nylas-error-200:#fecaca;--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-event-capacity{display:flex;flex-direction:column;gap:4px}.nylas-event-capacity label{display:flex;align-items:center;gap:4px;color:var(--nylas-base-800);font-size:16px;font-style:normal;font-weight:400;line-height:150%;}.nylas-event-capacity label span.required{color:var(--nylas-error, #cc4841)}.nylas-event-capacity label span.label-icon{margin-left:4px}.nylas-event-capacity label span.label-icon tooltip-component{display:flex}.nylas-event-capacity label tooltip-component::part(tc__content){left:50px}.nylas-event-capacity__wrapper{display:flex;align-items:center;gap:0.5rem}.nylas-event-capacity__wrapper input-component{width:auto}.nylas-event-capacity__wrapper input-component::part(ic__input){border-width:1;border-radius:8px;border:1px solid var(--nylas-base-200);font-family:var(--nylas-font-family);font-size:16px;line-height:24px;width:80px}.nylas-event-capacity__wrapper input-component::part(ic__input--error){border:1px solid var(--nylas-error)}.nylas-event-capacity__wrapper input-component::part(ic__label--error){position:relative;margin-bottom:24px}.nylas-event-capacity__wrapper input-component::part(ic__error_message){position:absolute;top:54px;width:max-content}.nylas-event-capacity__wrapper span.attendees.error{margin-top:-24px}';var gw=function(a,e,t,i){var o=arguments.length,s=o<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,l;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(a,e,t,i);else for(var f=a.length-1;f>=0;f--)(l=a[f])&&(s=(o<3?l(s):o>3?l(e,t,s):l(e,t))||s);return o>3&&s&&Object.defineProperty(e,t,s),s},bc=function(a,e){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(a,e)};const Nf=n.proxyCustomElement(class extends n.H{constructor(){super(),this.__registerHost(),this.__attachShadow(),this.valueChanged=n.createEvent(this,"valueChanged",7),this.internals=this.attachInternals(),this.name="event-capacity",this.error=""}connectedCallback(){n.debug("nylas-event-capacity","connectedCallback"),queueMicrotask(()=>{this.themeConfig&&(this.applyThemeConfig(this.themeConfig),this.host.setAttribute("data-themed",""))})}disconnectedCallback(){n.debug("nylas-event-capacity","disconnectedCallback")}componentWillLoad(){n.debug("nylas-event-capacity","componentWillLoad"),this.host.setAttribute("name",this.name)}componentDidLoad(){n.debug("nylas-event-capacity","componentDidLoad"),this.selectedEventCapacity=this.capacity||10,n.debug("selectedEventCapacity",this.selectedEventCapacity),this.internals.setFormValue(this.selectedEventCapacity.toString(),this.name)}componentWillUpdate(){n.debug("nylas-event-capacity","componentWillUpdate")}componentDidUpdate(){n.debug("nylas-event-capacity","componentDidUpdate")}componentWillRender(){n.debug("nylas-event-capacity","componentWillRender")}componentDidRender(){n.debug("nylas-event-capacity","componentDidRender")}elementNameChangedHandler(e){n.debug("nylas-event-capacity","elementNameChangedHandler",e),this.host.setAttribute("name",e)}selectedLanguageChangedHandler(e,t){e!==t&&n.instance.changeLanguage(e)}themeConfigChangedHandler(e,t){e!==t&&this.applyThemeConfig(e)}applyThemeConfig(e){if(e)for(const[t,i]of Object.entries(e))this.host.style.setProperty(`${t}`,i)}async nylasFormInputChangeHandler(e){const{name:t,value:i}=e.detail;if(t==="event-capacity"){const o=parseInt(i);if(o<1||o>500||isNaN(o)){this.error=n.instance.t("fixFormErrors"),this.internals.setValidity({customError:!0},this.error),this.valueChanged.emit({value:i.toString(),name:this.name});return}this.error="",this.internals.setValidity({customError:!1},""),this.selectedEventCapacity=parseInt(i),this.internals.setFormValue(i.toString(),this.name),this.valueChanged.emit({value:i.toString(),name:this.name})}}render(){const e=typeof this.selectedEventCapacity<"u";return n.h(n.Host,{key:"e6f85aecbbaeb832787d15467665948bbee0fa13"},n.h("div",{key:"8406843a2c85f91293d9d3291cc62b470da54061",class:"nylas-event-capacity",part:"necapacity"},n.h("label",{key:"08e23312963f34e9d99438cfae812f69d6db4e15",htmlFor:"event-capacity"},n.h("span",{key:"a84786122c2f2320e124bc7056baa85a5df16893"},n.instance.t("nylasEventCapacity.headerTitle"),n.h("span",{key:"ba7612dff5ec1a4da53e4f53e2b43ef63e2dbf98",class:"required"},"*")),n.h("tooltip-component",{key:"b9173e544830ee9ffed7a882d2e6de0462575fc6"},n.h("info-icon",{key:"a79509157d703b8dae4b8ea630145fd84a8d0c0d",slot:"tooltip-icon"}),n.h("span",{key:"da53d6f901cfedbbb9cf414a112cb70bdb6bf753",slot:"tooltip-content"},n.instance.t("nylasEventCapacity.tooltip.desc")))),e&&n.h("div",{key:"7fc33974040384dcbdfe79fd60d60b76526dd424",class:"nylas-event-capacity__wrapper"},n.h("input-component",{key:"4f1e8a5d7b540ab99cdcfa91b83b0bbdc7fe715b",name:"event-capacity",id:"event-capacity",type:"number",pattern:/^[0-9]*$/,patternError:n.instance.t("invalidInputFormat",{field:"Event capacity"}),minValue:1,maxValue:500,required:!1,exportparts:"ic_input: necapacity__input-textfield",defaultValue:typeof this.selectedEventCapacity=="number"?this.selectedEventCapacity.toString():"10",themeConfig:this.themeConfig}),n.h("span",{key:"f3a0d94ff47122899c3ab475ac66e388efa43a54",class:this.error?"attendees error":"attendees"},n.instance.t("nylasEventCapacity.attendees")))))}static get formAssociated(){return!0}get host(){return this}static get watchers(){return{name:["elementNameChangedHandler"],selectedLanguage:["selectedLanguageChangedHandler"],themeConfig:["themeConfigChangedHandler"]}}static get style(){return mw}},[321,"nylas-event-capacity",{name:[1],capacity:[2],selectedLanguage:[1,"selected-language"],themeConfig:[16,"theme-config"],selectedEventCapacity:[32],error:[32]},[[0,"nylasFormInputChanged","nylasFormInputChangeHandler"]],{name:["elementNameChangedHandler"],selectedLanguage:["selectedLanguageChangedHandler"],themeConfig:["themeConfigChangedHandler"]}]);gw([Pe({name:"nylas-event-capacity",stateToProps:new Map([["schedulerConfig.selectedLanguage","selectedLanguage"],["schedulerConfig.themeConfig","themeConfig"]]),eventToProps:{valueChanged:async(a,e)=>{const{valueChanged:t}=a.detail;t&&t(a)}},fireRegisterEvent:!0}),bc("design:type",Function),bc("design:paramtypes",[]),bc("design:returntype",void 0)],Nf.prototype,"render",null);function Dr(){if(typeof customElements>"u")return;["nylas-event-capacity","info-icon","input-component","tooltip-component"].forEach(e=>{switch(e){case"nylas-event-capacity":customElements.get(e)||customElements.define(e,Nf);break;case"info-icon":customElements.get(e)||Ke();break;case"input-component":customElements.get(e)||Ft();break;case"tooltip-component":customElements.get(e)||Qe();break}})}const yw=':host{display:block;height:auto;--nylas-primary:#2563eb;--nylas-error:#cc4841;--nylas-error-50:#ffeae8;--nylas-error-100:#ffc5bf;--nylas-error-200:#fecaca;--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:100%}.nylas-event-description{display:flex;flex-direction:column;gap:4px;position:relative;color:var(--nylas-base-900)}.nylas-event-description label{display:flex;color:var(--nylas-base-800, #293056);font-size:14px;font-style:normal;font-weight:400;line-height:150%;word-break:break-word;overflow-wrap:break-word;flex-direction:column;gap:4px;font-family:var(--nylas-font-family)}.nylas-event-description label.error{color:var(--nylas-error)}.nylas-event-description label span.required{color:var(--nylas-error);padding:0 0.25rem}.nylas-event-description label p{margin:0;display:flex;align-items:center}.nylas-event-description label span.label-icon{margin-left:4px}.nylas-event-description label span.label-icon tooltip-component{display:flex}.nylas-event-description textarea{padding:12px 16px;border-width:1;resize:vertical;border-radius:8px;font-family:var(--nylas-font-family);font-size:16px;line-height:24px;border:1px solid var(--nylas-base-200)}.nylas-event-description textarea::-webkit-resizer{display:none}.nylas-event-description div.event-description{border-radius:var(--nylas-border-radius-2x);border:1px solid var(--nylas-base-300);background:var(--nylas-base-0);width:-webkit-fill-available;min-height:50px;padding:12px 16px;overflow-y:auto;white-space:pre-wrap;line-height:1.5;scrollbar-width:thin;color:var(--nylas-base-900);font-family:var(--nylas-font-family);font-size:16px;font-style:normal;font-weight:400;-webkit-text-fill-color:var(--nylas-base-900);display:block;}.nylas-event-description div.event-description::-webkit-scrollbar{width:6px;height:6px}.nylas-event-description div.event-description:focus{color:var(--nylas-base-900);-webkit-text-fill-color:var(--nylas-base-900);outline:2px solid var(--nylas-primary);outline-offset:2px}.nylas-event-description div.event-description:focus-visible{color:var(--nylas-base-900);-webkit-text-fill-color:var(--nylas-base-900);outline:2px solid var(--nylas-primary);outline-offset:2px}.nylas-event-description div.event-description.error{border-color:var(--nylas-error);border-width:2px}.nylas-event-description span.add-additional-fields{display:flex;align-items:center;gap:8px}.nylas-event-description span.add-additional-fields button-component button{height:35px;background-color:var(--nylas-base-0)}.nylas-event-description span.help-text{display:inline-flex;align-items:center;gap:4px;color:var(--nylas-base-500);font-size:14px;font-style:normal;font-weight:400;line-height:21px;position:relative}.nylas-event-description span.help-text span.label-icon{display:inline-flex;align-items:center;flex-shrink:0}.nylas-event-description span.help-text span.label-icon tooltip-component{display:flex}.nylas-event-description span.help-text span.label-icon tooltip-component::part(tc__container){position:unset}.nylas-event-description span.help-text span.label-icon tooltip-component::part(tc__content){position:absolute;top:4px;left:50%;transform:translateX(-50%)}.nylas-event-description .highlighted-tag{background-color:var(--nylas-base-200);border-radius:var(--nylas-border-radius);padding:2px 5px;margin-left:4px;margin-bottom:4px;display:inline-block;vertical-align:baseline}.nylas-event-description .token-options{display:block;background-color:var(--nylas-base-0);width:100%;max-height:336px;margin-top:28px;overflow:auto;z-index:1;border-radius:4px;position:absolute;bottom:108px;box-shadow:0px 4px 6px -2px rgba(0, 0, 0, 0.0509803922);box-shadow:0px 10px 15px -3px rgba(0, 0, 0, 0.1019607843)}@media screen and (max-width: 768px){.nylas-event-description .token-options{right:0;width:325px;max-width:unset}}.nylas-event-description .token-options ul{padding:0;list-style-type:none;color:var(--nylas-base-900);max-height:336px;margin:0}.nylas-event-description .token-options ul li{padding:16px, 12px, 16px, 12px;color:var(--nylas-base-900);padding:12px 16px;text-decoration:none;display:block;font-family:inherit;font-size:14px;font-weight:400;line-height:20px;letter-spacing:0px;text-align:left;cursor:pointer}.nylas-event-description .token-options ul li .token-label{display:flex;flex-direction:column;font-weight:400}.nylas-event-description .token-options ul li .token-label .token{color:var(--nylas-abse-900);font-size:16px;line-height:24px}.nylas-event-description .token-options ul li .token-label .description{color:var(--nylas-base-600);font-size:14px;line-height:21px}.nylas-event-description .token-options ul li:hover,.nylas-event-description .token-options ul li:focus,.nylas-event-description .token-options ul li:active,.nylas-event-description .token-options ul li.active{background-color:var(--nylas-base-100)}.nylas-event-description .token-options ul li:hover .token-label .token,.nylas-event-description .token-options ul li:focus .token-label .token,.nylas-event-description .token-options ul li:active .token-label .token,.nylas-event-description .token-options ul li.active .token-label .token{color:var(--nylas-primary)}.nylas-event-description .token-options .selected{background-color:var(--nylas-base-100)}';var bw=function(a,e,t,i){var o=arguments.length,s=o<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,l;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(a,e,t,i);else for(var f=a.length-1;f>=0;f--)(l=a[f])&&(s=(o<3?l(s):o>3?l(e,t,s):l(e,t))||s);return o>3&&s&&Object.defineProperty(e,t,s),s},vc=function(a,e){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(a,e)};const $f=n.proxyCustomElement(class extends n.H{constructor(){super(),this.__registerHost(),this.__attachShadow(),this.valueChanged=n.createEvent(this,"valueChanged",7),this.internals=this.attachInternals(),this.eventDescription=this.selectedConfiguration?.event_booking?.description,this.name="description",this.hideAutoPopulateButton=!1,this.noTemplates=!1,this.description=this.eventDescription||this.selectedConfiguration?.event_booking?.description||"",this.showTokens=!1,this.availableTokens=n.EVENT_TITLE_TOKENS.map(e=>({label:e.token,value:e.value,labelHTML:e})),this.filteredTokens=this.availableTokens,this.ariaActivedescendant="",this.currentWord={$value:"",fullText:"",index:-1,focusOffset:-1},this.validationError="",this.additionalFieldTokens=[]}elementNameChangedHandler(e){n.debug("nylas-event-description","elementNameChangedHandler",e),this.host.setAttribute("name",e)}selectedConfigurationChangedHandler(e){n.debug("nylas-custom-booking-flow","selectedConfigurationChangedHandler",e);const t=e?.event_booking?.description||this.eventDescription||"",i=e?.scheduler?.additional_fields||{},s=(Object.keys(i)||[]).map(l=>({token:`$${l}`,value:`\${${l}}`,description:i[l].label||""}));this.additionalFieldTokens=[...s],this.availableTokens=[...n.EVENT_TITLE_TOKENS,...s].map(l=>({label:l.token,value:l.value,labelHTML:l})),this.filteredTokens=[...this.availableTokens],this.description=t,t&&this.updateEventDescriptionFromProp(t)}selectedLanguageChangedHandler(e,t){if(e===t)return;n.instance.changeLanguage(e);const i={$invitee:"invitee",$invitee_email:"inviteeEmail",$duration:"duration"};this.availableTokens=this.availableTokens.map(o=>(i[o.label]&&(o.labelHTML.description=n.instance.t(`nylasEventTitle.eventTitleTokenDescription.${i[o.label]}`)),o)),this.filteredTokens=[...this.availableTokens]}themeConfigChangedHandler(e,t){e!==t&&this.applyThemeConfig(e)}applyThemeConfig(e){if(e)for(const[t,i]of Object.entries(e))this.host.style.setProperty(`${t}`,i)}connectedCallback(){n.debug("nylas-event-description","connectedCallback"),queueMicrotask(()=>{this.themeConfig&&(this.applyThemeConfig(this.themeConfig),this.host.setAttribute("data-themed",""))})}componentWillLoad(){n.debug("nylas-event-description","componentWillLoad"),this.host.setAttribute("name",this.name)}componentDidLoad(){n.debug("nylas-event-description","componentDidLoad"),this.selectedConfiguration?this.selectedConfigurationChangedHandler(this.selectedConfiguration):(this.description=this.eventDescription||"",this.updateEventDescriptionFromProp(this.description))}disconnectedCallback(){n.debug("nylas-event-description","disconnectedCallback")}valueChangedHandler(e){const{name:t,value:i}=e.detail;if(t==="additional-fields"){const o=JSON.parse(i.toString()),l=(Object.keys(o)||[]).map(f=>({token:`$${f}`,value:`\${${f}}`,description:o[f].label||""}));this.additionalFieldTokens=[...l],this.availableTokens=[...n.EVENT_TITLE_TOKENS,...l].map(f=>({label:f.token,value:f.value,labelHTML:f})),this.filteredTokens=[...this.availableTokens]}}updateEventDescriptionFromProp(e){n.debug("nylas-event-description","updateEventDescriptionFromProp",e);const t=e||this.description;this.descriptionRef&&(this.descriptionRef.innerHTML=this.highlightTokens(t))}highlightTokens(e){let t=e;return[...n.EVENT_TITLE_TOKENS,...this.additionalFieldTokens].forEach(i=>{const o=i.value,s=new RegExp(`(\\${o})(?!\\w)`,"g");t=t?.replace(s,'<span class="highlighted-tag">$1</span>')||""}),t}getCurrentSelectionForBrowser(){const e=(o,s,l,f)=>{const h=o.replace(/[\u200B-\u200D\uFEFF]/g,""),m=h.lastIndexOf("$"),g=h.substring(m).split(" ")[0];return{focusOffset:s,dollarIndex:m,lastWord:g,currentText:h,node:l,allSelected:f}},t=o=>o.anchorOffset===0&&o.focusOffset===o.focusNode?.nodeValue?.length;switch(n.getBrowser()){case"Edge (Chromium)":case"Chrome":{const o=this.host.shadowRoot?.getSelection(),s=o?.focusNode,l=s?.nodeValue||"",f=o&&t(o);return e(l,o?.focusOffset||-1,s,f)}case"Firefox":{const o=document.getSelection(),s=o?.anchorNode?.nodeValue||"",l=o&&t(o);return e(s,o?.focusOffset||-1,o?.anchorNode,l)}case"Safari":{const o=window.getSelection(),s=o?.getComposedRanges(this.host.shadowRoot)[0],l=s?.startContainer?.nodeValue||"",f=o&&t(o);return e(l,s?.endOffset||-1,s?.startContainer,f)}default:return n.debug("Browser not supported"),null}}handleChange(e){let t=e.target.textContent||"";t=n.sanitize(t);const i=this.getCurrentSelectionForBrowser();if(!i){this.updateEventDescription(t),this.resetDropdown();return}const{focusOffset:o,dollarIndex:s,lastWord:l,currentText:f}=i;if(s===-1||o<s){this.updateEventDescription(t),this.resetDropdown();return}l.startsWith("$")?(this.showTokens=!0,this.currentWord={$value:l,fullText:f,index:s,focusOffset:o},this.populateSuggestionsDropdown(l)):this.resetDropdown(),this.updateEventDescription(t)}handleInputKeyDown(e){const t=this.getCurrentSelectionForBrowser();if(t?.allSelected&&!n.isNonPrintableKey(e)&&(this.descriptionRef.innerHTML=""),e.key==="Enter"){e.preventDefault();const i=this.host.shadowRoot?.getElementById(this.ariaActivedescendant);if(i)i.click(),this.ariaActivedescendant="";else{const o=t?.node,s=t?.focusOffset||0;if(!o||s===-1||this.descriptionRef.childNodes.length===0){const l=document.createTextNode(`
|
|
483
|
+
`,a&&e.setAttribute("nonce",a),e}function uw({hooks:a}){return function({onBeforeScreenshot:t,onScreenshot:i,onAfterScreenshot:o,onError:s}){a.useEffect(()=>{(async()=>{t();const f=await no.mediaDevices.getDisplayMedia({video:{width:jn.innerWidth*jn.devicePixelRatio,height:jn.innerHeight*jn.devicePixelRatio},audio:!1,monitorTypeSurfaces:"exclude",preferCurrentTab:!0,selfBrowserSurface:"include",surfaceSwitching:"exclude"}),h=mt.createElement("video");await new Promise((m,g)=>{h.srcObject=f,h.onloadedmetadata=()=>{i(h),f.getTracks().forEach(b=>b.stop()),m()},h.play().catch(g)}),o()})().catch(s)},[])}}const mn="/home/runner/work/sentry-javascript/sentry-javascript/packages/feedback/src/screenshot/components/ScreenshotEditor.tsx",ao=30,Jn=3,ua=ao+Jn,Kt=jn.devicePixelRatio,Xi=a=>({x:Math.min(a.startX,a.endX),y:Math.min(a.startY,a.endY),width:Math.abs(a.startX-a.endX),height:Math.abs(a.startY-a.endY)}),yc=a=>{const e=a.clientHeight,t=a.clientWidth,i=a.width/a.height;let o=e*i,s=e;o>t&&(o=t,s=t/i);const l=(t-o)/2,f=(e-s)/2;return{startX:l,startY:f,endX:o+l,endY:s+f}};function hw({h:a,hooks:e,imageBuffer:t,dialog:i,options:o}){const s=uw({hooks:e});return function({onError:f}){const h=e.useMemo(()=>({__html:fw(o.styleNonce).innerText}),[]),m=dw({h:a}),g=e.useRef(null),b=e.useRef(null),T=e.useRef(null),[x,H]=e.useState({startX:0,startY:0,endX:0,endY:0}),[V,U]=e.useState(!1),[X,q]=e.useState(!1);e.useEffect(()=>{jn.addEventListener("resize",de,!1)},[]);function de(){const re=T.current,he=Xi(yc(t));if(re){re.width=he.width*Kt,re.height=he.height*Kt,re.style.width=`${he.width}px`,re.style.height=`${he.height}px`;const ue=re.getContext("2d");ue&&ue.scale(Kt,Kt)}const ye=b.current;ye&&(ye.style.width=`${he.width}px`,ye.style.height=`${he.height}px`),H({startX:0,startY:0,endX:he.width,endY:he.height})}e.useEffect(()=>{const re=T.current;if(!re)return;const he=re.getContext("2d");if(!he)return;const ye=Xi(yc(t)),ue=Xi(x);he.clearRect(0,0,ye.width,ye.height),he.fillStyle="rgba(0, 0, 0, 0.5)",he.fillRect(0,0,ye.width,ye.height),he.clearRect(ue.x,ue.y,ue.width,ue.height),he.strokeStyle="#ffffff",he.lineWidth=3,he.strokeRect(ue.x+1,ue.y+1,ue.width-2,ue.height-2),he.strokeStyle="#000000",he.lineWidth=1,he.strokeRect(ue.x+3,ue.y+3,ue.width-6,ue.height-6)},[x]);function ge(re,he){U(!1),q(!0);const ye=De(he),ue=()=>{mt.removeEventListener("mousemove",ye),mt.removeEventListener("mouseup",ue),U(!0),q(!1)};mt.addEventListener("mouseup",ue),mt.addEventListener("mousemove",ye)}const De=e.useCallback(re=>function(he){if(!T.current)return;const ye=T.current,ue=ye.getBoundingClientRect(),we=he.clientX-ue.x,Ae=he.clientY-ue.y;switch(re){case"top-left":H(Re=>({...Re,startX:Math.min(Math.max(0,we),Re.endX-ua),startY:Math.min(Math.max(0,Ae),Re.endY-ua)}));break;case"top-right":H(Re=>({...Re,endX:Math.max(Math.min(we,ye.width/Kt),Re.startX+ua),startY:Math.min(Math.max(0,Ae),Re.endY-ua)}));break;case"bottom-left":H(Re=>({...Re,startX:Math.min(Math.max(0,we),Re.endX-ua),endY:Math.max(Math.min(Ae,ye.height/Kt),Re.startY+ua)}));break;case"bottom-right":H(Re=>({...Re,endX:Math.max(Math.min(we,ye.width/Kt),Re.startX+ua),endY:Math.max(Math.min(Ae,ye.height/Kt),Re.startY+ua)}));break}},[]),ke=e.useRef({initialX:0,initialY:0});function xe(re){if(X)return;ke.current={initialX:re.clientX,initialY:re.clientY};const he=ue=>{const we=T.current;if(!we)return;const Ae=ue.clientX-ke.current.initialX,Re=ue.clientY-ke.current.initialY;H(je=>{const $e=Math.max(0,Math.min(je.startX+Ae,we.width/Kt-(je.endX-je.startX))),ze=Math.max(0,Math.min(je.startY+Re,we.height/Kt-(je.endY-je.startY))),Be=$e+(je.endX-je.startX),R=ze+(je.endY-je.startY);return ke.current.initialX=ue.clientX,ke.current.initialY=ue.clientY,{startX:$e,startY:ze,endX:Be,endY:R}})},ye=()=>{mt.removeEventListener("mousemove",he),mt.removeEventListener("mouseup",ye)};mt.addEventListener("mousemove",he),mt.addEventListener("mouseup",ye)}function ve(){const re=mt.createElement("canvas"),he=Xi(yc(t)),ye=Xi(x);re.width=ye.width*Kt,re.height=ye.height*Kt;const ue=re.getContext("2d");ue&&t&&ue.drawImage(t,ye.x/he.width*t.width,ye.y/he.height*t.height,ye.width/he.width*t.width,ye.height/he.height*t.height,0,0,re.width,re.height);const we=t.getContext("2d");we&&(we.clearRect(0,0,t.width,t.height),t.width=re.width,t.height=re.height,t.style.width=`${ye.width}px`,t.style.height=`${ye.height}px`,we.drawImage(re,0,0),de())}return s({onBeforeScreenshot:e.useCallback(()=>{i.el.style.display="none"},[]),onScreenshot:e.useCallback(re=>{const he=t.getContext("2d");if(!he)throw new Error("Could not get canvas context");t.width=re.videoWidth,t.height=re.videoHeight,t.style.width="100%",t.style.height="100%",he.drawImage(re,0,0)},[t]),onAfterScreenshot:e.useCallback(()=>{i.el.style.display="block";const re=g.current;re&&re.appendChild(t),de()},[]),onError:e.useCallback(re=>{i.el.style.display="block",f(re)},[])}),a("div",{class:"editor",__self:this,__source:{fileName:mn,lineNumber:315}},a("style",{nonce:o.styleNonce,dangerouslySetInnerHTML:h,__self:this,__source:{fileName:mn,lineNumber:316}}),a("div",{class:"editor__canvas-container",ref:g,__self:this,__source:{fileName:mn,lineNumber:317}},a("div",{class:"editor__crop-container",style:{position:"absolute",zIndex:1},ref:b,__self:this,__source:{fileName:mn,lineNumber:318}},a("canvas",{onMouseDown:xe,style:{position:"absolute",cursor:V?"move":"auto"},ref:T,__self:this,__source:{fileName:mn,lineNumber:319}}),a(m,{left:x.startX-Jn,top:x.startY-Jn,onGrabButton:ge,corner:"top-left",__self:this,__source:{fileName:mn,lineNumber:324}}),a(m,{left:x.endX-ao+Jn,top:x.startY-Jn,onGrabButton:ge,corner:"top-right",__self:this,__source:{fileName:mn,lineNumber:330}}),a(m,{left:x.startX-Jn,top:x.endY-ao+Jn,onGrabButton:ge,corner:"bottom-left",__self:this,__source:{fileName:mn,lineNumber:336}}),a(m,{left:x.endX-ao+Jn,top:x.endY-ao+Jn,onGrabButton:ge,corner:"bottom-right",__self:this,__source:{fileName:mn,lineNumber:342}}),a("div",{style:{left:Math.max(0,x.endX-191),top:Math.max(0,x.endY+8),display:V?"flex":"none"},class:"editor__crop-btn-group",__self:this,__source:{fileName:mn,lineNumber:348}},a("button",{onClick:re=>{re.preventDefault(),T.current&&H({startX:0,startY:0,endX:T.current.width/Kt,endY:T.current.height/Kt}),U(!1)},class:"btn btn--default",__self:this,__source:{fileName:mn,lineNumber:356}},o.cancelButtonLabel),a("button",{onClick:re=>{re.preventDefault(),ve(),U(!1)},class:"btn btn--primary",__self:this,__source:{fileName:mn,lineNumber:373}},o.confirmButtonLabel)))))}}const pw=()=>({name:"FeedbackScreenshot",setupOnce(){},createInput:({h:a,hooks:e,dialog:t,options:i})=>{const o=mt.createElement("canvas");return{input:hw({h:a,hooks:e,imageBuffer:o,dialog:t,options:i}),value:async()=>{const s=await new Promise(l=>{o.toBlob(l,"image/png")});if(s)return{data:new Uint8Array(await s.arrayBuffer()),filename:"screenshot.png",contentType:"application/png"}}}}}),Ff=D9({lazyLoadIntegration:t9,getModalIntegration:()=>lw,getScreenshotIntegration:()=>pw}),oa="2.5.17",mw=':host{display:block;--nylas-primary:#2563eb;--nylas-error:#cc4841;--nylas-error-50:#ffeae8;--nylas-error-100:#ffc5bf;--nylas-error-200:#fecaca;--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-event-capacity{display:flex;flex-direction:column;gap:4px}.nylas-event-capacity label{display:flex;align-items:center;gap:4px;color:var(--nylas-base-800);font-size:16px;font-style:normal;font-weight:400;line-height:150%;}.nylas-event-capacity label span.required{color:var(--nylas-error, #cc4841)}.nylas-event-capacity label span.label-icon{margin-left:4px}.nylas-event-capacity label span.label-icon tooltip-component{display:flex}.nylas-event-capacity label tooltip-component::part(tc__content){left:50px}.nylas-event-capacity__wrapper{display:flex;align-items:center;gap:0.5rem}.nylas-event-capacity__wrapper input-component{width:auto}.nylas-event-capacity__wrapper input-component::part(ic__input){border-width:1;border-radius:8px;border:1px solid var(--nylas-base-200);font-family:var(--nylas-font-family);font-size:16px;line-height:24px;width:80px}.nylas-event-capacity__wrapper input-component::part(ic__input--error){border:1px solid var(--nylas-error)}.nylas-event-capacity__wrapper input-component::part(ic__label--error){position:relative;margin-bottom:24px}.nylas-event-capacity__wrapper input-component::part(ic__error_message){position:absolute;top:54px;width:max-content}.nylas-event-capacity__wrapper span.attendees.error{margin-top:-24px}';var gw=function(a,e,t,i){var o=arguments.length,s=o<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,l;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(a,e,t,i);else for(var f=a.length-1;f>=0;f--)(l=a[f])&&(s=(o<3?l(s):o>3?l(e,t,s):l(e,t))||s);return o>3&&s&&Object.defineProperty(e,t,s),s},bc=function(a,e){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(a,e)};const Nf=n.proxyCustomElement(class extends n.H{constructor(){super(),this.__registerHost(),this.__attachShadow(),this.valueChanged=n.createEvent(this,"valueChanged",7),this.internals=this.attachInternals(),this.name="event-capacity",this.error=""}connectedCallback(){n.debug("nylas-event-capacity","connectedCallback"),queueMicrotask(()=>{this.themeConfig&&(this.applyThemeConfig(this.themeConfig),this.host.setAttribute("data-themed",""))})}disconnectedCallback(){n.debug("nylas-event-capacity","disconnectedCallback")}componentWillLoad(){n.debug("nylas-event-capacity","componentWillLoad"),this.host.setAttribute("name",this.name)}componentDidLoad(){n.debug("nylas-event-capacity","componentDidLoad"),this.selectedEventCapacity=this.capacity||10,n.debug("selectedEventCapacity",this.selectedEventCapacity),this.internals.setFormValue(this.selectedEventCapacity.toString(),this.name)}componentWillUpdate(){n.debug("nylas-event-capacity","componentWillUpdate")}componentDidUpdate(){n.debug("nylas-event-capacity","componentDidUpdate")}componentWillRender(){n.debug("nylas-event-capacity","componentWillRender")}componentDidRender(){n.debug("nylas-event-capacity","componentDidRender")}elementNameChangedHandler(e){n.debug("nylas-event-capacity","elementNameChangedHandler",e),this.host.setAttribute("name",e)}selectedLanguageChangedHandler(e,t){e!==t&&n.instance.changeLanguage(e)}themeConfigChangedHandler(e,t){e!==t&&this.applyThemeConfig(e)}applyThemeConfig(e){if(e)for(const[t,i]of Object.entries(e))this.host.style.setProperty(`${t}`,i)}async nylasFormInputChangeHandler(e){const{name:t,value:i}=e.detail;if(t==="event-capacity"){const o=parseInt(i);if(o<1||o>500||isNaN(o)){this.error=n.instance.t("fixFormErrors"),this.internals.setValidity({customError:!0},this.error),this.valueChanged.emit({value:i.toString(),name:this.name});return}this.error="",this.internals.setValidity({customError:!1},""),this.selectedEventCapacity=parseInt(i),this.internals.setFormValue(i.toString(),this.name),this.valueChanged.emit({value:i.toString(),name:this.name})}}render(){const e=typeof this.selectedEventCapacity<"u";return n.h(n.Host,{key:"e6f85aecbbaeb832787d15467665948bbee0fa13"},n.h("div",{key:"8406843a2c85f91293d9d3291cc62b470da54061",class:"nylas-event-capacity",part:"necapacity"},n.h("label",{key:"08e23312963f34e9d99438cfae812f69d6db4e15",htmlFor:"event-capacity"},n.h("span",{key:"a84786122c2f2320e124bc7056baa85a5df16893"},n.instance.t("nylasEventCapacity.headerTitle"),n.h("span",{key:"ba7612dff5ec1a4da53e4f53e2b43ef63e2dbf98",class:"required"},"*")),n.h("tooltip-component",{key:"b9173e544830ee9ffed7a882d2e6de0462575fc6"},n.h("info-icon",{key:"a79509157d703b8dae4b8ea630145fd84a8d0c0d",slot:"tooltip-icon"}),n.h("span",{key:"da53d6f901cfedbbb9cf414a112cb70bdb6bf753",slot:"tooltip-content"},n.instance.t("nylasEventCapacity.tooltip.desc")))),e&&n.h("div",{key:"7fc33974040384dcbdfe79fd60d60b76526dd424",class:"nylas-event-capacity__wrapper"},n.h("input-component",{key:"4f1e8a5d7b540ab99cdcfa91b83b0bbdc7fe715b",name:"event-capacity",id:"event-capacity",type:"number",pattern:/^[0-9]*$/,patternError:n.instance.t("invalidInputFormat",{field:"Event capacity"}),minValue:1,maxValue:500,required:!1,exportparts:"ic_input: necapacity__input-textfield",defaultValue:typeof this.selectedEventCapacity=="number"?this.selectedEventCapacity.toString():"10",themeConfig:this.themeConfig}),n.h("span",{key:"f3a0d94ff47122899c3ab475ac66e388efa43a54",class:this.error?"attendees error":"attendees"},n.instance.t("nylasEventCapacity.attendees")))))}static get formAssociated(){return!0}get host(){return this}static get watchers(){return{name:["elementNameChangedHandler"],selectedLanguage:["selectedLanguageChangedHandler"],themeConfig:["themeConfigChangedHandler"]}}static get style(){return mw}},[321,"nylas-event-capacity",{name:[1],capacity:[2],selectedLanguage:[1,"selected-language"],themeConfig:[16,"theme-config"],selectedEventCapacity:[32],error:[32]},[[0,"nylasFormInputChanged","nylasFormInputChangeHandler"]],{name:["elementNameChangedHandler"],selectedLanguage:["selectedLanguageChangedHandler"],themeConfig:["themeConfigChangedHandler"]}]);gw([Pe({name:"nylas-event-capacity",stateToProps:new Map([["schedulerConfig.selectedLanguage","selectedLanguage"],["schedulerConfig.themeConfig","themeConfig"]]),eventToProps:{valueChanged:async(a,e)=>{const{valueChanged:t}=a.detail;t&&t(a)}},fireRegisterEvent:!0}),bc("design:type",Function),bc("design:paramtypes",[]),bc("design:returntype",void 0)],Nf.prototype,"render",null);function Dr(){if(typeof customElements>"u")return;["nylas-event-capacity","info-icon","input-component","tooltip-component"].forEach(e=>{switch(e){case"nylas-event-capacity":customElements.get(e)||customElements.define(e,Nf);break;case"info-icon":customElements.get(e)||Ke();break;case"input-component":customElements.get(e)||Ft();break;case"tooltip-component":customElements.get(e)||Qe();break}})}const yw=':host{display:block;height:auto;--nylas-primary:#2563eb;--nylas-error:#cc4841;--nylas-error-50:#ffeae8;--nylas-error-100:#ffc5bf;--nylas-error-200:#fecaca;--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:100%}.nylas-event-description{display:flex;flex-direction:column;gap:4px;position:relative;color:var(--nylas-base-900)}.nylas-event-description label{display:flex;color:var(--nylas-base-800, #293056);font-size:14px;font-style:normal;font-weight:400;line-height:150%;word-break:break-word;overflow-wrap:break-word;flex-direction:column;gap:4px;font-family:var(--nylas-font-family)}.nylas-event-description label.error{color:var(--nylas-error)}.nylas-event-description label span.required{color:var(--nylas-error);padding:0 0.25rem}.nylas-event-description label p{margin:0;display:flex;align-items:center}.nylas-event-description label span.label-icon{margin-left:4px}.nylas-event-description label span.label-icon tooltip-component{display:flex}.nylas-event-description textarea{padding:12px 16px;border-width:1;resize:vertical;border-radius:8px;font-family:var(--nylas-font-family);font-size:16px;line-height:24px;border:1px solid var(--nylas-base-200)}.nylas-event-description textarea::-webkit-resizer{display:none}.nylas-event-description div.event-description{border-radius:var(--nylas-border-radius-2x);border:1px solid var(--nylas-base-300);background:var(--nylas-base-0);width:-webkit-fill-available;min-height:50px;padding:12px 16px;overflow-y:auto;white-space:pre-wrap;line-height:1.5;scrollbar-width:thin;color:var(--nylas-base-900);font-family:var(--nylas-font-family);font-size:16px;font-style:normal;font-weight:400;-webkit-text-fill-color:var(--nylas-base-900);display:block;}.nylas-event-description div.event-description::-webkit-scrollbar{width:6px;height:6px}.nylas-event-description div.event-description:focus{color:var(--nylas-base-900);-webkit-text-fill-color:var(--nylas-base-900);outline:2px solid var(--nylas-primary);outline-offset:2px}.nylas-event-description div.event-description:focus-visible{color:var(--nylas-base-900);-webkit-text-fill-color:var(--nylas-base-900);outline:2px solid var(--nylas-primary);outline-offset:2px}.nylas-event-description div.event-description.error{border-color:var(--nylas-error);border-width:2px}.nylas-event-description span.add-additional-fields{display:flex;align-items:center;gap:8px}.nylas-event-description span.add-additional-fields button-component button{height:35px;background-color:var(--nylas-base-0)}.nylas-event-description span.help-text{display:inline-flex;align-items:center;gap:4px;color:var(--nylas-base-500);font-size:14px;font-style:normal;font-weight:400;line-height:21px;position:relative}.nylas-event-description span.help-text span.label-icon{display:inline-flex;align-items:center;flex-shrink:0}.nylas-event-description span.help-text span.label-icon tooltip-component{display:flex}.nylas-event-description span.help-text span.label-icon tooltip-component::part(tc__container){position:unset}.nylas-event-description span.help-text span.label-icon tooltip-component::part(tc__content){position:absolute;top:4px;left:50%;transform:translateX(-50%)}.nylas-event-description .highlighted-tag{background-color:var(--nylas-base-200);border-radius:var(--nylas-border-radius);padding:2px 5px;margin-left:4px;margin-bottom:4px;display:inline-block;vertical-align:baseline}.nylas-event-description .token-options{display:block;background-color:var(--nylas-base-0);width:100%;max-height:336px;margin-top:28px;overflow:auto;z-index:1;border-radius:4px;position:absolute;bottom:108px;box-shadow:0px 4px 6px -2px rgba(0, 0, 0, 0.0509803922);box-shadow:0px 10px 15px -3px rgba(0, 0, 0, 0.1019607843)}@media screen and (max-width: 768px){.nylas-event-description .token-options{right:0;width:325px;max-width:unset}}.nylas-event-description .token-options ul{padding:0;list-style-type:none;color:var(--nylas-base-900);max-height:336px;margin:0}.nylas-event-description .token-options ul li{padding:16px, 12px, 16px, 12px;color:var(--nylas-base-900);padding:12px 16px;text-decoration:none;display:block;font-family:inherit;font-size:14px;font-weight:400;line-height:20px;letter-spacing:0px;text-align:left;cursor:pointer}.nylas-event-description .token-options ul li .token-label{display:flex;flex-direction:column;font-weight:400}.nylas-event-description .token-options ul li .token-label .token{color:var(--nylas-abse-900);font-size:16px;line-height:24px}.nylas-event-description .token-options ul li .token-label .description{color:var(--nylas-base-600);font-size:14px;line-height:21px}.nylas-event-description .token-options ul li:hover,.nylas-event-description .token-options ul li:focus,.nylas-event-description .token-options ul li:active,.nylas-event-description .token-options ul li.active{background-color:var(--nylas-base-100)}.nylas-event-description .token-options ul li:hover .token-label .token,.nylas-event-description .token-options ul li:focus .token-label .token,.nylas-event-description .token-options ul li:active .token-label .token,.nylas-event-description .token-options ul li.active .token-label .token{color:var(--nylas-primary)}.nylas-event-description .token-options .selected{background-color:var(--nylas-base-100)}';var bw=function(a,e,t,i){var o=arguments.length,s=o<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,l;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(a,e,t,i);else for(var f=a.length-1;f>=0;f--)(l=a[f])&&(s=(o<3?l(s):o>3?l(e,t,s):l(e,t))||s);return o>3&&s&&Object.defineProperty(e,t,s),s},vc=function(a,e){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(a,e)};const $f=n.proxyCustomElement(class extends n.H{constructor(){super(),this.__registerHost(),this.__attachShadow(),this.valueChanged=n.createEvent(this,"valueChanged",7),this.internals=this.attachInternals(),this.eventDescription=this.selectedConfiguration?.event_booking?.description,this.name="description",this.hideAutoPopulateButton=!1,this.noTemplates=!1,this.description=this.eventDescription||this.selectedConfiguration?.event_booking?.description||"",this.showTokens=!1,this.availableTokens=n.EVENT_TITLE_TOKENS.map(e=>({label:e.token,value:e.value,labelHTML:e})),this.filteredTokens=this.availableTokens,this.ariaActivedescendant="",this.currentWord={$value:"",fullText:"",index:-1,focusOffset:-1},this.validationError="",this.additionalFieldTokens=[]}elementNameChangedHandler(e){n.debug("nylas-event-description","elementNameChangedHandler",e),this.host.setAttribute("name",e)}selectedConfigurationChangedHandler(e){n.debug("nylas-custom-booking-flow","selectedConfigurationChangedHandler",e);const t=e?.event_booking?.description||this.eventDescription||"",i=e?.scheduler?.additional_fields||{},s=(Object.keys(i)||[]).map(l=>({token:`$${l}`,value:`\${${l}}`,description:i[l].label||""}));this.additionalFieldTokens=[...s],this.availableTokens=[...n.EVENT_TITLE_TOKENS,...s].map(l=>({label:l.token,value:l.value,labelHTML:l})),this.filteredTokens=[...this.availableTokens],this.description=t,t&&this.updateEventDescriptionFromProp(t)}selectedLanguageChangedHandler(e,t){if(e===t)return;n.instance.changeLanguage(e);const i={$invitee:"invitee",$invitee_email:"inviteeEmail",$duration:"duration"};this.availableTokens=this.availableTokens.map(o=>(i[o.label]&&(o.labelHTML.description=n.instance.t(`nylasEventTitle.eventTitleTokenDescription.${i[o.label]}`)),o)),this.filteredTokens=[...this.availableTokens]}themeConfigChangedHandler(e,t){e!==t&&this.applyThemeConfig(e)}applyThemeConfig(e){if(e)for(const[t,i]of Object.entries(e))this.host.style.setProperty(`${t}`,i)}connectedCallback(){n.debug("nylas-event-description","connectedCallback"),queueMicrotask(()=>{this.themeConfig&&(this.applyThemeConfig(this.themeConfig),this.host.setAttribute("data-themed",""))})}componentWillLoad(){n.debug("nylas-event-description","componentWillLoad"),this.host.setAttribute("name",this.name)}componentDidLoad(){n.debug("nylas-event-description","componentDidLoad"),this.selectedConfiguration?this.selectedConfigurationChangedHandler(this.selectedConfiguration):(this.description=this.eventDescription||"",this.updateEventDescriptionFromProp(this.description))}disconnectedCallback(){n.debug("nylas-event-description","disconnectedCallback")}valueChangedHandler(e){const{name:t,value:i}=e.detail;if(t==="additional-fields"){const o=JSON.parse(i.toString()),l=(Object.keys(o)||[]).map(f=>({token:`$${f}`,value:`\${${f}}`,description:o[f].label||""}));this.additionalFieldTokens=[...l],this.availableTokens=[...n.EVENT_TITLE_TOKENS,...l].map(f=>({label:f.token,value:f.value,labelHTML:f})),this.filteredTokens=[...this.availableTokens]}}updateEventDescriptionFromProp(e){n.debug("nylas-event-description","updateEventDescriptionFromProp",e);const t=e||this.description;this.descriptionRef&&(this.descriptionRef.innerHTML=this.highlightTokens(t))}highlightTokens(e){let t=e;return[...n.EVENT_TITLE_TOKENS,...this.additionalFieldTokens].forEach(i=>{const o=i.value,s=new RegExp(`(\\${o})(?!\\w)`,"g");t=t?.replace(s,'<span class="highlighted-tag">$1</span>')||""}),t}getCurrentSelectionForBrowser(){const e=(o,s,l,f)=>{const h=o.replace(/[\u200B-\u200D\uFEFF]/g,""),m=h.lastIndexOf("$"),g=h.substring(m).split(" ")[0];return{focusOffset:s,dollarIndex:m,lastWord:g,currentText:h,node:l,allSelected:f}},t=o=>o.anchorOffset===0&&o.focusOffset===o.focusNode?.nodeValue?.length;switch(n.getBrowser()){case"Edge (Chromium)":case"Chrome":{const o=this.host.shadowRoot?.getSelection(),s=o?.focusNode,l=s?.nodeValue||"",f=o&&t(o);return e(l,o?.focusOffset||-1,s,f)}case"Firefox":{const o=document.getSelection(),s=o?.anchorNode?.nodeValue||"",l=o&&t(o);return e(s,o?.focusOffset||-1,o?.anchorNode,l)}case"Safari":{const o=window.getSelection(),s=o?.getComposedRanges(this.host.shadowRoot)[0],l=s?.startContainer?.nodeValue||"",f=o&&t(o);return e(l,s?.endOffset||-1,s?.startContainer,f)}default:return n.debug("Browser not supported"),null}}handleChange(e){let t=e.target.textContent||"";t=n.sanitize(t);const i=this.getCurrentSelectionForBrowser();if(!i){this.updateEventDescription(t),this.resetDropdown();return}const{focusOffset:o,dollarIndex:s,lastWord:l,currentText:f}=i;if(s===-1||o<s){this.updateEventDescription(t),this.resetDropdown();return}l.startsWith("$")?(this.showTokens=!0,this.currentWord={$value:l,fullText:f,index:s,focusOffset:o},this.populateSuggestionsDropdown(l)):this.resetDropdown(),this.updateEventDescription(t)}handleInputKeyDown(e){const t=this.getCurrentSelectionForBrowser();if(t?.allSelected&&!n.isNonPrintableKey(e)&&(this.descriptionRef.innerHTML=""),e.key==="Enter"){e.preventDefault();const i=this.host.shadowRoot?.getElementById(this.ariaActivedescendant);if(i)i.click(),this.ariaActivedescendant="";else{const o=t?.node,s=t?.focusOffset||0;if(!o||s===-1||this.descriptionRef.childNodes.length===0){const l=document.createTextNode(`
|
|
484
484
|
`);this.descriptionRef.insertBefore(l,this.descriptionRef.firstChild);const f=document.createRange();f.setStart(l,1),f.collapse(!0);const h=window.getSelection();h?.removeAllRanges(),h?.addRange(f)}else if(o.nodeType===Node.TEXT_NODE){const l=o.nodeValue||"",f=l.slice(0,s)+`
|
|
485
485
|
`+l.slice(s);o.nodeValue=f;const h=document.createRange();h.setStart(o,s+1),h.collapse(!0);const m=window.getSelection();m?.removeAllRanges(),m?.addRange(h)}this.descriptionRef.focus()}}else if(e.key==="ArrowDown"){this.showTokens&&e.preventDefault();const i=this.host.shadowRoot?.getElementById(this.ariaActivedescendant);if(i){const o=i.nextElementSibling;o?this.ariaActivedescendant=o.id:this.ariaActivedescendant=this.filteredTokens[0].label}else this.ariaActivedescendant=this.filteredTokens[0].label}else if(e.key==="ArrowUp"){this.showTokens&&e.preventDefault();const i=this.host.shadowRoot?.getElementById(this.ariaActivedescendant);if(i){const o=i.previousElementSibling;o?this.ariaActivedescendant=o.id:this.ariaActivedescendant=this.filteredTokens[this.filteredTokens.length-1].label}else this.ariaActivedescendant=this.filteredTokens[this.filteredTokens.length-1].label}else if(e.key==="Escape")e.preventDefault(),this.resetDropdown();else if(e.key==="Backspace"||e.key==="Delete"){const i=t?.node?.parentNode;t?.currentText.startsWith("${")&&i&&i.nodeName==="SPAN"&&(e.preventDefault(),i.removeChild(t.node),i.remove(),this.resetDropdown()),(this.descriptionRef.textContent===""||t?.allSelected)&&(this.descriptionRef.innerHTML="",this.updateEventDescription(""))}}selectOption(e,t){e.preventDefault();const i=this.currentWord.fullText,o=this.currentWord.$value;let s=this.descriptionRef.firstChild,l=null;for(;s;){if(s.nodeType===3){const U=s.textContent?.replace(/[\u200B-\u200D\uFEFF]/g,"")||"",X=i.replace(/[\u200B-\u200D\uFEFF]/g,"");if(U.includes(X)){l=s;break}}s=s.nextSibling}if(!l)return;const f=l.textContent||"",h=f.indexOf(o),m=f.substring(0,h),g=f.substring(h+o.length),b=document.createTextNode(m),T=document.createRange(),x=document.createElement("span");x.classList.add("highlighted-tag"),x.textContent=`${t.value}`;const H=document.createTextNode(g);if(g!=="")l.replaceWith(b,x,H),T.setStart(H,1);else{const U=document.createTextNode("");l.replaceWith(b,x,U),T.setStart(U,1)}this.resetDropdown(),this.descriptionRef.focus();const V=window.getSelection();T.collapse(!0),V?.removeAllRanges(),V?.addRange(T),this.updateEventDescription(this.descriptionRef.textContent||"")}populateSuggestionsDropdown(e=""){this.filteredTokens=this.availableTokens.filter(t=>t.label.startsWith(e.toString())||t.value.startsWith(e.toString())),this.filteredTokens.length>0&&(this.ariaActivedescendant=this.filteredTokens[0].label)}get isInternalsAvailable(){return typeof this.internals<"u"&&typeof this.internals.setValidity=="function"&&typeof this.internals.setFormValue=="function"}updateEventDescription(e){const t=e.replace(/ +/g," ");this.isInternalsAvailable&&this.internals?.setFormValue(t,this.name),this.valueChanged.emit({value:t,name:this.name})}resetDropdown(){this.showTokens=!1,this.ariaActivedescendant=""}getLabelHTML(e){return n.h("div",{class:"token-label"},n.h("span",{class:"token"},e.token),n.h("span",{class:"description"},e.description))}handleAddAdditionalFields(){if(this.additionalFieldTokens.length===0)return;const e=this.descriptionRef.innerHTML,t="--- Additional Fields ---",i="--- End Additional Fields ---",o=e.indexOf(t),s=e.indexOf(i);let l=t+`
|
|
486
486
|
`;this.additionalFieldTokens.forEach(h=>{l+=`${h.description}: ${h.value}
|
|
@@ -521,5 +521,5 @@ ${iw}
|
|
|
521
521
|
*
|
|
522
522
|
* This source code is licensed under the MIT license found in the
|
|
523
523
|
* LICENSE file in the root directory of this source tree.
|
|
524
|
-
*/var Nm;function YS(){if(Nm)return at;Nm=1;var a=Symbol.for("react.element"),e=Symbol.for("react.portal"),t=Symbol.for("react.fragment"),i=Symbol.for("react.strict_mode"),o=Symbol.for("react.profiler"),s=Symbol.for("react.provider"),l=Symbol.for("react.context"),f=Symbol.for("react.forward_ref"),h=Symbol.for("react.suspense"),m=Symbol.for("react.memo"),g=Symbol.for("react.lazy"),b=Symbol.iterator;function T(R){return R===null||typeof R!="object"?null:(R=b&&R[b]||R["@@iterator"],typeof R=="function"?R:null)}var x={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},H=Object.assign,V={};function U(R,E,B){this.props=R,this.context=E,this.refs=V,this.updater=B||x}U.prototype.isReactComponent={},U.prototype.setState=function(R,E){if(typeof R!="object"&&typeof R!="function"&&R!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,R,E,"setState")},U.prototype.forceUpdate=function(R){this.updater.enqueueForceUpdate(this,R,"forceUpdate")};function X(){}X.prototype=U.prototype;function q(R,E,B){this.props=R,this.context=E,this.refs=V,this.updater=B||x}var de=q.prototype=new X;de.constructor=q,H(de,U.prototype),de.isPureReactComponent=!0;var ge=Array.isArray,De=Object.prototype.hasOwnProperty,ke={current:null},xe={key:!0,ref:!0,__self:!0,__source:!0};function ve(R,E,B){var G,oe={},te=null,ce=null;if(E!=null)for(G in E.ref!==void 0&&(ce=E.ref),E.key!==void 0&&(te=""+E.key),E)De.call(E,G)&&!xe.hasOwnProperty(G)&&(oe[G]=E[G]);var fe=arguments.length-2;if(fe===1)oe.children=B;else if(1<fe){for(var Oe=Array(fe),ie=0;ie<fe;ie++)Oe[ie]=arguments[ie+2];oe.children=Oe}if(R&&R.defaultProps)for(G in fe=R.defaultProps,fe)oe[G]===void 0&&(oe[G]=fe[G]);return{$$typeof:a,type:R,key:te,ref:ce,props:oe,_owner:ke.current}}function re(R,E){return{$$typeof:a,type:R.type,key:E,ref:R.ref,props:R.props,_owner:R._owner}}function he(R){return typeof R=="object"&&R!==null&&R.$$typeof===a}function ye(R){var E={"=":"=0",":":"=2"};return"$"+R.replace(/[=:]/g,function(B){return E[B]})}var ue=/\/+/g;function we(R,E){return typeof R=="object"&&R!==null&&R.key!=null?ye(""+R.key):E.toString(36)}function Ae(R,E,B,G,oe){var te=typeof R;(te==="undefined"||te==="boolean")&&(R=null);var ce=!1;if(R===null)ce=!0;else switch(te){case"string":case"number":ce=!0;break;case"object":switch(R.$$typeof){case a:case e:ce=!0}}if(ce)return ce=R,oe=oe(ce),R=G===""?"."+we(ce,0):G,ge(oe)?(B="",R!=null&&(B=R.replace(ue,"$&/")+"/"),Ae(oe,E,B,"",function(ie){return ie})):oe!=null&&(he(oe)&&(oe=re(oe,B+(!oe.key||ce&&ce.key===oe.key?"":(""+oe.key).replace(ue,"$&/")+"/")+R)),E.push(oe)),1;if(ce=0,G=G===""?".":G+":",ge(R))for(var fe=0;fe<R.length;fe++){te=R[fe];var Oe=G+we(te,fe);ce+=Ae(te,E,B,Oe,oe)}else if(Oe=T(R),typeof Oe=="function")for(R=Oe.call(R),fe=0;!(te=R.next()).done;)te=te.value,Oe=G+we(te,fe++),ce+=Ae(te,E,B,Oe,oe);else if(te==="object")throw E=String(R),Error("Objects are not valid as a React child (found: "+(E==="[object Object]"?"object with keys {"+Object.keys(R).join(", ")+"}":E)+"). If you meant to render a collection of children, use an array instead.");return ce}function Re(R,E,B){if(R==null)return R;var G=[],oe=0;return Ae(R,G,"","",function(te){return E.call(B,te,oe++)}),G}function je(R){if(R._status===-1){var E=R._result;E=E(),E.then(function(B){(R._status===0||R._status===-1)&&(R._status=1,R._result=B)},function(B){(R._status===0||R._status===-1)&&(R._status=2,R._result=B)}),R._status===-1&&(R._status=0,R._result=E)}if(R._status===1)return R._result.default;throw R._result}var $e={current:null},ze={transition:null},Be={ReactCurrentDispatcher:$e,ReactCurrentBatchConfig:ze,ReactCurrentOwner:ke};return at.Children={map:Re,forEach:function(R,E,B){Re(R,function(){E.apply(this,arguments)},B)},count:function(R){var E=0;return Re(R,function(){E++}),E},toArray:function(R){return Re(R,function(E){return E})||[]},only:function(R){if(!he(R))throw Error("React.Children.only expected to receive a single React element child.");return R}},at.Component=U,at.Fragment=t,at.Profiler=o,at.PureComponent=q,at.StrictMode=i,at.Suspense=h,at.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=Be,at.cloneElement=function(R,E,B){if(R==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+R+".");var G=H({},R.props),oe=R.key,te=R.ref,ce=R._owner;if(E!=null){if(E.ref!==void 0&&(te=E.ref,ce=ke.current),E.key!==void 0&&(oe=""+E.key),R.type&&R.type.defaultProps)var fe=R.type.defaultProps;for(Oe in E)De.call(E,Oe)&&!xe.hasOwnProperty(Oe)&&(G[Oe]=E[Oe]===void 0&&fe!==void 0?fe[Oe]:E[Oe])}var Oe=arguments.length-2;if(Oe===1)G.children=B;else if(1<Oe){fe=Array(Oe);for(var ie=0;ie<Oe;ie++)fe[ie]=arguments[ie+2];G.children=fe}return{$$typeof:a,type:R.type,key:oe,ref:te,props:G,_owner:ce}},at.createContext=function(R){return R={$$typeof:l,_currentValue:R,_currentValue2:R,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},R.Provider={$$typeof:s,_context:R},R.Consumer=R},at.createElement=ve,at.createFactory=function(R){var E=ve.bind(null,R);return E.type=R,E},at.createRef=function(){return{current:null}},at.forwardRef=function(R){return{$$typeof:f,render:R}},at.isValidElement=he,at.lazy=function(R){return{$$typeof:g,_payload:{_status:-1,_result:R},_init:je}},at.memo=function(R,E){return{$$typeof:m,type:R,compare:E===void 0?null:E}},at.startTransition=function(R){var E=ze.transition;ze.transition={};try{R()}finally{ze.transition=E}},at.unstable_act=function(){throw Error("act(...) is not supported in production builds of React.")},at.useCallback=function(R,E){return $e.current.useCallback(R,E)},at.useContext=function(R){return $e.current.useContext(R)},at.useDebugValue=function(){},at.useDeferredValue=function(R){return $e.current.useDeferredValue(R)},at.useEffect=function(R,E){return $e.current.useEffect(R,E)},at.useId=function(){return $e.current.useId()},at.useImperativeHandle=function(R,E,B){return $e.current.useImperativeHandle(R,E,B)},at.useInsertionEffect=function(R,E){return $e.current.useInsertionEffect(R,E)},at.useLayoutEffect=function(R,E){return $e.current.useLayoutEffect(R,E)},at.useMemo=function(R,E){return $e.current.useMemo(R,E)},at.useReducer=function(R,E,B){return $e.current.useReducer(R,E,B)},at.useRef=function(R){return $e.current.useRef(R)},at.useState=function(R){return $e.current.useState(R)},at.useSyncExternalStore=function(R,E,B){return $e.current.useSyncExternalStore(R,E,B)},at.useTransition=function(){return $e.current.useTransition()},at.version="18.2.0",at}var $m;function ZS(){return $m||($m=1,ad.exports=YS()),ad.exports}ZS();const XS=({authenticationUrl:a,authError:e})=>n.h("div",{class:"login-required",part:"nse__login-required login-component"},n.h("div",{class:"card",part:"nse__login-required-card"},e&&n.h("div",{class:"login-error-banner",part:"nse__login-required-error",role:"alert"},n.h("warning-icon",{width:"16",height:"16"}),n.h("span",null,e)),n.h("p",{part:"nse__login-required-text"},"Log into your account to use the Scheduler Editor."),n.h("button",{class:"google-button",part:"nse__login-required-google-button",onClick:async t=>{t.preventDefault();const i=await a("google");i?window.location.href=i:n.error("[nylas-scheduler-editor] Unable to get authentication URL.")}},n.h("span",{class:"icon"},n.h("google-logo-icon",{width:"15",height:"15"})),"Continue with Google"),n.h("button",{class:"microsoft-button",part:"nse__login-required-microsoft-button",onClick:async t=>{t.preventDefault();const i=await a("microsoft");i?window.location.href=i:n.error("[nylas-scheduler-editor] Unable to get authentication URL.")}},n.h("span",{class:"icon"},n.h("microsoft-logo-icon",{width:"15",height:"15"})),"Continue with Microsoft"),n.h("button",{class:"other-provider-button",part:"nse__login-required-other-provider-button",onClick:async t=>{t.preventDefault();const i=await a();i?window.location.href=i:n.error("[nylas-scheduler-editor] Unable to get authentication URL.")}},"View all providers ",n.h("chevron-icon",{width:"17",height:"17"})),n.h("small",{class:"disclaimer-text",part:"nse__login-required-disclaimer-text"},"* You will be redirected to authenticate your account.")));function zm({currentUser:a,calendars:e,selectedEventType:t}){const i=e?.find(o=>o.is_primary)||e?.[0];switch(t){case n.CONFIGURATION_EVENT_TYPE.one_on_one:case n.CONFIGURATION_EVENT_TYPE.max_availability:case n.CONFIGURATION_EVENT_TYPE.max_fairness:return n.h(n.Fragment,null,n.h("nylas-event-info",null,n.h("div",{slot:"inputs"},n.h("nylas-event-title",null),n.h("nylas-event-duration",null),n.h("nylas-event-location",{userProvider:a.provider}))),n.h("nylas-booking-calendar-picker",{exportparts:"nbcp, nbcp__header, nbcp__dropdown, nbcp__dropdown-button, nbcp__dropdown-content",expressFlow:!0,calendars:e,currentUser:a,defaultBookingCalendar:i?.id}),n.h("nylas-custom-event-slug",{name:"custom-event-slug",exportparts:"nces, nces__body, nces__header, nces__drawer-toggle--container, nces__input-textfield"}));case n.CONFIGURATION_EVENT_TYPE.collective:return n.h(n.Fragment,null,n.h("nylas-event-info",null,n.h("div",{slot:"inputs"},n.h("nylas-event-title",null),n.h("nylas-event-duration",null),n.h("nylas-event-location",{userProvider:a.provider}))),n.h("nylas-booking-calendar-picker",{exportparts:"nbcp, nbcp__header, nbcp__dropdown, nbcp__dropdown-button, nbcp__dropdown-content",expressFlow:!0,calendars:e,currentUser:a,defaultBookingCalendar:i?.id}),n.h("nylas-custom-event-slug",{name:"custom-event-slug",exportparts:"nces, nces__body, nces__header, nces__drawer-toggle--container, nces__input-textfield"}),n.h("nylas-additional-participants",{name:"participants",eventParticipants:[{name:a?.name||a?.email,email:a?.email||"",is_organizer:!0}],exportparts:"nadtnlpart, nadtnlpart__title, nadtnlpart__subtitle, nadtnlpart__content, nadtnlpart__input_group, nadtnlpart__input_wrapper, nadtnlpart__input, nadtnlpart__remove-participant"}));case n.CONFIGURATION_EVENT_TYPE.group:return n.h(n.Fragment,null,n.h("nylas-event-info",null,n.h("div",{slot:"inputs"},n.h("nylas-event-title",{noTemplates:!0}),n.h("nylas-event-description",{noTemplates:!0,hideAutoPopulateButton:!0}),n.h("nylas-event-location",{userProvider:a.provider}),n.h("nylas-event-timeslot",{name:"event-timeslot"}),n.h("nylas-event-capacity",null))),n.h("nylas-booking-calendar-picker",{exportparts:"nbcp, nbcp__header, nbcp__dropdown, nbcp__dropdown-button, nbcp__dropdown-content",expressFlow:!0,calendars:e,currentUser:a,defaultBookingCalendar:i?.id}),n.h("nylas-additional-participants",{name:"participants",eventParticipants:[{name:a?.name||a?.email,email:a?.email||"",is_organizer:!0}],exportparts:"nadtnlpart, nadtnlpart__title, nadtnlpart__subtitle, nadtnlpart__content, nadtnlpart__input_group, nadtnlpart__input_wrapper, nadtnlpart__input, nadtnlpart__remove-participant"}),n.h("nylas-page-name",{requirePageName:!0,pageName:"Group events page"}),n.h("nylas-custom-event-slug",{name:"custom-event-slug",exportparts:"nces, nces__body, nces__header, nces__drawer-toggle--container, nces__input-textfield"}))}}const JS=':host{display:flex;flex-direction:column;overflow:visible;border-radius:var(--nylas-border-radius-2x);width:fit-content;background:var(--nylas-base-0);position:relative;box-shadow:0px 0px 6px -2px rgba(0, 0, 0, 0.05), 0px 5px 15px -3px rgba(0, 0, 0, 0.1);--nylas-primary:#2563eb;--nylas-error:#cc4841;--nylas-error-50:#ffeae8;--nylas-error-100:#ffc5bf;--nylas-error-200:#fecaca;--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}:host nylas-notification{position:absolute;top:0;right:0}@media screen and (max-width: 768px){:host{width:-moz-available;width:-webkit-fill-available;width:fill-available;min-width:325px}}div.scheduler-editor-content{height:800px}@media screen and (max-width: 768px){div.scheduler-editor-content{height:auto}}div.scheduler-editor-content slot[name=login-required]{height:inherit}div.scheduler-editor-content--group{height:800px}@media screen and (max-width: 768px){div.scheduler-editor-content--group{height:auto}}div.scheduler-editor-header{display:grid;grid-template-columns:1fr auto auto;align-items:center;justify-content:space-between;padding:1rem;border-bottom:1px solid var(--nylas-base-200);color:var(--nylas-base-900);min-width:924px}@media screen and (max-width: 768px){div.scheduler-editor-header{width:auto;min-width:calc(325px - 1rem)}}div.scheduler-editor-header h1.scheduler-editor-title{display:flex;align-items:center;gap:0.5rem;margin:0;font-size:18px;line-height:24px;font-weight:600}div.scheduler-editor-header button{background:transparent;border:none;cursor:pointer;color:var(--nylas-base-900)}div.scheduler-editor-header button:hover,div.scheduler-editor-header button:active{color:var(--nylas-primary);background-color:transparent}div.scheduler-editor-header button:disabled{cursor:not-allowed}div.scheduler-editor-header div.language select-dropdown::part(sd_dropdown-button){border:none;padding:4px;margin-right:8px}div.scheduler-editor-header div.language select-dropdown::part(sd_dropdown-button):hover{outline:none;color:var(--nylas-primary)}div.scheduler-editor-header div.language select-dropdown::part(sd_dropdown-content){min-width:132px}@media screen and (max-width: 768px){div.scheduler-editor-header div.language select-dropdown::part(sd_dropdown-content){width:-webkit-fill-available;width:fill-available;width:-moz-available}}nylas-select-event-type{height:inherit;width:calc(924px + 2rem)}@media screen and (max-width: 768px){nylas-select-event-type{width:auto}}nylas-editor-tabs,nylas-editor-tabs-group{width:auto;height:inherit}nylas-editor-tabs .row,nylas-editor-tabs-group .row{display:flex;gap:1rem}nylas-editor-tabs .composable,nylas-editor-tabs-group .composable{height:inherit;overflow:auto}nylas-editor-tabs nylas-event-info div[slot=inputs],nylas-editor-tabs nylas-event-limits div[slot=inputs],nylas-editor-tabs-group nylas-event-info div[slot=inputs],nylas-editor-tabs-group nylas-event-limits div[slot=inputs]{display:flex;flex-direction:column;gap:1rem}.card{display:flex;flex-direction:column;padding:2rem;background-color:var(--nylas-base-0);border:1px solid var(--nylas-base-200);border-radius:5px;color:var(--nylas-base-900);max-width:fit-content;align-self:center}.login-required{height:inherit;overflow-y:auto;display:flex;flex-direction:column;justify-content:center;padding:2rem 1rem;background-color:var(--nylas-base-25);border-radius:var(--nylas-border-radius-2x)}.login-required .login-error-banner{display:flex;align-items:center;gap:0.5rem;padding:0.75rem 1rem;margin-bottom:1rem;background-color:var(--nylas-error-50, #fef2f2);border:1px solid var(--nylas-error-200, #fecaca);border-radius:5px;color:var(--nylas-error-700, #b91c1c);font-size:0.875rem;line-height:1.25rem}.login-required .login-error-banner svg{flex-shrink:0;color:var(--nylas-error-500, #ef4444)}.login-required p{margin:0 0 1rem}.login-required .microsoft-button,.login-required .google-button{height:48px;border:1px solid var(--nylas-base-300);border-radius:var(--nylas-border-radius-2x);font-size:16px;line-height:24px;padding:0 1rem;background-color:var(--nylas-base-0);font-weight:600;cursor:pointer;display:flex;margin-bottom:1rem;background-color:var(--nylas-base-0);border:1px solid var(--nylas-base-200);border-radius:5px;justify-content:center;gap:0.5rem;align-items:center;color:var(--nylas-base-900)}.login-required .microsoft-button:hover,.login-required .google-button:hover{background-color:var(--nylas-base-25)}.login-required .microsoft-button:hover,.login-required .google-button:hover{background-color:var(--nylas-base-25)}.login-required .other-provider-button{height:48px;border:1px solid var(--nylas-base-300);border-radius:var(--nylas-border-radius-2x);font-size:16px;line-height:24px;padding:0 1rem;background-color:var(--nylas-base-0);font-weight:600;cursor:pointer;display:flex;border:0;background-color:var(--nylas-base-0);height:48px;margin-bottom:1rem;font-size:0.95rem;justify-content:center;gap:0.25rem;align-items:center;color:var(--nylas-base-900)}.login-required .other-provider-button:hover{background-color:var(--nylas-base-25)}.login-required .other-provider-button svg{transform:rotate(180deg)}.login-required .other-provider-button:hover{background-color:var(--nylas-base-25)}.login-required .disclaimer-text{font-size:0.75rem;color:var(--nylas-base-600);align-self:center}@media screen and (max-width: 768px){.login-required{height:auto}}.list-configurations{padding:2rem;height:inherit;background:var(--nylas-base-25);border-radius:var(--nylas-border-radius-2x)}.list-configurations nylas-list-configurations{height:inherit;display:flex;flex-direction:column}@media screen and (max-width: 768px){.list-configurations{height:auto;padding:2rem 1rem}}',_b=n.proxyCustomElement(class extends n.H{constructor(){super(),this.__registerHost(),this.__attachShadow(),this.init=n.createEvent(this,"init",7),this.loggedIn=n.createEvent(this,"loggedIn",7),this.loggedOut=n.createEvent(this,"loggedOut",7),this.schedulerConfigCloseClicked=n.createEvent(this,"schedulerConfigCloseClicked",7),this.nylasSchedulerEditorError=n.createEvent(this,"nylasSchedulerEditorError",6),this.eventOverrides={},this.schedulerPreviewLink="",this.mode="app",this.hideEditorTabs=[],this.requiresSlug=!1,this.enableUserFeedback=!0,this.nylasBranding=!0,this.enableNotetaker=!1,this.enableEventTypes={one_on_one:!0,collective:!0,max_fairness:!0,max_availability:!0,group:!0},this.automaticComponentRegistration=!0,this.selectedLanguage=this.defaultLanguage||n.LANGUAGE_CODE.en,this.langVersion=0,this.version=oa,this.handleSchedulerConfigCloseClicked=e=>{const t=this.schedulerConfigCloseClicked.emit(this.host);"schedulerConfigCloseClicked"in this.eventOverrides&&this.eventOverrides.schedulerConfigCloseClicked(t,this.nylasSchedulerConfigConnector),t.defaultPrevented||(localStorage.removeItem("grant"),localStorage.removeItem("user"),window.location.reload())},this.authenticationUrl=async e=>{if(!this.nylasApiRequest){const t="Unable to authenticate. API request handler is not initialized.";return n.error(`[nylas-scheduler-editor] ${t}`),this.authError=t,this.nylasSchedulerEditorError.emit({notification:{id:"auth-not-initialized",type:di.Error,title:"Authentication Error",category:Ze.Auth,description:t,ttl:"none"},host:this.host}),""}try{const t=await this.nylasApiRequest.authenticationUrl({provider:e});if(!t){const i="Unable to get authentication URL. Please check your configuration and try again.";this.authError=i,this.nylasSchedulerEditorError.emit({notification:{id:"auth-url-failed",type:di.Error,title:"Authentication Error",category:Ze.Auth,description:i,ttl:"none"},host:this.host})}return t||""}catch(t){const i=`Authentication failed: ${t instanceof Error?t.message:"Unknown error"}`;return n.error(`[nylas-scheduler-editor] ${i}`),this.authError=i,this.nylasSchedulerEditorError.emit({notification:{id:"auth-url-exception",type:di.Error,title:"Authentication Error",category:Ze.Auth,description:i,ttl:"none"},host:this.host}),""}}}connectedCallback(){n.debug("[nylas-scheduler-editor] connectedCallback"),queueMicrotask(()=>{this.themeConfig&&(this.applyThemeConfig(this.themeConfig),this.host.setAttribute("data-themed",""))})}async componentWillLoad(){n.debug("[nylas-scheduler-editor] componentWillLoad"),await Promise.resolve();const e=this.additionalParticipants?.filter(o=>{const s=o.calendars?.length>0?o.calendars.filter(l=>l.id&&l.name):[];if(o.name&&o.email&&s.length>0)return{name:o.name,email:o.email,calendars:s}});if(this.stores={schedulerConfig:wS({...this.defaultSchedulerConfigState,additionalParticipants:e||[],participantFetch:this.participantFetch,participantFetchGrantId:this.participantFetchGrantId,participantSearch:this.participantSearch,conferenceProviders:this.conferenceProviders,requiresSlug:this.requiresSlug,selectedLanguage:this.defaultLanguage||n.LANGUAGE_CODE.en,nylasBranding:this.nylasBranding,experimentalFeatures:this.experimentalFeatures,enableEventTypes:this.enableEventTypes,themeConfig:this.themeConfig})},!this.nylasApiRequest&&this.nylasSessionsConfig){const o=new qS(this.nylasSessionsConfig);await o.isLoggedIn(),o.onLoginSuccess(async()=>{const s=await this.nylasSchedulerConfigConnector?.schedulerConfig?.currentUser();if(s){const l=this.loggedIn.emit(this.host);"loggedIn"in this.eventOverrides&&await this.eventOverrides.loggedIn(l,this.nylasSchedulerConfigConnector),l.defaultPrevented||await this.loggedInHandler(s)}}),o.onLoginFail(async()=>{this.stores?.schedulerConfig?.set("currentUser",null),this.authError="Authentication failed. Please try again.",this.nylasSchedulerEditorError.emit({notification:{id:"auth-login-failed",type:di.Error,title:"Authentication Error",category:Ze.Auth,description:"Authentication failed. Please try again.",ttl:"none"},host:this.host});const s=this.loggedOut.emit(this.host);"loggedOut"in this.eventOverrides&&(await this.eventOverrides.loggedOut(s,this.nylasSchedulerConfigConnector),s.defaultPrevented)}),this.nylasApiRequest=new n.NylasIdentityRequestWrapper(o)}this.nylasApiRequest&&this.defaultAuthArgs&&this.nylasApiRequest.setDefaultAuthArgs(this.defaultAuthArgs),this.baseProvider=new vb(this.host,this.stores,this.automaticComponentRegistration,this.eventOverrides);const t=this.baseProvider.getStore("schedulerConfig");this.nylasSchedulerConfigConnector=new ES({nylasApiRequest:this.nylasApiRequest,nylasSchedulerConfigStore:t});const i=this.init.emit(this.host);if("init"in this.eventOverrides&&await this.eventOverrides.init(i,this.nylasSchedulerConfigConnector),!i.defaultPrevented){const o=await this.nylasSchedulerConfigConnector?.schedulerConfig?.currentUser();if(o){const s=this.loggedIn.emit(this.host);"loggedIn"in this.eventOverrides&&await this.eventOverrides.loggedIn(s,this.nylasSchedulerConfigConnector),s.defaultPrevented||await this.loggedInHandler(o)}else{this.stores?.schedulerConfig?.set("currentUser",null);const s=this.loggedOut.emit(this.host);if("loggedOut"in this.eventOverrides&&(await this.eventOverrides.loggedOut(s,this.nylasSchedulerConfigConnector),s.defaultPrevented))return}}this.stores?.schedulerConfig?.onChange("selectedConfiguration",async o=>{o&&o.id&&(this.configurationId=o.id)}),this.baseProvider?.componentWillLoad(this.nylasSchedulerConfigConnector),this.applyThemeConfig(this.themeConfig)}async componentDidLoad(){n.debug("[nylas-scheduler-editor] componentDidLoad"),await this.baseProvider?.componentDidLoad(),this.updateLocalization(this.localization),this.version=oa}async componentDisconnected(){await this.baseProvider?.componentDisconnected()}async configurationIdChanged(e){e?(await this.nylasSchedulerConfigConnector?.schedulerConfig?.getConfigurationById(e),this.stores?.schedulerConfig?.set("action","edit")):(this.stores?.schedulerConfig?.set("selectedConfiguration",{}),this.stores?.schedulerConfig?.set("action",null))}participantPropsChanged(){this.stores?.schedulerConfig?.set("participantFetch",this.participantFetch),this.stores?.schedulerConfig?.set("participantFetchGrantId",this.participantFetchGrantId),this.stores?.schedulerConfig?.set("participantSearch",this.participantSearch)}updateLocalization(e){e&&(Object.keys(e).forEach(t=>{t in n.LANGUAGE_CODE&&n.instance.addResourceBundle(t,"translation",e[t],!1,!0)}),this.langVersion++)}updateNylasBranding(e){this.stores?.schedulerConfig?.set("nylasBranding",e)}updateExperimentalFeatures(e){this.stores?.schedulerConfig?.set("experimentalFeatures",e)}updateEnableEventTypes(e){this.stores?.schedulerConfig?.set("enableEventTypes",e)}themeConfigChanged(e){this.baseProvider?.getStore("schedulerConfig")?.set("themeConfig",e),this.applyThemeConfig(e)}applyThemeConfig(e){if(e)for(const[t,i]of Object.entries(e))this.host.style.setProperty(`${t}`,i)}async store(){return this.stores?.schedulerConfig}async schedulerConnector(){return this.nylasSchedulerConfigConnector}async registerComponentHandler(e){this.baseProvider?.registerComponent(e.detail)}async unregisterComponentHandler(e){this.baseProvider?.unregisterComponent(e.detail)}handleChildSchedulerError(e){this.nylasSchedulerEditorError.emit({notification:e.detail.notification,host:this.host})}nylasFormDropdownChangedHandler(e){const{name:t,value:i}=e.detail;t==="language"&&(this.selectedLanguage=n.LANGUAGE_CODE[i],n.instance.changeLanguage(this.selectedLanguage),this.stores?.schedulerConfig?.set("selectedLanguage",this.selectedLanguage))}async loggedInHandler(e){if(this.stores?.schedulerConfig?.set("currentUser",e),!!this.nylasSchedulerConfigConnector&&(await this.nylasSchedulerConfigConnector.schedulerConfig?.getCalendars(),this.configurationId)){const t=await this.nylasSchedulerConfigConnector.schedulerConfig?.getConfigurationById(this.configurationId);t&&t[0]?.id&&this.stores?.schedulerConfig?.set("action","edit")}}render(){const e=this.host.querySelector('[slot="custom-page-style-inputs"]'),t=this.stores?.schedulerConfig?.state.selectedConfiguration?.id,i=Object.keys(n.LANGUAGE_MAP).map(s=>({label:n.LANGUAGE_MAP[s],value:s})),o=this.stores?.schedulerConfig?.state.selectedEventType===n.CONFIGURATION_EVENT_TYPE.group||this.stores?.schedulerConfig?.state.selectedConfiguration?.type===n.CONFIGURATION_EVENT_TYPE.group;return n.debug(`[nylas-scheduler-editor] render mode: ${this.mode}`),n.h(n.Host,{key:"bd34e24975197c26bf6e08430c8434c40441c367"},n.h("div",{key:"5c1bb57eb7dbd13f879dcbe7de251e6d8687c470",class:"scheduler-editor-header",part:"nse__header"},n.h("h1",{key:"ecf284b9c4c39129233c977b978d8069e448367e",class:"scheduler-editor-title",part:"nse__title"},n.h("calendar-icon",{key:"44b73dbff4441d72ceda5281f6bf07bfb2134dae",width:"18",height:"18"}),n.instance.t("schedulerEditorTitle"),n.h("tooltip-component",{key:"bc20294846164811db22d185e52f50f848d59bd5"},n.h("info-icon",{key:"22955828856eae5f4f7e5d7d51e8e73f11f9805d",slot:"tooltip-icon"}),n.h("span",{key:"9178f588fa8ffe60865b8c6c632ec4dafd91a00d",slot:"tooltip-content"},this.version))),n.h("div",{key:"a67874094ff69226349d1ee0274e27da0da38ad6",class:{language:!0},part:"nse__language"},n.h("select-dropdown",{key:"e47566a2f832d90baa93701afe8efea71476ecec",name:"language",searchPlaceholder:n.instance.t("search"),options:i,withChevron:!1,themeConfig:this.themeConfig,defaultSelectedOption:i.find(s=>s.value==this.selectedLanguage),exportparts:"sd_dropdown: nse__language-dropdown, sd_dropdown-button: nse__language-drop-button, sd_dropdown-content: nse__language-drop-content, sd_dropdown_label: nse__language-drop-label"},n.h("span",{key:"1c7c9d93808786f7e4a1b5ecee414e289074366f",slot:"select-icon"},n.h("translate-icon",{key:"c9b8adee3195f4a50f0ed7c4929b972e59236558",width:"20",height:"20"})))),n.h("button",{key:"fe8c5481fbd2ac6da51fe1420caf973d79d01857",class:"scheduler-editor-close",title:"logout",onClick:s=>this.handleSchedulerConfigCloseClicked(s),part:"nse__close-button"},n.h("close-icon",{key:"ead618a2acc222ff1ec4ca9c552cd81a8c86a57f",width:"18",height:"18"}))),n.h("div",{key:"dffa964669c0b5ca0155ddd3b351a6bb164f7463",class:{"scheduler-editor-content":!0,"scheduler-editor-content--group":o},part:"nse__content"},this.stores?.schedulerConfig?.state.currentUser&&this.stores.schedulerConfig.state.action===null&&this.mode==="composable"&&n.h("slot",{key:"bf58230869a3326fa9cf6ee8b7c18586cc41a074"}),this.stores?.schedulerConfig?.state.currentUser&&this.stores.schedulerConfig.state.action===null&&this.mode!=="composable"&&n.h("div",{key:"edb06ecb33d8f3713da228d70fa72d3db2183235",class:"list-configurations",part:"nse__list-configurations"},n.h("nylas-list-configurations",{key:"ffdcd2304ce49e29aa74da69bad90af9d237a6e8",themeConfig:this.themeConfig,exportparts:"nlc__create-new-cta, actions__dropdown, actions__dropdown-button, actions__dropdown-content, actions-Copy, actions-Preview, actions-Delete"})),this.stores?.schedulerConfig?.state.currentUser&&this.stores.schedulerConfig.state.action==="create-select"&&n.h("nylas-select-event-type",{key:"a5bff89ece1dd30afea1c014d162797bfa7d1df5",themeConfig:this.themeConfig}),this.stores?.schedulerConfig?.state.currentUser&&this.stores.schedulerConfig.state.action==="create"&&o&&n.h("nylas-editor-tabs-group",{key:"08241ae21a7df72079cc49312b4272d2a8cd0b2a",mode:"composable",themeConfig:this.themeConfig},n.h(zm,{key:"86d73811907bfe16c255642fb0755baa9766cf00",selectedEventType:this.stores?.schedulerConfig?.state?.selectedEventType||n.CONFIGURATION_EVENT_TYPE.one_on_one,currentUser:this.stores?.schedulerConfig?.state.currentUser,calendars:this.stores?.schedulerConfig?.state?.calendars,selectedConfiguration:this.stores?.schedulerConfig?.state?.selectedConfiguration})),this.stores?.schedulerConfig?.state.currentUser&&this.stores.schedulerConfig.state.action==="create"&&!o&&n.h("nylas-editor-tabs",{key:"5b85bf26f6243f723a1f0cad821d719cff3f776b",mode:"composable",enableNotetaker:this.enableNotetaker,themeConfig:this.themeConfig},n.h(zm,{key:"5afa9f82b0cb0b495d26b134688c49d82743d7cf",selectedEventType:this.stores?.schedulerConfig?.state?.selectedEventType||n.CONFIGURATION_EVENT_TYPE.one_on_one,currentUser:this.stores?.schedulerConfig?.state.currentUser,calendars:this.stores?.schedulerConfig?.state?.calendars,selectedConfiguration:this.stores?.schedulerConfig?.state?.selectedConfiguration})),this.stores?.schedulerConfig?.state.currentUser&&this.stores.schedulerConfig.state.action==="edit"&&o&&n.h("nylas-editor-tabs-group",{key:t,mode:this.mode,themeConfig:this.themeConfig},this.mode==="composable"&&n.h("slot",{key:"6ec0c1b4daad2d875f8f3cdbb465eb0721133947"}),this.mode==="app"&&e&&n.h("div",{style:{display:"none"},slot:"custom-page-style-inputs",key:t},n.h("slot",{key:"b3c580772253a6a7d5dc3e7f8fd2be2f9a23f247",name:"custom-page-style-inputs"}))),this.stores?.schedulerConfig?.state.currentUser&&this.stores.schedulerConfig.state.action==="edit"&&!o&&n.h("nylas-editor-tabs",{key:t,mode:this.mode,enableNotetaker:this.enableNotetaker,themeConfig:this.themeConfig},this.mode==="composable"&&n.h("slot",{key:"48a71a45b5271485a4f136cb4afa52df94ee469b"}),this.mode==="app"&&e&&n.h("div",{style:{display:"none"},slot:"custom-page-style-inputs",key:t},n.h("slot",{key:"f81fede8cc3d3686056e5222798494fdc76d419f",name:"custom-page-style-inputs"}))),!this.stores?.schedulerConfig?.state.currentUser&&n.h("slot",{key:"968207fdadd383d6da1e8188d0960901e38e949d",name:"login-required"},n.h(XS,{key:"e0c275ef713bd4040c07083898918d1b8e39e171",authenticationUrl:this.authenticationUrl,authError:this.authError}))))}get host(){return this}static get watchers(){return{configurationId:["configurationIdChanged"],participantFetch:["participantPropsChanged"],participantFetchGrantId:["participantPropsChanged"],participantSearch:["participantPropsChanged"],localization:["updateLocalization"],nylasBranding:["updateNylasBranding"],experimentalFeatures:["updateExperimentalFeatures"],enableEventTypes:["updateEnableEventTypes"],themeConfig:["themeConfigChanged"]}}static get style(){return JS}},[257,"nylas-scheduler-editor",{configurationId:[1025,"configuration-id"],nylasApiRequest:[1040,"nylas-api-request"],nylasSessionsConfig:[16,"nylas-sessions-config"],defaultAuthArgs:[16,"default-auth-args"],eventOverrides:[16,"event-overrides"],schedulerPreviewLink:[1,"scheduler-preview-link"],defaultSchedulerConfigState:[16,"default-scheduler-config-store-state"],mode:[1],additionalParticipants:[16,"additional-participants"],participantFetch:[16,"participant-fetch"],participantFetchGrantId:[1,"participant-fetch-grant-id"],participantSearch:[16,"participant-search"],hideEditorTabs:[16,"hide-editor-tabs"],conferenceProviders:[16,"conference-providers"],requiresSlug:[4,"requires-slug"],enableUserFeedback:[4,"enable-user-feedback"],defaultLanguage:[1,"default-language"],localization:[16],nylasBranding:[4,"nylas-branding"],enableNotetaker:[4,"enable-notetaker"],experimentalFeatures:[16,"experimental-features"],enableEventTypes:[16,"enable-event-types"],themeConfig:[16,"theme-config"],automaticComponentRegistration:[32],selectedLanguage:[32],langVersion:[32],version:[32],authError:[32],store:[64],schedulerConnector:[64]},[[0,"registerComponent","registerComponentHandler"],[0,"unregisterComponent","unregisterComponentHandler"],[0,"nylasSchedulerError","handleChildSchedulerError"],[0,"nylasFormDropdownChanged","nylasFormDropdownChangedHandler"]],{configurationId:["configurationIdChanged"],participantFetch:["participantPropsChanged"],participantFetchGrantId:["participantPropsChanged"],participantSearch:["participantPropsChanged"],localization:["updateLocalization"],nylasBranding:["updateNylasBranding"],experimentalFeatures:["updateExperimentalFeatures"],enableEventTypes:["updateEnableEventTypes"],themeConfig:["themeConfigChanged"]}]);function KS(){if(typeof customElements>"u")return;["nylas-scheduler-editor","add-circle-icon","button-component","calendar-agenda-fill-icon","calendar-agenda-icon","calendar-icon","calendar-info-icon","calendar-patterns-icon","checkbox-component","checkbox-group","checkmark-icon","chevron-icon","clock-icon","close-icon","copy-icon","delete-icon","dragable-icon","edit-icon","envelope-fill-icon","envelope-icon","eye-icon","feedback-icon","flow-icon","globe-icon","google-logo-icon","google-meet-icon","info-icon","input-color-picker","input-component","input-dropdown","input-image-url","loading-icon","location-icon","location-off-icon","microsoft-logo-icon","microsoft-teams-icon","multi-select-dropdown","nylas-additional-participants","nylas-availability-picker","nylas-booking-calendar-picker","nylas-booking-confirmation-redirect","nylas-booking-confirmation-type","nylas-booking-form-config","nylas-buffer-time","nylas-calendar-picker","nylas-cancellation-policy","nylas-confirmation-email","nylas-connected-calendars","nylas-custom-booking-flow","nylas-custom-event-slug","nylas-customize-booking-settings","nylas-date-component","nylas-disable-emails","nylas-editor-tabs","nylas-editor-tabs-group","nylas-event-calendar","nylas-event-capacity","nylas-event-description","nylas-event-duration","nylas-event-info","nylas-event-limits","nylas-event-location","nylas-event-timeslot","nylas-event-title","nylas-feedback-form","nylas-form-card","nylas-limit-future-bookings","nylas-list-configurations","nylas-min-booking-notice","nylas-min-cancellation-notice","nylas-notetaker-config","nylas-notification","nylas-only-specific-time-availability","nylas-page-name","nylas-page-styling","nylas-participant-booking-calendars","nylas-participants-custom-availability","nylas-reminder-emails","nylas-reminder-time","nylas-scheduling-method","nylas-select-event-type","nylas-specific-time-availability-picker","nylas-time-window-picker","nylas-timeslot-interval","paintbrush-fill-icon","paintbrush-icon","people-icon","person-clipboard-icon","plus-icon","radio-button-group","search-icon","select-dropdown","textarea-component","time-period-selector","toggle-switch","tooltip-component","translate-icon","trash-icon","warning-icon","zoom-icon"].forEach(e=>{switch(e){case"nylas-scheduler-editor":customElements.get(e)||customElements.define(e,_b);break;case"add-circle-icon":customElements.get(e)||wn();break;case"button-component":customElements.get(e)||Rt();break;case"calendar-agenda-fill-icon":customElements.get(e)||er();break;case"calendar-agenda-icon":customElements.get(e)||tr();break;case"calendar-icon":customElements.get(e)||_a();break;case"calendar-info-icon":customElements.get(e)||Pd();break;case"calendar-patterns-icon":customElements.get(e)||Md();break;case"checkbox-component":customElements.get(e)||qn();break;case"checkbox-group":customElements.get(e)||ar();break;case"checkmark-icon":customElements.get(e)||go();break;case"chevron-icon":customElements.get(e)||Xe();break;case"clock-icon":customElements.get(e)||ka();break;case"close-icon":customElements.get(e)||zt();break;case"copy-icon":customElements.get(e)||Si();break;case"delete-icon":customElements.get(e)||Nd();break;case"dragable-icon":customElements.get(e)||yo();break;case"edit-icon":customElements.get(e)||Ga();break;case"envelope-fill-icon":customElements.get(e)||ir();break;case"envelope-icon":customElements.get(e)||or();break;case"eye-icon":customElements.get(e)||bo();break;case"feedback-icon":customElements.get(e)||vo();break;case"flow-icon":customElements.get(e)||sr();break;case"globe-icon":customElements.get(e)||cn();break;case"google-logo-icon":customElements.get(e)||wg();break;case"google-meet-icon":customElements.get(e)||Ti();break;case"info-icon":customElements.get(e)||Ke();break;case"input-color-picker":customElements.get(e)||Co();break;case"input-component":customElements.get(e)||Ft();break;case"input-dropdown":customElements.get(e)||en();break;case"input-image-url":customElements.get(e)||Di();break;case"loading-icon":customElements.get(e)||At();break;case"location-icon":customElements.get(e)||Ii();break;case"location-off-icon":customElements.get(e)||Ai();break;case"microsoft-logo-icon":customElements.get(e)||Pg();break;case"microsoft-teams-icon":customElements.get(e)||Ri();break;case"multi-select-dropdown":customElements.get(e)||Yn();break;case"nylas-additional-participants":customElements.get(e)||_o();break;case"nylas-availability-picker":customElements.get(e)||rr();break;case"nylas-booking-calendar-picker":customElements.get(e)||lr();break;case"nylas-booking-confirmation-redirect":customElements.get(e)||cr();break;case"nylas-booking-confirmation-type":customElements.get(e)||dr();break;case"nylas-booking-form-config":customElements.get(e)||ur();break;case"nylas-buffer-time":customElements.get(e)||ef();break;case"nylas-calendar-picker":customElements.get(e)||hr();break;case"nylas-cancellation-policy":customElements.get(e)||pr();break;case"nylas-confirmation-email":customElements.get(e)||mr();break;case"nylas-connected-calendars":customElements.get(e)||cf();break;case"nylas-custom-booking-flow":customElements.get(e)||gr();break;case"nylas-custom-event-slug":customElements.get(e)||yr();break;case"nylas-customize-booking-settings":customElements.get(e)||br();break;case"nylas-date-component":customElements.get(e)||On();break;case"nylas-disable-emails":customElements.get(e)||Cr();break;case"nylas-editor-tabs":customElements.get(e)||hb();break;case"nylas-editor-tabs-group":customElements.get(e)||fb();break;case"nylas-event-calendar":customElements.get(e)||au();break;case"nylas-event-capacity":customElements.get(e)||Dr();break;case"nylas-event-description":customElements.get(e)||Ro();break;case"nylas-event-duration":customElements.get(e)||mu();break;case"nylas-event-info":customElements.get(e)||Oo();break;case"nylas-event-limits":customElements.get(e)||Lr();break;case"nylas-event-location":customElements.get(e)||Lo();break;case"nylas-event-timeslot":customElements.get(e)||Ir();break;case"nylas-event-title":customElements.get(e)||Ho();break;case"nylas-feedback-form":customElements.get(e)||Fo();break;case"nylas-form-card":customElements.get(e)||sa();break;case"nylas-limit-future-bookings":customElements.get(e)||yu();break;case"nylas-list-configurations":customElements.get(e)||pb();break;case"nylas-min-booking-notice":customElements.get(e)||Hr();break;case"nylas-min-cancellation-notice":customElements.get(e)||Pr();break;case"nylas-notetaker-config":customElements.get(e)||vu();break;case"nylas-notification":customElements.get(e)||Ni();break;case"nylas-only-specific-time-availability":customElements.get(e)||_u();break;case"nylas-page-name":customElements.get(e)||Mr();break;case"nylas-page-styling":customElements.get(e)||Fr();break;case"nylas-participant-booking-calendars":customElements.get(e)||Eu();break;case"nylas-participants-custom-availability":customElements.get(e)||Su();break;case"nylas-reminder-emails":customElements.get(e)||Nr();break;case"nylas-reminder-time":customElements.get(e)||No();break;case"nylas-scheduling-method":customElements.get(e)||$r();break;case"nylas-select-event-type":customElements.get(e)||Cb();break;case"nylas-specific-time-availability-picker":customElements.get(e)||jr();break;case"nylas-time-window-picker":customElements.get(e)||ra();break;case"nylas-timeslot-interval":customElements.get(e)||Du();break;case"paintbrush-fill-icon":customElements.get(e)||zr();break;case"paintbrush-icon":customElements.get(e)||Br();break;case"people-icon":customElements.get(e)||Iu();break;case"person-clipboard-icon":customElements.get(e)||Hi();break;case"plus-icon":customElements.get(e)||Oi();break;case"radio-button-group":customElements.get(e)||Li();break;case"search-icon":customElements.get(e)||ut();break;case"select-dropdown":customElements.get(e)||pt();break;case"textarea-component":customElements.get(e)||Ln();break;case"time-period-selector":customElements.get(e)||Hn();break;case"toggle-switch":customElements.get(e)||Ea();break;case"tooltip-component":customElements.get(e)||Qe();break;case"translate-icon":customElements.get(e)||qa();break;case"trash-icon":customElements.get(e)||$o();break;case"warning-icon":customElements.get(e)||Ka();break;case"zoom-icon":customElements.get(e)||Fi();break}})}const QS=_b,eT=KS,tT=uu,nT=$r,aT=':host{--nylas-primary:#2563eb;--nylas-error:#cc4841;--nylas-error-50:#ffeae8;--nylas-error-100:#ffc5bf;--nylas-error-200:#fecaca;--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;display:block;position:relative;height:inherit;display:flex;flex-direction:column;justify-content:center;align-items:center;font-family:var(--nylas-font-family)}.event-card{display:flex;align-items:center;flex-direction:column;gap:4px;width:calc(100% - 3rem);background-color:var(--nylas-base-0);color:var(--nylas-base-800);border-radius:var(--nylas-border-radius-2x);padding:3rem 1.5rem 1.5rem 1.5rem;position:relative;box-shadow:0px 1px 3px 0px rgba(0, 0, 0, 0.1), 0px 1px 2px 0px rgba(0, 0, 0, 0.06)}@media screen and (max-width: 768px){.event-card{margin-bottom:2rem}}.nylas-selected-event-card__date{font-size:min(max(16px, 3vw), 18px);font-weight:600}.nylas-selected-event-card__time{font-size:16px;font-weight:500}.calendar-icon{width:3rem;height:3rem;border-radius:50%;position:absolute;top:-1.25rem;left:50%;transform:translateX(-50%);background-color:var(--nylas-base-0);border:1px solid var(--nylas-base-200)}calendar-icon{display:flex;align-items:center;justify-content:center;height:100%}.event-timezone{display:flex;color:var(--nylas-base-600);margin-bottom:8px;gap:4px;align-items:center}@media screen and (max-width: 768px){.event-timezone{margin-bottom:16px}}';var iT=function(a,e,t,i){var o=arguments.length,s=o<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,l;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(a,e,t,i);else for(var f=a.length-1;f>=0;f--)(l=a[f])&&(s=(o<3?l(s):o>3?l(e,t,s):l(e,t))||s);return o>3&&s&&Object.defineProperty(e,t,s),s},id=function(a,e){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(a,e)};const Pu=n.proxyCustomElement(class extends n.H{constructor(){super(),this.__registerHost(),this.__attachShadow(),this.selectedTimezone=Intl.DateTimeFormat().resolvedOptions().timeZone,this.startTime="",this.endTime=""}themeConfigChanged(e){this.applyThemeConfig(e)}selectedLanguageChangedHandler(e,t){e!==t&&(n.instance.changeLanguage(e),this.updateTimes())}selectedTimeslotChangedHandler(){this.updateTimes()}selectedTimezoneChangedHandler(){this.updateTimes()}hour12ChangedHandler(){this.updateTimes()}connectedCallback(){queueMicrotask(()=>{this.themeConfig&&(this.applyThemeConfig(this.themeConfig),this.host.setAttribute("data-themed",""))})}disconnectedCallback(){}async componentWillLoad(){n.debug("[nylas-selected-event-card] Component will load")}async componentDidLoad(){n.debug("[nylas-selected-event-card] Component did load"),this.selectedDate||n.debug('[nylas-selected-event-card] "selectedDate" prop is not provided.'),this.selectedTimeslot||n.debug('[nylas-selected-event-card] "selectedTimeslot" prop is not provided.'),this.updateTimes()}updateTimes(){if(!this.selectedTimeslot?.start_time||!this.selectedTimeslot?.end_time){this.startTime="",this.endTime="";return}const e=n.LANGUAGE_CODE_TO_LOCALE_MAP[this.selectedLanguage||"en"],t=new Intl.DateTimeFormat(e,{hour:"2-digit",minute:"2-digit",timeZone:this.selectedTimezone,hour12:this.hour12});this.startTime=t.format(new Date(this.selectedTimeslot.start_time)),this.endTime=t.format(new Date(this.selectedTimeslot.end_time))}applyThemeConfig(e){if(e)for(const[t,i]of Object.entries(e))this.host.style.setProperty(`${t}`,i)}render(){return n.h(n.Host,{key:"9610116de1cf94e0204fd691318e916f534d07a8",part:"nsec"},n.h("div",{key:"670e4099f18113f3b8ea9e0b6c76a408e26c713c",class:"event-card",part:"nsec__card"},n.h("div",{key:"b4806f52b760b1839224f2344b5524e33fe75cf9",class:"calendar-icon",part:"nsec__icon"},n.h("calendar-icon",{key:"bbc6c139aeac8f868fc60bffcebcf6d72ca38b18"})),n.h("div",{key:"a6b42bc8fba2ed5416216b51a523a6c6d0b34b19",class:"nylas-selected-event-card__date",part:"nsec__date"},this.selectedDate?n.capitalizeFirstLetter(n.formatBookedEventDate(this.selectedTimeslot?.start_time,this.selectedTimezone,n.LANGUAGE_CODE_TO_LOCALE_MAP[this.selectedLanguage||"en"])):"-"),n.h("div",{key:"6863f6b7ceb0a75cc3767e03df10cf837a8506d8",class:"nylas-selected-event-card__time",part:"nsec__time"},this.startTime," - ",this.endTime)),n.h("div",{key:"81a459e1c205e8a27eebb23e6ff6d9ab4d067d5d",class:"event-timezone",part:"nsec__timezone"},n.h("globe-icon",{key:"074bf2f15c33da5697112d4498f6b8e2d092d3b9"}),n.TIMEZONE_MAP[this.selectedTimezone]))}get host(){return this}static get watchers(){return{themeConfig:["themeConfigChanged"],selectedLanguage:["selectedLanguageChangedHandler"],selectedTimeslot:["selectedTimeslotChangedHandler"],selectedTimezone:["selectedTimezoneChangedHandler"],hour12:["hour12ChangedHandler"]}}static get style(){return aT}},[257,"nylas-selected-event-card",{themeConfig:[8,"theme-config"],selectedDate:[16,"selected-date"],selectedTimeslot:[16,"selected-timeslot"],selectedTimezone:[1,"selected-timezone"],selectedLanguage:[1,"selected-language"],hour12:[4,"hour-1-2"],startTime:[32],endTime:[32]},void 0,{themeConfig:["themeConfigChanged"],selectedLanguage:["selectedLanguageChangedHandler"],selectedTimeslot:["selectedTimeslotChangedHandler"],selectedTimezone:["selectedTimezoneChangedHandler"],hour12:["hour12ChangedHandler"]}]);iT([Pe({name:"nylas-selected-event-card",stateToProps:new Map([["scheduler.selectedDate","selectedDate"],["scheduler.selectedTimeslot","selectedTimeslot"],["scheduler.selectedTimezone","selectedTimezone"],["scheduler.selectedLanguage","selectedLanguage"],["scheduler.themeConfig","themeConfig"],["scheduler.hour12","hour12"]]),eventToProps:{},fireRegisterEvent:!0}),id("design:type",Function),id("design:paramtypes",[]),id("design:returntype",void 0)],Pu.prototype,"render",null);function kb(){if(typeof customElements>"u")return;["nylas-selected-event-card","calendar-icon","globe-icon"].forEach(e=>{switch(e){case"nylas-selected-event-card":customElements.get(e)||customElements.define(e,Pu);break;case"calendar-icon":customElements.get(e)||_a();break;case"globe-icon":customElements.get(e)||cn();break}})}const oT=':host{display:block;height:calc(100% - 48px);--nylas-primary:#2563eb;--nylas-error:#cc4841;--nylas-error-50:#ffeae8;--nylas-error-100:#ffc5bf;--nylas-error-200:#fecaca;--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}.time-picker-wrapper{display:flex;flex-direction:column;height:100%}.timeslots{position:relative;display:flex;flex-direction:column;gap:0.75rem;align-items:center;overflow-y:scroll;padding:0.5rem 1.5rem 1.5rem;flex:1}.time{box-sizing:border-box;display:flex;flex-direction:column;justify-content:center;align-items:center;padding:4px 12px;gap:0.5rem;font-size:16px;font-weight:500;font-family:inherit;width:100%;height:48px;color:var(--nylas-base-800);background:var(--nylas-base-0);border:none;outline:1.5px solid var(--nylas-base-200);border-radius:var(--nylas-border-radius-2x);flex:none;order:4;align-self:stretch;flex-grow:0;cursor:pointer}.time:hover,.time:focus{color:var(--nylas-primary);outline-color:var(--nylas-primary)}.time.selected{font-weight:600;color:var(--nylas-primary);outline:2px solid var(--nylas-primary);border-color:transparent;box-shadow:0 0 0 2px var(--nylas-primary)}.time .time-label{display:flex;flex-direction:column;align-items:center;gap:4px}.time .time-label span.spots{font-size:14px;font-family:var(--nylas-font-family);font-weight:400;color:var(--nylas-base-600)}.empty{text-align:center;padding:0 1.5rem;color:var(--nylas-base-600);font-size:min(max(12px, 2vw), 14px);height:450px;display:flex;align-items:center;justify-content:center}@keyframes pulsate{0%{background-color:var(--nylas-base-50)}50%{background-color:var(--nylas-base-100)}100%{background-color:var(--nylas-base-50)}}.loading{padding:0 1.5rem}.loading .timeslot-skeleton{width:100%;height:4rem;background-color:var(--nylas-base-50);margin-bottom:0.5rem;border-radius:var(--nylas-border-radius-2x);animation:pulsate 1.5s infinite ease-in-out}.footer{width:100%;padding:14px;box-sizing:border-box;border-top:1px solid var(--nylas-base-200)}';var sT=function(a,e,t,i){var o=arguments.length,s=o<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,l;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(a,e,t,i);else for(var f=a.length-1;f>=0;f--)(l=a[f])&&(s=(o<3?l(s):o>3?l(e,t,s):l(e,t))||s);return o>3&&s&&Object.defineProperty(e,t,s),s},od=function(a,e){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(a,e)};const Mu=n.proxyCustomElement(class extends n.H{constructor(){super(),this.__registerHost(),this.__attachShadow(),this.timeslotSelected=n.createEvent(this,"timeslotSelected",7),this.timeslotConfirmed=n.createEvent(this,"timeslotConfirmed",7),this.validateTimeslotError=n.createEvent(this,"validateTimeslotError",7),this.selectedTimezone=Intl.DateTimeFormat().resolvedOptions().timeZone,this.selectedDate=new Date,this.times=[],this.handleConfirmedTimeslot=async(e,t)=>{e.preventDefault(),n.debug("[nylas-timeslot-picker] Confirm timeslot",t),t&&this.timeslotConfirmed.emit({timeslot:t,host:this.host})},this.handleMouseEnter=e=>{this.hoveredTimeslotIndex=e},this.handleMouseLeave=()=>{this.hoveredTimeslotIndex=-1}}selectedLanguageChanged(e){n.instance.changeLanguage(e)}selectedDateChanged(e){if(n.debug("[nylas-timeslot-picker] Selected date changed",{newVal:e}),e&&(this.selectedTimeslotIndex="",typeof e<"u")){const t=this.availability?.filter(i=>n.isSameDayTimezone(i.start_time,e,this.selectedTimezone)).map(i=>i);this.times=t||[]}}availabilityChanged(e){if(n.debug("[nylas-timeslot-picker] Available times changed",{newVal:e,selectedDate:this.selectedDate}),typeof e<"u"){const t=e?.filter(i=>this.selectedDate&&n.isSameDayTimezone(i.start_time,this.selectedDate,this.selectedTimezone)).map(i=>i);this.times=t||[]}}selectedTimezoneChanged(e){if(n.debug("[nylas-timeslot-picker] Selected timezone changed",{newTimezone:e,selectedDate:this.selectedDate}),this.selectedDate&&this.availability){const t=this.availability?.filter(i=>n.isSameDayTimezone(i.start_time,this.selectedDate,e)).map(i=>i);this.times=t||[]}}themeConfigChanged(e){this.applyThemeConfig(e)}connectedCallback(){queueMicrotask(()=>{this.themeConfig&&(this.applyThemeConfig(this.themeConfig),this.host.setAttribute("data-themed",""))})}disconnectedCallback(){}async componentWillLoad(){n.debug("[nylas-timeslot-picker] Component will load",{selectedDate:this.selectedDate,availability:this.availability,times:this.times}),n.instance.changeLanguage(this.selectedLanguage||n.LANGUAGE_CODE.en)}async componentDidLoad(){n.debug("[nylas-timeslot-picker] Component did load");const e=this.availability?.filter(t=>this.selectedDate&&n.isSameDayTimezone(t.start_time,this.selectedDate,this.selectedTimezone)).map(t=>t);this.times=e||[]}applyThemeConfig(e){if(e)for(const[t,i]of Object.entries(e))this.host.style.setProperty(`${t}`,i)}getTimeslotId(e,t){const i=new Date(e.start_time),o=e.event_id;return`${i.toLocaleDateString()}-${t}${o?`-${o}`:""}`}onClickSelectTime(e,t){n.debug("[nylas-timeslot-picker] Time selected",e,t),this.selectedTimeslotIndex=this.getTimeslotId(e,t),this.timeslotSelected.emit({start_time:e.start_time,end_time:e.end_time,emails:e.emails,capacity:e?.capacity,event_id:e?.event_id,master_id:e?.master_id,calendar_id:e?.calendar_id})}async emitValidateTimeslotError(e,t){this.validateTimeslotError.emit({error:e,type:t})}getTimeSlotLabel(e){const t=n.LANGUAGE_CODE_TO_LOCALE_MAP[this.selectedLanguage||"en"],i=new Intl.DateTimeFormat(t,{hour:"2-digit",minute:"2-digit",timeZone:this.selectedTimezone,hour12:this.hour12});return`${i.format(e.start_time)} - ${i.format(e.end_time)}`}render(){const e=n.LANGUAGE_CODE_TO_LOCALE_MAP[this.selectedLanguage||"en"];if(this.isLoading)return n.h(n.Host,null,n.h("div",{class:"loading"},new Array(6).fill(0).map((i,o)=>n.h("div",{class:"timeslot-skeleton",style:{animationDelay:`${o*20}ms`}}))));if(this.availability&&this.availability.length===0)return n.h(n.Host,null,n.h("div",{class:"empty"},n.h("span",null,n.instance.t("noDatesAvailable"))));const t=this.times.filter(i=>{const o=i?.event_id||i?.master_id,s=typeof i?.capacity=="number"&&i?.capacity>0;return!(o&&!s)});return(!this.times||this.times.length===0||t.length===0)&&this.selectedDate?n.h(n.Host,null,n.h("div",{class:"empty"},n.h("span",null,n.instance.t("noTimeSlotsAvailable")))):this.selectedDate?n.h(n.Host,{part:"ntp"},n.h("div",{class:"time-picker-wrapper",part:"ntp__time-picker-wrapper"},n.h("div",{class:"timeslots",part:"ntp__timeslots"},t.map((i,o)=>{const s=typeof i?.capacity=="number"&&i?.capacity>0,l=this.selectedTimeslotIndex==this.getTimeslotId(i,o);return n.h("button",{part:`ntp__timeslot ${this.selectedTimeslot?.start_time?.getTime()===i.start_time.getTime()?"ntp__timeslot--selected":""}`,class:{time:!0,selected:typeof this.selectedTimeslot<"u"&&l},onClick:()=>this.onClickSelectTime(i,o),onMouseEnter:()=>this.handleMouseEnter(o),onMouseLeave:()=>this.handleMouseLeave()},n.h("div",{class:"time-label",part:"ntp__time-label"},this.hoveredTimeslotIndex==o||l?this.getTimeSlotLabel(i):i.start_time.toLocaleTimeString(e,{hour:"2-digit",minute:"2-digit",timeZone:this.selectedTimezone,hour12:this.hour12}),n.h("span",{class:"spots"},s?n.instance.t("spotsLeft",{count:i?.capacity}):null)))})),this.selectedTimeslot&&n.h("div",{class:"footer"},n.h("button-component",{variant:"primary",onClick:i=>this.handleConfirmedTimeslot(i,this.selectedTimeslot),part:"ntp__button-primary"},n.h("slot",{name:"timeslot-picker-cta-label"},n.instance.t("nextButton")))))):n.h(n.Host,null)}get host(){return this}static get watchers(){return{selectedLanguage:["selectedLanguageChanged"],selectedDate:["selectedDateChanged"],availability:["availabilityChanged"],selectedTimezone:["selectedTimezoneChanged"],themeConfig:["themeConfigChanged"]}}static get style(){return oT}},[257,"nylas-timeslot-picker",{availability:[16],isLoading:[4,"loading-state"],themeConfig:[8,"theme-config"],selectedTimeslot:[16,"selected-timeslot"],selectedTimezone:[1,"selected-timezone"],selectedDate:[16,"selected-date"],selectedLanguage:[1,"selected-language"],hour12:[4,"hour-1-2"],times:[32],hoveredTimeslotIndex:[32],selectedTimeslotIndex:[32],emitValidateTimeslotError:[64]},void 0,{selectedLanguage:["selectedLanguageChanged"],selectedDate:["selectedDateChanged"],availability:["availabilityChanged"],selectedTimezone:["selectedTimezoneChanged"],themeConfig:["themeConfigChanged"]}]);sT([Pe({name:"nylas-timeslot-picker",stateToProps:new Map([["scheduler.selectedDate","selectedDate"],["scheduler.availability","availability"],["scheduler.selectedTimeslot","selectedTimeslot"],["scheduler.selectedTimezone","selectedTimezone"],["scheduler.selectedLanguage","selectedLanguage"],["scheduler.isLoading","isLoading"],["scheduler.themeConfig","themeConfig"],["scheduler.hour12","hour12"]]),eventToProps:{timeslotSelected:async(a,e)=>{n.debug("nylas-timeslot-picker","timeslotSelected",a.detail),e.scheduler.selectTime(a.detail)},timeslotConfirmed:async(a,e)=>{n.debug("nylas-timeslot-picker","timeslotConfirmed",a.detail);const{timeslot:t,host:i}=a.detail;if(t&&t?.event_id&&t?.capacity){const o=await e.scheduler.validateGroupEventTimeslot(t);if(o&&"error"in o){const s=o.error?.message||"An error occurred while validating the timeslot";s==="Event is full"?i.emitValidateTimeslotError(s,"info"):i.emitValidateTimeslotError(s,"error")}}else e.scheduler.toggleAdditionalData(!0)},validateTimeslotError:async(a,e)=>{n.debug("nylas-timeslot-picker","validateTimeslotError",a.detail)}},fireRegisterEvent:!0}),od("design:type",Function),od("design:paramtypes",[]),od("design:returntype",void 0)],Mu.prototype,"render",null);function Eb(){if(typeof customElements>"u")return;["nylas-timeslot-picker","button-component","loading-icon"].forEach(e=>{switch(e){case"nylas-timeslot-picker":customElements.get(e)||customElements.define(e,Mu);break;case"button-component":customElements.get(e)||Rt();break;case"loading-icon":customElements.get(e)||At();break}})}class rT{constructor(){this.component=e=>{const t=Ze.Component,i=`${e} Error`;return{endtime_not_in_future:(o='"endtime" can not be in the future')=>({title:i,message:o,category:t}),no_booking_info:(o="No booking info provided")=>({title:i,message:o,category:t}),no_timeslot_selected:(o="No timeslot selected")=>({title:i,message:o,category:t}),no_timezone_selected:(o="No timezone selected")=>({title:i,message:o,category:t}),no_booking_id:(o="No booking id provided")=>({title:i,message:o,category:t}),no_salt:(o="No salt provided")=>({title:i,message:o,category:t}),invalid_start_time:(o="Invalid start time")=>({title:i,message:o,category:t}),invalid_end_time:(o="Invalid end time")=>({title:i,message:o,category:t}),invalid_timezone:(o="Invalid timezone")=>({title:i,message:o,category:t}),no_config_id:(o="No configuration id provided")=>({title:i,message:o,category:t})}},this.api=e=>{const t=Ze.Api,i=`${e} Error`;return{invalid_session:o=>({title:i,message:o,category:t}),general_error:o=>({title:i,message:o,category:t}),internal_error:o=>({title:i,message:o,category:t}),invalid_request_error:o=>({title:i,message:o,category:t}),timeslot_not_available:o=>({title:i,message:o,category:t}),provider_error:o=>({title:i,message:o,category:t}),not_found_error:o=>({title:i,message:o,category:t})}}}}class lT{constructor({schedulerAPIURL:e,schedulerStore:t,sessionId:i,configId:o,slug:s,clientId:l}){this.errors=new rT,this.schedulerStore=t,this.schedulerAPIURL=e,this.sessionId=i,this.configId=o,this.slug=s,this.clientId=l}getHeaders(){return this.sessionId?{Authorization:`Bearer ${this.sessionId}`}:{}}async makeAPIRequest(e,t,i,o={},s){try{const l=new URL(this.schedulerAPIURL);return l.pathname=e,await(await fetch(decodeURIComponent(l.toString()),{method:t,headers:{"Content-Type":"application/json",Origin:window.location.origin,"X-Source":"nylas-scheduling","X-Nylas-Web-Elements-Version":oa,...this.clientId&&{"X-Nylas-Application-Public-Id":this.clientId},...o},body:i,signal:s})).json()}catch(l){if(l.name==="AbortError")throw l;return{error:{message:l.message,title:"API request failed",type:"api"}}}}getErrorMessage(e){let t=e?.message||e?.title||"Something went wrong";return e?.type==="provider_error"&&(t=e?.provider_error?.error?.message||e?.provider_error?.error?.title||"Something went wrong"),t}setConfigId(e){this.configId=e}setSchedulerAPIURL(e){e==="/"&&(e=new URL(window.location.href).origin),this.schedulerAPIURL=e}setSessionId(e){this.sessionId=e}selectDate(e){this.schedulerStore.set("selectedDate",e),this.schedulerStore.set("selectedTimeslot",null)}selectTime(e){this.schedulerStore.set("selectedTimeslot",e)}selectTimezone(e){this.schedulerStore.set("selectedTimezone",e)}selectLanguage(e){const t=n.normalizeSupportedLanguageCode(e)||n.LANGUAGE_CODE.en;this.schedulerStore.set("selectedLanguage",t),n.instance.changeLanguage(t)}async toggleAdditionalData(e){e||await this.refetchAvailability(),this.schedulerStore.set("showBookingForm",e)}setParticipantName(e){const{bookingInfo:t}=this.schedulerStore.state;this.schedulerStore.set("bookingInfo",{...t,primaryParticipant:{...t?.primaryParticipant,name:e}})}setParticipantEmail(e){const{bookingInfo:t}=this.schedulerStore.state;this.schedulerStore.set("bookingInfo",{...t,primaryParticipant:{...t?.primaryParticipant,email:e}})}async refetchAvailability(){const e=new Date,t=new Date(e.getFullYear(),e.getMonth(),1).getTime()/1e3,i=t<e.getTime()/1e3?Math.floor(e.getTime()/1e3):t,o=new Date(e.getFullYear(),e.getMonth()+1,1).getTime()/1e3;return await this.getAvailability(i,o)}async resetStoreStateAndFetchAvailability(){const e=new Date,t=await this.refetchAvailability(),i=this.schedulerStore.get("availability").find(s=>{const l=n.normalizeDateInput(s.start_time);return l?l>new Date:!1});let o=e;return i&&(o=n.normalizeDateInput(i.start_time)||e),this.schedulerStore.set("selectedDate",o),this.schedulerStore.set("eventInfo",null),this.schedulerStore.set("showBookingForm",!1),this.schedulerStore.set("selectedTimeslot",null),t}async setReschedule(e){this.schedulerStore.set("isLoading",!0);const t=this.schedulerStore.state.eventInfo;return t&&this.schedulerStore.set("reschedulingEventInfo",t),this.schedulerStore.set("rescheduleBookingId",e),await this.getUISettings(),await this.resetStoreStateAndFetchAvailability().finally(()=>{this.schedulerStore.set("isLoading",!1)})}async setCancel(e){this.schedulerStore.set("cancelBookingId",e)}async setReject(e){this.schedulerStore.set("rejectBookingId",e)}async resetCancel(){const e=await this.resetStoreStateAndFetchAvailability();return this.schedulerStore.set("cancelBookingId",""),this.schedulerStore.set("rejectBookingId",""),this.schedulerStore.set("cancelledEventInfo",null),e}async goBack(){this.schedulerStore.set("cancelBookingId","")}async resetConfirm(){const e=await this.resetStoreStateAndFetchAvailability();return this.schedulerStore.set("organizerConfirmationBookingId",""),this.schedulerStore.set("confirmedEventInfo",void 0),e}async bookTimeslot(e){this.schedulerStore.set("isLoading",!0);const{selectedTimeslot:t,selectedTimezone:i,bookingInfo:o,selectedLanguage:s}=this.schedulerStore.state;if(!e&&!o)return{error:this.errors.component(n.instance.t("createBookingErrorTitle")).no_booking_info()};const l=e?.timeslot||t;if(!l)return{error:this.errors.component(n.instance.t("createBookingErrorTitle")).no_timeslot_selected()};const f=e&&e?.timezone?e?.timezone:i,h=s||"en-US";if(!f)return{error:this.errors.component(n.instance.t("createBookingErrorTitle")).no_timezone_selected()};const m=[...this.schedulerStore.get("availabilityOrderEmails")];let g="";const b=l?.emails||[],T={};Object.entries(o?.additionalFields||{}).forEach(([de,ge])=>{T[de]=ge.value});const x=e?e?.primaryParticipant:o?.primaryParticipant,H=e?e?.guests||[]:o?.guests||[],V=e?e?.additionalFields:T,U=this.getHeaders(),q=`/v3/scheduling/bookings${!this.sessionId&&this.configId?`?configuration_id=${this.configId}`:!this.sessionId&&this.slug&&this.clientId?`?slug=${this.slug}&client_id=${this.clientId}`:""}`;if(m.length===0){const de=await this.makeAPIRequest(decodeURIComponent(q),"POST",JSON.stringify({additional_fields:V,additional_guests:H,guest:{...x},start_time:l.start_time.getTime()/1e3,end_time:l.end_time.getTime()/1e3,timezone:f,event_id:l?.event_id||void 0,master_id:l?.master_id||void 0,calendar_id:l?.calendar_id||void 0,email_language:this.getTwoLetterLanguageCode(h)}),U);return this.schedulerStore.set("isLoading",!1),"data"in de?(this.schedulerStore.set("eventInfo",de.data),de):{error:de.error}}for(;m.length>0;){if(g=m.shift(),!b.includes(g))continue;const de=await this.makeAPIRequest(decodeURIComponent(q),"POST",JSON.stringify({participants:g?[{email:g}]:void 0,additional_fields:V,additional_guests:H,guest:{...x},start_time:l.start_time.getTime()/1e3,end_time:l.end_time.getTime()/1e3,timezone:f,email_language:this.getTwoLetterLanguageCode(h)}),U);if("data"in de)return this.schedulerStore.set("isLoading",!1),this.schedulerStore.set("eventInfo",de?.data),de;if(de.error?.message?.startsWith("The selected timeslot is unavailable"))continue;{this.schedulerStore.set("isLoading",!1);const ge=de.error?.type;let De=de.error;if(ge&&ge in this.errors.api(n.instance.t("createBookingErrorTitle"))){const ke=this.getErrorMessage(De);De=this.errors.api(n.instance.t("createBookingErrorTitle"))[ge](ke)}return{error:De}}}return this.schedulerStore.set("isLoading",!1),{error:this.errors.api(n.instance.t("createBookingErrorTitle")).timeslot_not_available("The selected timeslot is unavailable")}}async getUISettings(e){this.schedulerStore.set("isLoading",!0);const t=this.schedulerStore.get("rescheduleBookingId"),i=this.getHeaders();let o=!this.sessionId&&this.configId?`?configuration_id=${this.configId}`:!this.sessionId&&this.slug&&this.clientId?`?slug=${this.slug}&client_id=${this.clientId}`:"";t&&o?o+=`&booking_id=${t}`:t&&(o+=`?booking_id=${t}`);const s=`/v3/scheduling/ui-settings${o}`,l=await this.makeAPIRequest(s,"GET",void 0,i,e);if("error"in l){this.schedulerStore.set("isLoading",!1);const f=l.error?.type;let h=l.error;return f&&f in this.errors.api(n.instance.t("getUISettingErrorTitle"))&&(h=this.errors.api(n.instance.t("getUISettingErrorTitle"))[f](h?.message||h?.title||"Something went wrong")),{error:h}}return"data"in l&&(this.schedulerStore.set("configSettings",l.data),this.clientId=l.data.app_client_id||this.clientId),this.schedulerStore.set("isLoading",!1),l}getTwoLetterLanguageCode(e){return e.split("-")[0]}getStartTimeWithMinBookingNotice(e){const i=this.schedulerStore.get("configSettings")?.scheduler?.min_booking_notice;if(!i)return e;const o=new Date().getTime();return e<(o+i*60*1e3)/1e3?Math.floor((o+i*60*1e3)/1e3):e}getEndTimeForAvailableDaysInFuture(e){const t=new Date,i=this.schedulerStore.get("configSettings")?.scheduler?.available_days_in_future,o=Math.floor(n.addDaysToCurrentDate(t,i).getTime()/1e3);return Math.min(o,e)}async getAvailability(e=0,t=0,i){this.schedulerStore.set("isLoading",!0);const o=new URLSearchParams,s=new Date,l=s.getTime();if(t&&t<l/1e3)return this.schedulerStore.set("isLoading",!1),{error:this.errors.component(n.instance.t("getAvailabilityErrorTitle")).endtime_not_in_future()};if(!e){const x=new Date(s.getFullYear(),s.getMonth(),1);e=Math.floor(x.getTime()/1e3)}if(!t){const x=new Date(s.getFullYear(),s.getMonth()+1,0);t=Math.floor(x.getTime()/1e3)}t=this.getEndTimeForAvailableDaysInFuture(t);const f=this.getStartTimeWithMinBookingNotice(e);e=f,t=f>t?f+1:t,o.append("start_time",encodeURIComponent(e.toString())),o.append("end_time",encodeURIComponent(t.toString())),this.configId&&!this.sessionId?o.append("configuration_id",encodeURIComponent(this.configId)):this.slug&&this.clientId&&!this.sessionId&&(o.append("slug",encodeURIComponent(this.slug)),o.append("client_id",encodeURIComponent(this.clientId)));const h=this.schedulerStore.get("rescheduleBookingId");h&&o.append("booking_id",encodeURIComponent(h));const m=o.toString(),g=`/v3/scheduling/availability${m?`?${m}`:""}`,b=this.getHeaders(),T=await this.makeAPIRequest(decodeURIComponent(g),"GET",void 0,b,i);if("error"in T){this.schedulerStore.set("availability",[]),this.schedulerStore.set("isLoading",!1);const x=T.error?.type;let H=T.error;if(H?.message?.toLowerCase().includes("Failed to find a valid Grant")){const V=n.instance.t("invalidGrantError");return{error:{title:n.instance.t("invalidGrantErrorTitle"),message:V,category:Ze.Api}}}if(x&&x in this.errors.api(n.instance.t("getAvailabilityErrorTitle"))){const V=this.getErrorMessage(H);H=this.errors.api(n.instance.t("getAvailabilityErrorTitle"))[x](V)}return{error:H}}if("data"in T){const V=(T.data?.time_slots?.map(X=>({...X,start_time:new Date(X.start_time*1e3),end_time:new Date(X.end_time*1e3)}))||[]).filter(X=>X.start_time.getTime()>l).sort((X,q)=>X.start_time.getTime()-q.start_time.getTime());this.schedulerStore.set("availability",V);const U=T.data?.order||[];this.schedulerStore.set("availabilityOrderEmails",U)}return this.schedulerStore.set("isLoading",!1),T}async cancelBooking(e,t){if(this.schedulerStore.set("isLoading",!0),!e)return{error:this.errors.component(n.instance.t("cancelBookingErrorTitle")).no_booking_id()};const i=!this.sessionId&&this.configId?`?configuration_id=${this.configId}`:!this.sessionId&&this.slug&&this.clientId?`?slug=${this.slug}&client_id=${this.clientId}`:"",o=`/v3/scheduling/bookings/${e}${i}`,s=this.getHeaders(),l=await this.makeAPIRequest(decodeURIComponent(o),"DELETE",JSON.stringify({action:"cancel",cancellation_reason:t}),s);if("error"in l){this.schedulerStore.set("isLoading",!1);const f=l.error?.type;let h=l.error;if(f&&f in this.errors.api(n.instance.t("cancelBookingErrorTitle"))){const m=this.getErrorMessage(h);h=this.errors.api(n.instance.t("cancelBookingErrorTitle"))[f](m)}return{error:h}}return this.schedulerStore.set("cancelledEventInfo",{booking_id:e}),this.schedulerStore.set("rescheduleBookingId",""),this.schedulerStore.set("isLoading",!1),l}async rescheduleBooking(e,t){if(this.schedulerStore.set("isLoading",!0),!e)return{error:this.errors.component(n.instance.t("rescheduleBookingErrorTitle")).no_booking_id()};const i=this.errors.api(n.instance.t("rescheduleBookingErrorTitle")),o=this.errors.component(n.instance.t("rescheduleBookingErrorTitle")),{bookingInfo:s,selectedTimeslot:l,selectedTimezone:f,selectedLanguage:h}=this.schedulerStore.state,{startTime:m,endTime:g,timezone:b}=t,T=m||l?.start_time;if(!T)return{error:o.invalid_start_time('Please pass "startTime" in data or set "selectedTimeslot" in the defaultSchedulerState.')};const x=g||l?.end_time;if(!x)return{error:o.invalid_end_time('Please pass "endTime" in data or set "selectedTimeslot" in the defaultSchedulerState.')};const H=this.schedulerStore.get("availabilityOrderEmails");let V="";if(H.length>0){const we=l?.emails||[];for(let Ae=0;Ae<H.length;Ae++)if(we.includes(H[Ae])){V=H[Ae];break}}const U=b||f;if(!U)return{error:o.invalid_timezone('Please pass "timezone" in data or set "selectedTimezone" in the defaultSchedulerState.')};const X=l?.event_id||void 0,q=l?.master_id||void 0,de=l?.calendar_id||void 0,ge={};Object.entries(s?.additionalFields||{}).forEach(([we,Ae])=>{ge[we]=Ae.value});const De=t?t?.primaryParticipant:s?.primaryParticipant,ke=t?t?.guests||[]:s?.guests||[],xe=t?t?.additionalFields:ge,ve=!this.sessionId&&this.configId?`?configuration_id=${this.configId}`:!this.sessionId&&this.slug&&this.clientId?`?slug=${this.slug}&client_id=${this.clientId}`:"",re=`/v3/scheduling/bookings/${e}${ve}`,he=this.getHeaders(),ye=await this.makeAPIRequest(decodeURIComponent(re),"PATCH",JSON.stringify({start_time:T.getTime()/1e3,end_time:x.getTime()/1e3,timezone:U,additional_fields:xe,guest:{...De},additional_guests:ke,participants:V?[{email:V}]:void 0,email_language:this.getTwoLetterLanguageCode(h),event_id:X,master_id:q,calendar_id:de}),he);if("error"in ye){this.schedulerStore.set("isLoading",!1);const we=ye.error?.type;let Ae=ye.error;if(we&&we in i){const Re=this.getErrorMessage(Ae);Ae=i[we](Re)}return{error:Ae}}const ue=this.schedulerStore.get("reschedulingEventInfo");if("data"in ye)this.schedulerStore.set("eventInfo",ye?.data),ye.data?.booking_id&&this.schedulerStore.set("rescheduleBookingId",ye.data.booking_id);else if(ue)this.schedulerStore.set("eventInfo",ue);else{const we={booking_id:e};this.schedulerStore.set("eventInfo",we)}return this.schedulerStore.set("reschedulingEventInfo",void 0),this.schedulerStore.set("isLoading",!1),ye}async updateBooking(e){this.schedulerStore.set("isLoading",!0);const{bookingId:t,status:i,reason:o}=e,s=this.schedulerStore.get("organizerConfirmationSalt"),l=i==="confirmed"?n.instance.t("confirmBookingErrorTitle"):n.instance.t("rejectBookingErrorTitle");if(!t)return{error:this.errors.component(l).no_booking_id()};if(!s)return{error:this.errors.component(l).no_salt()};const f=!this.sessionId&&this.configId?`?configuration_id=${this.configId}`:!this.sessionId&&this.slug&&this.clientId?`?slug=${this.slug}&client_id=${this.clientId}`:"",h=`/v3/scheduling/bookings/${t}${f}`,m=this.getHeaders(),g=await this.makeAPIRequest(decodeURIComponent(h),"PUT",JSON.stringify({status:i,cancellation_reason:o,salt:s}),m);if("error"in g){this.schedulerStore.set("isLoading",!1);const b=g.error?.type;let T=g.error;if(b&&b in this.errors.api(l)){const x=this.getErrorMessage(T);T=this.errors.api(l)[b](x)}return{error:T}}return"data"in g&&i==="confirmed"?this.schedulerStore.set("confirmedEventInfo",g?.data):"request_id"in g&&i==="cancelled"&&this.schedulerStore.set("cancelledEventInfo",{booking_id:t}),this.schedulerStore.set("organizerConfirmationBookingId",""),this.schedulerStore.set("isLoading",!1),g}async validateGroupEventTimeslot(e){this.schedulerStore.set("isLoading",!0);const t=this.schedulerStore.get("configSettings")?.configuration_id;if(!t)return{error:this.errors.component(n.instance.t("validateTimeslotErrorTitle")).no_config_id()};const i=this.getHeaders(),o=`/v3/scheduling/configurations/${t}/group-events/validate-timeslot`,s=await this.makeAPIRequest(decodeURIComponent(o),"POST",JSON.stringify({...e,start_time:e.start_time.getTime()/1e3,end_time:e.end_time.getTime()/1e3}),i);if("error"in s){this.schedulerStore.set("isLoading",!1);const l=s.error?.type;let f=s.error;if(l&&l in this.errors.api(n.instance.t("validateTimeslotErrorTitle"))){const h=this.getErrorMessage(f);f=this.errors.api(n.instance.t("validateTimeslotErrorTitle"))[l](h)}return this.refetchAvailability(),{error:f}}return this.schedulerStore.set("selectedTimeslot",e),this.schedulerStore.set("showBookingForm",!0),this.schedulerStore.set("isLoading",!1),s}}class Bm{constructor({schedulerAPIURL:e,nylasSchedulerStore:t,sessionId:i,configId:o,slug:s,clientId:l}){if(!e)throw new Error("schedulerAPIURL is required");if(!t)throw new Error("nylasSchedulerStore is required");if(!i&&!o&&!(s&&l))throw new Error("sessionId is required for private configs. If using public config either pass a configurationId or a combination of slug and clientId.");e==="/"&&(e=new URL(window.location.href).origin),this.configId=o,this.sessionId=i,this.schedulerAPIURL=e,this.nylasSchedulerStore=t,this.slug=s,this.clientId=l}init(){n.debug("NylasConnector init")}get schedulerStore(){return this.nylasSchedulerStore}setSchedulerAPIURL(e){e==="/"&&(e=new URL(window.location.href).origin),this.schedulerAPIURL=e,this._schedulerAPIConnector&&this._schedulerAPIConnector.setSchedulerAPIURL(e)}get scheduler(){return this._schedulerAPIConnector?this._schedulerAPIConnector:(this._schedulerAPIConnector=new lT({schedulerAPIURL:this.schedulerAPIURL,schedulerStore:this.schedulerStore,sessionId:this.sessionId,configId:this.configId,slug:this.slug,clientId:this.clientId}),this._schedulerAPIConnector)}resetStores(){this.nylasSchedulerStore.reset()}}function cT(a={}){const e={selectedDate:null,selectedLanguage:n.detectBrowserLanguageCode()||n.LANGUAGE_CODE.en,selectedTimezone:Intl.DateTimeFormat().resolvedOptions().timeZone,selectedTimeslot:null,showBookingForm:!1,availabilityOrderEmails:[],selectableDates:null,availability:[],eventDuration:0,state:"ready",eventInfo:null,cancelledEventInfo:null,isLoading:!1,nylasBranding:!0,...a};n.debug("[defaultNylasStoreState]: ",e);const t=n.createStore(e);return t.onChange("availability",i=>{n.debug("[availability]: ",i);const o=i.map(f=>f.start_time);n.debug("[selectableDates]: ",o),t.set("selectableDates",o);const s=i[0];if(!s)return;const l=Math.floor((s.end_time.getTime()-s.start_time.getTime())/6e4);n.debug("[durationMinutes]: ",l),t.set("eventDuration",l)}),t.reset=()=>{for(const i in e){const o=e[i];t.set(i,o)}},t}const Ma=(a,e)=>{const t=a.isLoading,i=a.showNotification,o=a.nylasBranding,s=a.version;return n.h(n.Fragment,null,i&&n.h("nylas-notification",null),t&&n.h("div",{class:"loading"},n.h("div",{class:"left"},n.h("div",{class:"skeleton"})),n.h("div",{class:"right"},n.h("div",{class:"skeleton"}),n.h("div",{class:"skeleton"}),n.h("div",{class:"skeleton"}),n.h("div",{class:"skeleton"}),n.h("div",{class:"skeleton"}))),!t&&e,n.h("div",{key:"ns-footer",class:"footer",part:"ns_footer"},o&&n.h("a",{href:"https://scheduler.nylas.com?utm_source=powered-by-nylas-logoutm_medium=link&utm_campaign=get-scheduler&utm_id=get-scheduler",class:"powered-by-nylas",target:"_blank",rel:"noreferrer noopener"},"Powered by ",n.h("span",{class:"sr-only"},"Nylas"),n.h("nylas-logo",{"aria-hidden":!0})),n.h("tooltip-component",null,n.h("info-icon",{slot:"tooltip-icon"}),n.h("span",{slot:"tooltip-content"},s))))},jm=(a,e)=>n.h("div",{class:"message-banner"},e),dT=':host{display:flex;flex-direction:column;overflow:visible;border-radius:var(--nylas-border-radius-2x);width:fit-content;background:var(--nylas-base-0);position:relative;box-shadow:0px 4px 8px 2px rgba(0, 0, 0, 0.05), 0px 8px 16px -2px rgba(0, 0, 0, 0.1);--nylas-primary:#2563eb;--nylas-error:#cc4841;--nylas-error-50:#ffeae8;--nylas-error-100:#ffc5bf;--nylas-error-200:#fecaca;--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;font-family:var(--nylas-font-family);font-optical-sizing:auto;font-style:normal;font-variation-settings:"slnt" 0}@media screen and (max-width: 768px){:host{width:auto;min-width:325px}}:root{font-family:inherit}.error{padding:8rem 12rem;color:var(--nylas-base-0);background-color:var(--nylas-error);margin:1.5rem;border-radius:var(--nylas-border-radius-2x)}.message-banner{text-align:right;color:var(--nylas-base-800);padding:1rem;border-bottom:1px solid var(--nylas-color-primary-200);margin:0}.loading{margin:1.5rem;display:flex;gap:1rem}.loading .skeleton{border-radius:var(--nylas-border-radius-2x);animation:pulsate 1.5s infinite}.loading .skeleton:nth-child(2){animation-delay:-100ms}.loading .skeleton:nth-child(3){animation-delay:-200ms}.loading .skeleton:nth-child(4){animation-delay:-300ms}.loading .skeleton:nth-child(5){animation-delay:-400ms}.loading .left .skeleton{height:100%;width:400px}.loading .right .skeleton{height:5rem;width:300px;margin-bottom:1rem}.loading .right .skeleton:last-child{margin-bottom:0}@keyframes pulsate{0%{background-color:var(--nylas-base-50)}50%{background-color:var(--nylas-base-100)}100%{background-color:var(--nylas-base-50)}}.select-date-page,.additional-data-page,.booked-event-page,.manual-confirmation-page,.cancelled-event-page,.cancel-flow-page{border-top-left-radius:var(--nylas-border-radius-2x);border-top-right-radius:var(--nylas-border-radius-2x)}.select-date-page,.additional-data-page{display:flex}@media screen and (max-width: 768px){.select-date-page,.additional-data-page{flex-direction:column}}.booked-event-page,.manual-confirmation-page{background-color:var(--nylas-base-50)}.cancelled-event-page,.manual-confirmation-page,.cancel-flow-page{padding:1rem;height:496px;display:flex;justify-content:center;align-items:center}.booked-event-page,.manual-confirmation-page,.cancelled-event-page,.cancel-flow-page{min-width:784px;background:var(--nylas-base-50)}@media screen and (max-width: 768px){.booked-event-page,.manual-confirmation-page,.cancelled-event-page,.cancel-flow-page{min-width:90%}}.left-panel{display:flex;flex-direction:column;min-width:424px;border-top-left-radius:inherit;background:var(--nylas-base-0);position:relative;padding:1rem 0 0 0;height:624px}@media screen and (max-width: 768px){.left-panel{border-top-right-radius:inherit;min-width:unset;height:auto}}@media screen and (max-width: 768px){.select-date-page .left-panel{height:624px}}.border{margin-left:-20px;margin-right:-20px;border-top-width:1px;height:0.5px;background-color:var(--nylas-base-200)}@media screen and (max-width: 768px){.border{display:none}}.right-panel{min-width:360px;width:360px;background-color:var(--nylas-base-50);height:624px;padding-top:16px;border-left:1px solid var(--nylas-base-200);border-top-right-radius:inherit}.right-panel.reschedule{border-top-right-radius:0px}@media screen and (max-width: 768px){.right-panel{border-top-right-radius:0px;width:inherit;min-width:unset;height:auto;border-left:none}}.right-panel h2{display:flex;margin:0;height:48px;gap:0.5rem;justify-content:center;align-items:center;width:auto;font-size:1.125rem;line-height:1.5rem;font-weight:500;text-align:center;color:var(--nylas-base-800)}.additional-data-page .left-panel{background-color:var(--nylas-base-50)}.additional-data-page .right-panel{background-color:var(--nylas-base-0)}nylas-selected-event-card{height:604px;padding:0 1rem}@media screen and (max-width: 768px){nylas-selected-event-card{height:250px}}.footer{display:flex;justify-content:flex-end;align-items:center;gap:8px;padding:16px;font-size:14px;font-weight:300;color:var(--nylas-base-500);border-top:1px solid var(--nylas-base-200);min-height:24px}.footer .powered-by-nylas{display:flex;align-items:center;text-decoration:none;color:var(--nylas-base-500)}.footer .powered-by-nylas:hover{color:var(--nylas-base-800)}.footer svg{fill:var(--nylas-base-500)}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0, 0, 0, 0);white-space:nowrap;border-width:0}.footer svg{margin-top:1px}nylas-selected-event-card::part(nsec__timezone){position:absolute;bottom:0}nylas-notification{margin:1.5rem;width:-webkit-fill-available;width:-moz-available;position:absolute}nylas-locale-switch{position:absolute;padding:18px 20px;bottom:0;width:-webkit-fill-available;width:-moz-available;border-top:1px solid var(--nylas-base-200)}@media screen and (max-width: 768px){nylas-locale-switch{height:auto}}nylas-date-picker{padding:0 20px}button-component#report-issue{width:auto;position:absolute;bottom:4px;left:16px}.language-feedback-container{width:auto;position:absolute;bottom:4px;left:16px;display:flex;gap:8px;align-items:center}.language-feedback-container button-component#report-issue{position:initial}nylas-feedback-form{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}',Um={title:n.instance.t("genericErrorTitle"),category:Ze.Component},wb=n.proxyCustomElement(class extends n.H{constructor(){super(),this.__registerHost(),this.__attachShadow(),this.init=n.createEvent(this,"init",7),this.schedulerWillLoad=n.createEvent(this,"schedulerWillLoad",7),this.schedulerDidLoad=n.createEvent(this,"schedulerDidLoad",7),this.nylasSchedulerError=n.createEvent(this,"nylasSchedulerError",7),this.nylasSchedulerInfo=n.createEvent(this,"nylasSchedulerInfo",7),this.configSettingsLoaded=n.createEvent(this,"configSettingsLoaded",7),this.bookingRefExtracted=n.createEvent(this,"bookingRefExtracted",7),this.bookedEventInfo=n.createEvent(this,"bookedEventInfo",7),this.initDeferred=!1,this.mode="app",this.schedulerApiUrl="https://api.us.nylas.com",this.nylasBranding=!0,this.eventOverrides={},this.showNotification=!0,this.enableUserFeedback=!0,this.automaticComponentRegistration=!0,this.selectedDateLabel=`${n.instance.t("noDateSelected")}`,this.language=navigator.language,this.showFeedbackModal=!1,this.bookingInfoConfirmed=null,this.version=oa}connectedCallback(){n.debug("[nylas-scheduler] connectedCallback")}async componentWillLoad(){n.debug("[nylas-scheduler] Component will load"),this.version=oa,await new Promise(h=>setTimeout(h,0)),this.enableUserFeedback&&!Tf()&&Rf({dsn:"https://9d5731f1c77ca84c9ed3fb9b3ccf7ee1@o74852.ingest.us.sentry.io/4507889638178816",release:this.version,integrations:h=>[...h.filter(m=>!1),Ff({colorScheme:"system",autoInject:!1})],autoSessionTracking:!1,beforeSend:()=>null});const e=this.schedulerWillLoad.emit(this.host);if("schedulerWillLoad"in this.eventOverrides&&(await this.eventOverrides.schedulerWillLoad(e,this.nylasSchedulerConnector),e.defaultPrevented))return;const t=new URLSearchParams(window.location.search),o=n.normalizeSupportedLanguageCode(t.get("lang"))||n.normalizeSupportedLanguageCode(t.get("language"))||this.defaultLanguage||n.normalizeSupportedLanguageCode(this.bookingInfo?.language)||this.defaultSchedulerState?.selectedLanguage||n.detectBrowserLanguageCode()||n.LANGUAGE_CODE.en;this.language=o,n.instance.changeLanguage(o),this.stores={scheduler:cT({bookingInfo:this.bookingInfo,nylasBranding:this.nylasBranding,themeConfig:this.themeConfig,hour12:this.hour12,...this.defaultSchedulerState,selectedLanguage:o})},this.baseProvider=new vb(this.host,this.stores,this.automaticComponentRegistration,this.eventOverrides),this.refConfigId=this.configurationId;let s;try{if(this.rescheduleBookingRef){const[h,m,g]=n.compactStringToUUIDs(this.rescheduleBookingRef);this.refConfigId=h,this.stores.scheduler.set("rescheduleBookingId",m),s=this.bookingRefExtracted.emit({configurationId:h,bookingId:m})}else if(this.cancelBookingRef){const[h,m,g]=n.compactStringToUUIDs(this.cancelBookingRef);this.refConfigId=h,this.stores.scheduler.set("cancelBookingId",m),s=this.bookingRefExtracted.emit({configurationId:h,bookingId:m})}else if(this.organizerConfirmationBookingRef){const[h,m,g]=n.compactStringToUUIDs(this.organizerConfirmationBookingRef);this.refConfigId=h,this.stores.scheduler.set("organizerConfirmationBookingId",m),this.stores.scheduler.set("organizerConfirmationSalt",g),s=this.bookingRefExtracted.emit({configurationId:h,bookingId:m,salt:g})}}catch(h){n.debug(h);const m=this.rescheduleBookingRef||this.cancelBookingRef||this.organizerConfirmationBookingRef;this.nylasSchedulerError.emit({notification:{...this.getErrorObject({message:`Invalid booking reference: ${m}`})},host:this.host})}if(this.applyThemeConfig(this.themeConfig),"bookingRefExtracted"in this.eventOverrides&&(await this.eventOverrides.bookingRefExtracted(s,this.nylasSchedulerConnector),s.defaultPrevented))return;if(!this.checkIfSessionIdOrConfigIdExists(!1)){this.initDeferred=!0;return}const l=this.baseProvider?.getStore("scheduler");this.nylasSchedulerConnector=new Bm({schedulerAPIURL:this.schedulerApiUrl,sessionId:this.sessionId,configId:this.refConfigId,slug:this.slug,clientId:this.clientId,nylasSchedulerStore:l});const f=this.init.emit(this.host);"init"in this.eventOverrides&&(await this.eventOverrides.init(f,this.nylasSchedulerConnector),f.defaultPrevented)||this.baseProvider?.componentWillLoad(this.nylasSchedulerConnector)}async componentDidLoad(){if(this.initDeferred)return;this.baseProvider?.componentDidLoad(),await Promise.resolve();const e=this.schedulerDidLoad.emit(this.host);"schedulerDidLoad"in this.eventOverrides&&(await this.eventOverrides.schedulerDidLoad(e,this.nylasSchedulerConnector),e.defaultPrevented)||this.checkIfSessionIdOrConfigIdExists()&&await this.performSchedulerDataFetch()}async performSchedulerDataFetch(){this.fetchAbortController?.abort(),this.fetchAbortController=new AbortController;const{signal:e}=this.fetchAbortController;try{this.nylasSchedulerConnector&&(this.schedulerApiUrl&&this.nylasSchedulerConnector.setSchedulerAPIURL(this.schedulerApiUrl),this.sessionId&&(this.nylasSchedulerConnector.sessionId=this.sessionId,this.nylasSchedulerConnector.scheduler.setSessionId(this.sessionId))),this.localizationChanged(this.localization);const t=await this.nylasSchedulerConnector?.scheduler.getUISettings(e);if(e.aborted)return;if(!t||"error"in t){this.nylasSchedulerError.emit({notification:{...this.getErrorObject(t?.error)},host:this.host});return}else{"data"in t&&t.data?.appearance&&n.debug("Appearance settings have been returned from the configuration used byt his scheduling page; please remember to grab them from the configSettingsLoaded event and apply them as desired.");const m=this.configSettingsLoaded.emit({settings:t});if("configSettingsLoaded"in this.eventOverrides&&(await this.eventOverrides.configSettingsLoaded(m,this.nylasSchedulerConnector),e.aborted||m.defaultPrevented))return}const i=this.baseProvider?.getStore("scheduler"),o=i?.get("configSettings")?.scheduler?.available_days_in_future,s=i?.get("selectedTimeslot");if(s&&s?.start_time){if(!this.isTimeslotValid(s))return;if(i?.get("showBookingForm")){i?.set("selectedDate",s.start_time);return}}const l=n.normalizeDateInput(i?.get("selectedDate")),f=i?.get("availability");let h;if(f&&f.length>0)return;if(l){const{startTime:m,endTime:g,endTimeForAvailableDaysInFuture:b}=this.validateAvailableDaysInFuture(l,o||30);l.getTime()<b*1e3&&(h=await this.nylasSchedulerConnector?.scheduler.getAvailability(m,g,e))}else{const m=new Date,{startTime:g,endTime:b,endTimeForAvailableDaysInFuture:T}=this.validateAvailableDaysInFuture(m,o||30);m.getTime()<T*1e3&&(h=await this.nylasSchedulerConnector?.scheduler.getAvailability(g,b,e))}if(e.aborted)return;if((!h||"error"in h)&&this.nylasSchedulerError.emit({notification:{...this.getErrorObject(h?.error)},host:this.host}),!l){let m=new Date;const g=i?.get("availability").find(b=>{const T=n.normalizeDateInput(b.start_time);return T?T>new Date:!1});g&&(m=n.normalizeDateInput(g.start_time)||m),i?.set("selectedDate",m)}}catch(t){if(t.name==="AbortError")return;throw t}}hasValidAuthConfig(){return!!(this.sessionId||this.refConfigId||this.slug&&this.clientId)}async performDeferredInit(){if(!this.hasValidAuthConfig()||!this.initDeferred||!this.baseProvider)return;document.body.dispatchEvent(new CustomEvent("nylasSchedulerClearNotifications",{detail:{host:this.host},bubbles:!0})),this.initDeferred=!1,this.refConfigId=this.refConfigId||this.configurationId,this.baseProvider.eventOverrides=this.eventOverrides;const e=this.baseProvider.getStore("scheduler");this.nylasSchedulerConnector=new Bm({schedulerAPIURL:this.schedulerApiUrl,sessionId:this.sessionId,configId:this.refConfigId,slug:this.slug,clientId:this.clientId,nylasSchedulerStore:e});const t=this.init.emit(this.host);if("init"in this.eventOverrides&&(await this.eventOverrides.init(t,this.nylasSchedulerConnector),t.defaultPrevented))return;await this.baseProvider.componentWillLoad(this.nylasSchedulerConnector),this.baseProvider.componentDidLoad(),await Promise.resolve();const i=this.schedulerDidLoad.emit(this.host);"schedulerDidLoad"in this.eventOverrides&&(await this.eventOverrides.schedulerDidLoad(i,this.nylasSchedulerConnector),i.defaultPrevented)||await this.performSchedulerDataFetch()}async authPropsChanged(e){e&&"bookingRefExtracted"in this.eventOverrides&&(await this.eventOverrides.bookingRefExtracted(e,this.nylasSchedulerConnector),e.defaultPrevented)||this.initDeferred&&this.hasValidAuthConfig()&&this.performDeferredInit()}configurationIdChanged(){!this.rescheduleBookingRef&&!this.cancelBookingRef&&!this.organizerConfirmationBookingRef&&(this.refConfigId=this.configurationId),this.authPropsChanged()}schedulerApiUrlChanged(){this.nylasSchedulerConnector&&this.schedulerApiUrl&&(this.nylasSchedulerConnector.setSchedulerAPIURL(this.schedulerApiUrl),document.body.dispatchEvent(new CustomEvent("nylasSchedulerClearNotifications",{detail:{host:this.host},bubbles:!0})),this.stores?.scheduler.set("availability",[]),this.performSchedulerDataFetch())}sessionIdChanged(){this.nylasSchedulerConnector&&this.sessionId&&(this.nylasSchedulerConnector.sessionId=this.sessionId,this.nylasSchedulerConnector.scheduler.setSessionId(this.sessionId),document.body.dispatchEvent(new CustomEvent("nylasSchedulerClearNotifications",{detail:{host:this.host},bubbles:!0})),this.performSchedulerDataFetch()),this.authPropsChanged()}slugChanged(){this.authPropsChanged()}clientIdChanged(){this.authPropsChanged()}componentDisconnected(){this.baseProvider?.componentDisconnected()}bookingInfoChanged(e){this.stores?.scheduler.set("bookingInfo",e),e?.language&&!this.defaultLanguage&&this.stores?.scheduler.set("selectedLanguage",n.normalizeSupportedLanguageCode(e.language)||n.LANGUAGE_CODE.en)}rescheduleBookingRefChanged(e){let t;if(e)try{const[i,o]=n.compactStringToUUIDs(e);this.stores?.scheduler.set("rescheduleBookingId",o),this.refConfigId=i,this.nylasSchedulerConnector?.scheduler.setConfigId(i),t=this.bookingRefExtracted.emit({configurationId:i,bookingId:o})}catch(i){n.debug(i),this.nylasSchedulerError.emit({notification:{...this.getErrorObject({message:`Invalid booking reference: ${e}`})},host:this.host})}this.authPropsChanged(t)}cancelBookingRefChanged(e){let t;if(e)try{const[i,o]=n.compactStringToUUIDs(e);this.stores?.scheduler.set("cancelBookingId",o),this.refConfigId=i,this.nylasSchedulerConnector?.scheduler.setConfigId(i),t=this.bookingRefExtracted.emit({configurationId:i,bookingId:o})}catch(i){n.debug(i),this.nylasSchedulerError.emit({notification:{...this.getErrorObject({message:`Invalid booking reference: ${e}`})},host:this.host})}this.authPropsChanged(t)}organizerConfirmationBookingRefChanged(e){let t;if(e)try{const[i,o,s]=n.compactStringToUUIDs(e);this.stores?.scheduler.set("organizerConfirmationBookingId",o),this.stores?.scheduler.set("organizerConfirmationSalt",s),this.refConfigId=i,this.nylasSchedulerConnector?.scheduler.setConfigId(i),t=this.bookingRefExtracted.emit({configurationId:i,bookingId:o,salt:s})}catch(i){n.debug(i),this.nylasSchedulerError.emit({notification:{...this.getErrorObject({message:`Invalid booking reference: ${e}`})},host:this.host})}this.authPropsChanged(t)}localizationChanged(e){e&&Object.keys(e).forEach(t=>{t in n.LANGUAGE_CODE&&n.instance.addResourceBundle(t,"translation",e[t],!1,!0)})}defaultLanguageChanged(e){e&&(this.stores?.scheduler.set("selectedLanguage",e),n.instance.changeLanguage(e))}themeConfigChanged(e){this.baseProvider?.getStore("scheduler")?.set("themeConfig",e),this.applyThemeConfig(e)}languageChanged(e){const t=n.normalizeSupportedLanguageCode(e.detail)||n.LANGUAGE_CODE.en;this.language=t,n.instance.changeLanguage(t),this.stores?.scheduler?.set("selectedLanguage",t)}async registerComponentHandler(e){this.baseProvider?.registerComponent(e.detail)}async unregisterComponentHandler(e){this.baseProvider?.unregisterComponent(e.detail)}async monthChangedHandler(e){const t=e.detail,i=this.nylasSchedulerConnector?.schedulerStore?.get("configSettings")?.scheduler?.available_days_in_future,{startTime:o,endTime:s,endTimeForAvailableDaysInFuture:l}=this.validateAvailableDaysInFuture(t,i||30);if(!e.defaultPrevented&&o<l&&t.getTime()<l*1e3){const f=await this.nylasSchedulerConnector?.scheduler.getAvailability(o,s);(!f||"error"in f)&&this.nylasSchedulerError.emit({notification:{...this.getErrorObject(f?.error)},host:this.host});const h=this.stores?.scheduler.get("selectableDates");h&&h.length>0&&this.stores?.scheduler.set("selectedDate",h[0])}}mapToBookingData(e){const t=this.stores?.scheduler.get("selectedTimeslot"),i=this.stores?.scheduler.get("selectedLanguage"),o=this.stores?.scheduler.get("selectedTimezone"),s=t?.start_time?new Date(t?.start_time).getTime()/1e3:"",l=t?.end_time?new Date(t?.end_time).getTime()/1e3:"";return{additional_guests:e.guests,guest:{...e.primaryParticipant},additional_fields:{...e.additionalFields},start_time:s,end_time:l,email_language:i,timezone:o}}async bookButtonClickedHandler(e){if(e.defaultPrevented)return;const t=e.detail,i=this.mapToBookingData(t);this.bookingInfoConfirmed=t;const s=this.nylasSchedulerConnector?.schedulerStore?.get("rescheduleBookingId");if(s){const m=await this.nylasSchedulerConnector?.scheduler.rescheduleBooking(s,t);(!m||"error"in m)&&this.nylasSchedulerError.emit({notification:{...this.getErrorObject(m?.error)},host:this.host});const g=m?.data,b=this.bookedEventInfo.emit({...m,data:{...g,...i}});this.bookingInfoConfirmed={...this.bookingInfoConfirmed,...g},"bookedEventInfo"in this.eventOverrides&&await this.eventOverrides.bookedEventInfo(b,this.nylasSchedulerConnector);return}const l=await this.nylasSchedulerConnector?.scheduler.bookTimeslot(t);(!l||"error"in l)&&this.nylasSchedulerError.emit({notification:{...this.getErrorObject(l?.error)},host:this.host});const f=l?.data,h=this.bookedEventInfo.emit({...l,data:{...f,...i}});this.bookingInfoConfirmed={...this.bookingInfoConfirmed,...f},"bookedEventInfo"in this.eventOverrides&&await this.eventOverrides.bookedEventInfo(h,this.nylasSchedulerConnector)}dateSelectedHandler(e){const t=n.normalizeDateInput(e.detail);this.selectedDateLabel=t?this.formatSelectedDateLabel(t):`${n.instance.t("noDateSelected")}`}getSelectedLanguage(){const e=this.stores?.scheduler.get("selectedLanguage")||this.defaultLanguage||n.detectBrowserLanguageCode()||n.LANGUAGE_CODE.en;return n.normalizeSupportedLanguageCode(e)||n.LANGUAGE_CODE.en}getSelectedDateLocale(){const e=this.getSelectedLanguage();return n.LANGUAGE_CODE_TO_LOCALE_MAP[e]||e||n.LANGUAGE_CODE_TO_LOCALE_MAP[n.LANGUAGE_CODE.en]}formatSelectedDateLabel(e){return n.capitalizeFirstLetter(e.toLocaleDateString(this.getSelectedDateLocale(),{dateStyle:"full"}))}cancelBookedEventErrorHandler(e){this.nylasSchedulerError.emit({notification:{...this.getErrorObject(e.detail.error)},host:this.host})}cancelBookedEventValidationErrorHandler(e){this.nylasSchedulerError.emit({notification:{...this.getErrorObject(e.detail.error)},host:this.host})}rescheduleBookedEventErrorHandler(e){this.nylasSchedulerError.emit({notification:{...this.getErrorObject(e.detail.error)},host:this.host})}confirmBookingErrorHandler(e){this.nylasSchedulerError.emit({notification:{...this.getErrorObject(e.detail.error)},host:this.host})}feedbackModalClosedHandler(){this.showFeedbackModal=!1}eventIsFullHandler(e){const t=e.detail.error;e.detail.type==="error"?this.nylasSchedulerError.emit({notification:{...this.getErrorObject({message:t})},host:this.host}):this.nylasSchedulerInfo.emit({notification:{title:"Event is full",category:Ze.Component,type:ct.Info,description:"The event you selected is full. Please try a different time.",id:new Date().getTime().toString(),ttl:3e3},host:this.host})}feedbackSubmittedHandler(e){Sf("Scheduling Page User Feedback",{extra:{configId:this.configurationId,slug:this.slug}});const t={message:e.detail.feedback};Sr(t,{includeReplay:!0,captureContext:{tags:{"nylas-web-element":"nylas-scheduling","nylas-web-element-version":this.version,"nylas-config-id":this.configurationId,"nylas-slug":this.slug,"host-url":window.location.href},extra:{configId:this.configurationId,slug:this.slug,version:this.version}}}),this.showFeedbackModal=!1}async getNylasSchedulerStore(){return this.baseProvider?.getStore("scheduler")}async getNylasSchedulerConnector(){return this.nylasSchedulerConnector}async getRef(){return this.host}getErrorObject(e){return{title:e?.title||Um.title,category:e?.category||Um.category,type:ct.Error,description:e?.message||"",id:new Date().getTime().toString(),ttl:"none"}}checkIfSessionIdOrConfigIdExists(e=!0){if(!this.sessionId&&!this.refConfigId&&!(this.slug&&this.clientId)){if(e){let t="";this.sessionId||(t+=n.instance.t("sessionIdRequiredErrorMessage")),!this.sessionId&&!this.refConfigId&&!(this.slug&&this.clientId)&&(t=n.instance.t("sessionIdRequiredErrorMessage")+" "+n.instance.t("publicConfigErrorMessage")),this.nylasSchedulerError.emit({notification:{title:n.instance.t("schedulingComponentErrorTitle"),category:Ze.Component,type:ct.Error,description:t,id:new Date().getTime().toString(),ttl:"none"},host:this.host})}return!1}return!0}isTimeslotValid(e){return new Date(e.start_time)<new Date?(this.nylasSchedulerError.emit({notification:{title:n.instance.t("invalidTimeslotErrorTitle"),category:Ze.Component,type:ct.Error,description:n.instance.t("invalidTimeslotErrorMessage"),id:new Date().getTime().toString(),ttl:"none"},host:this.host}),!1):!0}validateAvailableDaysInFuture(e,t){const i=new Date,o=new Date(e.getFullYear(),e.getMonth(),1).getTime()/1e3,s=new Date(e.getFullYear(),e.getMonth()+1,1).getTime()/1e3,l=Math.floor(n.addDaysToCurrentDate(i,t).getTime()/1e3),f=Math.min(l,s);return{startTime:o<i.getTime()/1e3?Math.floor(i.getTime()/1e3):o,endTime:f,endTimeForAvailableDaysInFuture:l}}applyThemeConfig(e){if(e)for(const[t,i]of Object.entries(e))this.host.style.setProperty(`${t}`,i)}onFeedbackClick(e){e.preventDefault(),this.showFeedbackModal=!0}redirectToCustomUrl(e){window.location.assign(e)}nylasFormDropdownChangedHandler(e){const{name:t,value:i}=e.detail;if(t==="language"){const o=n.LANGUAGE_CODE[i];n.instance.changeLanguage(o),this.stores?.scheduler?.set("selectedLanguage",o)}}render(){const e=this.mode==="app",t=this.baseProvider?.getStore("scheduler"),i=t?.get("eventInfo"),o=t?.get("showBookingForm"),s=t?.get("cancelledEventInfo"),l=t?.get("cancelBookingId"),f=t?.get("selectedTimeslot"),h=t?.get("rescheduleBookingId"),m=t?.get("organizerConfirmationBookingId"),g=t?.get("rejectBookingId"),b=t?.get("confirmedEventInfo"),T=t?.get("nylasBranding")||this.nylasBranding,x=n.normalizeDateInput(t?.get("selectedDate")),H=t?.get("configSettings")?.scheduler?.confirmation_redirect_url,V=Object.keys(n.LANGUAGE_MAP).map(q=>({label:n.LANGUAGE_MAP[q],value:q})),U=this.getSelectedLanguage(),X=x?this.formatSelectedDateLabel(x):`${n.instance.t("noDateSelected")}`;if(e&&(l||g)&&!s)return n.h(n.Host,null,n.h(Ma,{version:this.version,nylasBranding:T,isLoading:this.isLoading,showNotification:this.showNotification},n.h("div",{class:"cancel-flow-page",part:"cancel-flow-page"},n.h("nylas-cancel-booking-form",{selectedTimeslot:f,cancelBookingId:l,rejectBookingId:g,exportparts:"ncbf, ncbf__icon, ncbf__title, ncbf__description, ncbf__reason-textarea, ncbf__button-cta, ncbf__button-outline, ncbf__card"}))),n.h("div",{class:"language-feedback-container"},this.enableUserFeedback&&n.h("button-component",{id:"report-issue",variant:"basic",onClick:q=>this.onFeedbackClick(q)},n.h("feedback-icon",null)),n.h("select-dropdown",{name:"language",searchPlaceholder:n.instance.t("search"),options:V,withChevron:!1,themeConfig:this.themeConfig,defaultSelectedOption:V.find(q=>q.value==U),exportparts:"sd_dropdown: nse__language-dropdown, sd_dropdown-button: nse__language-drop-button, sd_dropdown-content: nse__language-drop-content, sd_dropdown_label: nse__language-drop-label"},n.h("span",{slot:"select-icon"},n.h("translate-icon",{width:"20",height:"20"})))),this.showFeedbackModal&&n.h("nylas-feedback-form",null));if(e&&m)return n.h(n.Host,null,n.h(Ma,null,n.h("div",{class:"manual-confirmation-page",part:"manual-confirmation-page"},n.h("nylas-organizer-confirmation-card",{organizerConfirmationBookingId:m,exportparts:"nmcc, nmcc__title, nmcc__description, nmcc__button-cta, nmcc__button-outline"}))),n.h("div",{class:"language-feedback-container"},this.enableUserFeedback&&n.h("button-component",{id:"report-issue",variant:"basic",onClick:q=>this.onFeedbackClick(q)},n.h("feedback-icon",null)),n.h("select-dropdown",{name:"language",searchPlaceholder:n.instance.t("search"),options:V,withChevron:!1,themeConfig:this.themeConfig,defaultSelectedOption:V.find(q=>q.value==U),exportparts:"sd_dropdown: nse__language-dropdown, sd_dropdown-button: nse__language-drop-button, sd_dropdown-content: nse__language-drop-content, sd_dropdown_label: nse__language-drop-label"},n.h("span",{slot:"select-icon"},n.h("translate-icon",{width:"20",height:"20"})))),this.showFeedbackModal&&n.h("nylas-feedback-form",null));if(e&&s)return n.h(n.Host,null,n.h(Ma,{version:this.version,nylasBranding:T,isLoading:this.isLoading,showNotification:this.showNotification},n.h("div",{class:"cancelled-event-page",part:"cancelled-event-page"},n.h("nylas-cancelled-event-card",{cancelledEventInfo:s,exportparts:"ncec, ncec__icon, ncec__title, ncec__description, ncec__button-outline, ncec__card"}))),n.h("div",{class:"language-feedback-container"},this.enableUserFeedback&&n.h("button-component",{id:"report-issue",variant:"basic",onClick:q=>this.onFeedbackClick(q)},n.h("feedback-icon",null)),n.h("select-dropdown",{name:"language",searchPlaceholder:n.instance.t("search"),options:V,withChevron:!1,themeConfig:this.themeConfig,defaultSelectedOption:V.find(q=>q.value==U),exportparts:"sd_dropdown: nse__language-dropdown, sd_dropdown-button: nse__language-drop-button, sd_dropdown-content: nse__language-drop-content, sd_dropdown_label: nse__language-drop-label"},n.h("span",{slot:"select-icon"},n.h("translate-icon",{width:"20",height:"20"})))),this.showFeedbackModal&&n.h("nylas-feedback-form",null));if(e&&b)return n.h(n.Host,null,n.h(Ma,{version:this.version,nylasBranding:T,isLoading:this.isLoading,showNotification:this.showNotification},n.h("div",{class:"cancelled-event-page",part:"confirmed-event-page"},n.h("nylas-confirmed-event-card",{confirmedEventInfo:b,exportparts:"ncec, ncec__icon, ncec__title, ncec__description, ncec__button-outline, ncec__card"}))),n.h("div",{class:"language-feedback-container"},this.enableUserFeedback&&n.h("button-component",{id:"report-issue",variant:"basic",onClick:q=>this.onFeedbackClick(q)},n.h("feedback-icon",null)),n.h("select-dropdown",{name:"language",searchPlaceholder:n.instance.t("search"),options:V,withChevron:!1,themeConfig:this.themeConfig,defaultSelectedOption:V.find(q=>q.value==U),exportparts:"sd_dropdown: nse__language-dropdown, sd_dropdown-button: nse__language-drop-button, sd_dropdown-content: nse__language-drop-content, sd_dropdown_label: nse__language-drop-label"},n.h("span",{slot:"select-icon"},n.h("translate-icon",{width:"20",height:"20"})))),this.showFeedbackModal&&n.h("nylas-feedback-form",null));if(e&&i&&H){const q=this.bookingInfoConfirmed?.primaryParticipant,de=this.bookingInfoConfirmed?.location,ge=this.bookingInfoConfirmed?.booking_ref,De=this.bookingInfoConfirmed?.additionalFields||{};if(this.bookingInfo&&typeof this.bookingInfo?.additionalFields<"u"){const Ae=this.bookingInfo.additionalFields;Object.keys(Ae).forEach(Re=>{!De[Re]&&Ae?.[Re]&&(De[Re]=Ae[Re].value)})}const ke=this.stores?.scheduler.get("selectedTimeslot"),xe=this.stores?.scheduler.get("selectedTimezone"),ve=this.stores?.scheduler.get("selectedLanguage"),re=this.stores?.scheduler.get("configSettings"),he=this.configurationId?this.configurationId:re?.configuration_id,ye=window.location.search,ue=new URLSearchParams(ye);ue.set("booking_id",i.booking_id),q?.name&&ue.set("name",q.name),q?.email&&ue.set("email",q.email),ke?.start_time&&ue.set("start_time",(new Date(ke.start_time).getTime()/1e3).toString()),ke?.end_time&&ue.set("end_time",(new Date(ke.end_time).getTime()/1e3).toString()),xe&&ue.set("tz",xe),ve&&ue.set("language",ve),De&&ue.set("additional_values",JSON.stringify(De)),this.slug&&ue.set("page_slug",this.slug),he&&ue.set("config_id",he),de&&ue.set("location",de),ge&&ue.set("booking_ref",ge);const we=new URL(H,window.location.origin);ue.forEach((Ae,Re)=>{we.searchParams.set(Re,Ae)}),this.redirectToCustomUrl(we.toString());return}if(e&&i)return n.h(n.Host,null,n.h(Ma,{version:this.version,nylasBranding:T,isLoading:this.isLoading,showNotification:this.showNotification},n.h("div",{class:"booked-event-page",part:"booked-event-page ns_booked-event-page"},n.h("nylas-booked-event-card",{selectedTimeslot:f,eventInfo:i,exportparts:"nbec, nbec__title, nbec__card, nbec__description, nbec__button-outline, nbec__cancel-cta, nbec__reschedule-cta"}))),n.h("div",{class:"language-feedback-container"},this.enableUserFeedback&&n.h("button-component",{id:"report-issue",variant:"basic",onClick:q=>this.onFeedbackClick(q)},n.h("feedback-icon",null)),n.h("select-dropdown",{name:"language",searchPlaceholder:n.instance.t("search"),options:V,withChevron:!1,themeConfig:this.themeConfig,defaultSelectedOption:V.find(q=>q.value==U),exportparts:"sd_dropdown: nse__language-dropdown, sd_dropdown-button: nse__language-drop-button, sd_dropdown-content: nse__language-drop-content, sd_dropdown_label: nse__language-drop-label"},n.h("span",{slot:"select-icon"},n.h("translate-icon",{width:"20",height:"20"})))),this.showFeedbackModal&&n.h("nylas-feedback-form",null));if(e&&(!i||h)&&!o){const q=this.host.querySelector('[slot="timeslot-picker-cta-label"]');return n.h(n.Host,null,n.h(Ma,{version:this.version,nylasBranding:T,isLoading:this.isLoading,showNotification:this.showNotification},h&&n.h(jm,null,`${n.instance.t("rescheduleTitle")}`),n.h("div",{class:"select-date-page",part:"select-date-page ns_select-date-page"},n.h("div",{class:"left-panel",part:"ns_left-panel"},n.h("nylas-date-picker",{exportparts:"ndp, ndp__title, ndp__month-header, ndp__month-button, ndp__day, ndp__date, ndp__date--disabled, ndp__date--selected, ndp__date--current-day, ndp__date--current-month"}),n.h("nylas-locale-switch",{exportparts:"nls, nls__timezone, nls__timezone-dropdown, nls__timezone-drop-button, nls__timezone-drop-button-selected-label, nls__timezone-drop-content, nls__timezone-drop-label, nls__language, nls__language-dropdown, nls__language-drop-button, nls__language-drop-content, nls__language-drop-label"})),n.h("div",{class:`right-panel ${h?"reschedule":""}`,part:`ns_right-panel ${h?"ns_reschedule":""}`},n.h("h2",{part:"ns_right-panel__title"},n.h("calendar-icon",{part:"ns_right-panel__calendar-icon"}),n.h("span",{id:"selectedDate",part:"ns_right-panel__selected-date"},X)),n.h("nylas-timeslot-picker",{exportparts:"ntp, ntp__time-picker-wrapper, ntp__timeslots, ntp__timeslot, ntp__timeslot--selected, ntp__button-primary"},q&&n.h("span",{slot:"timeslot-picker-cta-label"},n.h("slot",{name:"timeslot-picker-cta-label"})))))),this.enableUserFeedback&&n.h("button-component",{id:"report-issue",variant:"basic",onClick:de=>this.onFeedbackClick(de)},n.h("feedback-icon",null)),this.showFeedbackModal&&n.h("nylas-feedback-form",null))}return e&&!i&&o?n.h(n.Host,null,n.h(Ma,{version:this.version,nylasBranding:T,isLoading:this.isLoading,showNotification:this.showNotification},h&&n.h(jm,null,`${n.instance.t("rescheduleTitle")}`),n.h("div",{class:"additional-data-page",part:"additional-data-page ns_additional-data-page"},n.h("div",{class:"left-panel ns_left-panel",part:"ns_left-panel"},n.h("div",{class:"wrapper",part:"ns_left-panel__wrapper"},n.h("nylas-selected-event-card",{exportparts:"nsec, nsec__card, nsec__icon, nsec__date, nsec__time, nsec__timezone"}))),n.h("div",{class:`right-panel ${h?"reschedule":""}`,part:`ns_right-panel ${h?"ns_reschedule":""}`},n.h("nylas-booking-form",{exportparts:"nbf, nbf__input-textfield, nbf__button-ghost, nbf__button-outline, nbf__button-primary, nbf__input-wrapper, nbf__checkbox-component, nbf__radio-button-group, nbf__textarea-component, nbf__dropdown, nbf__dropdown-button, nbf__dropdown-content"})))),n.h("div",{class:"language-feedback-container"},this.enableUserFeedback&&n.h("button-component",{id:"report-issue",variant:"basic",onClick:q=>this.onFeedbackClick(q)},n.h("feedback-icon",null)),n.h("select-dropdown",{name:"language",searchPlaceholder:n.instance.t("search"),options:V,withChevron:!1,themeConfig:this.themeConfig,defaultSelectedOption:V.find(q=>q.value==U),exportparts:"sd_dropdown: nse__language-dropdown, sd_dropdown-button: nse__language-drop-button, sd_dropdown-content: nse__language-drop-content, sd_dropdown_label: nse__language-drop-label"},n.h("span",{slot:"select-icon"},n.h("translate-icon",{width:"20",height:"20"})))),this.showFeedbackModal&&n.h("nylas-feedback-form",null)):n.h(n.Host,null,n.h("slot",null))}get host(){return this}static get watchers(){return{configurationId:["configurationIdChanged"],schedulerApiUrl:["schedulerApiUrlChanged"],sessionId:["sessionIdChanged"],slug:["slugChanged"],clientId:["clientIdChanged"],bookingInfo:["bookingInfoChanged"],rescheduleBookingRef:["rescheduleBookingRefChanged"],cancelBookingRef:["cancelBookingRefChanged"],organizerConfirmationBookingRef:["organizerConfirmationBookingRefChanged"],localization:["localizationChanged"],defaultLanguage:["defaultLanguageChanged"],themeConfig:["themeConfigChanged"]}}static get style(){return dT}},[257,"nylas-scheduling",{mode:[1],defaultSchedulerState:[16,"default-scheduler-store-state"],sessionId:[1,"session-id"],schedulerApiUrl:[1,"scheduler-api-url"],bookingInfo:[16,"booking-info"],rescheduleBookingRef:[1,"reschedule-booking-ref"],cancelBookingRef:[1,"cancel-booking-ref"],organizerConfirmationBookingRef:[1,"organizer-confirmation-booking-ref"],configurationId:[1,"configuration-id"],slug:[1],clientId:[1,"client-id"],nylasBranding:[4,"nylas-branding"],eventOverrides:[16,"event-overrides"],isLoading:[4,"is-loading"],themeConfig:[16,"theme-config"],localization:[16],defaultLanguage:[1,"default-language"],showNotification:[4,"show-notification"],enableUserFeedback:[4,"enable-user-feedback"],hour12:[4,"hour-1-2"],automaticComponentRegistration:[32],selectedDateLabel:[32],refConfigId:[32],language:[32],showFeedbackModal:[32],bookingInfoConfirmed:[32],version:[32],getNylasSchedulerStore:[64],getNylasSchedulerConnector:[64],getRef:[64]},[[0,"languageChanged","languageChanged"],[0,"registerComponent","registerComponentHandler"],[0,"unregisterComponent","unregisterComponentHandler"],[0,"monthChanged","monthChangedHandler"],[0,"detailsConfirmed","bookButtonClickedHandler"],[0,"dateSelected","dateSelectedHandler"],[0,"cancelBookedEventError","cancelBookedEventErrorHandler"],[0,"cancelBookedEventValidationError","cancelBookedEventValidationErrorHandler"],[0,"rescheduleBookedEventError","rescheduleBookedEventErrorHandler"],[0,"confirmBookingError","confirmBookingErrorHandler"],[0,"feedbackModalClosed","feedbackModalClosedHandler"],[0,"validateTimeslotError","eventIsFullHandler"],[0,"feedbackSubmitted","feedbackSubmittedHandler"],[0,"nylasFormDropdownChanged","nylasFormDropdownChangedHandler"]],{configurationId:["configurationIdChanged"],schedulerApiUrl:["schedulerApiUrlChanged"],sessionId:["sessionIdChanged"],slug:["slugChanged"],clientId:["clientIdChanged"],bookingInfo:["bookingInfoChanged"],rescheduleBookingRef:["rescheduleBookingRefChanged"],cancelBookingRef:["cancelBookingRefChanged"],organizerConfirmationBookingRef:["organizerConfirmationBookingRefChanged"],localization:["localizationChanged"],defaultLanguage:["defaultLanguageChanged"],themeConfig:["themeConfigChanged"]}]);function fT(){if(typeof customElements>"u")return;["nylas-scheduling","add-circle-icon","button-component","calendar-cancel-icon","calendar-check-icon","calendar-icon","checkbox-component","checkmark-circle-icon","chevron-icon","clock-icon","close-icon","feedback-icon","globe-icon","info-icon","input-component","loading-icon","multi-select-dropdown","nylas-booked-event-card","nylas-booking-form","nylas-cancel-booking-form","nylas-cancelled-event-card","nylas-confirmed-event-card","nylas-date-component","nylas-date-picker","nylas-feedback-form","nylas-locale-switch","nylas-logo","nylas-notification","nylas-organizer-confirmation-card","nylas-selected-event-card","nylas-timeslot-picker","person-icon","radio-button-group","search-icon","select-dropdown","textarea-component","tooltip-component","translate-icon","warning-icon"].forEach(e=>{switch(e){case"nylas-scheduling":customElements.get(e)||customElements.define(e,wb);break;case"add-circle-icon":customElements.get(e)||wn();break;case"button-component":customElements.get(e)||Rt();break;case"calendar-cancel-icon":customElements.get(e)||nr();break;case"calendar-check-icon":customElements.get(e)||mo();break;case"calendar-icon":customElements.get(e)||_a();break;case"checkbox-component":customElements.get(e)||qn();break;case"checkmark-circle-icon":customElements.get(e)||Fd();break;case"chevron-icon":customElements.get(e)||Xe();break;case"clock-icon":customElements.get(e)||ka();break;case"close-icon":customElements.get(e)||zt();break;case"feedback-icon":customElements.get(e)||vo();break;case"globe-icon":customElements.get(e)||cn();break;case"info-icon":customElements.get(e)||Ke();break;case"input-component":customElements.get(e)||Ft();break;case"loading-icon":customElements.get(e)||At();break;case"multi-select-dropdown":customElements.get(e)||Yn();break;case"nylas-booked-event-card":customElements.get(e)||Ug();break;case"nylas-booking-form":customElements.get(e)||ly();break;case"nylas-cancel-booking-form":customElements.get(e)||cy();break;case"nylas-cancelled-event-card":customElements.get(e)||dy();break;case"nylas-confirmed-event-card":customElements.get(e)||hy();break;case"nylas-date-component":customElements.get(e)||On();break;case"nylas-date-picker":customElements.get(e)||gy();break;case"nylas-feedback-form":customElements.get(e)||Fo();break;case"nylas-locale-switch":customElements.get(e)||mb();break;case"nylas-logo":customElements.get(e)||yb();break;case"nylas-notification":customElements.get(e)||Ni();break;case"nylas-organizer-confirmation-card":customElements.get(e)||bb();break;case"nylas-selected-event-card":customElements.get(e)||kb();break;case"nylas-timeslot-picker":customElements.get(e)||Eb();break;case"person-icon":customElements.get(e)||hf();break;case"radio-button-group":customElements.get(e)||Li();break;case"search-icon":customElements.get(e)||ut();break;case"select-dropdown":customElements.get(e)||pt();break;case"textarea-component":customElements.get(e)||Ln();break;case"tooltip-component":customElements.get(e)||Qe();break;case"translate-icon":customElements.get(e)||qa();break;case"warning-icon":customElements.get(e)||Ka();break}})}const uT=wb,hT=fT,pT=Hu,mT=Cb,gT=Pu,yT=kb,bT=wu,vT=jr,CT=zg,_T=ra,kT=Tu,ET=Du,wT=Mu,xT=Eb,ST=cb,TT=zr,DT=db,IT=Br,AT=ub,RT=Iu,OT=fy,LT=Hi,HT=py,PT=hf,MT=".sc-play-icon-h{display:flex}",xb=n.proxyCustomElement(class extends n.H{constructor(){super(),this.__registerHost(),this.width="15",this.height="15"}render(){return n.h("svg",{key:"93cc2bb552af4df81f405472ed3189a41d4f07e4",width:this.width,height:this.height,viewBox:"0 0 24 24",fill:"auto",xmlns:"http://www.w3.org/2000/svg"},n.h("path",{key:"fe499e6ce2f2c3224a3695a69ea83af71d6f18aa",d:"M21 12L3 21V3L21 12Z",stroke:"auto","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"}))}static get style(){return MT}},[258,"play-icon",{width:[1],height:[1]}]);function FT(){if(typeof customElements>"u")return;["play-icon"].forEach(e=>{switch(e){case"play-icon":customElements.get(e)||customElements.define(e,xb);break}})}const NT=xb,$T=FT,zT=Wg,BT=Oi,jT=sy,UT=Li,VT=".sc-refresh-icon-h{display:flex}",Sb=n.proxyCustomElement(class extends n.H{constructor(){super(),this.__registerHost(),this.width="15",this.height="15"}render(){return n.h("svg",{key:"ef3a65d8c263401fa75f041e3ea42948287da287",fill:"auto",width:this.width,height:this.height,viewBox:"0 0 32 32",version:"1.1",xmlns:"http://www.w3.org/2000/svg"},n.h("path",{key:"ceacbf9e9dba4957b9f884232efe24d7de5a3c91",d:"M15.544 28.080c-0.002-0.006-0.008-0.010-0.012-0.015l-2.873-4.489c-0.204-0.335-0.646-0.454-0.992-0.266l-0.256 0.157c-0.344 0.188-0.337 0.673-0.133 1.008l1.841 2.857c-0.157-0.035-0.316-0.063-0.471-0.103-3.224-0.843-5.953-3.026-7.485-5.988-1.448-2.797-1.72-5.99-0.766-8.992s3.118-5.452 5.915-6.899c0.476-0.247 0.662-0.832 0.416-1.308-0.246-0.477-0.832-0.663-1.308-0.416-3.258 1.686-5.763 4.54-6.874 8.036s-0.794 7.215 0.892 10.473c1.786 3.448 4.963 5.989 8.72 6.973 0.043 0.011 0.087 0.017 0.13 0.028l-2.541 1.288c-0.344 0.189-0.458 0.613-0.254 0.948l0.098 0.256c0.205 0.335 0.557 0.454 0.9 0.266l4.651-2.381c0.006-0.004 0.012-0.003 0.018-0.007l0.312-0.171c0.172-0.095 0.287-0.249 0.332-0.422 0.047-0.172 0.025-0.364-0.076-0.531zM28.559 10.025c-1.783-3.447-4.862-5.988-8.618-6.972-0.267-0.070-0.541-0.124-0.814-0.179l2.494-1.265c0.344-0.189 0.549-0.614 0.345-0.949l-0.099-0.255c-0.205-0.336-0.648-0.454-0.991-0.267l-4.651 2.381c-0.006 0.003-0.012 0.002-0.018 0.006l-0.312 0.171c-0.173 0.095-0.287 0.249-0.332 0.422-0.047 0.172-0.025 0.364 0.077 0.53l0.185 0.304c0.003 0.006 0.008 0.010 0.012 0.016l2.873 4.489c0.203 0.335 0.646 0.454 0.991 0.266l0.226-0.157c0.344-0.188 0.366-0.673 0.163-1.008l-1.85-2.87c0.407 0.063 0.811 0.138 1.207 0.242 3.226 0.845 5.856 3.027 7.387 5.986 1.448 2.797 1.72 5.99 0.765 8.991s-3.020 5.451-5.818 6.901c-0.476 0.247-0.662 0.831-0.415 1.308 0.172 0.332 0.511 0.524 0.863 0.524 0.15 0 0.302-0.035 0.446-0.109 3.259-1.686 5.664-4.54 6.776-8.035 1.111-3.497 0.794-7.217-0.893-10.473z"}))}static get style(){return VT}},[258,"refresh-icon",{width:[1],height:[1]}]);function WT(){if(typeof customElements>"u")return;["refresh-icon"].forEach(e=>{switch(e){case"refresh-icon":customElements.get(e)||customElements.define(e,Sb);break}})}const GT=Sb,qT=WT,YT=".sc-reply-all-icon-h{display:flex}",Tb=n.proxyCustomElement(class extends n.H{constructor(){super(),this.__registerHost(),this.width="15",this.height="15"}render(){return n.h("svg",{key:"305b00d57e31331d7fed8a434885dcca36196334",fill:"auto",width:this.width,height:this.height,viewBox:"0 0 1920 1920",xmlns:"http://www.w3.org/2000/svg"},n.h("path",{key:"eae8cfe4ecfcadacd8a7d461177a4670cce902c3",d:"m1030.975 188 81.249 81.249-429.228 429.228h300.747c516.223 0 936.257 420.034 936.257 936.257v98.028h-114.92v-98.028c0-452.901-368.436-821.337-821.337-821.337H682.996l429.228 429.229-81.25 81.248-567.936-567.937L1030.975 188Zm-463.038.011 81.249 81.25-486.688 486.688 486.688 486.688-81.249 81.249L0 755.949 567.937 188.01Z","fill-rule":"evenodd"}))}static get style(){return YT}},[258,"reply-all-icon",{width:[1],height:[1]}]);function ZT(){if(typeof customElements>"u")return;["reply-all-icon"].forEach(e=>{switch(e){case"reply-all-icon":customElements.get(e)||customElements.define(e,Tb);break}})}const XT=Tb,JT=ZT,KT=".sc-reply-icon-h{display:flex}",Db=n.proxyCustomElement(class extends n.H{constructor(){super(),this.__registerHost(),this.width="15",this.height="15"}render(){return n.h("svg",{key:"37fb9469fe54e6c7a7cf278210c51b61af425c61",fill:"auto",width:this.width,height:this.height,viewBox:"0 0 1920 1920",xmlns:"http://www.w3.org/2000/svg"},n.h("path",{key:"7aff0bf2be364b64e52c1cb727cc6f9b0404f22f",d:"M835.942 632.563H244.966l478.08-478.08-90.496-90.496L-.026 696.563 632.55 1329.14l90.496-90.496-478.08-478.08h590.976c504.448 0 914.816 410.368 914.816 914.816v109.184h128V1675.38c0-574.976-467.84-1042.816-1042.816-1042.816","fill-rule":"evenodd"}))}static get style(){return KT}},[258,"reply-icon",{width:[1],height:[1]}]);function QT(){if(typeof customElements>"u")return;["reply-icon"].forEach(e=>{switch(e){case"reply-icon":customElements.get(e)||customElements.define(e,Db);break}})}const eD=Db,tD=QT,nD=Bg,aD=ut,iD=jg,oD=pt,sD=".sc-sent-icon-h{display:flex}",Ib=n.proxyCustomElement(class extends n.H{constructor(){super(),this.__registerHost(),this.width="15",this.height="15"}render(){return n.h("svg",{key:"9f63c19f3c5af16edc95a3d747e97933a3e9f84d",width:this.width,height:this.height,viewBox:"0 0 24 24",fill:"auto",xmlns:"http://www.w3.org/2000/svg"},n.h("path",{key:"9731204683c7836b8e37721fc55d4ada313bafe1",d:"M21.5 12L3.5 3.5L3.5 20.5L21.5 12Z",stroke:"auto","stroke-width":"1.5"}),n.h("path",{key:"8b47427cb6ea268a3387d6a5638ec680e0cb46ef",d:"M3.5 3.5L12 10.5",stroke:"auto","stroke-width":"1.5"}),n.h("path",{key:"309973df5a0e3a162b87e163cc811f1084670971",d:"M3.5 20.5L12 13.5",stroke:"auto","stroke-width":"1.5"}))}static get style(){return sD}},[258,"sent-icon",{width:[1],height:[1]}]);function rD(){if(typeof customElements>"u")return;["sent-icon"].forEach(e=>{switch(e){case"sent-icon":customElements.get(e)||customElements.define(e,Ib);break}})}const lD=Ib,cD=rD,dD=".sc-spam-icon-h{display:flex}",Ab=n.proxyCustomElement(class extends n.H{constructor(){super(),this.__registerHost(),this.width="15",this.height="15"}render(){return n.h("svg",{key:"07f3ebf8705393bfdb44dc17f53431a38d52f119",width:this.width,height:this.height,viewBox:"0 0 24 24",fill:"auto",xmlns:"http://www.w3.org/2000/svg"},n.h("path",{key:"a98b4e519bdf6be4bbc55cdf4867f16c97f001db",d:"M20 3H4C2.89543 3 2 3.89543 2 5V19C2 20.1046 2.89543 21 4 21H20C21.1046 21 22 20.1046 22 19V5C22 3.89543 21.1046 3 20 3Z",stroke:"auto","stroke-width":"1.5"}),n.h("path",{key:"b1957975b9f357ce0ca52183e84b80ebf8f1223e",d:"M2 5L12 12.5L22 5",stroke:"auto","stroke-width":"1.5"}))}static get style(){return dD}},[258,"spam-icon",{width:[1],height:[1]}]);function fD(){if(typeof customElements>"u")return;["spam-icon"].forEach(e=>{switch(e){case"spam-icon":customElements.get(e)||customElements.define(e,Ab);break}})}const uD=Ab,hD=fD,pD=".sc-star-icon-h{display:flex}",Rb=n.proxyCustomElement(class extends n.H{constructor(){super(),this.__registerHost(),this.width="15",this.height="15"}render(){return n.h("svg",{key:"8010c51355690730112d149a9ce580263721d663",width:this.width,height:this.height,viewBox:"0 0 24 24",fill:"auto",xmlns:"http://www.w3.org/2000/svg"},n.h("path",{key:"dd00db4cf01733ad49bb6a234345bb63ea797e91",d:"M9.15316 5.40838C10.4198 3.13613 11.0531 2 12 2C12.9469 2 13.5802 3.13612 14.8468 5.40837L15.1745 5.99623C15.5345 6.64193 15.7144 6.96479 15.9951 7.17781C16.2757 7.39083 16.6251 7.4699 17.3241 7.62805L17.9605 7.77203C20.4201 8.32856 21.65 8.60682 21.9426 9.54773C22.2352 10.4886 21.3968 11.4691 19.7199 13.4299L19.2861 13.9372C18.8096 14.4944 18.5713 14.773 18.4641 15.1177C18.357 15.4624 18.393 15.8341 18.465 16.5776L18.5306 17.2544C18.7841 19.8706 18.9109 21.1787 18.1449 21.7602C17.3788 22.3417 16.2273 21.8115 13.9243 20.7512L13.3285 20.4768C12.6741 20.1755 12.3469 20.0248 12 20.0248C11.6531 20.0248 11.3259 20.1755 10.6715 20.4768L10.0757 20.7512C7.77268 21.8115 6.62118 22.3417 5.85515 21.7602C5.08912 21.1787 5.21588 19.8706 5.4694 17.2544L5.53498 16.5776C5.60703 15.8341 5.64305 15.4624 5.53586 15.1177C5.42868 14.773 5.19043 14.4944 4.71392 13.9372L4.2801 13.4299C2.60325 11.4691 1.76482 10.4886 2.05742 9.54773C2.35002 8.60682 3.57986 8.32856 6.03954 7.77203L6.67589 7.62805C7.37485 7.4699 7.72433 7.39083 8.00494 7.17781C8.28555 6.96479 8.46553 6.64194 8.82547 5.99623L9.15316 5.40838Z",stroke:"auto","stroke-width":"1.5"}))}static get style(){return pD}},[258,"star-icon",{width:[1],height:[1]}]);function mD(){if(typeof customElements>"u")return;["star-icon"].forEach(e=>{switch(e){case"star-icon":customElements.get(e)||customElements.define(e,Rb);break}})}const gD=Rb,yD=mD,bD=".sc-stop-icon-h{display:flex}",Ob=n.proxyCustomElement(class extends n.H{constructor(){super(),this.__registerHost(),this.width="15",this.height="15"}render(){return n.h("svg",{key:"d3e4ee769c3cc25268a59abf44601bdad792d7ec",width:this.width,height:this.height,viewBox:"0 0 24 24",fill:"auto",xmlns:"http://www.w3.org/2000/svg"},n.h("path",{key:"314bf2244bdb7b73fd605adb9a2ed82cb812b489",d:"M4 4H20V20H4V4Z",stroke:"auto","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"}))}static get style(){return bD}},[258,"stop-icon",{width:[1],height:[1]}]);function vD(){if(typeof customElements>"u")return;["stop-icon"].forEach(e=>{switch(e){case"stop-icon":customElements.get(e)||customElements.define(e,Ob);break}})}const CD=Ob,_D=vD,kD=ry,ED=Ln,wD=l0,xD=Hn,SD=uy,TD=Ea,DD=Ng,ID=Qe,AD=yy,RD=qa,OD=".sc-trash-fill-icon-h{display:flex}",Lb=n.proxyCustomElement(class extends n.H{constructor(){super(),this.__registerHost(),this.width="15",this.height="15"}render(){return n.h("svg",{key:"f4b6bf0a4e86ceb196065f771242ac6e4487fc1a",width:this.width,height:this.height,viewBox:"0 0 24 24",fill:"auto",xmlns:"http://www.w3.org/2000/svg"},n.h("path",{key:"dc1472db1426fca03c7709b167f4405f95e6f1f5",d:"M3 6H5H21",stroke:"auto","stroke-width":"1.5"}),n.h("path",{key:"09f4731c1874955f7172f8423abea95632d89cd6",d:"M8 6V4C8 3.46957 8.21071 2.96086 8.58579 2.58579C8.96086 2.21071 9.46957 2 10 2H14C14.5304 2 15.0391 2.21071 15.4142 2.58579C15.7893 2.96086 16 3.46957 16 4V6M19 6V20C19 20.5304 18.7893 21.0391 18.4142 21.4142C18.0391 21.7893 17.5304 22 17 22H7C6.46957 22 5.96086 21.7893 5.58579 21.4142C5.21071 21.0391 5 20.5304 5 20V6H19Z",stroke:"auto","stroke-width":"1.5"}),n.h("path",{key:"9a5326048ec96555dbbc4be234c773fa3fd663da",d:"M10 11V17",stroke:"auto","stroke-width":"1.5"}),n.h("path",{key:"fc50cf30fbef0f4ba33e16d6d9a5dd8bdec769d1",d:"M14 11V17",stroke:"auto","stroke-width":"1.5"}))}static get style(){return OD}},[258,"trash-fill-icon",{width:[1],height:[1]}]);function LD(){if(typeof customElements>"u")return;["trash-fill-icon"].forEach(e=>{switch(e){case"trash-fill-icon":customElements.get(e)||customElements.define(e,Lb);break}})}const HD=Lb,PD=LD,MD=lb,FD=$o,ND=".sc-underline-icon-h{display:flex}",Hb=n.proxyCustomElement(class extends n.H{constructor(){super(),this.__registerHost(),this.width="15",this.height="15"}render(){return n.h("svg",{key:"4d71ec4fdf0fa2505394ec32a9595f576c90aba9",width:this.width,height:this.height,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},n.h("path",{key:"a1a86fed569522894b6a305bc107cf7885f721e1",d:"M19 4V10C19 13.866 15.866 17 12 17C8.13401 17 5 13.866 5 10V4M8.5 4V10C8.5 13.2218 10.6766 15.9352 13.6395 16.7501M4 21H20M3 4L10.5 4M17 4L21 4",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"}))}static get style(){return ND}},[258,"underline-icon",{width:[1],height:[1]}]);function $D(){if(typeof customElements>"u")return;["underline-icon"].forEach(e=>{switch(e){case"underline-icon":customElements.get(e)||customElements.define(e,Hb);break}})}const zD=Hb,BD=$D,jD=sb,UD=Ka,VD=r0,WD=Fi,GD=K.createComponent({tagName:"add-circle-icon",elementClass:O2,react:Q,events:{},defineCustomElement:L2}),qD=K.createComponent({tagName:"archive-icon",elementClass:M2,react:Q,events:{},defineCustomElement:F2}),YD=K.createComponent({tagName:"arrow-icon",elementClass:z2,react:Q,events:{},defineCustomElement:B2}),ZD=K.createComponent({tagName:"bold-icon",elementClass:V2,react:Q,events:{},defineCustomElement:W2}),XD=K.createComponent({tagName:"button-component",elementClass:Y2,react:Q,events:{},defineCustomElement:Z2}),JD=K.createComponent({tagName:"calendar-agenda-fill-icon",elementClass:J2,react:Q,events:{},defineCustomElement:K2}),KD=K.createComponent({tagName:"calendar-agenda-icon",elementClass:e5,react:Q,events:{},defineCustomElement:t5}),QD=K.createComponent({tagName:"calendar-cancel-icon",elementClass:a5,react:Q,events:{},defineCustomElement:i5}),eI=K.createComponent({tagName:"calendar-check-icon",elementClass:s5,react:Q,events:{},defineCustomElement:r5}),tI=K.createComponent({tagName:"calendar-icon",elementClass:c5,react:Q,events:{},defineCustomElement:d5}),nI=K.createComponent({tagName:"calendar-info-icon",elementClass:u5,react:Q,events:{},defineCustomElement:h5}),aI=K.createComponent({tagName:"calendar-patterns-icon",elementClass:m5,react:Q,events:{},defineCustomElement:g5}),iI=K.createComponent({tagName:"checkbox-component",elementClass:b5,react:Q,events:{onNylasFormCheckboxToggled:"nylasFormCheckboxToggled"},defineCustomElement:v5}),oI=K.createComponent({tagName:"checkbox-group",elementClass:_5,react:Q,events:{onNylasCheckboxGroupChanged:"nylasCheckboxGroupChanged"},defineCustomElement:k5}),sI=K.createComponent({tagName:"checkmark-circle-icon",elementClass:w5,react:Q,events:{},defineCustomElement:x5}),rI=K.createComponent({tagName:"checkmark-icon",elementClass:T5,react:Q,events:{},defineCustomElement:D5}),lI=K.createComponent({tagName:"chevron-icon",elementClass:A5,react:Q,events:{},defineCustomElement:R5}),cI=K.createComponent({tagName:"clock-icon",elementClass:L5,react:Q,events:{},defineCustomElement:H5}),dI=K.createComponent({tagName:"close-icon",elementClass:M5,react:Q,events:{},defineCustomElement:F5}),fI=K.createComponent({tagName:"copy-icon",elementClass:$5,react:Q,events:{},defineCustomElement:z5}),uI=K.createComponent({tagName:"delete-icon",elementClass:j5,react:Q,events:{},defineCustomElement:U5}),hI=K.createComponent({tagName:"document-refresh-icon",elementClass:G5,react:Q,events:{},defineCustomElement:q5}),pI=K.createComponent({tagName:"dragable-icon",elementClass:Z5,react:Q,events:{},defineCustomElement:X5}),mI=K.createComponent({tagName:"edit-icon",elementClass:K5,react:Q,events:{},defineCustomElement:Q5}),gI=K.createComponent({tagName:"envelope-fill-icon",elementClass:tC,react:Q,events:{},defineCustomElement:nC}),yI=K.createComponent({tagName:"envelope-icon",elementClass:iC,react:Q,events:{},defineCustomElement:oC}),bI=K.createComponent({tagName:"eye-icon",elementClass:rC,react:Q,events:{},defineCustomElement:lC}),vI=K.createComponent({tagName:"feedback-icon",elementClass:dC,react:Q,events:{},defineCustomElement:fC}),CI=K.createComponent({tagName:"flow-icon",elementClass:hC,react:Q,events:{},defineCustomElement:pC}),_I=K.createComponent({tagName:"folder-icon",elementClass:yC,react:Q,events:{},defineCustomElement:bC}),kI=K.createComponent({tagName:"forward-icon",elementClass:_C,react:Q,events:{},defineCustomElement:kC}),EI=K.createComponent({tagName:"globe-icon",elementClass:wC,react:Q,events:{},defineCustomElement:xC}),wI=K.createComponent({tagName:"google-logo-icon",elementClass:TC,react:Q,events:{},defineCustomElement:DC}),xI=K.createComponent({tagName:"google-meet-icon",elementClass:AC,react:Q,events:{},defineCustomElement:RC}),SI=K.createComponent({tagName:"inbox-icon",elementClass:HC,react:Q,events:{},defineCustomElement:PC}),TI=K.createComponent({tagName:"info-icon",elementClass:FC,react:Q,events:{},defineCustomElement:NC}),DI=K.createComponent({tagName:"input-color-picker",elementClass:zC,react:Q,events:{onNylasFormDropdownChanged:"nylasFormDropdownChanged"},defineCustomElement:BC}),II=K.createComponent({tagName:"input-component",elementClass:WC,react:Q,events:{onNylasFormInputChanged:"nylasFormInputChanged",onNylasFormInputFocused:"nylasFormInputFocused",onNylasFormInputBlurred:"nylasFormInputBlurred"},defineCustomElement:GC}),AI=K.createComponent({tagName:"input-dropdown",elementClass:YC,react:Q,events:{onInputOptionChanged:"inputOptionChanged"},defineCustomElement:ZC}),RI=K.createComponent({tagName:"input-image-url",elementClass:e_,react:Q,events:{onNylasFormInputImageUrlInvalid:"nylasFormInputImageUrlInvalid",onValueChanged:"valueChanged"},defineCustomElement:t_}),OI=K.createComponent({tagName:"italic-icon",elementClass:i_,react:Q,events:{},defineCustomElement:o_}),LI=K.createComponent({tagName:"loading-icon",elementClass:s_,react:Q,events:{},defineCustomElement:r_}),HI=K.createComponent({tagName:"location-icon",elementClass:c_,react:Q,events:{},defineCustomElement:d_}),PI=K.createComponent({tagName:"location-off-icon",elementClass:u_,react:Q,events:{},defineCustomElement:h_}),MI=K.createComponent({tagName:"microsoft-logo-icon",elementClass:m_,react:Q,events:{},defineCustomElement:g_}),FI=K.createComponent({tagName:"microsoft-teams-icon",elementClass:b_,react:Q,events:{},defineCustomElement:v_}),NI=K.createComponent({tagName:"multi-select-dropdown",elementClass:__,react:Q,events:{onSelectedOptionsChanged:"selectedOptionsChanged"},defineCustomElement:k_}),$I=K.createComponent({tagName:"nylas-additional-participants",elementClass:D_,react:Q,events:{onValueChanged:"valueChanged"},defineCustomElement:I_}),zI=K.createComponent({tagName:"nylas-availability-picker",elementClass:N_,react:Q,events:{onValueChanged:"valueChanged"},defineCustomElement:$_}),BI=K.createComponent({tagName:"nylas-booked-event-card",elementClass:j_,react:Q,events:{onCancelBookingButtonClicked:"cancelBookingButtonClicked",onRescheduleButtonClicked:"rescheduleButtonClicked",onRescheduleBookedEventError:"rescheduleBookedEventError",onCancelBookedEventValidationError:"cancelBookedEventValidationError"},defineCustomElement:U_}),jI=K.createComponent({tagName:"nylas-booking-calendar-picker",elementClass:G_,react:Q,events:{onValueChanged:"valueChanged"},defineCustomElement:q_}),UI=K.createComponent({tagName:"nylas-booking-confirmation-redirect",elementClass:X_,react:Q,events:{onValueChanged:"valueChanged"},defineCustomElement:J_}),VI=K.createComponent({tagName:"nylas-booking-confirmation-type",elementClass:e6,react:Q,events:{onValueChanged:"valueChanged"},defineCustomElement:t6}),WI=K.createComponent({tagName:"nylas-booking-form",elementClass:N6,react:Q,events:{onNameChanged:"nameChanged",onEmailChanged:"emailChanged",onBackButtonClicked:"backButtonClicked",onDetailsConfirmed:"detailsConfirmed",onBookingFormError:"bookingFormError",onBookingFormSubmitted:"bookingFormSubmitted"},defineCustomElement:$6}),GI=K.createComponent({tagName:"nylas-booking-form-config",elementClass:O6,react:Q,events:{onValueChanged:"valueChanged"},defineCustomElement:L6}),qI=K.createComponent({tagName:"nylas-buffer-time",elementClass:j6,react:Q,events:{onValueChanged:"valueChanged"},defineCustomElement:U6}),YI=K.createComponent({tagName:"nylas-calendar-picker",elementClass:G6,react:Q,events:{onValueChanged:"valueChanged"},defineCustomElement:q6}),ZI=K.createComponent({tagName:"nylas-cancel-booking-form",elementClass:X6,react:Q,events:{onGoBackButtonClicked:"goBackButtonClicked",onCancelBookingFormSubmitted:"cancelBookingFormSubmitted",onTriggerValidation:"triggerValidation",onCancelBookedEventError:"cancelBookedEventError",onCancelBookingFormError:"cancelBookingFormError"},defineCustomElement:J6}),XI=K.createComponent({tagName:"nylas-cancellation-policy",elementClass:e3,react:Q,events:{onValueChanged:"valueChanged"},defineCustomElement:t3}),JI=K.createComponent({tagName:"nylas-cancelled-event-card",elementClass:i3,react:Q,events:{onCloseCancelEventCardClicked:"closeCancelEventCardClicked",onCancelledEventCardError:"cancelledEventCardError"},defineCustomElement:o3}),KI=K.createComponent({tagName:"nylas-confirmation-email",elementClass:d3,react:Q,events:{onValueChanged:"valueChanged"},defineCustomElement:f3}),QI=K.createComponent({tagName:"nylas-confirmed-event-card",elementClass:p3,react:Q,events:{onCloseConfirmEventCardClicked:"closeConfirmEventCardClicked",onConfirmedEventCardError:"confirmedEventCardError"},defineCustomElement:m3}),eA=K.createComponent({tagName:"nylas-connected-calendars",elementClass:b3,react:Q,events:{onValueChanged:"valueChanged"},defineCustomElement:v3}),tA=K.createComponent({tagName:"nylas-custom-booking-flow",elementClass:k3,react:Q,events:{},defineCustomElement:E3}),nA=K.createComponent({tagName:"nylas-custom-event-slug",elementClass:S3,react:Q,events:{onValueChanged:"valueChanged"},defineCustomElement:T3}),aA=K.createComponent({tagName:"nylas-customize-booking-settings",elementClass:A3,react:Q,events:{onValueChanged:"valueChanged"},defineCustomElement:R3}),iA=K.createComponent({tagName:"nylas-date-component",elementClass:O3,react:Q,events:{onNylasFormInputChanged:"nylasFormInputChanged",onNylasFormInputFocused:"nylasFormInputFocused",onNylasFormInputBlurred:"nylasFormInputBlurred"},defineCustomElement:L3}),oA=K.createComponent({tagName:"nylas-date-picker",elementClass:$3,react:Q,events:{onDateSelected:"dateSelected",onMonthChanged:"monthChanged"},defineCustomElement:z3}),sA=K.createComponent({tagName:"nylas-disable-emails",elementClass:V3,react:Q,events:{onValueChanged:"valueChanged"},defineCustomElement:W3}),rA=K.createComponent({tagName:"nylas-editor-tabs",elementClass:dx,react:Q,events:{onSchedulerConfigChanged:"schedulerConfigChanged",onSchedulerConfigCreated:"schedulerConfigCreated",onCancelButtonClick:"cancelButtonClick",onFormSubmitted:"formSubmitted",onPreviewButtonClicked:"previewButtonClicked",onSchedulerEditorFormUpdated:"schedulerEditorFormUpdated",onNylasSchedulerError:"nylasSchedulerError",onDismissNotification:"dismissNotification"},defineCustomElement:fx}),lA=K.createComponent({tagName:"nylas-editor-tabs-group",elementClass:j8,react:Q,events:{onSchedulerConfigChanged:"schedulerConfigChanged",onSchedulerConfigCreated:"schedulerConfigCreated",onCancelButtonClick:"cancelButtonClick",onFormSubmitted:"formSubmitted",onPreviewButtonClicked:"previewButtonClicked",onSchedulerEditorFormUpdated:"schedulerEditorFormUpdated",onGroupEventCreateTriggered:"groupEventCreateTriggered",onGroupEventUpdateTriggered:"groupEventUpdateTriggered",onGroupEventDeleteTriggered:"groupEventDeleteTriggered",onGroupEventImportTriggered:"groupEventImportTriggered",onSaveGroupEventChangesError:"saveGroupEventChangesError",onNylasSchedulerError:"nylasSchedulerError",onDismissNotification:"dismissNotification"},defineCustomElement:U8}),cA=K.createComponent({tagName:"nylas-event-calendar",elementClass:ux,react:Q,events:{onFetchMasterGroupEvent:"fetchMasterGroupEvent",onSaveGroupEventChanges:"saveGroupEventChanges",onDeleteGroupEvent:"deleteGroupEvent",onGroupEventSelected:"groupEventSelected",onCreateGroupEvent:"createGroupEvent",onCalendarViewChanged:"calendarViewChanged",onPreviosNextClicked:"previosNextClicked",onSetCalendarViewDateRange:"setCalendarViewDateRange",onImportGroupEvent:"importGroupEvent"},defineCustomElement:hx}),dA=K.createComponent({tagName:"nylas-event-capacity",elementClass:px,react:Q,events:{onValueChanged:"valueChanged"},defineCustomElement:mx}),fA=K.createComponent({tagName:"nylas-event-description",elementClass:gx,react:Q,events:{onValueChanged:"valueChanged"},defineCustomElement:yx}),uA=K.createComponent({tagName:"nylas-event-duration",elementClass:bx,react:Q,events:{onValueChanged:"valueChanged"},defineCustomElement:vx}),hA=K.createComponent({tagName:"nylas-event-info",elementClass:Cx,react:Q,events:{},defineCustomElement:_x}),pA=K.createComponent({tagName:"nylas-event-limits",elementClass:kx,react:Q,events:{},defineCustomElement:Ex}),mA=K.createComponent({tagName:"nylas-event-location",elementClass:wx,react:Q,events:{onValueChanged:"valueChanged"},defineCustomElement:xx}),gA=K.createComponent({tagName:"nylas-event-timeslot",elementClass:Sx,react:Q,events:{onValueChanged:"valueChanged",onTimeWindowFormError:"timeWindowFormError",onDateTimeInputError:"dateTimeInputError"},defineCustomElement:Tx}),yA=K.createComponent({tagName:"nylas-event-title",elementClass:Dx,react:Q,events:{onValueChanged:"valueChanged"},defineCustomElement:Ix}),bA=K.createComponent({tagName:"nylas-feedback-form",elementClass:Ax,react:Q,events:{onFeedbackModalClosed:"feedbackModalClosed",onFeedbackSubmitted:"feedbackSubmitted",onTriggerValidation:"triggerValidation"},defineCustomElement:Rx}),vA=K.createComponent({tagName:"nylas-form-card",elementClass:Ox,react:Q,events:{},defineCustomElement:Lx}),CA=K.createComponent({tagName:"nylas-limit-future-bookings",elementClass:Hx,react:Q,events:{onValueChanged:"valueChanged"},defineCustomElement:Px}),_A=K.createComponent({tagName:"nylas-list-configurations",elementClass:Nx,react:Q,events:{onInitListConfigurations:"initListConfigurations",onCreateButtonClick:"createButtonClick",onEditButtonClick:"editButtonClick",onDeleteButtonClick:"deleteButtonClick",onNylasSchedulerError:"nylasSchedulerError",onDismissNotification:"dismissNotification"},defineCustomElement:$x}),kA=K.createComponent({tagName:"nylas-locale-switch",elementClass:jx,react:Q,events:{onTimezoneChanged:"timezoneChanged",onLanguageChanged:"languageChanged"},defineCustomElement:Ux}),EA=K.createComponent({tagName:"nylas-logo",elementClass:Wx,react:Q,events:{},defineCustomElement:Gx}),wA=K.createComponent({tagName:"nylas-min-booking-notice",elementClass:qx,react:Q,events:{onValueChanged:"valueChanged"},defineCustomElement:Yx}),xA=K.createComponent({tagName:"nylas-min-cancellation-notice",elementClass:Zx,react:Q,events:{onValueChanged:"valueChanged"},defineCustomElement:Xx}),SA=K.createComponent({tagName:"nylas-notetaker-config",elementClass:Jx,react:Q,events:{onValueChanged:"valueChanged",onNotetakerError:"notetakerError"},defineCustomElement:Kx}),TA=K.createComponent({tagName:"nylas-notification",elementClass:Qx,react:Q,events:{},defineCustomElement:eS}),DA=K.createComponent({tagName:"nylas-only-specific-time-availability",elementClass:tS,react:Q,events:{onValueChanged:"valueChanged"},defineCustomElement:nS}),IA=K.createComponent({tagName:"nylas-organizer-confirmation-card",elementClass:oS,react:Q,events:{onRejectBookingButtonClicked:"rejectBookingButtonClicked",onConfirmBookingButtonClicked:"confirmBookingButtonClicked",onConfirmBookingError:"confirmBookingError"},defineCustomElement:sS}),AA=K.createComponent({tagName:"nylas-page-name",elementClass:rS,react:Q,events:{onValueChanged:"valueChanged"},defineCustomElement:lS}),RA=K.createComponent({tagName:"nylas-page-styling",elementClass:cS,react:Q,events:{onValueChanged:"valueChanged",onBookingFormSubmitted:"bookingFormSubmitted"},defineCustomElement:dS}),OA=K.createComponent({tagName:"nylas-participant-booking-calendars",elementClass:fS,react:Q,events:{onValueChanged:"valueChanged"},defineCustomElement:uS}),LA=K.createComponent({tagName:"nylas-participants-custom-availability",elementClass:hS,react:Q,events:{onValueChanged:"valueChanged"},defineCustomElement:pS}),HA=K.createComponent({tagName:"nylas-reminder-emails",elementClass:mS,react:Q,events:{onValueChanged:"valueChanged",onNylasSuggestReminderMinutes:"nylasSuggestReminderMinutes"},defineCustomElement:gS}),PA=K.createComponent({tagName:"nylas-reminder-time",elementClass:yS,react:Q,events:{onValueChanged:"valueChanged"},defineCustomElement:bS}),MA=K.createComponent({tagName:"nylas-scheduler-editor",elementClass:QS,react:Q,events:{onInit:"init",onLoggedIn:"loggedIn",onLoggedOut:"loggedOut",onSchedulerConfigCloseClicked:"schedulerConfigCloseClicked"},defineCustomElement:eT}),FA=K.createComponent({tagName:"nylas-scheduling",elementClass:uT,react:Q,events:{onInit:"init",onSchedulerWillLoad:"schedulerWillLoad",onSchedulerDidLoad:"schedulerDidLoad",onNylasSchedulerError:"nylasSchedulerError",onNylasSchedulerInfo:"nylasSchedulerInfo",onConfigSettingsLoaded:"configSettingsLoaded",onBookingRefExtracted:"bookingRefExtracted",onBookedEventInfo:"bookedEventInfo"},defineCustomElement:hT}),NA=K.createComponent({tagName:"nylas-scheduling-method",elementClass:tT,react:Q,events:{onValueChanged:"valueChanged"},defineCustomElement:nT}),$A=K.createComponent({tagName:"nylas-select-event-type",elementClass:pT,react:Q,events:{onReturnToAllSchedulingPagesEvent:"returnToAllSchedulingPagesEvent",onCreateEventTypeSelected:"createEventTypeSelected"},defineCustomElement:mT}),zA=K.createComponent({tagName:"nylas-selected-event-card",elementClass:gT,react:Q,events:{},defineCustomElement:yT}),BA=K.createComponent({tagName:"nylas-specific-time-availability-picker",elementClass:bT,react:Q,events:{onValueChanged:"valueChanged"},defineCustomElement:vT}),jA=K.createComponent({tagName:"nylas-time-window-picker",elementClass:CT,react:Q,events:{onTimeChange:"timeChange",onTimeWindowFormError:"timeWindowFormError"},defineCustomElement:_T}),UA=K.createComponent({tagName:"nylas-timeslot-interval",elementClass:kT,react:Q,events:{onValueChanged:"valueChanged"},defineCustomElement:ET}),VA=K.createComponent({tagName:"nylas-timeslot-picker",elementClass:wT,react:Q,events:{onTimeslotSelected:"timeslotSelected",onTimeslotConfirmed:"timeslotConfirmed",onValidateTimeslotError:"validateTimeslotError"},defineCustomElement:xT}),WA=K.createComponent({tagName:"paintbrush-fill-icon",elementClass:ST,react:Q,events:{},defineCustomElement:TT}),GA=K.createComponent({tagName:"paintbrush-icon",elementClass:DT,react:Q,events:{},defineCustomElement:IT}),qA=K.createComponent({tagName:"people-icon",elementClass:AT,react:Q,events:{},defineCustomElement:RT}),YA=K.createComponent({tagName:"person-clipboard-icon",elementClass:OT,react:Q,events:{},defineCustomElement:LT}),ZA=K.createComponent({tagName:"person-icon",elementClass:HT,react:Q,events:{},defineCustomElement:PT}),XA=K.createComponent({tagName:"play-icon",elementClass:NT,react:Q,events:{},defineCustomElement:$T}),JA=K.createComponent({tagName:"plus-icon",elementClass:zT,react:Q,events:{},defineCustomElement:BT}),KA=K.createComponent({tagName:"radio-button-group",elementClass:jT,react:Q,events:{onNylasFormRadioChanged:"nylasFormRadioChanged"},defineCustomElement:UT}),QA=K.createComponent({tagName:"refresh-icon",elementClass:GT,react:Q,events:{},defineCustomElement:qT}),eR=K.createComponent({tagName:"reply-all-icon",elementClass:XT,react:Q,events:{},defineCustomElement:JT}),tR=K.createComponent({tagName:"reply-icon",elementClass:eD,react:Q,events:{},defineCustomElement:tD}),nR=K.createComponent({tagName:"search-icon",elementClass:nD,react:Q,events:{},defineCustomElement:aD}),aR=K.createComponent({tagName:"select-dropdown",elementClass:iD,react:Q,events:{onNylasFormDropdownChanged:"nylasFormDropdownChanged",onNylasFormDropdownDefaultSelected:"nylasFormDropdownDefaultSelected"},defineCustomElement:oD}),iR=K.createComponent({tagName:"sent-icon",elementClass:lD,react:Q,events:{},defineCustomElement:cD}),oR=K.createComponent({tagName:"spam-icon",elementClass:uD,react:Q,events:{},defineCustomElement:hD}),sR=K.createComponent({tagName:"star-icon",elementClass:gD,react:Q,events:{},defineCustomElement:yD}),rR=K.createComponent({tagName:"stop-icon",elementClass:CD,react:Q,events:{},defineCustomElement:_D}),lR=K.createComponent({tagName:"textarea-component",elementClass:kD,react:Q,events:{onNylasFormInputChanged:"nylasFormInputChanged"},defineCustomElement:ED}),cR=K.createComponent({tagName:"time-period-selector",elementClass:wD,react:Q,events:{onTimePeriodChanged:"timePeriodChanged"},defineCustomElement:xD}),dR=K.createComponent({tagName:"toggle-switch",elementClass:SD,react:Q,events:{onNylasFormSwitchToggled:"nylasFormSwitchToggled"},defineCustomElement:TD}),fR=K.createComponent({tagName:"tooltip-component",elementClass:DD,react:Q,events:{},defineCustomElement:ID}),uR=K.createComponent({tagName:"translate-icon",elementClass:AD,react:Q,events:{},defineCustomElement:RD}),hR=K.createComponent({tagName:"trash-fill-icon",elementClass:HD,react:Q,events:{},defineCustomElement:PD}),pR=K.createComponent({tagName:"trash-icon",elementClass:MD,react:Q,events:{},defineCustomElement:FD}),mR=K.createComponent({tagName:"underline-icon",elementClass:zD,react:Q,events:{},defineCustomElement:BD}),gR=K.createComponent({tagName:"warning-icon",elementClass:jD,react:Q,events:{},defineCustomElement:UD}),yR=K.createComponent({tagName:"zoom-icon",elementClass:VD,react:Q,events:{},defineCustomElement:WD});exports.AddCircleIcon=GD;exports.ArchiveIcon=qD;exports.ArrowIcon=YD;exports.BoldIcon=ZD;exports.ButtonComponent=XD;exports.CalendarAgendaFillIcon=JD;exports.CalendarAgendaIcon=KD;exports.CalendarCancelIcon=QD;exports.CalendarCheckIcon=eI;exports.CalendarIcon=tI;exports.CalendarInfoIcon=nI;exports.CalendarPatternsIcon=aI;exports.CheckboxComponent=iI;exports.CheckboxGroup=oI;exports.CheckmarkCircleIcon=sI;exports.CheckmarkIcon=rI;exports.ChevronIcon=lI;exports.ClockIcon=cI;exports.CloseIcon=dI;exports.CopyIcon=fI;exports.DeleteIcon=uI;exports.DocumentRefreshIcon=hI;exports.DragableIcon=pI;exports.EditIcon=mI;exports.EnvelopeFillIcon=gI;exports.EnvelopeIcon=yI;exports.EyeIcon=bI;exports.FeedbackIcon=vI;exports.FlowIcon=CI;exports.FolderIcon=_I;exports.ForwardIcon=kI;exports.GlobeIcon=EI;exports.GoogleLogoIcon=wI;exports.GoogleMeetIcon=xI;exports.InboxIcon=SI;exports.InfoIcon=TI;exports.InputColorPicker=DI;exports.InputComponent=II;exports.InputDropdown=AI;exports.InputImageUrl=RI;exports.ItalicIcon=OI;exports.LoadingIcon=LI;exports.LocationIcon=HI;exports.LocationOffIcon=PI;exports.MicrosoftLogoIcon=MI;exports.MicrosoftTeamsIcon=FI;exports.MultiSelectDropdown=NI;exports.NylasAdditionalParticipants=$I;exports.NylasAvailabilityPicker=zI;exports.NylasBookedEventCard=BI;exports.NylasBookingCalendarPicker=jI;exports.NylasBookingConfirmationRedirect=UI;exports.NylasBookingConfirmationType=VI;exports.NylasBookingForm=WI;exports.NylasBookingFormConfig=GI;exports.NylasBufferTime=qI;exports.NylasCalendarPicker=YI;exports.NylasCancelBookingForm=ZI;exports.NylasCancellationPolicy=XI;exports.NylasCancelledEventCard=JI;exports.NylasConfirmationEmail=KI;exports.NylasConfirmedEventCard=QI;exports.NylasConnectedCalendars=eA;exports.NylasCustomBookingFlow=tA;exports.NylasCustomEventSlug=nA;exports.NylasCustomizeBookingSettings=aA;exports.NylasDateComponent=iA;exports.NylasDatePicker=oA;exports.NylasDisableEmails=sA;exports.NylasEditorTabs=rA;exports.NylasEditorTabsGroup=lA;exports.NylasEventCalendar=cA;exports.NylasEventCapacity=dA;exports.NylasEventDescription=fA;exports.NylasEventDuration=uA;exports.NylasEventInfo=hA;exports.NylasEventLimits=pA;exports.NylasEventLocation=mA;exports.NylasEventTimeslot=gA;exports.NylasEventTitle=yA;exports.NylasFeedbackForm=bA;exports.NylasFormCard=vA;exports.NylasLimitFutureBookings=CA;exports.NylasListConfigurations=_A;exports.NylasLocaleSwitch=kA;exports.NylasLogo=EA;exports.NylasMinBookingNotice=wA;exports.NylasMinCancellationNotice=xA;exports.NylasNotetakerConfig=SA;exports.NylasNotification=TA;exports.NylasOnlySpecificTimeAvailability=DA;exports.NylasOrganizerConfirmationCard=IA;exports.NylasPageName=AA;exports.NylasPageStyling=RA;exports.NylasParticipantBookingCalendars=OA;exports.NylasParticipantsCustomAvailability=LA;exports.NylasReminderEmails=HA;exports.NylasReminderTime=PA;exports.NylasSchedulerEditor=MA;exports.NylasScheduling=FA;exports.NylasSchedulingMethod=NA;exports.NylasSelectEventType=$A;exports.NylasSelectedEventCard=zA;exports.NylasSpecificTimeAvailabilityPicker=BA;exports.NylasTimeWindowPicker=jA;exports.NylasTimeslotInterval=UA;exports.NylasTimeslotPicker=VA;exports.PaintbrushFillIcon=WA;exports.PaintbrushIcon=GA;exports.PeopleIcon=qA;exports.PersonClipboardIcon=YA;exports.PersonIcon=ZA;exports.PlayIcon=XA;exports.PlusIcon=JA;exports.RadioButtonGroup=KA;exports.RefreshIcon=QA;exports.ReplyAllIcon=eR;exports.ReplyIcon=tR;exports.SearchIcon=nR;exports.SelectDropdown=aR;exports.SentIcon=iR;exports.SpamIcon=oR;exports.StarIcon=sR;exports.StopIcon=rR;exports.TextareaComponent=lR;exports.TimePeriodSelector=cR;exports.ToggleSwitch=dR;exports.TooltipComponent=fR;exports.TranslateIcon=uR;exports.TrashFillIcon=hR;exports.TrashIcon=pR;exports.UnderlineIcon=mR;exports.WarningIcon=gR;exports.ZoomIcon=yR;
|
|
524
|
+
*/var Nm;function YS(){if(Nm)return at;Nm=1;var a=Symbol.for("react.element"),e=Symbol.for("react.portal"),t=Symbol.for("react.fragment"),i=Symbol.for("react.strict_mode"),o=Symbol.for("react.profiler"),s=Symbol.for("react.provider"),l=Symbol.for("react.context"),f=Symbol.for("react.forward_ref"),h=Symbol.for("react.suspense"),m=Symbol.for("react.memo"),g=Symbol.for("react.lazy"),b=Symbol.iterator;function T(R){return R===null||typeof R!="object"?null:(R=b&&R[b]||R["@@iterator"],typeof R=="function"?R:null)}var x={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},H=Object.assign,V={};function U(R,E,B){this.props=R,this.context=E,this.refs=V,this.updater=B||x}U.prototype.isReactComponent={},U.prototype.setState=function(R,E){if(typeof R!="object"&&typeof R!="function"&&R!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,R,E,"setState")},U.prototype.forceUpdate=function(R){this.updater.enqueueForceUpdate(this,R,"forceUpdate")};function X(){}X.prototype=U.prototype;function q(R,E,B){this.props=R,this.context=E,this.refs=V,this.updater=B||x}var de=q.prototype=new X;de.constructor=q,H(de,U.prototype),de.isPureReactComponent=!0;var ge=Array.isArray,De=Object.prototype.hasOwnProperty,ke={current:null},xe={key:!0,ref:!0,__self:!0,__source:!0};function ve(R,E,B){var G,oe={},te=null,ce=null;if(E!=null)for(G in E.ref!==void 0&&(ce=E.ref),E.key!==void 0&&(te=""+E.key),E)De.call(E,G)&&!xe.hasOwnProperty(G)&&(oe[G]=E[G]);var fe=arguments.length-2;if(fe===1)oe.children=B;else if(1<fe){for(var Oe=Array(fe),ie=0;ie<fe;ie++)Oe[ie]=arguments[ie+2];oe.children=Oe}if(R&&R.defaultProps)for(G in fe=R.defaultProps,fe)oe[G]===void 0&&(oe[G]=fe[G]);return{$$typeof:a,type:R,key:te,ref:ce,props:oe,_owner:ke.current}}function re(R,E){return{$$typeof:a,type:R.type,key:E,ref:R.ref,props:R.props,_owner:R._owner}}function he(R){return typeof R=="object"&&R!==null&&R.$$typeof===a}function ye(R){var E={"=":"=0",":":"=2"};return"$"+R.replace(/[=:]/g,function(B){return E[B]})}var ue=/\/+/g;function we(R,E){return typeof R=="object"&&R!==null&&R.key!=null?ye(""+R.key):E.toString(36)}function Ae(R,E,B,G,oe){var te=typeof R;(te==="undefined"||te==="boolean")&&(R=null);var ce=!1;if(R===null)ce=!0;else switch(te){case"string":case"number":ce=!0;break;case"object":switch(R.$$typeof){case a:case e:ce=!0}}if(ce)return ce=R,oe=oe(ce),R=G===""?"."+we(ce,0):G,ge(oe)?(B="",R!=null&&(B=R.replace(ue,"$&/")+"/"),Ae(oe,E,B,"",function(ie){return ie})):oe!=null&&(he(oe)&&(oe=re(oe,B+(!oe.key||ce&&ce.key===oe.key?"":(""+oe.key).replace(ue,"$&/")+"/")+R)),E.push(oe)),1;if(ce=0,G=G===""?".":G+":",ge(R))for(var fe=0;fe<R.length;fe++){te=R[fe];var Oe=G+we(te,fe);ce+=Ae(te,E,B,Oe,oe)}else if(Oe=T(R),typeof Oe=="function")for(R=Oe.call(R),fe=0;!(te=R.next()).done;)te=te.value,Oe=G+we(te,fe++),ce+=Ae(te,E,B,Oe,oe);else if(te==="object")throw E=String(R),Error("Objects are not valid as a React child (found: "+(E==="[object Object]"?"object with keys {"+Object.keys(R).join(", ")+"}":E)+"). If you meant to render a collection of children, use an array instead.");return ce}function Re(R,E,B){if(R==null)return R;var G=[],oe=0;return Ae(R,G,"","",function(te){return E.call(B,te,oe++)}),G}function je(R){if(R._status===-1){var E=R._result;E=E(),E.then(function(B){(R._status===0||R._status===-1)&&(R._status=1,R._result=B)},function(B){(R._status===0||R._status===-1)&&(R._status=2,R._result=B)}),R._status===-1&&(R._status=0,R._result=E)}if(R._status===1)return R._result.default;throw R._result}var $e={current:null},ze={transition:null},Be={ReactCurrentDispatcher:$e,ReactCurrentBatchConfig:ze,ReactCurrentOwner:ke};return at.Children={map:Re,forEach:function(R,E,B){Re(R,function(){E.apply(this,arguments)},B)},count:function(R){var E=0;return Re(R,function(){E++}),E},toArray:function(R){return Re(R,function(E){return E})||[]},only:function(R){if(!he(R))throw Error("React.Children.only expected to receive a single React element child.");return R}},at.Component=U,at.Fragment=t,at.Profiler=o,at.PureComponent=q,at.StrictMode=i,at.Suspense=h,at.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=Be,at.cloneElement=function(R,E,B){if(R==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+R+".");var G=H({},R.props),oe=R.key,te=R.ref,ce=R._owner;if(E!=null){if(E.ref!==void 0&&(te=E.ref,ce=ke.current),E.key!==void 0&&(oe=""+E.key),R.type&&R.type.defaultProps)var fe=R.type.defaultProps;for(Oe in E)De.call(E,Oe)&&!xe.hasOwnProperty(Oe)&&(G[Oe]=E[Oe]===void 0&&fe!==void 0?fe[Oe]:E[Oe])}var Oe=arguments.length-2;if(Oe===1)G.children=B;else if(1<Oe){fe=Array(Oe);for(var ie=0;ie<Oe;ie++)fe[ie]=arguments[ie+2];G.children=fe}return{$$typeof:a,type:R.type,key:oe,ref:te,props:G,_owner:ce}},at.createContext=function(R){return R={$$typeof:l,_currentValue:R,_currentValue2:R,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},R.Provider={$$typeof:s,_context:R},R.Consumer=R},at.createElement=ve,at.createFactory=function(R){var E=ve.bind(null,R);return E.type=R,E},at.createRef=function(){return{current:null}},at.forwardRef=function(R){return{$$typeof:f,render:R}},at.isValidElement=he,at.lazy=function(R){return{$$typeof:g,_payload:{_status:-1,_result:R},_init:je}},at.memo=function(R,E){return{$$typeof:m,type:R,compare:E===void 0?null:E}},at.startTransition=function(R){var E=ze.transition;ze.transition={};try{R()}finally{ze.transition=E}},at.unstable_act=function(){throw Error("act(...) is not supported in production builds of React.")},at.useCallback=function(R,E){return $e.current.useCallback(R,E)},at.useContext=function(R){return $e.current.useContext(R)},at.useDebugValue=function(){},at.useDeferredValue=function(R){return $e.current.useDeferredValue(R)},at.useEffect=function(R,E){return $e.current.useEffect(R,E)},at.useId=function(){return $e.current.useId()},at.useImperativeHandle=function(R,E,B){return $e.current.useImperativeHandle(R,E,B)},at.useInsertionEffect=function(R,E){return $e.current.useInsertionEffect(R,E)},at.useLayoutEffect=function(R,E){return $e.current.useLayoutEffect(R,E)},at.useMemo=function(R,E){return $e.current.useMemo(R,E)},at.useReducer=function(R,E,B){return $e.current.useReducer(R,E,B)},at.useRef=function(R){return $e.current.useRef(R)},at.useState=function(R){return $e.current.useState(R)},at.useSyncExternalStore=function(R,E,B){return $e.current.useSyncExternalStore(R,E,B)},at.useTransition=function(){return $e.current.useTransition()},at.version="18.2.0",at}var $m;function ZS(){return $m||($m=1,ad.exports=YS()),ad.exports}ZS();const XS=({authenticationUrl:a,authError:e})=>n.h("div",{class:"login-required",part:"nse__login-required login-component"},n.h("div",{class:"card",part:"nse__login-required-card"},e&&n.h("div",{class:"login-error-banner",part:"nse__login-required-error",role:"alert"},n.h("warning-icon",{width:"16",height:"16"}),n.h("span",null,e)),n.h("p",{part:"nse__login-required-text"},"Log into your account to use the Scheduler Editor."),n.h("button",{class:"google-button",part:"nse__login-required-google-button",onClick:async t=>{t.preventDefault();const i=await a("google");i?window.location.href=i:n.error("[nylas-scheduler-editor] Unable to get authentication URL.")}},n.h("span",{class:"icon"},n.h("google-logo-icon",{width:"15",height:"15"})),"Continue with Google"),n.h("button",{class:"microsoft-button",part:"nse__login-required-microsoft-button",onClick:async t=>{t.preventDefault();const i=await a("microsoft");i?window.location.href=i:n.error("[nylas-scheduler-editor] Unable to get authentication URL.")}},n.h("span",{class:"icon"},n.h("microsoft-logo-icon",{width:"15",height:"15"})),"Continue with Microsoft"),n.h("button",{class:"other-provider-button",part:"nse__login-required-other-provider-button",onClick:async t=>{t.preventDefault();const i=await a();i?window.location.href=i:n.error("[nylas-scheduler-editor] Unable to get authentication URL.")}},"View all providers ",n.h("chevron-icon",{width:"17",height:"17"})),n.h("small",{class:"disclaimer-text",part:"nse__login-required-disclaimer-text"},"* You will be redirected to authenticate your account.")));function zm({currentUser:a,calendars:e,selectedEventType:t}){const i=e?.find(o=>o.is_primary)||e?.[0];switch(t){case n.CONFIGURATION_EVENT_TYPE.one_on_one:case n.CONFIGURATION_EVENT_TYPE.max_availability:case n.CONFIGURATION_EVENT_TYPE.max_fairness:return n.h(n.Fragment,null,n.h("nylas-event-info",null,n.h("div",{slot:"inputs"},n.h("nylas-event-title",null),n.h("nylas-event-duration",null),n.h("nylas-event-location",{userProvider:a.provider}))),n.h("nylas-booking-calendar-picker",{exportparts:"nbcp, nbcp__header, nbcp__dropdown, nbcp__dropdown-button, nbcp__dropdown-content",expressFlow:!0,calendars:e,currentUser:a,defaultBookingCalendar:i?.id}),n.h("nylas-custom-event-slug",{name:"custom-event-slug",exportparts:"nces, nces__body, nces__header, nces__drawer-toggle--container, nces__input-textfield"}));case n.CONFIGURATION_EVENT_TYPE.collective:return n.h(n.Fragment,null,n.h("nylas-event-info",null,n.h("div",{slot:"inputs"},n.h("nylas-event-title",null),n.h("nylas-event-duration",null),n.h("nylas-event-location",{userProvider:a.provider}))),n.h("nylas-booking-calendar-picker",{exportparts:"nbcp, nbcp__header, nbcp__dropdown, nbcp__dropdown-button, nbcp__dropdown-content",expressFlow:!0,calendars:e,currentUser:a,defaultBookingCalendar:i?.id}),n.h("nylas-custom-event-slug",{name:"custom-event-slug",exportparts:"nces, nces__body, nces__header, nces__drawer-toggle--container, nces__input-textfield"}),n.h("nylas-additional-participants",{name:"participants",eventParticipants:[{name:a?.name||a?.email,email:a?.email||"",is_organizer:!0}],exportparts:"nadtnlpart, nadtnlpart__title, nadtnlpart__subtitle, nadtnlpart__content, nadtnlpart__input_group, nadtnlpart__input_wrapper, nadtnlpart__input, nadtnlpart__remove-participant"}));case n.CONFIGURATION_EVENT_TYPE.group:return n.h(n.Fragment,null,n.h("nylas-event-info",null,n.h("div",{slot:"inputs"},n.h("nylas-event-title",{noTemplates:!0}),n.h("nylas-event-description",{noTemplates:!0,hideAutoPopulateButton:!0}),n.h("nylas-event-location",{userProvider:a.provider}),n.h("nylas-event-timeslot",{name:"event-timeslot"}),n.h("nylas-event-capacity",null))),n.h("nylas-booking-calendar-picker",{exportparts:"nbcp, nbcp__header, nbcp__dropdown, nbcp__dropdown-button, nbcp__dropdown-content",expressFlow:!0,calendars:e,currentUser:a,defaultBookingCalendar:i?.id}),n.h("nylas-additional-participants",{name:"participants",eventParticipants:[{name:a?.name||a?.email,email:a?.email||"",is_organizer:!0}],exportparts:"nadtnlpart, nadtnlpart__title, nadtnlpart__subtitle, nadtnlpart__content, nadtnlpart__input_group, nadtnlpart__input_wrapper, nadtnlpart__input, nadtnlpart__remove-participant"}),n.h("nylas-page-name",{requirePageName:!0,pageName:"Group events page"}),n.h("nylas-custom-event-slug",{name:"custom-event-slug",exportparts:"nces, nces__body, nces__header, nces__drawer-toggle--container, nces__input-textfield"}))}}const JS=':host{display:flex;flex-direction:column;overflow:visible;border-radius:var(--nylas-border-radius-2x);width:fit-content;background:var(--nylas-base-0);position:relative;box-shadow:0px 0px 6px -2px rgba(0, 0, 0, 0.05), 0px 5px 15px -3px rgba(0, 0, 0, 0.1);--nylas-primary:#2563eb;--nylas-error:#cc4841;--nylas-error-50:#ffeae8;--nylas-error-100:#ffc5bf;--nylas-error-200:#fecaca;--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}:host nylas-notification{position:absolute;top:0;right:0}@media screen and (max-width: 768px){:host{width:-moz-available;width:-webkit-fill-available;width:fill-available;min-width:325px}}div.scheduler-editor-content{height:800px}@media screen and (max-width: 768px){div.scheduler-editor-content{height:auto}}div.scheduler-editor-content slot[name=login-required]{height:inherit}div.scheduler-editor-content--group{height:800px}@media screen and (max-width: 768px){div.scheduler-editor-content--group{height:auto}}div.scheduler-editor-header{display:grid;grid-template-columns:1fr auto auto;align-items:center;justify-content:space-between;padding:1rem;border-bottom:1px solid var(--nylas-base-200);color:var(--nylas-base-900);min-width:924px}@media screen and (max-width: 768px){div.scheduler-editor-header{width:auto;min-width:calc(325px - 1rem)}}div.scheduler-editor-header h1.scheduler-editor-title{display:flex;align-items:center;gap:0.5rem;margin:0;font-size:18px;line-height:24px;font-weight:600}div.scheduler-editor-header button{background:transparent;border:none;cursor:pointer;color:var(--nylas-base-900)}div.scheduler-editor-header button:hover,div.scheduler-editor-header button:active{color:var(--nylas-primary);background-color:transparent}div.scheduler-editor-header button:disabled{cursor:not-allowed}div.scheduler-editor-header div.language select-dropdown::part(sd_dropdown-button){border:none;padding:4px;margin-right:8px}div.scheduler-editor-header div.language select-dropdown::part(sd_dropdown-button):hover{outline:none;color:var(--nylas-primary)}div.scheduler-editor-header div.language select-dropdown::part(sd_dropdown-content){min-width:132px}@media screen and (max-width: 768px){div.scheduler-editor-header div.language select-dropdown::part(sd_dropdown-content){width:-webkit-fill-available;width:fill-available;width:-moz-available}}nylas-select-event-type{height:inherit;width:calc(924px + 2rem)}@media screen and (max-width: 768px){nylas-select-event-type{width:auto}}nylas-editor-tabs,nylas-editor-tabs-group{width:auto;height:inherit}nylas-editor-tabs .row,nylas-editor-tabs-group .row{display:flex;gap:1rem}nylas-editor-tabs .composable,nylas-editor-tabs-group .composable{height:inherit;overflow:auto}nylas-editor-tabs nylas-event-info div[slot=inputs],nylas-editor-tabs nylas-event-limits div[slot=inputs],nylas-editor-tabs-group nylas-event-info div[slot=inputs],nylas-editor-tabs-group nylas-event-limits div[slot=inputs]{display:flex;flex-direction:column;gap:1rem}.card{display:flex;flex-direction:column;padding:2rem;background-color:var(--nylas-base-0);border:1px solid var(--nylas-base-200);border-radius:5px;color:var(--nylas-base-900);max-width:fit-content;align-self:center}.login-required{height:inherit;overflow-y:auto;display:flex;flex-direction:column;justify-content:center;padding:2rem 1rem;background-color:var(--nylas-base-25);border-radius:var(--nylas-border-radius-2x)}.login-required .login-error-banner{display:flex;align-items:center;gap:0.5rem;padding:0.75rem 1rem;margin-bottom:1rem;background-color:var(--nylas-error-50, #fef2f2);border:1px solid var(--nylas-error-200, #fecaca);border-radius:5px;color:var(--nylas-error-700, #b91c1c);font-size:0.875rem;line-height:1.25rem}.login-required .login-error-banner svg{flex-shrink:0;color:var(--nylas-error-500, #ef4444)}.login-required p{margin:0 0 1rem}.login-required .microsoft-button,.login-required .google-button{height:48px;border:1px solid var(--nylas-base-300);border-radius:var(--nylas-border-radius-2x);font-size:16px;line-height:24px;padding:0 1rem;background-color:var(--nylas-base-0);font-weight:600;cursor:pointer;display:flex;margin-bottom:1rem;background-color:var(--nylas-base-0);border:1px solid var(--nylas-base-200);border-radius:5px;justify-content:center;gap:0.5rem;align-items:center;color:var(--nylas-base-900)}.login-required .microsoft-button:hover,.login-required .google-button:hover{background-color:var(--nylas-base-25)}.login-required .microsoft-button:hover,.login-required .google-button:hover{background-color:var(--nylas-base-25)}.login-required .other-provider-button{height:48px;border:1px solid var(--nylas-base-300);border-radius:var(--nylas-border-radius-2x);font-size:16px;line-height:24px;padding:0 1rem;background-color:var(--nylas-base-0);font-weight:600;cursor:pointer;display:flex;border:0;background-color:var(--nylas-base-0);height:48px;margin-bottom:1rem;font-size:0.95rem;justify-content:center;gap:0.25rem;align-items:center;color:var(--nylas-base-900)}.login-required .other-provider-button:hover{background-color:var(--nylas-base-25)}.login-required .other-provider-button svg{transform:rotate(180deg)}.login-required .other-provider-button:hover{background-color:var(--nylas-base-25)}.login-required .disclaimer-text{font-size:0.75rem;color:var(--nylas-base-600);align-self:center}@media screen and (max-width: 768px){.login-required{height:auto}}.list-configurations{padding:2rem;height:inherit;background:var(--nylas-base-25);border-radius:var(--nylas-border-radius-2x)}.list-configurations nylas-list-configurations{height:inherit;display:flex;flex-direction:column}@media screen and (max-width: 768px){.list-configurations{height:auto;padding:2rem 1rem}}',_b=n.proxyCustomElement(class extends n.H{constructor(){super(),this.__registerHost(),this.__attachShadow(),this.init=n.createEvent(this,"init",7),this.loggedIn=n.createEvent(this,"loggedIn",7),this.loggedOut=n.createEvent(this,"loggedOut",7),this.schedulerConfigCloseClicked=n.createEvent(this,"schedulerConfigCloseClicked",7),this.nylasSchedulerEditorError=n.createEvent(this,"nylasSchedulerEditorError",6),this.eventOverrides={},this.schedulerPreviewLink="",this.mode="app",this.hideEditorTabs=[],this.requiresSlug=!1,this.enableUserFeedback=!0,this.nylasBranding=!0,this.enableNotetaker=!1,this.enableEventTypes={one_on_one:!0,collective:!0,max_fairness:!0,max_availability:!0,group:!0},this.automaticComponentRegistration=!0,this.selectedLanguage=this.defaultLanguage||n.LANGUAGE_CODE.en,this.langVersion=0,this.version=oa,this.handleSchedulerConfigCloseClicked=e=>{const t=this.schedulerConfigCloseClicked.emit(this.host);"schedulerConfigCloseClicked"in this.eventOverrides&&this.eventOverrides.schedulerConfigCloseClicked(t,this.nylasSchedulerConfigConnector),t.defaultPrevented||(localStorage.removeItem("grant"),localStorage.removeItem("user"),window.location.reload())},this.authenticationUrl=async e=>{if(!this.nylasApiRequest){const t="Unable to authenticate. API request handler is not initialized.";return n.error(`[nylas-scheduler-editor] ${t}`),this.authError=t,this.nylasSchedulerEditorError.emit({notification:{id:"auth-not-initialized",type:di.Error,title:"Authentication Error",category:Ze.Auth,description:t,ttl:"none"},host:this.host}),""}try{const t=await this.nylasApiRequest.authenticationUrl({provider:e});if(!t){const i="Unable to get authentication URL. Please check your configuration and try again.";this.authError=i,this.nylasSchedulerEditorError.emit({notification:{id:"auth-url-failed",type:di.Error,title:"Authentication Error",category:Ze.Auth,description:i,ttl:"none"},host:this.host})}return t||""}catch(t){const i=`Authentication failed: ${t instanceof Error?t.message:"Unknown error"}`;return n.error(`[nylas-scheduler-editor] ${i}`),this.authError=i,this.nylasSchedulerEditorError.emit({notification:{id:"auth-url-exception",type:di.Error,title:"Authentication Error",category:Ze.Auth,description:i,ttl:"none"},host:this.host}),""}}}connectedCallback(){n.debug("[nylas-scheduler-editor] connectedCallback"),queueMicrotask(()=>{this.themeConfig&&(this.applyThemeConfig(this.themeConfig),this.host.setAttribute("data-themed",""))})}async componentWillLoad(){n.debug("[nylas-scheduler-editor] componentWillLoad"),await Promise.resolve();const e=this.additionalParticipants?.filter(o=>{const s=o.calendars?.length>0?o.calendars.filter(l=>l.id&&l.name):[];if(o.name&&o.email&&s.length>0)return{name:o.name,email:o.email,calendars:s}});if(this.stores={schedulerConfig:wS({...this.defaultSchedulerConfigState,additionalParticipants:e||[],participantFetch:this.participantFetch,participantFetchGrantId:this.participantFetchGrantId,participantSearch:this.participantSearch,conferenceProviders:this.conferenceProviders,requiresSlug:this.requiresSlug,selectedLanguage:this.defaultLanguage||n.LANGUAGE_CODE.en,nylasBranding:this.nylasBranding,experimentalFeatures:this.experimentalFeatures,enableEventTypes:this.enableEventTypes,themeConfig:this.themeConfig})},!this.nylasApiRequest&&this.nylasSessionsConfig){const o=new qS(this.nylasSessionsConfig);await o.isLoggedIn(),o.onLoginSuccess(async()=>{const s=await this.nylasSchedulerConfigConnector?.schedulerConfig?.currentUser();if(s){const l=this.loggedIn.emit(this.host);"loggedIn"in this.eventOverrides&&await this.eventOverrides.loggedIn(l,this.nylasSchedulerConfigConnector),l.defaultPrevented||await this.loggedInHandler(s)}}),o.onLoginFail(async()=>{this.stores?.schedulerConfig?.set("currentUser",null),this.authError="Authentication failed. Please try again.",this.nylasSchedulerEditorError.emit({notification:{id:"auth-login-failed",type:di.Error,title:"Authentication Error",category:Ze.Auth,description:"Authentication failed. Please try again.",ttl:"none"},host:this.host});const s=this.loggedOut.emit(this.host);"loggedOut"in this.eventOverrides&&(await this.eventOverrides.loggedOut(s,this.nylasSchedulerConfigConnector),s.defaultPrevented)}),this.nylasApiRequest=new n.NylasIdentityRequestWrapper(o)}this.nylasApiRequest&&this.defaultAuthArgs&&this.nylasApiRequest.setDefaultAuthArgs(this.defaultAuthArgs),this.baseProvider=new vb(this.host,this.stores,this.automaticComponentRegistration,this.eventOverrides);const t=this.baseProvider.getStore("schedulerConfig");this.nylasSchedulerConfigConnector=new ES({nylasApiRequest:this.nylasApiRequest,nylasSchedulerConfigStore:t});const i=this.init.emit(this.host);if("init"in this.eventOverrides&&await this.eventOverrides.init(i,this.nylasSchedulerConfigConnector),!i.defaultPrevented){const o=await this.nylasSchedulerConfigConnector?.schedulerConfig?.currentUser();if(o){const s=this.loggedIn.emit(this.host);"loggedIn"in this.eventOverrides&&await this.eventOverrides.loggedIn(s,this.nylasSchedulerConfigConnector),s.defaultPrevented||await this.loggedInHandler(o)}else{this.stores?.schedulerConfig?.set("currentUser",null);const s=this.loggedOut.emit(this.host);if("loggedOut"in this.eventOverrides&&(await this.eventOverrides.loggedOut(s,this.nylasSchedulerConfigConnector),s.defaultPrevented))return}}this.stores?.schedulerConfig?.onChange("selectedConfiguration",async o=>{o&&o.id&&(this.configurationId=o.id)}),this.baseProvider?.componentWillLoad(this.nylasSchedulerConfigConnector),this.applyThemeConfig(this.themeConfig)}async componentDidLoad(){n.debug("[nylas-scheduler-editor] componentDidLoad"),await this.baseProvider?.componentDidLoad(),this.updateLocalization(this.localization),this.version=oa}async componentDisconnected(){await this.baseProvider?.componentDisconnected()}async configurationIdChanged(e){e?(await this.nylasSchedulerConfigConnector?.schedulerConfig?.getConfigurationById(e),this.stores?.schedulerConfig?.set("action","edit")):(this.stores?.schedulerConfig?.set("selectedConfiguration",{}),this.stores?.schedulerConfig?.set("action",null))}participantPropsChanged(){this.stores?.schedulerConfig?.set("participantFetch",this.participantFetch),this.stores?.schedulerConfig?.set("participantFetchGrantId",this.participantFetchGrantId),this.stores?.schedulerConfig?.set("participantSearch",this.participantSearch)}updateLocalization(e){e&&(Object.keys(e).forEach(t=>{t in n.LANGUAGE_CODE&&n.instance.addResourceBundle(t,"translation",e[t],!1,!0)}),this.langVersion++)}updateNylasBranding(e){this.stores?.schedulerConfig?.set("nylasBranding",e)}updateExperimentalFeatures(e){this.stores?.schedulerConfig?.set("experimentalFeatures",e)}updateEnableEventTypes(e){this.stores?.schedulerConfig?.set("enableEventTypes",e)}themeConfigChanged(e){this.baseProvider?.getStore("schedulerConfig")?.set("themeConfig",e),this.applyThemeConfig(e)}applyThemeConfig(e){if(e)for(const[t,i]of Object.entries(e))this.host.style.setProperty(`${t}`,i)}async store(){return this.stores?.schedulerConfig}async schedulerConnector(){return this.nylasSchedulerConfigConnector}async registerComponentHandler(e){this.baseProvider?.registerComponent(e.detail)}async unregisterComponentHandler(e){this.baseProvider?.unregisterComponent(e.detail)}handleChildSchedulerError(e){this.nylasSchedulerEditorError.emit({notification:e.detail.notification,host:this.host})}nylasFormDropdownChangedHandler(e){const{name:t,value:i}=e.detail;t==="language"&&(this.selectedLanguage=n.LANGUAGE_CODE[i],n.instance.changeLanguage(this.selectedLanguage),this.stores?.schedulerConfig?.set("selectedLanguage",this.selectedLanguage))}async loggedInHandler(e){if(this.stores?.schedulerConfig?.set("currentUser",e),!!this.nylasSchedulerConfigConnector&&(await this.nylasSchedulerConfigConnector.schedulerConfig?.getCalendars(),this.configurationId)){const t=await this.nylasSchedulerConfigConnector.schedulerConfig?.getConfigurationById(this.configurationId);t&&t[0]?.id&&this.stores?.schedulerConfig?.set("action","edit")}}render(){const e=this.host.querySelector('[slot="custom-page-style-inputs"]'),t=this.stores?.schedulerConfig?.state.selectedConfiguration?.id,i=Object.keys(n.LANGUAGE_MAP).map(s=>({label:n.LANGUAGE_MAP[s],value:s})),o=this.stores?.schedulerConfig?.state.selectedEventType===n.CONFIGURATION_EVENT_TYPE.group||this.stores?.schedulerConfig?.state.selectedConfiguration?.type===n.CONFIGURATION_EVENT_TYPE.group;return n.debug(`[nylas-scheduler-editor] render mode: ${this.mode}`),n.h(n.Host,{key:"bd34e24975197c26bf6e08430c8434c40441c367"},n.h("div",{key:"5c1bb57eb7dbd13f879dcbe7de251e6d8687c470",class:"scheduler-editor-header",part:"nse__header"},n.h("h1",{key:"ecf284b9c4c39129233c977b978d8069e448367e",class:"scheduler-editor-title",part:"nse__title"},n.h("calendar-icon",{key:"44b73dbff4441d72ceda5281f6bf07bfb2134dae",width:"18",height:"18"}),n.instance.t("schedulerEditorTitle"),n.h("tooltip-component",{key:"bc20294846164811db22d185e52f50f848d59bd5"},n.h("info-icon",{key:"22955828856eae5f4f7e5d7d51e8e73f11f9805d",slot:"tooltip-icon"}),n.h("span",{key:"9178f588fa8ffe60865b8c6c632ec4dafd91a00d",slot:"tooltip-content"},this.version))),n.h("div",{key:"a67874094ff69226349d1ee0274e27da0da38ad6",class:{language:!0},part:"nse__language"},n.h("select-dropdown",{key:"e47566a2f832d90baa93701afe8efea71476ecec",name:"language",searchPlaceholder:n.instance.t("search"),options:i,withChevron:!1,themeConfig:this.themeConfig,defaultSelectedOption:i.find(s=>s.value==this.selectedLanguage),exportparts:"sd_dropdown: nse__language-dropdown, sd_dropdown-button: nse__language-drop-button, sd_dropdown-content: nse__language-drop-content, sd_dropdown_label: nse__language-drop-label"},n.h("span",{key:"1c7c9d93808786f7e4a1b5ecee414e289074366f",slot:"select-icon"},n.h("translate-icon",{key:"c9b8adee3195f4a50f0ed7c4929b972e59236558",width:"20",height:"20"})))),n.h("button",{key:"fe8c5481fbd2ac6da51fe1420caf973d79d01857",class:"scheduler-editor-close",title:"logout",onClick:s=>this.handleSchedulerConfigCloseClicked(s),part:"nse__close-button"},n.h("close-icon",{key:"ead618a2acc222ff1ec4ca9c552cd81a8c86a57f",width:"18",height:"18"}))),n.h("div",{key:"dffa964669c0b5ca0155ddd3b351a6bb164f7463",class:{"scheduler-editor-content":!0,"scheduler-editor-content--group":o},part:"nse__content"},this.stores?.schedulerConfig?.state.currentUser&&this.stores.schedulerConfig.state.action===null&&this.mode==="composable"&&n.h("slot",{key:"bf58230869a3326fa9cf6ee8b7c18586cc41a074"}),this.stores?.schedulerConfig?.state.currentUser&&this.stores.schedulerConfig.state.action===null&&this.mode!=="composable"&&n.h("div",{key:"edb06ecb33d8f3713da228d70fa72d3db2183235",class:"list-configurations",part:"nse__list-configurations"},n.h("nylas-list-configurations",{key:"ffdcd2304ce49e29aa74da69bad90af9d237a6e8",themeConfig:this.themeConfig,exportparts:"nlc__create-new-cta, actions__dropdown, actions__dropdown-button, actions__dropdown-content, actions-Copy, actions-Preview, actions-Delete"})),this.stores?.schedulerConfig?.state.currentUser&&this.stores.schedulerConfig.state.action==="create-select"&&n.h("nylas-select-event-type",{key:"a5bff89ece1dd30afea1c014d162797bfa7d1df5",themeConfig:this.themeConfig}),this.stores?.schedulerConfig?.state.currentUser&&this.stores.schedulerConfig.state.action==="create"&&o&&n.h("nylas-editor-tabs-group",{key:"08241ae21a7df72079cc49312b4272d2a8cd0b2a",mode:"composable",themeConfig:this.themeConfig},n.h(zm,{key:"86d73811907bfe16c255642fb0755baa9766cf00",selectedEventType:this.stores?.schedulerConfig?.state?.selectedEventType||n.CONFIGURATION_EVENT_TYPE.one_on_one,currentUser:this.stores?.schedulerConfig?.state.currentUser,calendars:this.stores?.schedulerConfig?.state?.calendars,selectedConfiguration:this.stores?.schedulerConfig?.state?.selectedConfiguration})),this.stores?.schedulerConfig?.state.currentUser&&this.stores.schedulerConfig.state.action==="create"&&!o&&n.h("nylas-editor-tabs",{key:"5b85bf26f6243f723a1f0cad821d719cff3f776b",mode:"composable",enableNotetaker:this.enableNotetaker,themeConfig:this.themeConfig},n.h(zm,{key:"5afa9f82b0cb0b495d26b134688c49d82743d7cf",selectedEventType:this.stores?.schedulerConfig?.state?.selectedEventType||n.CONFIGURATION_EVENT_TYPE.one_on_one,currentUser:this.stores?.schedulerConfig?.state.currentUser,calendars:this.stores?.schedulerConfig?.state?.calendars,selectedConfiguration:this.stores?.schedulerConfig?.state?.selectedConfiguration})),this.stores?.schedulerConfig?.state.currentUser&&this.stores.schedulerConfig.state.action==="edit"&&o&&n.h("nylas-editor-tabs-group",{key:t,mode:this.mode,themeConfig:this.themeConfig},this.mode==="composable"&&n.h("slot",{key:"6ec0c1b4daad2d875f8f3cdbb465eb0721133947"}),this.mode==="app"&&e&&n.h("div",{style:{display:"none"},slot:"custom-page-style-inputs",key:t},n.h("slot",{key:"b3c580772253a6a7d5dc3e7f8fd2be2f9a23f247",name:"custom-page-style-inputs"}))),this.stores?.schedulerConfig?.state.currentUser&&this.stores.schedulerConfig.state.action==="edit"&&!o&&n.h("nylas-editor-tabs",{key:t,mode:this.mode,enableNotetaker:this.enableNotetaker,themeConfig:this.themeConfig},this.mode==="composable"&&n.h("slot",{key:"48a71a45b5271485a4f136cb4afa52df94ee469b"}),this.mode==="app"&&e&&n.h("div",{style:{display:"none"},slot:"custom-page-style-inputs",key:t},n.h("slot",{key:"f81fede8cc3d3686056e5222798494fdc76d419f",name:"custom-page-style-inputs"}))),!this.stores?.schedulerConfig?.state.currentUser&&n.h("slot",{key:"968207fdadd383d6da1e8188d0960901e38e949d",name:"login-required"},n.h(XS,{key:"e0c275ef713bd4040c07083898918d1b8e39e171",authenticationUrl:this.authenticationUrl,authError:this.authError}))))}get host(){return this}static get watchers(){return{configurationId:["configurationIdChanged"],participantFetch:["participantPropsChanged"],participantFetchGrantId:["participantPropsChanged"],participantSearch:["participantPropsChanged"],localization:["updateLocalization"],nylasBranding:["updateNylasBranding"],experimentalFeatures:["updateExperimentalFeatures"],enableEventTypes:["updateEnableEventTypes"],themeConfig:["themeConfigChanged"]}}static get style(){return JS}},[257,"nylas-scheduler-editor",{configurationId:[1025,"configuration-id"],nylasApiRequest:[1040,"nylas-api-request"],nylasSessionsConfig:[16,"nylas-sessions-config"],defaultAuthArgs:[16,"default-auth-args"],eventOverrides:[16,"event-overrides"],schedulerPreviewLink:[1,"scheduler-preview-link"],defaultSchedulerConfigState:[16,"default-scheduler-config-store-state"],mode:[1],additionalParticipants:[16,"additional-participants"],participantFetch:[16,"participant-fetch"],participantFetchGrantId:[1,"participant-fetch-grant-id"],participantSearch:[16,"participant-search"],hideEditorTabs:[16,"hide-editor-tabs"],conferenceProviders:[16,"conference-providers"],requiresSlug:[4,"requires-slug"],enableUserFeedback:[4,"enable-user-feedback"],defaultLanguage:[1,"default-language"],localization:[16],nylasBranding:[4,"nylas-branding"],enableNotetaker:[4,"enable-notetaker"],experimentalFeatures:[16,"experimental-features"],enableEventTypes:[16,"enable-event-types"],themeConfig:[16,"theme-config"],automaticComponentRegistration:[32],selectedLanguage:[32],langVersion:[32],version:[32],authError:[32],store:[64],schedulerConnector:[64]},[[0,"registerComponent","registerComponentHandler"],[0,"unregisterComponent","unregisterComponentHandler"],[0,"nylasSchedulerError","handleChildSchedulerError"],[0,"nylasFormDropdownChanged","nylasFormDropdownChangedHandler"]],{configurationId:["configurationIdChanged"],participantFetch:["participantPropsChanged"],participantFetchGrantId:["participantPropsChanged"],participantSearch:["participantPropsChanged"],localization:["updateLocalization"],nylasBranding:["updateNylasBranding"],experimentalFeatures:["updateExperimentalFeatures"],enableEventTypes:["updateEnableEventTypes"],themeConfig:["themeConfigChanged"]}]);function KS(){if(typeof customElements>"u")return;["nylas-scheduler-editor","add-circle-icon","button-component","calendar-agenda-fill-icon","calendar-agenda-icon","calendar-icon","calendar-info-icon","calendar-patterns-icon","checkbox-component","checkbox-group","checkmark-icon","chevron-icon","clock-icon","close-icon","copy-icon","delete-icon","dragable-icon","edit-icon","envelope-fill-icon","envelope-icon","eye-icon","feedback-icon","flow-icon","globe-icon","google-logo-icon","google-meet-icon","info-icon","input-color-picker","input-component","input-dropdown","input-image-url","loading-icon","location-icon","location-off-icon","microsoft-logo-icon","microsoft-teams-icon","multi-select-dropdown","nylas-additional-participants","nylas-availability-picker","nylas-booking-calendar-picker","nylas-booking-confirmation-redirect","nylas-booking-confirmation-type","nylas-booking-form-config","nylas-buffer-time","nylas-calendar-picker","nylas-cancellation-policy","nylas-confirmation-email","nylas-connected-calendars","nylas-custom-booking-flow","nylas-custom-event-slug","nylas-customize-booking-settings","nylas-date-component","nylas-disable-emails","nylas-editor-tabs","nylas-editor-tabs-group","nylas-event-calendar","nylas-event-capacity","nylas-event-description","nylas-event-duration","nylas-event-info","nylas-event-limits","nylas-event-location","nylas-event-timeslot","nylas-event-title","nylas-feedback-form","nylas-form-card","nylas-limit-future-bookings","nylas-list-configurations","nylas-min-booking-notice","nylas-min-cancellation-notice","nylas-notetaker-config","nylas-notification","nylas-only-specific-time-availability","nylas-page-name","nylas-page-styling","nylas-participant-booking-calendars","nylas-participants-custom-availability","nylas-reminder-emails","nylas-reminder-time","nylas-scheduling-method","nylas-select-event-type","nylas-specific-time-availability-picker","nylas-time-window-picker","nylas-timeslot-interval","paintbrush-fill-icon","paintbrush-icon","people-icon","person-clipboard-icon","plus-icon","radio-button-group","search-icon","select-dropdown","textarea-component","time-period-selector","toggle-switch","tooltip-component","translate-icon","trash-icon","warning-icon","zoom-icon"].forEach(e=>{switch(e){case"nylas-scheduler-editor":customElements.get(e)||customElements.define(e,_b);break;case"add-circle-icon":customElements.get(e)||wn();break;case"button-component":customElements.get(e)||Rt();break;case"calendar-agenda-fill-icon":customElements.get(e)||er();break;case"calendar-agenda-icon":customElements.get(e)||tr();break;case"calendar-icon":customElements.get(e)||_a();break;case"calendar-info-icon":customElements.get(e)||Pd();break;case"calendar-patterns-icon":customElements.get(e)||Md();break;case"checkbox-component":customElements.get(e)||qn();break;case"checkbox-group":customElements.get(e)||ar();break;case"checkmark-icon":customElements.get(e)||go();break;case"chevron-icon":customElements.get(e)||Xe();break;case"clock-icon":customElements.get(e)||ka();break;case"close-icon":customElements.get(e)||zt();break;case"copy-icon":customElements.get(e)||Si();break;case"delete-icon":customElements.get(e)||Nd();break;case"dragable-icon":customElements.get(e)||yo();break;case"edit-icon":customElements.get(e)||Ga();break;case"envelope-fill-icon":customElements.get(e)||ir();break;case"envelope-icon":customElements.get(e)||or();break;case"eye-icon":customElements.get(e)||bo();break;case"feedback-icon":customElements.get(e)||vo();break;case"flow-icon":customElements.get(e)||sr();break;case"globe-icon":customElements.get(e)||cn();break;case"google-logo-icon":customElements.get(e)||wg();break;case"google-meet-icon":customElements.get(e)||Ti();break;case"info-icon":customElements.get(e)||Ke();break;case"input-color-picker":customElements.get(e)||Co();break;case"input-component":customElements.get(e)||Ft();break;case"input-dropdown":customElements.get(e)||en();break;case"input-image-url":customElements.get(e)||Di();break;case"loading-icon":customElements.get(e)||At();break;case"location-icon":customElements.get(e)||Ii();break;case"location-off-icon":customElements.get(e)||Ai();break;case"microsoft-logo-icon":customElements.get(e)||Pg();break;case"microsoft-teams-icon":customElements.get(e)||Ri();break;case"multi-select-dropdown":customElements.get(e)||Yn();break;case"nylas-additional-participants":customElements.get(e)||_o();break;case"nylas-availability-picker":customElements.get(e)||rr();break;case"nylas-booking-calendar-picker":customElements.get(e)||lr();break;case"nylas-booking-confirmation-redirect":customElements.get(e)||cr();break;case"nylas-booking-confirmation-type":customElements.get(e)||dr();break;case"nylas-booking-form-config":customElements.get(e)||ur();break;case"nylas-buffer-time":customElements.get(e)||ef();break;case"nylas-calendar-picker":customElements.get(e)||hr();break;case"nylas-cancellation-policy":customElements.get(e)||pr();break;case"nylas-confirmation-email":customElements.get(e)||mr();break;case"nylas-connected-calendars":customElements.get(e)||cf();break;case"nylas-custom-booking-flow":customElements.get(e)||gr();break;case"nylas-custom-event-slug":customElements.get(e)||yr();break;case"nylas-customize-booking-settings":customElements.get(e)||br();break;case"nylas-date-component":customElements.get(e)||On();break;case"nylas-disable-emails":customElements.get(e)||Cr();break;case"nylas-editor-tabs":customElements.get(e)||hb();break;case"nylas-editor-tabs-group":customElements.get(e)||fb();break;case"nylas-event-calendar":customElements.get(e)||au();break;case"nylas-event-capacity":customElements.get(e)||Dr();break;case"nylas-event-description":customElements.get(e)||Ro();break;case"nylas-event-duration":customElements.get(e)||mu();break;case"nylas-event-info":customElements.get(e)||Oo();break;case"nylas-event-limits":customElements.get(e)||Lr();break;case"nylas-event-location":customElements.get(e)||Lo();break;case"nylas-event-timeslot":customElements.get(e)||Ir();break;case"nylas-event-title":customElements.get(e)||Ho();break;case"nylas-feedback-form":customElements.get(e)||Fo();break;case"nylas-form-card":customElements.get(e)||sa();break;case"nylas-limit-future-bookings":customElements.get(e)||yu();break;case"nylas-list-configurations":customElements.get(e)||pb();break;case"nylas-min-booking-notice":customElements.get(e)||Hr();break;case"nylas-min-cancellation-notice":customElements.get(e)||Pr();break;case"nylas-notetaker-config":customElements.get(e)||vu();break;case"nylas-notification":customElements.get(e)||Ni();break;case"nylas-only-specific-time-availability":customElements.get(e)||_u();break;case"nylas-page-name":customElements.get(e)||Mr();break;case"nylas-page-styling":customElements.get(e)||Fr();break;case"nylas-participant-booking-calendars":customElements.get(e)||Eu();break;case"nylas-participants-custom-availability":customElements.get(e)||Su();break;case"nylas-reminder-emails":customElements.get(e)||Nr();break;case"nylas-reminder-time":customElements.get(e)||No();break;case"nylas-scheduling-method":customElements.get(e)||$r();break;case"nylas-select-event-type":customElements.get(e)||Cb();break;case"nylas-specific-time-availability-picker":customElements.get(e)||jr();break;case"nylas-time-window-picker":customElements.get(e)||ra();break;case"nylas-timeslot-interval":customElements.get(e)||Du();break;case"paintbrush-fill-icon":customElements.get(e)||zr();break;case"paintbrush-icon":customElements.get(e)||Br();break;case"people-icon":customElements.get(e)||Iu();break;case"person-clipboard-icon":customElements.get(e)||Hi();break;case"plus-icon":customElements.get(e)||Oi();break;case"radio-button-group":customElements.get(e)||Li();break;case"search-icon":customElements.get(e)||ut();break;case"select-dropdown":customElements.get(e)||pt();break;case"textarea-component":customElements.get(e)||Ln();break;case"time-period-selector":customElements.get(e)||Hn();break;case"toggle-switch":customElements.get(e)||Ea();break;case"tooltip-component":customElements.get(e)||Qe();break;case"translate-icon":customElements.get(e)||qa();break;case"trash-icon":customElements.get(e)||$o();break;case"warning-icon":customElements.get(e)||Ka();break;case"zoom-icon":customElements.get(e)||Fi();break}})}const QS=_b,eT=KS,tT=uu,nT=$r,aT=':host{--nylas-primary:#2563eb;--nylas-error:#cc4841;--nylas-error-50:#ffeae8;--nylas-error-100:#ffc5bf;--nylas-error-200:#fecaca;--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;display:block;position:relative;height:inherit;display:flex;flex-direction:column;justify-content:center;align-items:center;font-family:var(--nylas-font-family)}.event-card{display:flex;align-items:center;flex-direction:column;gap:4px;width:calc(100% - 3rem);background-color:var(--nylas-base-0);color:var(--nylas-base-800);border-radius:var(--nylas-border-radius-2x);padding:3rem 1.5rem 1.5rem 1.5rem;position:relative;box-shadow:0px 1px 3px 0px rgba(0, 0, 0, 0.1), 0px 1px 2px 0px rgba(0, 0, 0, 0.06)}@media screen and (max-width: 768px){.event-card{margin-bottom:2rem}}.nylas-selected-event-card__date{font-size:min(max(16px, 3vw), 18px);font-weight:600}.nylas-selected-event-card__time{font-size:16px;font-weight:500}.calendar-icon{width:3rem;height:3rem;border-radius:50%;position:absolute;top:-1.25rem;left:50%;transform:translateX(-50%);background-color:var(--nylas-base-0);border:1px solid var(--nylas-base-200)}calendar-icon{display:flex;align-items:center;justify-content:center;height:100%}.event-timezone{display:flex;color:var(--nylas-base-600);margin-bottom:8px;gap:4px;align-items:center}@media screen and (max-width: 768px){.event-timezone{margin-bottom:16px}}';var iT=function(a,e,t,i){var o=arguments.length,s=o<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,l;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(a,e,t,i);else for(var f=a.length-1;f>=0;f--)(l=a[f])&&(s=(o<3?l(s):o>3?l(e,t,s):l(e,t))||s);return o>3&&s&&Object.defineProperty(e,t,s),s},id=function(a,e){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(a,e)};const Pu=n.proxyCustomElement(class extends n.H{constructor(){super(),this.__registerHost(),this.__attachShadow(),this.selectedTimezone=Intl.DateTimeFormat().resolvedOptions().timeZone,this.startTime="",this.endTime=""}themeConfigChanged(e){this.applyThemeConfig(e)}selectedLanguageChangedHandler(e,t){e!==t&&(n.instance.changeLanguage(e),this.updateTimes())}selectedTimeslotChangedHandler(){this.updateTimes()}selectedTimezoneChangedHandler(){this.updateTimes()}hour12ChangedHandler(){this.updateTimes()}connectedCallback(){queueMicrotask(()=>{this.themeConfig&&(this.applyThemeConfig(this.themeConfig),this.host.setAttribute("data-themed",""))})}disconnectedCallback(){}async componentWillLoad(){n.debug("[nylas-selected-event-card] Component will load")}async componentDidLoad(){n.debug("[nylas-selected-event-card] Component did load"),this.selectedDate||n.debug('[nylas-selected-event-card] "selectedDate" prop is not provided.'),this.selectedTimeslot||n.debug('[nylas-selected-event-card] "selectedTimeslot" prop is not provided.'),this.updateTimes()}updateTimes(){if(!this.selectedTimeslot?.start_time||!this.selectedTimeslot?.end_time){this.startTime="",this.endTime="";return}const e=n.LANGUAGE_CODE_TO_LOCALE_MAP[this.selectedLanguage||"en"],t=new Intl.DateTimeFormat(e,{hour:"2-digit",minute:"2-digit",timeZone:this.selectedTimezone,hour12:this.hour12});this.startTime=t.format(new Date(this.selectedTimeslot.start_time)),this.endTime=t.format(new Date(this.selectedTimeslot.end_time))}applyThemeConfig(e){if(e)for(const[t,i]of Object.entries(e))this.host.style.setProperty(`${t}`,i)}render(){return n.h(n.Host,{key:"9610116de1cf94e0204fd691318e916f534d07a8",part:"nsec"},n.h("div",{key:"670e4099f18113f3b8ea9e0b6c76a408e26c713c",class:"event-card",part:"nsec__card"},n.h("div",{key:"b4806f52b760b1839224f2344b5524e33fe75cf9",class:"calendar-icon",part:"nsec__icon"},n.h("calendar-icon",{key:"bbc6c139aeac8f868fc60bffcebcf6d72ca38b18"})),n.h("div",{key:"a6b42bc8fba2ed5416216b51a523a6c6d0b34b19",class:"nylas-selected-event-card__date",part:"nsec__date"},this.selectedDate?n.capitalizeFirstLetter(n.formatBookedEventDate(this.selectedTimeslot?.start_time,this.selectedTimezone,n.LANGUAGE_CODE_TO_LOCALE_MAP[this.selectedLanguage||"en"])):"-"),n.h("div",{key:"6863f6b7ceb0a75cc3767e03df10cf837a8506d8",class:"nylas-selected-event-card__time",part:"nsec__time"},this.startTime," - ",this.endTime)),n.h("div",{key:"81a459e1c205e8a27eebb23e6ff6d9ab4d067d5d",class:"event-timezone",part:"nsec__timezone"},n.h("globe-icon",{key:"074bf2f15c33da5697112d4498f6b8e2d092d3b9"}),n.TIMEZONE_MAP[this.selectedTimezone]))}get host(){return this}static get watchers(){return{themeConfig:["themeConfigChanged"],selectedLanguage:["selectedLanguageChangedHandler"],selectedTimeslot:["selectedTimeslotChangedHandler"],selectedTimezone:["selectedTimezoneChangedHandler"],hour12:["hour12ChangedHandler"]}}static get style(){return aT}},[257,"nylas-selected-event-card",{themeConfig:[8,"theme-config"],selectedDate:[16,"selected-date"],selectedTimeslot:[16,"selected-timeslot"],selectedTimezone:[1,"selected-timezone"],selectedLanguage:[1,"selected-language"],hour12:[4,"hour-1-2"],startTime:[32],endTime:[32]},void 0,{themeConfig:["themeConfigChanged"],selectedLanguage:["selectedLanguageChangedHandler"],selectedTimeslot:["selectedTimeslotChangedHandler"],selectedTimezone:["selectedTimezoneChangedHandler"],hour12:["hour12ChangedHandler"]}]);iT([Pe({name:"nylas-selected-event-card",stateToProps:new Map([["scheduler.selectedDate","selectedDate"],["scheduler.selectedTimeslot","selectedTimeslot"],["scheduler.selectedTimezone","selectedTimezone"],["scheduler.selectedLanguage","selectedLanguage"],["scheduler.themeConfig","themeConfig"],["scheduler.hour12","hour12"]]),eventToProps:{},fireRegisterEvent:!0}),id("design:type",Function),id("design:paramtypes",[]),id("design:returntype",void 0)],Pu.prototype,"render",null);function kb(){if(typeof customElements>"u")return;["nylas-selected-event-card","calendar-icon","globe-icon"].forEach(e=>{switch(e){case"nylas-selected-event-card":customElements.get(e)||customElements.define(e,Pu);break;case"calendar-icon":customElements.get(e)||_a();break;case"globe-icon":customElements.get(e)||cn();break}})}const oT=':host{display:block;height:calc(100% - 48px);--nylas-primary:#2563eb;--nylas-error:#cc4841;--nylas-error-50:#ffeae8;--nylas-error-100:#ffc5bf;--nylas-error-200:#fecaca;--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}.time-picker-wrapper{display:flex;flex-direction:column;height:100%}.timeslots{position:relative;display:flex;flex-direction:column;gap:0.75rem;align-items:center;overflow-y:scroll;padding:0.5rem 1.5rem 1.5rem;flex:1}.time{box-sizing:border-box;display:flex;flex-direction:column;justify-content:center;align-items:center;padding:4px 12px;gap:0.5rem;font-size:16px;font-weight:500;font-family:inherit;width:100%;height:48px;color:var(--nylas-base-800);background:var(--nylas-base-0);border:none;outline:1.5px solid var(--nylas-base-200);border-radius:var(--nylas-border-radius-2x);flex:none;order:4;align-self:stretch;flex-grow:0;cursor:pointer}.time:hover,.time:focus{color:var(--nylas-primary);outline-color:var(--nylas-primary)}.time.selected{font-weight:600;color:var(--nylas-primary);outline:2px solid var(--nylas-primary);border-color:transparent;box-shadow:0 0 0 2px var(--nylas-primary)}.time .time-label{display:flex;flex-direction:column;align-items:center;gap:4px}.time .time-label span.spots{font-size:14px;font-family:var(--nylas-font-family);font-weight:400;color:var(--nylas-base-600)}.empty{text-align:center;padding:0 1.5rem;color:var(--nylas-base-600);font-size:min(max(12px, 2vw), 14px);height:450px;display:flex;align-items:center;justify-content:center}@keyframes pulsate{0%{background-color:var(--nylas-base-50)}50%{background-color:var(--nylas-base-100)}100%{background-color:var(--nylas-base-50)}}.loading{padding:0 1.5rem}.loading .timeslot-skeleton{width:100%;height:4rem;background-color:var(--nylas-base-50);margin-bottom:0.5rem;border-radius:var(--nylas-border-radius-2x);animation:pulsate 1.5s infinite ease-in-out}.footer{width:100%;padding:14px;box-sizing:border-box;border-top:1px solid var(--nylas-base-200)}';var sT=function(a,e,t,i){var o=arguments.length,s=o<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,l;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(a,e,t,i);else for(var f=a.length-1;f>=0;f--)(l=a[f])&&(s=(o<3?l(s):o>3?l(e,t,s):l(e,t))||s);return o>3&&s&&Object.defineProperty(e,t,s),s},od=function(a,e){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(a,e)};const Mu=n.proxyCustomElement(class extends n.H{constructor(){super(),this.__registerHost(),this.__attachShadow(),this.timeslotSelected=n.createEvent(this,"timeslotSelected",7),this.timeslotConfirmed=n.createEvent(this,"timeslotConfirmed",7),this.validateTimeslotError=n.createEvent(this,"validateTimeslotError",7),this.selectedTimezone=Intl.DateTimeFormat().resolvedOptions().timeZone,this.selectedDate=new Date,this.times=[],this.handleConfirmedTimeslot=async(e,t)=>{e.preventDefault(),n.debug("[nylas-timeslot-picker] Confirm timeslot",t),t&&this.timeslotConfirmed.emit({timeslot:t,host:this.host})},this.handleMouseEnter=e=>{this.hoveredTimeslotIndex=e},this.handleMouseLeave=()=>{this.hoveredTimeslotIndex=-1}}selectedLanguageChanged(e){n.instance.changeLanguage(e)}selectedDateChanged(e){if(n.debug("[nylas-timeslot-picker] Selected date changed",{newVal:e}),e&&(this.selectedTimeslotIndex="",typeof e<"u")){const t=this.availability?.filter(i=>n.isSameDayTimezone(i.start_time,e,this.selectedTimezone)).map(i=>i);this.times=t||[]}}availabilityChanged(e){if(n.debug("[nylas-timeslot-picker] Available times changed",{newVal:e,selectedDate:this.selectedDate}),typeof e<"u"){const t=e?.filter(i=>this.selectedDate&&n.isSameDayTimezone(i.start_time,this.selectedDate,this.selectedTimezone)).map(i=>i);this.times=t||[]}}selectedTimezoneChanged(e){if(n.debug("[nylas-timeslot-picker] Selected timezone changed",{newTimezone:e,selectedDate:this.selectedDate}),this.selectedDate&&this.availability){const t=this.availability?.filter(i=>n.isSameDayTimezone(i.start_time,this.selectedDate,e)).map(i=>i);this.times=t||[]}}themeConfigChanged(e){this.applyThemeConfig(e)}connectedCallback(){queueMicrotask(()=>{this.themeConfig&&(this.applyThemeConfig(this.themeConfig),this.host.setAttribute("data-themed",""))})}disconnectedCallback(){}async componentWillLoad(){n.debug("[nylas-timeslot-picker] Component will load",{selectedDate:this.selectedDate,availability:this.availability,times:this.times}),n.instance.changeLanguage(this.selectedLanguage||n.LANGUAGE_CODE.en)}async componentDidLoad(){n.debug("[nylas-timeslot-picker] Component did load");const e=this.availability?.filter(t=>this.selectedDate&&n.isSameDayTimezone(t.start_time,this.selectedDate,this.selectedTimezone)).map(t=>t);this.times=e||[]}applyThemeConfig(e){if(e)for(const[t,i]of Object.entries(e))this.host.style.setProperty(`${t}`,i)}getTimeslotId(e,t){const i=new Date(e.start_time),o=e.event_id;return`${i.toLocaleDateString()}-${t}${o?`-${o}`:""}`}onClickSelectTime(e,t){n.debug("[nylas-timeslot-picker] Time selected",e,t),this.selectedTimeslotIndex=this.getTimeslotId(e,t),this.timeslotSelected.emit({start_time:e.start_time,end_time:e.end_time,emails:e.emails,capacity:e?.capacity,event_id:e?.event_id,master_id:e?.master_id,calendar_id:e?.calendar_id})}async emitValidateTimeslotError(e,t){this.validateTimeslotError.emit({error:e,type:t})}getTimeSlotLabel(e){const t=n.LANGUAGE_CODE_TO_LOCALE_MAP[this.selectedLanguage||"en"],i=new Intl.DateTimeFormat(t,{hour:"2-digit",minute:"2-digit",timeZone:this.selectedTimezone,hour12:this.hour12});return`${i.format(e.start_time)} - ${i.format(e.end_time)}`}render(){const e=n.LANGUAGE_CODE_TO_LOCALE_MAP[this.selectedLanguage||"en"];if(this.isLoading)return n.h(n.Host,null,n.h("div",{class:"loading"},new Array(6).fill(0).map((i,o)=>n.h("div",{class:"timeslot-skeleton",style:{animationDelay:`${o*20}ms`}}))));if(this.availability&&this.availability.length===0)return n.h(n.Host,null,n.h("div",{class:"empty"},n.h("span",null,n.instance.t("noDatesAvailable"))));const t=this.times.filter(i=>{const o=i?.event_id||i?.master_id,s=typeof i?.capacity=="number"&&i?.capacity>0;return!(o&&!s)});return(!this.times||this.times.length===0||t.length===0)&&this.selectedDate?n.h(n.Host,null,n.h("div",{class:"empty"},n.h("span",null,n.instance.t("noTimeSlotsAvailable")))):this.selectedDate?n.h(n.Host,{part:"ntp"},n.h("div",{class:"time-picker-wrapper",part:"ntp__time-picker-wrapper"},n.h("div",{class:"timeslots",part:"ntp__timeslots"},t.map((i,o)=>{const s=typeof i?.capacity=="number"&&i?.capacity>0,l=this.selectedTimeslotIndex==this.getTimeslotId(i,o);return n.h("button",{part:`ntp__timeslot ${this.selectedTimeslot?.start_time?.getTime()===i.start_time.getTime()?"ntp__timeslot--selected":""}`,class:{time:!0,selected:typeof this.selectedTimeslot<"u"&&l},onClick:()=>this.onClickSelectTime(i,o),onMouseEnter:()=>this.handleMouseEnter(o),onMouseLeave:()=>this.handleMouseLeave()},n.h("div",{class:"time-label",part:"ntp__time-label"},this.hoveredTimeslotIndex==o||l?this.getTimeSlotLabel(i):i.start_time.toLocaleTimeString(e,{hour:"2-digit",minute:"2-digit",timeZone:this.selectedTimezone,hour12:this.hour12}),n.h("span",{class:"spots"},s?n.instance.t("spotsLeft",{count:i?.capacity}):null)))})),this.selectedTimeslot&&n.h("div",{class:"footer"},n.h("button-component",{variant:"primary",onClick:i=>this.handleConfirmedTimeslot(i,this.selectedTimeslot),part:"ntp__button-primary"},n.h("slot",{name:"timeslot-picker-cta-label"},n.instance.t("nextButton")))))):n.h(n.Host,null)}get host(){return this}static get watchers(){return{selectedLanguage:["selectedLanguageChanged"],selectedDate:["selectedDateChanged"],availability:["availabilityChanged"],selectedTimezone:["selectedTimezoneChanged"],themeConfig:["themeConfigChanged"]}}static get style(){return oT}},[257,"nylas-timeslot-picker",{availability:[16],isLoading:[4,"loading-state"],themeConfig:[8,"theme-config"],selectedTimeslot:[16,"selected-timeslot"],selectedTimezone:[1,"selected-timezone"],selectedDate:[16,"selected-date"],selectedLanguage:[1,"selected-language"],hour12:[4,"hour-1-2"],times:[32],hoveredTimeslotIndex:[32],selectedTimeslotIndex:[32],emitValidateTimeslotError:[64]},void 0,{selectedLanguage:["selectedLanguageChanged"],selectedDate:["selectedDateChanged"],availability:["availabilityChanged"],selectedTimezone:["selectedTimezoneChanged"],themeConfig:["themeConfigChanged"]}]);sT([Pe({name:"nylas-timeslot-picker",stateToProps:new Map([["scheduler.selectedDate","selectedDate"],["scheduler.availability","availability"],["scheduler.selectedTimeslot","selectedTimeslot"],["scheduler.selectedTimezone","selectedTimezone"],["scheduler.selectedLanguage","selectedLanguage"],["scheduler.isLoading","isLoading"],["scheduler.themeConfig","themeConfig"],["scheduler.hour12","hour12"]]),eventToProps:{timeslotSelected:async(a,e)=>{n.debug("nylas-timeslot-picker","timeslotSelected",a.detail),e.scheduler.selectTime(a.detail)},timeslotConfirmed:async(a,e)=>{n.debug("nylas-timeslot-picker","timeslotConfirmed",a.detail);const{timeslot:t,host:i}=a.detail;if(t&&t?.event_id&&t?.capacity){const o=await e.scheduler.validateGroupEventTimeslot(t);if(o&&"error"in o){const s=o.error?.message||"An error occurred while validating the timeslot";s==="Event is full"?i.emitValidateTimeslotError(s,"info"):i.emitValidateTimeslotError(s,"error")}}else e.scheduler.toggleAdditionalData(!0)},validateTimeslotError:async(a,e)=>{n.debug("nylas-timeslot-picker","validateTimeslotError",a.detail)}},fireRegisterEvent:!0}),od("design:type",Function),od("design:paramtypes",[]),od("design:returntype",void 0)],Mu.prototype,"render",null);function Eb(){if(typeof customElements>"u")return;["nylas-timeslot-picker","button-component","loading-icon"].forEach(e=>{switch(e){case"nylas-timeslot-picker":customElements.get(e)||customElements.define(e,Mu);break;case"button-component":customElements.get(e)||Rt();break;case"loading-icon":customElements.get(e)||At();break}})}class rT{constructor(){this.component=e=>{const t=Ze.Component,i=`${e} Error`;return{endtime_not_in_future:(o='"endtime" can not be in the future')=>({title:i,message:o,category:t}),no_booking_info:(o="No booking info provided")=>({title:i,message:o,category:t}),no_timeslot_selected:(o="No timeslot selected")=>({title:i,message:o,category:t}),no_timezone_selected:(o="No timezone selected")=>({title:i,message:o,category:t}),no_booking_id:(o="No booking id provided")=>({title:i,message:o,category:t}),no_salt:(o="No salt provided")=>({title:i,message:o,category:t}),invalid_start_time:(o="Invalid start time")=>({title:i,message:o,category:t}),invalid_end_time:(o="Invalid end time")=>({title:i,message:o,category:t}),invalid_timezone:(o="Invalid timezone")=>({title:i,message:o,category:t}),no_config_id:(o="No configuration id provided")=>({title:i,message:o,category:t})}},this.api=e=>{const t=Ze.Api,i=`${e} Error`;return{invalid_session:o=>({title:i,message:o,category:t}),general_error:o=>({title:i,message:o,category:t}),internal_error:o=>({title:i,message:o,category:t}),invalid_request_error:o=>({title:i,message:o,category:t}),timeslot_not_available:o=>({title:i,message:o,category:t}),provider_error:o=>({title:i,message:o,category:t}),not_found_error:o=>({title:i,message:o,category:t})}}}}class lT{constructor({schedulerAPIURL:e,schedulerStore:t,sessionId:i,configId:o,slug:s,clientId:l}){this.errors=new rT,this.schedulerStore=t,this.schedulerAPIURL=e,this.sessionId=i,this.configId=o,this.slug=s,this.clientId=l}getHeaders(){return this.sessionId?{Authorization:`Bearer ${this.sessionId}`}:{}}async makeAPIRequest(e,t,i,o={},s){try{const l=new URL(this.schedulerAPIURL);l.pathname=e;const f=await fetch(decodeURIComponent(l.toString()),{method:t,headers:{"Content-Type":"application/json",Origin:window.location.origin,"X-Source":"nylas-scheduling","X-Nylas-Web-Elements-Version":oa,...this.clientId&&{"X-Nylas-Application-Public-Id":this.clientId},...o},body:i,signal:s});return f.status===204?{data:void 0}:await f.json()}catch(l){if(l.name==="AbortError")throw l;return{error:{message:l.message,title:"API request failed",type:"api"}}}}getErrorMessage(e){let t=e?.message||e?.title||"Something went wrong";return e?.type==="provider_error"&&(t=e?.provider_error?.error?.message||e?.provider_error?.error?.title||"Something went wrong"),t}setConfigId(e){this.configId=e}setSchedulerAPIURL(e){e==="/"&&(e=new URL(window.location.href).origin),this.schedulerAPIURL=e}setSessionId(e){this.sessionId=e}selectDate(e){this.schedulerStore.set("selectedDate",e),this.schedulerStore.set("selectedTimeslot",null)}selectTime(e){this.schedulerStore.set("selectedTimeslot",e)}selectTimezone(e){this.schedulerStore.set("selectedTimezone",e)}selectLanguage(e){const t=n.normalizeSupportedLanguageCode(e)||n.LANGUAGE_CODE.en;this.schedulerStore.set("selectedLanguage",t),n.instance.changeLanguage(t)}async toggleAdditionalData(e){e||await this.refetchAvailability(),this.schedulerStore.set("showBookingForm",e)}setParticipantName(e){const{bookingInfo:t}=this.schedulerStore.state;this.schedulerStore.set("bookingInfo",{...t,primaryParticipant:{...t?.primaryParticipant,name:e}})}setParticipantEmail(e){const{bookingInfo:t}=this.schedulerStore.state;this.schedulerStore.set("bookingInfo",{...t,primaryParticipant:{...t?.primaryParticipant,email:e}})}async refetchAvailability(){const e=new Date,t=new Date(e.getFullYear(),e.getMonth(),1).getTime()/1e3,i=t<e.getTime()/1e3?Math.floor(e.getTime()/1e3):t,o=new Date(e.getFullYear(),e.getMonth()+1,1).getTime()/1e3;return await this.getAvailability(i,o)}async resetStoreStateAndFetchAvailability(){const e=new Date,t=await this.refetchAvailability(),i=this.schedulerStore.get("availability").find(s=>{const l=n.normalizeDateInput(s.start_time);return l?l>new Date:!1});let o=e;return i&&(o=n.normalizeDateInput(i.start_time)||e),this.schedulerStore.set("selectedDate",o),this.schedulerStore.set("eventInfo",null),this.schedulerStore.set("showBookingForm",!1),this.schedulerStore.set("selectedTimeslot",null),t}async setReschedule(e){this.schedulerStore.set("isLoading",!0);const t=this.schedulerStore.state.eventInfo;return t&&this.schedulerStore.set("reschedulingEventInfo",t),this.schedulerStore.set("rescheduleBookingId",e),await this.getUISettings(),await this.resetStoreStateAndFetchAvailability().finally(()=>{this.schedulerStore.set("isLoading",!1)})}async setCancel(e){this.schedulerStore.set("cancelBookingId",e)}async setReject(e){this.schedulerStore.set("rejectBookingId",e)}async resetCancel(){const e=await this.resetStoreStateAndFetchAvailability();return this.schedulerStore.set("cancelBookingId",""),this.schedulerStore.set("rejectBookingId",""),this.schedulerStore.set("cancelledEventInfo",null),e}async goBack(){this.schedulerStore.set("cancelBookingId","")}async resetConfirm(){const e=await this.resetStoreStateAndFetchAvailability();return this.schedulerStore.set("organizerConfirmationBookingId",""),this.schedulerStore.set("confirmedEventInfo",void 0),e}async bookTimeslot(e){this.schedulerStore.set("isLoading",!0);const{selectedTimeslot:t,selectedTimezone:i,bookingInfo:o,selectedLanguage:s}=this.schedulerStore.state;if(!e&&!o)return{error:this.errors.component(n.instance.t("createBookingErrorTitle")).no_booking_info()};const l=e?.timeslot||t;if(!l)return{error:this.errors.component(n.instance.t("createBookingErrorTitle")).no_timeslot_selected()};const f=e&&e?.timezone?e?.timezone:i,h=s||"en-US";if(!f)return{error:this.errors.component(n.instance.t("createBookingErrorTitle")).no_timezone_selected()};const m=[...this.schedulerStore.get("availabilityOrderEmails")];let g="";const b=l?.emails||[],T={};Object.entries(o?.additionalFields||{}).forEach(([de,ge])=>{T[de]=ge.value});const x=e?e?.primaryParticipant:o?.primaryParticipant,H=e?e?.guests||[]:o?.guests||[],V=e?e?.additionalFields:T,U=this.getHeaders(),q=`/v3/scheduling/bookings${!this.sessionId&&this.configId?`?configuration_id=${this.configId}`:!this.sessionId&&this.slug&&this.clientId?`?slug=${this.slug}&client_id=${this.clientId}`:""}`;if(m.length===0){const de=await this.makeAPIRequest(decodeURIComponent(q),"POST",JSON.stringify({additional_fields:V,additional_guests:H,guest:{...x},start_time:l.start_time.getTime()/1e3,end_time:l.end_time.getTime()/1e3,timezone:f,event_id:l?.event_id||void 0,master_id:l?.master_id||void 0,calendar_id:l?.calendar_id||void 0,email_language:this.getTwoLetterLanguageCode(h)}),U);return this.schedulerStore.set("isLoading",!1),"data"in de?(this.schedulerStore.set("eventInfo",de.data),de):{error:de.error}}for(;m.length>0;){if(g=m.shift(),!b.includes(g))continue;const de=await this.makeAPIRequest(decodeURIComponent(q),"POST",JSON.stringify({participants:g?[{email:g}]:void 0,additional_fields:V,additional_guests:H,guest:{...x},start_time:l.start_time.getTime()/1e3,end_time:l.end_time.getTime()/1e3,timezone:f,email_language:this.getTwoLetterLanguageCode(h)}),U);if("data"in de)return this.schedulerStore.set("isLoading",!1),this.schedulerStore.set("eventInfo",de?.data),de;if(de.error?.message?.startsWith("The selected timeslot is unavailable"))continue;{this.schedulerStore.set("isLoading",!1);const ge=de.error?.type;let De=de.error;if(ge&&ge in this.errors.api(n.instance.t("createBookingErrorTitle"))){const ke=this.getErrorMessage(De);De=this.errors.api(n.instance.t("createBookingErrorTitle"))[ge](ke)}return{error:De}}}return this.schedulerStore.set("isLoading",!1),{error:this.errors.api(n.instance.t("createBookingErrorTitle")).timeslot_not_available("The selected timeslot is unavailable")}}async getUISettings(e){this.schedulerStore.set("isLoading",!0);const t=this.schedulerStore.get("rescheduleBookingId"),i=this.getHeaders();let o=!this.sessionId&&this.configId?`?configuration_id=${this.configId}`:!this.sessionId&&this.slug&&this.clientId?`?slug=${this.slug}&client_id=${this.clientId}`:"";t&&o?o+=`&booking_id=${t}`:t&&(o+=`?booking_id=${t}`);const s=`/v3/scheduling/ui-settings${o}`,l=await this.makeAPIRequest(s,"GET",void 0,i,e);if("error"in l){this.schedulerStore.set("isLoading",!1);const f=l.error?.type;let h=l.error;return f&&f in this.errors.api(n.instance.t("getUISettingErrorTitle"))&&(h=this.errors.api(n.instance.t("getUISettingErrorTitle"))[f](h?.message||h?.title||"Something went wrong")),{error:h}}return"data"in l&&(this.schedulerStore.set("configSettings",l.data),this.clientId=l.data.app_client_id||this.clientId),this.schedulerStore.set("isLoading",!1),l}getTwoLetterLanguageCode(e){return e.split("-")[0]}getStartTimeWithMinBookingNotice(e){const i=this.schedulerStore.get("configSettings")?.scheduler?.min_booking_notice;if(!i)return e;const o=new Date().getTime();return e<(o+i*60*1e3)/1e3?Math.floor((o+i*60*1e3)/1e3):e}getEndTimeForAvailableDaysInFuture(e){const t=new Date,i=this.schedulerStore.get("configSettings")?.scheduler?.available_days_in_future,o=Math.floor(n.addDaysToCurrentDate(t,i).getTime()/1e3);return Math.min(o,e)}async getAvailability(e=0,t=0,i){this.schedulerStore.set("isLoading",!0);const o=new URLSearchParams,s=new Date,l=s.getTime();if(t&&t<l/1e3)return this.schedulerStore.set("isLoading",!1),{error:this.errors.component(n.instance.t("getAvailabilityErrorTitle")).endtime_not_in_future()};if(!e){const x=new Date(s.getFullYear(),s.getMonth(),1);e=Math.floor(x.getTime()/1e3)}if(!t){const x=new Date(s.getFullYear(),s.getMonth()+1,0);t=Math.floor(x.getTime()/1e3)}t=this.getEndTimeForAvailableDaysInFuture(t);const f=this.getStartTimeWithMinBookingNotice(e);e=f,t=f>t?f+1:t,o.append("start_time",encodeURIComponent(e.toString())),o.append("end_time",encodeURIComponent(t.toString())),this.configId&&!this.sessionId?o.append("configuration_id",encodeURIComponent(this.configId)):this.slug&&this.clientId&&!this.sessionId&&(o.append("slug",encodeURIComponent(this.slug)),o.append("client_id",encodeURIComponent(this.clientId)));const h=this.schedulerStore.get("rescheduleBookingId");h&&o.append("booking_id",encodeURIComponent(h));const m=o.toString(),g=`/v3/scheduling/availability${m?`?${m}`:""}`,b=this.getHeaders(),T=await this.makeAPIRequest(decodeURIComponent(g),"GET",void 0,b,i);if("error"in T){this.schedulerStore.set("availability",[]),this.schedulerStore.set("isLoading",!1);const x=T.error?.type;let H=T.error;if(H?.message?.toLowerCase().includes("Failed to find a valid Grant")){const V=n.instance.t("invalidGrantError");return{error:{title:n.instance.t("invalidGrantErrorTitle"),message:V,category:Ze.Api}}}if(x&&x in this.errors.api(n.instance.t("getAvailabilityErrorTitle"))){const V=this.getErrorMessage(H);H=this.errors.api(n.instance.t("getAvailabilityErrorTitle"))[x](V)}return{error:H}}if("data"in T){const V=(T.data?.time_slots?.map(X=>({...X,start_time:new Date(X.start_time*1e3),end_time:new Date(X.end_time*1e3)}))||[]).filter(X=>X.start_time.getTime()>l).sort((X,q)=>X.start_time.getTime()-q.start_time.getTime());this.schedulerStore.set("availability",V);const U=T.data?.order||[];this.schedulerStore.set("availabilityOrderEmails",U)}return this.schedulerStore.set("isLoading",!1),T}async cancelBooking(e,t){if(this.schedulerStore.set("isLoading",!0),!e)return{error:this.errors.component(n.instance.t("cancelBookingErrorTitle")).no_booking_id()};const i=!this.sessionId&&this.configId?`?configuration_id=${this.configId}`:!this.sessionId&&this.slug&&this.clientId?`?slug=${this.slug}&client_id=${this.clientId}`:"",o=`/v3/scheduling/bookings/${e}${i}`,s=this.getHeaders(),l=await this.makeAPIRequest(decodeURIComponent(o),"DELETE",JSON.stringify({action:"cancel",cancellation_reason:t}),s);if("error"in l){this.schedulerStore.set("isLoading",!1);const f=l.error?.type;let h=l.error;if(f&&f in this.errors.api(n.instance.t("cancelBookingErrorTitle"))){const m=this.getErrorMessage(h);h=this.errors.api(n.instance.t("cancelBookingErrorTitle"))[f](m)}return{error:h}}return this.schedulerStore.set("cancelledEventInfo",{booking_id:e}),this.schedulerStore.set("rescheduleBookingId",""),this.schedulerStore.set("isLoading",!1),l}async rescheduleBooking(e,t){if(this.schedulerStore.set("isLoading",!0),!e)return{error:this.errors.component(n.instance.t("rescheduleBookingErrorTitle")).no_booking_id()};const i=this.errors.api(n.instance.t("rescheduleBookingErrorTitle")),o=this.errors.component(n.instance.t("rescheduleBookingErrorTitle")),{bookingInfo:s,selectedTimeslot:l,selectedTimezone:f,selectedLanguage:h}=this.schedulerStore.state,{startTime:m,endTime:g,timezone:b}=t,T=m||l?.start_time;if(!T)return{error:o.invalid_start_time('Please pass "startTime" in data or set "selectedTimeslot" in the defaultSchedulerState.')};const x=g||l?.end_time;if(!x)return{error:o.invalid_end_time('Please pass "endTime" in data or set "selectedTimeslot" in the defaultSchedulerState.')};const H=this.schedulerStore.get("availabilityOrderEmails");let V="";if(H.length>0){const we=l?.emails||[];for(let Ae=0;Ae<H.length;Ae++)if(we.includes(H[Ae])){V=H[Ae];break}}const U=b||f;if(!U)return{error:o.invalid_timezone('Please pass "timezone" in data or set "selectedTimezone" in the defaultSchedulerState.')};const X=l?.event_id||void 0,q=l?.master_id||void 0,de=l?.calendar_id||void 0,ge={};Object.entries(s?.additionalFields||{}).forEach(([we,Ae])=>{ge[we]=Ae.value});const De=t?t?.primaryParticipant:s?.primaryParticipant,ke=t?t?.guests||[]:s?.guests||[],xe=t?t?.additionalFields:ge,ve=!this.sessionId&&this.configId?`?configuration_id=${this.configId}`:!this.sessionId&&this.slug&&this.clientId?`?slug=${this.slug}&client_id=${this.clientId}`:"",re=`/v3/scheduling/bookings/${e}${ve}`,he=this.getHeaders(),ye=await this.makeAPIRequest(decodeURIComponent(re),"PATCH",JSON.stringify({start_time:T.getTime()/1e3,end_time:x.getTime()/1e3,timezone:U,additional_fields:xe,guest:{...De},additional_guests:ke,participants:V?[{email:V}]:void 0,email_language:this.getTwoLetterLanguageCode(h),event_id:X,master_id:q,calendar_id:de}),he);if("error"in ye){this.schedulerStore.set("isLoading",!1);const we=ye.error?.type;let Ae=ye.error;if(we&&we in i){const Re=this.getErrorMessage(Ae);Ae=i[we](Re)}return{error:Ae}}const ue=this.schedulerStore.get("reschedulingEventInfo");if("data"in ye)this.schedulerStore.set("eventInfo",ye?.data),ye.data?.booking_id&&this.schedulerStore.set("rescheduleBookingId",ye.data.booking_id);else if(ue)this.schedulerStore.set("eventInfo",ue);else{const we={booking_id:e};this.schedulerStore.set("eventInfo",we)}return this.schedulerStore.set("reschedulingEventInfo",void 0),this.schedulerStore.set("isLoading",!1),ye}async updateBooking(e){this.schedulerStore.set("isLoading",!0);const{bookingId:t,status:i,reason:o}=e,s=this.schedulerStore.get("organizerConfirmationSalt"),l=i==="confirmed"?n.instance.t("confirmBookingErrorTitle"):n.instance.t("rejectBookingErrorTitle");if(!t)return{error:this.errors.component(l).no_booking_id()};if(!s)return{error:this.errors.component(l).no_salt()};const f=!this.sessionId&&this.configId?`?configuration_id=${this.configId}`:!this.sessionId&&this.slug&&this.clientId?`?slug=${this.slug}&client_id=${this.clientId}`:"",h=`/v3/scheduling/bookings/${t}${f}`,m=this.getHeaders(),g=await this.makeAPIRequest(decodeURIComponent(h),"PUT",JSON.stringify({status:i,cancellation_reason:o,salt:s}),m);if("error"in g){this.schedulerStore.set("isLoading",!1);const b=g.error?.type;let T=g.error;if(b&&b in this.errors.api(l)){const x=this.getErrorMessage(T);T=this.errors.api(l)[b](x)}return{error:T}}return"data"in g&&i==="confirmed"?this.schedulerStore.set("confirmedEventInfo",g?.data):"request_id"in g&&i==="cancelled"&&this.schedulerStore.set("cancelledEventInfo",{booking_id:t}),this.schedulerStore.set("organizerConfirmationBookingId",""),this.schedulerStore.set("isLoading",!1),g}async validateGroupEventTimeslot(e){this.schedulerStore.set("isLoading",!0);const t=this.schedulerStore.get("configSettings")?.configuration_id;if(!t)return{error:this.errors.component(n.instance.t("validateTimeslotErrorTitle")).no_config_id()};const i=this.getHeaders(),o=`/v3/scheduling/configurations/${t}/group-events/validate-timeslot`,s=await this.makeAPIRequest(decodeURIComponent(o),"POST",JSON.stringify({...e,start_time:e.start_time.getTime()/1e3,end_time:e.end_time.getTime()/1e3}),i);if("error"in s){this.schedulerStore.set("isLoading",!1);const l=s.error?.type;let f=s.error;if(l&&l in this.errors.api(n.instance.t("validateTimeslotErrorTitle"))){const h=this.getErrorMessage(f);f=this.errors.api(n.instance.t("validateTimeslotErrorTitle"))[l](h)}return this.refetchAvailability(),{error:f}}return this.schedulerStore.set("selectedTimeslot",e),this.schedulerStore.set("showBookingForm",!0),this.schedulerStore.set("isLoading",!1),s}}class Bm{constructor({schedulerAPIURL:e,nylasSchedulerStore:t,sessionId:i,configId:o,slug:s,clientId:l}){if(!e)throw new Error("schedulerAPIURL is required");if(!t)throw new Error("nylasSchedulerStore is required");if(!i&&!o&&!(s&&l))throw new Error("sessionId is required for private configs. If using public config either pass a configurationId or a combination of slug and clientId.");e==="/"&&(e=new URL(window.location.href).origin),this.configId=o,this.sessionId=i,this.schedulerAPIURL=e,this.nylasSchedulerStore=t,this.slug=s,this.clientId=l}init(){n.debug("NylasConnector init")}get schedulerStore(){return this.nylasSchedulerStore}setSchedulerAPIURL(e){e==="/"&&(e=new URL(window.location.href).origin),this.schedulerAPIURL=e,this._schedulerAPIConnector&&this._schedulerAPIConnector.setSchedulerAPIURL(e)}get scheduler(){return this._schedulerAPIConnector?this._schedulerAPIConnector:(this._schedulerAPIConnector=new lT({schedulerAPIURL:this.schedulerAPIURL,schedulerStore:this.schedulerStore,sessionId:this.sessionId,configId:this.configId,slug:this.slug,clientId:this.clientId}),this._schedulerAPIConnector)}resetStores(){this.nylasSchedulerStore.reset()}}function cT(a={}){const e={selectedDate:null,selectedLanguage:n.detectBrowserLanguageCode()||n.LANGUAGE_CODE.en,selectedTimezone:Intl.DateTimeFormat().resolvedOptions().timeZone,selectedTimeslot:null,showBookingForm:!1,availabilityOrderEmails:[],selectableDates:null,availability:[],eventDuration:0,state:"ready",eventInfo:null,cancelledEventInfo:null,isLoading:!1,nylasBranding:!0,...a};n.debug("[defaultNylasStoreState]: ",e);const t=n.createStore(e);return t.onChange("availability",i=>{n.debug("[availability]: ",i);const o=i.map(f=>f.start_time);n.debug("[selectableDates]: ",o),t.set("selectableDates",o);const s=i[0];if(!s)return;const l=Math.floor((s.end_time.getTime()-s.start_time.getTime())/6e4);n.debug("[durationMinutes]: ",l),t.set("eventDuration",l)}),t.reset=()=>{for(const i in e){const o=e[i];t.set(i,o)}},t}const Ma=(a,e)=>{const t=a.isLoading,i=a.showNotification,o=a.nylasBranding,s=a.version;return n.h(n.Fragment,null,i&&n.h("nylas-notification",null),t&&n.h("div",{class:"loading"},n.h("div",{class:"left"},n.h("div",{class:"skeleton"})),n.h("div",{class:"right"},n.h("div",{class:"skeleton"}),n.h("div",{class:"skeleton"}),n.h("div",{class:"skeleton"}),n.h("div",{class:"skeleton"}),n.h("div",{class:"skeleton"}))),!t&&e,n.h("div",{key:"ns-footer",class:"footer",part:"ns_footer"},o&&n.h("a",{href:"https://scheduler.nylas.com?utm_source=powered-by-nylas-logoutm_medium=link&utm_campaign=get-scheduler&utm_id=get-scheduler",class:"powered-by-nylas",target:"_blank",rel:"noreferrer noopener"},"Powered by ",n.h("span",{class:"sr-only"},"Nylas"),n.h("nylas-logo",{"aria-hidden":!0})),n.h("tooltip-component",null,n.h("info-icon",{slot:"tooltip-icon"}),n.h("span",{slot:"tooltip-content"},s))))},jm=(a,e)=>n.h("div",{class:"message-banner"},e),dT=':host{display:flex;flex-direction:column;overflow:visible;border-radius:var(--nylas-border-radius-2x);width:fit-content;background:var(--nylas-base-0);position:relative;box-shadow:0px 4px 8px 2px rgba(0, 0, 0, 0.05), 0px 8px 16px -2px rgba(0, 0, 0, 0.1);--nylas-primary:#2563eb;--nylas-error:#cc4841;--nylas-error-50:#ffeae8;--nylas-error-100:#ffc5bf;--nylas-error-200:#fecaca;--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;font-family:var(--nylas-font-family);font-optical-sizing:auto;font-style:normal;font-variation-settings:"slnt" 0}@media screen and (max-width: 768px){:host{width:auto;min-width:325px}}:root{font-family:inherit}.error{padding:8rem 12rem;color:var(--nylas-base-0);background-color:var(--nylas-error);margin:1.5rem;border-radius:var(--nylas-border-radius-2x)}.message-banner{text-align:right;color:var(--nylas-base-800);padding:1rem;border-bottom:1px solid var(--nylas-color-primary-200);margin:0}.loading{margin:1.5rem;display:flex;gap:1rem}.loading .skeleton{border-radius:var(--nylas-border-radius-2x);animation:pulsate 1.5s infinite}.loading .skeleton:nth-child(2){animation-delay:-100ms}.loading .skeleton:nth-child(3){animation-delay:-200ms}.loading .skeleton:nth-child(4){animation-delay:-300ms}.loading .skeleton:nth-child(5){animation-delay:-400ms}.loading .left .skeleton{height:100%;width:400px}.loading .right .skeleton{height:5rem;width:300px;margin-bottom:1rem}.loading .right .skeleton:last-child{margin-bottom:0}@keyframes pulsate{0%{background-color:var(--nylas-base-50)}50%{background-color:var(--nylas-base-100)}100%{background-color:var(--nylas-base-50)}}.select-date-page,.additional-data-page,.booked-event-page,.manual-confirmation-page,.cancelled-event-page,.cancel-flow-page{border-top-left-radius:var(--nylas-border-radius-2x);border-top-right-radius:var(--nylas-border-radius-2x)}.select-date-page,.additional-data-page{display:flex}@media screen and (max-width: 768px){.select-date-page,.additional-data-page{flex-direction:column}}.booked-event-page,.manual-confirmation-page{background-color:var(--nylas-base-50)}.cancelled-event-page,.manual-confirmation-page,.cancel-flow-page{padding:1rem;height:496px;display:flex;justify-content:center;align-items:center}.booked-event-page,.manual-confirmation-page,.cancelled-event-page,.cancel-flow-page{min-width:784px;background:var(--nylas-base-50)}@media screen and (max-width: 768px){.booked-event-page,.manual-confirmation-page,.cancelled-event-page,.cancel-flow-page{min-width:90%}}.left-panel{display:flex;flex-direction:column;min-width:424px;border-top-left-radius:inherit;background:var(--nylas-base-0);position:relative;padding:1rem 0 0 0;height:624px}@media screen and (max-width: 768px){.left-panel{border-top-right-radius:inherit;min-width:unset;height:auto}}@media screen and (max-width: 768px){.select-date-page .left-panel{height:624px}}.border{margin-left:-20px;margin-right:-20px;border-top-width:1px;height:0.5px;background-color:var(--nylas-base-200)}@media screen and (max-width: 768px){.border{display:none}}.right-panel{min-width:360px;width:360px;background-color:var(--nylas-base-50);height:624px;padding-top:16px;border-left:1px solid var(--nylas-base-200);border-top-right-radius:inherit}.right-panel.reschedule{border-top-right-radius:0px}@media screen and (max-width: 768px){.right-panel{border-top-right-radius:0px;width:inherit;min-width:unset;height:auto;border-left:none}}.right-panel h2{display:flex;margin:0;height:48px;gap:0.5rem;justify-content:center;align-items:center;width:auto;font-size:1.125rem;line-height:1.5rem;font-weight:500;text-align:center;color:var(--nylas-base-800)}.additional-data-page .left-panel{background-color:var(--nylas-base-50)}.additional-data-page .right-panel{background-color:var(--nylas-base-0)}nylas-selected-event-card{height:604px;padding:0 1rem}@media screen and (max-width: 768px){nylas-selected-event-card{height:250px}}.footer{display:flex;justify-content:flex-end;align-items:center;gap:8px;padding:16px;font-size:14px;font-weight:300;color:var(--nylas-base-500);border-top:1px solid var(--nylas-base-200);min-height:24px}.footer .powered-by-nylas{display:flex;align-items:center;text-decoration:none;color:var(--nylas-base-500)}.footer .powered-by-nylas:hover{color:var(--nylas-base-800)}.footer svg{fill:var(--nylas-base-500)}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0, 0, 0, 0);white-space:nowrap;border-width:0}.footer svg{margin-top:1px}nylas-selected-event-card::part(nsec__timezone){position:absolute;bottom:0}nylas-notification{margin:1.5rem;width:-webkit-fill-available;width:-moz-available;position:absolute}nylas-locale-switch{position:absolute;padding:18px 20px;bottom:0;width:-webkit-fill-available;width:-moz-available;border-top:1px solid var(--nylas-base-200)}@media screen and (max-width: 768px){nylas-locale-switch{height:auto}}nylas-date-picker{padding:0 20px}button-component#report-issue{width:auto;position:absolute;bottom:4px;left:16px}.language-feedback-container{width:auto;position:absolute;bottom:4px;left:16px;display:flex;gap:8px;align-items:center}.language-feedback-container button-component#report-issue{position:initial}nylas-feedback-form{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}',Um={title:n.instance.t("genericErrorTitle"),category:Ze.Component},wb=n.proxyCustomElement(class extends n.H{constructor(){super(),this.__registerHost(),this.__attachShadow(),this.init=n.createEvent(this,"init",7),this.schedulerWillLoad=n.createEvent(this,"schedulerWillLoad",7),this.schedulerDidLoad=n.createEvent(this,"schedulerDidLoad",7),this.nylasSchedulerError=n.createEvent(this,"nylasSchedulerError",7),this.nylasSchedulerInfo=n.createEvent(this,"nylasSchedulerInfo",7),this.configSettingsLoaded=n.createEvent(this,"configSettingsLoaded",7),this.bookingRefExtracted=n.createEvent(this,"bookingRefExtracted",7),this.bookedEventInfo=n.createEvent(this,"bookedEventInfo",7),this.initDeferred=!1,this.mode="app",this.schedulerApiUrl="https://api.us.nylas.com",this.nylasBranding=!0,this.eventOverrides={},this.showNotification=!0,this.enableUserFeedback=!0,this.automaticComponentRegistration=!0,this.selectedDateLabel=`${n.instance.t("noDateSelected")}`,this.language=navigator.language,this.showFeedbackModal=!1,this.bookingInfoConfirmed=null,this.version=oa}connectedCallback(){n.debug("[nylas-scheduler] connectedCallback")}async componentWillLoad(){n.debug("[nylas-scheduler] Component will load"),this.version=oa,await new Promise(h=>setTimeout(h,0)),this.enableUserFeedback&&!Tf()&&Rf({dsn:"https://9d5731f1c77ca84c9ed3fb9b3ccf7ee1@o74852.ingest.us.sentry.io/4507889638178816",release:this.version,integrations:h=>[...h.filter(m=>!1),Ff({colorScheme:"system",autoInject:!1})],autoSessionTracking:!1,beforeSend:()=>null});const e=this.schedulerWillLoad.emit(this.host);if("schedulerWillLoad"in this.eventOverrides&&(await this.eventOverrides.schedulerWillLoad(e,this.nylasSchedulerConnector),e.defaultPrevented))return;const t=new URLSearchParams(window.location.search),o=n.normalizeSupportedLanguageCode(t.get("lang"))||n.normalizeSupportedLanguageCode(t.get("language"))||this.defaultLanguage||n.normalizeSupportedLanguageCode(this.bookingInfo?.language)||this.defaultSchedulerState?.selectedLanguage||n.detectBrowserLanguageCode()||n.LANGUAGE_CODE.en;this.language=o,n.instance.changeLanguage(o),this.stores={scheduler:cT({bookingInfo:this.bookingInfo,nylasBranding:this.nylasBranding,themeConfig:this.themeConfig,hour12:this.hour12,...this.defaultSchedulerState,selectedLanguage:o})},this.baseProvider=new vb(this.host,this.stores,this.automaticComponentRegistration,this.eventOverrides),this.refConfigId=this.configurationId;let s;try{if(this.rescheduleBookingRef){const[h,m,g]=n.compactStringToUUIDs(this.rescheduleBookingRef);this.refConfigId=h,this.stores.scheduler.set("rescheduleBookingId",m),s=this.bookingRefExtracted.emit({configurationId:h,bookingId:m})}else if(this.cancelBookingRef){const[h,m,g]=n.compactStringToUUIDs(this.cancelBookingRef);this.refConfigId=h,this.stores.scheduler.set("cancelBookingId",m),s=this.bookingRefExtracted.emit({configurationId:h,bookingId:m})}else if(this.organizerConfirmationBookingRef){const[h,m,g]=n.compactStringToUUIDs(this.organizerConfirmationBookingRef);this.refConfigId=h,this.stores.scheduler.set("organizerConfirmationBookingId",m),this.stores.scheduler.set("organizerConfirmationSalt",g),s=this.bookingRefExtracted.emit({configurationId:h,bookingId:m,salt:g})}}catch(h){n.debug(h);const m=this.rescheduleBookingRef||this.cancelBookingRef||this.organizerConfirmationBookingRef;this.nylasSchedulerError.emit({notification:{...this.getErrorObject({message:`Invalid booking reference: ${m}`})},host:this.host})}if(this.applyThemeConfig(this.themeConfig),"bookingRefExtracted"in this.eventOverrides&&(await this.eventOverrides.bookingRefExtracted(s,this.nylasSchedulerConnector),s.defaultPrevented))return;if(!this.checkIfSessionIdOrConfigIdExists(!1)){this.initDeferred=!0;return}const l=this.baseProvider?.getStore("scheduler");this.nylasSchedulerConnector=new Bm({schedulerAPIURL:this.schedulerApiUrl,sessionId:this.sessionId,configId:this.refConfigId,slug:this.slug,clientId:this.clientId,nylasSchedulerStore:l});const f=this.init.emit(this.host);"init"in this.eventOverrides&&(await this.eventOverrides.init(f,this.nylasSchedulerConnector),f.defaultPrevented)||this.baseProvider?.componentWillLoad(this.nylasSchedulerConnector)}async componentDidLoad(){if(this.initDeferred)return;this.baseProvider?.componentDidLoad(),await Promise.resolve();const e=this.schedulerDidLoad.emit(this.host);"schedulerDidLoad"in this.eventOverrides&&(await this.eventOverrides.schedulerDidLoad(e,this.nylasSchedulerConnector),e.defaultPrevented)||this.checkIfSessionIdOrConfigIdExists()&&await this.performSchedulerDataFetch()}async performSchedulerDataFetch(){this.fetchAbortController?.abort(),this.fetchAbortController=new AbortController;const{signal:e}=this.fetchAbortController;try{this.nylasSchedulerConnector&&(this.schedulerApiUrl&&this.nylasSchedulerConnector.setSchedulerAPIURL(this.schedulerApiUrl),this.sessionId&&(this.nylasSchedulerConnector.sessionId=this.sessionId,this.nylasSchedulerConnector.scheduler.setSessionId(this.sessionId))),this.localizationChanged(this.localization);const t=await this.nylasSchedulerConnector?.scheduler.getUISettings(e);if(e.aborted)return;if(!t||"error"in t){this.nylasSchedulerError.emit({notification:{...this.getErrorObject(t?.error)},host:this.host});return}else{"data"in t&&t.data?.appearance&&n.debug("Appearance settings have been returned from the configuration used byt his scheduling page; please remember to grab them from the configSettingsLoaded event and apply them as desired.");const m=this.configSettingsLoaded.emit({settings:t});if("configSettingsLoaded"in this.eventOverrides&&(await this.eventOverrides.configSettingsLoaded(m,this.nylasSchedulerConnector),e.aborted||m.defaultPrevented))return}const i=this.baseProvider?.getStore("scheduler"),o=i?.get("configSettings")?.scheduler?.available_days_in_future,s=i?.get("selectedTimeslot");if(s&&s?.start_time){if(!this.isTimeslotValid(s))return;if(i?.get("showBookingForm")){i?.set("selectedDate",s.start_time);return}}const l=n.normalizeDateInput(i?.get("selectedDate")),f=i?.get("availability");let h;if(f&&f.length>0)return;if(l){const{startTime:m,endTime:g,endTimeForAvailableDaysInFuture:b}=this.validateAvailableDaysInFuture(l,o||30);l.getTime()<b*1e3&&(h=await this.nylasSchedulerConnector?.scheduler.getAvailability(m,g,e))}else{const m=new Date,{startTime:g,endTime:b,endTimeForAvailableDaysInFuture:T}=this.validateAvailableDaysInFuture(m,o||30);m.getTime()<T*1e3&&(h=await this.nylasSchedulerConnector?.scheduler.getAvailability(g,b,e))}if(e.aborted)return;if((!h||"error"in h)&&this.nylasSchedulerError.emit({notification:{...this.getErrorObject(h?.error)},host:this.host}),!l){let m=new Date;const g=i?.get("availability").find(b=>{const T=n.normalizeDateInput(b.start_time);return T?T>new Date:!1});g&&(m=n.normalizeDateInput(g.start_time)||m),i?.set("selectedDate",m)}}catch(t){if(t.name==="AbortError")return;throw t}}hasValidAuthConfig(){return!!(this.sessionId||this.refConfigId||this.slug&&this.clientId)}async performDeferredInit(){if(!this.hasValidAuthConfig()||!this.initDeferred||!this.baseProvider)return;document.body.dispatchEvent(new CustomEvent("nylasSchedulerClearNotifications",{detail:{host:this.host},bubbles:!0})),this.initDeferred=!1,this.refConfigId=this.refConfigId||this.configurationId,this.baseProvider.eventOverrides=this.eventOverrides;const e=this.baseProvider.getStore("scheduler");this.nylasSchedulerConnector=new Bm({schedulerAPIURL:this.schedulerApiUrl,sessionId:this.sessionId,configId:this.refConfigId,slug:this.slug,clientId:this.clientId,nylasSchedulerStore:e});const t=this.init.emit(this.host);if("init"in this.eventOverrides&&(await this.eventOverrides.init(t,this.nylasSchedulerConnector),t.defaultPrevented))return;await this.baseProvider.componentWillLoad(this.nylasSchedulerConnector),this.baseProvider.componentDidLoad(),await Promise.resolve();const i=this.schedulerDidLoad.emit(this.host);"schedulerDidLoad"in this.eventOverrides&&(await this.eventOverrides.schedulerDidLoad(i,this.nylasSchedulerConnector),i.defaultPrevented)||await this.performSchedulerDataFetch()}async authPropsChanged(e){e&&"bookingRefExtracted"in this.eventOverrides&&(await this.eventOverrides.bookingRefExtracted(e,this.nylasSchedulerConnector),e.defaultPrevented)||this.initDeferred&&this.hasValidAuthConfig()&&this.performDeferredInit()}configurationIdChanged(){!this.rescheduleBookingRef&&!this.cancelBookingRef&&!this.organizerConfirmationBookingRef&&(this.refConfigId=this.configurationId),this.authPropsChanged()}schedulerApiUrlChanged(){this.nylasSchedulerConnector&&this.schedulerApiUrl&&(this.nylasSchedulerConnector.setSchedulerAPIURL(this.schedulerApiUrl),document.body.dispatchEvent(new CustomEvent("nylasSchedulerClearNotifications",{detail:{host:this.host},bubbles:!0})),this.stores?.scheduler.set("availability",[]),this.performSchedulerDataFetch())}sessionIdChanged(){this.nylasSchedulerConnector&&this.sessionId&&(this.nylasSchedulerConnector.sessionId=this.sessionId,this.nylasSchedulerConnector.scheduler.setSessionId(this.sessionId),document.body.dispatchEvent(new CustomEvent("nylasSchedulerClearNotifications",{detail:{host:this.host},bubbles:!0})),this.performSchedulerDataFetch()),this.authPropsChanged()}slugChanged(){this.authPropsChanged()}clientIdChanged(){this.authPropsChanged()}componentDisconnected(){this.baseProvider?.componentDisconnected()}bookingInfoChanged(e){this.stores?.scheduler.set("bookingInfo",e),e?.language&&!this.defaultLanguage&&this.stores?.scheduler.set("selectedLanguage",n.normalizeSupportedLanguageCode(e.language)||n.LANGUAGE_CODE.en)}rescheduleBookingRefChanged(e){let t;if(e)try{const[i,o]=n.compactStringToUUIDs(e);this.stores?.scheduler.set("rescheduleBookingId",o),this.refConfigId=i,this.nylasSchedulerConnector?.scheduler.setConfigId(i),t=this.bookingRefExtracted.emit({configurationId:i,bookingId:o})}catch(i){n.debug(i),this.nylasSchedulerError.emit({notification:{...this.getErrorObject({message:`Invalid booking reference: ${e}`})},host:this.host})}this.authPropsChanged(t)}cancelBookingRefChanged(e){let t;if(e)try{const[i,o]=n.compactStringToUUIDs(e);this.stores?.scheduler.set("cancelBookingId",o),this.refConfigId=i,this.nylasSchedulerConnector?.scheduler.setConfigId(i),t=this.bookingRefExtracted.emit({configurationId:i,bookingId:o})}catch(i){n.debug(i),this.nylasSchedulerError.emit({notification:{...this.getErrorObject({message:`Invalid booking reference: ${e}`})},host:this.host})}this.authPropsChanged(t)}organizerConfirmationBookingRefChanged(e){let t;if(e)try{const[i,o,s]=n.compactStringToUUIDs(e);this.stores?.scheduler.set("organizerConfirmationBookingId",o),this.stores?.scheduler.set("organizerConfirmationSalt",s),this.refConfigId=i,this.nylasSchedulerConnector?.scheduler.setConfigId(i),t=this.bookingRefExtracted.emit({configurationId:i,bookingId:o,salt:s})}catch(i){n.debug(i),this.nylasSchedulerError.emit({notification:{...this.getErrorObject({message:`Invalid booking reference: ${e}`})},host:this.host})}this.authPropsChanged(t)}localizationChanged(e){e&&Object.keys(e).forEach(t=>{t in n.LANGUAGE_CODE&&n.instance.addResourceBundle(t,"translation",e[t],!1,!0)})}defaultLanguageChanged(e){e&&(this.stores?.scheduler.set("selectedLanguage",e),n.instance.changeLanguage(e))}themeConfigChanged(e){this.baseProvider?.getStore("scheduler")?.set("themeConfig",e),this.applyThemeConfig(e)}languageChanged(e){const t=n.normalizeSupportedLanguageCode(e.detail)||n.LANGUAGE_CODE.en;this.language=t,n.instance.changeLanguage(t),this.stores?.scheduler?.set("selectedLanguage",t)}async registerComponentHandler(e){this.baseProvider?.registerComponent(e.detail)}async unregisterComponentHandler(e){this.baseProvider?.unregisterComponent(e.detail)}async monthChangedHandler(e){const t=e.detail,i=this.nylasSchedulerConnector?.schedulerStore?.get("configSettings")?.scheduler?.available_days_in_future,{startTime:o,endTime:s,endTimeForAvailableDaysInFuture:l}=this.validateAvailableDaysInFuture(t,i||30);if(!e.defaultPrevented&&o<l&&t.getTime()<l*1e3){const f=await this.nylasSchedulerConnector?.scheduler.getAvailability(o,s);(!f||"error"in f)&&this.nylasSchedulerError.emit({notification:{...this.getErrorObject(f?.error)},host:this.host});const h=this.stores?.scheduler.get("selectableDates");h&&h.length>0&&this.stores?.scheduler.set("selectedDate",h[0])}}mapToBookingData(e){const t=this.stores?.scheduler.get("selectedTimeslot"),i=this.stores?.scheduler.get("selectedLanguage"),o=this.stores?.scheduler.get("selectedTimezone"),s=t?.start_time?new Date(t?.start_time).getTime()/1e3:"",l=t?.end_time?new Date(t?.end_time).getTime()/1e3:"";return{additional_guests:e.guests,guest:{...e.primaryParticipant},additional_fields:{...e.additionalFields},start_time:s,end_time:l,email_language:i,timezone:o}}async bookButtonClickedHandler(e){if(e.defaultPrevented)return;const t=e.detail,i=this.mapToBookingData(t);this.bookingInfoConfirmed=t;const s=this.nylasSchedulerConnector?.schedulerStore?.get("rescheduleBookingId");if(s){const m=await this.nylasSchedulerConnector?.scheduler.rescheduleBooking(s,t);(!m||"error"in m)&&this.nylasSchedulerError.emit({notification:{...this.getErrorObject(m?.error)},host:this.host});const g=m?.data,b=this.bookedEventInfo.emit({...m,data:{...g,...i}});this.bookingInfoConfirmed={...this.bookingInfoConfirmed,...g},"bookedEventInfo"in this.eventOverrides&&await this.eventOverrides.bookedEventInfo(b,this.nylasSchedulerConnector);return}const l=await this.nylasSchedulerConnector?.scheduler.bookTimeslot(t);(!l||"error"in l)&&this.nylasSchedulerError.emit({notification:{...this.getErrorObject(l?.error)},host:this.host});const f=l?.data,h=this.bookedEventInfo.emit({...l,data:{...f,...i}});this.bookingInfoConfirmed={...this.bookingInfoConfirmed,...f},"bookedEventInfo"in this.eventOverrides&&await this.eventOverrides.bookedEventInfo(h,this.nylasSchedulerConnector)}dateSelectedHandler(e){const t=n.normalizeDateInput(e.detail);this.selectedDateLabel=t?this.formatSelectedDateLabel(t):`${n.instance.t("noDateSelected")}`}getSelectedLanguage(){const e=this.stores?.scheduler.get("selectedLanguage")||this.defaultLanguage||n.detectBrowserLanguageCode()||n.LANGUAGE_CODE.en;return n.normalizeSupportedLanguageCode(e)||n.LANGUAGE_CODE.en}getSelectedDateLocale(){const e=this.getSelectedLanguage();return n.LANGUAGE_CODE_TO_LOCALE_MAP[e]||e||n.LANGUAGE_CODE_TO_LOCALE_MAP[n.LANGUAGE_CODE.en]}formatSelectedDateLabel(e){return n.capitalizeFirstLetter(e.toLocaleDateString(this.getSelectedDateLocale(),{dateStyle:"full"}))}cancelBookedEventErrorHandler(e){this.nylasSchedulerError.emit({notification:{...this.getErrorObject(e.detail.error)},host:this.host})}cancelBookedEventValidationErrorHandler(e){this.nylasSchedulerError.emit({notification:{...this.getErrorObject(e.detail.error)},host:this.host})}rescheduleBookedEventErrorHandler(e){this.nylasSchedulerError.emit({notification:{...this.getErrorObject(e.detail.error)},host:this.host})}confirmBookingErrorHandler(e){this.nylasSchedulerError.emit({notification:{...this.getErrorObject(e.detail.error)},host:this.host})}feedbackModalClosedHandler(){this.showFeedbackModal=!1}eventIsFullHandler(e){const t=e.detail.error;e.detail.type==="error"?this.nylasSchedulerError.emit({notification:{...this.getErrorObject({message:t})},host:this.host}):this.nylasSchedulerInfo.emit({notification:{title:"Event is full",category:Ze.Component,type:ct.Info,description:"The event you selected is full. Please try a different time.",id:new Date().getTime().toString(),ttl:3e3},host:this.host})}feedbackSubmittedHandler(e){Sf("Scheduling Page User Feedback",{extra:{configId:this.configurationId,slug:this.slug}});const t={message:e.detail.feedback};Sr(t,{includeReplay:!0,captureContext:{tags:{"nylas-web-element":"nylas-scheduling","nylas-web-element-version":this.version,"nylas-config-id":this.configurationId,"nylas-slug":this.slug,"host-url":window.location.href},extra:{configId:this.configurationId,slug:this.slug,version:this.version}}}),this.showFeedbackModal=!1}async getNylasSchedulerStore(){return this.baseProvider?.getStore("scheduler")}async getNylasSchedulerConnector(){return this.nylasSchedulerConnector}async getRef(){return this.host}getErrorObject(e){return{title:e?.title||Um.title,category:e?.category||Um.category,type:ct.Error,description:e?.message||"",id:new Date().getTime().toString(),ttl:"none"}}checkIfSessionIdOrConfigIdExists(e=!0){if(!this.sessionId&&!this.refConfigId&&!(this.slug&&this.clientId)){if(e){let t="";this.sessionId||(t+=n.instance.t("sessionIdRequiredErrorMessage")),!this.sessionId&&!this.refConfigId&&!(this.slug&&this.clientId)&&(t=n.instance.t("sessionIdRequiredErrorMessage")+" "+n.instance.t("publicConfigErrorMessage")),this.nylasSchedulerError.emit({notification:{title:n.instance.t("schedulingComponentErrorTitle"),category:Ze.Component,type:ct.Error,description:t,id:new Date().getTime().toString(),ttl:"none"},host:this.host})}return!1}return!0}isTimeslotValid(e){return new Date(e.start_time)<new Date?(this.nylasSchedulerError.emit({notification:{title:n.instance.t("invalidTimeslotErrorTitle"),category:Ze.Component,type:ct.Error,description:n.instance.t("invalidTimeslotErrorMessage"),id:new Date().getTime().toString(),ttl:"none"},host:this.host}),!1):!0}validateAvailableDaysInFuture(e,t){const i=new Date,o=new Date(e.getFullYear(),e.getMonth(),1).getTime()/1e3,s=new Date(e.getFullYear(),e.getMonth()+1,1).getTime()/1e3,l=Math.floor(n.addDaysToCurrentDate(i,t).getTime()/1e3),f=Math.min(l,s);return{startTime:o<i.getTime()/1e3?Math.floor(i.getTime()/1e3):o,endTime:f,endTimeForAvailableDaysInFuture:l}}applyThemeConfig(e){if(e)for(const[t,i]of Object.entries(e))this.host.style.setProperty(`${t}`,i)}onFeedbackClick(e){e.preventDefault(),this.showFeedbackModal=!0}redirectToCustomUrl(e){window.location.assign(e)}nylasFormDropdownChangedHandler(e){const{name:t,value:i}=e.detail;if(t==="language"){const o=n.LANGUAGE_CODE[i];n.instance.changeLanguage(o),this.stores?.scheduler?.set("selectedLanguage",o)}}render(){const e=this.mode==="app",t=this.baseProvider?.getStore("scheduler"),i=t?.get("eventInfo"),o=t?.get("showBookingForm"),s=t?.get("cancelledEventInfo"),l=t?.get("cancelBookingId"),f=t?.get("selectedTimeslot"),h=t?.get("rescheduleBookingId"),m=t?.get("organizerConfirmationBookingId"),g=t?.get("rejectBookingId"),b=t?.get("confirmedEventInfo"),T=t?.get("nylasBranding")||this.nylasBranding,x=n.normalizeDateInput(t?.get("selectedDate")),H=t?.get("configSettings")?.scheduler?.confirmation_redirect_url,V=Object.keys(n.LANGUAGE_MAP).map(q=>({label:n.LANGUAGE_MAP[q],value:q})),U=this.getSelectedLanguage(),X=x?this.formatSelectedDateLabel(x):`${n.instance.t("noDateSelected")}`;if(e&&(l||g)&&!s)return n.h(n.Host,null,n.h(Ma,{version:this.version,nylasBranding:T,isLoading:this.isLoading,showNotification:this.showNotification},n.h("div",{class:"cancel-flow-page",part:"cancel-flow-page"},n.h("nylas-cancel-booking-form",{selectedTimeslot:f,cancelBookingId:l,rejectBookingId:g,exportparts:"ncbf, ncbf__icon, ncbf__title, ncbf__description, ncbf__reason-textarea, ncbf__button-cta, ncbf__button-outline, ncbf__card"}))),n.h("div",{class:"language-feedback-container"},this.enableUserFeedback&&n.h("button-component",{id:"report-issue",variant:"basic",onClick:q=>this.onFeedbackClick(q)},n.h("feedback-icon",null)),n.h("select-dropdown",{name:"language",searchPlaceholder:n.instance.t("search"),options:V,withChevron:!1,themeConfig:this.themeConfig,defaultSelectedOption:V.find(q=>q.value==U),exportparts:"sd_dropdown: nse__language-dropdown, sd_dropdown-button: nse__language-drop-button, sd_dropdown-content: nse__language-drop-content, sd_dropdown_label: nse__language-drop-label"},n.h("span",{slot:"select-icon"},n.h("translate-icon",{width:"20",height:"20"})))),this.showFeedbackModal&&n.h("nylas-feedback-form",null));if(e&&m)return n.h(n.Host,null,n.h(Ma,null,n.h("div",{class:"manual-confirmation-page",part:"manual-confirmation-page"},n.h("nylas-organizer-confirmation-card",{organizerConfirmationBookingId:m,exportparts:"nmcc, nmcc__title, nmcc__description, nmcc__button-cta, nmcc__button-outline"}))),n.h("div",{class:"language-feedback-container"},this.enableUserFeedback&&n.h("button-component",{id:"report-issue",variant:"basic",onClick:q=>this.onFeedbackClick(q)},n.h("feedback-icon",null)),n.h("select-dropdown",{name:"language",searchPlaceholder:n.instance.t("search"),options:V,withChevron:!1,themeConfig:this.themeConfig,defaultSelectedOption:V.find(q=>q.value==U),exportparts:"sd_dropdown: nse__language-dropdown, sd_dropdown-button: nse__language-drop-button, sd_dropdown-content: nse__language-drop-content, sd_dropdown_label: nse__language-drop-label"},n.h("span",{slot:"select-icon"},n.h("translate-icon",{width:"20",height:"20"})))),this.showFeedbackModal&&n.h("nylas-feedback-form",null));if(e&&s)return n.h(n.Host,null,n.h(Ma,{version:this.version,nylasBranding:T,isLoading:this.isLoading,showNotification:this.showNotification},n.h("div",{class:"cancelled-event-page",part:"cancelled-event-page"},n.h("nylas-cancelled-event-card",{cancelledEventInfo:s,exportparts:"ncec, ncec__icon, ncec__title, ncec__description, ncec__button-outline, ncec__card"}))),n.h("div",{class:"language-feedback-container"},this.enableUserFeedback&&n.h("button-component",{id:"report-issue",variant:"basic",onClick:q=>this.onFeedbackClick(q)},n.h("feedback-icon",null)),n.h("select-dropdown",{name:"language",searchPlaceholder:n.instance.t("search"),options:V,withChevron:!1,themeConfig:this.themeConfig,defaultSelectedOption:V.find(q=>q.value==U),exportparts:"sd_dropdown: nse__language-dropdown, sd_dropdown-button: nse__language-drop-button, sd_dropdown-content: nse__language-drop-content, sd_dropdown_label: nse__language-drop-label"},n.h("span",{slot:"select-icon"},n.h("translate-icon",{width:"20",height:"20"})))),this.showFeedbackModal&&n.h("nylas-feedback-form",null));if(e&&b)return n.h(n.Host,null,n.h(Ma,{version:this.version,nylasBranding:T,isLoading:this.isLoading,showNotification:this.showNotification},n.h("div",{class:"cancelled-event-page",part:"confirmed-event-page"},n.h("nylas-confirmed-event-card",{confirmedEventInfo:b,exportparts:"ncec, ncec__icon, ncec__title, ncec__description, ncec__button-outline, ncec__card"}))),n.h("div",{class:"language-feedback-container"},this.enableUserFeedback&&n.h("button-component",{id:"report-issue",variant:"basic",onClick:q=>this.onFeedbackClick(q)},n.h("feedback-icon",null)),n.h("select-dropdown",{name:"language",searchPlaceholder:n.instance.t("search"),options:V,withChevron:!1,themeConfig:this.themeConfig,defaultSelectedOption:V.find(q=>q.value==U),exportparts:"sd_dropdown: nse__language-dropdown, sd_dropdown-button: nse__language-drop-button, sd_dropdown-content: nse__language-drop-content, sd_dropdown_label: nse__language-drop-label"},n.h("span",{slot:"select-icon"},n.h("translate-icon",{width:"20",height:"20"})))),this.showFeedbackModal&&n.h("nylas-feedback-form",null));if(e&&i&&H){const q=this.bookingInfoConfirmed?.primaryParticipant,de=this.bookingInfoConfirmed?.location,ge=this.bookingInfoConfirmed?.booking_ref,De=this.bookingInfoConfirmed?.additionalFields||{};if(this.bookingInfo&&typeof this.bookingInfo?.additionalFields<"u"){const Ae=this.bookingInfo.additionalFields;Object.keys(Ae).forEach(Re=>{!De[Re]&&Ae?.[Re]&&(De[Re]=Ae[Re].value)})}const ke=this.stores?.scheduler.get("selectedTimeslot"),xe=this.stores?.scheduler.get("selectedTimezone"),ve=this.stores?.scheduler.get("selectedLanguage"),re=this.stores?.scheduler.get("configSettings"),he=this.configurationId?this.configurationId:re?.configuration_id,ye=window.location.search,ue=new URLSearchParams(ye);ue.set("booking_id",i.booking_id),q?.name&&ue.set("name",q.name),q?.email&&ue.set("email",q.email),ke?.start_time&&ue.set("start_time",(new Date(ke.start_time).getTime()/1e3).toString()),ke?.end_time&&ue.set("end_time",(new Date(ke.end_time).getTime()/1e3).toString()),xe&&ue.set("tz",xe),ve&&ue.set("language",ve),De&&ue.set("additional_values",JSON.stringify(De)),this.slug&&ue.set("page_slug",this.slug),he&&ue.set("config_id",he),de&&ue.set("location",de),ge&&ue.set("booking_ref",ge);const we=new URL(H,window.location.origin);ue.forEach((Ae,Re)=>{we.searchParams.set(Re,Ae)}),this.redirectToCustomUrl(we.toString());return}if(e&&i)return n.h(n.Host,null,n.h(Ma,{version:this.version,nylasBranding:T,isLoading:this.isLoading,showNotification:this.showNotification},n.h("div",{class:"booked-event-page",part:"booked-event-page ns_booked-event-page"},n.h("nylas-booked-event-card",{selectedTimeslot:f,eventInfo:i,exportparts:"nbec, nbec__title, nbec__card, nbec__description, nbec__button-outline, nbec__cancel-cta, nbec__reschedule-cta"}))),n.h("div",{class:"language-feedback-container"},this.enableUserFeedback&&n.h("button-component",{id:"report-issue",variant:"basic",onClick:q=>this.onFeedbackClick(q)},n.h("feedback-icon",null)),n.h("select-dropdown",{name:"language",searchPlaceholder:n.instance.t("search"),options:V,withChevron:!1,themeConfig:this.themeConfig,defaultSelectedOption:V.find(q=>q.value==U),exportparts:"sd_dropdown: nse__language-dropdown, sd_dropdown-button: nse__language-drop-button, sd_dropdown-content: nse__language-drop-content, sd_dropdown_label: nse__language-drop-label"},n.h("span",{slot:"select-icon"},n.h("translate-icon",{width:"20",height:"20"})))),this.showFeedbackModal&&n.h("nylas-feedback-form",null));if(e&&(!i||h)&&!o){const q=this.host.querySelector('[slot="timeslot-picker-cta-label"]');return n.h(n.Host,null,n.h(Ma,{version:this.version,nylasBranding:T,isLoading:this.isLoading,showNotification:this.showNotification},h&&n.h(jm,null,`${n.instance.t("rescheduleTitle")}`),n.h("div",{class:"select-date-page",part:"select-date-page ns_select-date-page"},n.h("div",{class:"left-panel",part:"ns_left-panel"},n.h("nylas-date-picker",{exportparts:"ndp, ndp__title, ndp__month-header, ndp__month-button, ndp__day, ndp__date, ndp__date--disabled, ndp__date--selected, ndp__date--current-day, ndp__date--current-month"}),n.h("nylas-locale-switch",{exportparts:"nls, nls__timezone, nls__timezone-dropdown, nls__timezone-drop-button, nls__timezone-drop-button-selected-label, nls__timezone-drop-content, nls__timezone-drop-label, nls__language, nls__language-dropdown, nls__language-drop-button, nls__language-drop-content, nls__language-drop-label"})),n.h("div",{class:`right-panel ${h?"reschedule":""}`,part:`ns_right-panel ${h?"ns_reschedule":""}`},n.h("h2",{part:"ns_right-panel__title"},n.h("calendar-icon",{part:"ns_right-panel__calendar-icon"}),n.h("span",{id:"selectedDate",part:"ns_right-panel__selected-date"},X)),n.h("nylas-timeslot-picker",{exportparts:"ntp, ntp__time-picker-wrapper, ntp__timeslots, ntp__timeslot, ntp__timeslot--selected, ntp__button-primary"},q&&n.h("span",{slot:"timeslot-picker-cta-label"},n.h("slot",{name:"timeslot-picker-cta-label"})))))),this.enableUserFeedback&&n.h("button-component",{id:"report-issue",variant:"basic",onClick:de=>this.onFeedbackClick(de)},n.h("feedback-icon",null)),this.showFeedbackModal&&n.h("nylas-feedback-form",null))}return e&&!i&&o?n.h(n.Host,null,n.h(Ma,{version:this.version,nylasBranding:T,isLoading:this.isLoading,showNotification:this.showNotification},h&&n.h(jm,null,`${n.instance.t("rescheduleTitle")}`),n.h("div",{class:"additional-data-page",part:"additional-data-page ns_additional-data-page"},n.h("div",{class:"left-panel ns_left-panel",part:"ns_left-panel"},n.h("div",{class:"wrapper",part:"ns_left-panel__wrapper"},n.h("nylas-selected-event-card",{exportparts:"nsec, nsec__card, nsec__icon, nsec__date, nsec__time, nsec__timezone"}))),n.h("div",{class:`right-panel ${h?"reschedule":""}`,part:`ns_right-panel ${h?"ns_reschedule":""}`},n.h("nylas-booking-form",{exportparts:"nbf, nbf__input-textfield, nbf__button-ghost, nbf__button-outline, nbf__button-primary, nbf__input-wrapper, nbf__checkbox-component, nbf__radio-button-group, nbf__textarea-component, nbf__dropdown, nbf__dropdown-button, nbf__dropdown-content"})))),n.h("div",{class:"language-feedback-container"},this.enableUserFeedback&&n.h("button-component",{id:"report-issue",variant:"basic",onClick:q=>this.onFeedbackClick(q)},n.h("feedback-icon",null)),n.h("select-dropdown",{name:"language",searchPlaceholder:n.instance.t("search"),options:V,withChevron:!1,themeConfig:this.themeConfig,defaultSelectedOption:V.find(q=>q.value==U),exportparts:"sd_dropdown: nse__language-dropdown, sd_dropdown-button: nse__language-drop-button, sd_dropdown-content: nse__language-drop-content, sd_dropdown_label: nse__language-drop-label"},n.h("span",{slot:"select-icon"},n.h("translate-icon",{width:"20",height:"20"})))),this.showFeedbackModal&&n.h("nylas-feedback-form",null)):n.h(n.Host,null,n.h("slot",null))}get host(){return this}static get watchers(){return{configurationId:["configurationIdChanged"],schedulerApiUrl:["schedulerApiUrlChanged"],sessionId:["sessionIdChanged"],slug:["slugChanged"],clientId:["clientIdChanged"],bookingInfo:["bookingInfoChanged"],rescheduleBookingRef:["rescheduleBookingRefChanged"],cancelBookingRef:["cancelBookingRefChanged"],organizerConfirmationBookingRef:["organizerConfirmationBookingRefChanged"],localization:["localizationChanged"],defaultLanguage:["defaultLanguageChanged"],themeConfig:["themeConfigChanged"]}}static get style(){return dT}},[257,"nylas-scheduling",{mode:[1],defaultSchedulerState:[16,"default-scheduler-store-state"],sessionId:[1,"session-id"],schedulerApiUrl:[1,"scheduler-api-url"],bookingInfo:[16,"booking-info"],rescheduleBookingRef:[1,"reschedule-booking-ref"],cancelBookingRef:[1,"cancel-booking-ref"],organizerConfirmationBookingRef:[1,"organizer-confirmation-booking-ref"],configurationId:[1,"configuration-id"],slug:[1],clientId:[1,"client-id"],nylasBranding:[4,"nylas-branding"],eventOverrides:[16,"event-overrides"],isLoading:[4,"is-loading"],themeConfig:[16,"theme-config"],localization:[16],defaultLanguage:[1,"default-language"],showNotification:[4,"show-notification"],enableUserFeedback:[4,"enable-user-feedback"],hour12:[4,"hour-1-2"],automaticComponentRegistration:[32],selectedDateLabel:[32],refConfigId:[32],language:[32],showFeedbackModal:[32],bookingInfoConfirmed:[32],version:[32],getNylasSchedulerStore:[64],getNylasSchedulerConnector:[64],getRef:[64]},[[0,"languageChanged","languageChanged"],[0,"registerComponent","registerComponentHandler"],[0,"unregisterComponent","unregisterComponentHandler"],[0,"monthChanged","monthChangedHandler"],[0,"detailsConfirmed","bookButtonClickedHandler"],[0,"dateSelected","dateSelectedHandler"],[0,"cancelBookedEventError","cancelBookedEventErrorHandler"],[0,"cancelBookedEventValidationError","cancelBookedEventValidationErrorHandler"],[0,"rescheduleBookedEventError","rescheduleBookedEventErrorHandler"],[0,"confirmBookingError","confirmBookingErrorHandler"],[0,"feedbackModalClosed","feedbackModalClosedHandler"],[0,"validateTimeslotError","eventIsFullHandler"],[0,"feedbackSubmitted","feedbackSubmittedHandler"],[0,"nylasFormDropdownChanged","nylasFormDropdownChangedHandler"]],{configurationId:["configurationIdChanged"],schedulerApiUrl:["schedulerApiUrlChanged"],sessionId:["sessionIdChanged"],slug:["slugChanged"],clientId:["clientIdChanged"],bookingInfo:["bookingInfoChanged"],rescheduleBookingRef:["rescheduleBookingRefChanged"],cancelBookingRef:["cancelBookingRefChanged"],organizerConfirmationBookingRef:["organizerConfirmationBookingRefChanged"],localization:["localizationChanged"],defaultLanguage:["defaultLanguageChanged"],themeConfig:["themeConfigChanged"]}]);function fT(){if(typeof customElements>"u")return;["nylas-scheduling","add-circle-icon","button-component","calendar-cancel-icon","calendar-check-icon","calendar-icon","checkbox-component","checkmark-circle-icon","chevron-icon","clock-icon","close-icon","feedback-icon","globe-icon","info-icon","input-component","loading-icon","multi-select-dropdown","nylas-booked-event-card","nylas-booking-form","nylas-cancel-booking-form","nylas-cancelled-event-card","nylas-confirmed-event-card","nylas-date-component","nylas-date-picker","nylas-feedback-form","nylas-locale-switch","nylas-logo","nylas-notification","nylas-organizer-confirmation-card","nylas-selected-event-card","nylas-timeslot-picker","person-icon","radio-button-group","search-icon","select-dropdown","textarea-component","tooltip-component","translate-icon","warning-icon"].forEach(e=>{switch(e){case"nylas-scheduling":customElements.get(e)||customElements.define(e,wb);break;case"add-circle-icon":customElements.get(e)||wn();break;case"button-component":customElements.get(e)||Rt();break;case"calendar-cancel-icon":customElements.get(e)||nr();break;case"calendar-check-icon":customElements.get(e)||mo();break;case"calendar-icon":customElements.get(e)||_a();break;case"checkbox-component":customElements.get(e)||qn();break;case"checkmark-circle-icon":customElements.get(e)||Fd();break;case"chevron-icon":customElements.get(e)||Xe();break;case"clock-icon":customElements.get(e)||ka();break;case"close-icon":customElements.get(e)||zt();break;case"feedback-icon":customElements.get(e)||vo();break;case"globe-icon":customElements.get(e)||cn();break;case"info-icon":customElements.get(e)||Ke();break;case"input-component":customElements.get(e)||Ft();break;case"loading-icon":customElements.get(e)||At();break;case"multi-select-dropdown":customElements.get(e)||Yn();break;case"nylas-booked-event-card":customElements.get(e)||Ug();break;case"nylas-booking-form":customElements.get(e)||ly();break;case"nylas-cancel-booking-form":customElements.get(e)||cy();break;case"nylas-cancelled-event-card":customElements.get(e)||dy();break;case"nylas-confirmed-event-card":customElements.get(e)||hy();break;case"nylas-date-component":customElements.get(e)||On();break;case"nylas-date-picker":customElements.get(e)||gy();break;case"nylas-feedback-form":customElements.get(e)||Fo();break;case"nylas-locale-switch":customElements.get(e)||mb();break;case"nylas-logo":customElements.get(e)||yb();break;case"nylas-notification":customElements.get(e)||Ni();break;case"nylas-organizer-confirmation-card":customElements.get(e)||bb();break;case"nylas-selected-event-card":customElements.get(e)||kb();break;case"nylas-timeslot-picker":customElements.get(e)||Eb();break;case"person-icon":customElements.get(e)||hf();break;case"radio-button-group":customElements.get(e)||Li();break;case"search-icon":customElements.get(e)||ut();break;case"select-dropdown":customElements.get(e)||pt();break;case"textarea-component":customElements.get(e)||Ln();break;case"tooltip-component":customElements.get(e)||Qe();break;case"translate-icon":customElements.get(e)||qa();break;case"warning-icon":customElements.get(e)||Ka();break}})}const uT=wb,hT=fT,pT=Hu,mT=Cb,gT=Pu,yT=kb,bT=wu,vT=jr,CT=zg,_T=ra,kT=Tu,ET=Du,wT=Mu,xT=Eb,ST=cb,TT=zr,DT=db,IT=Br,AT=ub,RT=Iu,OT=fy,LT=Hi,HT=py,PT=hf,MT=".sc-play-icon-h{display:flex}",xb=n.proxyCustomElement(class extends n.H{constructor(){super(),this.__registerHost(),this.width="15",this.height="15"}render(){return n.h("svg",{key:"93cc2bb552af4df81f405472ed3189a41d4f07e4",width:this.width,height:this.height,viewBox:"0 0 24 24",fill:"auto",xmlns:"http://www.w3.org/2000/svg"},n.h("path",{key:"fe499e6ce2f2c3224a3695a69ea83af71d6f18aa",d:"M21 12L3 21V3L21 12Z",stroke:"auto","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"}))}static get style(){return MT}},[258,"play-icon",{width:[1],height:[1]}]);function FT(){if(typeof customElements>"u")return;["play-icon"].forEach(e=>{switch(e){case"play-icon":customElements.get(e)||customElements.define(e,xb);break}})}const NT=xb,$T=FT,zT=Wg,BT=Oi,jT=sy,UT=Li,VT=".sc-refresh-icon-h{display:flex}",Sb=n.proxyCustomElement(class extends n.H{constructor(){super(),this.__registerHost(),this.width="15",this.height="15"}render(){return n.h("svg",{key:"ef3a65d8c263401fa75f041e3ea42948287da287",fill:"auto",width:this.width,height:this.height,viewBox:"0 0 32 32",version:"1.1",xmlns:"http://www.w3.org/2000/svg"},n.h("path",{key:"ceacbf9e9dba4957b9f884232efe24d7de5a3c91",d:"M15.544 28.080c-0.002-0.006-0.008-0.010-0.012-0.015l-2.873-4.489c-0.204-0.335-0.646-0.454-0.992-0.266l-0.256 0.157c-0.344 0.188-0.337 0.673-0.133 1.008l1.841 2.857c-0.157-0.035-0.316-0.063-0.471-0.103-3.224-0.843-5.953-3.026-7.485-5.988-1.448-2.797-1.72-5.99-0.766-8.992s3.118-5.452 5.915-6.899c0.476-0.247 0.662-0.832 0.416-1.308-0.246-0.477-0.832-0.663-1.308-0.416-3.258 1.686-5.763 4.54-6.874 8.036s-0.794 7.215 0.892 10.473c1.786 3.448 4.963 5.989 8.72 6.973 0.043 0.011 0.087 0.017 0.13 0.028l-2.541 1.288c-0.344 0.189-0.458 0.613-0.254 0.948l0.098 0.256c0.205 0.335 0.557 0.454 0.9 0.266l4.651-2.381c0.006-0.004 0.012-0.003 0.018-0.007l0.312-0.171c0.172-0.095 0.287-0.249 0.332-0.422 0.047-0.172 0.025-0.364-0.076-0.531zM28.559 10.025c-1.783-3.447-4.862-5.988-8.618-6.972-0.267-0.070-0.541-0.124-0.814-0.179l2.494-1.265c0.344-0.189 0.549-0.614 0.345-0.949l-0.099-0.255c-0.205-0.336-0.648-0.454-0.991-0.267l-4.651 2.381c-0.006 0.003-0.012 0.002-0.018 0.006l-0.312 0.171c-0.173 0.095-0.287 0.249-0.332 0.422-0.047 0.172-0.025 0.364 0.077 0.53l0.185 0.304c0.003 0.006 0.008 0.010 0.012 0.016l2.873 4.489c0.203 0.335 0.646 0.454 0.991 0.266l0.226-0.157c0.344-0.188 0.366-0.673 0.163-1.008l-1.85-2.87c0.407 0.063 0.811 0.138 1.207 0.242 3.226 0.845 5.856 3.027 7.387 5.986 1.448 2.797 1.72 5.99 0.765 8.991s-3.020 5.451-5.818 6.901c-0.476 0.247-0.662 0.831-0.415 1.308 0.172 0.332 0.511 0.524 0.863 0.524 0.15 0 0.302-0.035 0.446-0.109 3.259-1.686 5.664-4.54 6.776-8.035 1.111-3.497 0.794-7.217-0.893-10.473z"}))}static get style(){return VT}},[258,"refresh-icon",{width:[1],height:[1]}]);function WT(){if(typeof customElements>"u")return;["refresh-icon"].forEach(e=>{switch(e){case"refresh-icon":customElements.get(e)||customElements.define(e,Sb);break}})}const GT=Sb,qT=WT,YT=".sc-reply-all-icon-h{display:flex}",Tb=n.proxyCustomElement(class extends n.H{constructor(){super(),this.__registerHost(),this.width="15",this.height="15"}render(){return n.h("svg",{key:"305b00d57e31331d7fed8a434885dcca36196334",fill:"auto",width:this.width,height:this.height,viewBox:"0 0 1920 1920",xmlns:"http://www.w3.org/2000/svg"},n.h("path",{key:"eae8cfe4ecfcadacd8a7d461177a4670cce902c3",d:"m1030.975 188 81.249 81.249-429.228 429.228h300.747c516.223 0 936.257 420.034 936.257 936.257v98.028h-114.92v-98.028c0-452.901-368.436-821.337-821.337-821.337H682.996l429.228 429.229-81.25 81.248-567.936-567.937L1030.975 188Zm-463.038.011 81.249 81.25-486.688 486.688 486.688 486.688-81.249 81.249L0 755.949 567.937 188.01Z","fill-rule":"evenodd"}))}static get style(){return YT}},[258,"reply-all-icon",{width:[1],height:[1]}]);function ZT(){if(typeof customElements>"u")return;["reply-all-icon"].forEach(e=>{switch(e){case"reply-all-icon":customElements.get(e)||customElements.define(e,Tb);break}})}const XT=Tb,JT=ZT,KT=".sc-reply-icon-h{display:flex}",Db=n.proxyCustomElement(class extends n.H{constructor(){super(),this.__registerHost(),this.width="15",this.height="15"}render(){return n.h("svg",{key:"37fb9469fe54e6c7a7cf278210c51b61af425c61",fill:"auto",width:this.width,height:this.height,viewBox:"0 0 1920 1920",xmlns:"http://www.w3.org/2000/svg"},n.h("path",{key:"7aff0bf2be364b64e52c1cb727cc6f9b0404f22f",d:"M835.942 632.563H244.966l478.08-478.08-90.496-90.496L-.026 696.563 632.55 1329.14l90.496-90.496-478.08-478.08h590.976c504.448 0 914.816 410.368 914.816 914.816v109.184h128V1675.38c0-574.976-467.84-1042.816-1042.816-1042.816","fill-rule":"evenodd"}))}static get style(){return KT}},[258,"reply-icon",{width:[1],height:[1]}]);function QT(){if(typeof customElements>"u")return;["reply-icon"].forEach(e=>{switch(e){case"reply-icon":customElements.get(e)||customElements.define(e,Db);break}})}const eD=Db,tD=QT,nD=Bg,aD=ut,iD=jg,oD=pt,sD=".sc-sent-icon-h{display:flex}",Ib=n.proxyCustomElement(class extends n.H{constructor(){super(),this.__registerHost(),this.width="15",this.height="15"}render(){return n.h("svg",{key:"9f63c19f3c5af16edc95a3d747e97933a3e9f84d",width:this.width,height:this.height,viewBox:"0 0 24 24",fill:"auto",xmlns:"http://www.w3.org/2000/svg"},n.h("path",{key:"9731204683c7836b8e37721fc55d4ada313bafe1",d:"M21.5 12L3.5 3.5L3.5 20.5L21.5 12Z",stroke:"auto","stroke-width":"1.5"}),n.h("path",{key:"8b47427cb6ea268a3387d6a5638ec680e0cb46ef",d:"M3.5 3.5L12 10.5",stroke:"auto","stroke-width":"1.5"}),n.h("path",{key:"309973df5a0e3a162b87e163cc811f1084670971",d:"M3.5 20.5L12 13.5",stroke:"auto","stroke-width":"1.5"}))}static get style(){return sD}},[258,"sent-icon",{width:[1],height:[1]}]);function rD(){if(typeof customElements>"u")return;["sent-icon"].forEach(e=>{switch(e){case"sent-icon":customElements.get(e)||customElements.define(e,Ib);break}})}const lD=Ib,cD=rD,dD=".sc-spam-icon-h{display:flex}",Ab=n.proxyCustomElement(class extends n.H{constructor(){super(),this.__registerHost(),this.width="15",this.height="15"}render(){return n.h("svg",{key:"07f3ebf8705393bfdb44dc17f53431a38d52f119",width:this.width,height:this.height,viewBox:"0 0 24 24",fill:"auto",xmlns:"http://www.w3.org/2000/svg"},n.h("path",{key:"a98b4e519bdf6be4bbc55cdf4867f16c97f001db",d:"M20 3H4C2.89543 3 2 3.89543 2 5V19C2 20.1046 2.89543 21 4 21H20C21.1046 21 22 20.1046 22 19V5C22 3.89543 21.1046 3 20 3Z",stroke:"auto","stroke-width":"1.5"}),n.h("path",{key:"b1957975b9f357ce0ca52183e84b80ebf8f1223e",d:"M2 5L12 12.5L22 5",stroke:"auto","stroke-width":"1.5"}))}static get style(){return dD}},[258,"spam-icon",{width:[1],height:[1]}]);function fD(){if(typeof customElements>"u")return;["spam-icon"].forEach(e=>{switch(e){case"spam-icon":customElements.get(e)||customElements.define(e,Ab);break}})}const uD=Ab,hD=fD,pD=".sc-star-icon-h{display:flex}",Rb=n.proxyCustomElement(class extends n.H{constructor(){super(),this.__registerHost(),this.width="15",this.height="15"}render(){return n.h("svg",{key:"8010c51355690730112d149a9ce580263721d663",width:this.width,height:this.height,viewBox:"0 0 24 24",fill:"auto",xmlns:"http://www.w3.org/2000/svg"},n.h("path",{key:"dd00db4cf01733ad49bb6a234345bb63ea797e91",d:"M9.15316 5.40838C10.4198 3.13613 11.0531 2 12 2C12.9469 2 13.5802 3.13612 14.8468 5.40837L15.1745 5.99623C15.5345 6.64193 15.7144 6.96479 15.9951 7.17781C16.2757 7.39083 16.6251 7.4699 17.3241 7.62805L17.9605 7.77203C20.4201 8.32856 21.65 8.60682 21.9426 9.54773C22.2352 10.4886 21.3968 11.4691 19.7199 13.4299L19.2861 13.9372C18.8096 14.4944 18.5713 14.773 18.4641 15.1177C18.357 15.4624 18.393 15.8341 18.465 16.5776L18.5306 17.2544C18.7841 19.8706 18.9109 21.1787 18.1449 21.7602C17.3788 22.3417 16.2273 21.8115 13.9243 20.7512L13.3285 20.4768C12.6741 20.1755 12.3469 20.0248 12 20.0248C11.6531 20.0248 11.3259 20.1755 10.6715 20.4768L10.0757 20.7512C7.77268 21.8115 6.62118 22.3417 5.85515 21.7602C5.08912 21.1787 5.21588 19.8706 5.4694 17.2544L5.53498 16.5776C5.60703 15.8341 5.64305 15.4624 5.53586 15.1177C5.42868 14.773 5.19043 14.4944 4.71392 13.9372L4.2801 13.4299C2.60325 11.4691 1.76482 10.4886 2.05742 9.54773C2.35002 8.60682 3.57986 8.32856 6.03954 7.77203L6.67589 7.62805C7.37485 7.4699 7.72433 7.39083 8.00494 7.17781C8.28555 6.96479 8.46553 6.64194 8.82547 5.99623L9.15316 5.40838Z",stroke:"auto","stroke-width":"1.5"}))}static get style(){return pD}},[258,"star-icon",{width:[1],height:[1]}]);function mD(){if(typeof customElements>"u")return;["star-icon"].forEach(e=>{switch(e){case"star-icon":customElements.get(e)||customElements.define(e,Rb);break}})}const gD=Rb,yD=mD,bD=".sc-stop-icon-h{display:flex}",Ob=n.proxyCustomElement(class extends n.H{constructor(){super(),this.__registerHost(),this.width="15",this.height="15"}render(){return n.h("svg",{key:"d3e4ee769c3cc25268a59abf44601bdad792d7ec",width:this.width,height:this.height,viewBox:"0 0 24 24",fill:"auto",xmlns:"http://www.w3.org/2000/svg"},n.h("path",{key:"314bf2244bdb7b73fd605adb9a2ed82cb812b489",d:"M4 4H20V20H4V4Z",stroke:"auto","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"}))}static get style(){return bD}},[258,"stop-icon",{width:[1],height:[1]}]);function vD(){if(typeof customElements>"u")return;["stop-icon"].forEach(e=>{switch(e){case"stop-icon":customElements.get(e)||customElements.define(e,Ob);break}})}const CD=Ob,_D=vD,kD=ry,ED=Ln,wD=l0,xD=Hn,SD=uy,TD=Ea,DD=Ng,ID=Qe,AD=yy,RD=qa,OD=".sc-trash-fill-icon-h{display:flex}",Lb=n.proxyCustomElement(class extends n.H{constructor(){super(),this.__registerHost(),this.width="15",this.height="15"}render(){return n.h("svg",{key:"f4b6bf0a4e86ceb196065f771242ac6e4487fc1a",width:this.width,height:this.height,viewBox:"0 0 24 24",fill:"auto",xmlns:"http://www.w3.org/2000/svg"},n.h("path",{key:"dc1472db1426fca03c7709b167f4405f95e6f1f5",d:"M3 6H5H21",stroke:"auto","stroke-width":"1.5"}),n.h("path",{key:"09f4731c1874955f7172f8423abea95632d89cd6",d:"M8 6V4C8 3.46957 8.21071 2.96086 8.58579 2.58579C8.96086 2.21071 9.46957 2 10 2H14C14.5304 2 15.0391 2.21071 15.4142 2.58579C15.7893 2.96086 16 3.46957 16 4V6M19 6V20C19 20.5304 18.7893 21.0391 18.4142 21.4142C18.0391 21.7893 17.5304 22 17 22H7C6.46957 22 5.96086 21.7893 5.58579 21.4142C5.21071 21.0391 5 20.5304 5 20V6H19Z",stroke:"auto","stroke-width":"1.5"}),n.h("path",{key:"9a5326048ec96555dbbc4be234c773fa3fd663da",d:"M10 11V17",stroke:"auto","stroke-width":"1.5"}),n.h("path",{key:"fc50cf30fbef0f4ba33e16d6d9a5dd8bdec769d1",d:"M14 11V17",stroke:"auto","stroke-width":"1.5"}))}static get style(){return OD}},[258,"trash-fill-icon",{width:[1],height:[1]}]);function LD(){if(typeof customElements>"u")return;["trash-fill-icon"].forEach(e=>{switch(e){case"trash-fill-icon":customElements.get(e)||customElements.define(e,Lb);break}})}const HD=Lb,PD=LD,MD=lb,FD=$o,ND=".sc-underline-icon-h{display:flex}",Hb=n.proxyCustomElement(class extends n.H{constructor(){super(),this.__registerHost(),this.width="15",this.height="15"}render(){return n.h("svg",{key:"4d71ec4fdf0fa2505394ec32a9595f576c90aba9",width:this.width,height:this.height,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},n.h("path",{key:"a1a86fed569522894b6a305bc107cf7885f721e1",d:"M19 4V10C19 13.866 15.866 17 12 17C8.13401 17 5 13.866 5 10V4M8.5 4V10C8.5 13.2218 10.6766 15.9352 13.6395 16.7501M4 21H20M3 4L10.5 4M17 4L21 4",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"}))}static get style(){return ND}},[258,"underline-icon",{width:[1],height:[1]}]);function $D(){if(typeof customElements>"u")return;["underline-icon"].forEach(e=>{switch(e){case"underline-icon":customElements.get(e)||customElements.define(e,Hb);break}})}const zD=Hb,BD=$D,jD=sb,UD=Ka,VD=r0,WD=Fi,GD=K.createComponent({tagName:"add-circle-icon",elementClass:O2,react:Q,events:{},defineCustomElement:L2}),qD=K.createComponent({tagName:"archive-icon",elementClass:M2,react:Q,events:{},defineCustomElement:F2}),YD=K.createComponent({tagName:"arrow-icon",elementClass:z2,react:Q,events:{},defineCustomElement:B2}),ZD=K.createComponent({tagName:"bold-icon",elementClass:V2,react:Q,events:{},defineCustomElement:W2}),XD=K.createComponent({tagName:"button-component",elementClass:Y2,react:Q,events:{},defineCustomElement:Z2}),JD=K.createComponent({tagName:"calendar-agenda-fill-icon",elementClass:J2,react:Q,events:{},defineCustomElement:K2}),KD=K.createComponent({tagName:"calendar-agenda-icon",elementClass:e5,react:Q,events:{},defineCustomElement:t5}),QD=K.createComponent({tagName:"calendar-cancel-icon",elementClass:a5,react:Q,events:{},defineCustomElement:i5}),eI=K.createComponent({tagName:"calendar-check-icon",elementClass:s5,react:Q,events:{},defineCustomElement:r5}),tI=K.createComponent({tagName:"calendar-icon",elementClass:c5,react:Q,events:{},defineCustomElement:d5}),nI=K.createComponent({tagName:"calendar-info-icon",elementClass:u5,react:Q,events:{},defineCustomElement:h5}),aI=K.createComponent({tagName:"calendar-patterns-icon",elementClass:m5,react:Q,events:{},defineCustomElement:g5}),iI=K.createComponent({tagName:"checkbox-component",elementClass:b5,react:Q,events:{onNylasFormCheckboxToggled:"nylasFormCheckboxToggled"},defineCustomElement:v5}),oI=K.createComponent({tagName:"checkbox-group",elementClass:_5,react:Q,events:{onNylasCheckboxGroupChanged:"nylasCheckboxGroupChanged"},defineCustomElement:k5}),sI=K.createComponent({tagName:"checkmark-circle-icon",elementClass:w5,react:Q,events:{},defineCustomElement:x5}),rI=K.createComponent({tagName:"checkmark-icon",elementClass:T5,react:Q,events:{},defineCustomElement:D5}),lI=K.createComponent({tagName:"chevron-icon",elementClass:A5,react:Q,events:{},defineCustomElement:R5}),cI=K.createComponent({tagName:"clock-icon",elementClass:L5,react:Q,events:{},defineCustomElement:H5}),dI=K.createComponent({tagName:"close-icon",elementClass:M5,react:Q,events:{},defineCustomElement:F5}),fI=K.createComponent({tagName:"copy-icon",elementClass:$5,react:Q,events:{},defineCustomElement:z5}),uI=K.createComponent({tagName:"delete-icon",elementClass:j5,react:Q,events:{},defineCustomElement:U5}),hI=K.createComponent({tagName:"document-refresh-icon",elementClass:G5,react:Q,events:{},defineCustomElement:q5}),pI=K.createComponent({tagName:"dragable-icon",elementClass:Z5,react:Q,events:{},defineCustomElement:X5}),mI=K.createComponent({tagName:"edit-icon",elementClass:K5,react:Q,events:{},defineCustomElement:Q5}),gI=K.createComponent({tagName:"envelope-fill-icon",elementClass:tC,react:Q,events:{},defineCustomElement:nC}),yI=K.createComponent({tagName:"envelope-icon",elementClass:iC,react:Q,events:{},defineCustomElement:oC}),bI=K.createComponent({tagName:"eye-icon",elementClass:rC,react:Q,events:{},defineCustomElement:lC}),vI=K.createComponent({tagName:"feedback-icon",elementClass:dC,react:Q,events:{},defineCustomElement:fC}),CI=K.createComponent({tagName:"flow-icon",elementClass:hC,react:Q,events:{},defineCustomElement:pC}),_I=K.createComponent({tagName:"folder-icon",elementClass:yC,react:Q,events:{},defineCustomElement:bC}),kI=K.createComponent({tagName:"forward-icon",elementClass:_C,react:Q,events:{},defineCustomElement:kC}),EI=K.createComponent({tagName:"globe-icon",elementClass:wC,react:Q,events:{},defineCustomElement:xC}),wI=K.createComponent({tagName:"google-logo-icon",elementClass:TC,react:Q,events:{},defineCustomElement:DC}),xI=K.createComponent({tagName:"google-meet-icon",elementClass:AC,react:Q,events:{},defineCustomElement:RC}),SI=K.createComponent({tagName:"inbox-icon",elementClass:HC,react:Q,events:{},defineCustomElement:PC}),TI=K.createComponent({tagName:"info-icon",elementClass:FC,react:Q,events:{},defineCustomElement:NC}),DI=K.createComponent({tagName:"input-color-picker",elementClass:zC,react:Q,events:{onNylasFormDropdownChanged:"nylasFormDropdownChanged"},defineCustomElement:BC}),II=K.createComponent({tagName:"input-component",elementClass:WC,react:Q,events:{onNylasFormInputChanged:"nylasFormInputChanged",onNylasFormInputFocused:"nylasFormInputFocused",onNylasFormInputBlurred:"nylasFormInputBlurred"},defineCustomElement:GC}),AI=K.createComponent({tagName:"input-dropdown",elementClass:YC,react:Q,events:{onInputOptionChanged:"inputOptionChanged"},defineCustomElement:ZC}),RI=K.createComponent({tagName:"input-image-url",elementClass:e_,react:Q,events:{onNylasFormInputImageUrlInvalid:"nylasFormInputImageUrlInvalid",onValueChanged:"valueChanged"},defineCustomElement:t_}),OI=K.createComponent({tagName:"italic-icon",elementClass:i_,react:Q,events:{},defineCustomElement:o_}),LI=K.createComponent({tagName:"loading-icon",elementClass:s_,react:Q,events:{},defineCustomElement:r_}),HI=K.createComponent({tagName:"location-icon",elementClass:c_,react:Q,events:{},defineCustomElement:d_}),PI=K.createComponent({tagName:"location-off-icon",elementClass:u_,react:Q,events:{},defineCustomElement:h_}),MI=K.createComponent({tagName:"microsoft-logo-icon",elementClass:m_,react:Q,events:{},defineCustomElement:g_}),FI=K.createComponent({tagName:"microsoft-teams-icon",elementClass:b_,react:Q,events:{},defineCustomElement:v_}),NI=K.createComponent({tagName:"multi-select-dropdown",elementClass:__,react:Q,events:{onSelectedOptionsChanged:"selectedOptionsChanged"},defineCustomElement:k_}),$I=K.createComponent({tagName:"nylas-additional-participants",elementClass:D_,react:Q,events:{onValueChanged:"valueChanged"},defineCustomElement:I_}),zI=K.createComponent({tagName:"nylas-availability-picker",elementClass:N_,react:Q,events:{onValueChanged:"valueChanged"},defineCustomElement:$_}),BI=K.createComponent({tagName:"nylas-booked-event-card",elementClass:j_,react:Q,events:{onCancelBookingButtonClicked:"cancelBookingButtonClicked",onRescheduleButtonClicked:"rescheduleButtonClicked",onRescheduleBookedEventError:"rescheduleBookedEventError",onCancelBookedEventValidationError:"cancelBookedEventValidationError"},defineCustomElement:U_}),jI=K.createComponent({tagName:"nylas-booking-calendar-picker",elementClass:G_,react:Q,events:{onValueChanged:"valueChanged"},defineCustomElement:q_}),UI=K.createComponent({tagName:"nylas-booking-confirmation-redirect",elementClass:X_,react:Q,events:{onValueChanged:"valueChanged"},defineCustomElement:J_}),VI=K.createComponent({tagName:"nylas-booking-confirmation-type",elementClass:e6,react:Q,events:{onValueChanged:"valueChanged"},defineCustomElement:t6}),WI=K.createComponent({tagName:"nylas-booking-form",elementClass:N6,react:Q,events:{onNameChanged:"nameChanged",onEmailChanged:"emailChanged",onBackButtonClicked:"backButtonClicked",onDetailsConfirmed:"detailsConfirmed",onBookingFormError:"bookingFormError",onBookingFormSubmitted:"bookingFormSubmitted"},defineCustomElement:$6}),GI=K.createComponent({tagName:"nylas-booking-form-config",elementClass:O6,react:Q,events:{onValueChanged:"valueChanged"},defineCustomElement:L6}),qI=K.createComponent({tagName:"nylas-buffer-time",elementClass:j6,react:Q,events:{onValueChanged:"valueChanged"},defineCustomElement:U6}),YI=K.createComponent({tagName:"nylas-calendar-picker",elementClass:G6,react:Q,events:{onValueChanged:"valueChanged"},defineCustomElement:q6}),ZI=K.createComponent({tagName:"nylas-cancel-booking-form",elementClass:X6,react:Q,events:{onGoBackButtonClicked:"goBackButtonClicked",onCancelBookingFormSubmitted:"cancelBookingFormSubmitted",onTriggerValidation:"triggerValidation",onCancelBookedEventError:"cancelBookedEventError",onCancelBookingFormError:"cancelBookingFormError"},defineCustomElement:J6}),XI=K.createComponent({tagName:"nylas-cancellation-policy",elementClass:e3,react:Q,events:{onValueChanged:"valueChanged"},defineCustomElement:t3}),JI=K.createComponent({tagName:"nylas-cancelled-event-card",elementClass:i3,react:Q,events:{onCloseCancelEventCardClicked:"closeCancelEventCardClicked",onCancelledEventCardError:"cancelledEventCardError"},defineCustomElement:o3}),KI=K.createComponent({tagName:"nylas-confirmation-email",elementClass:d3,react:Q,events:{onValueChanged:"valueChanged"},defineCustomElement:f3}),QI=K.createComponent({tagName:"nylas-confirmed-event-card",elementClass:p3,react:Q,events:{onCloseConfirmEventCardClicked:"closeConfirmEventCardClicked",onConfirmedEventCardError:"confirmedEventCardError"},defineCustomElement:m3}),eA=K.createComponent({tagName:"nylas-connected-calendars",elementClass:b3,react:Q,events:{onValueChanged:"valueChanged"},defineCustomElement:v3}),tA=K.createComponent({tagName:"nylas-custom-booking-flow",elementClass:k3,react:Q,events:{},defineCustomElement:E3}),nA=K.createComponent({tagName:"nylas-custom-event-slug",elementClass:S3,react:Q,events:{onValueChanged:"valueChanged"},defineCustomElement:T3}),aA=K.createComponent({tagName:"nylas-customize-booking-settings",elementClass:A3,react:Q,events:{onValueChanged:"valueChanged"},defineCustomElement:R3}),iA=K.createComponent({tagName:"nylas-date-component",elementClass:O3,react:Q,events:{onNylasFormInputChanged:"nylasFormInputChanged",onNylasFormInputFocused:"nylasFormInputFocused",onNylasFormInputBlurred:"nylasFormInputBlurred"},defineCustomElement:L3}),oA=K.createComponent({tagName:"nylas-date-picker",elementClass:$3,react:Q,events:{onDateSelected:"dateSelected",onMonthChanged:"monthChanged"},defineCustomElement:z3}),sA=K.createComponent({tagName:"nylas-disable-emails",elementClass:V3,react:Q,events:{onValueChanged:"valueChanged"},defineCustomElement:W3}),rA=K.createComponent({tagName:"nylas-editor-tabs",elementClass:dx,react:Q,events:{onSchedulerConfigChanged:"schedulerConfigChanged",onSchedulerConfigCreated:"schedulerConfigCreated",onCancelButtonClick:"cancelButtonClick",onFormSubmitted:"formSubmitted",onPreviewButtonClicked:"previewButtonClicked",onSchedulerEditorFormUpdated:"schedulerEditorFormUpdated",onNylasSchedulerError:"nylasSchedulerError",onDismissNotification:"dismissNotification"},defineCustomElement:fx}),lA=K.createComponent({tagName:"nylas-editor-tabs-group",elementClass:j8,react:Q,events:{onSchedulerConfigChanged:"schedulerConfigChanged",onSchedulerConfigCreated:"schedulerConfigCreated",onCancelButtonClick:"cancelButtonClick",onFormSubmitted:"formSubmitted",onPreviewButtonClicked:"previewButtonClicked",onSchedulerEditorFormUpdated:"schedulerEditorFormUpdated",onGroupEventCreateTriggered:"groupEventCreateTriggered",onGroupEventUpdateTriggered:"groupEventUpdateTriggered",onGroupEventDeleteTriggered:"groupEventDeleteTriggered",onGroupEventImportTriggered:"groupEventImportTriggered",onSaveGroupEventChangesError:"saveGroupEventChangesError",onNylasSchedulerError:"nylasSchedulerError",onDismissNotification:"dismissNotification"},defineCustomElement:U8}),cA=K.createComponent({tagName:"nylas-event-calendar",elementClass:ux,react:Q,events:{onFetchMasterGroupEvent:"fetchMasterGroupEvent",onSaveGroupEventChanges:"saveGroupEventChanges",onDeleteGroupEvent:"deleteGroupEvent",onGroupEventSelected:"groupEventSelected",onCreateGroupEvent:"createGroupEvent",onCalendarViewChanged:"calendarViewChanged",onPreviosNextClicked:"previosNextClicked",onSetCalendarViewDateRange:"setCalendarViewDateRange",onImportGroupEvent:"importGroupEvent"},defineCustomElement:hx}),dA=K.createComponent({tagName:"nylas-event-capacity",elementClass:px,react:Q,events:{onValueChanged:"valueChanged"},defineCustomElement:mx}),fA=K.createComponent({tagName:"nylas-event-description",elementClass:gx,react:Q,events:{onValueChanged:"valueChanged"},defineCustomElement:yx}),uA=K.createComponent({tagName:"nylas-event-duration",elementClass:bx,react:Q,events:{onValueChanged:"valueChanged"},defineCustomElement:vx}),hA=K.createComponent({tagName:"nylas-event-info",elementClass:Cx,react:Q,events:{},defineCustomElement:_x}),pA=K.createComponent({tagName:"nylas-event-limits",elementClass:kx,react:Q,events:{},defineCustomElement:Ex}),mA=K.createComponent({tagName:"nylas-event-location",elementClass:wx,react:Q,events:{onValueChanged:"valueChanged"},defineCustomElement:xx}),gA=K.createComponent({tagName:"nylas-event-timeslot",elementClass:Sx,react:Q,events:{onValueChanged:"valueChanged",onTimeWindowFormError:"timeWindowFormError",onDateTimeInputError:"dateTimeInputError"},defineCustomElement:Tx}),yA=K.createComponent({tagName:"nylas-event-title",elementClass:Dx,react:Q,events:{onValueChanged:"valueChanged"},defineCustomElement:Ix}),bA=K.createComponent({tagName:"nylas-feedback-form",elementClass:Ax,react:Q,events:{onFeedbackModalClosed:"feedbackModalClosed",onFeedbackSubmitted:"feedbackSubmitted",onTriggerValidation:"triggerValidation"},defineCustomElement:Rx}),vA=K.createComponent({tagName:"nylas-form-card",elementClass:Ox,react:Q,events:{},defineCustomElement:Lx}),CA=K.createComponent({tagName:"nylas-limit-future-bookings",elementClass:Hx,react:Q,events:{onValueChanged:"valueChanged"},defineCustomElement:Px}),_A=K.createComponent({tagName:"nylas-list-configurations",elementClass:Nx,react:Q,events:{onInitListConfigurations:"initListConfigurations",onCreateButtonClick:"createButtonClick",onEditButtonClick:"editButtonClick",onDeleteButtonClick:"deleteButtonClick",onNylasSchedulerError:"nylasSchedulerError",onDismissNotification:"dismissNotification"},defineCustomElement:$x}),kA=K.createComponent({tagName:"nylas-locale-switch",elementClass:jx,react:Q,events:{onTimezoneChanged:"timezoneChanged",onLanguageChanged:"languageChanged"},defineCustomElement:Ux}),EA=K.createComponent({tagName:"nylas-logo",elementClass:Wx,react:Q,events:{},defineCustomElement:Gx}),wA=K.createComponent({tagName:"nylas-min-booking-notice",elementClass:qx,react:Q,events:{onValueChanged:"valueChanged"},defineCustomElement:Yx}),xA=K.createComponent({tagName:"nylas-min-cancellation-notice",elementClass:Zx,react:Q,events:{onValueChanged:"valueChanged"},defineCustomElement:Xx}),SA=K.createComponent({tagName:"nylas-notetaker-config",elementClass:Jx,react:Q,events:{onValueChanged:"valueChanged",onNotetakerError:"notetakerError"},defineCustomElement:Kx}),TA=K.createComponent({tagName:"nylas-notification",elementClass:Qx,react:Q,events:{},defineCustomElement:eS}),DA=K.createComponent({tagName:"nylas-only-specific-time-availability",elementClass:tS,react:Q,events:{onValueChanged:"valueChanged"},defineCustomElement:nS}),IA=K.createComponent({tagName:"nylas-organizer-confirmation-card",elementClass:oS,react:Q,events:{onRejectBookingButtonClicked:"rejectBookingButtonClicked",onConfirmBookingButtonClicked:"confirmBookingButtonClicked",onConfirmBookingError:"confirmBookingError"},defineCustomElement:sS}),AA=K.createComponent({tagName:"nylas-page-name",elementClass:rS,react:Q,events:{onValueChanged:"valueChanged"},defineCustomElement:lS}),RA=K.createComponent({tagName:"nylas-page-styling",elementClass:cS,react:Q,events:{onValueChanged:"valueChanged",onBookingFormSubmitted:"bookingFormSubmitted"},defineCustomElement:dS}),OA=K.createComponent({tagName:"nylas-participant-booking-calendars",elementClass:fS,react:Q,events:{onValueChanged:"valueChanged"},defineCustomElement:uS}),LA=K.createComponent({tagName:"nylas-participants-custom-availability",elementClass:hS,react:Q,events:{onValueChanged:"valueChanged"},defineCustomElement:pS}),HA=K.createComponent({tagName:"nylas-reminder-emails",elementClass:mS,react:Q,events:{onValueChanged:"valueChanged",onNylasSuggestReminderMinutes:"nylasSuggestReminderMinutes"},defineCustomElement:gS}),PA=K.createComponent({tagName:"nylas-reminder-time",elementClass:yS,react:Q,events:{onValueChanged:"valueChanged"},defineCustomElement:bS}),MA=K.createComponent({tagName:"nylas-scheduler-editor",elementClass:QS,react:Q,events:{onInit:"init",onLoggedIn:"loggedIn",onLoggedOut:"loggedOut",onSchedulerConfigCloseClicked:"schedulerConfigCloseClicked"},defineCustomElement:eT}),FA=K.createComponent({tagName:"nylas-scheduling",elementClass:uT,react:Q,events:{onInit:"init",onSchedulerWillLoad:"schedulerWillLoad",onSchedulerDidLoad:"schedulerDidLoad",onNylasSchedulerError:"nylasSchedulerError",onNylasSchedulerInfo:"nylasSchedulerInfo",onConfigSettingsLoaded:"configSettingsLoaded",onBookingRefExtracted:"bookingRefExtracted",onBookedEventInfo:"bookedEventInfo"},defineCustomElement:hT}),NA=K.createComponent({tagName:"nylas-scheduling-method",elementClass:tT,react:Q,events:{onValueChanged:"valueChanged"},defineCustomElement:nT}),$A=K.createComponent({tagName:"nylas-select-event-type",elementClass:pT,react:Q,events:{onReturnToAllSchedulingPagesEvent:"returnToAllSchedulingPagesEvent",onCreateEventTypeSelected:"createEventTypeSelected"},defineCustomElement:mT}),zA=K.createComponent({tagName:"nylas-selected-event-card",elementClass:gT,react:Q,events:{},defineCustomElement:yT}),BA=K.createComponent({tagName:"nylas-specific-time-availability-picker",elementClass:bT,react:Q,events:{onValueChanged:"valueChanged"},defineCustomElement:vT}),jA=K.createComponent({tagName:"nylas-time-window-picker",elementClass:CT,react:Q,events:{onTimeChange:"timeChange",onTimeWindowFormError:"timeWindowFormError"},defineCustomElement:_T}),UA=K.createComponent({tagName:"nylas-timeslot-interval",elementClass:kT,react:Q,events:{onValueChanged:"valueChanged"},defineCustomElement:ET}),VA=K.createComponent({tagName:"nylas-timeslot-picker",elementClass:wT,react:Q,events:{onTimeslotSelected:"timeslotSelected",onTimeslotConfirmed:"timeslotConfirmed",onValidateTimeslotError:"validateTimeslotError"},defineCustomElement:xT}),WA=K.createComponent({tagName:"paintbrush-fill-icon",elementClass:ST,react:Q,events:{},defineCustomElement:TT}),GA=K.createComponent({tagName:"paintbrush-icon",elementClass:DT,react:Q,events:{},defineCustomElement:IT}),qA=K.createComponent({tagName:"people-icon",elementClass:AT,react:Q,events:{},defineCustomElement:RT}),YA=K.createComponent({tagName:"person-clipboard-icon",elementClass:OT,react:Q,events:{},defineCustomElement:LT}),ZA=K.createComponent({tagName:"person-icon",elementClass:HT,react:Q,events:{},defineCustomElement:PT}),XA=K.createComponent({tagName:"play-icon",elementClass:NT,react:Q,events:{},defineCustomElement:$T}),JA=K.createComponent({tagName:"plus-icon",elementClass:zT,react:Q,events:{},defineCustomElement:BT}),KA=K.createComponent({tagName:"radio-button-group",elementClass:jT,react:Q,events:{onNylasFormRadioChanged:"nylasFormRadioChanged"},defineCustomElement:UT}),QA=K.createComponent({tagName:"refresh-icon",elementClass:GT,react:Q,events:{},defineCustomElement:qT}),eR=K.createComponent({tagName:"reply-all-icon",elementClass:XT,react:Q,events:{},defineCustomElement:JT}),tR=K.createComponent({tagName:"reply-icon",elementClass:eD,react:Q,events:{},defineCustomElement:tD}),nR=K.createComponent({tagName:"search-icon",elementClass:nD,react:Q,events:{},defineCustomElement:aD}),aR=K.createComponent({tagName:"select-dropdown",elementClass:iD,react:Q,events:{onNylasFormDropdownChanged:"nylasFormDropdownChanged",onNylasFormDropdownDefaultSelected:"nylasFormDropdownDefaultSelected"},defineCustomElement:oD}),iR=K.createComponent({tagName:"sent-icon",elementClass:lD,react:Q,events:{},defineCustomElement:cD}),oR=K.createComponent({tagName:"spam-icon",elementClass:uD,react:Q,events:{},defineCustomElement:hD}),sR=K.createComponent({tagName:"star-icon",elementClass:gD,react:Q,events:{},defineCustomElement:yD}),rR=K.createComponent({tagName:"stop-icon",elementClass:CD,react:Q,events:{},defineCustomElement:_D}),lR=K.createComponent({tagName:"textarea-component",elementClass:kD,react:Q,events:{onNylasFormInputChanged:"nylasFormInputChanged"},defineCustomElement:ED}),cR=K.createComponent({tagName:"time-period-selector",elementClass:wD,react:Q,events:{onTimePeriodChanged:"timePeriodChanged"},defineCustomElement:xD}),dR=K.createComponent({tagName:"toggle-switch",elementClass:SD,react:Q,events:{onNylasFormSwitchToggled:"nylasFormSwitchToggled"},defineCustomElement:TD}),fR=K.createComponent({tagName:"tooltip-component",elementClass:DD,react:Q,events:{},defineCustomElement:ID}),uR=K.createComponent({tagName:"translate-icon",elementClass:AD,react:Q,events:{},defineCustomElement:RD}),hR=K.createComponent({tagName:"trash-fill-icon",elementClass:HD,react:Q,events:{},defineCustomElement:PD}),pR=K.createComponent({tagName:"trash-icon",elementClass:MD,react:Q,events:{},defineCustomElement:FD}),mR=K.createComponent({tagName:"underline-icon",elementClass:zD,react:Q,events:{},defineCustomElement:BD}),gR=K.createComponent({tagName:"warning-icon",elementClass:jD,react:Q,events:{},defineCustomElement:UD}),yR=K.createComponent({tagName:"zoom-icon",elementClass:VD,react:Q,events:{},defineCustomElement:WD});exports.AddCircleIcon=GD;exports.ArchiveIcon=qD;exports.ArrowIcon=YD;exports.BoldIcon=ZD;exports.ButtonComponent=XD;exports.CalendarAgendaFillIcon=JD;exports.CalendarAgendaIcon=KD;exports.CalendarCancelIcon=QD;exports.CalendarCheckIcon=eI;exports.CalendarIcon=tI;exports.CalendarInfoIcon=nI;exports.CalendarPatternsIcon=aI;exports.CheckboxComponent=iI;exports.CheckboxGroup=oI;exports.CheckmarkCircleIcon=sI;exports.CheckmarkIcon=rI;exports.ChevronIcon=lI;exports.ClockIcon=cI;exports.CloseIcon=dI;exports.CopyIcon=fI;exports.DeleteIcon=uI;exports.DocumentRefreshIcon=hI;exports.DragableIcon=pI;exports.EditIcon=mI;exports.EnvelopeFillIcon=gI;exports.EnvelopeIcon=yI;exports.EyeIcon=bI;exports.FeedbackIcon=vI;exports.FlowIcon=CI;exports.FolderIcon=_I;exports.ForwardIcon=kI;exports.GlobeIcon=EI;exports.GoogleLogoIcon=wI;exports.GoogleMeetIcon=xI;exports.InboxIcon=SI;exports.InfoIcon=TI;exports.InputColorPicker=DI;exports.InputComponent=II;exports.InputDropdown=AI;exports.InputImageUrl=RI;exports.ItalicIcon=OI;exports.LoadingIcon=LI;exports.LocationIcon=HI;exports.LocationOffIcon=PI;exports.MicrosoftLogoIcon=MI;exports.MicrosoftTeamsIcon=FI;exports.MultiSelectDropdown=NI;exports.NylasAdditionalParticipants=$I;exports.NylasAvailabilityPicker=zI;exports.NylasBookedEventCard=BI;exports.NylasBookingCalendarPicker=jI;exports.NylasBookingConfirmationRedirect=UI;exports.NylasBookingConfirmationType=VI;exports.NylasBookingForm=WI;exports.NylasBookingFormConfig=GI;exports.NylasBufferTime=qI;exports.NylasCalendarPicker=YI;exports.NylasCancelBookingForm=ZI;exports.NylasCancellationPolicy=XI;exports.NylasCancelledEventCard=JI;exports.NylasConfirmationEmail=KI;exports.NylasConfirmedEventCard=QI;exports.NylasConnectedCalendars=eA;exports.NylasCustomBookingFlow=tA;exports.NylasCustomEventSlug=nA;exports.NylasCustomizeBookingSettings=aA;exports.NylasDateComponent=iA;exports.NylasDatePicker=oA;exports.NylasDisableEmails=sA;exports.NylasEditorTabs=rA;exports.NylasEditorTabsGroup=lA;exports.NylasEventCalendar=cA;exports.NylasEventCapacity=dA;exports.NylasEventDescription=fA;exports.NylasEventDuration=uA;exports.NylasEventInfo=hA;exports.NylasEventLimits=pA;exports.NylasEventLocation=mA;exports.NylasEventTimeslot=gA;exports.NylasEventTitle=yA;exports.NylasFeedbackForm=bA;exports.NylasFormCard=vA;exports.NylasLimitFutureBookings=CA;exports.NylasListConfigurations=_A;exports.NylasLocaleSwitch=kA;exports.NylasLogo=EA;exports.NylasMinBookingNotice=wA;exports.NylasMinCancellationNotice=xA;exports.NylasNotetakerConfig=SA;exports.NylasNotification=TA;exports.NylasOnlySpecificTimeAvailability=DA;exports.NylasOrganizerConfirmationCard=IA;exports.NylasPageName=AA;exports.NylasPageStyling=RA;exports.NylasParticipantBookingCalendars=OA;exports.NylasParticipantsCustomAvailability=LA;exports.NylasReminderEmails=HA;exports.NylasReminderTime=PA;exports.NylasSchedulerEditor=MA;exports.NylasScheduling=FA;exports.NylasSchedulingMethod=NA;exports.NylasSelectEventType=$A;exports.NylasSelectedEventCard=zA;exports.NylasSpecificTimeAvailabilityPicker=BA;exports.NylasTimeWindowPicker=jA;exports.NylasTimeslotInterval=UA;exports.NylasTimeslotPicker=VA;exports.PaintbrushFillIcon=WA;exports.PaintbrushIcon=GA;exports.PeopleIcon=qA;exports.PersonClipboardIcon=YA;exports.PersonIcon=ZA;exports.PlayIcon=XA;exports.PlusIcon=JA;exports.RadioButtonGroup=KA;exports.RefreshIcon=QA;exports.ReplyAllIcon=eR;exports.ReplyIcon=tR;exports.SearchIcon=nR;exports.SelectDropdown=aR;exports.SentIcon=iR;exports.SpamIcon=oR;exports.StarIcon=sR;exports.StopIcon=rR;exports.TextareaComponent=lR;exports.TimePeriodSelector=cR;exports.ToggleSwitch=dR;exports.TooltipComponent=fR;exports.TranslateIcon=uR;exports.TrashFillIcon=hR;exports.TrashIcon=pR;exports.UnderlineIcon=mR;exports.WarningIcon=gR;exports.ZoomIcon=yR;
|
|
525
525
|
//# sourceMappingURL=components.js.map
|