@nylas/react 1.0.0-prealpha1 → 1.0.1-prealpha1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (88) hide show
  1. package/dist/add-circle-icon.entry-4b8debfa.js +15 -0
  2. package/dist/add-circle-icon.entry-c5fdaa6f.cjs +1 -0
  3. package/dist/{archive-icon_7.entry-53aede1b.js → archive-icon_7.entry-9f3eca2c.js} +16 -16
  4. package/dist/{archive-icon_7.entry-8c90815a.cjs → archive-icon_7.entry-baecb43c.cjs} +1 -1
  5. package/dist/{arrow-icon.entry-a2f53919.cjs → arrow-icon.entry-9ab0c414.cjs} +1 -1
  6. package/dist/{arrow-icon.entry-2867f4fb.js → arrow-icon.entry-a3b36218.js} +4 -4
  7. package/dist/{bold-icon_3.entry-e0bc6774.cjs → bold-icon_3.entry-50406bc7.cjs} +1 -1
  8. package/dist/{bold-icon_3.entry-ad806730.js → bold-icon_3.entry-b0d81839.js} +6 -6
  9. package/dist/{calendar-cancel-icon.entry-74051835.js → calendar-cancel-icon.entry-0d07e33c.js} +5 -5
  10. package/dist/{calendar-cancel-icon.entry-546b7bd4.cjs → calendar-cancel-icon.entry-8f498984.cjs} +1 -1
  11. package/dist/{calendar-check-icon_3.entry-f5846fee.cjs → calendar-check-icon_3.entry-5415e916.cjs} +1 -1
  12. package/dist/{calendar-check-icon_3.entry-42bab0b4.js → calendar-check-icon_3.entry-cfb612c6.js} +4 -4
  13. package/dist/{calendar-icon.entry-25474b1e.cjs → calendar-icon.entry-219efd7a.cjs} +1 -1
  14. package/dist/{calendar-icon.entry-c751873f.js → calendar-icon.entry-e5f20598.js} +5 -5
  15. package/dist/chevron-icon.entry-3c709061.cjs +1 -0
  16. package/dist/chevron-icon.entry-f5d5d1b1.js +15 -0
  17. package/dist/close-icon_2.entry-eca351c4.js +25 -0
  18. package/dist/{close-icon_2.entry-aa015993.cjs → close-icon_2.entry-fa4f6d3e.cjs} +1 -1
  19. package/dist/{document-refresh-icon.entry-ca2ef29e.cjs → document-refresh-icon.entry-3a29a6e6.cjs} +1 -1
  20. package/dist/{document-refresh-icon.entry-b27207eb.js → document-refresh-icon.entry-89ad42fa.js} +5 -5
  21. package/dist/elements/index.d.ts +4 -0
  22. package/dist/{elements-60ebdb01-24595598.cjs → elements-dc5b338e-81a0319c.cjs} +577 -555
  23. package/dist/{elements-60ebdb01-5d144002.js → elements-dc5b338e-fb5dbfb5.js} +3339 -2763
  24. package/dist/{forward-icon_6.entry-dc8f7235.js → forward-icon_6.entry-0a6dff18.js} +127 -127
  25. package/dist/{forward-icon_6.entry-725d1be4.cjs → forward-icon_6.entry-ce725f05.cjs} +3 -3
  26. package/dist/{globe-icon.entry-796d3f48.js → globe-icon.entry-71414bc6.js} +4 -4
  27. package/dist/{globe-icon.entry-918cfd35.cjs → globe-icon.entry-a0c9599a.cjs} +1 -1
  28. package/dist/index-586a4206.cjs +30 -0
  29. package/dist/{index-4f65b6f9.js → index-98d3a4da.js} +410 -401
  30. package/dist/{index-2b85580a-bfc3ceac.cjs → index-b30d446a-3d69a3cc.cjs} +1 -1
  31. package/dist/{index-2b85580a-f9211f23.js → index-b30d446a-e0eaccad.js} +4 -9
  32. package/dist/{loading-icon.entry-8e49fab0.js → loading-icon.entry-15debb7d.js} +4 -4
  33. package/dist/loading-icon.entry-d2680046.cjs +1 -0
  34. package/dist/{mailbox-store-0019772c-06d31a90.js → mailbox-store-19f0c6c9-23a4e72f.js} +1 -1
  35. package/dist/{mailbox-store-0019772c-d1254c5c.cjs → mailbox-store-19f0c6c9-9a3ef58a.cjs} +1 -1
  36. package/dist/{nylas-booked-event-card_9.entry-ea02f083.cjs → nylas-booked-event-card_10.entry-27efa654.cjs} +6 -139
  37. package/dist/{nylas-booked-event-card_9.entry-d995d7cb.js → nylas-booked-event-card_10.entry-f2481a57.js} +1818 -1927
  38. package/dist/{nylas-if-state_3.entry-e8c831b7.cjs → nylas-if-state_3.entry-6c0bf8eb.cjs} +1 -1
  39. package/dist/{nylas-if-state_3.entry-ce816adb.js → nylas-if-state_3.entry-d805d4c6.js} +6 -6
  40. package/dist/{nylas-list-folders.entry-8134344b.js → nylas-list-folders.entry-472bd255.js} +3 -3
  41. package/dist/{nylas-list-folders.entry-de8cca60.cjs → nylas-list-folders.entry-cc04a07e.cjs} +1 -1
  42. package/dist/{nylas-list-threads.entry-93b70a1a.cjs → nylas-list-threads.entry-795c5a2b.cjs} +1 -1
  43. package/dist/{nylas-list-threads.entry-1367fe30.js → nylas-list-threads.entry-f3266bf7.js} +3 -3
  44. package/dist/{nylas-mailbox-pagination.entry-568ac217.js → nylas-mailbox-pagination.entry-bd0d3bda.js} +2 -2
  45. package/dist/{nylas-mailbox-pagination.entry-6bb0ee37.cjs → nylas-mailbox-pagination.entry-f701fd83.cjs} +1 -1
  46. package/dist/{nylas-mailbox-toolbar-button.entry-9214b283.js → nylas-mailbox-toolbar-button.entry-9641b5cd.js} +8 -8
  47. package/dist/{nylas-mailbox-toolbar-button.entry-d4ad5c15.cjs → nylas-mailbox-toolbar-button.entry-b9d6a3c8.cjs} +1 -1
  48. package/dist/{nylas-open-hours-picker.entry-109f13f5.js → nylas-open-hours-picker.entry-42942946.js} +58 -58
  49. package/dist/{nylas-open-hours-picker.entry-2c19643f.cjs → nylas-open-hours-picker.entry-aa103daf.cjs} +1 -1
  50. package/dist/{nylas-provider.entry-87fa9276.cjs → nylas-provider.entry-5bb55b2d.cjs} +1 -1
  51. package/dist/{nylas-provider.entry-2cfe5f0e.js → nylas-provider.entry-b94198a1.js} +7 -7
  52. package/dist/nylas-scheduler.entry-3b7cb841.js +230 -0
  53. package/dist/nylas-scheduler.entry-ea6fb146.cjs +1 -0
  54. package/dist/{nylas-threads-refresh.entry-6d61a689.cjs → nylas-threads-refresh.entry-4002608b.cjs} +1 -1
  55. package/dist/{nylas-threads-refresh.entry-9111a403.js → nylas-threads-refresh.entry-7d567ed1.js} +4 -4
  56. package/dist/nylas-threads-search.entry-556f1219.cjs +1 -0
  57. package/dist/{nylas-threads-search.entry-2124f663.js → nylas-threads-search.entry-c881d54b.js} +12 -12
  58. package/dist/{nylas-view-thread.entry-4ecbcd78.cjs → nylas-view-thread.entry-6faf1b51.cjs} +1 -1
  59. package/dist/{nylas-view-thread.entry-fe51c1f6.js → nylas-view-thread.entry-d8de6c83.js} +3 -3
  60. package/dist/play-icon_2.entry-2e21b8b9.cjs +1 -0
  61. package/dist/play-icon_2.entry-cae94826.js +25 -0
  62. package/dist/react.cjs +1 -1
  63. package/dist/react.js +57 -53
  64. package/dist/{refresh-icon.entry-9f24e833.cjs → refresh-icon.entry-3e0aef26.cjs} +1 -1
  65. package/dist/{refresh-icon.entry-4ddd53b0.js → refresh-icon.entry-9563850b.js} +4 -4
  66. package/dist/{register-component-55376f31-5eaf8954.js → register-component-152c6ad2-418db864.js} +1 -1
  67. package/dist/{register-component-55376f31-8d6ddee4.cjs → register-component-152c6ad2-b0d34c36.cjs} +1 -1
  68. package/dist/scheduler-store-7d48e682-39104219.js +289 -0
  69. package/dist/scheduler-store-7d48e682-449277d4.cjs +1 -0
  70. package/dist/search-icon_3.entry-9b027cfc.cjs +1 -0
  71. package/dist/search-icon_3.entry-e36548ec.js +101 -0
  72. package/package.json +1 -1
  73. package/dist/chevron-icon.entry-60842fb6.js +0 -15
  74. package/dist/chevron-icon.entry-97e4621e.cjs +0 -1
  75. package/dist/close-icon_2.entry-ef03bd27.js +0 -25
  76. package/dist/index-29d0e781.cjs +0 -30
  77. package/dist/loading-icon.entry-b2534e3e.cjs +0 -1
  78. package/dist/nylas-scheduler.entry-6ec8e574.js +0 -195
  79. package/dist/nylas-scheduler.entry-b41cbf99.cjs +0 -1
  80. package/dist/nylas-threads-search.entry-03073490.cjs +0 -1
  81. package/dist/play-icon_2.entry-8e156535.js +0 -25
  82. package/dist/play-icon_2.entry-cf1cbc8d.cjs +0 -1
  83. package/dist/property-0065dde7-83dc9cc4.cjs +0 -23
  84. package/dist/property-0065dde7-c57b8fa3.js +0 -589
  85. package/dist/scheduler-store-5a39585a-117668e3.js +0 -173
  86. package/dist/scheduler-store-5a39585a-2c848bec.cjs +0 -1
  87. package/dist/translate-icon.entry-0cd24de4.cjs +0 -1
  88. package/dist/translate-icon.entry-db2cdf1d.js +0 -15
