@nylas/react 1.1.0-canary.5 → 1.1.0-canary.8

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 (108) hide show
  1. package/dist/add-circle-icon_22.entry-080abc71.cjs +1 -0
  2. package/dist/{add-circle-icon_22.entry-9f634efd.js → add-circle-icon_22.entry-bda9be31.js} +619 -532
  3. package/dist/{archive-icon_7.entry-6649ed76.cjs → archive-icon_7.entry-ca20da59.cjs} +1 -1
  4. package/dist/{archive-icon_7.entry-24bac466.js → archive-icon_7.entry-e2954750.js} +21 -21
  5. package/dist/arrow-icon.entry-03a85113.js +15 -0
  6. package/dist/{arrow-icon.entry-1fffd526.cjs → arrow-icon.entry-548b027e.cjs} +1 -1
  7. package/dist/{bold-icon_3.entry-72e585da.js → bold-icon_3.entry-70ffa7f0.js} +4 -4
  8. package/dist/{bold-icon_3.entry-5a01fecf.cjs → bold-icon_3.entry-9a7b1869.cjs} +1 -1
  9. package/dist/{calendar-cancel-icon.entry-0b52bdc9.cjs → calendar-cancel-icon.entry-45388fdc.cjs} +1 -1
  10. package/dist/{calendar-cancel-icon.entry-247b530c.js → calendar-cancel-icon.entry-6bbc119f.js} +5 -5
  11. package/dist/{calendar-check-icon_2.entry-d7bb76c7.cjs → calendar-check-icon_2.entry-6628456c.cjs} +1 -1
  12. package/dist/{calendar-check-icon_2.entry-dbb2df49.js → calendar-check-icon_2.entry-f633f7a6.js} +10 -10
  13. package/dist/{calendar-icon.entry-911773c4.cjs → calendar-icon.entry-379b1fa1.cjs} +1 -1
  14. package/dist/{calendar-icon.entry-d64cb3d3.js → calendar-icon.entry-62b82c27.js} +5 -5
  15. package/dist/{chevron-icon_3.entry-db9f8217.js → chevron-icon_3.entry-74425e1f.js} +11 -11
  16. package/dist/{chevron-icon_3.entry-b72f4cdb.cjs → chevron-icon_3.entry-7ff803ad.cjs} +1 -1
  17. package/dist/close-icon.entry-18e140ed.cjs +1 -0
  18. package/dist/close-icon.entry-6a8ea4a7.js +15 -0
  19. package/dist/{constants-6ee60d6d-d5928e79.js → constants-f34b9c6e-95a17764.js} +10 -1
  20. package/dist/{constants-6ee60d6d-09ee73d9.cjs → constants-f34b9c6e-e7137e51.cjs} +2 -2
  21. package/dist/{document-refresh-icon.entry-ee9632d7.js → document-refresh-icon.entry-32c75418.js} +2 -2
  22. package/dist/{document-refresh-icon.entry-5e8cc2f0.cjs → document-refresh-icon.entry-f15f795a.cjs} +1 -1
  23. package/dist/{elements-dc5b338e-29ef67ec.cjs → elements-dc5b338e-1f23530f.cjs} +1 -1
  24. package/dist/{elements-dc5b338e-e87f79b6.js → elements-dc5b338e-62fe1cf3.js} +1 -1
  25. package/dist/{focus-visible-e8093c16-e7357f74.js → focus-visible-e8093c16-1f664070.js} +1 -1
  26. package/dist/{focus-visible-e8093c16-61d506d2.cjs → focus-visible-e8093c16-f0f05815.cjs} +1 -1
  27. package/dist/{forward-icon_6.entry-f054ad9d.js → forward-icon_6.entry-7fab04d7.js} +9 -9
  28. package/dist/{forward-icon_6.entry-cac8473a.cjs → forward-icon_6.entry-ef5e2e0f.cjs} +2 -2
  29. package/dist/{globe-icon.entry-bc484551.cjs → globe-icon.entry-398a9826.cjs} +1 -1
  30. package/dist/{globe-icon.entry-2fde6ac4.js → globe-icon.entry-b8e1efae.js} +4 -4
  31. package/dist/google-logo-icon_4.entry-38d5c2f2.cjs +1 -0
  32. package/dist/google-logo-icon_4.entry-5eca9538.js +381 -0
  33. package/dist/{index-22f7e49c.cjs → index-93c50de4.cjs} +11 -11
  34. package/dist/{index-f9ba9aa8.js → index-f93f6948.js} +890 -855
  35. package/dist/{index.es-f57e612a-1d17c676.js → index.es-df564f87-b773d34f.js} +1 -1
  36. package/dist/{index.es-f57e612a-95ca3e17.cjs → index.es-df564f87-e4a4092a.cjs} +1 -1
  37. package/dist/{info-icon_2.entry-e67844eb.cjs → info-icon_2.entry-2eb70f49.cjs} +1 -1
  38. package/dist/{info-icon_2.entry-dbf3931a.js → info-icon_2.entry-6bbfa6dc.js} +5 -5
  39. package/dist/loading-icon.entry-b563b2e6.js +15 -0
  40. package/dist/loading-icon.entry-fb04b893.cjs +1 -0
  41. package/dist/{mailbox-store-47fc8a1a-cd3516a7.cjs → mailbox-store-69c5c5f6-631eddb5.cjs} +1 -1
  42. package/dist/{mailbox-store-47fc8a1a-2365f20f.js → mailbox-store-69c5c5f6-8ab4670b.js} +2 -2
  43. package/dist/{nylas-additional-participants.entry-7c568149.cjs → nylas-additional-participants.entry-33a45477.cjs} +1 -1
  44. package/dist/{nylas-additional-participants.entry-e8426256.js → nylas-additional-participants.entry-4b214308.js} +9 -9
  45. package/dist/{nylas-booked-event-card_10.entry-6a664889.cjs → nylas-booked-event-card_10.entry-3e225025.cjs} +1 -1
  46. package/dist/{nylas-booked-event-card_10.entry-ef767733.js → nylas-booked-event-card_10.entry-e93bc290.js} +7 -7
  47. package/dist/{nylas-form-card.entry-d8506b1f.js → nylas-form-card.entry-0748fdd5.js} +16 -16
  48. package/dist/{nylas-form-card.entry-e44169b6.cjs → nylas-form-card.entry-eb3607bc.cjs} +1 -1
  49. package/dist/{nylas-if-state.entry-044c49d2.cjs → nylas-if-state.entry-276d61ad.cjs} +1 -1
  50. package/dist/{nylas-if-state.entry-98a336df.js → nylas-if-state.entry-f8abd025.js} +2 -2
  51. package/dist/{nylas-list-folders.entry-55ce3403.js → nylas-list-folders.entry-78cc680e.js} +3 -3
  52. package/dist/{nylas-list-folders.entry-509f9be4.cjs → nylas-list-folders.entry-afe02f0e.cjs} +1 -1
  53. package/dist/{nylas-list-threads.entry-1f57382a.js → nylas-list-threads.entry-217088de.js} +4 -4
  54. package/dist/{nylas-list-threads.entry-c36e2cf3.cjs → nylas-list-threads.entry-6395c12f.cjs} +1 -1
  55. package/dist/{nylas-login.entry-76358c2f.js → nylas-login.entry-e4d57589.js} +7 -7
  56. package/dist/{nylas-login.entry-66f542b8.cjs → nylas-login.entry-ec81e21b.cjs} +1 -1
  57. package/dist/{nylas-mailbox-pagination.entry-5562257a.js → nylas-mailbox-pagination.entry-069673aa.js} +2 -2
  58. package/dist/{nylas-mailbox-pagination.entry-89b0dd99.cjs → nylas-mailbox-pagination.entry-d4d929f1.cjs} +1 -1
  59. package/dist/{nylas-mailbox-toolbar-button.entry-6b1b5b15.js → nylas-mailbox-toolbar-button.entry-03c5f5c8.js} +8 -8
  60. package/dist/{nylas-mailbox-toolbar-button.entry-573e0429.cjs → nylas-mailbox-toolbar-button.entry-2b9e4431.cjs} +1 -1
  61. package/dist/{nylas-mailbox.entry-e21a2f50.cjs → nylas-mailbox.entry-1342178d.cjs} +1 -1
  62. package/dist/{nylas-mailbox.entry-97c503f2.js → nylas-mailbox.entry-7e6b4791.js} +4 -4
  63. package/dist/{nylas-provider.entry-61899957.cjs → nylas-provider.entry-0ae8e70a.cjs} +1 -1
  64. package/dist/{nylas-provider.entry-07e1e26a.js → nylas-provider.entry-498a7be9.js} +16 -16
  65. package/dist/{nylas-scheduler-editor.entry-e326c9de.js → nylas-scheduler-editor.entry-4de2bb97.js} +66 -66
  66. package/dist/{nylas-scheduler-editor.entry-60fe38ce.cjs → nylas-scheduler-editor.entry-72c91b7d.cjs} +3 -3
  67. package/dist/{nylas-scheduling.entry-d88289db.cjs → nylas-scheduling.entry-1a004916.cjs} +1 -1
  68. package/dist/{nylas-scheduling.entry-be0cc090.js → nylas-scheduling.entry-4e18ab43.js} +3 -3
  69. package/dist/{nylas-threads-refresh.entry-c71ee775.cjs → nylas-threads-refresh.entry-d020c89e.cjs} +1 -1
  70. package/dist/{nylas-threads-refresh.entry-8201f8dd.js → nylas-threads-refresh.entry-fc2d8028.js} +11 -11
  71. package/dist/{nylas-threads-search.entry-912a90a4.cjs → nylas-threads-search.entry-0abcbc10.cjs} +1 -1
  72. package/dist/{nylas-threads-search.entry-fc477e01.js → nylas-threads-search.entry-f92f7e30.js} +12 -12
  73. package/dist/{nylas-view-thread.entry-d2953ea8.js → nylas-view-thread.entry-2f1474cf.js} +6 -6
  74. package/dist/{nylas-view-thread.entry-af418ddb.cjs → nylas-view-thread.entry-56080c89.cjs} +1 -1
  75. package/dist/{people-icon.entry-73cfa6f5.cjs → people-icon.entry-431e5044.cjs} +1 -1
  76. package/dist/{people-icon.entry-4b598fde.js → people-icon.entry-b4778e15.js} +7 -7
  77. package/dist/{play-icon_2.entry-d1c2f823.js → play-icon_2.entry-24ffa01f.js} +8 -8
  78. package/dist/play-icon_2.entry-f97db395.cjs +1 -0
  79. package/dist/react.cjs +1 -1
  80. package/dist/react.js +11 -11
  81. package/dist/{refresh-icon.entry-6aedfce6.js → refresh-icon.entry-8395104b.js} +4 -4
  82. package/dist/{refresh-icon.entry-42d543d0.cjs → refresh-icon.entry-cf4416b8.cjs} +1 -1
  83. package/dist/{register-component-cf5c8420-dc1bc0a4.js → register-component-b9cfcbaf-c0147194.js} +1 -1
  84. package/dist/{register-component-cf5c8420-d3fb6bf9.cjs → register-component-b9cfcbaf-d40e1f3c.cjs} +1 -1
  85. package/dist/scheduler-config-store-07d98279-0610e42f.cjs +1 -0
  86. package/dist/scheduler-config-store-07d98279-3b70606c.js +24 -0
  87. package/dist/scheduler-store-24fd0e91-2dba20c2.cjs +1 -0
  88. package/dist/{scheduler-store-39d37291-4e8e9ff9.js → scheduler-store-24fd0e91-47098841.js} +89 -80
  89. package/dist/{time-period-selector.entry-f1e27a00.js → time-period-selector.entry-1e849c2e.js} +2 -2
  90. package/dist/{time-period-selector.entry-fb3d0178.cjs → time-period-selector.entry-d8f3462f.cjs} +1 -1
  91. package/dist/{translate-icon.entry-0d44b6cb.cjs → translate-icon.entry-66533238.cjs} +1 -1
  92. package/dist/{translate-icon.entry-3db947f5.js → translate-icon.entry-d847f706.js} +5 -5
  93. package/dist/{warning-icon.entry-a20657e4.cjs → warning-icon.entry-1f0f00ed.cjs} +1 -1
  94. package/dist/warning-icon.entry-b5db0151.js +15 -0
  95. package/package.json +3 -3
  96. package/dist/add-circle-icon_22.entry-e7ec6c34.cjs +0 -1
  97. package/dist/arrow-icon.entry-82e59ce4.js +0 -15
  98. package/dist/close-icon.entry-9d141bb4.js +0 -15
  99. package/dist/close-icon.entry-da590fa2.cjs +0 -1
  100. package/dist/google-logo-icon_4.entry-a9848399.cjs +0 -1
  101. package/dist/google-logo-icon_4.entry-dca87e45.js +0 -349
  102. package/dist/loading-icon.entry-4566cba8.cjs +0 -1
  103. package/dist/loading-icon.entry-ae4c2d7e.js +0 -15
  104. package/dist/play-icon_2.entry-1a487abb.cjs +0 -1
  105. package/dist/scheduler-config-store-6222c0ed-000f1a4f.js +0 -18
  106. package/dist/scheduler-config-store-6222c0ed-758621fb.cjs +0 -1
  107. package/dist/scheduler-store-39d37291-b66c052c.cjs +0 -1
  108. package/dist/warning-icon.entry-a8ea0fe0.js +0 -15
