@nylas/react 1.1.0-canary.21 → 1.1.0-canary.23

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 (138) hide show
  1. package/dist/{add-circle-icon_2.entry-b8d6df60.js → add-circle-icon_3.entry-37a88ff3.js} +23 -13
  2. package/dist/add-circle-icon_3.entry-4f8f1cbf.cjs +1 -0
  3. package/dist/{archive-icon_7.entry-afaef817.cjs → archive-icon_7.entry-2ec9b077.cjs} +1 -1
  4. package/dist/{archive-icon_7.entry-3830776a.js → archive-icon_7.entry-3dcc4a66.js} +16 -16
  5. package/dist/{arrow-icon.entry-460cdd9f.cjs → arrow-icon.entry-175e8181.cjs} +1 -1
  6. package/dist/arrow-icon.entry-2cf3e94d.js +15 -0
  7. package/dist/{bold-icon_3.entry-80abafbb.js → bold-icon_3.entry-9fc74a39.js} +4 -4
  8. package/dist/{bold-icon_3.entry-1893eeec.cjs → bold-icon_3.entry-a3e61ad8.cjs} +1 -1
  9. package/dist/{button-component.entry-b78dc39e.cjs → button-component.entry-7fdb3bca.cjs} +1 -1
  10. package/dist/{button-component.entry-36137536.js → button-component.entry-861637f2.js} +2 -2
  11. package/dist/calendar-agenda-fill-icon_39.entry-3c21a3ec.cjs +7 -0
  12. package/dist/{calendar-agenda-fill-icon_40.entry-f19d6ad7.js → calendar-agenda-fill-icon_39.entry-493e91f6.js} +1268 -1300
  13. package/dist/{calendar-cancel-icon.entry-1fae00c5.js → calendar-cancel-icon.entry-3ca731f9.js} +2 -2
  14. package/dist/{calendar-cancel-icon.entry-0d83ee82.cjs → calendar-cancel-icon.entry-c9c7e3b3.cjs} +1 -1
  15. package/dist/{calendar-check-icon_2.entry-e01c9028.cjs → calendar-check-icon_2.entry-5b8f8a75.cjs} +1 -1
  16. package/dist/{calendar-check-icon_2.entry-159c38af.js → calendar-check-icon_2.entry-7c409a91.js} +5 -5
  17. package/dist/{calendar-icon.entry-3af9cb76.js → calendar-icon.entry-0589697f.js} +4 -4
  18. package/dist/{calendar-icon.entry-2e701aab.cjs → calendar-icon.entry-acd00f6f.cjs} +1 -1
  19. package/dist/{checkbox-component_2.entry-9ff2c85b.cjs → checkbox-component_2.entry-0aa252b9.cjs} +1 -1
  20. package/dist/{checkbox-component_2.entry-5eee51f6.js → checkbox-component_2.entry-538fd8ec.js} +3 -3
  21. package/dist/{checkmark-icon.entry-f96f1117.cjs → checkmark-icon.entry-0a184b31.cjs} +1 -1
  22. package/dist/{checkmark-icon.entry-0749b942.js → checkmark-icon.entry-56302db0.js} +4 -4
  23. package/dist/{chevron-icon_3.entry-c3989df2.cjs → chevron-icon_3.entry-7076e105.cjs} +1 -1
  24. package/dist/{chevron-icon_3.entry-2e9eebbc.js → chevron-icon_3.entry-80e03257.js} +13 -13
  25. package/dist/{clock-icon_4.entry-d4563931.cjs → clock-icon_4.entry-d6901afd.cjs} +1 -1
  26. package/dist/{clock-icon_4.entry-9395d0cb.js → clock-icon_4.entry-db3fbda1.js} +19 -19
  27. package/dist/{constants-67de2eec-e3b50fc6.cjs → constants-12bd3c98-22fd56f2.cjs} +1 -1
  28. package/dist/{constants-67de2eec-b17f5b96.js → constants-12bd3c98-26c75011.js} +4 -4
  29. package/dist/{copy-icon_3.entry-7de3667f.cjs → copy-icon_3.entry-33e89a37.cjs} +1 -1
  30. package/dist/{copy-icon_3.entry-7b276fa2.js → copy-icon_3.entry-9670b9f9.js} +7 -7
  31. package/dist/{document-refresh-icon.entry-6dd65cb6.js → document-refresh-icon.entry-149f2a3b.js} +5 -5
  32. package/dist/document-refresh-icon.entry-a3326831.cjs +1 -0
  33. package/dist/elements/index.d.ts +3 -0
  34. package/dist/{elements-dc5b338e-158dce67.cjs → elements-dc5b338e-211879a3.cjs} +1 -1
  35. package/dist/{elements-dc5b338e-5e8a704b.js → elements-dc5b338e-e07600d4.js} +1 -1
  36. package/dist/{focus-visible-e8093c16-9d88e8ee.js → focus-visible-e8093c16-284cefe0.js} +1 -1
  37. package/dist/{focus-visible-e8093c16-5883a317.cjs → focus-visible-e8093c16-cb97634f.cjs} +1 -1
  38. package/dist/{forward-icon_6.entry-acdf04ad.js → forward-icon_6.entry-554b0722.js} +9 -9
  39. package/dist/{forward-icon_6.entry-a59dada5.cjs → forward-icon_6.entry-751fdd4e.cjs} +3 -3
  40. package/dist/{globe-icon.entry-eef27331.cjs → globe-icon.entry-63eb510d.cjs} +1 -1
  41. package/dist/{globe-icon.entry-389c0391.js → globe-icon.entry-e3dd58bc.js} +2 -2
  42. package/dist/google-logo-icon_5.entry-bccce7f4.cjs +1 -0
  43. package/dist/google-logo-icon_5.entry-e462e091.js +748 -0
  44. package/dist/index-53420959-02fe58ef.js +5 -0
  45. package/dist/index-53420959-0b9c205e.cjs +1 -0
  46. package/dist/{index-6d9eeb53-15c69801.cjs → index-6d9eeb53-81e5b798.cjs} +1 -1
  47. package/dist/{index-6d9eeb53-c70fc8a7.js → index-6d9eeb53-cc42c6f1.js} +2 -2
  48. package/dist/{index-db48e0b6.cjs → index-8a536089.cjs} +14 -14
  49. package/dist/{index-f8317a8e.js → index-a15916e5.js} +398 -383
  50. package/dist/{index.es-b16d0cf5-d7f30c4a.cjs → index.es-5355a265-e701a627.cjs} +1 -1
  51. package/dist/{index.es-b16d0cf5-386496a9.js → index.es-5355a265-f8853ce4.js} +1 -1
  52. package/dist/{info-icon_2.entry-97d75550.js → info-icon_2.entry-3b349f01.js} +5 -5
  53. package/dist/{info-icon_2.entry-63914227.cjs → info-icon_2.entry-9559cf3b.cjs} +1 -1
  54. package/dist/{input-dropdown.entry-4d29246a.js → input-dropdown.entry-9bc68630.js} +2 -2
  55. package/dist/{input-dropdown.entry-629d7b54.cjs → input-dropdown.entry-d454f6bc.cjs} +1 -1
  56. package/dist/loading-icon.entry-1d49e471.js +15 -0
  57. package/dist/loading-icon.entry-a68da48b.cjs +1 -0
  58. package/dist/{mailbox-store-f11de360-d781fd36.js → mailbox-store-31d55036-1106efe2.js} +2 -2
  59. package/dist/{mailbox-store-f11de360-02a6de93.cjs → mailbox-store-31d55036-c8618c0b.cjs} +1 -1
  60. package/dist/{multi-select-dropdown.entry-8e14e9af.js → multi-select-dropdown.entry-36074a81.js} +2 -2
  61. package/dist/{multi-select-dropdown.entry-68fcca98.cjs → multi-select-dropdown.entry-e5ed9285.cjs} +1 -1
  62. package/dist/{nylas-booked-event-card_10.entry-9487941d.js → nylas-booked-event-card_10.entry-38d2fd2e.js} +75 -74
  63. package/dist/nylas-booked-event-card_10.entry-e530a8db.cjs +1 -0
  64. package/dist/nylas-booking-confirmation-type.entry-2fea82f9.js +106 -0
  65. package/dist/nylas-booking-confirmation-type.entry-5857a863.cjs +1 -0
  66. package/dist/{nylas-form-card.entry-ca669dea.cjs → nylas-form-card.entry-03a31218.cjs} +1 -1
  67. package/dist/{nylas-form-card.entry-ccfa5692.js → nylas-form-card.entry-6e45c873.js} +19 -19
  68. package/dist/{nylas-if-state.entry-93935670.js → nylas-if-state.entry-092f4e1a.js} +3 -3
  69. package/dist/{nylas-if-state.entry-faa11bb6.cjs → nylas-if-state.entry-61d7ebc5.cjs} +1 -1
  70. package/dist/{nylas-list-folders.entry-e7e179ea.cjs → nylas-list-folders.entry-1abbb401.cjs} +1 -1
  71. package/dist/{nylas-list-folders.entry-14fc1fe8.js → nylas-list-folders.entry-ab9e1c2c.js} +3 -3
  72. package/dist/{nylas-list-threads.entry-2118b146.js → nylas-list-threads.entry-2faaa2bb.js} +3 -3
  73. package/dist/{nylas-list-threads.entry-3f52fc06.cjs → nylas-list-threads.entry-dfc87aca.cjs} +1 -1
  74. package/dist/{nylas-login.entry-87a902d6.js → nylas-login.entry-243ae09e.js} +7 -7
  75. package/dist/{nylas-login.entry-915f0284.cjs → nylas-login.entry-d1cac0a1.cjs} +1 -1
  76. package/dist/{nylas-mailbox-pagination.entry-eedbf796.js → nylas-mailbox-pagination.entry-b8225a3e.js} +2 -2
  77. package/dist/{nylas-mailbox-pagination.entry-9aa8a606.cjs → nylas-mailbox-pagination.entry-c27af71c.cjs} +1 -1
  78. package/dist/{nylas-mailbox-toolbar-button.entry-40b75810.js → nylas-mailbox-toolbar-button.entry-22347d22.js} +7 -7
  79. package/dist/{nylas-mailbox-toolbar-button.entry-ba5b826e.cjs → nylas-mailbox-toolbar-button.entry-b66d597d.cjs} +1 -1
  80. package/dist/{nylas-mailbox.entry-179e5a5c.js → nylas-mailbox.entry-9e6e1b4d.js} +4 -4
  81. package/dist/{nylas-mailbox.entry-31de7f8f.cjs → nylas-mailbox.entry-cb80f58c.cjs} +1 -1
  82. package/dist/{nylas-provider.entry-7b70bbdc.js → nylas-provider.entry-196dd5da.js} +8 -8
  83. package/dist/{nylas-provider.entry-46fe01b6.cjs → nylas-provider.entry-28c12448.cjs} +1 -1
  84. package/dist/nylas-reminder-emails.entry-47ef5a9d.cjs +4 -0
  85. package/dist/nylas-reminder-emails.entry-b655d888.js +129 -0
  86. package/dist/nylas-reminder-time_2.entry-0f3747fb.cjs +1 -0
  87. package/dist/nylas-reminder-time_2.entry-9d8f7436.js +105 -0
  88. package/dist/{nylas-scheduler-editor.entry-76b68f66.cjs → nylas-scheduler-editor.entry-504e8ed3.cjs} +2 -2
  89. package/dist/{nylas-scheduler-editor.entry-f1f80de1.js → nylas-scheduler-editor.entry-feb7a7db.js} +12 -11
  90. package/dist/nylas-scheduling.entry-8c8f8e35.cjs +1 -0
  91. package/dist/{nylas-scheduling.entry-31d13205.js → nylas-scheduling.entry-d35efa9a.js} +73 -73
  92. package/dist/{nylas-threads-refresh.entry-a3ea46aa.js → nylas-threads-refresh.entry-91af9af3.js} +4 -4
  93. package/dist/{nylas-threads-refresh.entry-c9f9db8c.cjs → nylas-threads-refresh.entry-e637161b.cjs} +1 -1
  94. package/dist/{nylas-threads-search.entry-01482ddf.js → nylas-threads-search.entry-5457dcec.js} +5 -5
  95. package/dist/{nylas-threads-search.entry-a4ab0d47.cjs → nylas-threads-search.entry-b944f95a.cjs} +1 -1
  96. package/dist/{nylas-time-window-picker.entry-5a3bb0b7.cjs → nylas-time-window-picker.entry-134ef726.cjs} +1 -1
  97. package/dist/{nylas-time-window-picker.entry-5f063b2b.js → nylas-time-window-picker.entry-a6fd216b.js} +12 -12
  98. package/dist/{nylas-view-thread.entry-cb057b9e.js → nylas-view-thread.entry-6fdd6cb1.js} +3 -3
  99. package/dist/{nylas-view-thread.entry-82e78b82.cjs → nylas-view-thread.entry-9296a505.cjs} +1 -1
  100. package/dist/{person-icon.entry-78cdc7f9.cjs → person-icon.entry-1cdb4dc2.cjs} +1 -1
  101. package/dist/{person-icon.entry-3e30c63c.js → person-icon.entry-4a695727.js} +4 -4
  102. package/dist/{play-icon_2.entry-4fb1938c.cjs → play-icon_2.entry-10fd617e.cjs} +1 -1
  103. package/dist/{play-icon_2.entry-71eaad5c.js → play-icon_2.entry-fb013b17.js} +6 -6
  104. package/dist/react.cjs +1 -1
  105. package/dist/react.js +104 -101
  106. package/dist/{refresh-icon.entry-db85d14d.js → refresh-icon.entry-46c92605.js} +4 -4
  107. package/dist/{refresh-icon.entry-3570353d.cjs → refresh-icon.entry-9dbb04ba.cjs} +1 -1
  108. package/dist/{register-component-b2a51b20-9a913603.cjs → register-component-592986c5-5edf5835.cjs} +1 -1
  109. package/dist/{register-component-b2a51b20-8a262dcf.js → register-component-592986c5-d5d210a8.js} +1 -1
  110. package/dist/{scheduler-config-store-9ccfba4d-6806e3cb.cjs → scheduler-config-store-9ccfba4d-3ec35859.cjs} +1 -1
  111. package/dist/{scheduler-config-store-9ccfba4d-a6745ccc.js → scheduler-config-store-9ccfba4d-b08031b5.js} +1 -1
  112. package/dist/{scheduler-store-db06b30a-1e63b67f.js → scheduler-store-fd0d11a5-313e8592.js} +1 -1
  113. package/dist/{scheduler-store-db06b30a-d5e6b6c3.cjs → scheduler-store-fd0d11a5-b180b3b7.cjs} +1 -1
  114. package/dist/{textarea-component.entry-f5f402a1.js → textarea-component.entry-0cd3b57f.js} +4 -4
  115. package/dist/{textarea-component.entry-be870b8f.cjs → textarea-component.entry-788eb37a.cjs} +1 -1
  116. package/dist/{time-period-selector.entry-d1a8470b.js → time-period-selector.entry-112c0b64.js} +6 -6
  117. package/dist/{time-period-selector.entry-fc7d61c6.cjs → time-period-selector.entry-1e0b720b.cjs} +1 -1
  118. package/dist/{translate-icon.entry-b91a0449.js → translate-icon.entry-a4df3c16.js} +4 -4
  119. package/dist/{translate-icon.entry-3ae0ddae.cjs → translate-icon.entry-c701b391.cjs} +1 -1
  120. package/dist/{warning-icon.entry-54127f45.cjs → warning-icon.entry-bda0aafa.cjs} +1 -1
  121. package/dist/{warning-icon.entry-acdc811b.js → warning-icon.entry-d1703715.js} +7 -7
  122. package/package.json +3 -3
  123. package/dist/add-circle-icon_2.entry-29cc2385.cjs +0 -1
  124. package/dist/arrow-icon.entry-19f00716.js +0 -15
  125. package/dist/calendar-agenda-fill-icon_40.entry-62c66fce.cjs +0 -10
  126. package/dist/close-icon.entry-cf9f0a69.js +0 -15
  127. package/dist/close-icon.entry-e24af309.cjs +0 -1
  128. package/dist/document-refresh-icon.entry-582ac233.cjs +0 -1
  129. package/dist/google-logo-icon_4.entry-e9be320c.cjs +0 -1
  130. package/dist/google-logo-icon_4.entry-eae19fc8.js +0 -637
  131. package/dist/index-53420959-82a5306f.cjs +0 -1
  132. package/dist/index-53420959-9b1699ec.js +0 -5
  133. package/dist/loading-icon.entry-2f15a09f.cjs +0 -1
  134. package/dist/loading-icon.entry-fc9bc740.js +0 -15
  135. package/dist/nylas-booked-event-card_10.entry-4da23b61.cjs +0 -1
  136. package/dist/nylas-custom-booking-flow.entry-0e16973b.js +0 -106
  137. package/dist/nylas-custom-booking-flow.entry-338b0a8f.cjs +0 -1
  138. package/dist/nylas-scheduling.entry-3ce8c52f.cjs +0 -1
@@ -1,5 +1,5 @@
1
- import { r as k, c as p, d, h as a, t as M, F as m, H as x, g as E, q as D, a as S, s as g } from "./index-f8317a8e.js";
2
- import { R as T } from "./register-component-b2a51b20-8a262dcf.js";
1
+ import { r as k, c as p, d, h as a, t as M, F as m, H as x, g as E, q as D, a as S, s as g } from "./index-a15916e5.js";
2
+ import { R as T } from "./register-component-592986c5-d5d210a8.js";
3
3
  import "react";
4
4
  import "react-dom";