@@ -1,3 +1,3 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const f=require("./index-29d0e781.cjs"),y=require("./utils-5074a070-d5ba6add.cjs"),yn=require("./register-component-55376f31-8d6ddee4.cjs"),En=require("./_commonjsHelpers-57e89916-4a3ae7d8.cjs");require("react");require("react-dom");const Tn=".sc-forward-icon-h{display:flex}",An=Tn,Ct=class{constructor(t){f.registerInstance(this,t),this.width="15",this.height="15"}render(){return f.h("svg",{key:"4f51b5a4b2779e9877ce09164250017619114cb0",fill:"auto",width:this.width,height:this.height,viewBox:"0 0 1920 1920",xmlns:"http://www.w3.org/2000/svg"},f.h("path",{key:"b2f1b016bdaef66b1c014791dd681fdfbdb3a160",d:"m1246.246 64-90.496 90.496 477.952 477.952h-590.848C467.878 632.448.038 1100.416.038 1675.392v109.056h128v-109.056c0-504.576 410.368-914.944 914.816-914.944h590.848l-477.952 478.08 90.496 90.496 632.448-632.576L1246.246 64Z","fill-rule":"evenodd"}))}};Ct.style=An;const _n=':host{display:grid;color:var(--nylas-color-primary-900)}.editor{position:relative;display:block;max-height:300px;overflow:auto;padding:1rem;border:1px solid var(--nylas-color-primary-300)}.editor blockquote{visibility:hidden;overflow:hidden;position:relative;transition:height 0.3s ease;margin:0}.editor blockquote::before{content:"...";visibility:visible;opacity:1;position:absolute;top:0;left:0;background-color:var(--nylas-color-primary-300);width:20px;text-align:center;color:var(--nylas-color-primary-800);vertical-align:middle;display:flex;justify-content:center;align-items:center;align-self:center;cursor:pointer}.editor .collapsed{height:20px}.editor .expanded{visibility:visible;opacity:1;height:auto;margin:0px 0px 0px 0.8ex;border-left:1px solid var(--nylas-color-primary-300);padding-left:1rem}.editor .expanded::before{display:none;}.buttons{display:flex;margin-top:1rem;justify-content:space-between}.buttons sp-button{border-radius:var(--nylas-border-radius);background-color:var(--nylas-color-primary-400);color:var(--nylas-color-primary-900);fill:var(--nylas-color-primary-900)}.buttons sp-button:hover{background-color:var(--nylas-color-primary-500)}.buttons sp-button:disabled{background-color:var(--nylas-color-primary-200);color:var(--nylas-color-primary-600);cursor:not-allowed}.buttons sp-button chevron-icon{display:inline-block}.buttons .close{justify-self:end}.toolbar{position:absolute;display:none;background-color:var(--nylas-color-primary-200);border-radius:var(--nylas-border-radius);z-index:1}.toolbar sp-button{border:0}',wn=_n,Lt=class{constructor(t){f.registerInstance(this,t),this.close=f.createEvent(this,"close",7),this.send=f.createEvent(this,"send",7),this.closeComposer=o=>{this.close.emit(o)},this.sendComposer=o=>{var s;if(!this.editorEl){y.debug("no editor element");return}const u=this.editorEl.querySelector(".message-body");if(!u){y.debug("no message body");return}this.message&&(this.send.emit({message:this.message,replyBody:((s=u.querySelector(".message-body"))==null?void 0:s.innerHTML)||""}),this.close.emit(o),this.editorEl.innerHTML="")},this.message=void 0,this.viewEmailElement=void 0}connectedCallback(){}disconnectedCallback(){this.editorEl&&(this.editorEl.innerHTML="")}componentWillLoad(){}async componentDidLoad(){if(this.message&&this.watchBody(this.message),!this.editorEl){y.debug("[connectedCallback] no editor element");return}if(!this.toolbarEl){y.debug("[connectedCallback] no toolbar element");return}const t=this.editorEl,o=this.toolbarEl;t.addEventListener("mouseup",u=>{var W;const s=(W=this.host.shadowRoot)==null?void 0:W.getSelection();if(!s){y.debug("no selection");return}const p=s.getRangeAt(0),r=s.toString();if(!r){o.style.display="none";return}const m=t.querySelector(".message-body");if(!m){y.debug("no message body");return}const l=p.commonAncestorContainer.parentElement;if(!l)return;const T=m.getBoundingClientRect();y.debug("messageBodyRect",{messageBodyRect:T});const _=l.getBoundingClientRect();y.debug("foundRect",{foundRect:_});const ce=(l.childNodes[0].textContent||"").indexOf(r),q=window.getComputedStyle(l).fontSize,X=parseInt(q.replace("px",""),10),ne=_.top-T.top-o.clientHeight,ye=ce*(1/X)*100;o.style.top=`${ne}px`,o.style.left=`${ye}px`,o.style.display="block"})}watchBody(t){var r;if(!this.editorEl){y.debug("no editor element");return}this.editorEl.querySelectorAll(".message-body").forEach(m=>m.remove());const o=document.createElement("div");o.classList.add("message-body");const u=document.createElement("p");u.innerHTML="&nbsp;",o.appendChild(u);const s=document.createElement("br");o.appendChild(s);const p=document.createElement("div");if(p.classList.add("reply-text"),p.innerText=`On ${new Date(t.date*1e3).toLocaleDateString(void 0,{dateStyle:"full"})} <${(r=t.from)==null?void 0:r.map(m=>m.name||m.email).join(", ")}> wrote:`,o.appendChild(p),t.body){const m=document.createElement("html");m.innerHTML=t.body;const i=document.createElement("blockquote");i.classList.add("collapsed"),i.classList.add("gmail_quote"),i.innerHTML=m.innerHTML,o.appendChild(i),y.debug("replyContainer",{replyContainer:i})}this.editorEl.appendChild(o),this.editorEl.querySelectorAll("blockquote.collapsed").forEach(m=>{m.addEventListener("click",function(i){i.preventDefault();const l=i.target;l.classList.remove("collapsed"),l.classList.add("expanded")},{once:!0})}),this.editorEl.focus()}render(){return f.h(f.Host,{key:"a1e6e146356d27b4612c1381a051e421468016f9"},f.h("sp-theme",{key:"a55f43e956e35a41e0854b7653f3eaa0472e4603",scale:"medium",color:"dark"},f.h("div",{key:"dca393d6d4cae7d64630c2e684fa403638135aab",class:"editor",contentEditable:!0,ref:t=>this.editorEl=t},f.h("div",{key:"e77b4c9ea8b843cb15ebe92b49120bcf7b6a7ce4",class:"toolbar",ref:t=>this.toolbarEl=t,contentEditable:!1},f.h("sp-button",{key:"0b825b12e643a37c4e746eec4fc51608f576a58b",quiet:!0,onClick:()=>document.execCommand("bold")},f.h("div",{key:"95051b6e9b07e9792e180e09a0ca74c834a6f6c8",slot:"icon"},f.h("bold-icon",{key:"6f33cd1e9525984d8c9b001f2b3a114bf08ec9a5"})),f.h("div",{key:"250323dfd86467b528903b7cdbfc704efffcc789",slot:"label"},"Bold")),f.h("sp-button",{key:"af4d4302617dd0ee1ad3d50161e4a019e4fbc1e7",quiet:!0,onClick:()=>document.execCommand("underline")},f.h("div",{key:"aa2e4a6c9be743d228b5ebc7a8c59d59cbed5b2c",slot:"icon"},f.h("underline-icon",{key:"6833ead83e35cd0b07c0c88b81be3446d3efd824"})),f.h("div",{key:"1c18f62267adfa70e176efed64f745dd202c0230",slot:"label"},"Underline")),f.h("sp-button",{key:"08139372218452b7b83aa9580cb9a797106b189f",quiet:!0,onClick:()=>document.execCommand("italic")},f.h("div",{key:"bd439d444ae836a0c612e57f92b7c0e303ff732a",slot:"icon"},f.h("italic-icon",{key:"c25d86181198e1f1b176caad9ccfc0ecd5653c15"})),f.h("div",{key:"c6231490b7c86113f8dbcfc8386ec5581f6b2a3a",slot:"label"},"Italic")))),f.h("div",{key:"95921362af8283ee5d04cf17faf4c8b5725ba7bd",class:"buttons"},f.h("sp-button",{key:"6c21a44e39720b78fddda544d3b3e3dd2597d9c3",onClick:this.sendComposer,class:"send"},"Send"),f.h("sp-button",{key:"2d0354668c676f6e723be1f0e9614cff6120d361",onClick:this.closeComposer,class:"close"},"Close"))))}get host(){return f.getElement(this)}static get watchers(){return{message:["watchBody"]}}};Lt.style=wn;const vn=":host{display:block}sp-button{padding:0;border:0;border-radius:var(--nylas-border-radius);min-block-size:50%;min-inline-size:2rem;background-color:var(--nylas-color-primary-300);fill:var(--nylas-color-primary-800)}sp-button:hover{background-color:var(--nylas-color-primary-400)}.summarize-button.stopped{animation:none}.summarize-button.playing{animation:pulse 2s infinite}.summarize-button.loading{display:flex;align-content:center;height:1.5rem;width:2rem;vertical-align:middle;animation:pulse 2s infinite;flex-wrap:wrap}.summarize-button.loading loading-icon{--dot-color:var(--nylas-color-primary-600)}@keyframes pulse{0%{transform:scale(1);box-shadow:0 0 0 0 var(--nylas-color-primary-300)}70%{transform:scale(1.05);box-shadow:0 0 0 10px rgba(255, 69, 0, 0)}100%{transform:scale(1);box-shadow:0 0 0 0 rgba(255, 69, 0, 0)}}@keyframes wave{0%{transform:translateX(0)}50%{transform:translateX(100%)}100%{transform:translateX(0)}}",Sn=vn;var Cn=function(t,o,u,s){var p=arguments.length,r=p<3?o:s===null?s=Object.getOwnPropertyDescriptor(o,u):s,m;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(t,o,u,s);else for(var i=t.length-1;i>=0;i--)(m=t[i])&&(r=(p<3?m(r):p>3?m(o,u,r):m(o,u))||r);return p>3&&r&&Object.defineProperty(o,u,r),r},Fe=function(t,o){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(t,o)};const We=class{constructor(t){f.registerInstance(this,t),this.summarize=f.createEvent(this,"summarize",7),this.abortController=new AbortController,this.onClick=async o=>{var u,s;o.preventDefault(),o.stopPropagation(),this.state==="stopped"?this.message&&(this.abortController=new AbortController,this.summarize.emit({abortController:this.abortController,playAudio:this.playAudio,message:this.message,updateState:this.updateState}).defaultPrevented||(y.debug("[nylas-summarize-message-button] Default event not prevented, summarizing message"),this.audioRef&&(await this.audioRef.play().then(()=>{var r;return(r=this.audioRef)==null?void 0:r.pause()}).catch(r=>console.error("Error playing audio:",r)),await this.audioRef.play().catch(r=>console.error("Error playing audio:",r))))):this.state==="playing"?((u=this.abortController)==null||u.abort(),(s=this.audioRef)==null||s.pause()):this.state="stopped"},this.message=void 0,this.state="stopped",this.playAudio=this.playAudio.bind(this),this.updateState=this.updateState.bind(this)}connectedCallback(){}disconnectedCallback(){}async componentWillLoad(){y.debug("[nylas-summarize-message-button] Component will load")}async componentDidLoad(){y.debug("[nylas-summarize-message-button] Component did load")}async updateState(t){this.state=t}async playAudio(t){if(!this.audioRef){this.state="stopped";return}if(!t){this.state="stopped";return}const o=this.audioRef;if(!("MediaSource"in window)){const i=await t;if(i==null)throw new Error("ReadableStream not yet supported in this browser.");const l=i.getReader(),T=[];await this.readChunk(l,T);const _=new Blob(T,{type:"audio/mpeg"}),N=URL.createObjectURL(_);o.src=N;return}const u=new MediaSource;let s,p=!1;o.src=URL.createObjectURL(u),u.addEventListener("sourceopen",r);async function r(){s=u.addSourceBuffer("audio/mpeg"),s.addEventListener("updateend",m);const i=await t;if(i==null)throw new Error("ReadableStream not yet supported in this browser.");const l=i.getReader(),T=()=>{l.read().then(({done:_,value:N})=>{if(_){p=!0;return}s.updating||s.appendBuffer(N),T()}).catch(_=>{console.error("Error while fetching and appending chunks:",_)})};T(),o.paused&&o.play().catch(_=>console.error("Error playing audio:",_))}function m(){if(p){u.endOfStream(),u.removeEventListener("sourceopen",r),u.removeEventListener("sourceclose",()=>{y.debug("[nylas-summarize-message-button] Source closed")}),s.removeEventListener("updateend",m);return}}}async readChunk(t,o){return t.read().then(({done:u,value:s})=>u?o:(o.push(s),this.readChunk(t,o)))}render(){return f.h(f.Host,{key:"507fa8a1d6570be296501c8e154ef8b85cda0871"},f.h("sp-theme",{key:"2db0d8c57e95c758f240a0e9328c26ec4e3d2e77",scale:"medium",color:"dark"},f.h("sp-button",{key:"df8bb0eb9069456125bd570eb280f018e0ebb9e3",label:"Summarize email","icon-only":!0,onClickCapture:this.onClick,class:{"summarize-button":!0,stopped:this.state==="stopped",loading:this.state==="loading",playing:this.state==="playing"}},this.state==="stopped"&&f.h("play-icon",null),this.state==="loading"&&f.h("loading-icon",null),this.state==="playing"&&f.h("stop-icon",null)),f.h("audio",{key:"3bc2427c264410ae9c68f1aec3d3b0c675ae108b",ref:t=>this.audioRef=t,autoPlay:!0,onPlaying:()=>this.state="playing",onPause:()=>this.state="stopped",onEnded:()=>{this.state="stopped",y.debug("[nylas-summarize-message-button] Audio ended")}})))}};Cn([yn.RegisterComponent({name:"nylas-summarize-message-button",eventToProps:{summarize:async(t,o)=>{const{playAudio:u,updateState:s,abortController:p,message:r}=t.detail,m=y.htmlToPlainText(r.body||"");await s("loading");try{const i=await o.messages.summarizeText(m),l=o.messages.textToSpeech(i,p);await u(l)}catch(i){await s("stopped"),console.error("Error summarizing message:",i)}}},fireRegisterEvent:!0}),Fe("design:type",Function),Fe("design:paramtypes",[]),Fe("design:returntype",void 0)],We.prototype,"render",null);We.style=Sn;function P(t){return!window.matchMedia("(prefers-color-scheme: dark)").matches||!t?t:t==="transparent"?"color":t.startsWith("#")?Ln(t):t.startsWith("rgb")?Rt(t):t.startsWith("hsl")?Rn(t):kn(t)?Mn(t):t}function Ln(t){t.length<7&&(t="#"+t[1]+t[1]+t[2]+t[2]+t[3]+t[3]);const o=(255-parseInt(t.slice(1,3),16)).toString(16).padStart(2,"0"),u=(255-parseInt(t.slice(3,5),16)).toString(16).padStart(2,"0"),s=(255-parseInt(t.slice(5,7),16)).toString(16).padStart(2,"0");return`#${o}${u}${s}`}function Rt(t){var r;const o=(r=t.match(/\d+/g))==null?void 0:r.map(Number);if(!o)return t;const[u,s,p]=o;return`rgb(${255-u}, ${255-s}, ${255-p})`}function Rn(t){var r;const o=(r=t.match(/\d+\.?\d*/g))==null?void 0:r.map(Number);if(!o)return t;const[u,s,p]=o;return`hsl(${u}, ${s}%, ${100-p}%)`}function kn(t){return/^[a-z]+$/i.test(t)}function Mn(t){return Rt(Nn(t))}function Nn(t){return t.toLowerCase()==="red"?"rgb(255, 0, 0)":"rgb(0, 0, 0)"}function St(t){if(t instanceof HTMLStyleElement){let o=t.textContent;if(o){o=o.replaceAll(/@media\s*\(prefers-color-scheme:\s*(dark|light)\)\s*\{([^}]+)\}/g,"");const u=o.matchAll(/border-color:\s*([^;]+)/g);if(u)for(const i of u){const[l,T]=i,_=l.replace(/[-/\\^$*+?.()|[\]{}]/g,"\\$&");o=o.replaceAll(_,l.replace(T,P(T)))}const s=o.matchAll(/border:\s*([^;]+)/g);if(s)for(const i of s){const l=i[0].trim(),T=l.replace(/[-/\\^$*+?.()|[\]{}]/g,"\\$&"),[_,N,U]=i[1].split(" ");o=o.replaceAll(T,l.replace(U,P(U)))}const p=o.matchAll(/background-color:\s*([^;]+)/g);if(p)for(const i of p){const[l,T]=i,_=l.replace(/[-/\\^$*+?.()|[\]{}]/g,"\\$&");o=o.replaceAll(_,l.replace(T,P(T))),y.debug("backgroundColor",{fullMatch:l,replace:l.replace(T,P(T)),color:T,invertColor:P(T)})}const r=o.matchAll(/background:\s*([^;]+)/g);if(r)for(const i of r){const l=i[0].trim(),T=l.replace(/[-/\\^$*+?.()|[\]{}]/g,"\\$&"),[_,N,U]=i[1].split(" ");o=o.replaceAll(T,l.replace(U,P(U)))}const m=o.matchAll(/color:\s*([^;]+)/g);if(m)for(const i of m){const[l,T]=i,_=l.replace(/[-/\\^$*+?.()|[\]{}]/g,"\\$&");o=o.replaceAll(_,l.replace(T,P(T)))}t.textContent=o}}if(t instanceof HTMLElement){const o=window.getComputedStyle(t),u=o.color||t.style.color,s=o.backgroundColor||t.style.backgroundColor,p=o.borderColor||t.style.borderColor;u&&!s?t.style.color="":u&&s?(t.style.color=P(u),t.style.backgroundColor=P(s),y.debug("element",t),y.debug("computedStyle.color",u),y.debug("computedStyle.backgroundColor",s),y.debug("invertColor(color)",P(u)),y.debug("invertColor(backgroundColor)",P(s))):!u&&s&&(t.style.backgroundColor=""),p&&(y.debug("borderColor",p),t.style.borderColor=P(p)),t.hasAttribute("bgcolor")&&t.removeAttribute("bgcolor")}}function xn(t){St(t),t.querySelectorAll("*").forEach(u=>St(u))}var kt={exports:{}};/*! @license DOMPurify 3.0.8 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.0.8/LICENSE */(function(t,o){(function(u,s){t.exports=s()})(En.commonjsGlobal,function(){const{entries:u,setPrototypeOf:s,isFrozen:p,getPrototypeOf:r,getOwnPropertyDescriptor:m}=Object;let{freeze:i,seal:l,create:T}=Object,{apply:_,construct:N}=typeof Reflect<"u"&&Reflect;i||(i=function(c){return c}),l||(l=function(c){return c}),_||(_=function(c,E,g){return c.apply(E,g)}),N||(N=function(c,E){return new c(...E)});const U=I(Array.prototype.forEach),ce=I(Array.prototype.pop),q=I(Array.prototype.push),X=I(String.prototype.toLowerCase),ne=I(String.prototype.toString),ye=I(String.prototype.match),W=I(String.prototype.replace),Dt=I(String.prototype.indexOf),Ot=I(String.prototype.trim),O=I(RegExp.prototype.test),oe=It(TypeError);function I(b){return function(c){for(var E=arguments.length,g=new Array(E>1?E-1:0),k=1;k<E;k++)g[k-1]=arguments[k];return _(b,c,g)}}function It(b){return function(){for(var c=arguments.length,E=new Array(c),g=0;g<c;g++)E[g]=arguments[g];return N(b,E)}}function h(b,c){let E=arguments.length>2&&arguments[2]!==void 0?arguments[2]:X;s&&s(b,null);let g=c.length;for(;g--;){let k=c[g];if(typeof k=="string"){const H=E(k);H!==k&&(p(c)||(c[g]=H),k=H)}b[k]=!0}return b}function Pt(b){for(let c=0;c<b.length;c++)m(b,c)===void 0&&(b[c]=null);return b}function G(b){const c=T(null);for(const[E,g]of u(b))m(b,E)!==void 0&&(Array.isArray(g)?c[E]=Pt(g):g&&typeof g=="object"&&g.constructor===Object?c[E]=G(g):c[E]=g);return c}function de(b,c){for(;b!==null;){const g=m(b,c);if(g){if(g.get)return I(g.get);if(typeof g.value=="function")return I(g.value)}b=r(b)}function E(g){return console.warn("fallback value for",g),null}return E}const qe=i(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","section","select","shadow","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),Ee=i(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","filter","font","g","glyph","glyphref","hkern","image","line","lineargradient","marker","mask","metadata","mpath","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),Te=i(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),Ut=i(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),Ae=i(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),zt=i(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),Ge=i(["#text"]),$e=i(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","face","for","headers","height","hidden","high","href","hreflang","id","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","pattern","placeholder","playsinline","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","xmlns","slot"]),_e=i(["accent-height","accumulate","additive","alignment-baseline","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),Ye=i(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),ue=i(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),Ht=l(/\{\{[\w\W]*|[\w\W]*\}\}/gm),Ft=l(/<%[\w\W]*|[\w\W]*%>/gm),Bt=l(/\${[\w\W]*}/gm),Wt=l(/^data-[\-\w.\u00B7-\uFFFF]/),qt=l(/^aria-[\-\w]+$/),je=l(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),Gt=l(/^(?:\w+script|data):/i),$t=l(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),Xe=l(/^html$/i);var Ve=Object.freeze({__proto__:null,MUSTACHE_EXPR:Ht,ERB_EXPR:Ft,TMPLIT_EXPR:Bt,DATA_ATTR:Wt,ARIA_ATTR:qt,IS_ALLOWED_URI:je,IS_SCRIPT_OR_DATA:Gt,ATTR_WHITESPACE:$t,DOCTYPE_NAME:Xe});const Yt=function(){return typeof window>"u"?null:window},jt=function(c,E){if(typeof c!="object"||typeof c.createPolicy!="function")return null;let g=null;const k="data-tt-policy-suffix";E&&E.hasAttribute(k)&&(g=E.getAttribute(k));const H="dompurify"+(g?"#"+g:"");try{return c.createPolicy(H,{createHTML(V){return V},createScriptURL(V){return V}})}catch{return console.warn("TrustedTypes policy "+H+" could not be created."),null}};function Ze(){let b=arguments.length>0&&arguments[0]!==void 0?arguments[0]:Yt();const c=d=>Ze(d);if(c.version="3.0.8",c.removed=[],!b||!b.document||b.document.nodeType!==9)return c.isSupported=!1,c;let{document:E}=b;const g=E,k=g.currentScript,{DocumentFragment:H,HTMLTemplateElement:V,Node:we,Element:Ke,NodeFilter:ve,NamedNodeMap:Vt=b.NamedNodeMap||b.MozNamedAttrMap,HTMLFormElement:Zt,DOMParser:Kt,trustedTypes:fe}=b,me=Ke.prototype,Qt=de(me,"cloneNode"),Jt=de(me,"nextSibling"),en=de(me,"childNodes"),Se=de(me,"parentNode");if(typeof V=="function"){const d=E.createElement("template");d.content&&d.content.ownerDocument&&(E=d.content.ownerDocument)}let M,ie="";const{implementation:Ce,createNodeIterator:tn,createDocumentFragment:nn,getElementsByTagName:on}=E,{importNode:rn}=g;let z={};c.isSupported=typeof u=="function"&&typeof Se=="function"&&Ce&&Ce.createHTMLDocument!==void 0;const{MUSTACHE_EXPR:Le,ERB_EXPR:Re,TMPLIT_EXPR:ke,DATA_ATTR:an,ARIA_ATTR:sn,IS_SCRIPT_OR_DATA:ln,ATTR_WHITESPACE:Qe}=Ve;let{IS_ALLOWED_URI:Je}=Ve,v=null;const et=h({},[...qe,...Ee,...Te,...Ae,...Ge]);let S=null;const tt=h({},[...$e,..._e,...Ye,...ue]);let w=Object.seal(T(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),re=null,Me=null,nt=!0,Ne=!0,ot=!1,it=!0,Z=!1,$=!1,xe=!1,De=!1,K=!1,pe=!1,he=!1,rt=!0,at=!1;const cn="user-content-";let Oe=!0,ae=!1,Q={},J=null;const st=h({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);let lt=null;const ct=h({},["audio","video","img","source","image","track"]);let Ie=null;const dt=h({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),ge="http://www.w3.org/1998/Math/MathML",be="http://www.w3.org/2000/svg",F="http://www.w3.org/1999/xhtml";let ee=F,Pe=!1,Ue=null;const dn=h({},[ge,be,F],ne);let se=null;const un=["application/xhtml+xml","text/html"],fn="text/html";let C=null,te=null;const mn=E.createElement("form"),ut=function(e){return e instanceof RegExp||e instanceof Function},ze=function(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!(te&&te===e)){if((!e||typeof e!="object")&&(e={}),e=G(e),se=un.indexOf(e.PARSER_MEDIA_TYPE)===-1?fn:e.PARSER_MEDIA_TYPE,C=se==="application/xhtml+xml"?ne:X,v="ALLOWED_TAGS"in e?h({},e.ALLOWED_TAGS,C):et,S="ALLOWED_ATTR"in e?h({},e.ALLOWED_ATTR,C):tt,Ue="ALLOWED_NAMESPACES"in e?h({},e.ALLOWED_NAMESPACES,ne):dn,Ie="ADD_URI_SAFE_ATTR"in e?h(G(dt),e.ADD_URI_SAFE_ATTR,C):dt,lt="ADD_DATA_URI_TAGS"in e?h(G(ct),e.ADD_DATA_URI_TAGS,C):ct,J="FORBID_CONTENTS"in e?h({},e.FORBID_CONTENTS,C):st,re="FORBID_TAGS"in e?h({},e.FORBID_TAGS,C):{},Me="FORBID_ATTR"in e?h({},e.FORBID_ATTR,C):{},Q="USE_PROFILES"in e?e.USE_PROFILES:!1,nt=e.ALLOW_ARIA_ATTR!==!1,Ne=e.ALLOW_DATA_ATTR!==!1,ot=e.ALLOW_UNKNOWN_PROTOCOLS||!1,it=e.ALLOW_SELF_CLOSE_IN_ATTR!==!1,Z=e.SAFE_FOR_TEMPLATES||!1,$=e.WHOLE_DOCUMENT||!1,K=e.RETURN_DOM||!1,pe=e.RETURN_DOM_FRAGMENT||!1,he=e.RETURN_TRUSTED_TYPE||!1,De=e.FORCE_BODY||!1,rt=e.SANITIZE_DOM!==!1,at=e.SANITIZE_NAMED_PROPS||!1,Oe=e.KEEP_CONTENT!==!1,ae=e.IN_PLACE||!1,Je=e.ALLOWED_URI_REGEXP||je,ee=e.NAMESPACE||F,w=e.CUSTOM_ELEMENT_HANDLING||{},e.CUSTOM_ELEMENT_HANDLING&&ut(e.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(w.tagNameCheck=e.CUSTOM_ELEMENT_HANDLING.tagNameCheck),e.CUSTOM_ELEMENT_HANDLING&&ut(e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(w.attributeNameCheck=e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),e.CUSTOM_ELEMENT_HANDLING&&typeof e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements=="boolean"&&(w.allowCustomizedBuiltInElements=e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),Z&&(Ne=!1),pe&&(K=!0),Q&&(v=h({},Ge),S=[],Q.html===!0&&(h(v,qe),h(S,$e)),Q.svg===!0&&(h(v,Ee),h(S,_e),h(S,ue)),Q.svgFilters===!0&&(h(v,Te),h(S,_e),h(S,ue)),Q.mathMl===!0&&(h(v,Ae),h(S,Ye),h(S,ue))),e.ADD_TAGS&&(v===et&&(v=G(v)),h(v,e.ADD_TAGS,C)),e.ADD_ATTR&&(S===tt&&(S=G(S)),h(S,e.ADD_ATTR,C)),e.ADD_URI_SAFE_ATTR&&h(Ie,e.ADD_URI_SAFE_ATTR,C),e.FORBID_CONTENTS&&(J===st&&(J=G(J)),h(J,e.FORBID_CONTENTS,C)),Oe&&(v["#text"]=!0),$&&h(v,["html","head","body"]),v.table&&(h(v,["tbody"]),delete re.tbody),e.TRUSTED_TYPES_POLICY){if(typeof e.TRUSTED_TYPES_POLICY.createHTML!="function")throw oe('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof e.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw oe('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');M=e.TRUSTED_TYPES_POLICY,ie=M.createHTML("")}else M===void 0&&(M=jt(fe,k)),M!==null&&typeof ie=="string"&&(ie=M.createHTML(""));i&&i(e),te=e}},ft=h({},["mi","mo","mn","ms","mtext"]),mt=h({},["foreignobject","desc","title","annotation-xml"]),pn=h({},["title","style","font","a","script"]),pt=h({},[...Ee,...Te,...Ut]),ht=h({},[...Ae,...zt]),hn=function(e){let n=Se(e);(!n||!n.tagName)&&(n={namespaceURI:ee,tagName:"template"});const a=X(e.tagName),A=X(n.tagName);return Ue[e.namespaceURI]?e.namespaceURI===be?n.namespaceURI===F?a==="svg":n.namespaceURI===ge?a==="svg"&&(A==="annotation-xml"||ft[A]):!!pt[a]:e.namespaceURI===ge?n.namespaceURI===F?a==="math":n.namespaceURI===be?a==="math"&&mt[A]:!!ht[a]:e.namespaceURI===F?n.namespaceURI===be&&!mt[A]||n.namespaceURI===ge&&!ft[A]?!1:!ht[a]&&(pn[a]||!pt[a]):!!(se==="application/xhtml+xml"&&Ue[e.namespaceURI]):!1},Y=function(e){q(c.removed,{element:e});try{e.parentNode.removeChild(e)}catch{e.remove()}},He=function(e,n){try{q(c.removed,{attribute:n.getAttributeNode(e),from:n})}catch{q(c.removed,{attribute:null,from:n})}if(n.removeAttribute(e),e==="is"&&!S[e])if(K||pe)try{Y(n)}catch{}else try{n.setAttribute(e,"")}catch{}},gt=function(e){let n=null,a=null;if(De)e="<remove></remove>"+e;else{const R=ye(e,/^[\r\n\t ]+/);a=R&&R[0]}se==="application/xhtml+xml"&&ee===F&&(e='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+e+"</body></html>");const A=M?M.createHTML(e):e;if(ee===F)try{n=new Kt().parseFromString(A,se)}catch{}if(!n||!n.documentElement){n=Ce.createDocument(ee,"template",null);try{n.documentElement.innerHTML=Pe?ie:A}catch{}}const L=n.body||n.documentElement;return e&&a&&L.insertBefore(E.createTextNode(a),L.childNodes[0]||null),ee===F?on.call(n,$?"html":"body")[0]:$?n.documentElement:L},bt=function(e){return tn.call(e.ownerDocument||e,e,ve.SHOW_ELEMENT|ve.SHOW_COMMENT|ve.SHOW_TEXT,null)},gn=function(e){return e instanceof Zt&&(typeof e.nodeName!="string"||typeof e.textContent!="string"||typeof e.removeChild!="function"||!(e.attributes instanceof Vt)||typeof e.removeAttribute!="function"||typeof e.setAttribute!="function"||typeof e.namespaceURI!="string"||typeof e.insertBefore!="function"||typeof e.hasChildNodes!="function")},yt=function(e){return typeof we=="function"&&e instanceof we},B=function(e,n,a){z[e]&&U(z[e],A=>{A.call(c,n,a,te)})},Et=function(e){let n=null;if(B("beforeSanitizeElements",e,null),gn(e))return Y(e),!0;const a=C(e.nodeName);if(B("uponSanitizeElement",e,{tagName:a,allowedTags:v}),e.hasChildNodes()&&!yt(e.firstElementChild)&&O(/<[/\w]/g,e.innerHTML)&&O(/<[/\w]/g,e.textContent))return Y(e),!0;if(!v[a]||re[a]){if(!re[a]&&At(a)&&(w.tagNameCheck instanceof RegExp&&O(w.tagNameCheck,a)||w.tagNameCheck instanceof Function&&w.tagNameCheck(a)))return!1;if(Oe&&!J[a]){const A=Se(e)||e.parentNode,L=en(e)||e.childNodes;if(L&&A){const R=L.length;for(let x=R-1;x>=0;--x)A.insertBefore(Qt(L[x],!0),Jt(e))}}return Y(e),!0}return e instanceof Ke&&!hn(e)||(a==="noscript"||a==="noembed"||a==="noframes")&&O(/<\/no(script|embed|frames)/i,e.innerHTML)?(Y(e),!0):(Z&&e.nodeType===3&&(n=e.textContent,U([Le,Re,ke],A=>{n=W(n,A," ")}),e.textContent!==n&&(q(c.removed,{element:e.cloneNode()}),e.textContent=n)),B("afterSanitizeElements",e,null),!1)},Tt=function(e,n,a){if(rt&&(n==="id"||n==="name")&&(a in E||a in mn))return!1;if(!(Ne&&!Me[n]&&O(an,n))){if(!(nt&&O(sn,n))){if(!S[n]||Me[n]){if(!(At(e)&&(w.tagNameCheck instanceof RegExp&&O(w.tagNameCheck,e)||w.tagNameCheck instanceof Function&&w.tagNameCheck(e))&&(w.attributeNameCheck instanceof RegExp&&O(w.attributeNameCheck,n)||w.attributeNameCheck instanceof Function&&w.attributeNameCheck(n))||n==="is"&&w.allowCustomizedBuiltInElements&&(w.tagNameCheck instanceof RegExp&&O(w.tagNameCheck,a)||w.tagNameCheck instanceof Function&&w.tagNameCheck(a))))return!1}else if(!Ie[n]){if(!O(Je,W(a,Qe,""))){if(!((n==="src"||n==="xlink:href"||n==="href")&&e!=="script"&&Dt(a,"data:")===0&&lt[e])){if(!(ot&&!O(ln,W(a,Qe,"")))){if(a)return!1}}}}}}return!0},At=function(e){return e.indexOf("-")>0},_t=function(e){B("beforeSanitizeAttributes",e,null);const{attributes:n}=e;if(!n)return;const a={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:S};let A=n.length;for(;A--;){const L=n[A],{name:R,namespaceURI:x,value:j}=L,le=C(R);let D=R==="value"?j:Ot(j);if(a.attrName=le,a.attrValue=D,a.keepAttr=!0,a.forceKeepAttr=void 0,B("uponSanitizeAttribute",e,a),D=a.attrValue,a.forceKeepAttr||(He(R,e),!a.keepAttr))continue;if(!it&&O(/\/>/i,D)){He(R,e);continue}Z&&U([Le,Re,ke],vt=>{D=W(D,vt," ")});const wt=C(e.nodeName);if(Tt(wt,le,D)){if(at&&(le==="id"||le==="name")&&(He(R,e),D=cn+D),M&&typeof fe=="object"&&typeof fe.getAttributeType=="function"&&!x)switch(fe.getAttributeType(wt,le)){case"TrustedHTML":{D=M.createHTML(D);break}case"TrustedScriptURL":{D=M.createScriptURL(D);break}}try{x?e.setAttributeNS(x,R,D):e.setAttribute(R,D),ce(c.removed)}catch{}}}B("afterSanitizeAttributes",e,null)},bn=function d(e){let n=null;const a=bt(e);for(B("beforeSanitizeShadowDOM",e,null);n=a.nextNode();)B("uponSanitizeShadowNode",n,null),!Et(n)&&(n.content instanceof H&&d(n.content),_t(n));B("afterSanitizeShadowDOM",e,null)};return c.sanitize=function(d){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=null,a=null,A=null,L=null;if(Pe=!d,Pe&&(d="<!-->"),typeof d!="string"&&!yt(d))if(typeof d.toString=="function"){if(d=d.toString(),typeof d!="string")throw oe("dirty is not a string, aborting")}else throw oe("toString is not a function");if(!c.isSupported)return d;if(xe||ze(e),c.removed=[],typeof d=="string"&&(ae=!1),ae){if(d.nodeName){const j=C(d.nodeName);if(!v[j]||re[j])throw oe("root node is forbidden and cannot be sanitized in-place")}}else if(d instanceof we)n=gt("<!---->"),a=n.ownerDocument.importNode(d,!0),a.nodeType===1&&a.nodeName==="BODY"||a.nodeName==="HTML"?n=a:n.appendChild(a);else{if(!K&&!Z&&!$&&d.indexOf("<")===-1)return M&&he?M.createHTML(d):d;if(n=gt(d),!n)return K?null:he?ie:""}n&&De&&Y(n.firstChild);const R=bt(ae?d:n);for(;A=R.nextNode();)Et(A)||(A.content instanceof H&&bn(A.content),_t(A));if(ae)return d;if(K){if(pe)for(L=nn.call(n.ownerDocument);n.firstChild;)L.appendChild(n.firstChild);else L=n;return(S.shadowroot||S.shadowrootmode)&&(L=rn.call(g,L,!0)),L}let x=$?n.outerHTML:n.innerHTML;return $&&v["!doctype"]&&n.ownerDocument&&n.ownerDocument.doctype&&n.ownerDocument.doctype.name&&O(Xe,n.ownerDocument.doctype.name)&&(x="<!DOCTYPE "+n.ownerDocument.doctype.name+`>
2
- `+x),Z&&U([Le,Re,ke],j=>{x=W(x,j," ")}),M&&he?M.createHTML(x):x},c.setConfig=function(){let d=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};ze(d),xe=!0},c.clearConfig=function(){te=null,xe=!1},c.isValidAttribute=function(d,e,n){te||ze({});const a=C(d),A=C(e);return Tt(a,A,n)},c.addHook=function(d,e){typeof e=="function"&&(z[d]=z[d]||[],q(z[d],e))},c.removeHook=function(d){if(z[d])return ce(z[d])},c.removeHooks=function(d){z[d]&&(z[d]=[])},c.removeAllHooks=function(){z={}},c}var Xt=Ze();return Xt})})(kt);const Be=kt.exports,Dn=":host{display:inline-grid;overflow:hidden;width:100%}.view-email{width:100%}.view-email div.gmail_quote{display:none;color:var(--nylas-color-primary-400)}.view-email div.gmail_quote.show{display:block}.view-email blockquote{border-color:var(--nylas-color-primary-500) !important}.view-email .nylas-view-email-toggle-button{display:flex;justify-content:center;align-items:center;cursor:pointer;background-color:var(--nylas-color-primary-200);color:var(--nylas-color-primary-600);border:0;border-radius:2px;font-size:14px;font-weight:500;line-height:1.5;transition:all 0.2s ease-in-out}.view-email .nylas-view-email-toggle-button:hover{background-color:var(--nylas-color-primary-200);color:var(--nylas-color-primary-600)}",On=Dn;Be.addHook("afterSanitizeAttributes",function(t){"target"in t&&(t.setAttribute("target","_blank"),t.setAttribute("rel","noopener"))});const Mt=class{constructor(t){f.registerInstance(this,t),this.htmlElement=document.createElement("html"),this.setBody=o=>{var p;this.state="loading",this.styles=[],this.hoistedFontURLs=new Map,this.sanitizedBody="",document.querySelectorAll(".nylas-view-email-font").forEach(r=>{r.remove()}),(this.message?y.detectIfMessageIsHTML(this.message):y.detectHTMLOrPlainText(o))||(o=`<html><body>${y.parsePlainTextToHTML(o)}</body></html>`),this.htmlElement.innerHTML=o,this.detectDarkMode&&xn(this.htmlElement),this.htmlElement.querySelectorAll("link").forEach(r=>{if(console.debug(`[nylas-view-email] Hoisting link: ${r.getAttribute("href")}`),r.getAttribute("rel")==="stylesheet"&&r.getAttribute("href")){const m=r.getAttribute("href");if(m){const i=new URL(m,window.location.href);(i.protocol==="https:"||i.protocol==="http:")&&this.hoistedFontURLs.set(i.href,i.href)}}}),this.htmlElement.querySelectorAll("style").forEach(r=>{r.innerHTML.split(`
3
- `).forEach(m=>{const i=m.match(/@import url\((.*)\)/);if(i){const l=new URL(i[1],window.location.href);(l.protocol==="https:"||l.protocol==="http:")&&this.hoistedFontURLs.set(l.href,l.href)}}),r.innerHTML=r.innerHTML.replace("body",":host"),this.styles.push(r),r.remove()}),this.htmlElement.querySelectorAll("a").forEach(r=>{r.setAttribute("target","_blank")});const s=this.htmlElement.querySelector(".gmail_quote");if(s){const r=document.createElement("button");r.classList.add("nylas-view-email-toggle-button"),r.setAttribute("aria-label","Show quoted text"),r.innerText="...",(p=s.parentElement)==null||p.insertBefore(r,s)}this.sanitizedBody=Be.sanitize(this.htmlElement.innerHTML),this.hoistedFontURLs.forEach((r,m)=>{const i=document.createElement("link");i.setAttribute("rel","stylesheet"),i.setAttribute("href",r),i.classList.add("nylas-view-email-font"),document.head.appendChild(i)}),this.state="ready"},this.handleMobileSize=()=>{var u,s,p,r;const o=Math.max(document.documentElement.clientWidth||0,window.innerWidth||0);if(o<=768){const m=(u=this.viewEmailElement)==null?void 0:u.getBoundingClientRect();if(m&&this.viewEmailElement&&this.parent&&m.width>o){const i=this.parent,l=i==null?void 0:i.getBoundingClientRect();y.debug("Parent width:",l==null?void 0:l.width,"Parent height:",l==null?void 0:l.height),y.debug("Parent client width:",i.clientWidth,"Parent client height:",i.clientHeight);const T=l.width/m.width,_=l.height/m.height,N=Math.min(T,_);y.debug("Scale:",N),this.viewEmailElement.style.setProperty("transform",`scale(${N})`),this.viewEmailElement.style.setProperty("transform-origin","top left"),this.viewEmailElement.style.setProperty("height",`${m.height*N}px`)}}else(s=this.viewEmailElement)==null||s.style.removeProperty("transform"),(p=this.viewEmailElement)==null||p.style.removeProperty("transform-origin"),(r=this.viewEmailElement)==null||r.style.removeProperty("height")},this.message=void 0,this.parent=void 0,this.attachments=[],this.detectDarkMode=!0,this.state="loading",this.sanitizedBody="",this.styles=[],this.viewEmailElement=void 0,this.hoistedFontURLs=new Map}connectedCallback(){}disconnectedCallback(){y.debug("[nylas-view-email] Component disconnected"),this.state="loading",this.styles=[],this.hoistedFontURLs=new Map,this.sanitizedBody="",document.querySelectorAll(".nylas-view-email-font").forEach(t=>{t.remove()})}async componentWillLoad(){var t;y.debug("[nylas-view-email] component loaded"),this.setBody(((t=this.message)==null?void 0:t.body)??"")}async componentDidLoad(){y.debug("[nylas-view-thread] Component did load"),this.handleMobileSize()}async messageChanged(){var t;y.debug("[nylas-view-thread] Message changed",{message:this.message}),this.setBody(((t=this.message)==null?void 0:t.body)??"")}handleScroll(){this.handleMobileSize()}viewEmailElementChanged(){var o;const t=(o=this.viewEmailElement)==null?void 0:o.querySelectorAll(".nylas-view-email-toggle-button");t&&t.forEach(u=>{u.addEventListener("click",()=>{var p;const s=(p=this.viewEmailElement)==null?void 0:p.querySelector(".gmail_quote");s&&s.classList.toggle("show")})})}render(){return console.debug("[nylas-view-email] render",{hoistedFontURLs:this.hoistedFontURLs}),f.h(f.Host,{key:"c32409cd5bf30781d0d400103e9715bf48e13b23"},this.state==="loading"&&f.h("div",null,"Loading..."),this.state==="ready"&&f.h(f.Fragment,null,this.styles.map(t=>f.h("style",null,Be.sanitize(t.innerHTML))),f.h("div",{class:"view-email",part:"view-email",innerHTML:this.sanitizedBody,ref:t=>this.viewEmailElement=t})))}get host(){return f.getElement(this)}static get watchers(){return{message:["messageChanged"],viewEmailElement:["viewEmailElementChanged"]}}};Mt.style=On;const In=".sc-reply-all-icon-h{display:flex}",Pn=In,Nt=class{constructor(t){f.registerInstance(this,t),this.width="15",this.height="15"}render(){return f.h("svg",{key:"90b30777b0de1b9622f557cb54af3397458b1599",fill:"auto",width:this.width,height:this.height,viewBox:"0 0 1920 1920",xmlns:"http://www.w3.org/2000/svg"},f.h("path",{key:"4a7b8ec38ab7e5ed3d78d9b7c1c9730e94be8a45",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"}))}};Nt.style=Pn;const Un=".sc-reply-icon-h{display:flex}",zn=Un,xt=class{constructor(t){f.registerInstance(this,t),this.width="15",this.height="15"}render(){return f.h("svg",{key:"d3fe83055b3bb9b88f5347f3bb5d8cec29354dce",fill:"auto",width:this.width,height:this.height,viewBox:"0 0 1920 1920",xmlns:"http://www.w3.org/2000/svg"},f.h("path",{key:"c2082dfa35e4bb43d4e0489243b47b4d08ff34ac",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"}))}};xt.style=zn;exports.forward_icon=Ct;exports.nylas_composer=Lt;exports.nylas_summarize_message_button=We;exports.nylas_view_email=Mt;exports.reply_all_icon=Nt;exports.reply_icon=xt;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const m=require("./index-586a4206.cjs"),y=require("./utils-5074a070-d5ba6add.cjs"),yn=require("./register-component-152c6ad2-b0d34c36.cjs"),En=require("./_commonjsHelpers-57e89916-4a3ae7d8.cjs");require("react");require("react-dom");const Tn=".sc-forward-icon-h{display:flex}",An=Tn,Ct=class{constructor(t){m.registerInstance(this,t),this.width="15",this.height="15"}render(){return m.h("svg",{key:"f6f2a0745a4ea7849081d7ac5d0244ee69d087b7",fill:"auto",width:this.width,height:this.height,viewBox:"0 0 1920 1920",xmlns:"http://www.w3.org/2000/svg"},m.h("path",{key:"484a8d3299af5b6a48929d894214027e3c273fe4",d:"m1246.246 64-90.496 90.496 477.952 477.952h-590.848C467.878 632.448.038 1100.416.038 1675.392v109.056h128v-109.056c0-504.576 410.368-914.944 914.816-914.944h590.848l-477.952 478.08 90.496 90.496 632.448-632.576L1246.246 64Z","fill-rule":"evenodd"}))}};Ct.style=An;const _n=':host{display:grid;color:var(--nylas-color-primary-900)}.editor{position:relative;display:block;max-height:300px;overflow:auto;padding:1rem;border:1px solid var(--nylas-color-primary-300)}.editor blockquote{visibility:hidden;overflow:hidden;position:relative;transition:height 0.3s ease;margin:0}.editor blockquote::before{content:"...";visibility:visible;opacity:1;position:absolute;top:0;left:0;background-color:var(--nylas-color-primary-300);width:20px;text-align:center;color:var(--nylas-color-primary-800);vertical-align:middle;display:flex;justify-content:center;align-items:center;align-self:center;cursor:pointer}.editor .collapsed{height:20px}.editor .expanded{visibility:visible;opacity:1;height:auto;margin:0px 0px 0px 0.8ex;border-left:1px solid var(--nylas-color-primary-300);padding-left:1rem}.editor .expanded::before{display:none;}.buttons{display:flex;margin-top:1rem;justify-content:space-between}.buttons sp-button{border-radius:var(--nylas-border-radius);background-color:var(--nylas-color-primary-400);color:var(--nylas-color-primary-900);fill:var(--nylas-color-primary-900)}.buttons sp-button:hover{background-color:var(--nylas-color-primary-500)}.buttons sp-button:disabled{background-color:var(--nylas-color-primary-200);color:var(--nylas-color-primary-600);cursor:not-allowed}.buttons sp-button chevron-icon{display:inline-block}.buttons .close{justify-self:end}.toolbar{position:absolute;display:none;background-color:var(--nylas-color-primary-200);border-radius:var(--nylas-border-radius);z-index:1}.toolbar sp-button{border:0}',wn=_n,Lt=class{constructor(t){m.registerInstance(this,t),this.close=m.createEvent(this,"close",7),this.send=m.createEvent(this,"send",7),this.closeComposer=o=>{this.close.emit(o)},this.sendComposer=o=>{var s;if(!this.editorEl){y.debug("no editor element");return}const u=this.editorEl.querySelector(".message-body");if(!u){y.debug("no message body");return}this.message&&(this.send.emit({message:this.message,replyBody:((s=u.querySelector(".message-body"))==null?void 0:s.innerHTML)||""}),this.close.emit(o),this.editorEl.innerHTML="")},this.message=void 0,this.viewEmailElement=void 0}connectedCallback(){}disconnectedCallback(){this.editorEl&&(this.editorEl.innerHTML="")}componentWillLoad(){}async componentDidLoad(){if(this.message&&this.watchBody(this.message),!this.editorEl){y.debug("[connectedCallback] no editor element");return}if(!this.toolbarEl){y.debug("[connectedCallback] no toolbar element");return}const t=this.editorEl,o=this.toolbarEl;t.addEventListener("mouseup",u=>{var W;const s=(W=this.host.shadowRoot)==null?void 0:W.getSelection();if(!s){y.debug("no selection");return}const p=s.getRangeAt(0),r=s.toString();if(!r){o.style.display="none";return}const f=t.querySelector(".message-body");if(!f){y.debug("no message body");return}const l=p.commonAncestorContainer.parentElement;if(!l)return;const T=f.getBoundingClientRect();y.debug("messageBodyRect",{messageBodyRect:T});const _=l.getBoundingClientRect();y.debug("foundRect",{foundRect:_});const ce=(l.childNodes[0].textContent||"").indexOf(r),q=window.getComputedStyle(l).fontSize,X=parseInt(q.replace("px",""),10),ne=_.top-T.top-o.clientHeight,ye=ce*(1/X)*100;o.style.top=`${ne}px`,o.style.left=`${ye}px`,o.style.display="block"})}watchBody(t){var r;if(!this.editorEl){y.debug("no editor element");return}this.editorEl.querySelectorAll(".message-body").forEach(f=>f.remove());const o=document.createElement("div");o.classList.add("message-body");const u=document.createElement("p");u.innerHTML="&nbsp;",o.appendChild(u);const s=document.createElement("br");o.appendChild(s);const p=document.createElement("div");if(p.classList.add("reply-text"),p.innerText=`On ${new Date(t.date*1e3).toLocaleDateString(void 0,{dateStyle:"full"})} <${(r=t.from)==null?void 0:r.map(f=>f.name||f.email).join(", ")}> wrote:`,o.appendChild(p),t.body){const f=document.createElement("html");f.innerHTML=t.body;const i=document.createElement("blockquote");i.classList.add("collapsed"),i.classList.add("gmail_quote"),i.innerHTML=f.innerHTML,o.appendChild(i),y.debug("replyContainer",{replyContainer:i})}this.editorEl.appendChild(o),this.editorEl.querySelectorAll("blockquote.collapsed").forEach(f=>{f.addEventListener("click",function(i){i.preventDefault();const l=i.target;l.classList.remove("collapsed"),l.classList.add("expanded")},{once:!0})}),this.editorEl.focus()}render(){return m.h(m.Host,{key:"b25497b478659d675aadb91a6b7e147ff6e5e9b8"},m.h("sp-theme",{key:"dd88253135657e6cda8daf8e71635c16d736a317",scale:"medium",color:"dark"},m.h("div",{key:"f23ecbde8bda95328796f60bc5612cedd30cd488",class:"editor",contentEditable:!0,ref:t=>this.editorEl=t},m.h("div",{key:"871c357e3c095fe2237d228bbaaeb1f5247734b3",class:"toolbar",ref:t=>this.toolbarEl=t,contentEditable:!1},m.h("sp-button",{key:"626560dcbd264b9572be5f7d69268186c8b1a0f6",quiet:!0,onClick:()=>document.execCommand("bold")},m.h("div",{key:"d83785d23518d539064405eb657d9291f76436be",slot:"icon"},m.h("bold-icon",{key:"ce45db34d019a60e3955a3a32335447ae1e27b14"})),m.h("div",{key:"9f05672f538617fbaca46e8287f7e2ebc0909816",slot:"label"},"Bold")),m.h("sp-button",{key:"2906871fa67987ab87a7619b7bb0b9ee09b3dca8",quiet:!0,onClick:()=>document.execCommand("underline")},m.h("div",{key:"b75c2a77ed80693f66b6bddcc9c7af13c474bd7d",slot:"icon"},m.h("underline-icon",{key:"733d5dd3fa2906c9ad4e6a212c3282315290f0bb"})),m.h("div",{key:"f59da34a2ef65a4339a5e5770acd41e1e4c0d4b1",slot:"label"},"Underline")),m.h("sp-button",{key:"5654719682fe352f5a060e1a947d52686dcbb91c",quiet:!0,onClick:()=>document.execCommand("italic")},m.h("div",{key:"650498d94ec07f8fd43d305637f189336aaac2a1",slot:"icon"},m.h("italic-icon",{key:"8f03281a56c6b35f17b7a7f5f10285f3be87d757"})),m.h("div",{key:"03ba08b7ffb8023b44bbd7a107f8767e7430a692",slot:"label"},"Italic")))),m.h("div",{key:"19cd7d52d3f24a440a6b4ae6beb75a680403d94d",class:"buttons"},m.h("sp-button",{key:"dfe307499781aa00e03de3316043a4d47bf349a5",onClick:this.sendComposer,class:"send"},"Send"),m.h("sp-button",{key:"c8d6a72d27723f1c2ac789d0a03d22b14ebfdec6",onClick:this.closeComposer,class:"close"},"Close"))))}get host(){return m.getElement(this)}static get watchers(){return{message:["watchBody"]}}};Lt.style=wn;const vn=":host{display:block}sp-button{padding:0;border:0;border-radius:var(--nylas-border-radius);min-block-size:50%;min-inline-size:2rem;background-color:var(--nylas-color-primary-300);fill:var(--nylas-color-primary-800)}sp-button:hover{background-color:var(--nylas-color-primary-400)}.summarize-button.stopped{animation:none}.summarize-button.playing{animation:pulse 2s infinite}.summarize-button.loading{display:flex;align-content:center;height:1.5rem;width:2rem;vertical-align:middle;animation:pulse 2s infinite;flex-wrap:wrap}.summarize-button.loading loading-icon{--dot-color:var(--nylas-color-primary-600)}@keyframes pulse{0%{transform:scale(1);box-shadow:0 0 0 0 var(--nylas-color-primary-300)}70%{transform:scale(1.05);box-shadow:0 0 0 10px rgba(255, 69, 0, 0)}100%{transform:scale(1);box-shadow:0 0 0 0 rgba(255, 69, 0, 0)}}@keyframes wave{0%{transform:translateX(0)}50%{transform:translateX(100%)}100%{transform:translateX(0)}}",Sn=vn;var Cn=function(t,o,u,s){var p=arguments.length,r=p<3?o:s===null?s=Object.getOwnPropertyDescriptor(o,u):s,f;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(t,o,u,s);else for(var i=t.length-1;i>=0;i--)(f=t[i])&&(r=(p<3?f(r):p>3?f(o,u,r):f(o,u))||r);return p>3&&r&&Object.defineProperty(o,u,r),r},Fe=function(t,o){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(t,o)};const We=class{constructor(t){m.registerInstance(this,t),this.summarize=m.createEvent(this,"summarize",7),this.abortController=new AbortController,this.onClick=async o=>{var u,s;o.preventDefault(),o.stopPropagation(),this.state==="stopped"?this.message&&(this.abortController=new AbortController,this.summarize.emit({abortController:this.abortController,playAudio:this.playAudio,message:this.message,updateState:this.updateState}).defaultPrevented||(y.debug("[nylas-summarize-message-button] Default event not prevented, summarizing message"),this.audioRef&&(await this.audioRef.play().then(()=>{var r;return(r=this.audioRef)==null?void 0:r.pause()}).catch(r=>console.error("Error playing audio:",r)),await this.audioRef.play().catch(r=>console.error("Error playing audio:",r))))):this.state==="playing"?((u=this.abortController)==null||u.abort(),(s=this.audioRef)==null||s.pause()):this.state="stopped"},this.message=void 0,this.state="stopped",this.playAudio=this.playAudio.bind(this),this.updateState=this.updateState.bind(this)}connectedCallback(){}disconnectedCallback(){}async componentWillLoad(){y.debug("[nylas-summarize-message-button] Component will load")}async componentDidLoad(){y.debug("[nylas-summarize-message-button] Component did load")}async updateState(t){this.state=t}async playAudio(t){if(!this.audioRef){this.state="stopped";return}if(!t){this.state="stopped";return}const o=this.audioRef;if(!("MediaSource"in window)){const i=await t;if(i==null)throw new Error("ReadableStream not yet supported in this browser.");const l=i.getReader(),T=[];await this.readChunk(l,T);const _=new Blob(T,{type:"audio/mpeg"}),N=URL.createObjectURL(_);o.src=N;return}const u=new MediaSource;let s,p=!1;o.src=URL.createObjectURL(u),u.addEventListener("sourceopen",r);async function r(){s=u.addSourceBuffer("audio/mpeg"),s.addEventListener("updateend",f);const i=await t;if(i==null)throw new Error("ReadableStream not yet supported in this browser.");const l=i.getReader(),T=()=>{l.read().then(({done:_,value:N})=>{if(_){p=!0;return}s.updating||s.appendBuffer(N),T()}).catch(_=>{console.error("Error while fetching and appending chunks:",_)})};T(),o.paused&&o.play().catch(_=>console.error("Error playing audio:",_))}function f(){if(p){u.endOfStream(),u.removeEventListener("sourceopen",r),u.removeEventListener("sourceclose",()=>{y.debug("[nylas-summarize-message-button] Source closed")}),s.removeEventListener("updateend",f);return}}}async readChunk(t,o){return t.read().then(({done:u,value:s})=>u?o:(o.push(s),this.readChunk(t,o)))}render(){return m.h(m.Host,{key:"052c49f7b564274561da89404b06b490b993b1f0"},m.h("sp-theme",{key:"55b4965642873d51c445b4db4eac17119d6e0568",scale:"medium",color:"dark"},m.h("sp-button",{key:"c7bf00d3570f9129cdb3005d0e0877c95cb75466",label:"Summarize email","icon-only":!0,onClickCapture:this.onClick,class:{"summarize-button":!0,stopped:this.state==="stopped",loading:this.state==="loading",playing:this.state==="playing"}},this.state==="stopped"&&m.h("play-icon",null),this.state==="loading"&&m.h("loading-icon",null),this.state==="playing"&&m.h("stop-icon",null)),m.h("audio",{key:"489a2f36807bf74313ca4ce0cdfe84682a614a34",ref:t=>this.audioRef=t,autoPlay:!0,onPlaying:()=>this.state="playing",onPause:()=>this.state="stopped",onEnded:()=>{this.state="stopped",y.debug("[nylas-summarize-message-button] Audio ended")}})))}};Cn([yn.RegisterComponent({name:"nylas-summarize-message-button",eventToProps:{summarize:async(t,o)=>{const{playAudio:u,updateState:s,abortController:p,message:r}=t.detail,f=y.htmlToPlainText(r.body||"");await s("loading");try{const i=await o.messages.summarizeText(f),l=o.messages.textToSpeech(i,p);await u(l)}catch(i){await s("stopped"),console.error("Error summarizing message:",i)}}},fireRegisterEvent:!0}),Fe("design:type",Function),Fe("design:paramtypes",[]),Fe("design:returntype",void 0)],We.prototype,"render",null);We.style=Sn;function P(t){return!window.matchMedia("(prefers-color-scheme: dark)").matches||!t?t:t==="transparent"?"color":t.startsWith("#")?Ln(t):t.startsWith("rgb")?Rt(t):t.startsWith("hsl")?Rn(t):kn(t)?Mn(t):t}function Ln(t){t.length<7&&(t="#"+t[1]+t[1]+t[2]+t[2]+t[3]+t[3]);const o=(255-parseInt(t.slice(1,3),16)).toString(16).padStart(2,"0"),u=(255-parseInt(t.slice(3,5),16)).toString(16).padStart(2,"0"),s=(255-parseInt(t.slice(5,7),16)).toString(16).padStart(2,"0");return`#${o}${u}${s}`}function Rt(t){var r;const o=(r=t.match(/\d+/g))==null?void 0:r.map(Number);if(!o)return t;const[u,s,p]=o;return`rgb(${255-u}, ${255-s}, ${255-p})`}function Rn(t){var r;const o=(r=t.match(/\d+\.?\d*/g))==null?void 0:r.map(Number);if(!o)return t;const[u,s,p]=o;return`hsl(${u}, ${s}%, ${100-p}%)`}function kn(t){return/^[a-z]+$/i.test(t)}function Mn(t){return Rt(Nn(t))}function Nn(t){return t.toLowerCase()==="red"?"rgb(255, 0, 0)":"rgb(0, 0, 0)"}function St(t){if(t instanceof HTMLStyleElement){let o=t.textContent;if(o){o=o.replaceAll(/@media\s*\(prefers-color-scheme:\s*(dark|light)\)\s*\{([^}]+)\}/g,"");const u=o.matchAll(/border-color:\s*([^;]+)/g);if(u)for(const i of u){const[l,T]=i,_=l.replace(/[-/\\^$*+?.()|[\]{}]/g,"\\$&");o=o.replaceAll(_,l.replace(T,P(T)))}const s=o.matchAll(/border:\s*([^;]+)/g);if(s)for(const i of s){const l=i[0].trim(),T=l.replace(/[-/\\^$*+?.()|[\]{}]/g,"\\$&"),[_,N,U]=i[1].split(" ");o=o.replaceAll(T,l.replace(U,P(U)))}const p=o.matchAll(/background-color:\s*([^;]+)/g);if(p)for(const i of p){const[l,T]=i,_=l.replace(/[-/\\^$*+?.()|[\]{}]/g,"\\$&");o=o.replaceAll(_,l.replace(T,P(T))),y.debug("backgroundColor",{fullMatch:l,replace:l.replace(T,P(T)),color:T,invertColor:P(T)})}const r=o.matchAll(/background:\s*([^;]+)/g);if(r)for(const i of r){const l=i[0].trim(),T=l.replace(/[-/\\^$*+?.()|[\]{}]/g,"\\$&"),[_,N,U]=i[1].split(" ");o=o.replaceAll(T,l.replace(U,P(U)))}const f=o.matchAll(/color:\s*([^;]+)/g);if(f)for(const i of f){const[l,T]=i,_=l.replace(/[-/\\^$*+?.()|[\]{}]/g,"\\$&");o=o.replaceAll(_,l.replace(T,P(T)))}t.textContent=o}}if(t instanceof HTMLElement){const o=window.getComputedStyle(t),u=o.color||t.style.color,s=o.backgroundColor||t.style.backgroundColor,p=o.borderColor||t.style.borderColor;u&&!s?t.style.color="":u&&s?(t.style.color=P(u),t.style.backgroundColor=P(s),y.debug("element",t),y.debug("computedStyle.color",u),y.debug("computedStyle.backgroundColor",s),y.debug("invertColor(color)",P(u)),y.debug("invertColor(backgroundColor)",P(s))):!u&&s&&(t.style.backgroundColor=""),p&&(y.debug("borderColor",p),t.style.borderColor=P(p)),t.hasAttribute("bgcolor")&&t.removeAttribute("bgcolor")}}function xn(t){St(t),t.querySelectorAll("*").forEach(u=>St(u))}var kt={exports:{}};/*! @license DOMPurify 3.0.8 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.0.8/LICENSE */(function(t,o){(function(u,s){t.exports=s()})(En.commonjsGlobal,function(){const{entries:u,setPrototypeOf:s,isFrozen:p,getPrototypeOf:r,getOwnPropertyDescriptor:f}=Object;let{freeze:i,seal:l,create:T}=Object,{apply:_,construct:N}=typeof Reflect<"u"&&Reflect;i||(i=function(c){return c}),l||(l=function(c){return c}),_||(_=function(c,E,g){return c.apply(E,g)}),N||(N=function(c,E){return new c(...E)});const U=I(Array.prototype.forEach),ce=I(Array.prototype.pop),q=I(Array.prototype.push),X=I(String.prototype.toLowerCase),ne=I(String.prototype.toString),ye=I(String.prototype.match),W=I(String.prototype.replace),Dt=I(String.prototype.indexOf),Ot=I(String.prototype.trim),O=I(RegExp.prototype.test),oe=It(TypeError);function I(b){return function(c){for(var E=arguments.length,g=new Array(E>1?E-1:0),k=1;k<E;k++)g[k-1]=arguments[k];return _(b,c,g)}}function It(b){return function(){for(var c=arguments.length,E=new Array(c),g=0;g<c;g++)E[g]=arguments[g];return N(b,E)}}function h(b,c){let E=arguments.length>2&&arguments[2]!==void 0?arguments[2]:X;s&&s(b,null);let g=c.length;for(;g--;){let k=c[g];if(typeof k=="string"){const H=E(k);H!==k&&(p(c)||(c[g]=H),k=H)}b[k]=!0}return b}function Pt(b){for(let c=0;c<b.length;c++)f(b,c)===void 0&&(b[c]=null);return b}function G(b){const c=T(null);for(const[E,g]of u(b))f(b,E)!==void 0&&(Array.isArray(g)?c[E]=Pt(g):g&&typeof g=="object"&&g.constructor===Object?c[E]=G(g):c[E]=g);return c}function de(b,c){for(;b!==null;){const g=f(b,c);if(g){if(g.get)return I(g.get);if(typeof g.value=="function")return I(g.value)}b=r(b)}function E(g){return console.warn("fallback value for",g),null}return E}const qe=i(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","section","select","shadow","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),Ee=i(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","filter","font","g","glyph","glyphref","hkern","image","line","lineargradient","marker","mask","metadata","mpath","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),Te=i(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),Ut=i(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),Ae=i(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),zt=i(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),Ge=i(["#text"]),$e=i(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","face","for","headers","height","hidden","high","href","hreflang","id","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","pattern","placeholder","playsinline","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","xmlns","slot"]),_e=i(["accent-height","accumulate","additive","alignment-baseline","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),Ye=i(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),ue=i(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),Ht=l(/\{\{[\w\W]*|[\w\W]*\}\}/gm),Ft=l(/<%[\w\W]*|[\w\W]*%>/gm),Bt=l(/\${[\w\W]*}/gm),Wt=l(/^data-[\-\w.\u00B7-\uFFFF]/),qt=l(/^aria-[\-\w]+$/),je=l(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),Gt=l(/^(?:\w+script|data):/i),$t=l(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),Xe=l(/^html$/i);var Ve=Object.freeze({__proto__:null,MUSTACHE_EXPR:Ht,ERB_EXPR:Ft,TMPLIT_EXPR:Bt,DATA_ATTR:Wt,ARIA_ATTR:qt,IS_ALLOWED_URI:je,IS_SCRIPT_OR_DATA:Gt,ATTR_WHITESPACE:$t,DOCTYPE_NAME:Xe});const Yt=function(){return typeof window>"u"?null:window},jt=function(c,E){if(typeof c!="object"||typeof c.createPolicy!="function")return null;let g=null;const k="data-tt-policy-suffix";E&&E.hasAttribute(k)&&(g=E.getAttribute(k));const H="dompurify"+(g?"#"+g:"");try{return c.createPolicy(H,{createHTML(V){return V},createScriptURL(V){return V}})}catch{return console.warn("TrustedTypes policy "+H+" could not be created."),null}};function Ze(){let b=arguments.length>0&&arguments[0]!==void 0?arguments[0]:Yt();const c=d=>Ze(d);if(c.version="3.0.8",c.removed=[],!b||!b.document||b.document.nodeType!==9)return c.isSupported=!1,c;let{document:E}=b;const g=E,k=g.currentScript,{DocumentFragment:H,HTMLTemplateElement:V,Node:we,Element:Ke,NodeFilter:ve,NamedNodeMap:Vt=b.NamedNodeMap||b.MozNamedAttrMap,HTMLFormElement:Zt,DOMParser:Kt,trustedTypes:me}=b,fe=Ke.prototype,Qt=de(fe,"cloneNode"),Jt=de(fe,"nextSibling"),en=de(fe,"childNodes"),Se=de(fe,"parentNode");if(typeof V=="function"){const d=E.createElement("template");d.content&&d.content.ownerDocument&&(E=d.content.ownerDocument)}let M,ie="";const{implementation:Ce,createNodeIterator:tn,createDocumentFragment:nn,getElementsByTagName:on}=E,{importNode:rn}=g;let z={};c.isSupported=typeof u=="function"&&typeof Se=="function"&&Ce&&Ce.createHTMLDocument!==void 0;const{MUSTACHE_EXPR:Le,ERB_EXPR:Re,TMPLIT_EXPR:ke,DATA_ATTR:an,ARIA_ATTR:sn,IS_SCRIPT_OR_DATA:ln,ATTR_WHITESPACE:Qe}=Ve;let{IS_ALLOWED_URI:Je}=Ve,v=null;const et=h({},[...qe,...Ee,...Te,...Ae,...Ge]);let S=null;const tt=h({},[...$e,..._e,...Ye,...ue]);let w=Object.seal(T(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),re=null,Me=null,nt=!0,Ne=!0,ot=!1,it=!0,Z=!1,$=!1,xe=!1,De=!1,K=!1,pe=!1,he=!1,rt=!0,at=!1;const cn="user-content-";let Oe=!0,ae=!1,Q={},J=null;const st=h({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);let lt=null;const ct=h({},["audio","video","img","source","image","track"]);let Ie=null;const dt=h({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),ge="http://www.w3.org/1998/Math/MathML",be="http://www.w3.org/2000/svg",F="http://www.w3.org/1999/xhtml";let ee=F,Pe=!1,Ue=null;const dn=h({},[ge,be,F],ne);let se=null;const un=["application/xhtml+xml","text/html"],mn="text/html";let C=null,te=null;const fn=E.createElement("form"),ut=function(e){return e instanceof RegExp||e instanceof Function},ze=function(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!(te&&te===e)){if((!e||typeof e!="object")&&(e={}),e=G(e),se=un.indexOf(e.PARSER_MEDIA_TYPE)===-1?mn:e.PARSER_MEDIA_TYPE,C=se==="application/xhtml+xml"?ne:X,v="ALLOWED_TAGS"in e?h({},e.ALLOWED_TAGS,C):et,S="ALLOWED_ATTR"in e?h({},e.ALLOWED_ATTR,C):tt,Ue="ALLOWED_NAMESPACES"in e?h({},e.ALLOWED_NAMESPACES,ne):dn,Ie="ADD_URI_SAFE_ATTR"in e?h(G(dt),e.ADD_URI_SAFE_ATTR,C):dt,lt="ADD_DATA_URI_TAGS"in e?h(G(ct),e.ADD_DATA_URI_TAGS,C):ct,J="FORBID_CONTENTS"in e?h({},e.FORBID_CONTENTS,C):st,re="FORBID_TAGS"in e?h({},e.FORBID_TAGS,C):{},Me="FORBID_ATTR"in e?h({},e.FORBID_ATTR,C):{},Q="USE_PROFILES"in e?e.USE_PROFILES:!1,nt=e.ALLOW_ARIA_ATTR!==!1,Ne=e.ALLOW_DATA_ATTR!==!1,ot=e.ALLOW_UNKNOWN_PROTOCOLS||!1,it=e.ALLOW_SELF_CLOSE_IN_ATTR!==!1,Z=e.SAFE_FOR_TEMPLATES||!1,$=e.WHOLE_DOCUMENT||!1,K=e.RETURN_DOM||!1,pe=e.RETURN_DOM_FRAGMENT||!1,he=e.RETURN_TRUSTED_TYPE||!1,De=e.FORCE_BODY||!1,rt=e.SANITIZE_DOM!==!1,at=e.SANITIZE_NAMED_PROPS||!1,Oe=e.KEEP_CONTENT!==!1,ae=e.IN_PLACE||!1,Je=e.ALLOWED_URI_REGEXP||je,ee=e.NAMESPACE||F,w=e.CUSTOM_ELEMENT_HANDLING||{},e.CUSTOM_ELEMENT_HANDLING&&ut(e.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(w.tagNameCheck=e.CUSTOM_ELEMENT_HANDLING.tagNameCheck),e.CUSTOM_ELEMENT_HANDLING&&ut(e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(w.attributeNameCheck=e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),e.CUSTOM_ELEMENT_HANDLING&&typeof e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements=="boolean"&&(w.allowCustomizedBuiltInElements=e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),Z&&(Ne=!1),pe&&(K=!0),Q&&(v=h({},Ge),S=[],Q.html===!0&&(h(v,qe),h(S,$e)),Q.svg===!0&&(h(v,Ee),h(S,_e),h(S,ue)),Q.svgFilters===!0&&(h(v,Te),h(S,_e),h(S,ue)),Q.mathMl===!0&&(h(v,Ae),h(S,Ye),h(S,ue))),e.ADD_TAGS&&(v===et&&(v=G(v)),h(v,e.ADD_TAGS,C)),e.ADD_ATTR&&(S===tt&&(S=G(S)),h(S,e.ADD_ATTR,C)),e.ADD_URI_SAFE_ATTR&&h(Ie,e.ADD_URI_SAFE_ATTR,C),e.FORBID_CONTENTS&&(J===st&&(J=G(J)),h(J,e.FORBID_CONTENTS,C)),Oe&&(v["#text"]=!0),$&&h(v,["html","head","body"]),v.table&&(h(v,["tbody"]),delete re.tbody),e.TRUSTED_TYPES_POLICY){if(typeof e.TRUSTED_TYPES_POLICY.createHTML!="function")throw oe('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof e.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw oe('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');M=e.TRUSTED_TYPES_POLICY,ie=M.createHTML("")}else M===void 0&&(M=jt(me,k)),M!==null&&typeof ie=="string"&&(ie=M.createHTML(""));i&&i(e),te=e}},mt=h({},["mi","mo","mn","ms","mtext"]),ft=h({},["foreignobject","desc","title","annotation-xml"]),pn=h({},["title","style","font","a","script"]),pt=h({},[...Ee,...Te,...Ut]),ht=h({},[...Ae,...zt]),hn=function(e){let n=Se(e);(!n||!n.tagName)&&(n={namespaceURI:ee,tagName:"template"});const a=X(e.tagName),A=X(n.tagName);return Ue[e.namespaceURI]?e.namespaceURI===be?n.namespaceURI===F?a==="svg":n.namespaceURI===ge?a==="svg"&&(A==="annotation-xml"||mt[A]):!!pt[a]:e.namespaceURI===ge?n.namespaceURI===F?a==="math":n.namespaceURI===be?a==="math"&&ft[A]:!!ht[a]:e.namespaceURI===F?n.namespaceURI===be&&!ft[A]||n.namespaceURI===ge&&!mt[A]?!1:!ht[a]&&(pn[a]||!pt[a]):!!(se==="application/xhtml+xml"&&Ue[e.namespaceURI]):!1},Y=function(e){q(c.removed,{element:e});try{e.parentNode.removeChild(e)}catch{e.remove()}},He=function(e,n){try{q(c.removed,{attribute:n.getAttributeNode(e),from:n})}catch{q(c.removed,{attribute:null,from:n})}if(n.removeAttribute(e),e==="is"&&!S[e])if(K||pe)try{Y(n)}catch{}else try{n.setAttribute(e,"")}catch{}},gt=function(e){let n=null,a=null;if(De)e="<remove></remove>"+e;else{const R=ye(e,/^[\r\n\t ]+/);a=R&&R[0]}se==="application/xhtml+xml"&&ee===F&&(e='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+e+"</body></html>");const A=M?M.createHTML(e):e;if(ee===F)try{n=new Kt().parseFromString(A,se)}catch{}if(!n||!n.documentElement){n=Ce.createDocument(ee,"template",null);try{n.documentElement.innerHTML=Pe?ie:A}catch{}}const L=n.body||n.documentElement;return e&&a&&L.insertBefore(E.createTextNode(a),L.childNodes[0]||null),ee===F?on.call(n,$?"html":"body")[0]:$?n.documentElement:L},bt=function(e){return tn.call(e.ownerDocument||e,e,ve.SHOW_ELEMENT|ve.SHOW_COMMENT|ve.SHOW_TEXT,null)},gn=function(e){return e instanceof Zt&&(typeof e.nodeName!="string"||typeof e.textContent!="string"||typeof e.removeChild!="function"||!(e.attributes instanceof Vt)||typeof e.removeAttribute!="function"||typeof e.setAttribute!="function"||typeof e.namespaceURI!="string"||typeof e.insertBefore!="function"||typeof e.hasChildNodes!="function")},yt=function(e){return typeof we=="function"&&e instanceof we},B=function(e,n,a){z[e]&&U(z[e],A=>{A.call(c,n,a,te)})},Et=function(e){let n=null;if(B("beforeSanitizeElements",e,null),gn(e))return Y(e),!0;const a=C(e.nodeName);if(B("uponSanitizeElement",e,{tagName:a,allowedTags:v}),e.hasChildNodes()&&!yt(e.firstElementChild)&&O(/<[/\w]/g,e.innerHTML)&&O(/<[/\w]/g,e.textContent))return Y(e),!0;if(!v[a]||re[a]){if(!re[a]&&At(a)&&(w.tagNameCheck instanceof RegExp&&O(w.tagNameCheck,a)||w.tagNameCheck instanceof Function&&w.tagNameCheck(a)))return!1;if(Oe&&!J[a]){const A=Se(e)||e.parentNode,L=en(e)||e.childNodes;if(L&&A){const R=L.length;for(let x=R-1;x>=0;--x)A.insertBefore(Qt(L[x],!0),Jt(e))}}return Y(e),!0}return e instanceof Ke&&!hn(e)||(a==="noscript"||a==="noembed"||a==="noframes")&&O(/<\/no(script|embed|frames)/i,e.innerHTML)?(Y(e),!0):(Z&&e.nodeType===3&&(n=e.textContent,U([Le,Re,ke],A=>{n=W(n,A," ")}),e.textContent!==n&&(q(c.removed,{element:e.cloneNode()}),e.textContent=n)),B("afterSanitizeElements",e,null),!1)},Tt=function(e,n,a){if(rt&&(n==="id"||n==="name")&&(a in E||a in fn))return!1;if(!(Ne&&!Me[n]&&O(an,n))){if(!(nt&&O(sn,n))){if(!S[n]||Me[n]){if(!(At(e)&&(w.tagNameCheck instanceof RegExp&&O(w.tagNameCheck,e)||w.tagNameCheck instanceof Function&&w.tagNameCheck(e))&&(w.attributeNameCheck instanceof RegExp&&O(w.attributeNameCheck,n)||w.attributeNameCheck instanceof Function&&w.attributeNameCheck(n))||n==="is"&&w.allowCustomizedBuiltInElements&&(w.tagNameCheck instanceof RegExp&&O(w.tagNameCheck,a)||w.tagNameCheck instanceof Function&&w.tagNameCheck(a))))return!1}else if(!Ie[n]){if(!O(Je,W(a,Qe,""))){if(!((n==="src"||n==="xlink:href"||n==="href")&&e!=="script"&&Dt(a,"data:")===0&&lt[e])){if(!(ot&&!O(ln,W(a,Qe,"")))){if(a)return!1}}}}}}return!0},At=function(e){return e.indexOf("-")>0},_t=function(e){B("beforeSanitizeAttributes",e,null);const{attributes:n}=e;if(!n)return;const a={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:S};let A=n.length;for(;A--;){const L=n[A],{name:R,namespaceURI:x,value:j}=L,le=C(R);let D=R==="value"?j:Ot(j);if(a.attrName=le,a.attrValue=D,a.keepAttr=!0,a.forceKeepAttr=void 0,B("uponSanitizeAttribute",e,a),D=a.attrValue,a.forceKeepAttr||(He(R,e),!a.keepAttr))continue;if(!it&&O(/\/>/i,D)){He(R,e);continue}Z&&U([Le,Re,ke],vt=>{D=W(D,vt," ")});const wt=C(e.nodeName);if(Tt(wt,le,D)){if(at&&(le==="id"||le==="name")&&(He(R,e),D=cn+D),M&&typeof me=="object"&&typeof me.getAttributeType=="function"&&!x)switch(me.getAttributeType(wt,le)){case"TrustedHTML":{D=M.createHTML(D);break}case"TrustedScriptURL":{D=M.createScriptURL(D);break}}try{x?e.setAttributeNS(x,R,D):e.setAttribute(R,D),ce(c.removed)}catch{}}}B("afterSanitizeAttributes",e,null)},bn=function d(e){let n=null;const a=bt(e);for(B("beforeSanitizeShadowDOM",e,null);n=a.nextNode();)B("uponSanitizeShadowNode",n,null),!Et(n)&&(n.content instanceof H&&d(n.content),_t(n));B("afterSanitizeShadowDOM",e,null)};return c.sanitize=function(d){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=null,a=null,A=null,L=null;if(Pe=!d,Pe&&(d="<!-->"),typeof d!="string"&&!yt(d))if(typeof d.toString=="function"){if(d=d.toString(),typeof d!="string")throw oe("dirty is not a string, aborting")}else throw oe("toString is not a function");if(!c.isSupported)return d;if(xe||ze(e),c.removed=[],typeof d=="string"&&(ae=!1),ae){if(d.nodeName){const j=C(d.nodeName);if(!v[j]||re[j])throw oe("root node is forbidden and cannot be sanitized in-place")}}else if(d instanceof we)n=gt("<!---->"),a=n.ownerDocument.importNode(d,!0),a.nodeType===1&&a.nodeName==="BODY"||a.nodeName==="HTML"?n=a:n.appendChild(a);else{if(!K&&!Z&&!$&&d.indexOf("<")===-1)return M&&he?M.createHTML(d):d;if(n=gt(d),!n)return K?null:he?ie:""}n&&De&&Y(n.firstChild);const R=bt(ae?d:n);for(;A=R.nextNode();)Et(A)||(A.content instanceof H&&bn(A.content),_t(A));if(ae)return d;if(K){if(pe)for(L=nn.call(n.ownerDocument);n.firstChild;)L.appendChild(n.firstChild);else L=n;return(S.shadowroot||S.shadowrootmode)&&(L=rn.call(g,L,!0)),L}let x=$?n.outerHTML:n.innerHTML;return $&&v["!doctype"]&&n.ownerDocument&&n.ownerDocument.doctype&&n.ownerDocument.doctype.name&&O(Xe,n.ownerDocument.doctype.name)&&(x="<!DOCTYPE "+n.ownerDocument.doctype.name+`>
2
+ `+x),Z&&U([Le,Re,ke],j=>{x=W(x,j," ")}),M&&he?M.createHTML(x):x},c.setConfig=function(){let d=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};ze(d),xe=!0},c.clearConfig=function(){te=null,xe=!1},c.isValidAttribute=function(d,e,n){te||ze({});const a=C(d),A=C(e);return Tt(a,A,n)},c.addHook=function(d,e){typeof e=="function"&&(z[d]=z[d]||[],q(z[d],e))},c.removeHook=function(d){if(z[d])return ce(z[d])},c.removeHooks=function(d){z[d]&&(z[d]=[])},c.removeAllHooks=function(){z={}},c}var Xt=Ze();return Xt})})(kt);const Be=kt.exports,Dn=":host{display:inline-grid;overflow:hidden;width:100%}.view-email{width:100%}.view-email div.gmail_quote{display:none;color:var(--nylas-color-primary-400)}.view-email div.gmail_quote.show{display:block}.view-email blockquote{border-color:var(--nylas-color-primary-500) !important}.view-email .nylas-view-email-toggle-button{display:flex;justify-content:center;align-items:center;cursor:pointer;background-color:var(--nylas-color-primary-200);color:var(--nylas-color-primary-600);border:0;border-radius:2px;font-size:14px;font-weight:500;line-height:1.5;transition:all 0.2s ease-in-out}.view-email .nylas-view-email-toggle-button:hover{background-color:var(--nylas-color-primary-200);color:var(--nylas-color-primary-600)}",On=Dn;Be.addHook("afterSanitizeAttributes",function(t){"target"in t&&(t.setAttribute("target","_blank"),t.setAttribute("rel","noopener"))});const Mt=class{constructor(t){m.registerInstance(this,t),this.htmlElement=document.createElement("html"),this.setBody=o=>{var p;this.state="loading",this.styles=[],this.hoistedFontURLs=new Map,this.sanitizedBody="",document.querySelectorAll(".nylas-view-email-font").forEach(r=>{r.remove()}),(this.message?y.detectIfMessageIsHTML(this.message):y.detectHTMLOrPlainText(o))||(o=`<html><body>${y.parsePlainTextToHTML(o)}</body></html>`),this.htmlElement.innerHTML=o,this.detectDarkMode&&xn(this.htmlElement),this.htmlElement.querySelectorAll("link").forEach(r=>{if(console.debug(`[nylas-view-email] Hoisting link: ${r.getAttribute("href")}`),r.getAttribute("rel")==="stylesheet"&&r.getAttribute("href")){const f=r.getAttribute("href");if(f){const i=new URL(f,window.location.href);(i.protocol==="https:"||i.protocol==="http:")&&this.hoistedFontURLs.set(i.href,i.href)}}}),this.htmlElement.querySelectorAll("style").forEach(r=>{r.innerHTML.split(`
3
+ `).forEach(f=>{const i=f.match(/@import url\((.*)\)/);if(i){const l=new URL(i[1],window.location.href);(l.protocol==="https:"||l.protocol==="http:")&&this.hoistedFontURLs.set(l.href,l.href)}}),r.innerHTML=r.innerHTML.replace("body",":host"),this.styles.push(r),r.remove()}),this.htmlElement.querySelectorAll("a").forEach(r=>{r.setAttribute("target","_blank")});const s=this.htmlElement.querySelector(".gmail_quote");if(s){const r=document.createElement("button");r.classList.add("nylas-view-email-toggle-button"),r.setAttribute("aria-label","Show quoted text"),r.innerText="...",(p=s.parentElement)==null||p.insertBefore(r,s)}this.sanitizedBody=Be.sanitize(this.htmlElement.innerHTML),this.hoistedFontURLs.forEach((r,f)=>{const i=document.createElement("link");i.setAttribute("rel","stylesheet"),i.setAttribute("href",r),i.classList.add("nylas-view-email-font"),document.head.appendChild(i)}),this.state="ready"},this.handleMobileSize=()=>{var u,s,p,r;const o=Math.max(document.documentElement.clientWidth||0,window.innerWidth||0);if(o<=768){const f=(u=this.viewEmailElement)==null?void 0:u.getBoundingClientRect();if(f&&this.viewEmailElement&&this.parent&&f.width>o){const i=this.parent,l=i==null?void 0:i.getBoundingClientRect();y.debug("Parent width:",l==null?void 0:l.width,"Parent height:",l==null?void 0:l.height),y.debug("Parent client width:",i.clientWidth,"Parent client height:",i.clientHeight);const T=l.width/f.width,_=l.height/f.height,N=Math.min(T,_);y.debug("Scale:",N),this.viewEmailElement.style.setProperty("transform",`scale(${N})`),this.viewEmailElement.style.setProperty("transform-origin","top left"),this.viewEmailElement.style.setProperty("height",`${f.height*N}px`)}}else(s=this.viewEmailElement)==null||s.style.removeProperty("transform"),(p=this.viewEmailElement)==null||p.style.removeProperty("transform-origin"),(r=this.viewEmailElement)==null||r.style.removeProperty("height")},this.message=void 0,this.parent=void 0,this.attachments=[],this.detectDarkMode=!0,this.state="loading",this.sanitizedBody="",this.styles=[],this.viewEmailElement=void 0,this.hoistedFontURLs=new Map}connectedCallback(){}disconnectedCallback(){y.debug("[nylas-view-email] Component disconnected"),this.state="loading",this.styles=[],this.hoistedFontURLs=new Map,this.sanitizedBody="",document.querySelectorAll(".nylas-view-email-font").forEach(t=>{t.remove()})}async componentWillLoad(){var t;y.debug("[nylas-view-email] component loaded"),this.setBody(((t=this.message)==null?void 0:t.body)??"")}async componentDidLoad(){y.debug("[nylas-view-thread] Component did load"),this.handleMobileSize()}async messageChanged(){var t;y.debug("[nylas-view-thread] Message changed",{message:this.message}),this.setBody(((t=this.message)==null?void 0:t.body)??"")}handleScroll(){this.handleMobileSize()}viewEmailElementChanged(){var o;const t=(o=this.viewEmailElement)==null?void 0:o.querySelectorAll(".nylas-view-email-toggle-button");t&&t.forEach(u=>{u.addEventListener("click",()=>{var p;const s=(p=this.viewEmailElement)==null?void 0:p.querySelector(".gmail_quote");s&&s.classList.toggle("show")})})}render(){return console.debug("[nylas-view-email] render",{hoistedFontURLs:this.hoistedFontURLs}),m.h(m.Host,{key:"4fe5de7068b18d3566e049d2b068e2a568e8d849"},this.state==="loading"&&m.h("div",null,"Loading..."),this.state==="ready"&&m.h(m.Fragment,null,this.styles.map(t=>m.h("style",null,Be.sanitize(t.innerHTML))),m.h("div",{class:"view-email",part:"view-email",innerHTML:this.sanitizedBody,ref:t=>this.viewEmailElement=t})))}get host(){return m.getElement(this)}static get watchers(){return{message:["messageChanged"],viewEmailElement:["viewEmailElementChanged"]}}};Mt.style=On;const In=".sc-reply-all-icon-h{display:flex}",Pn=In,Nt=class{constructor(t){m.registerInstance(this,t),this.width="15",this.height="15"}render(){return m.h("svg",{key:"b8ecda42e9fee4ee178dba36bf798a6a0404424d",fill:"auto",width:this.width,height:this.height,viewBox:"0 0 1920 1920",xmlns:"http://www.w3.org/2000/svg"},m.h("path",{key:"94ea534065e92c1e70cbe5d29b3f2afc2c1597a5",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"}))}};Nt.style=Pn;const Un=".sc-reply-icon-h{display:flex}",zn=Un,xt=class{constructor(t){m.registerInstance(this,t),this.width="15",this.height="15"}render(){return m.h("svg",{key:"7bd2f7db7c28d9eacd86fea8287078d3a5572a64",fill:"auto",width:this.width,height:this.height,viewBox:"0 0 1920 1920",xmlns:"http://www.w3.org/2000/svg"},m.h("path",{key:"c9ed6c5cb89c0f3c7a9417ae4875b2c9dd6b60ce",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"}))}};xt.style=zn;exports.forward_icon=Ct;exports.nylas_composer=Lt;exports.nylas_summarize_message_button=We;exports.nylas_view_email=Mt;exports.reply_all_icon=Nt;exports.reply_icon=xt;
@@ -1,12 +1,12 @@
1
- import { r as e, h as C } from "./index-4f65b6f9.js";
1
+ import { r as t, h as C } from "./index-98d3a4da.js";
2
2
  import "react";
3
3
  import "react-dom";
4
4
  const o = ".sc-globe-icon-h{display:flex}", s = o, i = class {
5
- constructor(t) {
6
- e(this, t), this.width = "16", this.height = "16";
5
+ constructor(e) {
6
+ t(this, e), this.width = "16", this.height = "16";
7
7
  }
8
8
  render() {
9
- return C("svg", { key: "81b372fb35acad3083b0c55e6008506a67ed1c2d", xmlns: "http://www.w3.org/2000/svg", width: this.width, height: this.height, viewBox: "0 0 16 16", fill: "none" }, C("path", { key: "1a04560040321d73a460eeffc0c3174d8853337a", d: "M8 14C11.3137 14 14 11.3137 14 8C14 4.68629 11.3137 2 8 2C4.68629 2 2 4.68629 2 8C2 11.3137 4.68629 14 8 14ZM8 3C8.37372 3 8.87543 3.35608 9.31258 4.31781C9.4073 4.52619 9.49448 4.75446 9.57265 5H6.42735C6.50552 4.75446 6.5927 4.52619 6.68742 4.31781C7.12457 3.35608 7.62628 3 8 3ZM5.77705 3.90401C5.62614 4.23601 5.49428 4.6038 5.38411 5H3.99963C4.52341 4.30269 5.22525 3.74677 6.03766 3.39978C5.94287 3.56117 5.85596 3.7304 5.77705 3.90401ZM5.16299 6C5.05694 6.6275 5 7.30146 5 8C5 8.69854 5.05694 9.3725 5.16299 10H3.41604C3.14845 9.38754 3 8.7111 3 8C3 7.2889 3.14845 6.61246 3.41604 6H5.16299ZM5.38411 11C5.49428 11.3962 5.62614 11.764 5.77705 12.096C5.85596 12.2696 5.94287 12.4388 6.03766 12.6002C5.22525 12.2532 4.52341 11.6973 3.99963 11H5.38411ZM6.42735 11H9.57265C9.49448 11.2455 9.4073 11.4738 9.31258 11.6822C8.87543 12.6439 8.37372 13 8 13C7.62628 13 7.12457 12.6439 6.68742 11.6822C6.5927 11.4738 6.50552 11.2455 6.42735 11ZM9.82134 10H6.17866C6.06438 9.3892 6 8.71396 6 8C6 7.28604 6.06438 6.6108 6.17866 6H9.82134C9.93562 6.6108 10 7.28604 10 8C10 8.71396 9.93562 9.3892 9.82134 10ZM10.6159 11H12.0004C11.4766 11.6973 10.7747 12.2532 9.96234 12.6002C10.0571 12.4388 10.144 12.2696 10.2229 12.096C10.3739 11.764 10.5057 11.3962 10.6159 11ZM12.584 10H10.837C10.9431 9.3725 11 8.69854 11 8C11 7.30146 10.9431 6.6275 10.837 6H12.584C12.8516 6.61246 13 7.2889 13 8C13 8.7111 12.8516 9.38754 12.584 10ZM9.96234 3.39978C10.7747 3.74677 11.4766 4.30269 12.0004 5H10.6159C10.5057 4.6038 10.3739 4.23601 10.2229 3.90401C10.144 3.7304 10.0571 3.56117 9.96234 3.39978Z", fill: "currentColor" }));
9
+ return C("svg", { key: "40c238dae79b6c837926f797a13f07c9378eeeac", xmlns: "http://www.w3.org/2000/svg", width: this.width, height: this.height, viewBox: "0 0 16 16", fill: "none" }, C("path", { key: "b332e53dace690161725dee143c3682bc9039fa4", d: "M8 14C11.3137 14 14 11.3137 14 8C14 4.68629 11.3137 2 8 2C4.68629 2 2 4.68629 2 8C2 11.3137 4.68629 14 8 14ZM8 3C8.37372 3 8.87543 3.35608 9.31258 4.31781C9.4073 4.52619 9.49448 4.75446 9.57265 5H6.42735C6.50552 4.75446 6.5927 4.52619 6.68742 4.31781C7.12457 3.35608 7.62628 3 8 3ZM5.77705 3.90401C5.62614 4.23601 5.49428 4.6038 5.38411 5H3.99963C4.52341 4.30269 5.22525 3.74677 6.03766 3.39978C5.94287 3.56117 5.85596 3.7304 5.77705 3.90401ZM5.16299 6C5.05694 6.6275 5 7.30146 5 8C5 8.69854 5.05694 9.3725 5.16299 10H3.41604C3.14845 9.38754 3 8.7111 3 8C3 7.2889 3.14845 6.61246 3.41604 6H5.16299ZM5.38411 11C5.49428 11.3962 5.62614 11.764 5.77705 12.096C5.85596 12.2696 5.94287 12.4388 6.03766 12.6002C5.22525 12.2532 4.52341 11.6973 3.99963 11H5.38411ZM6.42735 11H9.57265C9.49448 11.2455 9.4073 11.4738 9.31258 11.6822C8.87543 12.6439 8.37372 13 8 13C7.62628 13 7.12457 12.6439 6.68742 11.6822C6.5927 11.4738 6.50552 11.2455 6.42735 11ZM9.82134 10H6.17866C6.06438 9.3892 6 8.71396 6 8C6 7.28604 6.06438 6.6108 6.17866 6H9.82134C9.93562 6.6108 10 7.28604 10 8C10 8.71396 9.93562 9.3892 9.82134 10ZM10.6159 11H12.0004C11.4766 11.6973 10.7747 12.2532 9.96234 12.6002C10.0571 12.4388 10.144 12.2696 10.2229 12.096C10.3739 11.764 10.5057 11.3962 10.6159 11ZM12.584 10H10.837C10.9431 9.3725 11 8.69854 11 8C11 7.30146 10.9431 6.6275 10.837 6H12.584C12.8516 6.61246 13 7.2889 13 8C13 8.7111 12.8516 9.38754 12.584 10ZM9.96234 3.39978C10.7747 3.74677 11.4766 4.30269 12.0004 5H10.6159C10.5057 4.6038 10.3739 4.23601 10.2229 3.90401C10.144 3.7304 10.0571 3.56117 9.96234 3.39978Z", fill: "currentColor" }));
10
10
  }
11
11
  };
12
12
  i.style = s;
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index-29d0e781.cjs");require("react");require("react-dom");const i=".sc-globe-icon-h{display:flex}",o=i,C=class{constructor(t){e.registerInstance(this,t),this.width="16",this.height="16"}render(){return e.h("svg",{key:"81b372fb35acad3083b0c55e6008506a67ed1c2d",xmlns:"http://www.w3.org/2000/svg",width:this.width,height:this.height,viewBox:"0 0 16 16",fill:"none"},e.h("path",{key:"1a04560040321d73a460eeffc0c3174d8853337a",d:"M8 14C11.3137 14 14 11.3137 14 8C14 4.68629 11.3137 2 8 2C4.68629 2 2 4.68629 2 8C2 11.3137 4.68629 14 8 14ZM8 3C8.37372 3 8.87543 3.35608 9.31258 4.31781C9.4073 4.52619 9.49448 4.75446 9.57265 5H6.42735C6.50552 4.75446 6.5927 4.52619 6.68742 4.31781C7.12457 3.35608 7.62628 3 8 3ZM5.77705 3.90401C5.62614 4.23601 5.49428 4.6038 5.38411 5H3.99963C4.52341 4.30269 5.22525 3.74677 6.03766 3.39978C5.94287 3.56117 5.85596 3.7304 5.77705 3.90401ZM5.16299 6C5.05694 6.6275 5 7.30146 5 8C5 8.69854 5.05694 9.3725 5.16299 10H3.41604C3.14845 9.38754 3 8.7111 3 8C3 7.2889 3.14845 6.61246 3.41604 6H5.16299ZM5.38411 11C5.49428 11.3962 5.62614 11.764 5.77705 12.096C5.85596 12.2696 5.94287 12.4388 6.03766 12.6002C5.22525 12.2532 4.52341 11.6973 3.99963 11H5.38411ZM6.42735 11H9.57265C9.49448 11.2455 9.4073 11.4738 9.31258 11.6822C8.87543 12.6439 8.37372 13 8 13C7.62628 13 7.12457 12.6439 6.68742 11.6822C6.5927 11.4738 6.50552 11.2455 6.42735 11ZM9.82134 10H6.17866C6.06438 9.3892 6 8.71396 6 8C6 7.28604 6.06438 6.6108 6.17866 6H9.82134C9.93562 6.6108 10 7.28604 10 8C10 8.71396 9.93562 9.3892 9.82134 10ZM10.6159 11H12.0004C11.4766 11.6973 10.7747 12.2532 9.96234 12.6002C10.0571 12.4388 10.144 12.2696 10.2229 12.096C10.3739 11.764 10.5057 11.3962 10.6159 11ZM12.584 10H10.837C10.9431 9.3725 11 8.69854 11 8C11 7.30146 10.9431 6.6275 10.837 6H12.584C12.8516 6.61246 13 7.2889 13 8C13 8.7111 12.8516 9.38754 12.584 10ZM9.96234 3.39978C10.7747 3.74677 11.4766 4.30269 12.0004 5H10.6159C10.5057 4.6038 10.3739 4.23601 10.2229 3.90401C10.144 3.7304 10.0571 3.56117 9.96234 3.39978Z",fill:"currentColor"}))}};C.style=o;exports.globe_icon=C;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index-586a4206.cjs");require("react");require("react-dom");const i=".sc-globe-icon-h{display:flex}",c=i,C=class{constructor(t){e.registerInstance(this,t),this.width="16",this.height="16"}render(){return e.h("svg",{key:"40c238dae79b6c837926f797a13f07c9378eeeac",xmlns:"http://www.w3.org/2000/svg",width:this.width,height:this.height,viewBox:"0 0 16 16",fill:"none"},e.h("path",{key:"b332e53dace690161725dee143c3682bc9039fa4",d:"M8 14C11.3137 14 14 11.3137 14 8C14 4.68629 11.3137 2 8 2C4.68629 2 2 4.68629 2 8C2 11.3137 4.68629 14 8 14ZM8 3C8.37372 3 8.87543 3.35608 9.31258 4.31781C9.4073 4.52619 9.49448 4.75446 9.57265 5H6.42735C6.50552 4.75446 6.5927 4.52619 6.68742 4.31781C7.12457 3.35608 7.62628 3 8 3ZM5.77705 3.90401C5.62614 4.23601 5.49428 4.6038 5.38411 5H3.99963C4.52341 4.30269 5.22525 3.74677 6.03766 3.39978C5.94287 3.56117 5.85596 3.7304 5.77705 3.90401ZM5.16299 6C5.05694 6.6275 5 7.30146 5 8C5 8.69854 5.05694 9.3725 5.16299 10H3.41604C3.14845 9.38754 3 8.7111 3 8C3 7.2889 3.14845 6.61246 3.41604 6H5.16299ZM5.38411 11C5.49428 11.3962 5.62614 11.764 5.77705 12.096C5.85596 12.2696 5.94287 12.4388 6.03766 12.6002C5.22525 12.2532 4.52341 11.6973 3.99963 11H5.38411ZM6.42735 11H9.57265C9.49448 11.2455 9.4073 11.4738 9.31258 11.6822C8.87543 12.6439 8.37372 13 8 13C7.62628 13 7.12457 12.6439 6.68742 11.6822C6.5927 11.4738 6.50552 11.2455 6.42735 11ZM9.82134 10H6.17866C6.06438 9.3892 6 8.71396 6 8C6 7.28604 6.06438 6.6108 6.17866 6H9.82134C9.93562 6.6108 10 7.28604 10 8C10 8.71396 9.93562 9.3892 9.82134 10ZM10.6159 11H12.0004C11.4766 11.6973 10.7747 12.2532 9.96234 12.6002C10.0571 12.4388 10.144 12.2696 10.2229 12.096C10.3739 11.764 10.5057 11.3962 10.6159 11ZM12.584 10H10.837C10.9431 9.3725 11 8.69854 11 8C11 7.30146 10.9431 6.6275 10.837 6H12.584C12.8516 6.61246 13 7.2889 13 8C13 8.7111 12.8516 9.38754 12.584 10ZM9.96234 3.39978C10.7747 3.74677 11.4766 4.30269 12.0004 5H10.6159C10.5057 4.6038 10.3739 4.23601 10.2229 3.90401C10.144 3.7304 10.0571 3.56117 9.96234 3.39978Z",fill:"currentColor"}))}};C.style=c;exports.globe_icon=C;
@@ -0,0 +1,30 @@
1
+ "use strict";var un=Object.defineProperty;var dn=(e,t,s)=>t in e?un(e,t,{enumerable:!0,configurable:!0,writable:!0,value:s}):e[t]=s;var ve=(e,t,s)=>(dn(e,typeof t!="symbol"?t+"":t,s),s);const N=require("react");require("react-dom");function fn(){var e=[];if(typeof window<"u"){var t=window;(!t.customElements||t.Element&&(!t.Element.prototype.closest||!t.Element.prototype.matches||!t.Element.prototype.remove||!t.Element.prototype.getRootNode))&&e.push(Promise.resolve().then(()=>require("./dom-68f08be9.cjs")));var s=function(){try{var r=new URL("b","http://a");return r.pathname="c%20d",r.href==="http://a/c%20d"&&r.searchParams}catch{return!1}};(typeof Object.assign!="function"||!Object.entries||!Array.prototype.find||!Array.prototype.includes||!String.prototype.startsWith||!String.prototype.endsWith||t.NodeList&&!t.NodeList.prototype.forEach||!t.fetch||!s()||typeof WeakMap>"u")&&e.push(Promise.resolve().then(()=>require("./core-js-38e53e34.cjs")))}return Promise.all(e)}const hn="nylas-web-elements";let se,Pe,L=!1,Ee=null,Se=!1;const M=(e,t="")=>()=>{},pn=(e,t)=>()=>{},$n="{visibility:hidden}.hydrated{visibility:inherit}",ht="slot-fb{display:contents}slot-fb[hidden]{display:none}",tt={},gn="http://www.w3.org/2000/svg",yn="http://www.w3.org/1999/xhtml",vn=e=>e!=null,Te=e=>(e=typeof e,e==="object"||e==="function");function pt(e){var t,s,r;return(r=(s=(t=e.head)===null||t===void 0?void 0:t.querySelector('meta[name="csp-nonce"]'))===null||s===void 0?void 0:s.getAttribute("content"))!==null&&r!==void 0?r:void 0}const _e=(e,t,...s)=>{let r=null,o=null,l=!1,a=!1;const u=[],c=$=>{for(let p=0;p<$.length;p++)r=$[p],Array.isArray(r)?c(r):r!=null&&typeof r!="boolean"&&((l=typeof e!="function"&&!Te(r))&&(r=String(r)),l&&a?u[u.length-1].$text$+=r:u.push(l?oe(null,r):r),a=l)};if(c(s),t){t.key&&(o=t.key);{const $=t.className||t.class;$&&(t.class=typeof $!="object"?$:Object.keys($).filter(p=>$[p]).join(" "))}}if(typeof e=="function")return e(t===null?{}:t,u,bn);const f=oe(e,null);return f.$attrs$=t,u.length>0&&(f.$children$=u),f.$key$=o,f},oe=(e,t)=>{const s={$flags$:0,$tag$:e,$text$:t,$elm$:null,$children$:null};return s.$attrs$=null,s.$key$=null,s},$t={},mn=e=>e&&e.$tag$===$t,bn={forEach:(e,t)=>e.map(nt).forEach(t),map:(e,t)=>e.map(nt).map(t).map(En)},nt=e=>({vattrs:e.$attrs$,vchildren:e.$children$,vkey:e.$key$,vname:e.$name$,vtag:e.$tag$,vtext:e.$text$}),En=e=>{if(typeof e.vtag=="function"){const s=Object.assign({},e.vattrs);return e.vkey&&(s.key=e.vkey),e.vname&&(s.name=e.vname),_e(e.vtag,s,...e.vchildren||[])}const t=oe(e.vtag,e.vtext);return t.$attrs$=e.vattrs,t.$children$=e.vchildren,t.$key$=e.vkey,t.$name$=e.vname,t},Sn=(e,t)=>e!=null&&!Te(e)?t&4?e==="false"?!1:e===""||!!e:t&2?parseFloat(e):t&1?String(e):e:e,gt=e=>q(e).$hostElement$,wn=(e,t,s)=>{const r=gt(e);return{emit:o=>yt(r,t,{bubbles:!!(s&4),composed:!!(s&2),cancelable:!!(s&1),detail:o})}},yt=(e,t,s)=>{const r=x.ce(t,s);return e.dispatchEvent(r),r},rt=new WeakMap,Cn=(e,t,s)=>{let r=ie.get(e);Vn&&s?(r=r||new CSSStyleSheet,typeof r=="string"?r=t:r.replaceSync(t)):r=t,ie.set(e,r)},kn=(e,t,s)=>{var r;const o=vt(t),l=ie.get(o);if(e=e.nodeType===11?e:A,l)if(typeof l=="string"){e=e.head||e;let a=rt.get(e),u;if(a||rt.set(e,a=new Set),!a.has(o)){{u=A.createElement("style"),u.innerHTML=l;const c=(r=x.$nonce$)!==null&&r!==void 0?r:pt(A);c!=null&&u.setAttribute("nonce",c),e.insertBefore(u,e.querySelector("link"))}t.$flags$&4&&(u.innerHTML+=ht),a&&a.add(o)}}else e.adoptedStyleSheets.includes(l)||(e.adoptedStyleSheets=[...e.adoptedStyleSheets,l]);return o},Pn=e=>{const t=e.$cmpMeta$,s=e.$hostElement$,r=t.$flags$,o=M("attachStyles",t.$tagName$),l=kn(s.shadowRoot?s.shadowRoot:s.getRootNode(),t);r&10&&(s["s-sc"]=l,s.classList.add(l+"-h"),r&2&&s.classList.add(l+"-s")),o()},vt=(e,t)=>"sc-"+e.$tagName$,st=(e,t,s,r,o,l)=>{if(s!==r){let a=lt(e,t),u=t.toLowerCase();if(t==="class"){const c=e.classList,f=ot(s),$=ot(r);c.remove(...f.filter(p=>p&&!$.includes(p))),c.add(...$.filter(p=>p&&!f.includes(p)))}else if(t==="style"){for(const c in s)(!r||r[c]==null)&&(c.includes("-")?e.style.removeProperty(c):e.style[c]="");for(const c in r)(!s||r[c]!==s[c])&&(c.includes("-")?e.style.setProperty(c,r[c]):e.style[c]=r[c])}else if(t!=="key")if(t==="ref")r&&r(e);else if(!a&&t[0]==="o"&&t[1]==="n"){if(t[2]==="-"?t=t.slice(3):lt(Q,u)?t=u.slice(2):t=u[2]+t.slice(3),s||r){const c=t.endsWith(mt);t=t.replace(_n,""),s&&x.rel(e,t,s,c),r&&x.ael(e,t,r,c)}}else{const c=Te(r);if((a||c&&r!==null)&&!o)try{if(e.tagName.includes("-"))e[t]=r;else{const f=r??"";t==="list"?a=!1:(s==null||e[t]!=f)&&(e[t]=f)}}catch{}r==null||r===!1?(r!==!1||e.getAttribute(t)==="")&&e.removeAttribute(t):(!a||l&4||o)&&!c&&(r=r===!0?"":r,e.setAttribute(t,r))}}},Tn=/\s/,ot=e=>e?e.split(Tn):[],mt="Capture",_n=new RegExp(mt+"$"),bt=(e,t,s,r)=>{const o=t.$elm$.nodeType===11&&t.$elm$.host?t.$elm$.host:t.$elm$,l=e&&e.$attrs$||tt,a=t.$attrs$||tt;for(r in l)r in a||st(o,r,l[r],void 0,s,t.$flags$);for(r in a)st(o,r,l[r],a[r],s,t.$flags$)},ae=(e,t,s,r)=>{const o=t.$children$[s];let l=0,a,u;if(o.$text$!==null)a=o.$elm$=A.createTextNode(o.$text$);else{if(L||(L=o.$tag$==="svg"),a=o.$elm$=A.createElementNS(L?gn:yn,o.$tag$),L&&o.$tag$==="foreignObject"&&(L=!1),bt(null,o,L),vn(se)&&a["s-si"]!==se&&a.classList.add(a["s-si"]=se),o.$children$)for(l=0;l<o.$children$.length;++l)u=ae(e,o,l),u&&a.appendChild(u);o.$tag$==="svg"?L=!1:a.tagName==="foreignObject"&&(L=!0)}return a["s-hn"]=Pe,a},Et=(e,t,s,r,o,l)=>{let a=e,u;for(a.shadowRoot&&a.tagName===Pe&&(a=a.shadowRoot);o<=l;++o)r[o]&&(u=ae(null,s,o),u&&(r[o].$elm$=u,a.insertBefore(u,t)))},St=(e,t,s)=>{for(let r=t;r<=s;++r){const o=e[r];if(o){const l=o.$elm$;wt(o),l&&l.remove()}}},Rn=(e,t,s,r,o=!1)=>{let l=0,a=0,u=0,c=0,f=t.length-1,$=t[0],p=t[f],S=r.length-1,b=r[0],k=r[S],P,T;for(;l<=f&&a<=S;)if($==null)$=t[++l];else if(p==null)p=t[--f];else if(b==null)b=r[++a];else if(k==null)k=r[--S];else if(re($,b,o))z($,b,o),$=t[++l],b=r[++a];else if(re(p,k,o))z(p,k,o),p=t[--f],k=r[--S];else if(re($,k,o))z($,k,o),e.insertBefore($.$elm$,p.$elm$.nextSibling),$=t[++l],k=r[--S];else if(re(p,b,o))z(p,b,o),e.insertBefore(p.$elm$,$.$elm$),p=t[--f],b=r[++a];else{for(u=-1,c=l;c<=f;++c)if(t[c]&&t[c].$key$!==null&&t[c].$key$===b.$key$){u=c;break}u>=0?(T=t[u],T.$tag$!==b.$tag$?P=ae(t&&t[a],s,u):(z(T,b,o),t[u]=void 0,P=T.$elm$),b=r[++a]):(P=ae(t&&t[a],s,a),b=r[++a]),P&&$.$elm$.parentNode.insertBefore(P,$.$elm$)}l>f?Et(e,r[S+1]==null?null:r[S+1].$elm$,s,r,a,S):a>S&&St(t,l,f)},re=(e,t,s=!1)=>e.$tag$===t.$tag$?s?!0:e.$key$===t.$key$:!1,z=(e,t,s=!1)=>{const r=t.$elm$=e.$elm$,o=e.$children$,l=t.$children$,a=t.$tag$,u=t.$text$;u===null?(L=a==="svg"?!0:a==="foreignObject"?!1:L,a==="slot"||bt(e,t,L),o!==null&&l!==null?Rn(r,o,t,l,s):l!==null?(e.$text$!==null&&(r.textContent=""),Et(r,null,t,l,0,l.length-1)):o!==null&&St(o,0,o.length-1),L&&a==="svg"&&(L=!1)):e.$text$!==u&&(r.data=u)},wt=e=>{e.$attrs$&&e.$attrs$.ref&&e.$attrs$.ref(null),e.$children$&&e.$children$.map(wt)},In=(e,t,s=!1)=>{const r=e.$hostElement$,o=e.$vnode$||oe(null,null),l=mn(t)?t:_e(null,null,t);if(Pe=r.tagName,s&&l.$attrs$)for(const a of Object.keys(l.$attrs$))r.hasAttribute(a)&&!["key","ref","style","class"].includes(a)&&(l.$attrs$[a]=r[a]);l.$tag$=null,l.$flags$|=4,e.$vnode$=l,l.$elm$=o.$elm$=r.shadowRoot||r,se=r["s-sc"],z(o,l,s)},Ct=(e,t)=>{t&&!e.$onRenderResolve$&&t["s-p"]&&t["s-p"].push(new Promise(s=>e.$onRenderResolve$=s))},le=(e,t)=>{if(e.$flags$|=16,e.$flags$&4){e.$flags$|=512;return}return Ct(e,e.$ancestorComponent$),tr(()=>xn(e,t))},xn=(e,t)=>{const s=M("scheduleUpdate",e.$cmpMeta$.$tagName$),r=e.$lazyInstance$;let o;return t&&(e.$flags$|=256,e.$queuedListeners$&&(e.$queuedListeners$.map(([l,a])=>Y(r,l,a)),e.$queuedListeners$=void 0),o=Y(r,"componentWillLoad")),o=at(o,()=>Y(r,"componentWillRender")),s(),at(o,()=>Ln(e,r,t))},at=(e,t)=>On(e)?e.then(t):t(),On=e=>e instanceof Promise||e&&e.then&&typeof e.then=="function",Ln=async(e,t,s)=>{var r;const o=e.$hostElement$,l=M("update",e.$cmpMeta$.$tagName$),a=o["s-rc"];s&&Pn(e);const u=M("render",e.$cmpMeta$.$tagName$);An(e,t,o,s),a&&(a.map(c=>c()),o["s-rc"]=void 0),u(),l();{const c=(r=o["s-p"])!==null&&r!==void 0?r:[],f=()=>Nn(e);c.length===0?f():(Promise.all(c).then(f),e.$flags$|=4,c.length=0)}},An=(e,t,s,r)=>{try{Ee=t,t=t.render(),e.$flags$&=-17,e.$flags$|=2,In(e,t,r)}catch(o){v(o,e.$hostElement$)}return Ee=null,null},jn=()=>Ee,Nn=e=>{const t=e.$cmpMeta$.$tagName$,s=e.$hostElement$,r=M("postUpdate",t),o=e.$lazyInstance$,l=e.$ancestorComponent$;e.$flags$&64?r():(e.$flags$|=64,Pt(s),Y(o,"componentDidLoad"),r(),e.$onReadyResolve$(s),l||kt()),e.$onInstanceResolve$(s),e.$onRenderResolve$&&(e.$onRenderResolve$(),e.$onRenderResolve$=void 0),e.$flags$&512&&Ie(()=>le(e,!1)),e.$flags$&=-517},Dn=e=>{{const t=q(e),s=t.$hostElement$.isConnected;return s&&(t.$flags$&18)===2&&le(t,!1),s}},kt=e=>{Pt(A.documentElement),Ie(()=>yt(Q,"appload",{detail:{namespace:hn}}))},Y=(e,t,s)=>{if(e&&e[t])try{return e[t](s)}catch(r){v(r)}},Pt=e=>e.classList.add("hydrated"),Fn=(e,t)=>q(e).$instanceValues$.get(t),Mn=(e,t,s,r)=>{const o=q(e),l=o.$hostElement$,a=o.$instanceValues$.get(t),u=o.$flags$,c=o.$lazyInstance$;s=Sn(s,r.$members$[t][0]);const f=Number.isNaN(a)&&Number.isNaN(s),$=s!==a&&!f;if((!(u&8)||a===void 0)&&$&&(o.$instanceValues$.set(t,s),c)){if(r.$watchers$&&u&128){const p=r.$watchers$[t];p&&p.map(S=>{try{c[S](s,a,t)}catch(b){v(b,l)}})}(u&18)===2&&le(o,!1)}},Tt=(e,t,s)=>{var r;const o=e.prototype;if(t.$members$){e.watchers&&(t.$watchers$=e.watchers);const l=Object.entries(t.$members$);if(l.map(([a,[u]])=>{u&31||s&2&&u&32?Object.defineProperty(o,a,{get(){return Fn(this,a)},set(c){Mn(this,a,c,t)},configurable:!0,enumerable:!0}):s&1&&u&64&&Object.defineProperty(o,a,{value(...c){var f;const $=q(this);return(f=$==null?void 0:$.$onInstancePromise$)===null||f===void 0?void 0:f.then(()=>{var p;return(p=$.$lazyInstance$)===null||p===void 0?void 0:p[a](...c)})}})}),s&1){const a=new Map;o.attributeChangedCallback=function(u,c,f){x.jmp(()=>{var $;const p=a.get(u);if(this.hasOwnProperty(p))f=this[p],delete this[p];else{if(o.hasOwnProperty(p)&&typeof this[p]=="number"&&this[p]==f)return;if(p==null){const S=q(this),b=S==null?void 0:S.$flags$;if(b&&!(b&8)&&b&128&&f!==c){const k=S.$lazyInstance$,P=($=t.$watchers$)===null||$===void 0?void 0:$[u];P==null||P.forEach(T=>{k[T]!=null&&k[T].call(k,f,c,u)})}return}}this[p]=f===null&&typeof this[p]=="boolean"?!1:f})},e.observedAttributes=Array.from(new Set([...Object.keys((r=t.$watchers$)!==null&&r!==void 0?r:{}),...l.filter(([u,c])=>c[0]&15).map(([u,c])=>{const f=c[1]||u;return a.set(f,u),f})]))}}return e},qn=async(e,t,s,r)=>{let o;if(!(t.$flags$&32)){t.$flags$|=32;{if(o=Kn(s),o.then){const c=pn();o=await o,c()}o.isProxied||(s.$watchers$=o.watchers,Tt(o,s,2),o.isProxied=!0);const u=M("createInstance",s.$tagName$);t.$flags$|=8;try{new o(t)}catch(c){v(c)}t.$flags$&=-9,t.$flags$|=128,u(),we(t.$lazyInstance$)}if(o.style){let u=o.style;const c=vt(s);if(!ie.has(c)){const f=M("registerStyles",s.$tagName$);Cn(c,u,!!(s.$flags$&1)),f()}}}const l=t.$ancestorComponent$,a=()=>le(t,!0);l&&l["s-rc"]?l["s-rc"].push(a):a()},we=e=>{Y(e,"connectedCallback")},Un=e=>{if(!(x.$flags$&1)){const t=q(e),s=t.$cmpMeta$,r=M("connectedCallback",s.$tagName$);if(t.$flags$&1)_t(e,t,s.$listeners$),t!=null&&t.$lazyInstance$?we(t.$lazyInstance$):t!=null&&t.$onReadyPromise$&&t.$onReadyPromise$.then(()=>we(t.$lazyInstance$));else{t.$flags$|=1;{let o=e;for(;o=o.parentNode||o.host;)if(o["s-p"]){Ct(t,t.$ancestorComponent$=o);break}}s.$members$&&Object.entries(s.$members$).map(([o,[l]])=>{if(l&31&&e.hasOwnProperty(o)){const a=e[o];delete e[o],e[o]=a}}),qn(e,t,s)}r()}},it=e=>{Y(e,"disconnectedCallback")},Bn=async e=>{if(!(x.$flags$&1)){const t=q(e);t.$rmListeners$&&(t.$rmListeners$.map(s=>s()),t.$rmListeners$=void 0),t!=null&&t.$lazyInstance$?it(t.$lazyInstance$):t!=null&&t.$onReadyPromise$&&t.$onReadyPromise$.then(()=>it(t.$lazyInstance$))}},Hn=(e,t={})=>{var s;const r=M(),o=[],l=t.exclude||[],a=Q.customElements,u=A.head,c=u.querySelector("meta[charset]"),f=A.createElement("style"),$=[];let p,S=!0;Object.assign(x,t),x.$resourcesUrl$=new URL(t.resourcesUrl||"./",A.baseURI).href;let b=!1;if(e.map(k=>{k[1].map(P=>{var T;const R={$flags$:P[0],$tagName$:P[1],$members$:P[2],$listeners$:P[3]};R.$flags$&4&&(b=!0),R.$members$=P[2],R.$listeners$=P[3],R.$watchers$=(T=P[4])!==null&&T!==void 0?T:{};const C=R.$tagName$,ce=class extends HTMLElement{constructor(B){super(B),B=this,Xn(B,R),R.$flags$&1&&B.attachShadow({mode:"open"})}connectedCallback(){p&&(clearTimeout(p),p=null),S?$.push(this):x.jmp(()=>Un(this))}disconnectedCallback(){x.jmp(()=>Bn(this))}componentOnReady(){return q(this).$onReadyPromise$}};R.$lazyBundleId$=k[0],!l.includes(C)&&!a.get(C)&&(o.push(C),a.define(C,Tt(ce,R,1)))})}),b&&(f.innerHTML+=ht),f.innerHTML+=o+$n,f.innerHTML.length){f.setAttribute("data-styles","");const k=(s=x.$nonce$)!==null&&s!==void 0?s:pt(A);k!=null&&f.setAttribute("nonce",k),u.insertBefore(f,c?c.nextSibling:u.firstChild)}S=!1,$.length?$.map(k=>k.connectedCallback()):x.jmp(()=>p=setTimeout(kt,30)),r()},Wn=(e,t)=>t,_t=(e,t,s,r)=>{s&&s.map(([o,l,a])=>{const u=Yn(e,o),c=zn(t,a),f=Gn(o);x.ael(u,l,c,f),(t.$rmListeners$=t.$rmListeners$||[]).push(()=>x.rel(u,l,c,f))})},zn=(e,t)=>s=>{try{e.$flags$&256?e.$lazyInstance$[t](s):(e.$queuedListeners$=e.$queuedListeners$||[]).push([t,s])}catch(r){v(r)}},Yn=(e,t)=>t&4?A:t&8?Q:t&16?A.body:e,Gn=e=>Qn?{passive:(e&1)!==0,capture:(e&2)!==0}:(e&2)!==0,Re=new WeakMap,q=e=>Re.get(e),Jn=(e,t)=>Re.set(t.$lazyInstance$=e,t),Xn=(e,t)=>{const s={$flags$:0,$hostElement$:e,$cmpMeta$:t,$instanceValues$:new Map};return s.$onInstancePromise$=new Promise(r=>s.$onInstanceResolve$=r),s.$onReadyPromise$=new Promise(r=>s.$onReadyResolve$=r),e["s-p"]=[],e["s-rc"]=[],_t(e,s,t.$listeners$),Re.set(e,s)},lt=(e,t)=>t in e,v=(e,t)=>(0,console.error)(e,t),me=new Map,Kn=(e,t,s)=>{const r=e.$tagName$.replace(/-/g,"_"),o=e.$lazyBundleId$,l=me.get(o);if(l)return l[r];if(!s||!BUILD.hotModuleReplacement){const a=u=>(me.set(o,u),u[r]);switch(o){case"nylas-if-state_3":return Promise.resolve().then(()=>require("./nylas-if-state_3.entry-6c0bf8eb.cjs")).then(a,v);case"document-refresh-icon":return Promise.resolve().then(()=>require("./document-refresh-icon.entry-3a29a6e6.cjs")).then(a,v);case"nylas-list-folders":return Promise.resolve().then(()=>require("./nylas-list-folders.entry-cc04a07e.cjs")).then(a,v);case"nylas-list-threads":return Promise.resolve().then(()=>require("./nylas-list-threads.entry-795c5a2b.cjs")).then(a,v);case"nylas-mailbox-pagination":return Promise.resolve().then(()=>require("./nylas-mailbox-pagination.entry-f701fd83.cjs")).then(a,v);case"nylas-mailbox-toolbar-button":return Promise.resolve().then(()=>require("./nylas-mailbox-toolbar-button.entry-b9d6a3c8.cjs")).then(a,v);case"nylas-open-hours-picker":return Promise.resolve().then(()=>require("./nylas-open-hours-picker.entry-aa103daf.cjs")).then(a,v);case"nylas-provider":return Promise.resolve().then(()=>require("./nylas-provider.entry-5bb55b2d.cjs")).then(a,v);case"nylas-scheduler":return Promise.resolve().then(()=>require("./nylas-scheduler.entry-ea6fb146.cjs")).then(a,v);case"nylas-threads-refresh":return Promise.resolve().then(()=>require("./nylas-threads-refresh.entry-4002608b.cjs")).then(a,v);case"nylas-threads-search":return Promise.resolve().then(()=>require("./nylas-threads-search.entry-556f1219.cjs")).then(a,v);case"nylas-view-thread":return Promise.resolve().then(()=>require("./nylas-view-thread.entry-6faf1b51.cjs")).then(a,v);case"archive-icon_7":return Promise.resolve().then(()=>require("./archive-icon_7.entry-baecb43c.cjs")).then(a,v);case"arrow-icon":return Promise.resolve().then(()=>require("./arrow-icon.entry-9ab0c414.cjs")).then(a,v);case"forward-icon_6":return Promise.resolve().then(()=>require("./forward-icon_6.entry-ce725f05.cjs")).then(a,v);case"nylas-booked-event-card_10":return Promise.resolve().then(()=>require("./nylas-booked-event-card_10.entry-27efa654.cjs")).then(a,v);case"add-circle-icon":return Promise.resolve().then(()=>require("./add-circle-icon.entry-c5fdaa6f.cjs")).then(a,v);case"bold-icon_3":return Promise.resolve().then(()=>require("./bold-icon_3.entry-50406bc7.cjs")).then(a,v);case"calendar-check-icon_3":return Promise.resolve().then(()=>require("./calendar-check-icon_3.entry-5415e916.cjs")).then(a,v);case"calendar-icon":return Promise.resolve().then(()=>require("./calendar-icon.entry-219efd7a.cjs")).then(a,v);case"close-icon_2":return Promise.resolve().then(()=>require("./close-icon_2.entry-fa4f6d3e.cjs")).then(a,v);case"play-icon_2":return Promise.resolve().then(()=>require("./play-icon_2.entry-2e21b8b9.cjs")).then(a,v);case"refresh-icon":return Promise.resolve().then(()=>require("./refresh-icon.entry-3e0aef26.cjs")).then(a,v);case"search-icon_3":return Promise.resolve().then(()=>require("./search-icon_3.entry-9b027cfc.cjs")).then(a,v);case"calendar-cancel-icon":return Promise.resolve().then(()=>require("./calendar-cancel-icon.entry-8f498984.cjs")).then(a,v);case"globe-icon":return Promise.resolve().then(()=>require("./globe-icon.entry-a0c9599a.cjs")).then(a,v);case"loading-icon":return Promise.resolve().then(()=>require("./loading-icon.entry-d2680046.cjs")).then(a,v);case"chevron-icon":return Promise.resolve().then(()=>require("./chevron-icon.entry-3c709061.cjs")).then(a,v)}}return import(`./${o}.entry.js`).then(a=>(me.set(o,a),a[r]),v)},ie=new Map,Q=typeof window<"u"?window:{},A=Q.document||{head:{}},x={$flags$:0,$resourcesUrl$:"",jmp:e=>e(),raf:e=>requestAnimationFrame(e),ael:(e,t,s,r)=>e.addEventListener(t,s,r),rel:(e,t,s,r)=>e.removeEventListener(t,s,r),ce:(e,t)=>new CustomEvent(e,t)},Qn=(()=>{let e=!1;try{A.addEventListener("e",null,Object.defineProperty({},"passive",{get(){e=!0}}))}catch{}return e})(),Zn=e=>Promise.resolve(e),Vn=(()=>{try{return new CSSStyleSheet,typeof new CSSStyleSheet().replaceSync=="function"}catch{}return!1})(),ct=[],Rt=[],er=(e,t)=>s=>{e.push(s),Se||(Se=!0,t&&x.$flags$&4?Ie(Ce):x.raf(Ce))},ut=e=>{for(let t=0;t<e.length;t++)try{e[t](performance.now())}catch(s){v(s)}e.length=0},Ce=()=>{ut(ct),ut(Rt),(Se=ct.length>0)&&x.raf(Ce)},Ie=e=>Zn().then(e),tr=er(Rt,!0);async function nr(){await Promise.resolve().then(()=>require("./elements-dc5b338e-81a0319c.cjs"))}const rr=nr,sr=(e,t)=>{if(!(typeof window>"u"))return rr(),Hn([["nylas-scheduler",[[1,"nylas-scheduler",{mode:[1],defaultSchedulerStoreState:[16],sessionId:[1,"session-id"],schedulerApiUrl:[1,"scheduler-api-url"],bookingInfo:[16],rescheduleBookingId:[1,"reschedule-booking-id"],cancelBookingId:[1,"cancel-booking-id"],eventOverrides:[16],isLoading:[4,"is-loading"],themeConfig:[16],showNotification:[4,"show-notification"],automaticComponentRegistration:[32],selectedDateLabel:[32],getNylasSchedulerStore:[64],getNylasSchedulerConnector:[64],getRef:[64]},[[0,"registerComponent","registerComponentHandler"],[0,"unregisterComponent","unregisterComponentHandler"],[0,"monthChanged","monthChangedHandler"],[0,"detailsConfirmed","bookButtonClickedHandler"],[0,"dateSelected","dateSelectedHandler"],[0,"cancelBookedEventError","cancelBookedEventErrorHandler"],[0,"rescheduleBookedEventError","rescheduleBookedEventErrorHandler"]],{bookingInfo:["bookingInfoChanged"]}]]],["nylas-view-thread",[[1,"nylas-view-thread",{draft:[16],thread:[16],messages:[16],attachments:[16],state:[32],internalMessages:[32],showAllEmails:[32],showComposer:[32]},null,{thread:["threadChanged"],messages:["updateInternalMessages"]}]]],["nylas-list-folders",[[1,"nylas-list-folders",{folders:[16],selectedFolder:[1,"selected-folder"],defaultFolders:[32],otherFolders:[32]},null,{folders:["watchFolders"]}]]],["nylas-mailbox-pagination",[[1,"nylas-mailbox-pagination",{state:[1],hasNextPage:[4,"has-next-page"],hasPreviousPage:[4,"has-previous-page"],scrollTarget:[1,"scroll-target"],mobileOnlyInfiniteScroll:[4,"mobile-only-infinite-scroll"],mobileViewPortWidth:[2,"mobile-view-port-width"],nextPage:[64],previousPage:[64]},[[9,"scroll","handlePageScroll"]]]]],["nylas-threads-refresh",[[1,"nylas-threads-refresh",{start:[32],state:[32],pulling:[32],updateState:[64]}]]],["nylas-if-state_3",[[1,"nylas-if-state",{state:[1],isStateSet:[4,"is-state-set"],isBoolean:[4,"is-boolean"],getStore:[16],transition:[1],show:[32],classes:[32]},null,{getStore:["onGetStoreChange"]}],[1,"nylas-login",{isAuthenticated:[4,"is-authenticated"],nylasConnector:[16],scopes:[16],loginMethod:[1,"login-method"],companyName:[1,"company-name"],logoUrl:[1,"logo-url"],logoWidth:[1,"logo-width"],providers:[1],buttonText:[1,"button-text"],email:[32]}],[1,"nylas-mailbox",{automaticComponentRegistration:[4,"automatic-component-registration"],eventOverrides:[16],authConfig:[16],defaultAuthStoreState:[16],defaultMailboxStoreState:[16],getMailboxStore:[64],getAuthStore:[64],getNylasAuth:[64],getNylasMailboxConnector:[64]},[[0,"registerComponent","registerComponentHandler"],[0,"unregisterComponent","unregisterComponentHandler"]]]]],["document-refresh-icon",[[2,"document-refresh-icon",{width:[1],height:[1]}]]],["nylas-list-threads",[[1,"nylas-list-threads",{threads:[16],isAuthenticated:[4,"is-authenticated"],tokenInfo:[16],state:[1],showCheckbox:[4,"show-checkbox"]}]]],["nylas-mailbox-toolbar-button",[[1,"nylas-mailbox-toolbar-button",{method:[1],dataState:[1,"data-state"],iconOnly:[4,"icon-only"],mailboxConnector:[16]}]]],["nylas-open-hours-picker",[[1,"nylas-open-hours-picker",{openHours:[16],startTime:[1040],endTime:[1040],stepMinutes:[2,"step-minutes"],dragThreshold:[2,"drag-threshold"],mobileViewPortWidth:[2,"mobile-view-port-width"],intervalMinutes:[32],times:[32],availableTimes:[32],draggingStartDate:[32],draggingEndDate:[32],inverse:[32],isMobile:[32]},[[9,"resize","onResize"]],{openHours:["whenOpenHoursChanged"],availableTimes:["availableTimesChanged"],inverse:["inverseChanged"]}]]],["nylas-provider",[[1,"nylas-provider",{authConfig:[16],eventOverrides:[16],automaticComponentRegistration:[4,"automatic-component-registration"],getNylasAuth:[64],getNylasConnector:[64],getMailboxStore:[64],getAuthStore:[64],getNylasSchedulerStore:[64]},[[0,"registerComponent","registerComponentHandler"],[0,"unregisterComponent","unregisterComponentHandler"]]]]],["nylas-threads-search",[[1,"nylas-threads-search",{query:[1],internalQuery:[32]},null,{query:["onQueryChange"]}]]],["arrow-icon",[[2,"arrow-icon",{width:[1],height:[1]}]]],["add-circle-icon",[[2,"add-circle-icon",{width:[1],height:[1]}]]],["calendar-icon",[[2,"calendar-icon",{width:[1],height:[1]}]]],["refresh-icon",[[2,"refresh-icon",{width:[1],height:[1]}]]],["calendar-cancel-icon",[[2,"calendar-cancel-icon",{width:[1],height:[1]}]]],["close-icon_2",[[2,"close-icon",{width:[1],height:[1]}],[2,"warning-icon",{width:[1],height:[1]}]]],["play-icon_2",[[2,"play-icon",{width:[1],height:[1]}],[2,"stop-icon",{width:[1],height:[1]}]]],["globe-icon",[[2,"globe-icon",{width:[1],height:[1]}]]],["loading-icon",[[1,"loading-icon",{width:[1],height:[1]}]]],["bold-icon_3",[[2,"bold-icon",{width:[1],height:[1]}],[2,"italic-icon",{width:[1],height:[1]}],[2,"underline-icon",{width:[1],height:[1]}]]],["forward-icon_6",[[1,"nylas-composer",{message:[16],viewEmailElement:[16]},null,{message:["watchBody"]}],[1,"nylas-summarize-message-button",{message:[16],state:[32],updateState:[64],playAudio:[64]}],[2,"forward-icon",{width:[1],height:[1]}],[1,"nylas-view-email",{message:[16],parent:[16],attachments:[16],detectDarkMode:[4,"detect-dark-mode"],state:[32],sanitizedBody:[32],styles:[32],viewEmailElement:[32],hoistedFontURLs:[32]},[[9,"resize","handleScroll"]],{message:["messageChanged"],viewEmailElement:["viewEmailElementChanged"]}],[2,"reply-all-icon",{width:[1],height:[1]}],[2,"reply-icon",{width:[1],height:[1]}]]],["calendar-check-icon_3",[[2,"calendar-check-icon",{width:[1],height:[1]}],[2,"checkmark-circle-icon",{width:[1],height:[1]}],[2,"people-icon",{width:[1],height:[1]}]]],["chevron-icon",[[2,"chevron-icon",{width:[1],height:[1]}]]],["search-icon_3",[[1,"select-dropdown",{name:[1],options:[16],defaultSelectedOption:[16],selectedOption:[32],isOpen:[32],searchValue:[32],filteredOptions:[32],ariaActivedescendant:[32]},[[4,"click","handleOutsideClick"]]],[2,"translate-icon",{width:[1],height:[1]}],[2,"search-icon",{width:[1],height:[1]}]]],["archive-icon_7",[[2,"archive-icon",{width:[1],height:[1]}],[2,"folder-icon",{width:[1],height:[1]}],[2,"inbox-icon",{width:[1],height:[1]}],[2,"sent-icon",{width:[1],height:[1]}],[2,"spam-icon",{width:[1],height:[1]}],[2,"star-icon",{width:[1],height:[1]}],[2,"trash-icon",{width:[1],height:[1]}]]],["nylas-booked-event-card_10",[[1,"nylas-locale-switch",{selectedTimezone:[1025,"selected-timezone"],selectedLanguage:[1025,"selected-language"]},[[0,"selectedOptionChanged","selectedOptionChangedHandler"]]],[1,"nylas-booked-event-card",{eventInfo:[16],bookingFlow:[1,"booking-flow"],bookingInfo:[8,"booking-info"]}],[1,"nylas-booking-form",{isLoading:[4,"is-loading"],bookingInfo:[8,"booking-info"],eventInfo:[16],name:[32],email:[32],guestEmails:[32],guestEmailErrors:[32],isNameValid:[32],isEmailValid:[32],validationError:[32]},null,{bookingInfo:["bookingInfoChangedHandler"]}],[1,"nylas-notification",{ttl:[2],allowedCategories:[16],notifications:[32]},[[16,"nylasSchedulerError","onError"],[16,"nylasSchedulerWarning","onWarning"],[16,"nylasSchedulerInfo","onInfo"],[16,"nylasSchedulerSuccess","onSuccess"]]],[1,"nylas-selected-event-card",{selectedDate:[16],selectedTimeslot:[16],selectedTimezone:[1,"selected-timezone"],startTime:[32],endTime:[32]},null,{selectedTimeslot:["handleSelectedTimeslotChange"]}],[1,"nylas-cancel-booking-form",{cancelBookingId:[1,"cancel-booking-id"],cancellationReason:[32],cancellationError:[32]}],[1,"nylas-cancelled-event-card",{cancelledEvent:[16]}],[1,"nylas-date-picker",{selectableDates:[16],selectedDate:[16],isLoading:[4,"is-loading"],month:[32],dates:[32]}],[2,"nylas-logo",{width:[1],height:[1]}],[1,"nylas-timeslot-picker",{selectedDate:[16],availability:[16],selectedTimeslot:[16],isLoading:[4,"loading-state"],selectedTimezone:[1,"selected-timezone"],times:[32],hoveredTimeslotIndex:[32],selectedTimeslotIndex:[32]},null,{selectedDate:["selectedDateChanged"],availability:["availabilityChanged"]}]]]],t)};(function(){if(typeof window<"u"&&window.Reflect!==void 0&&window.customElements!==void 0){var e=HTMLElement;window.HTMLElement=function(){return Reflect.construct(e,[],this.constructor)},HTMLElement.prototype=e.prototype,HTMLElement.prototype.constructor=HTMLElement,Object.setPrototypeOf(HTMLElement,e)}})();var ke={exports:{}},X={};/**
2
+ * @license React
3
+ * react-jsx-runtime.production.min.js
4
+ *
5
+ * Copyright (c) Facebook, Inc. and its affiliates.
6
+ *
7
+ * This source code is licensed under the MIT license found in the
8
+ * LICENSE file in the root directory of this source tree.
9
+ */var dt;function or(){if(dt)return X;dt=1;var e=N,t=Symbol.for("react.element"),s=Symbol.for("react.fragment"),r=Object.prototype.hasOwnProperty,o=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,l={key:!0,ref:!0,__self:!0,__source:!0};function a(u,c,f){var $,p={},S=null,b=null;f!==void 0&&(S=""+f),c.key!==void 0&&(S=""+c.key),c.ref!==void 0&&(b=c.ref);for($ in c)r.call(c,$)&&!l.hasOwnProperty($)&&(p[$]=c[$]);if(u&&u.defaultProps)for($ in c=u.defaultProps,c)p[$]===void 0&&(p[$]=c[$]);return{$$typeof:t,type:u,key:S,ref:b,props:p,_owner:o.current}}return X.Fragment=s,X.jsx=a,X.jsxs=a,X}var K={};/**
10
+ * @license React
11
+ * react-jsx-runtime.development.js
12
+ *
13
+ * Copyright (c) Facebook, Inc. and its affiliates.
14
+ *
15
+ * This source code is licensed under the MIT license found in the
16
+ * LICENSE file in the root directory of this source tree.
17
+ */var ft;function ar(){return ft||(ft=1,process.env.NODE_ENV!=="production"&&function(){var e=N,t=Symbol.for("react.element"),s=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),o=Symbol.for("react.strict_mode"),l=Symbol.for("react.profiler"),a=Symbol.for("react.provider"),u=Symbol.for("react.context"),c=Symbol.for("react.forward_ref"),f=Symbol.for("react.suspense"),$=Symbol.for("react.suspense_list"),p=Symbol.for("react.memo"),S=Symbol.for("react.lazy"),b=Symbol.for("react.offscreen"),k=Symbol.iterator,P="@@iterator";function T(n){if(n===null||typeof n!="object")return null;var i=k&&n[k]||n[P];return typeof i=="function"?i:null}var R=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function C(n){{for(var i=arguments.length,d=new Array(i>1?i-1:0),g=1;g<i;g++)d[g-1]=arguments[g];ce("error",n,d)}}function ce(n,i,d){{var g=R.ReactDebugCurrentFrame,E=g.getStackAddendum();E!==""&&(i+="%s",d=d.concat([E]));var w=d.map(function(m){return String(m)});w.unshift("Warning: "+i),Function.prototype.apply.call(console[n],console,w)}}var B=!1,Ot=!1,Lt=!1,At=!1,jt=!1,xe;xe=Symbol.for("react.module.reference");function Nt(n){return!!(typeof n=="string"||typeof n=="function"||n===r||n===l||jt||n===o||n===f||n===$||At||n===b||B||Ot||Lt||typeof n=="object"&&n!==null&&(n.$$typeof===S||n.$$typeof===p||n.$$typeof===a||n.$$typeof===u||n.$$typeof===c||n.$$typeof===xe||n.getModuleId!==void 0))}function Dt(n,i,d){var g=n.displayName;if(g)return g;var E=i.displayName||i.name||"";return E!==""?d+"("+E+")":d}function Oe(n){return n.displayName||"Context"}function D(n){if(n==null)return null;if(typeof n.tag=="number"&&C("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof n=="function")return n.displayName||n.name||null;if(typeof n=="string")return n;switch(n){case r:return"Fragment";case s:return"Portal";case l:return"Profiler";case o:return"StrictMode";case f:return"Suspense";case $:return"SuspenseList"}if(typeof n=="object")switch(n.$$typeof){case u:var i=n;return Oe(i)+".Consumer";case a:var d=n;return Oe(d._context)+".Provider";case c:return Dt(n,n.render,"ForwardRef");case p:var g=n.displayName||null;return g!==null?g:D(n.type)||"Memo";case S:{var E=n,w=E._payload,m=E._init;try{return D(m(w))}catch{return null}}}return null}var U=Object.assign,G=0,Le,Ae,je,Ne,De,Fe,Me;function qe(){}qe.__reactDisabledLog=!0;function Ft(){{if(G===0){Le=console.log,Ae=console.info,je=console.warn,Ne=console.error,De=console.group,Fe=console.groupCollapsed,Me=console.groupEnd;var n={configurable:!0,enumerable:!0,value:qe,writable:!0};Object.defineProperties(console,{info:n,log:n,warn:n,error:n,group:n,groupCollapsed:n,groupEnd:n})}G++}}function Mt(){{if(G--,G===0){var n={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:U({},n,{value:Le}),info:U({},n,{value:Ae}),warn:U({},n,{value:je}),error:U({},n,{value:Ne}),group:U({},n,{value:De}),groupCollapsed:U({},n,{value:Fe}),groupEnd:U({},n,{value:Me})})}G<0&&C("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var ue=R.ReactCurrentDispatcher,de;function Z(n,i,d){{if(de===void 0)try{throw Error()}catch(E){var g=E.stack.trim().match(/\n( *(at )?)/);de=g&&g[1]||""}return`
18
+ `+de+n}}var fe=!1,V;{var qt=typeof WeakMap=="function"?WeakMap:Map;V=new qt}function Ue(n,i){if(!n||fe)return"";{var d=V.get(n);if(d!==void 0)return d}var g;fe=!0;var E=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var w;w=ue.current,ue.current=null,Ft();try{if(i){var m=function(){throw Error()};if(Object.defineProperty(m.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(m,[])}catch(F){g=F}Reflect.construct(n,[],m)}else{try{m.call()}catch(F){g=F}n.call(m.prototype)}}else{try{throw Error()}catch(F){g=F}n()}}catch(F){if(F&&g&&typeof F.stack=="string"){for(var y=F.stack.split(`
19
+ `),O=g.stack.split(`
20
+ `),_=y.length-1,I=O.length-1;_>=1&&I>=0&&y[_]!==O[I];)I--;for(;_>=1&&I>=0;_--,I--)if(y[_]!==O[I]){if(_!==1||I!==1)do if(_--,I--,I<0||y[_]!==O[I]){var j=`
21
+ `+y[_].replace(" at new "," at ");return n.displayName&&j.includes("<anonymous>")&&(j=j.replace("<anonymous>",n.displayName)),typeof n=="function"&&V.set(n,j),j}while(_>=1&&I>=0);break}}}finally{fe=!1,ue.current=w,Mt(),Error.prepareStackTrace=E}var W=n?n.displayName||n.name:"",et=W?Z(W):"";return typeof n=="function"&&V.set(n,et),et}function Ut(n,i,d){return Ue(n,!1)}function Bt(n){var i=n.prototype;return!!(i&&i.isReactComponent)}function ee(n,i,d){if(n==null)return"";if(typeof n=="function")return Ue(n,Bt(n));if(typeof n=="string")return Z(n);switch(n){case f:return Z("Suspense");case $:return Z("SuspenseList")}if(typeof n=="object")switch(n.$$typeof){case c:return Ut(n.render);case p:return ee(n.type,i,d);case S:{var g=n,E=g._payload,w=g._init;try{return ee(w(E),i,d)}catch{}}}return""}var te=Object.prototype.hasOwnProperty,Be={},He=R.ReactDebugCurrentFrame;function ne(n){if(n){var i=n._owner,d=ee(n.type,n._source,i?i.type:null);He.setExtraStackFrame(d)}else He.setExtraStackFrame(null)}function Ht(n,i,d,g,E){{var w=Function.call.bind(te);for(var m in n)if(w(n,m)){var y=void 0;try{if(typeof n[m]!="function"){var O=Error((g||"React class")+": "+d+" type `"+m+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof n[m]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw O.name="Invariant Violation",O}y=n[m](i,m,g,d,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(_){y=_}y&&!(y instanceof Error)&&(ne(E),C("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",g||"React class",d,m,typeof y),ne(null)),y instanceof Error&&!(y.message in Be)&&(Be[y.message]=!0,ne(E),C("Failed %s type: %s",d,y.message),ne(null))}}}var Wt=Array.isArray;function he(n){return Wt(n)}function zt(n){{var i=typeof Symbol=="function"&&Symbol.toStringTag,d=i&&n[Symbol.toStringTag]||n.constructor.name||"Object";return d}}function Yt(n){try{return We(n),!1}catch{return!0}}function We(n){return""+n}function ze(n){if(Yt(n))return C("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",zt(n)),We(n)}var J=R.ReactCurrentOwner,Gt={key:!0,ref:!0,__self:!0,__source:!0},Ye,Ge,pe;pe={};function Jt(n){if(te.call(n,"ref")){var i=Object.getOwnPropertyDescriptor(n,"ref").get;if(i&&i.isReactWarning)return!1}return n.ref!==void 0}function Xt(n){if(te.call(n,"key")){var i=Object.getOwnPropertyDescriptor(n,"key").get;if(i&&i.isReactWarning)return!1}return n.key!==void 0}function Kt(n,i){if(typeof n.ref=="string"&&J.current&&i&&J.current.stateNode!==i){var d=D(J.current.type);pe[d]||(C('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref',D(J.current.type),n.ref),pe[d]=!0)}}function Qt(n,i){{var d=function(){Ye||(Ye=!0,C("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",i))};d.isReactWarning=!0,Object.defineProperty(n,"key",{get:d,configurable:!0})}}function Zt(n,i){{var d=function(){Ge||(Ge=!0,C("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",i))};d.isReactWarning=!0,Object.defineProperty(n,"ref",{get:d,configurable:!0})}}var Vt=function(n,i,d,g,E,w,m){var y={$$typeof:t,type:n,key:i,ref:d,props:m,_owner:w};return y._store={},Object.defineProperty(y._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(y,"_self",{configurable:!1,enumerable:!1,writable:!1,value:g}),Object.defineProperty(y,"_source",{configurable:!1,enumerable:!1,writable:!1,value:E}),Object.freeze&&(Object.freeze(y.props),Object.freeze(y)),y};function en(n,i,d,g,E){{var w,m={},y=null,O=null;d!==void 0&&(ze(d),y=""+d),Xt(i)&&(ze(i.key),y=""+i.key),Jt(i)&&(O=i.ref,Kt(i,E));for(w in i)te.call(i,w)&&!Gt.hasOwnProperty(w)&&(m[w]=i[w]);if(n&&n.defaultProps){var _=n.defaultProps;for(w in _)m[w]===void 0&&(m[w]=_[w])}if(y||O){var I=typeof n=="function"?n.displayName||n.name||"Unknown":n;y&&Qt(m,I),O&&Zt(m,I)}return Vt(n,y,O,E,g,J.current,m)}}var $e=R.ReactCurrentOwner,Je=R.ReactDebugCurrentFrame;function H(n){if(n){var i=n._owner,d=ee(n.type,n._source,i?i.type:null);Je.setExtraStackFrame(d)}else Je.setExtraStackFrame(null)}var ge;ge=!1;function ye(n){return typeof n=="object"&&n!==null&&n.$$typeof===t}function Xe(){{if($e.current){var n=D($e.current.type);if(n)return`
22
+
23
+ Check the render method of \``+n+"`."}return""}}function tn(n){{if(n!==void 0){var i=n.fileName.replace(/^.*[\\\/]/,""),d=n.lineNumber;return`
24
+
25
+ Check your code at `+i+":"+d+"."}return""}}var Ke={};function nn(n){{var i=Xe();if(!i){var d=typeof n=="string"?n:n.displayName||n.name;d&&(i=`
26
+
27
+ Check the top-level render call using <`+d+">.")}return i}}function Qe(n,i){{if(!n._store||n._store.validated||n.key!=null)return;n._store.validated=!0;var d=nn(i);if(Ke[d])return;Ke[d]=!0;var g="";n&&n._owner&&n._owner!==$e.current&&(g=" It was passed a child from "+D(n._owner.type)+"."),H(n),C('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',d,g),H(null)}}function Ze(n,i){{if(typeof n!="object")return;if(he(n))for(var d=0;d<n.length;d++){var g=n[d];ye(g)&&Qe(g,i)}else if(ye(n))n._store&&(n._store.validated=!0);else if(n){var E=T(n);if(typeof E=="function"&&E!==n.entries)for(var w=E.call(n),m;!(m=w.next()).done;)ye(m.value)&&Qe(m.value,i)}}}function rn(n){{var i=n.type;if(i==null||typeof i=="string")return;var d;if(typeof i=="function")d=i.propTypes;else if(typeof i=="object"&&(i.$$typeof===c||i.$$typeof===p))d=i.propTypes;else return;if(d){var g=D(i);Ht(d,n.props,"prop",g,n)}else if(i.PropTypes!==void 0&&!ge){ge=!0;var E=D(i);C("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",E||"Unknown")}typeof i.getDefaultProps=="function"&&!i.getDefaultProps.isReactClassApproved&&C("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function sn(n){{for(var i=Object.keys(n.props),d=0;d<i.length;d++){var g=i[d];if(g!=="children"&&g!=="key"){H(n),C("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",g),H(null);break}}n.ref!==null&&(H(n),C("Invalid attribute `ref` supplied to `React.Fragment`."),H(null))}}function Ve(n,i,d,g,E,w){{var m=Nt(n);if(!m){var y="";(n===void 0||typeof n=="object"&&n!==null&&Object.keys(n).length===0)&&(y+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");var O=tn(E);O?y+=O:y+=Xe();var _;n===null?_="null":he(n)?_="array":n!==void 0&&n.$$typeof===t?(_="<"+(D(n.type)||"Unknown")+" />",y=" Did you accidentally export a JSX literal instead of a component?"):_=typeof n,C("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",_,y)}var I=en(n,i,d,E,w);if(I==null)return I;if(m){var j=i.children;if(j!==void 0)if(g)if(he(j)){for(var W=0;W<j.length;W++)Ze(j[W],n);Object.freeze&&Object.freeze(j)}else C("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else Ze(j,n)}return n===r?sn(I):rn(I),I}}function on(n,i,d){return Ve(n,i,d,!0)}function an(n,i,d){return Ve(n,i,d,!1)}var ln=an,cn=on;K.Fragment=r,K.jsx=ln,K.jsxs=cn}()),K}process.env.NODE_ENV==="production"?ke.exports=or():ke.exports=ar();var ir=ke.exports;const lr=e=>e.toLowerCase().split("-").map(t=>t.charAt(0).toUpperCase()+t.slice(1)).join(""),It=e=>e.replace(/([A-Z])/g,t=>`-${t[0].toLowerCase()}`),cr=(e,t,s={})=>{if(e instanceof Element){const r=ur(e.classList,t,s);r!==""&&(e.className=r),Object.keys(t).forEach(o=>{if(!(o==="children"||o==="style"||o==="ref"||o==="class"||o==="className"||o==="forwardedRef"))if(o.indexOf("on")===0&&o[2]===o[2].toUpperCase()){const l=o.substring(2),a=l[0].toLowerCase()+l.substring(1);xt(a)||fr(e,a,t[o])}else e[o]=t[o],typeof t[o]==="string"&&e.setAttribute(It(o),t[o])})}},ur=(e,t,s)=>{const r=t.className||t.class,o=s.className||s.class,l=be(e),a=be(r?r.split(" "):[]),u=be(o?o.split(" "):[]),c=[];return l.forEach(f=>{a.has(f)?(c.push(f),a.delete(f)):u.has(f)||c.push(f)}),a.forEach(f=>c.push(f)),c.join(" ")},dr=e=>{switch(e){case"doubleclick":return"dblclick"}return e};/**
28
+ * Checks if an event is supported in the current execution environment.
29
+ * @license Modernizr 3.0.0pre (Custom Build) | MIT
30
+ */const xt=e=>{if(typeof document>"u")return!0;{const t="on"+dr(e);let s=t in document;if(!s){const r=document.createElement("div");r.setAttribute(t,"return;"),s=typeof r[t]=="function"}return s}},fr=(e,t,s)=>{const r=e.__events||(e.__events={}),o=r[t];o&&e.removeEventListener(t,o),e.addEventListener(t,r[t]=function(a){s&&s.call(this,a)})},be=e=>{const t=new Map;return e.forEach(s=>t.set(s,s)),t},hr=(e,t)=>{typeof e=="function"?e(t):e!=null&&(e.current=t)},pr=(...e)=>t=>{e.forEach(s=>{hr(s,t)})},$r=(e,t)=>{const s=(r,o)=>ir.jsx(e,{...r,forwardedRef:o});return s.displayName=t,N.forwardRef(s)},h=(e,t,s,r)=>{r!==void 0&&r();const o=lr(e),l=class extends N.Component{constructor(u){super(u);ve(this,"componentEl");ve(this,"setComponentElRef",u=>{this.componentEl=u})}componentDidMount(){this.componentDidUpdate(this.props)}componentDidUpdate(u){cr(this.componentEl,this.props,u)}render(){const{children:u,forwardedRef:c,style:f,className:$,ref:p,...S}=this.props;let b=Object.keys(S).reduce((P,T)=>{const R=S[T];if(T.indexOf("on")===0&&T[2]===T[2].toUpperCase()){const C=T.substring(2).toLowerCase();typeof document<"u"&&xt(C)&&(P[T]=R)}else{const C=typeof R;(C==="string"||C==="boolean"||C==="number")&&(P[It(T)]=R)}return P},{});s&&(b=s(this.props,b));const k={...b,ref:pr(c,this.setComponentElRef),style:f};return N.createElement(e,k,u)}static get displayName(){return o}};return t&&(l.contextType=t),$r(l,o)},gr=h("add-circle-icon"),yr=h("archive-icon"),vr=h("arrow-icon"),mr=h("bold-icon"),br=h("calendar-cancel-icon"),Er=h("calendar-check-icon"),Sr=h("calendar-icon"),wr=h("checkmark-circle-icon"),Cr=h("chevron-icon"),kr=h("close-icon"),Pr=h("document-refresh-icon"),Tr=h("folder-icon"),_r=h("forward-icon"),Rr=h("globe-icon"),Ir=h("inbox-icon"),xr=h("italic-icon"),Or=h("loading-icon"),Lr=h("nylas-booked-event-card"),Ar=h("nylas-booking-form"),jr=h("nylas-cancel-booking-form"),Nr=h("nylas-cancelled-event-card"),Dr=h("nylas-composer"),Fr=h("nylas-date-picker"),Mr=h("nylas-if-state"),qr=h("nylas-list-folders"),Ur=h("nylas-list-threads"),Br=h("nylas-locale-switch"),Hr=h("nylas-login"),Wr=h("nylas-logo"),zr=h("nylas-mailbox"),Yr=h("nylas-mailbox-pagination"),Gr=h("nylas-mailbox-toolbar-button"),Jr=h("nylas-notification"),Xr=h("nylas-open-hours-picker"),Kr=h("nylas-provider"),Qr=h("nylas-scheduler"),Zr=h("nylas-selected-event-card"),Vr=h("nylas-summarize-message-button"),es=h("nylas-threads-refresh"),ts=h("nylas-threads-search"),ns=h("nylas-timeslot-picker"),rs=h("nylas-view-email"),ss=h("nylas-view-thread"),os=h("people-icon"),as=h("play-icon"),is=h("refresh-icon"),ls=h("reply-all-icon"),cs=h("reply-icon"),us=h("search-icon"),ds=h("select-dropdown"),fs=h("sent-icon"),hs=h("spam-icon"),ps=h("star-icon"),$s=h("stop-icon"),gs=h("translate-icon"),ys=h("trash-icon"),vs=h("underline-icon"),ms=h("warning-icon");function bs(){const[,e]=N.useReducer(o=>o+1,0),t=N.useRef(),s=N.useRef(null),r=N.useRef(null);return N.useEffect(()=>{t.current&&(s.current||t.current.getNylasMailboxConnector().then(o=>{o&&(s.current=o,r.current=s.current.nylasAuthStore,o.nylasAuthStore.on("set",e),e())}))},[]),[t,r.current]}exports.AddCircleIcon=gr;exports.ArchiveIcon=yr;exports.ArrowIcon=vr;exports.BoldIcon=mr;exports.CalendarCancelIcon=br;exports.CalendarCheckIcon=Er;exports.CalendarIcon=Sr;exports.CheckmarkCircleIcon=wr;exports.ChevronIcon=Cr;exports.CloseIcon=kr;exports.DocumentRefreshIcon=Pr;exports.FolderIcon=Tr;exports.ForwardIcon=_r;exports.Fragment=Wn;exports.GlobeIcon=Rr;exports.Host=$t;exports.InboxIcon=Ir;exports.ItalicIcon=xr;exports.LoadingIcon=Or;exports.NylasBookedEventCard=Lr;exports.NylasBookingForm=Ar;exports.NylasCancelBookingForm=jr;exports.NylasCancelledEventCard=Nr;exports.NylasComposer=Dr;exports.NylasDatePicker=Fr;exports.NylasIfState=Mr;exports.NylasListFolders=qr;exports.NylasListThreads=Ur;exports.NylasLocaleSwitch=Br;exports.NylasLogin=Hr;exports.NylasLogo=Wr;exports.NylasMailbox=zr;exports.NylasMailboxPagination=Yr;exports.NylasMailboxToolbarButton=Gr;exports.NylasNotification=Jr;exports.NylasOpenHoursPicker=Xr;exports.NylasProvider=Kr;exports.NylasScheduler=Qr;exports.NylasSelectedEventCard=Zr;exports.NylasSummarizeMessageButton=Vr;exports.NylasThreadsRefresh=es;exports.NylasThreadsSearch=ts;exports.NylasTimeslotPicker=ns;exports.NylasViewEmail=rs;exports.NylasViewThread=ss;exports.PeopleIcon=os;exports.PlayIcon=as;exports.RefreshIcon=is;exports.ReplyAllIcon=ls;exports.ReplyIcon=cs;exports.SearchIcon=us;exports.SelectDropdown=ds;exports.SentIcon=fs;exports.SpamIcon=hs;exports.StarIcon=ps;exports.StopIcon=$s;exports.TranslateIcon=gs;exports.TrashIcon=ys;exports.UnderlineIcon=vs;exports.WarningIcon=ms;exports.applyPolyfills=fn;exports.createEvent=wn;exports.defineCustomElements=sr;exports.forceUpdate=Dn;exports.getElement=gt;exports.getRenderingRef=jn;exports.h=_e;exports.registerInstance=Jn;exports.useNylasMailboxElement=bs;