@@ -1,9 +1,9 @@
1
1
  var P = Object.defineProperty;
2
2
  var O = (n, t, r) => t in n ? P(n, t, { enumerable: !0, configurable: !0, writable: !0, value: r }) : n[t] = r;
3
3
  var m = (n, t, r) => (O(n, typeof t != "symbol" ? t + "" : t, r), r);
4
- import { i as commonjsGlobal, r as registerInstance, c as createEvent, d as debug, N as NylasIdentityRequestWrapper, h, H as Host, g as getElement, j as dataResponse } from "./index-f9ba9aa8.js";
5
- import { N as NylasBaseProvider, X as Xr, g as global$1 } from "./index.es-f57e612a-1d17c676.js";
6
- import { C as CreateNylasSchedulerConfigStore } from "./scheduler-config-store-6222c0ed-000f1a4f.js";
4
+ import { i as commonjsGlobal, r as registerInstance, c as createEvent, d as debug, N as NylasIdentityRequestWrapper, h, H as Host, g as getElement, j as dataResponse } from "./index-f93f6948.js";
5
+ import { N as NylasBaseProvider, X as Xr, g as global$1 } from "./index.es-df564f87-b773d34f.js";
6
+ import { C as CreateNylasSchedulerConfigStore } from "./scheduler-config-store-07d98279-3b70606c.js";
7
7
  import "react";