5
5
  function R(t, e, s, o, r) {
@@ -162,7 +162,7 @@ const C = class {
162
162
  render() {
163
163
  var r, n, l;
164
164
  const t = this.internalMessages.length > 2 ? this.internalMessages[0] : null, e = this.internalMessages.slice(this.internalMessages.length - 2, this.internalMessages.length), s = this.internalMessages.slice(1, this.internalMessages.length - 2), o = this.internalMessages[this.internalMessages.length - 1];
165
- return a(x, { key: "ed0c6ed7e5258b59482005c389bd0e7237baddee" }, a("sp-theme", { key: "25c0bd3535824562810784e07398219b1bb227bf", scale: "medium", color: "dark" }, a("div", { key: "18be5bd24739f55f28fc4cc9cd78130371186fc5", class: "view-thread" }, a("div", { key: "11d469149e4b26748d08fad45edd253702c4817f", class: "header" }, a("div", { key: "eef14b66bff63440962ba4a57b9c13808c778a31", class: "subject" }, (r = this.thread) == null ? void 0 : r.subject), a("div", { key: "7ad8082e63abcf36253f6a2d10af40d4f0cc96a3", class: "folders" }, (l = (n = this.thread) == null ? void 0 : n.folders) == null ? void 0 : l.map((i) => a("sp-tag", { size: "s" }, M(i.replace("CATEGORY_", "").replace("_", " ")))))), a("div", { key: "8c048761fac4d7ecdbd4a50916465ff72eb4ee83", class: "messages" }, t && a(u, { message: t, attachments: this.attachments.filter((i) => i.messageId === t.id), onMessageClick: this.onMessageClick, onShowContactDataClick: this.onShowContactDataClick, parent: this.host, viewEmailElement: this.nylasViewEmailElement, composerElement: this.nylasComposerElement }), s.length > 0 && this.messages.length > 1 && !this.showAllEmails && e.length > 0 && a(m, null, a("div", { class: "show-more" }, a("button", { type: "button", onClick: this.onShowAllEmailsClick }, a("span", { class: "avatar" }, s.length), " ", a("span", { class: "sr-only" }, "Show ", s.length, " more emails"))), a("hr", null)), s.length > 0 && this.showAllEmails && this.messages.length > 2 && s.map((i) => a(u, { message: i, attachments: this.attachments.filter((c) => c.messageId === (t == null ? void 0 : t.id)), onMessageClick: this.onMessageClick, onShowContactDataClick: this.onShowContactDataClick, parent: this.host, viewEmailElement: this.nylasViewEmailElement, composerElement: this.nylasComposerElement })), e.length > 0 && e.map((i) => a(u, { message: i, attachments: this.attachments.filter((c) => c.messageId === (t == null ? void 0 : t.id)), onMessageClick: this.onMessageClick, onShowContactDataClick: this.onShowContactDataClick, parent: this.host, viewEmailElement: this.nylasViewEmailElement, composerElement: this.nylasComposerElement }))), !(this.showComposer && o) && a("div", { class: "reply-buttons" }, a("sp-button", { variant: "cta", type: "button", onClick: this.showComposerClick }, a("span", { slot: "icon" }, a("reply-icon", null)), a("span", null, "Reply")), a("sp-button", { variant: "cta", type: "button" }, a("span", { slot: "icon" }, a("reply-all-icon", null)), a("span", null, "Reply All")), a("sp-button", { variant: "cta", type: "button" }, a("span", { slot: "icon" }, a("forward-icon", null)), a("span", null, "Forward"))), this.showComposer && o && a("div", { class: "composer" }, a("nylas-composer", { message: o.data, onClose: this.showComposerClick, onSend: (i) => {
165
+ return a(x, { key: "b6f11037f7d3e698cfe912431d2bb9dac014c703" }, a("sp-theme", { key: "81bcd19740f21b78aa23d7c048af83f4332ec829", scale: "medium", color: "dark" }, a("div", { key: "3ca6a1a85a28b2435c2fc1f0f9efec4c9a692686", class: "view-thread" }, a("div", { key: "d3a6fe1b099687a28ebc0307a5c1c44ce23e8f4c", class: "header" }, a("div", { key: "ee7eb035b739c3f12f0e987612a217837325b18a", class: "subject" }, (r = this.thread) == null ? void 0 : r.subject), a("div", { key: "e2cef333ba703c6845346a772365068b3fe66258", class: "folders" }, (l = (n = this.thread) == null ? void 0 : n.folders) == null ? void 0 : l.map((i) => a("sp-tag", { size: "s" }, M(i.replace("CATEGORY_", "").replace("_", " ")))))), a("div", { key: "61f714a579fb653b50328dedaf1e44312801c27d", class: "messages" }, t && a(u, { message: t, attachments: this.attachments.filter((i) => i.messageId === t.id), onMessageClick: this.onMessageClick, onShowContactDataClick: this.onShowContactDataClick, parent: this.host, viewEmailElement: this.nylasViewEmailElement, composerElement: this.nylasComposerElement }), s.length > 0 && this.messages.length > 1 && !this.showAllEmails && e.length > 0 && a(m, null, a("div", { class: "show-more" }, a("button", { type: "button", onClick: this.onShowAllEmailsClick }, a("span", { class: "avatar" }, s.length), " ", a("span", { class: "sr-only" }, "Show ", s.length, " more emails"))), a("hr", null)), s.length > 0 && this.showAllEmails && this.messages.length > 2 && s.map((i) => a(u, { message: i, attachments: this.attachments.filter((c) => c.messageId === (t == null ? void 0 : t.id)), onMessageClick: this.onMessageClick, onShowContactDataClick: this.onShowContactDataClick, parent: this.host, viewEmailElement: this.nylasViewEmailElement, composerElement: this.nylasComposerElement })), e.length > 0 && e.map((i) => a(u, { message: i, attachments: this.attachments.filter((c) => c.messageId === (t == null ? void 0 : t.id)), onMessageClick: this.onMessageClick, onShowContactDataClick: this.onShowContactDataClick, parent: this.host, viewEmailElement: this.nylasViewEmailElement, composerElement: this.nylasComposerElement }))), !(this.showComposer && o) && a("div", { class: "reply-buttons" }, a("sp-button", { variant: "cta", type: "button", onClick: this.showComposerClick }, a("span", { slot: "icon" }, a("reply-icon", null)), a("span", null, "Reply")), a("sp-button", { variant: "cta", type: "button" }, a("span", { slot: "icon" }, a("reply-all-icon", null)), a("span", null, "Reply All")), a("sp-button", { variant: "cta", type: "button" }, a("span", { slot: "icon" }, a("forward-icon", null)), a("span", null, "Forward"))), this.showComposer && o && a("div", { class: "composer" }, a("nylas-composer", { message: o.data, onClose: this.showComposerClick, onSend: (i) => {
166
166
  d("[nylas-view-thread] Send event", { message: i.detail.message, replyBody: i.detail.replyBody });
167
167
  } })))));
168
168
  }
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index-db48e0b6.cjs"),w=require("./register-component-b2a51b20-9a913603.cjs");require("react");require("react-dom");function b(t,a,s,o,r){if(!o||!s||s.children.length>0)return;e.debug("[nylas-view-thread] Rendering email",{message:t,attachments:a,viewEmailElement:o});const n=o.cloneNode(!0);n.message=t.data,n.parent=r,s.appendChild(n)}const c=({viewEmailElement:t,message:a,attachments:s,onMessageClick:o,onShowContactDataClick:r,parent:n})=>{var l,i,d,g,u,v,y;return e.h(e.Fragment,null,e.h("div",{key:a.id,class:"message"},e.h("div",{class:"sub-header","data-id":a.data.id,onClick:o},e.h("div",{class:"avatar"},a.data.from&&((l=a.data.from[0])==null?void 0:l.name)&&((d=(i=a.data.from[0])==null?void 0:i.name[0])==null?void 0:d.toUpperCase())),e.h("div",{class:"from"},e.h("span",{class:"name"},a.data.from&&((g=a.data.from[0])==null?void 0:g.name))," ",e.h("span",{class:"email"},a.data.from&&((u=a.data.from[0])==null?void 0:u.email))),e.h("div",{class:"date"},new Date(a.data.date*1e3).toLocaleTimeString(void 0,{timeStyle:"short"})," ","(",e.formatTimeAgo(new Date(a.data.date*1e3)),")"),e.h("sp-button-group",{class:"buttons"},e.h("nylas-summarize-message-button",{message:a.data})),a.collapse&&e.h("div",{class:"snippet"},a.data.snippet),!a.collapse&&a.data.to&&e.h("div",{class:"to"},e.h("span",null,"to")," ",e.formatParticipants(a.data.to)," ",e.h("button",{type:"button",value:a.data.id,onClick:r,class:{expand:!0,"expand--showContactData":a.showContactData}},e.h("chevron-icon",null)))),a.showContactData&&e.h("div",{class:"address-info"},e.h("div",{class:"label"},"From"),e.h("div",{class:"value"},e.formatRecipient((v=a.data)!=null&&v.from?(y=a==null?void 0:a.data)==null?void 0:y.from[0]:{name:"",email:""})),a.data.to&&e.h(e.Fragment,null,e.h("div",{class:"label"},"To"),e.h("div",{class:"value"},a.data.to.map(h=>e.h("div",null,e.formatRecipient(h))))),typeof a.data.cc<"u"&&a.data.cc.length>0&&e.h(e.Fragment,null,e.h("div",{class:"label"},"CC"),e.h("div",{class:"value"},a.data.cc.map(h=>e.h("div",null,e.formatRecipient(h)))))),!a.collapse&&t&&e.h("div",{key:a.id,ref:h=>b(a,s,h,t,n)}),!a.collapse&&!t&&e.h("nylas-view-email",{key:a.id,message:a.data,parent:n})),e.h("hr",null))},f=':host{display:block;font-size:inherit}.avatar{z-index:1;border-radius:100%;background-color:var(--nylas-color-primary-200);height:40px;width:40px;align-items:center;display:flex;justify-content:center;border:1px solid var(--nylas-color-primary-200)}.view-thread{display:grid;grid-auto-flow:row;width:100%}.view-thread .header{display:grid;grid-gap:1rem;align-items:center;margin-bottom:1rem}.view-thread .header .subject{font-size:1.25rem;font-weight:600;line-height:1.5rem}.view-thread .header .folders{display:grid;grid-auto-flow:column;grid-auto-columns:min-content;overflow-x:auto;gap:1rem}.view-thread .header .folders .folder{padding:0 0.5rem;font-size:0.9rem;color:var(--nylas-color-primary-900);background-color:var(--nylas-color-primary-300)}.view-thread .messages{display:grid;gap:1rem}.view-thread .messages hr{margin:0;width:100%;border:1px solid var(--nylas-color-primary-200)}.view-thread .messages hr:last-of-type{display:none}.view-thread .messages .message{display:grid;grid-auto-flow:row;gap:1rem}.view-thread .messages .message:last-of-type .sub-header{cursor:default}.view-thread .messages .message .sub-header{display:grid;grid-template:"avatar from date buttons" "avatar to to buttons";grid-column-gap:1rem;grid-template-columns:auto 1fr auto auto;cursor:pointer}.view-thread .messages .message .sub-header>*{pointer-events:none}.view-thread .messages .message .sub-header .avatar{grid-area:avatar}.view-thread .messages .message .sub-header .from{grid-area:from}.view-thread .messages .message .sub-header .from span.email{display:none;color:var(--nylas-color-primary-400);font-weight:600}.view-thread .messages .message .sub-header .buttons{grid-area:buttons;align-self:center}.view-thread .messages .message .sub-header .buttons *{pointer-events:all}.view-thread .messages .message .sub-header .date{grid-area:date;align-self:center;color:var(--nylas-color-primary-400)}.view-thread .messages .message .sub-header .snippet{width:90%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;color:var(--nylas-color-primary-600)}.view-thread .messages .message .sub-header .to{grid-area:to;color:var(--nylas-color-primary-400)}.view-thread .messages .message .sub-header .to>span{color:var(--nylas-color-primary-400)}.view-thread .messages .message .sub-header .to button{border:0;background-color:transparent;cursor:pointer;pointer-events:all;padding:0;margin:0}.view-thread .messages .message .sub-header .to button>*{pointer-events:none}.view-thread .messages .message .sub-header .to button chevron-icon{display:inline-table;fill:var(--nylas-color-primary-400);width:15px;height:15px;vertical-align:middle}.view-thread .messages .message .sub-header .to button chevron-icon svg{width:15px;height:15px;transform:rotate(90deg)}.view-thread .messages .message .sub-header .to button.expand--showContactData chevron-icon svg{transform:rotate(270deg)}.view-thread .messages .message .address-info{display:grid;column-gap:1rem;row-gap:0.5rem;grid-template-columns:auto 1fr;grid-template-rows:1fr;padding:1rem 2rem;border-radius:var(--nylas-border-radius-2x);border:1px solid var(--nylas-color-primary-200);align-items:flex-start;color:var(--nylas-color-primary-600)}.view-thread .messages .message .address-info .label{color:var(--nylas-color-primary-400);font-weight:600}.show-more{position:relative;display:flex;width:100%}.show-more .sr-only{display:none}.show-more button{position:relative;display:inline-flex;width:100%;padding:0;border:0;background-color:transparent;cursor:pointer;text-align:left;overflow:hidden}.show-more button span{border:1px solid var(--nylas-color-primary-400)}.show-more button:hover span{background-color:var(--nylas-color-primary-700)}.show-more button::after{border-top:1px solid rgba(100, 121, 143, 0.122);border-bottom:1px solid rgba(100, 121, 143, 0.122);content:"";height:4px;width:100%;position:absolute;top:50%}.loading{position:absolute;width:100%;height:100%;background-color:var(--loading__background-color);top:0;bottom:0;left:0;z-index:1;display:grid;justify-content:center;align-items:center;font-weight:600;overflow:hidden}.reply-buttons{display:grid;grid-auto-flow:column;grid-auto-columns:min-content;gap:1rem;margin-top:1rem}.reply-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)}.reply-buttons sp-button:hover{background-color:var(--nylas-color-primary-500)}.reply-buttons sp-button:disabled{background-color:var(--nylas-color-primary-200);color:var(--nylas-color-primary-600);cursor:not-allowed}.reply-buttons sp-button chevron-icon{display:inline-block}@media only screen and (min-width: 768px){.view-thread .messages .message .sub-header .from span.email{display:inline}}',C=f;var k=function(t,a,s,o){var r=arguments.length,n=r<3?a:o===null?o=Object.getOwnPropertyDescriptor(a,s):o,l;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")n=Reflect.decorate(t,a,s,o);else for(var i=t.length-1;i>=0;i--)(l=t[i])&&(n=(r<3?l(n):r>3?l(a,s,n):l(a,s))||n);return r>3&&n&&Object.defineProperty(a,s,n),n},m=function(t,a){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(t,a)};const p=class{constructor(t){e.registerInstance(this,t),this.threadSelected=e.createEvent(this,"threadSelected",7),this.showContactDataClicked=e.createEvent(this,"showContactDataClicked",7),this.messageClicked=e.createEvent(this,"messageClicked",7),this.nylasViewEmailElement=null,this.nylasComposerElement=null,this.onShowContactDataClick=a=>{a.stopPropagation();const o=a.target.value,r=this.internalMessages.find(l=>l.data.id===o);if(!r){e.debug(`[nylas-view-thread] Could not find message ${o}`);return}this.showContactDataClicked.emit(r.data).defaultPrevented||(r.showContactData=!r.showContactData,this.internalMessages=[...this.internalMessages]),e.debug(`[nylas-view-thread] show contact data clicked ${o} ${r.showContactData?"collapsed":"expanded"}`)},this.onMessageClick=a=>{var l;const o=a.target.dataset.id,r=this.internalMessages.find(i=>i.data.id===o);if(!r){e.debug(`[nylas-view-thread] Could not find message ${o}`);return}this.messageClicked.emit(r.data).defaultPrevented||(r.id!==((l=this.internalMessages[this.internalMessages.length-1])==null?void 0:l.id)&&(r.collapse=!r.collapse,r.collapse&&(r.showContactData=!1)),this.internalMessages=[...this.internalMessages]),e.debug(`[nylas-view-thread] message clicked ${o} ${r.collapse?"collapsed":"expanded"}`)},this.onShowAllEmailsClick=()=>{this.showAllEmails=!this.showAllEmails},this.showComposerClick=()=>{this.showComposer=!this.showComposer},this.draft=void 0,this.thread=void 0,this.messages=[],this.attachments=[],this.state="loading",this.internalMessages=[],this.showAllEmails=!1,this.showComposer=!1}connectedCallback(){}disconnectedCallback(){}async componentWillLoad(){e.debug("[nylas-view-thread] Component will load"),this.updateInternalMessages(this.messages);const t=this.host.querySelector("template.nylas-view-email");if(!t){e.debug("[nylas-view-thread] Could not find template");return}const a=document.importNode(t.content,!0);this.nylasViewEmailElement=a.querySelector("nylas-view-email");const s=this.host.querySelector("template.nylas-composer");if(!s){e.debug("[nylas-view-thread] Could not find composer template");return}const o=document.importNode(s.content,!0);this.nylasComposerElement=o.querySelector("nylas-composer")}async componentDidLoad(){e.debug("[nylas-view-thread] Component did load")}async threadChanged(t){e.debug("[nylas-view-thread] Thread changed",{thread:t}),this.internalMessages=[],this.threadSelected.emit(t).defaultPrevented||e.debug("[nylas-view-thread] Default event not prevented, initializing")}updateInternalMessages(t){e.debug("[nylas-view-thread] Updating internal messages",{messages:t});const a=t.sort((s,o)=>s.date>o.date?1:-1).map((s,o)=>({id:s.id,data:s,collapse:o!==t.length-1,showContactData:!1}));this.internalMessages=a}render(){var r,n,l;const t=this.internalMessages.length>2?this.internalMessages[0]:null,a=this.internalMessages.slice(this.internalMessages.length-2,this.internalMessages.length),s=this.internalMessages.slice(1,this.internalMessages.length-2),o=this.internalMessages[this.internalMessages.length-1];return e.h(e.Host,{key:"ed0c6ed7e5258b59482005c389bd0e7237baddee"},e.h("sp-theme",{key:"25c0bd3535824562810784e07398219b1bb227bf",scale:"medium",color:"dark"},e.h("div",{key:"18be5bd24739f55f28fc4cc9cd78130371186fc5",class:"view-thread"},e.h("div",{key:"11d469149e4b26748d08fad45edd253702c4817f",class:"header"},e.h("div",{key:"eef14b66bff63440962ba4a57b9c13808c778a31",class:"subject"},(r=this.thread)==null?void 0:r.subject),e.h("div",{key:"7ad8082e63abcf36253f6a2d10af40d4f0cc96a3",class:"folders"},(l=(n=this.thread)==null?void 0:n.folders)==null?void 0:l.map(i=>e.h("sp-tag",{size:"s"},e.toTitleCase(i.replace("CATEGORY_","").replace("_"," ")))))),e.h("div",{key:"8c048761fac4d7ecdbd4a50916465ff72eb4ee83",class:"messages"},t&&e.h(c,{message:t,attachments:this.attachments.filter(i=>i.messageId===t.id),onMessageClick:this.onMessageClick,onShowContactDataClick:this.onShowContactDataClick,parent:this.host,viewEmailElement:this.nylasViewEmailElement,composerElement:this.nylasComposerElement}),s.length>0&&this.messages.length>1&&!this.showAllEmails&&a.length>0&&e.h(e.Fragment,null,e.h("div",{class:"show-more"},e.h("button",{type:"button",onClick:this.onShowAllEmailsClick},e.h("span",{class:"avatar"},s.length)," ",e.h("span",{class:"sr-only"},"Show ",s.length," more emails"))),e.h("hr",null)),s.length>0&&this.showAllEmails&&this.messages.length>2&&s.map(i=>e.h(c,{message:i,attachments:this.attachments.filter(d=>d.messageId===(t==null?void 0:t.id)),onMessageClick:this.onMessageClick,onShowContactDataClick:this.onShowContactDataClick,parent:this.host,viewEmailElement:this.nylasViewEmailElement,composerElement:this.nylasComposerElement})),a.length>0&&a.map(i=>e.h(c,{message:i,attachments:this.attachments.filter(d=>d.messageId===(t==null?void 0:t.id)),onMessageClick:this.onMessageClick,onShowContactDataClick:this.onShowContactDataClick,parent:this.host,viewEmailElement:this.nylasViewEmailElement,composerElement:this.nylasComposerElement}))),!(this.showComposer&&o)&&e.h("div",{class:"reply-buttons"},e.h("sp-button",{variant:"cta",type:"button",onClick:this.showComposerClick},e.h("span",{slot:"icon"},e.h("reply-icon",null)),e.h("span",null,"Reply")),e.h("sp-button",{variant:"cta",type:"button"},e.h("span",{slot:"icon"},e.h("reply-all-icon",null)),e.h("span",null,"Reply All")),e.h("sp-button",{variant:"cta",type:"button"},e.h("span",{slot:"icon"},e.h("forward-icon",null)),e.h("span",null,"Forward"))),this.showComposer&&o&&e.h("div",{class:"composer"},e.h("nylas-composer",{message:o.data,onClose:this.showComposerClick,onSend:i=>{e.debug("[nylas-view-thread] Send event",{message:i.detail.message,replyBody:i.detail.replyBody})}})))))}get host(){return e.getElement(this)}static get watchers(){return{thread:["threadChanged"],messages:["updateInternalMessages"]}}};k([w.RegisterComponent({name:"nylas-view-thread",stateToProps:new Map([["mailbox.selectedThread","thread"],["mailbox.messages","messages"],["mailbox.state","state"]]),eventToProps:{threadSelected:async(t,a)=>{e.debug("[nylas-view-thread] Nylas init event. Fetching thread messages.",{event:t});const s=t.detail;s&&s.id&&await a.messages.getThreadMessages(s.id)}},fireRegisterEvent:!0}),m("design:type",Function),m("design:paramtypes",[]),m("design:returntype",void 0)],p.prototype,"render",null);p.style=C;exports.nylas_view_thread=p;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index-8a536089.cjs"),w=require("./register-component-592986c5-5edf5835.cjs");require("react");require("react-dom");function f(t,a,s,o,r){if(!o||!s||s.children.length>0)return;e.debug("[nylas-view-thread] Rendering email",{message:t,attachments:a,viewEmailElement:o});const n=o.cloneNode(!0);n.message=t.data,n.parent=r,s.appendChild(n)}const c=({viewEmailElement:t,message:a,attachments:s,onMessageClick:o,onShowContactDataClick:r,parent:n})=>{var l,i,d,g,u,v,y;return e.h(e.Fragment,null,e.h("div",{key:a.id,class:"message"},e.h("div",{class:"sub-header","data-id":a.data.id,onClick:o},e.h("div",{class:"avatar"},a.data.from&&((l=a.data.from[0])==null?void 0:l.name)&&((d=(i=a.data.from[0])==null?void 0:i.name[0])==null?void 0:d.toUpperCase())),e.h("div",{class:"from"},e.h("span",{class:"name"},a.data.from&&((g=a.data.from[0])==null?void 0:g.name))," ",e.h("span",{class:"email"},a.data.from&&((u=a.data.from[0])==null?void 0:u.email))),e.h("div",{class:"date"},new Date(a.data.date*1e3).toLocaleTimeString(void 0,{timeStyle:"short"})," ","(",e.formatTimeAgo(new Date(a.data.date*1e3)),")"),e.h("sp-button-group",{class:"buttons"},e.h("nylas-summarize-message-button",{message:a.data})),a.collapse&&e.h("div",{class:"snippet"},a.data.snippet),!a.collapse&&a.data.to&&e.h("div",{class:"to"},e.h("span",null,"to")," ",e.formatParticipants(a.data.to)," ",e.h("button",{type:"button",value:a.data.id,onClick:r,class:{expand:!0,"expand--showContactData":a.showContactData}},e.h("chevron-icon",null)))),a.showContactData&&e.h("div",{class:"address-info"},e.h("div",{class:"label"},"From"),e.h("div",{class:"value"},e.formatRecipient((v=a.data)!=null&&v.from?(y=a==null?void 0:a.data)==null?void 0:y.from[0]:{name:"",email:""})),a.data.to&&e.h(e.Fragment,null,e.h("div",{class:"label"},"To"),e.h("div",{class:"value"},a.data.to.map(h=>e.h("div",null,e.formatRecipient(h))))),typeof a.data.cc<"u"&&a.data.cc.length>0&&e.h(e.Fragment,null,e.h("div",{class:"label"},"CC"),e.h("div",{class:"value"},a.data.cc.map(h=>e.h("div",null,e.formatRecipient(h)))))),!a.collapse&&t&&e.h("div",{key:a.id,ref:h=>f(a,s,h,t,n)}),!a.collapse&&!t&&e.h("nylas-view-email",{key:a.id,message:a.data,parent:n})),e.h("hr",null))},b=':host{display:block;font-size:inherit}.avatar{z-index:1;border-radius:100%;background-color:var(--nylas-color-primary-200);height:40px;width:40px;align-items:center;display:flex;justify-content:center;border:1px solid var(--nylas-color-primary-200)}.view-thread{display:grid;grid-auto-flow:row;width:100%}.view-thread .header{display:grid;grid-gap:1rem;align-items:center;margin-bottom:1rem}.view-thread .header .subject{font-size:1.25rem;font-weight:600;line-height:1.5rem}.view-thread .header .folders{display:grid;grid-auto-flow:column;grid-auto-columns:min-content;overflow-x:auto;gap:1rem}.view-thread .header .folders .folder{padding:0 0.5rem;font-size:0.9rem;color:var(--nylas-color-primary-900);background-color:var(--nylas-color-primary-300)}.view-thread .messages{display:grid;gap:1rem}.view-thread .messages hr{margin:0;width:100%;border:1px solid var(--nylas-color-primary-200)}.view-thread .messages hr:last-of-type{display:none}.view-thread .messages .message{display:grid;grid-auto-flow:row;gap:1rem}.view-thread .messages .message:last-of-type .sub-header{cursor:default}.view-thread .messages .message .sub-header{display:grid;grid-template:"avatar from date buttons" "avatar to to buttons";grid-column-gap:1rem;grid-template-columns:auto 1fr auto auto;cursor:pointer}.view-thread .messages .message .sub-header>*{pointer-events:none}.view-thread .messages .message .sub-header .avatar{grid-area:avatar}.view-thread .messages .message .sub-header .from{grid-area:from}.view-thread .messages .message .sub-header .from span.email{display:none;color:var(--nylas-color-primary-400);font-weight:600}.view-thread .messages .message .sub-header .buttons{grid-area:buttons;align-self:center}.view-thread .messages .message .sub-header .buttons *{pointer-events:all}.view-thread .messages .message .sub-header .date{grid-area:date;align-self:center;color:var(--nylas-color-primary-400)}.view-thread .messages .message .sub-header .snippet{width:90%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;color:var(--nylas-color-primary-600)}.view-thread .messages .message .sub-header .to{grid-area:to;color:var(--nylas-color-primary-400)}.view-thread .messages .message .sub-header .to>span{color:var(--nylas-color-primary-400)}.view-thread .messages .message .sub-header .to button{border:0;background-color:transparent;cursor:pointer;pointer-events:all;padding:0;margin:0}.view-thread .messages .message .sub-header .to button>*{pointer-events:none}.view-thread .messages .message .sub-header .to button chevron-icon{display:inline-table;fill:var(--nylas-color-primary-400);width:15px;height:15px;vertical-align:middle}.view-thread .messages .message .sub-header .to button chevron-icon svg{width:15px;height:15px;transform:rotate(90deg)}.view-thread .messages .message .sub-header .to button.expand--showContactData chevron-icon svg{transform:rotate(270deg)}.view-thread .messages .message .address-info{display:grid;column-gap:1rem;row-gap:0.5rem;grid-template-columns:auto 1fr;grid-template-rows:1fr;padding:1rem 2rem;border-radius:var(--nylas-border-radius-2x);border:1px solid var(--nylas-color-primary-200);align-items:flex-start;color:var(--nylas-color-primary-600)}.view-thread .messages .message .address-info .label{color:var(--nylas-color-primary-400);font-weight:600}.show-more{position:relative;display:flex;width:100%}.show-more .sr-only{display:none}.show-more button{position:relative;display:inline-flex;width:100%;padding:0;border:0;background-color:transparent;cursor:pointer;text-align:left;overflow:hidden}.show-more button span{border:1px solid var(--nylas-color-primary-400)}.show-more button:hover span{background-color:var(--nylas-color-primary-700)}.show-more button::after{border-top:1px solid rgba(100, 121, 143, 0.122);border-bottom:1px solid rgba(100, 121, 143, 0.122);content:"";height:4px;width:100%;position:absolute;top:50%}.loading{position:absolute;width:100%;height:100%;background-color:var(--loading__background-color);top:0;bottom:0;left:0;z-index:1;display:grid;justify-content:center;align-items:center;font-weight:600;overflow:hidden}.reply-buttons{display:grid;grid-auto-flow:column;grid-auto-columns:min-content;gap:1rem;margin-top:1rem}.reply-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)}.reply-buttons sp-button:hover{background-color:var(--nylas-color-primary-500)}.reply-buttons sp-button:disabled{background-color:var(--nylas-color-primary-200);color:var(--nylas-color-primary-600);cursor:not-allowed}.reply-buttons sp-button chevron-icon{display:inline-block}@media only screen and (min-width: 768px){.view-thread .messages .message .sub-header .from span.email{display:inline}}',C=b;var k=function(t,a,s,o){var r=arguments.length,n=r<3?a:o===null?o=Object.getOwnPropertyDescriptor(a,s):o,l;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")n=Reflect.decorate(t,a,s,o);else for(var i=t.length-1;i>=0;i--)(l=t[i])&&(n=(r<3?l(n):r>3?l(a,s,n):l(a,s))||n);return r>3&&n&&Object.defineProperty(a,s,n),n},m=function(t,a){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(t,a)};const p=class{constructor(t){e.registerInstance(this,t),this.threadSelected=e.createEvent(this,"threadSelected",7),this.showContactDataClicked=e.createEvent(this,"showContactDataClicked",7),this.messageClicked=e.createEvent(this,"messageClicked",7),this.nylasViewEmailElement=null,this.nylasComposerElement=null,this.onShowContactDataClick=a=>{a.stopPropagation();const o=a.target.value,r=this.internalMessages.find(l=>l.data.id===o);if(!r){e.debug(`[nylas-view-thread] Could not find message ${o}`);return}this.showContactDataClicked.emit(r.data).defaultPrevented||(r.showContactData=!r.showContactData,this.internalMessages=[...this.internalMessages]),e.debug(`[nylas-view-thread] show contact data clicked ${o} ${r.showContactData?"collapsed":"expanded"}`)},this.onMessageClick=a=>{var l;const o=a.target.dataset.id,r=this.internalMessages.find(i=>i.data.id===o);if(!r){e.debug(`[nylas-view-thread] Could not find message ${o}`);return}this.messageClicked.emit(r.data).defaultPrevented||(r.id!==((l=this.internalMessages[this.internalMessages.length-1])==null?void 0:l.id)&&(r.collapse=!r.collapse,r.collapse&&(r.showContactData=!1)),this.internalMessages=[...this.internalMessages]),e.debug(`[nylas-view-thread] message clicked ${o} ${r.collapse?"collapsed":"expanded"}`)},this.onShowAllEmailsClick=()=>{this.showAllEmails=!this.showAllEmails},this.showComposerClick=()=>{this.showComposer=!this.showComposer},this.draft=void 0,this.thread=void 0,this.messages=[],this.attachments=[],this.state="loading",this.internalMessages=[],this.showAllEmails=!1,this.showComposer=!1}connectedCallback(){}disconnectedCallback(){}async componentWillLoad(){e.debug("[nylas-view-thread] Component will load"),this.updateInternalMessages(this.messages);const t=this.host.querySelector("template.nylas-view-email");if(!t){e.debug("[nylas-view-thread] Could not find template");return}const a=document.importNode(t.content,!0);this.nylasViewEmailElement=a.querySelector("nylas-view-email");const s=this.host.querySelector("template.nylas-composer");if(!s){e.debug("[nylas-view-thread] Could not find composer template");return}const o=document.importNode(s.content,!0);this.nylasComposerElement=o.querySelector("nylas-composer")}async componentDidLoad(){e.debug("[nylas-view-thread] Component did load")}async threadChanged(t){e.debug("[nylas-view-thread] Thread changed",{thread:t}),this.internalMessages=[],this.threadSelected.emit(t).defaultPrevented||e.debug("[nylas-view-thread] Default event not prevented, initializing")}updateInternalMessages(t){e.debug("[nylas-view-thread] Updating internal messages",{messages:t});const a=t.sort((s,o)=>s.date>o.date?1:-1).map((s,o)=>({id:s.id,data:s,collapse:o!==t.length-1,showContactData:!1}));this.internalMessages=a}render(){var r,n,l;const t=this.internalMessages.length>2?this.internalMessages[0]:null,a=this.internalMessages.slice(this.internalMessages.length-2,this.internalMessages.length),s=this.internalMessages.slice(1,this.internalMessages.length-2),o=this.internalMessages[this.internalMessages.length-1];return e.h(e.Host,{key:"b6f11037f7d3e698cfe912431d2bb9dac014c703"},e.h("sp-theme",{key:"81bcd19740f21b78aa23d7c048af83f4332ec829",scale:"medium",color:"dark"},e.h("div",{key:"3ca6a1a85a28b2435c2fc1f0f9efec4c9a692686",class:"view-thread"},e.h("div",{key:"d3a6fe1b099687a28ebc0307a5c1c44ce23e8f4c",class:"header"},e.h("div",{key:"ee7eb035b739c3f12f0e987612a217837325b18a",class:"subject"},(r=this.thread)==null?void 0:r.subject),e.h("div",{key:"e2cef333ba703c6845346a772365068b3fe66258",class:"folders"},(l=(n=this.thread)==null?void 0:n.folders)==null?void 0:l.map(i=>e.h("sp-tag",{size:"s"},e.toTitleCase(i.replace("CATEGORY_","").replace("_"," ")))))),e.h("div",{key:"61f714a579fb653b50328dedaf1e44312801c27d",class:"messages"},t&&e.h(c,{message:t,attachments:this.attachments.filter(i=>i.messageId===t.id),onMessageClick:this.onMessageClick,onShowContactDataClick:this.onShowContactDataClick,parent:this.host,viewEmailElement:this.nylasViewEmailElement,composerElement:this.nylasComposerElement}),s.length>0&&this.messages.length>1&&!this.showAllEmails&&a.length>0&&e.h(e.Fragment,null,e.h("div",{class:"show-more"},e.h("button",{type:"button",onClick:this.onShowAllEmailsClick},e.h("span",{class:"avatar"},s.length)," ",e.h("span",{class:"sr-only"},"Show ",s.length," more emails"))),e.h("hr",null)),s.length>0&&this.showAllEmails&&this.messages.length>2&&s.map(i=>e.h(c,{message:i,attachments:this.attachments.filter(d=>d.messageId===(t==null?void 0:t.id)),onMessageClick:this.onMessageClick,onShowContactDataClick:this.onShowContactDataClick,parent:this.host,viewEmailElement:this.nylasViewEmailElement,composerElement:this.nylasComposerElement})),a.length>0&&a.map(i=>e.h(c,{message:i,attachments:this.attachments.filter(d=>d.messageId===(t==null?void 0:t.id)),onMessageClick:this.onMessageClick,onShowContactDataClick:this.onShowContactDataClick,parent:this.host,viewEmailElement:this.nylasViewEmailElement,composerElement:this.nylasComposerElement}))),!(this.showComposer&&o)&&e.h("div",{class:"reply-buttons"},e.h("sp-button",{variant:"cta",type:"button",onClick:this.showComposerClick},e.h("span",{slot:"icon"},e.h("reply-icon",null)),e.h("span",null,"Reply")),e.h("sp-button",{variant:"cta",type:"button"},e.h("span",{slot:"icon"},e.h("reply-all-icon",null)),e.h("span",null,"Reply All")),e.h("sp-button",{variant:"cta",type:"button"},e.h("span",{slot:"icon"},e.h("forward-icon",null)),e.h("span",null,"Forward"))),this.showComposer&&o&&e.h("div",{class:"composer"},e.h("nylas-composer",{message:o.data,onClose:this.showComposerClick,onSend:i=>{e.debug("[nylas-view-thread] Send event",{message:i.detail.message,replyBody:i.detail.replyBody})}})))))}get host(){return e.getElement(this)}static get watchers(){return{thread:["threadChanged"],messages:["updateInternalMessages"]}}};k([w.RegisterComponent({name:"nylas-view-thread",stateToProps:new Map([["mailbox.selectedThread","thread"],["mailbox.messages","messages"],["mailbox.state","state"]]),eventToProps:{threadSelected:async(t,a)=>{e.debug("[nylas-view-thread] Nylas init event. Fetching thread messages.",{event:t});const s=t.detail;s&&s.id&&await a.messages.getThreadMessages(s.id)}},fireRegisterEvent:!0}),m("design:type",Function),m("design:paramtypes",[]),m("design:returntype",void 0)],p.prototype,"render",null);p.style=C;exports.nylas_view_thread=p;
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index-db48e0b6.cjs");require("react");require("react-dom");const r=".sc-person-icon-h{display:flex}",i=r,t=class{constructor(s){e.registerInstance(this,s),this.width="14",this.height="16"}render(){return e.h("svg",{key:"76d537d21b337eb3b6fa6a96e433023712872458",width:this.width,height:this.height,fill:"none",xmlns:"http://www.w3.org/2000/svg"},e.h("path",{key:"015ad86a3dfa084f66737bb70e4d2e83730350b5",d:"M7 0C4.79086 0 3 1.79086 3 4C3 6.20914 4.79086 8 7 8C9.20914 8 11 6.20914 11 4C11 1.79086 9.20914 0 7 0ZM4 4C4 2.34315 5.34315 1 7 1C8.65685 1 10 2.34315 10 4C10 5.65685 8.65685 7 7 7C5.34315 7 4 5.65685 4 4ZM2.00873 9C0.903151 9 0 9.88687 0 11C0 12.6912 0.83281 13.9663 2.13499 14.7966C3.41697 15.614 5.14526 16 7 16C8.85474 16 10.583 15.614 11.865 14.7966C13.1672 13.9663 14 12.6912 14 11C14 9.89557 13.1045 9.00001 12 9.00001L2.00873 9ZM1 11C1 10.4467 1.44786 10 2.00873 10L12 10C12.5522 10 13 10.4478 13 11C13 12.3088 12.3777 13.2837 11.3274 13.9534C10.2568 14.636 8.73511 15 7 15C5.26489 15 3.74318 14.636 2.67262 13.9534C1.62226 13.2837 1 12.3088 1 11Z",fill:"currentColor"}))}};t.style=i;exports.person_icon=t;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index-8a536089.cjs");require("react");require("react-dom");const r=".sc-person-icon-h{display:flex}",i=r,t=class{constructor(s){e.registerInstance(this,s),this.width="14",this.height="16"}render(){return e.h("svg",{key:"a4357144d41e783e47b5e8296203640397f06edf",width:this.width,height:this.height,fill:"none",xmlns:"http://www.w3.org/2000/svg"},e.h("path",{key:"81c476d459c4575482b566f89ad3e61e157f59b9",d:"M7 0C4.79086 0 3 1.79086 3 4C3 6.20914 4.79086 8 7 8C9.20914 8 11 6.20914 11 4C11 1.79086 9.20914 0 7 0ZM4 4C4 2.34315 5.34315 1 7 1C8.65685 1 10 2.34315 10 4C10 5.65685 8.65685 7 7 7C5.34315 7 4 5.65685 4 4ZM2.00873 9C0.903151 9 0 9.88687 0 11C0 12.6912 0.83281 13.9663 2.13499 14.7966C3.41697 15.614 5.14526 16 7 16C8.85474 16 10.583 15.614 11.865 14.7966C13.1672 13.9663 14 12.6912 14 11C14 9.89557 13.1045 9.00001 12 9.00001L2.00873 9ZM1 11C1 10.4467 1.44786 10 2.00873 10L12 10C12.5522 10 13 10.4478 13 11C13 12.3088 12.3777 13.2837 11.3274 13.9534C10.2568 14.636 8.73511 15 7 15C5.26489 15 3.74318 14.636 2.67262 13.9534C1.62226 13.2837 1 12.3088 1 11Z",fill:"currentColor"}))}};t.style=i;exports.person_icon=t;
@@ -1,12 +1,12 @@
1
- import { r as e, h as t } from "./index-f8317a8e.js";
1
+ import { r as s, h as t } from "./index-a15916e5.js";
2
2
  import "react";
3
3
  import "react-dom";
4
4
  const o = ".sc-person-icon-h{display:flex}", r = o, C = class {
5
- constructor(s) {
6
- e(this, s), this.width = "14", this.height = "16";
5
+ constructor(e) {
6
+ s(this, e), this.width = "14", this.height = "16";
7
7
  }
8
8
  render() {
9
- return t("svg", { key: "76d537d21b337eb3b6fa6a96e433023712872458", width: this.width, height: this.height, fill: "none", xmlns: "http://www.w3.org/2000/svg" }, t("path", { key: "015ad86a3dfa084f66737bb70e4d2e83730350b5", d: "M7 0C4.79086 0 3 1.79086 3 4C3 6.20914 4.79086 8 7 8C9.20914 8 11 6.20914 11 4C11 1.79086 9.20914 0 7 0ZM4 4C4 2.34315 5.34315 1 7 1C8.65685 1 10 2.34315 10 4C10 5.65685 8.65685 7 7 7C5.34315 7 4 5.65685 4 4ZM2.00873 9C0.903151 9 0 9.88687 0 11C0 12.6912 0.83281 13.9663 2.13499 14.7966C3.41697 15.614 5.14526 16 7 16C8.85474 16 10.583 15.614 11.865 14.7966C13.1672 13.9663 14 12.6912 14 11C14 9.89557 13.1045 9.00001 12 9.00001L2.00873 9ZM1 11C1 10.4467 1.44786 10 2.00873 10L12 10C12.5522 10 13 10.4478 13 11C13 12.3088 12.3777 13.2837 11.3274 13.9534C10.2568 14.636 8.73511 15 7 15C5.26489 15 3.74318 14.636 2.67262 13.9534C1.62226 13.2837 1 12.3088 1 11Z", fill: "currentColor" }));
9
+ return t("svg", { key: "a4357144d41e783e47b5e8296203640397f06edf", width: this.width, height: this.height, fill: "none", xmlns: "http://www.w3.org/2000/svg" }, t("path", { key: "81c476d459c4575482b566f89ad3e61e157f59b9", d: "M7 0C4.79086 0 3 1.79086 3 4C3 6.20914 4.79086 8 7 8C9.20914 8 11 6.20914 11 4C11 1.79086 9.20914 0 7 0ZM4 4C4 2.34315 5.34315 1 7 1C8.65685 1 10 2.34315 10 4C10 5.65685 8.65685 7 7 7C5.34315 7 4 5.65685 4 4ZM2.00873 9C0.903151 9 0 9.88687 0 11C0 12.6912 0.83281 13.9663 2.13499 14.7966C3.41697 15.614 5.14526 16 7 16C8.85474 16 10.583 15.614 11.865 14.7966C13.1672 13.9663 14 12.6912 14 11C14 9.89557 13.1045 9.00001 12 9.00001L2.00873 9ZM1 11C1 10.4467 1.44786 10 2.00873 10L12 10C12.5522 10 13 10.4478 13 11C13 12.3088 12.3777 13.2837 11.3274 13.9534C10.2568 14.636 8.73511 15 7 15C5.26489 15 3.74318 14.636 2.67262 13.9534C1.62226 13.2837 1 12.3088 1 11Z", fill: "currentColor" }));
10
10
  }
11
11
  };
12
12
  C.style = r;
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("./index-db48e0b6.cjs");require("react");require("react-dom");const o=".sc-play-icon-h{display:flex}",c=o,s=class{constructor(e){t.registerInstance(this,e),this.width="15",this.height="15"}render(){return t.h("svg",{key:"a9836251aec2b9c4338330eacadc14e836592e0a",width:this.width,height:this.height,viewBox:"0 0 24 24",fill:"auto",xmlns:"http://www.w3.org/2000/svg"},t.h("path",{key:"4df128d7a40a2820ca123e81d9994a543150e04c",d:"M21 12L3 21V3L21 12Z",stroke:"auto","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"}))}};s.style=c;const n=".sc-stop-icon-h{display:flex}",h=n,i=class{constructor(e){t.registerInstance(this,e),this.width="15",this.height="15"}render(){return t.h("svg",{key:"d9806457e1aa1422e42250dfb3c0bf73d9df2a39",width:this.width,height:this.height,viewBox:"0 0 24 24",fill:"auto",xmlns:"http://www.w3.org/2000/svg"},t.h("path",{key:"776e6631913ac8e7835a90f979cc030ad7a6ccbe",d:"M4 4H20V20H4V4Z",stroke:"auto","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"}))}};i.style=h;exports.play_icon=s;exports.stop_icon=i;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("./index-8a536089.cjs");require("react");require("react-dom");const o=".sc-play-icon-h{display:flex}",c=o,s=class{constructor(e){t.registerInstance(this,e),this.width="15",this.height="15"}render(){return t.h("svg",{key:"5a9ce615105ea3f8c35bc612c7eac3d2d4237ff1",width:this.width,height:this.height,viewBox:"0 0 24 24",fill:"auto",xmlns:"http://www.w3.org/2000/svg"},t.h("path",{key:"4d0c2aec1fb3c5a03e73681ac5aa20522562e369",d:"M21 12L3 21V3L21 12Z",stroke:"auto","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"}))}};s.style=c;const n=".sc-stop-icon-h{display:flex}",h=n,i=class{constructor(e){t.registerInstance(this,e),this.width="15",this.height="15"}render(){return t.h("svg",{key:"6bc52dd5897d50d9919f61ce68373b0e3ecca94c",width:this.width,height:this.height,viewBox:"0 0 24 24",fill:"auto",xmlns:"http://www.w3.org/2000/svg"},t.h("path",{key:"34813760da3c3dffe9f7046b006c5be50fa7c9b0",d:"M4 4H20V20H4V4Z",stroke:"auto","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"}))}};i.style=h;exports.play_icon=s;exports.stop_icon=i;
@@ -1,4 +1,4 @@
1
- import { r as e, h as t } from "./index-f8317a8e.js";
1
+ import { r as e, h as t } from "./index-a15916e5.js";
2
2
  import "react";
3
3
  import "react-dom";
4
4
  const o = ".sc-play-icon-h{display:flex}", i = o, c = class {
@@ -6,20 +6,20 @@ const o = ".sc-play-icon-h{display:flex}", i = o, c = class {
6
6
  e(this, s), this.width = "15", this.height = "15";
7
7
  }
8
8
  render() {
9
- return t("svg", { key: "a9836251aec2b9c4338330eacadc14e836592e0a", width: this.width, height: this.height, viewBox: "0 0 24 24", fill: "auto", xmlns: "http://www.w3.org/2000/svg" }, t("path", { key: "4df128d7a40a2820ca123e81d9994a543150e04c", d: "M21 12L3 21V3L21 12Z", stroke: "auto", "stroke-width": "1.5", "stroke-linecap": "round", "stroke-linejoin": "round" }));
9
+ return t("svg", { key: "5a9ce615105ea3f8c35bc612c7eac3d2d4237ff1", width: this.width, height: this.height, viewBox: "0 0 24 24", fill: "auto", xmlns: "http://www.w3.org/2000/svg" }, t("path", { key: "4d0c2aec1fb3c5a03e73681ac5aa20522562e369", d: "M21 12L3 21V3L21 12Z", stroke: "auto", "stroke-width": "1.5", "stroke-linecap": "round", "stroke-linejoin": "round" }));
10
10
  }
11
11
  };
12
12
  c.style = i;
13
- const h = ".sc-stop-icon-h{display:flex}", a = h, n = class {
13
+ const h = ".sc-stop-icon-h{display:flex}", n = h, r = class {
14
14
  constructor(s) {
15
15
  e(this, s), this.width = "15", this.height = "15";
16
16
  }
17
17
  render() {
18
- return t("svg", { key: "d9806457e1aa1422e42250dfb3c0bf73d9df2a39", width: this.width, height: this.height, viewBox: "0 0 24 24", fill: "auto", xmlns: "http://www.w3.org/2000/svg" }, t("path", { key: "776e6631913ac8e7835a90f979cc030ad7a6ccbe", d: "M4 4H20V20H4V4Z", stroke: "auto", "stroke-width": "1.5", "stroke-linecap": "round", "stroke-linejoin": "round" }));
18
+ return t("svg", { key: "6bc52dd5897d50d9919f61ce68373b0e3ecca94c", width: this.width, height: this.height, viewBox: "0 0 24 24", fill: "auto", xmlns: "http://www.w3.org/2000/svg" }, t("path", { key: "34813760da3c3dffe9f7046b006c5be50fa7c9b0", d: "M4 4H20V20H4V4Z", stroke: "auto", "stroke-width": "1.5", "stroke-linecap": "round", "stroke-linejoin": "round" }));
19
19
  }
20
20
  };
21
- n.style = a;
21
+ r.style = n;
22
22
  export {
23
23
  c as play_icon,
24
- n as stop_icon
24
+ r as stop_icon
25
25
  };
package/dist/react.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("./index-db48e0b6.cjs");require("react");require("react-dom");exports.AddCircleIcon=o.AddCircleIcon;exports.ArchiveIcon=o.ArchiveIcon;exports.ArrowIcon=o.ArrowIcon;exports.BoldIcon=o.BoldIcon;exports.ButtonComponent=o.ButtonComponent;exports.CalendarAgendaFillIcon=o.CalendarAgendaFillIcon;exports.CalendarAgendaIcon=o.CalendarAgendaIcon;exports.CalendarCancelIcon=o.CalendarCancelIcon;exports.CalendarCheckIcon=o.CalendarCheckIcon;exports.CalendarIcon=o.CalendarIcon;exports.CalendarInfoIcon=o.CalendarInfoIcon;exports.CalendarPatternsIcon=o.CalendarPatternsIcon;exports.CheckboxComponent=o.CheckboxComponent;exports.CheckmarkCircleIcon=o.CheckmarkCircleIcon;exports.CheckmarkIcon=o.CheckmarkIcon;exports.ChevronIcon=o.ChevronIcon;exports.ClockIcon=o.ClockIcon;exports.CloseIcon=o.CloseIcon;exports.CopyIcon=o.CopyIcon;exports.DeleteIcon=o.DeleteIcon;exports.DocumentRefreshIcon=o.DocumentRefreshIcon;exports.DragableIcon=o.DragableIcon;exports.EditIcon=o.EditIcon;exports.EnvelopeFillIcon=o.EnvelopeFillIcon;exports.EnvelopeIcon=o.EnvelopeIcon;exports.EyeIcon=o.EyeIcon;exports.FlowIcon=o.FlowIcon;exports.FolderIcon=o.FolderIcon;exports.ForwardIcon=o.ForwardIcon;exports.GlobeIcon=o.GlobeIcon;exports.GoogleLogoIcon=o.GoogleLogoIcon;exports.GoogleMeetIcon=o.GoogleMeetIcon;exports.InboxIcon=o.InboxIcon;exports.InfoIcon=o.InfoIcon;exports.InputComponent=o.InputComponent;exports.InputDropdown=o.InputDropdown;exports.ItalicIcon=o.ItalicIcon;exports.LoadingIcon=o.LoadingIcon;exports.LocationIcon=o.LocationIcon;exports.LocationOffIcon=o.LocationOffIcon;exports.MicrosoftLogoIcon=o.MicrosoftLogoIcon;exports.MicrosoftTeamsIcon=o.MicrosoftTeamsIcon;exports.MultiSelectDropdown=o.MultiSelectDropdown;exports.NylasAdditionalParticipants=o.NylasAdditionalParticipants;exports.NylasAvailabilityPicker=o.NylasAvailabilityPicker;exports.NylasBookedEventCard=o.NylasBookedEventCard;exports.NylasBookingCalendarPicker=o.NylasBookingCalendarPicker;exports.NylasBookingForm=o.NylasBookingForm;exports.NylasBookingFormConfig=o.NylasBookingFormConfig;exports.NylasBufferTime=o.NylasBufferTime;exports.NylasCalendarPicker=o.NylasCalendarPicker;exports.NylasCancelBookingForm=o.NylasCancelBookingForm;exports.NylasCancellationPolicy=o.NylasCancellationPolicy;exports.NylasCancelledEventCard=o.NylasCancelledEventCard;exports.NylasComposer=o.NylasComposer;exports.NylasConfirmationEmail=o.NylasConfirmationEmail;exports.NylasConnectedCalendars=o.NylasConnectedCalendars;exports.NylasCustomBookingFlow=o.NylasCustomBookingFlow;exports.NylasCustomizeBookingSettings=o.NylasCustomizeBookingSettings;exports.NylasDatePicker=o.NylasDatePicker;exports.NylasEditorTabs=o.NylasEditorTabs;exports.NylasEventDescription=o.NylasEventDescription;exports.NylasEventDuration=o.NylasEventDuration;exports.NylasEventInfo=o.NylasEventInfo;exports.NylasEventLimits=o.NylasEventLimits;exports.NylasEventLocation=o.NylasEventLocation;exports.NylasEventTitle=o.NylasEventTitle;exports.NylasFormCard=o.NylasFormCard;exports.NylasIdentityRequestWrapper=o.NylasIdentityRequestWrapper;exports.NylasIfState=o.NylasIfState;exports.NylasLimitFutureBookings=o.NylasLimitFutureBookings;exports.NylasListConfigurations=o.NylasListConfigurations;exports.NylasListFolders=o.NylasListFolders;exports.NylasListThreads=o.NylasListThreads;exports.NylasLocaleSwitch=o.NylasLocaleSwitch;exports.NylasLogin=o.NylasLogin;exports.NylasLogo=o.NylasLogo;exports.NylasMailbox=o.NylasMailbox;exports.NylasMailboxPagination=o.NylasMailboxPagination;exports.NylasMailboxToolbarButton=o.NylasMailboxToolbarButton;exports.NylasMinBookingNotice=o.NylasMinBookingNotice;exports.NylasMinCancellationNotice=o.NylasMinCancellationNotice;exports.NylasNotification=o.NylasNotification;exports.NylasParticipantBookingCalendars=o.NylasParticipantBookingCalendars;exports.NylasParticipantsCustomAvailability=o.NylasParticipantsCustomAvailability;exports.NylasProvider=o.NylasProvider;exports.NylasReminderEmails=o.NylasReminderEmails;exports.NylasReminderTime=o.NylasReminderTime;exports.NylasSchedulerEditor=o.NylasSchedulerEditor;exports.NylasScheduling=o.NylasScheduling;exports.NylasSelectedEventCard=o.NylasSelectedEventCard;exports.NylasSummarizeMessageButton=o.NylasSummarizeMessageButton;exports.NylasThreadsRefresh=o.NylasThreadsRefresh;exports.NylasThreadsSearch=o.NylasThreadsSearch;exports.NylasTimeWindowPicker=o.NylasTimeWindowPicker;exports.NylasTimeslotInterval=o.NylasTimeslotInterval;exports.NylasTimeslotPicker=o.NylasTimeslotPicker;exports.NylasViewEmail=o.NylasViewEmail;exports.NylasViewThread=o.NylasViewThread;exports.PeopleIcon=o.PeopleIcon;exports.PersonClipboardIcon=o.PersonClipboardIcon;exports.PersonIcon=o.PersonIcon;exports.PlayIcon=o.PlayIcon;exports.PlusIcon=o.PlusIcon;exports.RadioButtonGroup=o.RadioButtonGroup;exports.RefreshIcon=o.RefreshIcon;exports.ReplyAllIcon=o.ReplyAllIcon;exports.ReplyIcon=o.ReplyIcon;exports.SearchIcon=o.SearchIcon;exports.SelectDropdown=o.SelectDropdown;exports.SentIcon=o.SentIcon;exports.SpamIcon=o.SpamIcon;exports.StarIcon=o.StarIcon;exports.StopIcon=o.StopIcon;exports.TextareaComponent=o.TextareaComponent;exports.TimePeriodSelector=o.TimePeriodSelector;exports.ToggleSwitch=o.ToggleSwitch;exports.TooltipComponent=o.TooltipComponent;exports.TranslateIcon=o.TranslateIcon;exports.TrashFillIcon=o.TrashFillIcon;exports.TrashIcon=o.TrashIcon;exports.UnderlineIcon=o.UnderlineIcon;exports.WarningIcon=o.WarningIcon;exports.ZoomIcon=o.ZoomIcon;exports.applyPolyfills=o.applyPolyfills;exports.defineCustomElements=o.defineCustomElements;exports.setNonce=o.setNonce;exports.useNylasMailboxElement=o.useNylasMailboxElement;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("./index-8a536089.cjs");require("react");require("react-dom");exports.AddCircleIcon=o.AddCircleIcon;exports.ArchiveIcon=o.ArchiveIcon;exports.ArrowIcon=o.ArrowIcon;exports.BoldIcon=o.BoldIcon;exports.ButtonComponent=o.ButtonComponent;exports.CalendarAgendaFillIcon=o.CalendarAgendaFillIcon;exports.CalendarAgendaIcon=o.CalendarAgendaIcon;exports.CalendarCancelIcon=o.CalendarCancelIcon;exports.CalendarCheckIcon=o.CalendarCheckIcon;exports.CalendarIcon=o.CalendarIcon;exports.CalendarInfoIcon=o.CalendarInfoIcon;exports.CalendarPatternsIcon=o.CalendarPatternsIcon;exports.CheckboxComponent=o.CheckboxComponent;exports.CheckmarkCircleIcon=o.CheckmarkCircleIcon;exports.CheckmarkIcon=o.CheckmarkIcon;exports.ChevronIcon=o.ChevronIcon;exports.ClockIcon=o.ClockIcon;exports.CloseIcon=o.CloseIcon;exports.CopyIcon=o.CopyIcon;exports.DeleteIcon=o.DeleteIcon;exports.DocumentRefreshIcon=o.DocumentRefreshIcon;exports.DragableIcon=o.DragableIcon;exports.EditIcon=o.EditIcon;exports.EnvelopeFillIcon=o.EnvelopeFillIcon;exports.EnvelopeIcon=o.EnvelopeIcon;exports.EyeIcon=o.EyeIcon;exports.FlowIcon=o.FlowIcon;exports.FolderIcon=o.FolderIcon;exports.ForwardIcon=o.ForwardIcon;exports.GlobeIcon=o.GlobeIcon;exports.GoogleLogoIcon=o.GoogleLogoIcon;exports.GoogleMeetIcon=o.GoogleMeetIcon;exports.InboxIcon=o.InboxIcon;exports.InfoIcon=o.InfoIcon;exports.InputComponent=o.InputComponent;exports.InputDropdown=o.InputDropdown;exports.ItalicIcon=o.ItalicIcon;exports.LoadingIcon=o.LoadingIcon;exports.LocationIcon=o.LocationIcon;exports.LocationOffIcon=o.LocationOffIcon;exports.MicrosoftLogoIcon=o.MicrosoftLogoIcon;exports.MicrosoftTeamsIcon=o.MicrosoftTeamsIcon;exports.MultiSelectDropdown=o.MultiSelectDropdown;exports.NylasAdditionalParticipants=o.NylasAdditionalParticipants;exports.NylasAvailabilityPicker=o.NylasAvailabilityPicker;exports.NylasBookedEventCard=o.NylasBookedEventCard;exports.NylasBookingCalendarPicker=o.NylasBookingCalendarPicker;exports.NylasBookingConfirmationRedirect=o.NylasBookingConfirmationRedirect;exports.NylasBookingConfirmationType=o.NylasBookingConfirmationType;exports.NylasBookingForm=o.NylasBookingForm;exports.NylasBookingFormConfig=o.NylasBookingFormConfig;exports.NylasBookingType=o.NylasBookingType;exports.NylasBufferTime=o.NylasBufferTime;exports.NylasCalendarPicker=o.NylasCalendarPicker;exports.NylasCancelBookingForm=o.NylasCancelBookingForm;exports.NylasCancellationPolicy=o.NylasCancellationPolicy;exports.NylasCancelledEventCard=o.NylasCancelledEventCard;exports.NylasComposer=o.NylasComposer;exports.NylasConfirmationEmail=o.NylasConfirmationEmail;exports.NylasConnectedCalendars=o.NylasConnectedCalendars;exports.NylasCustomBookingFlow=o.NylasCustomBookingFlow;exports.NylasCustomizeBookingSettings=o.NylasCustomizeBookingSettings;exports.NylasDatePicker=o.NylasDatePicker;exports.NylasEditorTabs=o.NylasEditorTabs;exports.NylasEventDescription=o.NylasEventDescription;exports.NylasEventDuration=o.NylasEventDuration;exports.NylasEventInfo=o.NylasEventInfo;exports.NylasEventLimits=o.NylasEventLimits;exports.NylasEventLocation=o.NylasEventLocation;exports.NylasEventTitle=o.NylasEventTitle;exports.NylasFormCard=o.NylasFormCard;exports.NylasIdentityRequestWrapper=o.NylasIdentityRequestWrapper;exports.NylasIfState=o.NylasIfState;exports.NylasLimitFutureBookings=o.NylasLimitFutureBookings;exports.NylasListConfigurations=o.NylasListConfigurations;exports.NylasListFolders=o.NylasListFolders;exports.NylasListThreads=o.NylasListThreads;exports.NylasLocaleSwitch=o.NylasLocaleSwitch;exports.NylasLogin=o.NylasLogin;exports.NylasLogo=o.NylasLogo;exports.NylasMailbox=o.NylasMailbox;exports.NylasMailboxPagination=o.NylasMailboxPagination;exports.NylasMailboxToolbarButton=o.NylasMailboxToolbarButton;exports.NylasMinBookingNotice=o.NylasMinBookingNotice;exports.NylasMinCancellationNotice=o.NylasMinCancellationNotice;exports.NylasNotification=o.NylasNotification;exports.NylasParticipantBookingCalendars=o.NylasParticipantBookingCalendars;exports.NylasParticipantsCustomAvailability=o.NylasParticipantsCustomAvailability;exports.NylasProvider=o.NylasProvider;exports.NylasReminderEmails=o.NylasReminderEmails;exports.NylasReminderTime=o.NylasReminderTime;exports.NylasSchedulerEditor=o.NylasSchedulerEditor;exports.NylasScheduling=o.NylasScheduling;exports.NylasSelectedEventCard=o.NylasSelectedEventCard;exports.NylasSummarizeMessageButton=o.NylasSummarizeMessageButton;exports.NylasThreadsRefresh=o.NylasThreadsRefresh;exports.NylasThreadsSearch=o.NylasThreadsSearch;exports.NylasTimeWindowPicker=o.NylasTimeWindowPicker;exports.NylasTimeslotInterval=o.NylasTimeslotInterval;exports.NylasTimeslotPicker=o.NylasTimeslotPicker;exports.NylasViewEmail=o.NylasViewEmail;exports.NylasViewThread=o.NylasViewThread;exports.PeopleIcon=o.PeopleIcon;exports.PersonClipboardIcon=o.PersonClipboardIcon;exports.PersonIcon=o.PersonIcon;exports.PlayIcon=o.PlayIcon;exports.PlusIcon=o.PlusIcon;exports.RadioButtonGroup=o.RadioButtonGroup;exports.RefreshIcon=o.RefreshIcon;exports.ReplyAllIcon=o.ReplyAllIcon;exports.ReplyIcon=o.ReplyIcon;exports.SearchIcon=o.SearchIcon;exports.SelectDropdown=o.SelectDropdown;exports.SentIcon=o.SentIcon;exports.SpamIcon=o.SpamIcon;exports.StarIcon=o.StarIcon;exports.StopIcon=o.StopIcon;exports.TextareaComponent=o.TextareaComponent;exports.TimePeriodSelector=o.TimePeriodSelector;exports.ToggleSwitch=o.ToggleSwitch;exports.TooltipComponent=o.TooltipComponent;exports.TranslateIcon=o.TranslateIcon;exports.TrashFillIcon=o.TrashFillIcon;exports.TrashIcon=o.TrashIcon;exports.UnderlineIcon=o.UnderlineIcon;exports.WarningIcon=o.WarningIcon;exports.ZoomIcon=o.ZoomIcon;exports.applyPolyfills=o.applyPolyfills;exports.defineCustomElements=o.defineCustomElements;exports.setNonce=o.setNonce;exports.useNylasMailboxElement=o.useNylasMailboxElement;
package/dist/react.js CHANGED
@@ -1,4 +1,4 @@
1
- import { a1 as e, a2 as l, a3 as i, a4 as c, a5 as t, a6 as r, a7 as b, a8 as y, a9 as I, aa as N, ab as d, ac as C, ad as m, ae as p, af as g, ag as u, ah as k, ai as h, aj as f, ak as E, al as P, am as T, an as v, ao as S, ap as B, aq as L, ar as F, as as w, at as M, au as A, av as D, aw as R, ax as x, ay as G, az as W, aA as z, aB as V, aC as q, aD as O, aE as U, aF as Z, aG as j, aH as H, aI as J, aJ as K, aK as Q, aL as X, aM as _, aN as $, aO as Y, aP as aa, aQ as sa, aR as oa, aS as na, aT as ea, aU as la, aV as ia, aW as ca, aX as ta, aY as ra, aZ as ba, a_ as ya, a$ as Ia, b0 as Na, b1 as da, b2 as Ca, b3 as ma, b4 as pa, N as ga, b5 as ua, b6 as ka, b7 as ha, b8 as fa, b9 as Ea, ba as Pa, bb as Ta, bc as va, bd as Sa, be as Ba, bf as La, bg as Fa, bh as wa, bi as Ma, bj as Aa, bk as Da, bl as Ra, bm as xa, bn as Ga, bo as Wa, bp as za, bq as Va, br as qa, bs as Oa, bt as Ua, bu as Za, bv as ja, bw as Ha, bx as Ja, by as Ka, bz as Qa, bA as Xa, bB as _a, bC as $a, bD as Ya, bE as as, bF as ss, bG as os, bH as ns, bI as es, bJ as ls, bK as is, bL as cs, bM as ts, bN as rs, bO as bs, bP as ys, bQ as Is, bR as Ns, bS as ds, bT as Cs, bU as ms, bV as ps, bW as gs, bX as us, _ as ks, $ as hs, a0 as fs, Z as Es } from "./index-f8317a8e.js";
1
+ import { a2 as e, a3 as l, a4 as i, a5 as c, a6 as t, a7 as r, a8 as b, a9 as y, aa as I, ab as N, ac as d, ad as C, ae as m, af as p, ag as g, ah as k, ai as u, aj as f, ak as T, al as h, am as E, an as P, ao as B, ap as v, aq as S, ar as L, as as F, at as w, au as M, av as R, aw as A, ax as D, ay as x, az as G, aA as W, aB as z, aC as V, aD as q, aE as O, aF as U, aG as Z, aH as _, aI as $, aJ as j, aK as H, aL as J, aM as K, aN as Q, aO as X, aP as Y, aQ as aa, aR as sa, aS as oa, aT as na, aU as ea, aV as la, aW as ia, aX as ca, aY as ta, aZ as ra, a_ as ba, a$ as ya, b0 as Ia, b1 as Na, b2 as da, b3 as Ca, b4 as ma, b5 as pa, b6 as ga, b7 as ka, b8 as ua, N as fa, b9 as Ta, ba as ha, bb as Ea, bc as Pa, bd as Ba, be as va, bf as Sa, bg as La, bh as Fa, bi as wa, bj as Ma, bk as Ra, bl as Aa, bm as Da, bn as xa, bo as Ga, bp as Wa, bq as za, br as Va, bs as qa, bt as Oa, bu as Ua, bv as Za, bw as _a, bx as $a, by as ja, bz as Ha, bA as Ja, bB as Ka, bC as Qa, bD as Xa, bE as Ya, bF as as, bG as ss, bH as os, bI as ns, bJ as es, bK as ls, bL as is, bM as cs, bN as ts, bO as rs, bP as bs, bQ as ys, bR as Is, bS as Ns, bT as ds, bU as Cs, bV as ms, bW as ps, bX as gs, bY as ks, bZ as us, b_ as fs, b$ as Ts, $ as hs, a0 as Es, a1 as Ps, _ as Bs } from "./index-a15916e5.js";
2
2
  import "react";
3
3
  import "react-dom";
4
4
  export {
@@ -17,23 +17,23 @@ export {
17
17
  m as CheckboxComponent,
18
18
  p as CheckmarkCircleIcon,
19
19
  g as CheckmarkIcon,
20
- u as ChevronIcon,
21
- k as ClockIcon,
22
- h as CloseIcon,
23
- f as CopyIcon,
24
- E as DeleteIcon,
25
- P as DocumentRefreshIcon,
26
- T as DragableIcon,
27
- v as EditIcon,
28
- S as EnvelopeFillIcon,
29
- B as EnvelopeIcon,
20
+ k as ChevronIcon,
21
+ u as ClockIcon,
22
+ f as CloseIcon,
23
+ T as CopyIcon,
24
+ h as DeleteIcon,
25
+ E as DocumentRefreshIcon,
26
+ P as DragableIcon,
27
+ B as EditIcon,
28
+ v as EnvelopeFillIcon,
29
+ S as EnvelopeIcon,
30
30
  L as EyeIcon,
31
31
  F as FlowIcon,
32
32
  w as FolderIcon,
33
33
  M as ForwardIcon,
34
- A as GlobeIcon,
35
- D as GoogleLogoIcon,
36
- R as GoogleMeetIcon,
34
+ R as GlobeIcon,
35
+ A as GoogleLogoIcon,
36
+ D as GoogleMeetIcon,
37
37
  x as InboxIcon,
38
38
  G as InfoIcon,
39
39
  W as InputComponent,
@@ -43,91 +43,94 @@ export {
43
43
  O as LocationIcon,
44
44
  U as LocationOffIcon,
45
45
  Z as MicrosoftLogoIcon,
46
- j as MicrosoftTeamsIcon,
47
- H as MultiSelectDropdown,
48
- J as NylasAdditionalParticipants,
49
- K as NylasAvailabilityPicker,
50
- Q as NylasBookedEventCard,
51
- X as NylasBookingCalendarPicker,
52
- _ as NylasBookingForm,
53
- $ as NylasBookingFormConfig,
54
- Y as NylasBufferTime,
55
- aa as NylasCalendarPicker,
56
- sa as NylasCancelBookingForm,
57
- oa as NylasCancellationPolicy,
58
- na as NylasCancelledEventCard,
59
- ea as NylasComposer,
60
- la as NylasConfirmationEmail,
61
- ia as NylasConnectedCalendars,
62
- ca as NylasCustomBookingFlow,
63
- ta as NylasCustomizeBookingSettings,
64
- ra as NylasDatePicker,
65
- ba as NylasEditorTabs,
66
- ya as NylasEventDescription,
67
- Ia as NylasEventDuration,
68
- Na as NylasEventInfo,
69
- da as NylasEventLimits,
70
- Ca as NylasEventLocation,
71
- ma as NylasEventTitle,
72
- pa as NylasFormCard,
73
- ga as NylasIdentityRequestWrapper,
74
- ua as NylasIfState,
75
- ka as NylasLimitFutureBookings,
76
- ha as NylasListConfigurations,
77
- fa as NylasListFolders,
78
- Ea as NylasListThreads,
79
- Pa as NylasLocaleSwitch,
80
- Ta as NylasLogin,
81
- va as NylasLogo,
82
- Sa as NylasMailbox,
83
- Ba as NylasMailboxPagination,
84
- La as NylasMailboxToolbarButton,
85
- Fa as NylasMinBookingNotice,
86
- wa as NylasMinCancellationNotice,
87
- Ma as NylasNotification,
88
- Aa as NylasParticipantBookingCalendars,
89
- Da as NylasParticipantsCustomAvailability,
90
- Ra as NylasProvider,
91
- xa as NylasReminderEmails,
92
- Ga as NylasReminderTime,
93
- Wa as NylasSchedulerEditor,
94
- za as NylasScheduling,
95
- Va as NylasSelectedEventCard,
96
- qa as NylasSummarizeMessageButton,
97
- Oa as NylasThreadsRefresh,
98
- Ua as NylasThreadsSearch,
99
- Za as NylasTimeWindowPicker,
100
- ja as NylasTimeslotInterval,
101
- Ha as NylasTimeslotPicker,
102
- Ja as NylasViewEmail,
103
- Ka as NylasViewThread,
104
- Qa as PeopleIcon,
105
- Xa as PersonClipboardIcon,
106
- _a as PersonIcon,
107
- $a as PlayIcon,
108
- Ya as PlusIcon,
109
- as as RadioButtonGroup,
110
- ss as RefreshIcon,
111
- os as ReplyAllIcon,
112
- ns as ReplyIcon,
113
- es as SearchIcon,
114
- ls as SelectDropdown,
115
- is as SentIcon,
116
- cs as SpamIcon,
117
- ts as StarIcon,
118
- rs as StopIcon,
119
- bs as TextareaComponent,
120
- ys as TimePeriodSelector,
121
- Is as ToggleSwitch,
122
- Ns as TooltipComponent,
123
- ds as TranslateIcon,
124
- Cs as TrashFillIcon,
125
- ms as TrashIcon,
126
- ps as UnderlineIcon,
127
- gs as WarningIcon,
128
- us as ZoomIcon,
129
- ks as applyPolyfills,
130
- hs as defineCustomElements,
131
- fs as setNonce,
132
- Es as useNylasMailboxElement
46
+ _ as MicrosoftTeamsIcon,
47
+ $ as MultiSelectDropdown,
48
+ j as NylasAdditionalParticipants,
49
+ H as NylasAvailabilityPicker,
50
+ J as NylasBookedEventCard,
51
+ K as NylasBookingCalendarPicker,
52
+ Q as NylasBookingConfirmationRedirect,
53
+ X as NylasBookingConfirmationType,
54
+ Y as NylasBookingForm,
55
+ aa as NylasBookingFormConfig,
56
+ sa as NylasBookingType,
57
+ oa as NylasBufferTime,
58
+ na as NylasCalendarPicker,
59
+ ea as NylasCancelBookingForm,
60
+ la as NylasCancellationPolicy,
61
+ ia as NylasCancelledEventCard,
62
+ ca as NylasComposer,
63
+ ta as NylasConfirmationEmail,
64
+ ra as NylasConnectedCalendars,
65
+ ba as NylasCustomBookingFlow,
66
+ ya as NylasCustomizeBookingSettings,
67
+ Ia as NylasDatePicker,
68
+ Na as NylasEditorTabs,
69
+ da as NylasEventDescription,
70
+ Ca as NylasEventDuration,
71
+ ma as NylasEventInfo,
72
+ pa as NylasEventLimits,
73
+ ga as NylasEventLocation,
74
+ ka as NylasEventTitle,
75
+ ua as NylasFormCard,
76
+ fa as NylasIdentityRequestWrapper,
77
+ Ta as NylasIfState,
78
+ ha as NylasLimitFutureBookings,
79
+ Ea as NylasListConfigurations,
80
+ Pa as NylasListFolders,
81
+ Ba as NylasListThreads,
82
+ va as NylasLocaleSwitch,
83
+ Sa as NylasLogin,
84
+ La as NylasLogo,
85
+ Fa as NylasMailbox,
86
+ wa as NylasMailboxPagination,
87
+ Ma as NylasMailboxToolbarButton,
88
+ Ra as NylasMinBookingNotice,
89
+ Aa as NylasMinCancellationNotice,
90
+ Da as NylasNotification,
91
+ xa as NylasParticipantBookingCalendars,
92
+ Ga as NylasParticipantsCustomAvailability,
93
+ Wa as NylasProvider,
94
+ za as NylasReminderEmails,
95
+ Va as NylasReminderTime,
96
+ qa as NylasSchedulerEditor,
97
+ Oa as NylasScheduling,
98
+ Ua as NylasSelectedEventCard,
99
+ Za as NylasSummarizeMessageButton,
100
+ _a as NylasThreadsRefresh,
101
+ $a as NylasThreadsSearch,
102
+ ja as NylasTimeWindowPicker,
103
+ Ha as NylasTimeslotInterval,
104
+ Ja as NylasTimeslotPicker,
105
+ Ka as NylasViewEmail,
106
+ Qa as NylasViewThread,
107
+ Xa as PeopleIcon,
108
+ Ya as PersonClipboardIcon,
109
+ as as PersonIcon,
110
+ ss as PlayIcon,
111
+ os as PlusIcon,
112
+ ns as RadioButtonGroup,
113
+ es as RefreshIcon,
114
+ ls as ReplyAllIcon,
115
+ is as ReplyIcon,
116
+ cs as SearchIcon,
117
+ ts as SelectDropdown,
118
+ rs as SentIcon,
119
+ bs as SpamIcon,
120
+ ys as StarIcon,
121
+ Is as StopIcon,
122
+ Ns as TextareaComponent,
123
+ ds as TimePeriodSelector,
124
+ Cs as ToggleSwitch,
125
+ ms as TooltipComponent,
126
+ ps as TranslateIcon,
127
+ gs as TrashFillIcon,
128
+ ks as TrashIcon,
129
+ us as UnderlineIcon,
130
+ fs as WarningIcon,
131
+ Ts as ZoomIcon,
132
+ hs as applyPolyfills,
133
+ Es as defineCustomElements,
134
+ Ps as setNonce,
135
+ Bs as useNylasMailboxElement
133
136
  };
@@ -1,12 +1,12 @@
1
- import { r as e, h as c } from "./index-f8317a8e.js";
1
+ import { r as s, h as c } from "./index-a15916e5.js";
2
2
  import "react";
3
3
  import "react-dom";
4
4
  const t = ".sc-refresh-icon-h{display:flex}", l = t, h = class {
5
- constructor(s) {
6
- e(this, s), this.width = "15", this.height = "15";
5
+ constructor(e) {
6
+ s(this, e), this.width = "15", this.height = "15";
7
7
  }
8
8
  render() {
9
- return c("svg", { key: "03402ef22595092998627fb5f41087a831ab4320", fill: "auto", width: this.width, height: this.height, viewBox: "0 0 32 32", version: "1.1", xmlns: "http://www.w3.org/2000/svg" }, c("path", { key: "2e4a1b6a6a02bd6b0bc5e58ed07e5f5903dbcd44", d: "M15.544 28.080c-0.002-0.006-0.008-0.010-0.012-0.015l-2.873-4.489c-0.204-0.335-0.646-0.454-0.992-0.266l-0.256 0.157c-0.344 0.188-0.337 0.673-0.133 1.008l1.841 2.857c-0.157-0.035-0.316-0.063-0.471-0.103-3.224-0.843-5.953-3.026-7.485-5.988-1.448-2.797-1.72-5.99-0.766-8.992s3.118-5.452 5.915-6.899c0.476-0.247 0.662-0.832 0.416-1.308-0.246-0.477-0.832-0.663-1.308-0.416-3.258 1.686-5.763 4.54-6.874 8.036s-0.794 7.215 0.892 10.473c1.786 3.448 4.963 5.989 8.72 6.973 0.043 0.011 0.087 0.017 0.13 0.028l-2.541 1.288c-0.344 0.189-0.458 0.613-0.254 0.948l0.098 0.256c0.205 0.335 0.557 0.454 0.9 0.266l4.651-2.381c0.006-0.004 0.012-0.003 0.018-0.007l0.312-0.171c0.172-0.095 0.287-0.249 0.332-0.422 0.047-0.172 0.025-0.364-0.076-0.531zM28.559 10.025c-1.783-3.447-4.862-5.988-8.618-6.972-0.267-0.070-0.541-0.124-0.814-0.179l2.494-1.265c0.344-0.189 0.549-0.614 0.345-0.949l-0.099-0.255c-0.205-0.336-0.648-0.454-0.991-0.267l-4.651 2.381c-0.006 0.003-0.012 0.002-0.018 0.006l-0.312 0.171c-0.173 0.095-0.287 0.249-0.332 0.422-0.047 0.172-0.025 0.364 0.077 0.53l0.185 0.304c0.003 0.006 0.008 0.010 0.012 0.016l2.873 4.489c0.203 0.335 0.646 0.454 0.991 0.266l0.226-0.157c0.344-0.188 0.366-0.673 0.163-1.008l-1.85-2.87c0.407 0.063 0.811 0.138 1.207 0.242 3.226 0.845 5.856 3.027 7.387 5.986 1.448 2.797 1.72 5.99 0.765 8.991s-3.020 5.451-5.818 6.901c-0.476 0.247-0.662 0.831-0.415 1.308 0.172 0.332 0.511 0.524 0.863 0.524 0.15 0 0.302-0.035 0.446-0.109 3.259-1.686 5.664-4.54 6.776-8.035 1.111-3.497 0.794-7.217-0.893-10.473z" }));
9
+ return c("svg", { key: "7a5afd1273623e7e5833766c224bec35739a7990", fill: "auto", width: this.width, height: this.height, viewBox: "0 0 32 32", version: "1.1", xmlns: "http://www.w3.org/2000/svg" }, c("path", { key: "9652bd84fc15fc119a71fd46611deee983f4aec2", d: "M15.544 28.080c-0.002-0.006-0.008-0.010-0.012-0.015l-2.873-4.489c-0.204-0.335-0.646-0.454-0.992-0.266l-0.256 0.157c-0.344 0.188-0.337 0.673-0.133 1.008l1.841 2.857c-0.157-0.035-0.316-0.063-0.471-0.103-3.224-0.843-5.953-3.026-7.485-5.988-1.448-2.797-1.72-5.99-0.766-8.992s3.118-5.452 5.915-6.899c0.476-0.247 0.662-0.832 0.416-1.308-0.246-0.477-0.832-0.663-1.308-0.416-3.258 1.686-5.763 4.54-6.874 8.036s-0.794 7.215 0.892 10.473c1.786 3.448 4.963 5.989 8.72 6.973 0.043 0.011 0.087 0.017 0.13 0.028l-2.541 1.288c-0.344 0.189-0.458 0.613-0.254 0.948l0.098 0.256c0.205 0.335 0.557 0.454 0.9 0.266l4.651-2.381c0.006-0.004 0.012-0.003 0.018-0.007l0.312-0.171c0.172-0.095 0.287-0.249 0.332-0.422 0.047-0.172 0.025-0.364-0.076-0.531zM28.559 10.025c-1.783-3.447-4.862-5.988-8.618-6.972-0.267-0.070-0.541-0.124-0.814-0.179l2.494-1.265c0.344-0.189 0.549-0.614 0.345-0.949l-0.099-0.255c-0.205-0.336-0.648-0.454-0.991-0.267l-4.651 2.381c-0.006 0.003-0.012 0.002-0.018 0.006l-0.312 0.171c-0.173 0.095-0.287 0.249-0.332 0.422-0.047 0.172-0.025 0.364 0.077 0.53l0.185 0.304c0.003 0.006 0.008 0.010 0.012 0.016l2.873 4.489c0.203 0.335 0.646 0.454 0.991 0.266l0.226-0.157c0.344-0.188 0.366-0.673 0.163-1.008l-1.85-2.87c0.407 0.063 0.811 0.138 1.207 0.242 3.226 0.845 5.856 3.027 7.387 5.986 1.448 2.797 1.72 5.99 0.765 8.991s-3.020 5.451-5.818 6.901c-0.476 0.247-0.662 0.831-0.415 1.308 0.172 0.332 0.511 0.524 0.863 0.524 0.15 0 0.302-0.035 0.446-0.109 3.259-1.686 5.664-4.54 6.776-8.035 1.111-3.497 0.794-7.217-0.893-10.473z" }));
10
10
  }
11
11
  };
12
12
  h.style = l;
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index-db48e0b6.cjs");require("react");require("react-dom");const t=".sc-refresh-icon-h{display:flex}",i=t,c=class{constructor(s){e.registerInstance(this,s),this.width="15",this.height="15"}render(){return e.h("svg",{key:"03402ef22595092998627fb5f41087a831ab4320",fill:"auto",width:this.width,height:this.height,viewBox:"0 0 32 32",version:"1.1",xmlns:"http://www.w3.org/2000/svg"},e.h("path",{key:"2e4a1b6a6a02bd6b0bc5e58ed07e5f5903dbcd44",d:"M15.544 28.080c-0.002-0.006-0.008-0.010-0.012-0.015l-2.873-4.489c-0.204-0.335-0.646-0.454-0.992-0.266l-0.256 0.157c-0.344 0.188-0.337 0.673-0.133 1.008l1.841 2.857c-0.157-0.035-0.316-0.063-0.471-0.103-3.224-0.843-5.953-3.026-7.485-5.988-1.448-2.797-1.72-5.99-0.766-8.992s3.118-5.452 5.915-6.899c0.476-0.247 0.662-0.832 0.416-1.308-0.246-0.477-0.832-0.663-1.308-0.416-3.258 1.686-5.763 4.54-6.874 8.036s-0.794 7.215 0.892 10.473c1.786 3.448 4.963 5.989 8.72 6.973 0.043 0.011 0.087 0.017 0.13 0.028l-2.541 1.288c-0.344 0.189-0.458 0.613-0.254 0.948l0.098 0.256c0.205 0.335 0.557 0.454 0.9 0.266l4.651-2.381c0.006-0.004 0.012-0.003 0.018-0.007l0.312-0.171c0.172-0.095 0.287-0.249 0.332-0.422 0.047-0.172 0.025-0.364-0.076-0.531zM28.559 10.025c-1.783-3.447-4.862-5.988-8.618-6.972-0.267-0.070-0.541-0.124-0.814-0.179l2.494-1.265c0.344-0.189 0.549-0.614 0.345-0.949l-0.099-0.255c-0.205-0.336-0.648-0.454-0.991-0.267l-4.651 2.381c-0.006 0.003-0.012 0.002-0.018 0.006l-0.312 0.171c-0.173 0.095-0.287 0.249-0.332 0.422-0.047 0.172-0.025 0.364 0.077 0.53l0.185 0.304c0.003 0.006 0.008 0.010 0.012 0.016l2.873 4.489c0.203 0.335 0.646 0.454 0.991 0.266l0.226-0.157c0.344-0.188 0.366-0.673 0.163-1.008l-1.85-2.87c0.407 0.063 0.811 0.138 1.207 0.242 3.226 0.845 5.856 3.027 7.387 5.986 1.448 2.797 1.72 5.99 0.765 8.991s-3.020 5.451-5.818 6.901c-0.476 0.247-0.662 0.831-0.415 1.308 0.172 0.332 0.511 0.524 0.863 0.524 0.15 0 0.302-0.035 0.446-0.109 3.259-1.686 5.664-4.54 6.776-8.035 1.111-3.497 0.794-7.217-0.893-10.473z"}))}};c.style=i;exports.refresh_icon=c;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index-8a536089.cjs");require("react");require("react-dom");const t=".sc-refresh-icon-h{display:flex}",i=t,c=class{constructor(s){e.registerInstance(this,s),this.width="15",this.height="15"}render(){return e.h("svg",{key:"7a5afd1273623e7e5833766c224bec35739a7990",fill:"auto",width:this.width,height:this.height,viewBox:"0 0 32 32",version:"1.1",xmlns:"http://www.w3.org/2000/svg"},e.h("path",{key:"9652bd84fc15fc119a71fd46611deee983f4aec2",d:"M15.544 28.080c-0.002-0.006-0.008-0.010-0.012-0.015l-2.873-4.489c-0.204-0.335-0.646-0.454-0.992-0.266l-0.256 0.157c-0.344 0.188-0.337 0.673-0.133 1.008l1.841 2.857c-0.157-0.035-0.316-0.063-0.471-0.103-3.224-0.843-5.953-3.026-7.485-5.988-1.448-2.797-1.72-5.99-0.766-8.992s3.118-5.452 5.915-6.899c0.476-0.247 0.662-0.832 0.416-1.308-0.246-0.477-0.832-0.663-1.308-0.416-3.258 1.686-5.763 4.54-6.874 8.036s-0.794 7.215 0.892 10.473c1.786 3.448 4.963 5.989 8.72 6.973 0.043 0.011 0.087 0.017 0.13 0.028l-2.541 1.288c-0.344 0.189-0.458 0.613-0.254 0.948l0.098 0.256c0.205 0.335 0.557 0.454 0.9 0.266l4.651-2.381c0.006-0.004 0.012-0.003 0.018-0.007l0.312-0.171c0.172-0.095 0.287-0.249 0.332-0.422 0.047-0.172 0.025-0.364-0.076-0.531zM28.559 10.025c-1.783-3.447-4.862-5.988-8.618-6.972-0.267-0.070-0.541-0.124-0.814-0.179l2.494-1.265c0.344-0.189 0.549-0.614 0.345-0.949l-0.099-0.255c-0.205-0.336-0.648-0.454-0.991-0.267l-4.651 2.381c-0.006 0.003-0.012 0.002-0.018 0.006l-0.312 0.171c-0.173 0.095-0.287 0.249-0.332 0.422-0.047 0.172-0.025 0.364 0.077 0.53l0.185 0.304c0.003 0.006 0.008 0.010 0.012 0.016l2.873 4.489c0.203 0.335 0.646 0.454 0.991 0.266l0.226-0.157c0.344-0.188 0.366-0.673 0.163-1.008l-1.85-2.87c0.407 0.063 0.811 0.138 1.207 0.242 3.226 0.845 5.856 3.027 7.387 5.986 1.448 2.797 1.72 5.99 0.765 8.991s-3.020 5.451-5.818 6.901c-0.476 0.247-0.662 0.831-0.415 1.308 0.172 0.332 0.511 0.524 0.863 0.524 0.15 0 0.302-0.035 0.446-0.109 3.259-1.686 5.664-4.54 6.776-8.035 1.111-3.497 0.794-7.217-0.893-10.473z"}))}};c.style=i;exports.refresh_icon=c;
@@ -1 +1 @@
1
- "use strict";const s=require("./index-db48e0b6.cjs");function m(e,o,u="registerComponent"){return new CustomEvent(u,{bubbles:!0,composed:!0,detail:o})}function P(e,o,u="unregisterComponent"){return new CustomEvent(u,{bubbles:!0,composed:!0,detail:o})}function b(e){return(o,u)=>{const r=e.name;s.debug(`[${r}] Registering component ${r} being called on ${u}`);const l=o.componentWillLoad;if(!l){s.error(`[${r}] componentWillLoad lifecycle method in ${r} missing. Required for RegisterComponent decorator.`);return}const p=o.connectedCallback;if(!p){s.error(`[${r}] connectedCallback lifecycle method in ${r} missing. Required for RegisterComponent decorator.`);return}const a=o.disconnectedCallback;if(!a){s.error(`[${r}] disconnectedCallback lifecycle method in ${r} missing. Required for RegisterComponent decorator.`);return}if(e.storeToProps&&e.stateToProps){const n=Array.from(e.storeToProps.values()),t=Array.from(e.stateToProps.values()),i=n.filter(c=>t.includes(c));if(i.length>0){s.error(`[${r}] Overlapping prop keys detected in ${r} for storeToProps and stateToProps. Make sure to only define them once. Overlapping keys: ${i.join(", ")}`);return}}const d=new Map;e.eventToProps&&Object.keys(e.eventToProps).forEach(n=>{var t;d.set(n,(t=e.eventToProps)==null?void 0:t[n])}),o.connectedCallback=function(){s.debug(`[~${r}] connectedCallback called`);const n=p==null?void 0:p.call(this),t=s.getElement(this);return t.dataset.nylasId||(Object.defineProperty(t,"registerNylasComponent",{get(){return!0},enumerable:!0}),Object.defineProperty(t,"stateToProps",{get(){return e.stateToProps},enumerable:!0}),Object.defineProperty(t,"getStoresToProp",{get(){return e.getStoresToProp},enumerable:!0}),Object.defineProperty(t,"storeToProps",{get(){return e.storeToProps},enumerable:!0}),Object.defineProperty(t,"eventToProps",{get(){return d},enumerable:!0}),Object.defineProperty(t,"authToProp",{get(){return e.authToProp},enumerable:!0}),Object.defineProperty(t,"connectorToProp",{get(){return e.connectorToProp},enumerable:!0}),Object.defineProperty(t,"localPropsToProp",{get(){return e.localPropsToProp},enumerable:!0})),n},e.fireRegisterEvent&&(o.componentWillLoad=function(){const n=l==null?void 0:l.call(this),t=s.getElement(this),i={element:t,...e,eventToProps:d},c=m(o,i,e.registrationEventName);return t.dispatchEvent(c)&&s.debug(`[${r}] Component ${r} successfully fired registration event`),n},o.disconnectedCallback=function(){const n=a==null?void 0:a.call(this),t=s.getElement(this),i={element:t,...e,eventToProps:d},c=P(o,i,e.unregistrationEventName);return t.dispatchEvent(c)&&s.debug(`[${r}] Component ${r} successfully fired unregistration event`),n})}}exports.RegisterComponent=b;
1
+ "use strict";const s=require("./index-8a536089.cjs");function m(e,o,u="registerComponent"){return new CustomEvent(u,{bubbles:!0,composed:!0,detail:o})}function P(e,o,u="unregisterComponent"){return new CustomEvent(u,{bubbles:!0,composed:!0,detail:o})}function b(e){return(o,u)=>{const r=e.name;s.debug(`[${r}] Registering component ${r} being called on ${u}`);const l=o.componentWillLoad;if(!l){s.error(`[${r}] componentWillLoad lifecycle method in ${r} missing. Required for RegisterComponent decorator.`);return}const p=o.connectedCallback;if(!p){s.error(`[${r}] connectedCallback lifecycle method in ${r} missing. Required for RegisterComponent decorator.`);return}const a=o.disconnectedCallback;if(!a){s.error(`[${r}] disconnectedCallback lifecycle method in ${r} missing. Required for RegisterComponent decorator.`);return}if(e.storeToProps&&e.stateToProps){const n=Array.from(e.storeToProps.values()),t=Array.from(e.stateToProps.values()),i=n.filter(c=>t.includes(c));if(i.length>0){s.error(`[${r}] Overlapping prop keys detected in ${r} for storeToProps and stateToProps. Make sure to only define them once. Overlapping keys: ${i.join(", ")}`);return}}const d=new Map;e.eventToProps&&Object.keys(e.eventToProps).forEach(n=>{var t;d.set(n,(t=e.eventToProps)==null?void 0:t[n])}),o.connectedCallback=function(){s.debug(`[~${r}] connectedCallback called`);const n=p==null?void 0:p.call(this),t=s.getElement(this);return t.dataset.nylasId||(Object.defineProperty(t,"registerNylasComponent",{get(){return!0},enumerable:!0}),Object.defineProperty(t,"stateToProps",{get(){return e.stateToProps},enumerable:!0}),Object.defineProperty(t,"getStoresToProp",{get(){return e.getStoresToProp},enumerable:!0}),Object.defineProperty(t,"storeToProps",{get(){return e.storeToProps},enumerable:!0}),Object.defineProperty(t,"eventToProps",{get(){return d},enumerable:!0}),Object.defineProperty(t,"authToProp",{get(){return e.authToProp},enumerable:!0}),Object.defineProperty(t,"connectorToProp",{get(){return e.connectorToProp},enumerable:!0}),Object.defineProperty(t,"localPropsToProp",{get(){return e.localPropsToProp},enumerable:!0})),n},e.fireRegisterEvent&&(o.componentWillLoad=function(){const n=l==null?void 0:l.call(this),t=s.getElement(this),i={element:t,...e,eventToProps:d},c=m(o,i,e.registrationEventName);return t.dispatchEvent(c)&&s.debug(`[${r}] Component ${r} successfully fired registration event`),n},o.disconnectedCallback=function(){const n=a==null?void 0:a.call(this),t=s.getElement(this),i={element:t,...e,eventToProps:d},c=P(o,i,e.unregistrationEventName);return t.dispatchEvent(c)&&s.debug(`[${r}] Component ${r} successfully fired unregistration event`),n})}}exports.RegisterComponent=b;
@@ -1,4 +1,4 @@
1
- import { d, T as m, g as P } from "./index-f8317a8e.js";
1
+ import { d, U as m, g as P } from "./index-a15916e5.js";
2
2
  function b(e, o, i = "registerComponent") {
3
3
  return new CustomEvent(i, {
4
4
  bubbles: !0,
@@ -1 +1 @@
1
- "use strict";const r=require("./index-db48e0b6.cjs");function a(n={}){const i={selectedConfiguration:{},configurations:[],listConfigurationsNextCursor:null,calendars:[],currentUser:null,action:null,additionalParticipants:[],hideEditorTabs:[],...n},e=r.createStore(i);function t(){e.set("selectedConfiguration",{...n.selectedConfiguration})}return e.onChange("action",async o=>{o||t()}),{...e,resetSelectedConfiguration:t}}exports.CreateNylasSchedulerConfigStore=a;
1
+ "use strict";const r=require("./index-8a536089.cjs");function a(n={}){const i={selectedConfiguration:{},configurations:[],listConfigurationsNextCursor:null,calendars:[],currentUser:null,action:null,additionalParticipants:[],hideEditorTabs:[],...n},e=r.createStore(i);function t(){e.set("selectedConfiguration",{...n.selectedConfiguration})}return e.onChange("action",async o=>{o||t()}),{...e,resetSelectedConfiguration:t}}exports.CreateNylasSchedulerConfigStore=a;
@@ -1,4 +1,4 @@
1
- import { e as r } from "./index-f8317a8e.js";
1
+ import { e as r } from "./index-a15916e5.js";
2
2
  function s(n = {}) {
3
3
  const o = {
4
4
  selectedConfiguration: {},
@@ -1,4 +1,4 @@
1
- import { d as b, e as z, k as d, m as F } from "./index-f8317a8e.js";
1
+ import { d as b, e as z, k as d, m as F } from "./index-a15916e5.js";
2
2
  var k;
3
3
  (function(a) {
4
4
  a.Component = "component", a.Api = "api", a.Auth = "auth";
@@ -1 +1 @@
1
- "use strict";const c=require("./index-db48e0b6.cjs");exports.ErrorCategory=void 0;(function(a){a.Component="component",a.Api="api",a.Auth="auth"})(exports.ErrorCategory||(exports.ErrorCategory={}));var D;(function(a){a.endtime_not_in_future="endtime_not_in_future",a.no_booking_info="no_booking_info",a.no_timeslot_selected="no_timeslot_selected",a.no_timezone_selected="no_timezone_selected",a.no_booking_id="no_booking_id",a.invalid_start_time="invalid_start_time",a.invalid_end_time="invalid_end_time",a.invalid_timezone="invalid_timezone"})(D||(D={}));var E;(function(a){a.invalid_session="invalid_session",a.general_error="general_error",a.internal_error="internal_error",a.invalid_request_error="invalid_request_error",a.timeslot_not_available="timeslot_not_available",a.provider_error="provider_error",a.not_found_error="not_found_error"})(E||(E={}));class P{constructor(){this.component=e=>{const t=exports.ErrorCategory.Component,s=`${e} Error`;return{endtime_not_in_future:(i='"endtime" can not be in the future')=>({title:s,message:i,category:t}),no_booking_info:(i="No booking info provided")=>({title:s,message:i,category:t}),no_timeslot_selected:(i="No timeslot selected")=>({title:s,message:i,category:t}),no_timezone_selected:(i="No timezone selected")=>({title:s,message:i,category:t}),no_booking_id:(i="No booking id provided")=>({title:s,message:i,category:t}),invalid_start_time:(i="Invalid start time")=>({title:s,message:i,category:t}),invalid_end_time:(i="Invalid end time")=>({title:s,message:i,category:t}),invalid_timezone:(i="Invalid timezone")=>({title:s,message:i,category:t})}},this.api=e=>{const t=exports.ErrorCategory.Api,s=`${e} Error`;return{invalid_session:i=>({title:s,message:i,category:t}),general_error:i=>({title:s,message:i,category:t}),internal_error:i=>({title:s,message:i,category:t}),invalid_request_error:i=>({title:s,message:i,category:t}),timeslot_not_available:i=>({title:s,message:i,category:t}),provider_error:i=>({title:s,message:i,category:t}),not_found_error:i=>({title:s,message:i,category:t})}}}}class M{constructor({schedulerAPIURL:e,schedulerStore:t,sessionId:s,configId:i}){this.errors=new P,this.schedulerStore=t,this.schedulerAPIURL=e,this.sessionId=s,this.configId=i}getHeaders(){return this.sessionId?{Authorization:`Bearer ${this.sessionId}`}:{}}async makeAPIRequest(e,t,s,i={}){try{const r=new URL(this.schedulerAPIURL);return r.pathname=e,await(await fetch(decodeURIComponent(r.toString()),{method:t,headers:{"Content-Type":"application/json",Origin:window.location.origin,...i},body:s})).json()}catch(r){return{error:{message:r.message,title:"API request failed",type:"api"}}}}getErrorMessage(e){var s,i,r,n;let t=(e==null?void 0:e.message)||(e==null?void 0:e.title)||"Something went wrong";return(e==null?void 0:e.type)==="provider_error"&&(t=((i=(s=e==null?void 0:e.provider_error)==null?void 0:s.error)==null?void 0:i.message)||((n=(r=e==null?void 0:e.provider_error)==null?void 0:r.error)==null?void 0:n.title)||"Something went wrong"),t}setConfigId(e){this.configId=e}selectDate(e){this.schedulerStore.set("selectedDate",e),this.schedulerStore.set("selectedTimeslot",null)}selectTime(e){this.schedulerStore.set("selectedTimeslot",e)}selectTimezone(e){this.schedulerStore.set("selectedTimezone",e)}selectLanguage(e){this.schedulerStore.set("selectedLanguage",e),c.instance.changeLanguage(e)}async toggleAdditionalData(e){e||await this.refetchAvailability(),this.schedulerStore.set("showBookingForm",e)}setParticipantName(e){const{bookingInfo:t}=this.schedulerStore.state;this.schedulerStore.set("bookingInfo",{...t,primaryParticipant:{...t==null?void 0:t.primaryParticipant,name:e}})}setParticipantEmail(e){const{bookingInfo:t}=this.schedulerStore.state;this.schedulerStore.set("bookingInfo",{...t,primaryParticipant:{...t==null?void 0:t.primaryParticipant,email:e}})}async refetchAvailability(){const e=new Date,t=new Date(e.getFullYear(),e.getMonth(),1).getTime()/1e3,s=t<e.getTime()/1e3?Math.floor(e.getTime()/1e3):t,i=new Date(e.getFullYear(),e.getMonth()+1,1).getTime()/1e3;return await this.getAvailability(s,i)}async resetStoreStateAndFetchAvailability(){const e=new Date,t=await this.refetchAvailability(),s=this.schedulerStore.get("availability").find(r=>new Date(r.start_time)>new Date);let i=e;return s&&(i=s.start_time),this.schedulerStore.set("selectedDate",i),this.schedulerStore.set("eventInfo",null),this.schedulerStore.set("showBookingForm",!1),this.schedulerStore.set("selectedTimeslot",null),t}async setReschedule(e){this.schedulerStore.set("isLoading",!0);const t=this.schedulerStore.state.eventInfo;return t&&this.schedulerStore.set("reschedulingEventInfo",t),this.schedulerStore.set("rescheduleBookingId",e),await this.resetStoreStateAndFetchAvailability().finally(()=>{this.schedulerStore.set("isLoading",!1)})}async setCancel(e){this.schedulerStore.set("cancelBookingId",e)}async resetCancel(){const e=await this.resetStoreStateAndFetchAvailability();return this.schedulerStore.set("cancelBookingId",""),this.schedulerStore.set("cancelledEventInfo",null),e}async bookTimeslot(e){var m;this.schedulerStore.set("isLoading",!0);const{selectedTimeslot:t,selectedTimezone:s,bookingInfo:i}=this.schedulerStore.state;if(!e&&!i)return{error:this.errors.component(c.instance.t("createBookingErrorTitle")).no_booking_info()};const r=(e==null?void 0:e.timeslot)||t;if(!r)return{error:this.errors.component(c.instance.t("createBookingErrorTitle")).no_timeslot_selected()};const n=e&&(e!=null&&e.timezone)?e==null?void 0:e.timezone:s;if(!n)return{error:this.errors.component(c.instance.t("createBookingErrorTitle")).no_timezone_selected()};const o=this.schedulerStore.get("availabilityOrderEmails");let u="";if(o.length>0){const g=r.emails;for(let d=0;d<o.length;d++)if(g.includes(o[d])){u=o[d];break}}const _=e?e==null?void 0:e.primaryParticipant:i==null?void 0:i.primaryParticipant,h=e?(e==null?void 0:e.guests)||[]:(i==null?void 0:i.guests)||[],y=e?e==null?void 0:e.additionalFields:i==null?void 0:i.additionalFields,I=this.getHeaders(),S=`/v3/scheduling/bookings${!this.sessionId&&this.configId?`?configuration_id=${this.configId}`:""}`,l=await this.makeAPIRequest(decodeURIComponent(S),"POST",JSON.stringify({participants:u?[{email:u}]:void 0,additional_fields:y,additional_guests:h,guest:{..._},start_time:r.start_time.getTime()/1e3,end_time:r.end_time.getTime()/1e3,timezone:n}),I);if("error"in l){this.schedulerStore.set("isLoading",!1);const g=(m=l.error)==null?void 0:m.type;let d=l.error;if(g&&g in this.errors.api("Create Booking")){const T=this.getErrorMessage(d);d=this.errors.api("Create Booking")[g](T)}return{error:d}}return"data"in l&&this.schedulerStore.set("eventInfo",l==null?void 0:l.data),this.schedulerStore.set("isLoading",!1),l}async getUISettings(){var r;this.schedulerStore.set("isLoading",!0);const e=this.getHeaders(),s=`/v3/scheduling/ui-settings${!this.sessionId&&this.configId?`?configuration_id=${this.configId}`:""}`,i=await this.makeAPIRequest(s,"GET",void 0,e);if("error"in i){this.schedulerStore.set("isLoading",!1);const n=(r=i.error)==null?void 0:r.type;let o=i.error;return n&&n in this.errors.api(c.instance.t("getUISettingErrorTitle"))&&(o=this.errors.api(c.instance.t("getUISettingErrorTitle"))[n]((o==null?void 0:o.message)||(o==null?void 0:o.title)||"Something went wrong")),{error:o}}return"data"in i&&this.schedulerStore.set("configSettings",i.data),this.schedulerStore.set("isLoading",!1),i}getStartTimeWithMinBookingNotice(e){var i;const t=(i=this.schedulerStore.get("configSettings"))==null?void 0:i.scheduler,s=t==null?void 0:t.min_booking_notice;return s?e+s*60:e}getEndTimeForAvailableDaysInFuture(e){var n,o;const t=new Date,s=(o=(n=this.schedulerStore.get("configSettings"))==null?void 0:n.scheduler)==null?void 0:o.available_days_in_future,i=Math.floor(c.addDaysToCurrentDate(t,s).getTime()/1e3);return Math.min(i,e)}async getAvailability(e=0,t=0){var y,I,f,S;this.schedulerStore.set("isLoading",!0);const s=new URLSearchParams,i=new Date,r=i.getTime();if(t&&t<r/1e3)return this.schedulerStore.set("isLoading",!1),{error:this.errors.component(c.instance.t("getAvailabilityErrorTitle")).endtime_not_in_future()};if(!e){const l=new Date(i.getFullYear(),i.getMonth(),1);e=Math.floor(l.getTime()/1e3)}if(e=this.getStartTimeWithMinBookingNotice(e),!t){const l=new Date(i.getFullYear(),i.getMonth()+1,0);t=Math.floor(l.getTime()/1e3)}t=this.getEndTimeForAvailableDaysInFuture(t),s.append("start_time",encodeURIComponent(e.toString())),s.append("end_time",encodeURIComponent(t.toString())),this.configId&&!this.sessionId&&s.append("configuration_id",encodeURIComponent(this.configId));const n=this.schedulerStore.get("rescheduleBookingId");n&&s.append("booking_id",encodeURIComponent(n));const o=s.toString(),u=`/v3/scheduling/availability${o?`?${o}`:""}`,_=this.getHeaders(),h=await this.makeAPIRequest(decodeURIComponent(u),"GET",void 0,_);if("error"in h){this.schedulerStore.set("availability",[]),this.schedulerStore.set("isLoading",!1);const l=(y=h.error)==null?void 0:y.type;let m=h.error;if(l&&l in this.errors.api(c.instance.t("getAvailabilityErrorTitle"))){const g=this.getErrorMessage(m);m=this.errors.api(c.instance.t("getAvailabilityErrorTitle"))[l](g)}return{error:m}}if("data"in h){const m=(((f=(I=h.data)==null?void 0:I.time_slots)==null?void 0:f.map(d=>({...d,start_time:new Date(d.start_time*1e3),end_time:new Date(d.end_time*1e3)})))||[]).filter(d=>d.start_time.getTime()>r);this.schedulerStore.set("availability",m);const g=((S=h.data)==null?void 0:S.order)||[];this.schedulerStore.set("availabilityOrderEmails",g)}return this.schedulerStore.set("isLoading",!1),h}async cancelBooking(e,t){var o;if(this.schedulerStore.set("isLoading",!0),!e)return{error:this.errors.component(c.instance.t("cancelBookingErrorTitle")).no_booking_id()};const s=!this.sessionId&&this.configId?`?configuration_id=${this.configId}`:"",i=`/v3/scheduling/bookings/${e}${s}`,r=this.getHeaders(),n=await this.makeAPIRequest(decodeURIComponent(i),"DELETE",JSON.stringify({action:"cancel",cancellation_reason:t}),r);if("error"in n){this.schedulerStore.set("isLoading",!1);const u=(o=n.error)==null?void 0:o.type;let _=n.error;if(u&&u in this.errors.api(c.instance.t("cancelBookingErrorTitle"))){const h=this.getErrorMessage(_);_=this.errors.api(c.instance.t("cancelBookingErrorTitle"))[u](h)}return{error:_}}return this.schedulerStore.set("cancelledEventInfo",{booking_id:e}),this.schedulerStore.set("rescheduleBookingId",""),this.schedulerStore.set("isLoading",!1),n}async rescheduleBooking(e,t){var w;if(this.schedulerStore.set("isLoading",!0),!e)return{error:this.errors.component(c.instance.t("rescheduleBookingErrorTitle")).no_booking_id()};const s=this.errors.api(c.instance.t("rescheduleBookingErrorTitle")),i=this.errors.component(c.instance.t("rescheduleBookingErrorTitle")),{bookingInfo:r,selectedTimeslot:n,selectedTimezone:o}=this.schedulerStore.state,{startTime:u,endTime:_,timezone:h}=t,y=u||(n==null?void 0:n.start_time);if(!y)return{error:i.invalid_start_time('Please pass "startTime" in data or set "selectedTimeslot" in the defaultSchedulerState.')};const I=_||(n==null?void 0:n.end_time);if(!I)return{error:i.invalid_end_time('Please pass "endTime" in data or set "selectedTimeslot" in the defaultSchedulerState.')};const f=this.schedulerStore.get("availabilityOrderEmails");let S="";if(f.length>0){const b=(n==null?void 0:n.emails)||[];for(let v=0;v<f.length;v++)if(b.includes(f[v])){S=f[v];break}}const l=h||o;if(!l)return{error:i.invalid_timezone('Please pass "timezone" in data or set "selectedTimezone" in the defaultSchedulerState.')};const m=t?t==null?void 0:t.primaryParticipant:r==null?void 0:r.primaryParticipant,g=t?(t==null?void 0:t.guests)||[]:(r==null?void 0:r.guests)||[],d=t?t==null?void 0:t.additionalFields:r==null?void 0:r.additionalFields,T=!this.sessionId&&this.configId?`?configuration_id=${this.configId}`:"",A=`/v3/scheduling/bookings/${e}${T}`,L=this.getHeaders(),p=await this.makeAPIRequest(decodeURIComponent(A),"PATCH",JSON.stringify({start_time:y.getTime()/1e3,end_time:I.getTime()/1e3,time_zone:l,additional_fields:d,guest:{...m},additional_guests:g,participants:S?[{email:S}]:void 0}),L);if("error"in p){this.schedulerStore.set("isLoading",!1);const b=(w=p.error)==null?void 0:w.type;let v=p.error;if(b&&b in s){const B=this.getErrorMessage(v);v=s[b](B)}return{error:v}}const k=this.schedulerStore.get("reschedulingEventInfo");if("data"in p)this.schedulerStore.set("eventInfo",p==null?void 0:p.data);else if(k)this.schedulerStore.set("eventInfo",k);else{const b={booking_id:e};this.schedulerStore.set("eventInfo",b)}return this.schedulerStore.set("isLoading",!1),p}}function z(a={}){const e={selectedDate:null,selectedLanguage:navigator.language,selectedTimezone:Intl.DateTimeFormat().resolvedOptions().timeZone,selectedTimeslot:null,showBookingForm:!1,availabilityOrderEmails:[],selectableDates:null,availability:[],eventDuration:0,state:"ready",eventInfo:null,cancelledEventInfo:null,isLoading:!1,nylasBranding:!0,...a};c.debug("[defaultNylasStoreState]: ",e);const t=c.createStore(e);return t.onChange("availability",s=>{c.debug("[availability]: ",s);const i=s.map(o=>o.start_time);c.debug("[selectableDates]: ",i),t.set("selectableDates",i);const r=s[0];if(!r)return;const n=Math.floor((r.end_time.getTime()-r.start_time.getTime())/6e4);c.debug("[durationMinutes]: ",n),t.set("eventDuration",n)}),t.reset=()=>{for(const s in e){const i=e[s];t.set(s,i)}},t}exports.CreateNylasSchedulerStore=z;exports.NylaSchedulerAPIConnector=M;
1
+ "use strict";const c=require("./index-8a536089.cjs");exports.ErrorCategory=void 0;(function(a){a.Component="component",a.Api="api",a.Auth="auth"})(exports.ErrorCategory||(exports.ErrorCategory={}));var D;(function(a){a.endtime_not_in_future="endtime_not_in_future",a.no_booking_info="no_booking_info",a.no_timeslot_selected="no_timeslot_selected",a.no_timezone_selected="no_timezone_selected",a.no_booking_id="no_booking_id",a.invalid_start_time="invalid_start_time",a.invalid_end_time="invalid_end_time",a.invalid_timezone="invalid_timezone"})(D||(D={}));var E;(function(a){a.invalid_session="invalid_session",a.general_error="general_error",a.internal_error="internal_error",a.invalid_request_error="invalid_request_error",a.timeslot_not_available="timeslot_not_available",a.provider_error="provider_error",a.not_found_error="not_found_error"})(E||(E={}));class P{constructor(){this.component=e=>{const t=exports.ErrorCategory.Component,s=`${e} Error`;return{endtime_not_in_future:(i='"endtime" can not be in the future')=>({title:s,message:i,category:t}),no_booking_info:(i="No booking info provided")=>({title:s,message:i,category:t}),no_timeslot_selected:(i="No timeslot selected")=>({title:s,message:i,category:t}),no_timezone_selected:(i="No timezone selected")=>({title:s,message:i,category:t}),no_booking_id:(i="No booking id provided")=>({title:s,message:i,category:t}),invalid_start_time:(i="Invalid start time")=>({title:s,message:i,category:t}),invalid_end_time:(i="Invalid end time")=>({title:s,message:i,category:t}),invalid_timezone:(i="Invalid timezone")=>({title:s,message:i,category:t})}},this.api=e=>{const t=exports.ErrorCategory.Api,s=`${e} Error`;return{invalid_session:i=>({title:s,message:i,category:t}),general_error:i=>({title:s,message:i,category:t}),internal_error:i=>({title:s,message:i,category:t}),invalid_request_error:i=>({title:s,message:i,category:t}),timeslot_not_available:i=>({title:s,message:i,category:t}),provider_error:i=>({title:s,message:i,category:t}),not_found_error:i=>({title:s,message:i,category:t})}}}}class M{constructor({schedulerAPIURL:e,schedulerStore:t,sessionId:s,configId:i}){this.errors=new P,this.schedulerStore=t,this.schedulerAPIURL=e,this.sessionId=s,this.configId=i}getHeaders(){return this.sessionId?{Authorization:`Bearer ${this.sessionId}`}:{}}async makeAPIRequest(e,t,s,i={}){try{const r=new URL(this.schedulerAPIURL);return r.pathname=e,await(await fetch(decodeURIComponent(r.toString()),{method:t,headers:{"Content-Type":"application/json",Origin:window.location.origin,...i},body:s})).json()}catch(r){return{error:{message:r.message,title:"API request failed",type:"api"}}}}getErrorMessage(e){var s,i,r,n;let t=(e==null?void 0:e.message)||(e==null?void 0:e.title)||"Something went wrong";return(e==null?void 0:e.type)==="provider_error"&&(t=((i=(s=e==null?void 0:e.provider_error)==null?void 0:s.error)==null?void 0:i.message)||((n=(r=e==null?void 0:e.provider_error)==null?void 0:r.error)==null?void 0:n.title)||"Something went wrong"),t}setConfigId(e){this.configId=e}selectDate(e){this.schedulerStore.set("selectedDate",e),this.schedulerStore.set("selectedTimeslot",null)}selectTime(e){this.schedulerStore.set("selectedTimeslot",e)}selectTimezone(e){this.schedulerStore.set("selectedTimezone",e)}selectLanguage(e){this.schedulerStore.set("selectedLanguage",e),c.instance.changeLanguage(e)}async toggleAdditionalData(e){e||await this.refetchAvailability(),this.schedulerStore.set("showBookingForm",e)}setParticipantName(e){const{bookingInfo:t}=this.schedulerStore.state;this.schedulerStore.set("bookingInfo",{...t,primaryParticipant:{...t==null?void 0:t.primaryParticipant,name:e}})}setParticipantEmail(e){const{bookingInfo:t}=this.schedulerStore.state;this.schedulerStore.set("bookingInfo",{...t,primaryParticipant:{...t==null?void 0:t.primaryParticipant,email:e}})}async refetchAvailability(){const e=new Date,t=new Date(e.getFullYear(),e.getMonth(),1).getTime()/1e3,s=t<e.getTime()/1e3?Math.floor(e.getTime()/1e3):t,i=new Date(e.getFullYear(),e.getMonth()+1,1).getTime()/1e3;return await this.getAvailability(s,i)}async resetStoreStateAndFetchAvailability(){const e=new Date,t=await this.refetchAvailability(),s=this.schedulerStore.get("availability").find(r=>new Date(r.start_time)>new Date);let i=e;return s&&(i=s.start_time),this.schedulerStore.set("selectedDate",i),this.schedulerStore.set("eventInfo",null),this.schedulerStore.set("showBookingForm",!1),this.schedulerStore.set("selectedTimeslot",null),t}async setReschedule(e){this.schedulerStore.set("isLoading",!0);const t=this.schedulerStore.state.eventInfo;return t&&this.schedulerStore.set("reschedulingEventInfo",t),this.schedulerStore.set("rescheduleBookingId",e),await this.resetStoreStateAndFetchAvailability().finally(()=>{this.schedulerStore.set("isLoading",!1)})}async setCancel(e){this.schedulerStore.set("cancelBookingId",e)}async resetCancel(){const e=await this.resetStoreStateAndFetchAvailability();return this.schedulerStore.set("cancelBookingId",""),this.schedulerStore.set("cancelledEventInfo",null),e}async bookTimeslot(e){var m;this.schedulerStore.set("isLoading",!0);const{selectedTimeslot:t,selectedTimezone:s,bookingInfo:i}=this.schedulerStore.state;if(!e&&!i)return{error:this.errors.component(c.instance.t("createBookingErrorTitle")).no_booking_info()};const r=(e==null?void 0:e.timeslot)||t;if(!r)return{error:this.errors.component(c.instance.t("createBookingErrorTitle")).no_timeslot_selected()};const n=e&&(e!=null&&e.timezone)?e==null?void 0:e.timezone:s;if(!n)return{error:this.errors.component(c.instance.t("createBookingErrorTitle")).no_timezone_selected()};const o=this.schedulerStore.get("availabilityOrderEmails");let u="";if(o.length>0){const g=r.emails;for(let d=0;d<o.length;d++)if(g.includes(o[d])){u=o[d];break}}const _=e?e==null?void 0:e.primaryParticipant:i==null?void 0:i.primaryParticipant,h=e?(e==null?void 0:e.guests)||[]:(i==null?void 0:i.guests)||[],y=e?e==null?void 0:e.additionalFields:i==null?void 0:i.additionalFields,I=this.getHeaders(),S=`/v3/scheduling/bookings${!this.sessionId&&this.configId?`?configuration_id=${this.configId}`:""}`,l=await this.makeAPIRequest(decodeURIComponent(S),"POST",JSON.stringify({participants:u?[{email:u}]:void 0,additional_fields:y,additional_guests:h,guest:{..._},start_time:r.start_time.getTime()/1e3,end_time:r.end_time.getTime()/1e3,timezone:n}),I);if("error"in l){this.schedulerStore.set("isLoading",!1);const g=(m=l.error)==null?void 0:m.type;let d=l.error;if(g&&g in this.errors.api("Create Booking")){const T=this.getErrorMessage(d);d=this.errors.api("Create Booking")[g](T)}return{error:d}}return"data"in l&&this.schedulerStore.set("eventInfo",l==null?void 0:l.data),this.schedulerStore.set("isLoading",!1),l}async getUISettings(){var r;this.schedulerStore.set("isLoading",!0);const e=this.getHeaders(),s=`/v3/scheduling/ui-settings${!this.sessionId&&this.configId?`?configuration_id=${this.configId}`:""}`,i=await this.makeAPIRequest(s,"GET",void 0,e);if("error"in i){this.schedulerStore.set("isLoading",!1);const n=(r=i.error)==null?void 0:r.type;let o=i.error;return n&&n in this.errors.api(c.instance.t("getUISettingErrorTitle"))&&(o=this.errors.api(c.instance.t("getUISettingErrorTitle"))[n]((o==null?void 0:o.message)||(o==null?void 0:o.title)||"Something went wrong")),{error:o}}return"data"in i&&this.schedulerStore.set("configSettings",i.data),this.schedulerStore.set("isLoading",!1),i}getStartTimeWithMinBookingNotice(e){var i;const t=(i=this.schedulerStore.get("configSettings"))==null?void 0:i.scheduler,s=t==null?void 0:t.min_booking_notice;return s?e+s*60:e}getEndTimeForAvailableDaysInFuture(e){var n,o;const t=new Date,s=(o=(n=this.schedulerStore.get("configSettings"))==null?void 0:n.scheduler)==null?void 0:o.available_days_in_future,i=Math.floor(c.addDaysToCurrentDate(t,s).getTime()/1e3);return Math.min(i,e)}async getAvailability(e=0,t=0){var y,I,f,S;this.schedulerStore.set("isLoading",!0);const s=new URLSearchParams,i=new Date,r=i.getTime();if(t&&t<r/1e3)return this.schedulerStore.set("isLoading",!1),{error:this.errors.component(c.instance.t("getAvailabilityErrorTitle")).endtime_not_in_future()};if(!e){const l=new Date(i.getFullYear(),i.getMonth(),1);e=Math.floor(l.getTime()/1e3)}if(e=this.getStartTimeWithMinBookingNotice(e),!t){const l=new Date(i.getFullYear(),i.getMonth()+1,0);t=Math.floor(l.getTime()/1e3)}t=this.getEndTimeForAvailableDaysInFuture(t),s.append("start_time",encodeURIComponent(e.toString())),s.append("end_time",encodeURIComponent(t.toString())),this.configId&&!this.sessionId&&s.append("configuration_id",encodeURIComponent(this.configId));const n=this.schedulerStore.get("rescheduleBookingId");n&&s.append("booking_id",encodeURIComponent(n));const o=s.toString(),u=`/v3/scheduling/availability${o?`?${o}`:""}`,_=this.getHeaders(),h=await this.makeAPIRequest(decodeURIComponent(u),"GET",void 0,_);if("error"in h){this.schedulerStore.set("availability",[]),this.schedulerStore.set("isLoading",!1);const l=(y=h.error)==null?void 0:y.type;let m=h.error;if(l&&l in this.errors.api(c.instance.t("getAvailabilityErrorTitle"))){const g=this.getErrorMessage(m);m=this.errors.api(c.instance.t("getAvailabilityErrorTitle"))[l](g)}return{error:m}}if("data"in h){const m=(((f=(I=h.data)==null?void 0:I.time_slots)==null?void 0:f.map(d=>({...d,start_time:new Date(d.start_time*1e3),end_time:new Date(d.end_time*1e3)})))||[]).filter(d=>d.start_time.getTime()>r);this.schedulerStore.set("availability",m);const g=((S=h.data)==null?void 0:S.order)||[];this.schedulerStore.set("availabilityOrderEmails",g)}return this.schedulerStore.set("isLoading",!1),h}async cancelBooking(e,t){var o;if(this.schedulerStore.set("isLoading",!0),!e)return{error:this.errors.component(c.instance.t("cancelBookingErrorTitle")).no_booking_id()};const s=!this.sessionId&&this.configId?`?configuration_id=${this.configId}`:"",i=`/v3/scheduling/bookings/${e}${s}`,r=this.getHeaders(),n=await this.makeAPIRequest(decodeURIComponent(i),"DELETE",JSON.stringify({action:"cancel",cancellation_reason:t}),r);if("error"in n){this.schedulerStore.set("isLoading",!1);const u=(o=n.error)==null?void 0:o.type;let _=n.error;if(u&&u in this.errors.api(c.instance.t("cancelBookingErrorTitle"))){const h=this.getErrorMessage(_);_=this.errors.api(c.instance.t("cancelBookingErrorTitle"))[u](h)}return{error:_}}return this.schedulerStore.set("cancelledEventInfo",{booking_id:e}),this.schedulerStore.set("rescheduleBookingId",""),this.schedulerStore.set("isLoading",!1),n}async rescheduleBooking(e,t){var w;if(this.schedulerStore.set("isLoading",!0),!e)return{error:this.errors.component(c.instance.t("rescheduleBookingErrorTitle")).no_booking_id()};const s=this.errors.api(c.instance.t("rescheduleBookingErrorTitle")),i=this.errors.component(c.instance.t("rescheduleBookingErrorTitle")),{bookingInfo:r,selectedTimeslot:n,selectedTimezone:o}=this.schedulerStore.state,{startTime:u,endTime:_,timezone:h}=t,y=u||(n==null?void 0:n.start_time);if(!y)return{error:i.invalid_start_time('Please pass "startTime" in data or set "selectedTimeslot" in the defaultSchedulerState.')};const I=_||(n==null?void 0:n.end_time);if(!I)return{error:i.invalid_end_time('Please pass "endTime" in data or set "selectedTimeslot" in the defaultSchedulerState.')};const f=this.schedulerStore.get("availabilityOrderEmails");let S="";if(f.length>0){const b=(n==null?void 0:n.emails)||[];for(let v=0;v<f.length;v++)if(b.includes(f[v])){S=f[v];break}}const l=h||o;if(!l)return{error:i.invalid_timezone('Please pass "timezone" in data or set "selectedTimezone" in the defaultSchedulerState.')};const m=t?t==null?void 0:t.primaryParticipant:r==null?void 0:r.primaryParticipant,g=t?(t==null?void 0:t.guests)||[]:(r==null?void 0:r.guests)||[],d=t?t==null?void 0:t.additionalFields:r==null?void 0:r.additionalFields,T=!this.sessionId&&this.configId?`?configuration_id=${this.configId}`:"",A=`/v3/scheduling/bookings/${e}${T}`,L=this.getHeaders(),p=await this.makeAPIRequest(decodeURIComponent(A),"PATCH",JSON.stringify({start_time:y.getTime()/1e3,end_time:I.getTime()/1e3,time_zone:l,additional_fields:d,guest:{...m},additional_guests:g,participants:S?[{email:S}]:void 0}),L);if("error"in p){this.schedulerStore.set("isLoading",!1);const b=(w=p.error)==null?void 0:w.type;let v=p.error;if(b&&b in s){const B=this.getErrorMessage(v);v=s[b](B)}return{error:v}}const k=this.schedulerStore.get("reschedulingEventInfo");if("data"in p)this.schedulerStore.set("eventInfo",p==null?void 0:p.data);else if(k)this.schedulerStore.set("eventInfo",k);else{const b={booking_id:e};this.schedulerStore.set("eventInfo",b)}return this.schedulerStore.set("isLoading",!1),p}}function z(a={}){const e={selectedDate:null,selectedLanguage:navigator.language,selectedTimezone:Intl.DateTimeFormat().resolvedOptions().timeZone,selectedTimeslot:null,showBookingForm:!1,availabilityOrderEmails:[],selectableDates:null,availability:[],eventDuration:0,state:"ready",eventInfo:null,cancelledEventInfo:null,isLoading:!1,nylasBranding:!0,...a};c.debug("[defaultNylasStoreState]: ",e);const t=c.createStore(e);return t.onChange("availability",s=>{c.debug("[availability]: ",s);const i=s.map(o=>o.start_time);c.debug("[selectableDates]: ",i),t.set("selectableDates",i);const r=s[0];if(!r)return;const n=Math.floor((r.end_time.getTime()-r.start_time.getTime())/6e4);c.debug("[durationMinutes]: ",n),t.set("eventDuration",n)}),t.reset=()=>{for(const s in e){const i=e[s];t.set(s,i)}},t}exports.CreateNylasSchedulerStore=z;exports.NylaSchedulerAPIConnector=M;