8
8
  import "react-dom";
9
9
  class NylasSchedulerConfigAPIConnector {
@@ -38,7 +38,7 @@ class NylasSchedulerConfigAPIConnector {
38
38
  if (!r) {
39
39
  const u = this.nylasSchedulerConfigStore.state.configurations.find((l) => l.id === t);
40
40
  if (u)
41
- return this.nylasSchedulerConfigStore.state.config = u, dataResponse(u);
41
+ return this.nylasSchedulerConfigStore.state.selectedConfiguration = u, dataResponse(u);
42
42
  }
43
43
  const [s, a] = await this.nylasApiRequest.request({
44
44
  method: "GET",
@@ -48,7 +48,7 @@ class NylasSchedulerConfigAPIConnector {
48
48
  message: "Error fetching configuration: " + a.message
49
49
  }) : Xr(s) ? dataResponse(null, {
50
50
  message: "Error fetching configuration: " + ((c = s.error) == null ? void 0 : c.message)
51
- }) : (this.nylasSchedulerConfigStore.state.config = s.data, this.nylasSchedulerConfigStore.state.configurations.find((u) => u.id === t) ? this.nylasSchedulerConfigStore.state.configurations = this.nylasSchedulerConfigStore.state.configurations.map((u) => u.id === t ? s.data : u) : this.nylasSchedulerConfigStore.state.configurations = [...this.nylasSchedulerConfigStore.state.configurations, s.data], dataResponse(s.data));
51
+ }) : (this.nylasSchedulerConfigStore.state.selectedConfiguration = s.data, this.nylasSchedulerConfigStore.state.configurations.find((u) => u.id === t) ? this.nylasSchedulerConfigStore.state.configurations = this.nylasSchedulerConfigStore.state.configurations.map((u) => u.id === t ? s.data : u) : this.nylasSchedulerConfigStore.state.configurations = [...this.nylasSchedulerConfigStore.state.configurations, s.data], dataResponse(s.data));
52
52
  }
53
53
  async getConfigurations() {
54
54
  var s;
@@ -82,7 +82,7 @@ class NylasSchedulerConfigAPIConnector {
82
82
  message: "Error creating configuration: " + s.message
83
83
  }) : Xr(r) ? dataResponse(null, {
84
84
  message: "Error creating configuration: " + ((a = r.error) == null ? void 0 : a.message)
85
- }) : (this.nylasSchedulerConfigStore.state.config = r.data, this.nylasSchedulerConfigStore.state.configurations = [...this.nylasSchedulerConfigStore.state.configurations, r.data], dataResponse(r.data));
85
+ }) : (this.nylasSchedulerConfigStore.state.selectedConfiguration = r.data, this.nylasSchedulerConfigStore.state.configurations = [...this.nylasSchedulerConfigStore.state.configurations, r.data], dataResponse(r.data));
86
86
  }
87
87
  async updateConfiguration(t) {
88
88
  var a;
@@ -99,7 +99,7 @@ class NylasSchedulerConfigAPIConnector {
99
99
  message: "Error updating configuration: " + s.message
100
100
  }) : Xr(r) ? dataResponse(null, {
101
101
  message: "Error updating configuration: " + ((a = r.error) == null ? void 0 : a.message)
102
- }) : (this.nylasSchedulerConfigStore.state.config = r.data, this.nylasSchedulerConfigStore.state.configurations.find((c) => c.id === t.id) ? this.nylasSchedulerConfigStore.state.configurations = this.nylasSchedulerConfigStore.state.configurations.map((c) => c.id === t.id ? r.data : c) : this.nylasSchedulerConfigStore.state.configurations = [...this.nylasSchedulerConfigStore.state.configurations, r.data], dataResponse(r.data));
102
+ }) : (this.nylasSchedulerConfigStore.state.selectedConfiguration = r.data, this.nylasSchedulerConfigStore.state.configurations.find((c) => c.id === t.id) ? this.nylasSchedulerConfigStore.state.configurations = this.nylasSchedulerConfigStore.state.configurations.map((c) => c.id === t.id ? r.data : c) : this.nylasSchedulerConfigStore.state.configurations = [...this.nylasSchedulerConfigStore.state.configurations, r.data], dataResponse(r.data));
103
103
  }
104
104
  async deleteConfiguration(t) {
105
105
  var a, c;
@@ -115,7 +115,7 @@ class NylasSchedulerConfigAPIConnector {
115
115
  message: "Error deleting configuration: " + s.message
116
116
  }) : Xr(r) ? dataResponse(null, {
117
117
  message: "Error deleting configuration: " + ((a = r.error) == null ? void 0 : a.message)
118
- }) : (this.nylasSchedulerConfigStore.state.configurations = this.nylasSchedulerConfigStore.state.configurations.filter((u) => u.id !== t), ((c = this.nylasSchedulerConfigStore.state.config) == null ? void 0 : c.id) === t && (this.nylasSchedulerConfigStore.state.config = {}), dataResponse(r.data));
118
+ }) : (this.nylasSchedulerConfigStore.state.configurations = this.nylasSchedulerConfigStore.state.configurations.filter((u) => u.id !== t), ((c = this.nylasSchedulerConfigStore.state.selectedConfiguration) == null ? void 0 : c.id) === t && this.nylasSchedulerConfigStore.resetSelectedConfiguration(), dataResponse(r.data));
119
119
  }
120
120
  }
121
121
  class NylasSchedulerConfigConnector {
@@ -174,27 +174,27 @@ function fromByteArray(n) {
174
174
  return s === 1 ? (t = n[r - 1], a += lookup[t >> 2], a += lookup[t << 4 & 63], a += "==") : s === 2 && (t = (n[r - 2] << 8) + n[r - 1], a += lookup[t >> 10], a += lookup[t >> 4 & 63], a += lookup[t << 2 & 63], a += "="), c.push(a), c.join("");
175
175
  }
176
176
  function read(n, t, r, s, a) {
177
- var c, u, l = a * 8 - s - 1, f = (1 << l) - 1, d = f >> 1, g = -7, p = r ? a - 1 : 0, y = r ? -1 : 1, w = n[t + p];
178
- for (p += y, c = w & (1 << -g) - 1, w >>= -g, g += l; g > 0; c = c * 256 + n[t + p], p += y, g -= 8)
177
+ var c, u, l = a * 8 - s - 1, f = (1 << l) - 1, d = f >> 1, g = -7, p = r ? a - 1 : 0, w = r ? -1 : 1, y = n[t + p];
178
+ for (p += w, c = y & (1 << -g) - 1, y >>= -g, g += l; g > 0; c = c * 256 + n[t + p], p += w, g -= 8)
179
179
  ;
180
- for (u = c & (1 << -g) - 1, c >>= -g, g += s; g > 0; u = u * 256 + n[t + p], p += y, g -= 8)
180
+ for (u = c & (1 << -g) - 1, c >>= -g, g += s; g > 0; u = u * 256 + n[t + p], p += w, g -= 8)
181
181
  ;
182
182
  if (c === 0)
183
183
  c = 1 - d;
184
184
  else {
185
185
  if (c === f)
186
- return u ? NaN : (w ? -1 : 1) * (1 / 0);
186
+ return u ? NaN : (y ? -1 : 1) * (1 / 0);
187
187
  u = u + Math.pow(2, s), c = c - d;
188
188
  }
189
- return (w ? -1 : 1) * u * Math.pow(2, c - s);
189
+ return (y ? -1 : 1) * u * Math.pow(2, c - s);
190
190
  }
191
191
  function write(n, t, r, s, a, c) {
192
- var u, l, f, d = c * 8 - a - 1, g = (1 << d) - 1, p = g >> 1, y = a === 23 ? Math.pow(2, -24) - Math.pow(2, -77) : 0, w = s ? 0 : c - 1, x = s ? 1 : -1, S = t < 0 || t === 0 && 1 / t < 0 ? 1 : 0;
193
- for (t = Math.abs(t), isNaN(t) || t === 1 / 0 ? (l = isNaN(t) ? 1 : 0, u = g) : (u = Math.floor(Math.log(t) / Math.LN2), t * (f = Math.pow(2, -u)) < 1 && (u--, f *= 2), u + p >= 1 ? t += y / f : t += y * Math.pow(2, 1 - p), t * f >= 2 && (u++, f /= 2), u + p >= g ? (l = 0, u = g) : u + p >= 1 ? (l = (t * f - 1) * Math.pow(2, a), u = u + p) : (l = t * Math.pow(2, p - 1) * Math.pow(2, a), u = 0)); a >= 8; n[r + w] = l & 255, w += x, l /= 256, a -= 8)
192
+ var u, l, f, d = c * 8 - a - 1, g = (1 << d) - 1, p = g >> 1, w = a === 23 ? Math.pow(2, -24) - Math.pow(2, -77) : 0, y = s ? 0 : c - 1, x = s ? 1 : -1, S = t < 0 || t === 0 && 1 / t < 0 ? 1 : 0;
193
+ for (t = Math.abs(t), isNaN(t) || t === 1 / 0 ? (l = isNaN(t) ? 1 : 0, u = g) : (u = Math.floor(Math.log(t) / Math.LN2), t * (f = Math.pow(2, -u)) < 1 && (u--, f *= 2), u + p >= 1 ? t += w / f : t += w * Math.pow(2, 1 - p), t * f >= 2 && (u++, f /= 2), u + p >= g ? (l = 0, u = g) : u + p >= 1 ? (l = (t * f - 1) * Math.pow(2, a), u = u + p) : (l = t * Math.pow(2, p - 1) * Math.pow(2, a), u = 0)); a >= 8; n[r + y] = l & 255, y += x, l /= 256, a -= 8)
194
194
  ;
195
- for (u = u << a | l, d += a; d > 0; n[r + w] = u & 255, w += x, u /= 256, d -= 8)
195
+ for (u = u << a | l, d += a; d > 0; n[r + y] = u & 255, y += x, u /= 256, d -= 8)
196
196
  ;
197
- n[r + w - x] |= S * 128;
197
+ n[r + y - x] |= S * 128;
198
198
  }
199
199
  var toString = {}.toString, isArray = Array.isArray || function(n) {
200
200
  return toString.call(n) == "[object Array]";
@@ -507,8 +507,8 @@ function arrayIndexOf(n, t, r, s, a) {
507
507
  return -1;
508
508
  c = 2, u /= 2, l /= 2, r /= 2;
509
509
  }
510
- function f(w, x) {
511
- return c === 1 ? w[x] : w.readUInt16BE(x * c);
510
+ function f(y, x) {
511
+ return c === 1 ? y[x] : y.readUInt16BE(x * c);
512
512
  }
513
513
  var d;
514
514
  if (a) {
@@ -521,8 +521,8 @@ function arrayIndexOf(n, t, r, s, a) {
521
521
  g !== -1 && (d -= d - g), g = -1;
522
522
  } else
523
523
  for (r + l > u && (r = u - l), d = r; d >= 0; d--) {
524
- for (var p = !0, y = 0; y < l; y++)
525
- if (f(n, d + y) !== f(t, y)) {
524
+ for (var p = !0, w = 0; w < l; w++)
525
+ if (f(n, d + w) !== f(t, w)) {
526
526
  p = !1;
527
527
  break;
528
528
  }
@@ -1360,11 +1360,11 @@ var process = commonjsGlobal.process, sha256 = { exports: {} };
1360
1360
  n[16] = this.block, n[t >> 2] |= EXTRA[t & 3], this.block = n[16], t >= 56 && (this.hashed || this.hash(), n[0] = this.block, n[16] = n[1] = n[2] = n[3] = n[4] = n[5] = n[6] = n[7] = n[8] = n[9] = n[10] = n[11] = n[12] = n[13] = n[14] = n[15] = 0), n[14] = this.hBytes << 3 | this.bytes >>> 29, n[15] = this.bytes << 3, this.hash();
1361
1361
  }
1362
1362
  }, Sha256.prototype.hash = function() {
1363
- var n = this.h0, t = this.h1, r = this.h2, s = this.h3, a = this.h4, c = this.h5, u = this.h6, l = this.h7, f = this.blocks, d, g, p, y, w, x, S, R, v, b, _;
1363
+ var n = this.h0, t = this.h1, r = this.h2, s = this.h3, a = this.h4, c = this.h5, u = this.h6, l = this.h7, f = this.blocks, d, g, p, w, y, x, S, A, v, b, _;
1364
1364
  for (d = 16; d < 64; ++d)
1365
- w = f[d - 15], g = (w >>> 7 | w << 25) ^ (w >>> 18 | w << 14) ^ w >>> 3, w = f[d - 2], p = (w >>> 17 | w << 15) ^ (w >>> 19 | w << 13) ^ w >>> 10, f[d] = f[d - 16] + g + f[d - 7] + p << 0;
1365
+ y = f[d - 15], g = (y >>> 7 | y << 25) ^ (y >>> 18 | y << 14) ^ y >>> 3, y = f[d - 2], p = (y >>> 17 | y << 15) ^ (y >>> 19 | y << 13) ^ y >>> 10, f[d] = f[d - 16] + g + f[d - 7] + p << 0;
1366
1366
  for (_ = t & r, d = 0; d < 64; d += 4)
1367
- this.first ? (this.is224 ? (R = 300032, w = f[0] - 1413257819, l = w - 150054599 << 0, s = w + 24177077 << 0) : (R = 704751109, w = f[0] - 210244248, l = w - 1521486534 << 0, s = w + 143694565 << 0), this.first = !1) : (g = (n >>> 2 | n << 30) ^ (n >>> 13 | n << 19) ^ (n >>> 22 | n << 10), p = (a >>> 6 | a << 26) ^ (a >>> 11 | a << 21) ^ (a >>> 25 | a << 7), R = n & t, y = R ^ n & r ^ _, S = a & c ^ ~a & u, w = l + p + S + K[d] + f[d], x = g + y, l = s + w << 0, s = w + x << 0), g = (s >>> 2 | s << 30) ^ (s >>> 13 | s << 19) ^ (s >>> 22 | s << 10), p = (l >>> 6 | l << 26) ^ (l >>> 11 | l << 21) ^ (l >>> 25 | l << 7), v = s & n, y = v ^ s & t ^ R, S = l & a ^ ~l & c, w = u + p + S + K[d + 1] + f[d + 1], x = g + y, u = r + w << 0, r = w + x << 0, g = (r >>> 2 | r << 30) ^ (r >>> 13 | r << 19) ^ (r >>> 22 | r << 10), p = (u >>> 6 | u << 26) ^ (u >>> 11 | u << 21) ^ (u >>> 25 | u << 7), b = r & s, y = b ^ r & n ^ v, S = u & l ^ ~u & a, w = c + p + S + K[d + 2] + f[d + 2], x = g + y, c = t + w << 0, t = w + x << 0, g = (t >>> 2 | t << 30) ^ (t >>> 13 | t << 19) ^ (t >>> 22 | t << 10), p = (c >>> 6 | c << 26) ^ (c >>> 11 | c << 21) ^ (c >>> 25 | c << 7), _ = t & r, y = _ ^ t & s ^ b, S = c & u ^ ~c & l, w = a + p + S + K[d + 3] + f[d + 3], x = g + y, a = n + w << 0, n = w + x << 0;
1367
+ this.first ? (this.is224 ? (A = 300032, y = f[0] - 1413257819, l = y - 150054599 << 0, s = y + 24177077 << 0) : (A = 704751109, y = f[0] - 210244248, l = y - 1521486534 << 0, s = y + 143694565 << 0), this.first = !1) : (g = (n >>> 2 | n << 30) ^ (n >>> 13 | n << 19) ^ (n >>> 22 | n << 10), p = (a >>> 6 | a << 26) ^ (a >>> 11 | a << 21) ^ (a >>> 25 | a << 7), A = n & t, w = A ^ n & r ^ _, S = a & c ^ ~a & u, y = l + p + S + K[d] + f[d], x = g + w, l = s + y << 0, s = y + x << 0), g = (s >>> 2 | s << 30) ^ (s >>> 13 | s << 19) ^ (s >>> 22 | s << 10), p = (l >>> 6 | l << 26) ^ (l >>> 11 | l << 21) ^ (l >>> 25 | l << 7), v = s & n, w = v ^ s & t ^ A, S = l & a ^ ~l & c, y = u + p + S + K[d + 1] + f[d + 1], x = g + w, u = r + y << 0, r = y + x << 0, g = (r >>> 2 | r << 30) ^ (r >>> 13 | r << 19) ^ (r >>> 22 | r << 10), p = (u >>> 6 | u << 26) ^ (u >>> 11 | u << 21) ^ (u >>> 25 | u << 7), b = r & s, w = b ^ r & n ^ v, S = u & l ^ ~u & a, y = c + p + S + K[d + 2] + f[d + 2], x = g + w, c = t + y << 0, t = y + x << 0, g = (t >>> 2 | t << 30) ^ (t >>> 13 | t << 19) ^ (t >>> 22 | t << 10), p = (c >>> 6 | c << 26) ^ (c >>> 11 | c << 21) ^ (c >>> 25 | c << 7), _ = t & r, w = _ ^ t & s ^ b, S = c & u ^ ~c & l, y = a + p + S + K[d + 3] + f[d + 3], x = g + w, a = n + y << 0, n = y + x << 0;
1368
1368
  this.h0 = this.h0 + n << 0, this.h1 = this.h1 + t << 0, this.h2 = this.h2 + r << 0, this.h3 = this.h3 + s << 0, this.h4 = this.h4 + a << 0, this.h5 = this.h5 + c << 0, this.h6 = this.h6 + u << 0, this.h7 = this.h7 + l << 0;
1369
1369
  }, Sha256.prototype.hex = function() {
1370
1370
  this.finalize();
@@ -1557,15 +1557,15 @@ var __rest = function(n, t) {
1557
1557
  const EventStreamContentType = "text/event-stream", DefaultRetryInterval = 1e3, LastEventId = "last-event-id";
1558
1558
  function fetchEventSource(n, t) {
1559
1559
  var { signal: r, headers: s, onopen: a, onmessage: c, onclose: u, onerror: l, openWhenHidden: f, fetch: d } = t, g = __rest(t, ["signal", "headers", "onopen", "onmessage", "onclose", "onerror", "openWhenHidden", "fetch"]);
1560
- return new Promise((p, y) => {
1561
- const w = Object.assign({}, s);
1562
- w.accept || (w.accept = EventStreamContentType);
1560
+ return new Promise((p, w) => {
1561
+ const y = Object.assign({}, s);
1562
+ y.accept || (y.accept = EventStreamContentType);
1563
1563
  let x;
1564
1564
  function S() {
1565
1565
  x.abort(), document.hidden || T();
1566
1566
  }
1567
1567
  f || document.addEventListener("visibilitychange", S);
1568
- let R = DefaultRetryInterval, v = 0;
1568
+ let A = DefaultRetryInterval, v = 0;
1569
1569
  function b() {
1570
1570
  document.removeEventListener("visibilitychange", S), window.clearTimeout(v), x.abort();
1571
1571
  }
@@ -1577,19 +1577,19 @@ function fetchEventSource(n, t) {
1577
1577
  var k;
1578
1578
  x = new AbortController();
1579
1579
  try {
1580
- const I = await _(n, Object.assign(Object.assign({}, g), { headers: w, signal: x.signal }));
1581
- await U(I), await getBytes(I.body, getLines(getMessages((A) => {
1582
- A ? w[LastEventId] = A : delete w[LastEventId];
1583
- }, (A) => {
1584
- R = A;
1580
+ const I = await _(n, Object.assign(Object.assign({}, g), { headers: y, signal: x.signal }));
1581
+ await U(I), await getBytes(I.body, getLines(getMessages((R) => {
1582
+ R ? y[LastEventId] = R : delete y[LastEventId];
1583
+ }, (R) => {
1584
+ A = R;
1585
1585
  }, c))), u == null || u(), b(), p();
1586
1586
  } catch (I) {
1587
1587
  if (!x.signal.aborted)
1588
1588
  try {
1589
- const A = (k = l == null ? void 0 : l(I)) !== null && k !== void 0 ? k : R;
1590
- window.clearTimeout(v), v = window.setTimeout(T, A);
1591
- } catch (A) {
1592
- b(), y(A);
1589
+ const R = (k = l == null ? void 0 : l(I)) !== null && k !== void 0 ? k : A;
1590
+ window.clearTimeout(v), v = window.setTimeout(T, R);
1591
+ } catch (R) {
1592
+ b(), w(R);
1593
1593
  }
1594
1594
  }
1595
1595
  }
@@ -1902,17 +1902,17 @@ class NylasSessions {
1902
1902
  })).json();
1903
1903
  if (p) {
1904
1904
  if (p.error) {
1905
- const w = { detail: p };
1906
- return window.dispatchEvent(new CustomEvent("onLoginFail", w)), !0;
1905
+ const y = { detail: p };
1906
+ return window.dispatchEvent(new CustomEvent("onLoginFail", y)), !0;
1907
1907
  }
1908
- const y = await this.handleCodeExchangeResponse(p);
1909
- if (y.valid) {
1910
- a && (y.data.state = a);
1911
- const w = { detail: y.data };
1912
- window.dispatchEvent(new CustomEvent("onLoginSuccess", w)), window.history.pushState({}, document.title, window.location.pathname);
1908
+ const w = await this.handleCodeExchangeResponse(p);
1909
+ if (w.valid) {
1910
+ a && (w.data.state = a);
1911
+ const y = { detail: w.data };
1912
+ window.dispatchEvent(new CustomEvent("onLoginSuccess", y)), window.history.pushState({}, document.title, window.location.pathname);
1913
1913
  } else {
1914
- const w = { detail: y.data };
1915
- return window.dispatchEvent(new CustomEvent("onLoginFail", w)), !0;
1914
+ const y = { detail: w.data };
1915
+ return window.dispatchEvent(new CustomEvent("onLoginFail", y)), !0;
1916
1916
  }
1917
1917
  }
1918
1918
  return this.Storage.removePKCE(), !0;
@@ -1991,8 +1991,8 @@ class NylasSessions {
1991
1991
  return;
1992
1992
  const p = f.location.search;
1993
1993
  if (f.history.pushState({}, document.title, window.location.pathname), g[0] === this.redirectUri && g.length > 1) {
1994
- const y = await this.codeExchange(p);
1995
- f.close(), y && location.reload(), d && clearInterval(d);
1994
+ const w = await this.codeExchange(p);
1995
+ f.close(), w && location.reload(), d && clearInterval(d);
1996
1996
  return;
1997
1997
  }
1998
1998
  } catch {
@@ -2048,16 +2048,16 @@ class NylasSessions {
2048
2048
  const p = await this.getProfile(r.grant_id);
2049
2049
  if (p) {
2050
2050
  p.status = "unauthorized", await this.Storage.setUserToken(p);
2051
- const y = {
2051
+ const w = {
2052
2052
  detail: { user: p }
2053
2053
  };
2054
- window.dispatchEvent(new CustomEvent("onSessionExpired", y));
2054
+ window.dispatchEvent(new CustomEvent("onSessionExpired", w));
2055
2055
  }
2056
2056
  } else {
2057
- const y = {
2057
+ const w = {
2058
2058
  detail: { user: await this.Storage.getUserToken() }
2059
2059
  };
2060
- window.dispatchEvent(new CustomEvent("onSessionExpired", y)), this.logout();
2060
+ window.dispatchEvent(new CustomEvent("onSessionExpired", w)), this.logout();
2061
2061
  }
2062
2062
  return;
2063
2063
  }
@@ -2069,8 +2069,8 @@ class NylasSessions {
2069
2069
  async fetchRequest(t, r, s, a = !0, c, u) {
2070
2070
  const l = await this.isLoggedIn(), f = new URL(t, c ?? this.domain), d = new Headers();
2071
2071
  if (d.append("Accept", "application/json"), d.append("Content-Type", "application/json"), d.append("User-Agent", "nylas-identity"), l) {
2072
- const y = await this.getAccessToken();
2073
- d.append("Authorization", `Bearer ${y}`);
2072
+ const w = await this.getAccessToken();
2073
+ d.append("Authorization", `Bearer ${w}`);
2074
2074
  }
2075
2075
  const g = await fetch(f.toString(), {
2076
2076
  method: r || "GET",
@@ -2181,11 +2181,11 @@ const LoginRequired = ({ authenticationUrl: n }) => h(
2181
2181
  ),
2182
2182
  h("small", { class: "disclaimer-text" }, "* You will be redirected to authenticate your account.")
2183
2183
  )
2184
- ), nylasSchedulerEditorCss = ':host{display:flex;flex-direction:column;overflow:visible;border-radius:var(--nylas-border-radius-2x);width:fit-content;background:var(--nylas-base-0);position:relative;box-shadow:0px 4px 6px -2px rgba(0, 0, 0, 0.05), 0px 10px 15px -3px rgba(0, 0, 0, 0.1);--nylas-primary:#2563eb;--nylas-error:#cc4841;--nylas-error-pressed:#992222;--nylas-wraning:#f06c00;--nylas-success:#16a392;--nylas-info:#2b8fc2;--nylas-base-0:#ffffff;--nylas-base-25:#fcfcfd;--nylas-base-50:#f8f9fc;--nylas-base-100:#eaecf5;--nylas-base-200:#d5d9eb;--nylas-base-300:#b3b8d8;--nylas-base-400:#717bbc;--nylas-base-500:#4e5ba6;--nylas-base-600:#3e4784;--nylas-base-700:#263f72;--nylas-base-800:#293056;--nylas-base-900:#101323;--nylas-base-950:#0e101b;--nylas-border-radius:0.25rem;--nylas-border-radius-2x:0.5rem;--nylas-border-radius-3x:0.75rem;--nylas-font-family:"Inter", sans-serif}@media screen and (max-width: 768px){:host{width:auto;min-width:325px}}div.scheduler-editor-header{display:flex;align-items:center;justify-content:space-between;padding:1rem;border-bottom:1px solid var(--nylas-base-200);color:var(--nylas-base-900)}div.scheduler-editor-header h1.scheduler-editor-title{display:flex;align-items:center;gap:0.5rem;width:858px;margin:0;font-size:18px;line-height:24px;font-weight:600}@media screen and (max-width: 768px){div.scheduler-editor-header h1.scheduler-editor-title{width:auto;min-width:calc(325px - 1rem)}}div.scheduler-editor-header button{background:transparent;border:none;cursor:pointer}div.scheduler-editor-header button:hover,div.scheduler-editor-header button:active{color:var(--nylas-primary)}div.scheduler-editor-header button:disabled{cursor:not-allowed}nylas-editor-tabs{width:auto}.card{display:flex;flex-direction:column;padding:2rem;background-color:var(--nylas-base-0);border:1px solid var(--nylas-base-200);border-radius:5px;max-width:fit-content;align-self:center}.login-required{display:flex;flex-direction:column;padding:2rem 1rem;background-color:var(--nylas-base-25)}.login-required p{margin:0 0 1rem}.login-required .microsoft-button,.login-required .google-button{height:48px;border:1px solid var(--nylas-base-300);border-radius:var(--nylas-border-radius-2x);font-size:1rem;line-height:24px;padding:0 1rem;background-color:var(--nylas-base-0);font-weight:600;cursor:pointer;display:flex;margin-bottom:1rem;background-color:var(--nylas-base-0);border:1px solid var(--nylas-base-200);border-radius:5px;justify-content:center;gap:0.5rem;align-items:center}.login-required .microsoft-button:hover,.login-required .google-button:hover{background-color:var(--nylas-base-25)}.login-required .microsoft-button:hover,.login-required .google-button:hover{background-color:var(--nylas-base-25)}.login-required .other-provider-button{height:48px;border:1px solid var(--nylas-base-300);border-radius:var(--nylas-border-radius-2x);font-size:1rem;line-height:24px;padding:0 1rem;background-color:var(--nylas-base-0);font-weight:600;cursor:pointer;display:flex;border:0;background-color:var(--nylas-base-0);height:48px;margin-bottom:1rem;font-size:0.95rem;justify-content:center;gap:0.25rem;align-items:center}.login-required .other-provider-button:hover{background-color:var(--nylas-base-25)}.login-required .other-provider-button svg{transform:rotate(180deg)}.login-required .other-provider-button:hover{background-color:var(--nylas-base-25)}.login-required .disclaimer-text{font-size:0.75rem;color:var(--nylas-base-600);align-self:center}.list-configurations{padding:2rem}', NylasSchedulerEditorStyle0 = nylasSchedulerEditorCss, NylasSchedulerEditor = class {
2184
+ ), nylasSchedulerEditorCss = ':host{display:flex;flex-direction:column;overflow:visible;border-radius:var(--nylas-border-radius-2x);width:fit-content;background:var(--nylas-base-0);position:relative;box-shadow:0px 4px 6px -2px rgba(0, 0, 0, 0.05), 0px 10px 15px -3px rgba(0, 0, 0, 0.1);--nylas-primary:#2563eb;--nylas-error:#cc4841;--nylas-error-pressed:#992222;--nylas-wraning:#f06c00;--nylas-success:#16a392;--nylas-info:#2b8fc2;--nylas-base-0:#ffffff;--nylas-base-25:#fcfcfd;--nylas-base-50:#f8f9fc;--nylas-base-100:#eaecf5;--nylas-base-200:#d5d9eb;--nylas-base-300:#b3b8d8;--nylas-base-400:#717bbc;--nylas-base-500:#4e5ba6;--nylas-base-600:#3e4784;--nylas-base-700:#263f72;--nylas-base-800:#293056;--nylas-base-900:#101323;--nylas-base-950:#0e101b;--nylas-border-radius:0.25rem;--nylas-border-radius-2x:0.5rem;--nylas-border-radius-3x:0.75rem;--nylas-font-family:"Inter", sans-serif}@media screen and (max-width: 768px){:host{width:auto;min-width:325px}}div.scheduler-editor-header{display:flex;align-items:center;justify-content:space-between;padding:1rem;border-bottom:1px solid var(--nylas-base-200);color:var(--nylas-base-900)}div.scheduler-editor-header h1.scheduler-editor-title{display:flex;align-items:center;gap:0.5rem;width:858px;margin:0;font-size:18px;line-height:24px;font-weight:600}@media screen and (max-width: 768px){div.scheduler-editor-header h1.scheduler-editor-title{width:auto;min-width:calc(325px - 1rem)}}div.scheduler-editor-header button{background:transparent;border:none;cursor:pointer}div.scheduler-editor-header button:hover,div.scheduler-editor-header button:active{color:var(--nylas-primary)}div.scheduler-editor-header button:disabled{cursor:not-allowed}nylas-editor-tabs{width:auto}nylas-editor-tabs nylas-event-info div[slot=inputs],nylas-editor-tabs nylas-event-limits div[slot=inputs]{display:flex;flex-direction:column;gap:1rem}.card{display:flex;flex-direction:column;padding:2rem;background-color:var(--nylas-base-0);border:1px solid var(--nylas-base-200);border-radius:5px;max-width:fit-content;align-self:center}.login-required{display:flex;flex-direction:column;padding:2rem 1rem;background-color:var(--nylas-base-25)}.login-required p{margin:0 0 1rem}.login-required .microsoft-button,.login-required .google-button{height:48px;border:1px solid var(--nylas-base-300);border-radius:var(--nylas-border-radius-2x);font-size:1rem;line-height:24px;padding:0 1rem;background-color:var(--nylas-base-0);font-weight:600;cursor:pointer;display:flex;margin-bottom:1rem;background-color:var(--nylas-base-0);border:1px solid var(--nylas-base-200);border-radius:5px;justify-content:center;gap:0.5rem;align-items:center}.login-required .microsoft-button:hover,.login-required .google-button:hover{background-color:var(--nylas-base-25)}.login-required .microsoft-button:hover,.login-required .google-button:hover{background-color:var(--nylas-base-25)}.login-required .other-provider-button{height:48px;border:1px solid var(--nylas-base-300);border-radius:var(--nylas-border-radius-2x);font-size:1rem;line-height:24px;padding:0 1rem;background-color:var(--nylas-base-0);font-weight:600;cursor:pointer;display:flex;border:0;background-color:var(--nylas-base-0);height:48px;margin-bottom:1rem;font-size:0.95rem;justify-content:center;gap:0.25rem;align-items:center}.login-required .other-provider-button:hover{background-color:var(--nylas-base-25)}.login-required .other-provider-button svg{transform:rotate(180deg)}.login-required .other-provider-button:hover{background-color:var(--nylas-base-25)}.login-required .disclaimer-text{font-size:0.75rem;color:var(--nylas-base-600);align-self:center}.list-configurations{padding:2rem}', NylasSchedulerEditorStyle0 = nylasSchedulerEditorCss, NylasSchedulerEditor = class {
2185
2185
  constructor(n) {
2186
2186
  registerInstance(this, n), this.init = createEvent(this, "init", 7), this.loggedIn = createEvent(this, "loggedIn", 7), this.loggedOut = createEvent(this, "loggedOut", 7), this.schedulerConfigCloseClicked = createEvent(this, "schedulerConfigCloseClicked", 7), this.handleSchedulerConfigCloseClicked = (t) => {
2187
2187
  this.schedulerConfigCloseClicked.emit(this.host);
2188
- }, this.authenticationUrl = async (t) => this.nylasApiRequest ? await this.nylasApiRequest.authenticationUrl({ provider: t }) || "" : (console.error("[nylas-scheduler-editor] Nylas API Request is not initialized."), ""), this.defaultRequiresSessionAuth = !0, this.configurationId = void 0, this.nylasApiRequest = void 0, this.nylasSessionsConfig = void 0, this.eventOverrides = {}, this.schedulerPreviewLink = "", this.defaultSchedulerConfigStoreState = void 0, this.mode = "app", this.automaticComponentRegistration = !0;
2188
+ }, this.authenticationUrl = async (t) => this.nylasApiRequest ? await this.nylasApiRequest.authenticationUrl({ provider: t }) || "" : (console.error("[nylas-scheduler-editor] Nylas API Request is not initialized."), ""), this.defaultRequiresSessionAuth = !0, this.configurationId = void 0, this.nylasApiRequest = void 0, this.nylasSessionsConfig = void 0, this.defaultAuthArgs = void 0, this.eventOverrides = {}, this.schedulerPreviewLink = "", this.defaultSchedulerConfigStoreState = void 0, this.mode = "app", this.automaticComponentRegistration = !0;
2189
2189
  }
2190
2190
  connectedCallback() {
2191
2191
  debug("[nylas-scheduler-editor] connectedCallback");
@@ -2199,15 +2199,15 @@ const LoginRequired = ({ authenticationUrl: n }) => h(
2199
2199
  }, (s = (r = this.stores) == null ? void 0 : r.schedulerConfig) == null || s.set("defaultRequiresSessionAuth", this.defaultRequiresSessionAuth), !this.nylasApiRequest && this.nylasSessionsConfig) {
2200
2200
  const p = new NylasSessions(this.nylasSessionsConfig);
2201
2201
  await p.isLoggedIn(), p.onLoginSuccess(async () => {
2202
- var w, x;
2203
- const y = await ((x = (w = this.nylasSchedulerConfigConnector) == null ? void 0 : w.schedulerConfig) == null ? void 0 : x.currentUser());
2204
- y && (this.loggedIn.emit(this.host), this.loggedInHandler(y));
2202
+ var y, x;
2203
+ const w = await ((x = (y = this.nylasSchedulerConfigConnector) == null ? void 0 : y.schedulerConfig) == null ? void 0 : x.currentUser());
2204
+ w && (this.loggedIn.emit(this.host), this.loggedInHandler(w));
2205
2205
  }), p.onLoginFail(async () => {
2206
- var y, w;
2207
- (w = (y = this.stores) == null ? void 0 : y.schedulerConfig) == null || w.set("currentUser", null), this.loggedOut.emit(this.host);
2206
+ var w, y;
2207
+ (y = (w = this.stores) == null ? void 0 : w.schedulerConfig) == null || y.set("currentUser", null), this.loggedOut.emit(this.host);
2208
2208
  }), this.nylasApiRequest = new NylasIdentityRequestWrapper(p);
2209
2209
  }
2210
- this.baseProvider = new NylasBaseProvider(this.host, this.stores, this.automaticComponentRegistration, this.eventOverrides);
2210
+ this.nylasApiRequest && this.defaultAuthArgs && this.nylasApiRequest.setDefaultAuthArgs(this.defaultAuthArgs), this.baseProvider = new NylasBaseProvider(this.host, this.stores, this.automaticComponentRegistration, this.eventOverrides);
2211
2211
  const n = this.baseProvider.getStore("schedulerConfig");
2212
2212
  if (this.nylasSchedulerConfigConnector = new NylasSchedulerConfigConnector({
2213
2213
  nylasApiRequest: this.nylasApiRequest,
@@ -2216,7 +2216,7 @@ const LoginRequired = ({ authenticationUrl: n }) => h(
2216
2216
  const p = await ((c = (a = this.nylasSchedulerConfigConnector) == null ? void 0 : a.schedulerConfig) == null ? void 0 : c.currentUser());
2217
2217
  p ? (this.loggedIn.emit(this.host), await this.loggedInHandler(p)) : ((l = (u = this.stores) == null ? void 0 : u.schedulerConfig) == null || l.set("currentUser", null), this.loggedOut.emit(this.host));
2218
2218
  }
2219
- (d = (f = this.stores) == null ? void 0 : f.schedulerConfig) == null || d.onChange("config", async (p) => {
2219
+ (d = (f = this.stores) == null ? void 0 : f.schedulerConfig) == null || d.onChange("selectedConfiguration", async (p) => {
2220
2220
  p && p.id && (this.configurationId = p.id);
2221
2221
  }), (g = this.baseProvider) == null || g.componentWillLoad(this.nylasSchedulerConfigConnector);
2222
2222
  }
@@ -2234,7 +2234,7 @@ const LoginRequired = ({ authenticationUrl: n }) => h(
2234
2234
  }
2235
2235
  async configurationIdChanged(n) {
2236
2236
  var t, r, s, a, c, u, l, f;
2237
- n ? (await ((r = (t = this.nylasSchedulerConfigConnector) == null ? void 0 : t.schedulerConfig) == null ? void 0 : r.getConfigurationById(n)), (a = (s = this.stores) == null ? void 0 : s.schedulerConfig) == null || a.set("action", "edit")) : ((u = (c = this.stores) == null ? void 0 : c.schedulerConfig) == null || u.set("config", {}), (f = (l = this.stores) == null ? void 0 : l.schedulerConfig) == null || f.set("action", null));
2237
+ n ? (await ((r = (t = this.nylasSchedulerConfigConnector) == null ? void 0 : t.schedulerConfig) == null ? void 0 : r.getConfigurationById(n)), (a = (s = this.stores) == null ? void 0 : s.schedulerConfig) == null || a.set("action", "edit")) : ((u = (c = this.stores) == null ? void 0 : c.schedulerConfig) == null || u.set("selectedConfiguration", {}), (f = (l = this.stores) == null ? void 0 : l.schedulerConfig) == null || f.set("action", null));
2238
2238
  }
2239
2239
  async store() {
2240
2240
  var n;
@@ -2256,8 +2256,8 @@ const LoginRequired = ({ authenticationUrl: n }) => h(
2256
2256
  (r = (t = this.stores) == null ? void 0 : t.schedulerConfig) == null || r.set("currentUser", n), this.nylasSchedulerConfigConnector && (this.configurationId && await ((s = this.nylasSchedulerConfigConnector.schedulerConfig) == null ? void 0 : s.getConfigurationById(this.configurationId)), await ((a = this.nylasSchedulerConfigConnector.schedulerConfig) == null ? void 0 : a.getCalendars()));
2257
2257
  }
2258
2258
  render() {
2259
- var t, r, s, a, c, u;
2260
- return this.mode === "app" ? h(Host, null, h("div", { class: "scheduler-editor-header", part: "nse__header" }, h("h1", { class: "scheduler-editor-title", part: "nse__title" }, h("calendar-icon", { width: "18", height: "18" }), "Scheduler editor"), h("button", { class: "scheduler-editor-close", onClick: (l) => this.handleSchedulerConfigCloseClicked(l), part: "nse__close-button" }, h("close-icon", { width: "18", height: "18" }))), ((r = (t = this.stores) == null ? void 0 : t.schedulerConfig) == null ? void 0 : r.state.currentUser) && this.stores.schedulerConfig.state.action === null && h("div", { class: "list-configurations" }, h("nylas-list-configurations", null)), ((a = (s = this.stores) == null ? void 0 : s.schedulerConfig) == null ? void 0 : a.state.currentUser) && (this.stores.schedulerConfig.state.action === "create" || this.stores.schedulerConfig.state.action === "edit") && h("nylas-editor-tabs", null), !((u = (c = this.stores) == null ? void 0 : c.schedulerConfig) != null && u.state.currentUser) && h("slot", { name: "login-required" }, h(LoginRequired, { authenticationUrl: this.authenticationUrl }))) : h(Host, null, h("slot", null));
2259
+ var n, t, r, s, a, c, u, l;
2260
+ return h(Host, { key: "14880638bcb9c031f748d72fe0052b6eb0df463d" }, h("div", { key: "f0ee0e9a97eddbd350dfc41469257475e6178e3d", class: "scheduler-editor-header", part: "nse__header" }, h("h1", { key: "eb85113f9650853bb6f3f348e6517ba83112f28f", class: "scheduler-editor-title", part: "nse__title" }, h("calendar-icon", { key: "48e6edb5828fbdb111a3360a5c49ef762008c69a", width: "18", height: "18" }), "Scheduler editor"), h("button", { key: "f3d02137c2a999e6305b20b6735efc77370a6a83", class: "scheduler-editor-close", onClick: (f) => this.handleSchedulerConfigCloseClicked(f), part: "nse__close-button" }, h("close-icon", { key: "05280d7af113731d30b659d9de308b23aa3ea014", width: "18", height: "18" }))), ((t = (n = this.stores) == null ? void 0 : n.schedulerConfig) == null ? void 0 : t.state.currentUser) && this.stores.schedulerConfig.state.action === null && h("div", { class: "list-configurations" }, h("nylas-list-configurations", null)), ((s = (r = this.stores) == null ? void 0 : r.schedulerConfig) == null ? void 0 : s.state.currentUser) && this.stores.schedulerConfig.state.action === "create" && h("nylas-editor-tabs", { mode: "composable" }, h("nylas-event-info", null, h("div", { slot: "inputs" }, h("nylas-event-title", null), h("nylas-event-duration", null), h("nylas-location-component", null))), h("nylas-booking-calendar-picker", null)), ((c = (a = this.stores) == null ? void 0 : a.schedulerConfig) == null ? void 0 : c.state.currentUser) && this.stores.schedulerConfig.state.action === "edit" && h("nylas-editor-tabs", { mode: this.mode }, this.mode === "composable" && h("slot", null)), !((l = (u = this.stores) == null ? void 0 : u.schedulerConfig) != null && l.state.currentUser) && h("slot", { name: "login-required" }, h(LoginRequired, { authenticationUrl: this.authenticationUrl })));
2261
2261
  }
2262
2262
  get host() {
2263
2263
  return getElement(this);