@nylas/react 1.1.0-canary.18 → 1.1.0-canary.20

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 (133) hide show
  1. package/dist/{add-circle-icon_2.entry-3b13ee64.js → add-circle-icon_2.entry-5cefae99.js} +5 -5
  2. package/dist/{add-circle-icon_2.entry-3091976b.cjs → add-circle-icon_2.entry-85523420.cjs} +1 -1
  3. package/dist/{archive-icon_7.entry-8932618a.js → archive-icon_7.entry-2f418a3e.js} +13 -13
  4. package/dist/{archive-icon_7.entry-c2b6d860.cjs → archive-icon_7.entry-eb90a353.cjs} +1 -1
  5. package/dist/arrow-icon.entry-753eb942.js +15 -0
  6. package/dist/{arrow-icon.entry-a159bee8.cjs → arrow-icon.entry-ac5e1a47.cjs} +1 -1
  7. package/dist/{bold-icon_3.entry-447d0537.js → bold-icon_3.entry-18507c82.js} +4 -4
  8. package/dist/{bold-icon_3.entry-c51e1af3.cjs → bold-icon_3.entry-4fff7400.cjs} +1 -1
  9. package/dist/button-component_4.entry-3c508e3b.js +115 -0
  10. package/dist/button-component_4.entry-f8ab53dc.cjs +1 -0
  11. package/dist/calendar-agenda-fill-icon_35.entry-b56841a0.cjs +7 -0
  12. package/dist/calendar-agenda-fill-icon_35.entry-db989ce0.js +4182 -0
  13. package/dist/{calendar-cancel-icon.entry-a78f27bc.js → calendar-cancel-icon.entry-31caeae1.js} +1 -1
  14. package/dist/{calendar-cancel-icon.entry-805febcc.cjs → calendar-cancel-icon.entry-d2e10dfc.cjs} +1 -1
  15. package/dist/{calendar-check-icon_2.entry-7c8b6c92.js → calendar-check-icon_2.entry-7f67c003.js} +1 -1
  16. package/dist/{calendar-check-icon_2.entry-4a0fd7bd.cjs → calendar-check-icon_2.entry-d32551e9.cjs} +1 -1
  17. package/dist/{calendar-icon.entry-96f9727f.js → calendar-icon.entry-6e89816b.js} +1 -1
  18. package/dist/{calendar-icon.entry-1fc018b4.cjs → calendar-icon.entry-f3f1c623.cjs} +1 -1
  19. package/dist/{chevron-icon_3.entry-25d90239.js → chevron-icon_3.entry-2e20a83e.js} +37 -34
  20. package/dist/chevron-icon_3.entry-3be68846.cjs +1 -0
  21. package/dist/{clock-icon_2.entry-2406c3d0.cjs → clock-icon_2.entry-074eb053.cjs} +1 -1
  22. package/dist/{clock-icon_2.entry-c1b22ed4.js → clock-icon_2.entry-bc938936.js} +5 -5
  23. package/dist/{constants-f34b9c6e-f1c4dd0d.js → constants-7ce66b44-3952e81c.js} +484 -383
  24. package/dist/{constants-f34b9c6e-b774916c.cjs → constants-7ce66b44-a6b777d4.cjs} +5 -5
  25. package/dist/copy-icon_4.entry-187edab9.js +45 -0
  26. package/dist/copy-icon_4.entry-f704b2f1.cjs +1 -0
  27. package/dist/{document-refresh-icon.entry-570f9c9d.js → document-refresh-icon.entry-9d7900d7.js} +5 -5
  28. package/dist/document-refresh-icon.entry-ea0e1ab9.cjs +1 -0
  29. package/dist/elements/index.d.ts +14 -0
  30. package/dist/{elements-dc5b338e-cafa7a55.js → elements-dc5b338e-e6271e48.js} +1 -1
  31. package/dist/{elements-dc5b338e-550a6cb1.cjs → elements-dc5b338e-edf63aa6.cjs} +1 -1
  32. package/dist/{focus-visible-e8093c16-022799ce.js → focus-visible-e8093c16-4c45967c.js} +1 -1
  33. package/dist/{focus-visible-e8093c16-c14162e8.cjs → focus-visible-e8093c16-84e41b3b.cjs} +1 -1
  34. package/dist/{forward-icon_6.entry-55752b23.cjs → forward-icon_6.entry-4cb6eb63.cjs} +3 -3
  35. package/dist/{forward-icon_6.entry-9b832146.js → forward-icon_6.entry-949d0cfb.js} +9 -9
  36. package/dist/{globe-icon.entry-2b61820e.js → globe-icon.entry-04b35395.js} +2 -2
  37. package/dist/{globe-icon.entry-dabe7b8b.cjs → globe-icon.entry-741f8ad4.cjs} +1 -1
  38. package/dist/google-logo-icon_4.entry-8e87cf66.cjs +1 -0
  39. package/dist/google-logo-icon_4.entry-f50de25f.js +598 -0
  40. package/dist/index-53420959-507f0a27.js +5 -0
  41. package/dist/index-53420959-e6c2e510.cjs +1 -0
  42. package/dist/{index-6d9eeb53-3049fc04.cjs → index-6d9eeb53-8b16e3b5.cjs} +1 -1
  43. package/dist/{index-6d9eeb53-3edef246.js → index-6d9eeb53-b15263de.js} +2 -2
  44. package/dist/index-a4831dfe.cjs +42 -0
  45. package/dist/{index-812162da.js → index-a68236be.js} +874 -854
  46. package/dist/{index.es-9cc0eb3c-0c99c055.cjs → index.es-9cc0eb3c-2e0f7d11.cjs} +1 -1
  47. package/dist/{index.es-9cc0eb3c-52226859.js → index.es-9cc0eb3c-e6c5dd2d.js} +1 -1
  48. package/dist/{info-icon_2.entry-5f6b9af8.cjs → info-icon_2.entry-c3468951.cjs} +1 -1
  49. package/dist/{info-icon_2.entry-2fe6c16c.js → info-icon_2.entry-d0270899.js} +8 -8
  50. package/dist/{input-dropdown_2.entry-dbdb5aa3.cjs → input-dropdown_2.entry-2485dcc3.cjs} +1 -1
  51. package/dist/{input-dropdown_2.entry-dbd0d6f4.js → input-dropdown_2.entry-2cd6cfc7.js} +3 -3
  52. package/dist/{loading-icon.entry-e179f122.cjs → loading-icon.entry-5ed52afe.cjs} +1 -1
  53. package/dist/loading-icon.entry-96d9d1be.js +15 -0
  54. package/dist/{mailbox-store-64b4ef7c-22a6c565.js → mailbox-store-64b4ef7c-7c793d9a.js} +2 -2
  55. package/dist/{mailbox-store-64b4ef7c-0eac526c.cjs → mailbox-store-64b4ef7c-c609ac6d.cjs} +1 -1
  56. package/dist/multi-select-dropdown.entry-2ca73c71.js +91 -0
  57. package/dist/multi-select-dropdown.entry-f298ca2c.cjs +1 -0
  58. package/dist/{nylas-booked-event-card_10.entry-e0990f5b.js → nylas-booked-event-card_10.entry-2b01df7e.js} +267 -235
  59. package/dist/nylas-booked-event-card_10.entry-97977ac7.cjs +1 -0
  60. package/dist/{nylas-custom-booking-flow.entry-898c8cc9.cjs → nylas-custom-booking-flow.entry-05b9522a.cjs} +1 -1
  61. package/dist/{nylas-custom-booking-flow.entry-bc64af5f.js → nylas-custom-booking-flow.entry-66beff43.js} +3 -3
  62. package/dist/{nylas-form-card.entry-c564b52e.js → nylas-form-card.entry-3de9f477.js} +11 -11
  63. package/dist/{nylas-form-card.entry-0c71f4fc.cjs → nylas-form-card.entry-3e1331c9.cjs} +1 -1
  64. package/dist/{nylas-if-state.entry-e9486e12.js → nylas-if-state.entry-a0689083.js} +3 -3
  65. package/dist/{nylas-if-state.entry-ff6a2046.cjs → nylas-if-state.entry-a734df46.cjs} +1 -1
  66. package/dist/{nylas-list-folders.entry-0258af1e.js → nylas-list-folders.entry-4fb9d4c2.js} +7 -7
  67. package/dist/{nylas-list-folders.entry-90716d2b.cjs → nylas-list-folders.entry-74a56187.cjs} +1 -1
  68. package/dist/{nylas-list-threads.entry-21edf012.cjs → nylas-list-threads.entry-0addc621.cjs} +1 -1
  69. package/dist/{nylas-list-threads.entry-1abcdd30.js → nylas-list-threads.entry-9a6d4c33.js} +3 -3
  70. package/dist/{nylas-login.entry-2e0ce95e.cjs → nylas-login.entry-bdac29c0.cjs} +1 -1
  71. package/dist/{nylas-login.entry-ba7383ac.js → nylas-login.entry-beb6e0d9.js} +3 -3
  72. package/dist/{nylas-mailbox-pagination.entry-f6186560.js → nylas-mailbox-pagination.entry-1d71850a.js} +2 -2
  73. package/dist/{nylas-mailbox-pagination.entry-ba6beb08.cjs → nylas-mailbox-pagination.entry-c5d07bbe.cjs} +1 -1
  74. package/dist/{nylas-mailbox-toolbar-button.entry-0875aadb.cjs → nylas-mailbox-toolbar-button.entry-7d9d6293.cjs} +1 -1
  75. package/dist/{nylas-mailbox-toolbar-button.entry-e18059b0.js → nylas-mailbox-toolbar-button.entry-882c97a0.js} +10 -10
  76. package/dist/{nylas-mailbox.entry-bb2905bf.cjs → nylas-mailbox.entry-94eb97ec.cjs} +1 -1
  77. package/dist/{nylas-mailbox.entry-2e3815ed.js → nylas-mailbox.entry-d810adba.js} +4 -4
  78. package/dist/{nylas-provider.entry-51c5cdbf.cjs → nylas-provider.entry-5a4bb86e.cjs} +1 -1
  79. package/dist/{nylas-provider.entry-69ee5061.js → nylas-provider.entry-fcaf9e1c.js} +39 -39
  80. package/dist/{nylas-scheduler-editor.entry-d4a9afb1.js → nylas-scheduler-editor.entry-1ca566d3.js} +138 -119
  81. package/dist/nylas-scheduler-editor.entry-30597812.cjs +2 -0
  82. package/dist/nylas-scheduling.entry-00c418c8.cjs +1 -0
  83. package/dist/{nylas-scheduling.entry-f82a2822.js → nylas-scheduling.entry-aefefe3d.js} +52 -52
  84. package/dist/{nylas-threads-refresh.entry-72482d2f.js → nylas-threads-refresh.entry-a85222e2.js} +10 -10
  85. package/dist/{nylas-threads-refresh.entry-99001756.cjs → nylas-threads-refresh.entry-f3b9fdf2.cjs} +1 -1
  86. package/dist/nylas-threads-search.entry-2c8ac7dc.cjs +1 -0
  87. package/dist/{nylas-threads-search.entry-c5fe50e5.js → nylas-threads-search.entry-b1bf455b.js} +17 -17
  88. package/dist/{nylas-time-window-picker.entry-ccffcf2b.cjs → nylas-time-window-picker.entry-3a34b29b.cjs} +1 -1
  89. package/dist/{nylas-time-window-picker.entry-0d93e7cc.js → nylas-time-window-picker.entry-6d664a05.js} +2 -2
  90. package/dist/{nylas-view-thread.entry-58432a52.cjs → nylas-view-thread.entry-bf6cab2a.cjs} +1 -1
  91. package/dist/{nylas-view-thread.entry-2d34b41c.js → nylas-view-thread.entry-ddcb042f.js} +6 -6
  92. package/dist/play-icon_2.entry-4f316c3d.cjs +1 -0
  93. package/dist/play-icon_2.entry-d55a018a.js +25 -0
  94. package/dist/react.cjs +1 -1
  95. package/dist/react.js +115 -101
  96. package/dist/{refresh-icon.entry-a041136d.js → refresh-icon.entry-0fdcb7af.js} +4 -4
  97. package/dist/{refresh-icon.entry-1e670732.cjs → refresh-icon.entry-99761cb6.cjs} +1 -1
  98. package/dist/{register-component-a5a9ca5d-b68b6039.cjs → register-component-a5a9ca5d-4439e573.cjs} +1 -1
  99. package/dist/{register-component-a5a9ca5d-a5c01c35.js → register-component-a5a9ca5d-ddae10b3.js} +1 -1
  100. package/dist/{scheduler-config-store-4a50a03d-ee42ff96.js → scheduler-config-store-9ccfba4d-84025740.js} +8 -6
  101. package/dist/scheduler-config-store-9ccfba4d-b774bfee.cjs +1 -0
  102. package/dist/{scheduler-store-f02ce045-23a14e3f.js → scheduler-store-8a400448-8ab7b63e.js} +125 -96
  103. package/dist/scheduler-store-8a400448-eaa566fa.cjs +1 -0
  104. package/dist/{textarea-component.entry-1b4c771b.js → textarea-component.entry-193d29fd.js} +7 -6
  105. package/dist/{textarea-component.entry-24a830c1.cjs → textarea-component.entry-359e4665.cjs} +1 -1
  106. package/dist/{translate-icon.entry-44bde57b.js → translate-icon.entry-22a3e72e.js} +2 -2
  107. package/dist/{translate-icon.entry-0c0add25.cjs → translate-icon.entry-32ec36de.cjs} +1 -1
  108. package/dist/{warning-icon.entry-8956cba2.js → warning-icon.entry-8d9b59c0.js} +5 -5
  109. package/dist/{warning-icon.entry-9a77ab01.cjs → warning-icon.entry-b8d483e1.cjs} +1 -1
  110. package/package.json +3 -3
  111. package/dist/arrow-icon.entry-1f54c377.js +0 -15
  112. package/dist/button-component.entry-52ccb6d9.js +0 -16
  113. package/dist/button-component.entry-e79b2d08.cjs +0 -1
  114. package/dist/calendar-info-icon_28.entry-2054703c.cjs +0 -1
  115. package/dist/calendar-info-icon_28.entry-e7bebd13.js +0 -2083
  116. package/dist/chevron-icon_3.entry-7bd4a4b5.cjs +0 -1
  117. package/dist/document-refresh-icon.entry-a0293858.cjs +0 -1
  118. package/dist/google-logo-icon_4.entry-60c0d39a.cjs +0 -1
  119. package/dist/google-logo-icon_4.entry-a0dc33da.js +0 -467
  120. package/dist/index-53420959-67beefed.js +0 -5
  121. package/dist/index-53420959-d3254a34.cjs +0 -1
  122. package/dist/index-e3e9b594.cjs +0 -42
  123. package/dist/input-component.entry-1195d579.js +0 -45
  124. package/dist/input-component.entry-2b6e44c4.cjs +0 -1
  125. package/dist/loading-icon.entry-027a2ad1.js +0 -15
  126. package/dist/nylas-booked-event-card_10.entry-84f64ba5.cjs +0 -1
  127. package/dist/nylas-scheduler-editor.entry-923b8566.cjs +0 -2
  128. package/dist/nylas-scheduling.entry-54f1a5e9.cjs +0 -1
  129. package/dist/nylas-threads-search.entry-462527fd.cjs +0 -1
  130. package/dist/play-icon_2.entry-1ea3fd6b.cjs +0 -1
  131. package/dist/play-icon_2.entry-d08adf17.js +0 -25
  132. package/dist/scheduler-config-store-4a50a03d-884e6df8.cjs +0 -1
  133. package/dist/scheduler-store-f02ce045-42e3647c.cjs +0 -1
@@ -1,5 +1,5 @@
1
- import { r as ne, h as g, c as We, d as T, H as $e, g as Rt, i as yn, q as bn, s as En, v as Tn, F as An, w as _n } from "./index-812162da.js";
2
- import { R as wn } from "./register-component-a5a9ca5d-a5c01c35.js";
1
+ import { r as ne, h as g, c as We, d as T, H as $e, g as Rt, i as yn, q as bn, s as En, v as Tn, F as An, w as _n } from "./index-a68236be.js";
2
+ import { R as wn } from "./register-component-a5a9ca5d-ddae10b3.js";
3
3
  import "react";
4
4
  import "react-dom";
5
5
  const vn = ".sc-forward-icon-h{display:flex}", Sn = vn, Cn = class {
@@ -7,7 +7,7 @@ const vn = ".sc-forward-icon-h{display:flex}", Sn = vn, Cn = class {
7
7
  ne(this, t), this.width = "15", this.height = "15";
8
8
  }
9
9
  render() {
10
- return g("svg", { key: "56e947b67fe88f2a095cca9a0dd4c3ca9e570e7f", fill: "auto", width: this.width, height: this.height, viewBox: "0 0 1920 1920", xmlns: "http://www.w3.org/2000/svg" }, g("path", { key: "6d6da4d1c35613bdedc7fac5d2d8f0e6f2c3042c", d: "m1246.246 64-90.496 90.496 477.952 477.952h-590.848C467.878 632.448.038 1100.416.038 1675.392v109.056h128v-109.056c0-504.576 410.368-914.944 914.816-914.944h590.848l-477.952 478.08 90.496 90.496 632.448-632.576L1246.246 64Z", "fill-rule": "evenodd" }));
10
+ return g("svg", { key: "cb5aaea71d642a44a5f53655c7ae98190aaf3745", fill: "auto", width: this.width, height: this.height, viewBox: "0 0 1920 1920", xmlns: "http://www.w3.org/2000/svg" }, g("path", { key: "e15b175864ce7c39e04c3885653da3f4d9f35fb1", d: "m1246.246 64-90.496 90.496 477.952 477.952h-590.848C467.878 632.448.038 1100.416.038 1675.392v109.056h128v-109.056c0-504.576 410.368-914.944 914.816-914.944h590.848l-477.952 478.08 90.496 90.496 632.448-632.576L1246.246 64Z", "fill-rule": "evenodd" }));
11
11
  }
12
12
  };
13
13
  Cn.style = Sn;
@@ -106,7 +106,7 @@ const Ln = ':host{display:grid;color:var(--nylas-color-primary-900)}.editor{posi
106
106
  }), this.editorEl.focus();
107
107
  }
108
108
  render() {
109
- return g($e, { key: "7537b7c56a1e609f88189c2c4deed986827eb193" }, g("sp-theme", { key: "efa28f8ed5585ec21b44ae5ec174aa10a9c92aba", scale: "medium", color: "dark" }, g("div", { key: "c7932bcedcb2b3cfa4e0900578cf2b749000125d", class: "editor", contentEditable: !0, ref: (t) => this.editorEl = t }, g("div", { key: "89c06c0e76d29ea6713dd44b2452e261d0d7d43b", class: "toolbar", ref: (t) => this.toolbarEl = t, contentEditable: !1 }, g("sp-button", { key: "beeb60448f03c8818925aeb13ab5231aa72f7526", quiet: !0, onClick: () => document.execCommand("bold") }, g("div", { key: "4e37be81a28ac4355f9d0d6d6c71b7b78cf41456", slot: "icon" }, g("bold-icon", { key: "56cf047799a6a5713310d5b095ca91e6004d6107" })), g("div", { key: "2fe47f8f364f7fb1016990f2aecec655e2e6eb30", slot: "label" }, "Bold")), g("sp-button", { key: "0416d13b88ccefd5005f4b97f7dded2118d37f43", quiet: !0, onClick: () => document.execCommand("underline") }, g("div", { key: "6d20e215eafbb91a17ce452a6b64295ab4ef2bb9", slot: "icon" }, g("underline-icon", { key: "b8d988fa168047ed213fbcceb53b24bf3f766d7a" })), g("div", { key: "bd05639007b3ea849501b995137ceda70aed20da", slot: "label" }, "Underline")), g("sp-button", { key: "9775c4787363cd4d21778f4c848c7f5a7564b507", quiet: !0, onClick: () => document.execCommand("italic") }, g("div", { key: "ca9d557028981c0fe209045e5d1748b19bbb5069", slot: "icon" }, g("italic-icon", { key: "1be5debba3572e83ab132a3e44d8fc1e799f6619" })), g("div", { key: "cccb70309840e20f558158e6ef9edf8fe0e52eed", slot: "label" }, "Italic")))), g("div", { key: "502854e008886de49ec435c1ebd73b48f2cc4c70", class: "buttons" }, g("sp-button", { key: "9663a709ca8794dc76dec379a39c52a6a754cb6e", onClick: this.sendComposer, class: "send" }, "Send"), g("sp-button", { key: "b0c7637932f2659c9115e74f1244db04992a69aa", onClick: this.closeComposer, class: "close" }, "Close"))));
109
+ return g($e, { key: "a8cae87973663ced987b12f8a41385f3311910e5" }, g("sp-theme", { key: "9b732690d1f0c529704c614955c603af602f1805", scale: "medium", color: "dark" }, g("div", { key: "6f9da518afc2027bb938b50dced65383c83281f5", class: "editor", contentEditable: !0, ref: (t) => this.editorEl = t }, g("div", { key: "d665e4adebc7352b5c07137ead22793da96b1a6a", class: "toolbar", ref: (t) => this.toolbarEl = t, contentEditable: !1 }, g("sp-button", { key: "cf4c80151daac614613530c7f3973fa44285b943", quiet: !0, onClick: () => document.execCommand("bold") }, g("div", { key: "406b64ee65391632212f69aab967cce595ef3145", slot: "icon" }, g("bold-icon", { key: "38a82fba1133e28052ae18f59148056213c76e63" })), g("div", { key: "8ab054e1caa8da4d5745a991e0a2ad197124466b", slot: "label" }, "Bold")), g("sp-button", { key: "52d7e1302c0624d4e1e5c337a412a5e0e3752914", quiet: !0, onClick: () => document.execCommand("underline") }, g("div", { key: "c64009e9818a9ccf0385f7cd2c8e3c9df2e08d0d", slot: "icon" }, g("underline-icon", { key: "75de67cc0add37d483d564c1cae6486147ad6669" })), g("div", { key: "d46d90b0959349c237720890afd7b700a6f3cd71", slot: "label" }, "Underline")), g("sp-button", { key: "af87cc784ed3c77e471ba54abbf7e18c3c391e1c", quiet: !0, onClick: () => document.execCommand("italic") }, g("div", { key: "0e1d03379b6f212fe9b0d080577f0633c2ce5c4a", slot: "icon" }, g("italic-icon", { key: "6e127d2755fccaf634d6a261d95dc191bda77bd2" })), g("div", { key: "f2e251b97838ed752af350ed0dae3213a3a14e68", slot: "label" }, "Italic")))), g("div", { key: "70399bf4636e5c061562c478504799b6fdf6e15c", class: "buttons" }, g("sp-button", { key: "90d7d39c6dd284ea399425ea07e205f0562d1423", onClick: this.sendComposer, class: "send" }, "Send"), g("sp-button", { key: "7a1cd27929d585a43b076b8e8131b01f6835aba7", onClick: this.closeComposer, class: "close" }, "Close"))));
110
110
  }
111
111
  get host() {
112
112
  return Rt(this);
@@ -213,12 +213,12 @@ const kt = class {
213
213
  return t.read().then(({ done: u, value: s }) => u ? o : (o.push(s), this.readChunk(t, o)));
214
214
  }
215
215
  render() {
216
- return g($e, { key: "977e97a8d9e6f0d5c3f56a8cedcdb18c65a18007" }, g("sp-theme", { key: "3e3e9a385317466347c5e4bac4cac584dc603063", scale: "medium", color: "dark" }, g("sp-button", { key: "4e47a9b38e47991c64236d567df1341df0a7a2b3", label: "Summarize email", "icon-only": !0, onClickCapture: this.onClick, class: {
216
+ return g($e, { key: "66c864d9b70e34daf876f49120810dbd9082256e" }, g("sp-theme", { key: "f210e4a870993a8c620b64458f1fb7abfdac88dd", scale: "medium", color: "dark" }, g("sp-button", { key: "9244f97e26c3ecfc1edcedd5b4b6a6080ad9920f", label: "Summarize email", "icon-only": !0, onClickCapture: this.onClick, class: {
217
217
  "summarize-button": !0,
218
218
  stopped: this.state === "stopped",
219
219
  loading: this.state === "loading",
220
220
  playing: this.state === "playing"
221
- } }, this.state === "stopped" && g("play-icon", null), this.state === "loading" && g("loading-icon", null), this.state === "playing" && g("stop-icon", null)), g("audio", { key: "0a0a952634d68aeab930d9a0c9feb07a1dea2828", ref: (t) => this.audioRef = t, autoPlay: !0, onPlaying: () => this.state = "playing", onPause: () => this.state = "stopped", onEnded: () => {
221
+ } }, this.state === "stopped" && g("play-icon", null), this.state === "loading" && g("loading-icon", null), this.state === "playing" && g("stop-icon", null)), g("audio", { key: "f748ef06f332f119dbe6b5bd527e9db5e585cb08", ref: (t) => this.audioRef = t, autoPlay: !0, onPlaying: () => this.state = "playing", onPause: () => this.state = "stopped", onEnded: () => {
222
222
  this.state = "stopped", T("[nylas-summarize-message-button] Audio ended");
223
223
  } })));
224
224
  }
@@ -912,7 +912,7 @@ const Bn = class {
912
912
  });
913
913
  }
914
914
  render() {
915
- return console.debug("[nylas-view-email] render", { hoistedFontURLs: this.hoistedFontURLs }), g($e, { key: "4f0a1e688ae465d65943adc7dabac9cad6c62fe8" }, this.state === "loading" && g("div", null, "Loading..."), this.state === "ready" && g(An, null, this.styles.map((t) => g("style", null, Ge.sanitize(t.innerHTML))), g("div", { class: "view-email", part: "view-email", innerHTML: this.sanitizedBody, ref: (t) => this.viewEmailElement = t })));
915
+ return console.debug("[nylas-view-email] render", { hoistedFontURLs: this.hoistedFontURLs }), g($e, { key: "285c8ae259a5c1de84aa7facdc2165f1f0383e31" }, this.state === "loading" && g("div", null, "Loading..."), this.state === "ready" && g(An, null, this.styles.map((t) => g("style", null, Ge.sanitize(t.innerHTML))), g("div", { class: "view-email", part: "view-email", innerHTML: this.sanitizedBody, ref: (t) => this.viewEmailElement = t })));
916
916
  }
917
917
  get host() {
918
918
  return Rt(this);
@@ -930,7 +930,7 @@ const Wn = ".sc-reply-all-icon-h{display:flex}", Gn = Wn, $n = class {
930
930
  ne(this, t), this.width = "15", this.height = "15";
931
931
  }
932
932
  render() {
933
- return g("svg", { key: "27304a19b7ec5d4fb64051ba1edbd99699adc3c5", fill: "auto", width: this.width, height: this.height, viewBox: "0 0 1920 1920", xmlns: "http://www.w3.org/2000/svg" }, g("path", { key: "185831a5360ae2e5b3559e22839c38fe8667e027", d: "m1030.975 188 81.249 81.249-429.228 429.228h300.747c516.223 0 936.257 420.034 936.257 936.257v98.028h-114.92v-98.028c0-452.901-368.436-821.337-821.337-821.337H682.996l429.228 429.229-81.25 81.248-567.936-567.937L1030.975 188Zm-463.038.011 81.249 81.25-486.688 486.688 486.688 486.688-81.249 81.249L0 755.949 567.937 188.01Z", "fill-rule": "evenodd" }));
933
+ return g("svg", { key: "c5eb888da15f3b1cd71273ac5ce16d364dc75c1a", fill: "auto", width: this.width, height: this.height, viewBox: "0 0 1920 1920", xmlns: "http://www.w3.org/2000/svg" }, g("path", { key: "2b46aff2e7c0da2f0384485892fe9d3c1998363c", d: "m1030.975 188 81.249 81.249-429.228 429.228h300.747c516.223 0 936.257 420.034 936.257 936.257v98.028h-114.92v-98.028c0-452.901-368.436-821.337-821.337-821.337H682.996l429.228 429.229-81.25 81.248-567.936-567.937L1030.975 188Zm-463.038.011 81.249 81.25-486.688 486.688 486.688 486.688-81.249 81.249L0 755.949 567.937 188.01Z", "fill-rule": "evenodd" }));
934
934
  }
935
935
  };
936
936
  $n.style = Gn;
@@ -939,7 +939,7 @@ const qn = ".sc-reply-icon-h{display:flex}", Yn = qn, jn = class {
939
939
  ne(this, t), this.width = "15", this.height = "15";
940
940
  }
941
941
  render() {
942
- return g("svg", { key: "8f2d5daffb8ab92a42abacce15e2abd868f979a7", fill: "auto", width: this.width, height: this.height, viewBox: "0 0 1920 1920", xmlns: "http://www.w3.org/2000/svg" }, g("path", { key: "fcad20369efbf76e019c7b433e380419c696e481", d: "M835.942 632.563H244.966l478.08-478.08-90.496-90.496L-.026 696.563 632.55 1329.14l90.496-90.496-478.08-478.08h590.976c504.448 0 914.816 410.368 914.816 914.816v109.184h128V1675.38c0-574.976-467.84-1042.816-1042.816-1042.816", "fill-rule": "evenodd" }));
942
+ return g("svg", { key: "b39732ec7ae51099897b58265e3107537e033038", fill: "auto", width: this.width, height: this.height, viewBox: "0 0 1920 1920", xmlns: "http://www.w3.org/2000/svg" }, g("path", { key: "c96f0bfb2877690a272883481c820bc06c8d04ce", d: "M835.942 632.563H244.966l478.08-478.08-90.496-90.496L-.026 696.563 632.55 1329.14l90.496-90.496-478.08-478.08h590.976c504.448 0 914.816 410.368 914.816 914.816v109.184h128V1675.38c0-574.976-467.84-1042.816-1042.816-1042.816", "fill-rule": "evenodd" }));
943
943
  }
944
944
  };
945
945
  jn.style = Yn;
@@ -1,4 +1,4 @@
1
- import { r as e, h as C } from "./index-812162da.js";
1
+ import { r as e, h as C } from "./index-a68236be.js";
2
2
  import "react";
3
3
  import "react-dom";
4
4
  const o = ".sc-globe-icon-h{display:flex}", s = o, i = class {
@@ -6,7 +6,7 @@ const o = ".sc-globe-icon-h{display:flex}", s = o, i = class {
6
6
  e(this, t), this.width = "16", this.height = "16";
7
7
  }
8
8
  render() {
9
- return C("svg", { key: "e118f6587042dbd2405c644943d89e7711e9a384", xmlns: "http://www.w3.org/2000/svg", width: this.width, height: this.height, viewBox: "0 0 16 16", fill: "none" }, C("path", { key: "05682560c53869ae2fd5a8531736f511386a0db2", d: "M8 14C11.3137 14 14 11.3137 14 8C14 4.68629 11.3137 2 8 2C4.68629 2 2 4.68629 2 8C2 11.3137 4.68629 14 8 14ZM8 3C8.37372 3 8.87543 3.35608 9.31258 4.31781C9.4073 4.52619 9.49448 4.75446 9.57265 5H6.42735C6.50552 4.75446 6.5927 4.52619 6.68742 4.31781C7.12457 3.35608 7.62628 3 8 3ZM5.77705 3.90401C5.62614 4.23601 5.49428 4.6038 5.38411 5H3.99963C4.52341 4.30269 5.22525 3.74677 6.03766 3.39978C5.94287 3.56117 5.85596 3.7304 5.77705 3.90401ZM5.16299 6C5.05694 6.6275 5 7.30146 5 8C5 8.69854 5.05694 9.3725 5.16299 10H3.41604C3.14845 9.38754 3 8.7111 3 8C3 7.2889 3.14845 6.61246 3.41604 6H5.16299ZM5.38411 11C5.49428 11.3962 5.62614 11.764 5.77705 12.096C5.85596 12.2696 5.94287 12.4388 6.03766 12.6002C5.22525 12.2532 4.52341 11.6973 3.99963 11H5.38411ZM6.42735 11H9.57265C9.49448 11.2455 9.4073 11.4738 9.31258 11.6822C8.87543 12.6439 8.37372 13 8 13C7.62628 13 7.12457 12.6439 6.68742 11.6822C6.5927 11.4738 6.50552 11.2455 6.42735 11ZM9.82134 10H6.17866C6.06438 9.3892 6 8.71396 6 8C6 7.28604 6.06438 6.6108 6.17866 6H9.82134C9.93562 6.6108 10 7.28604 10 8C10 8.71396 9.93562 9.3892 9.82134 10ZM10.6159 11H12.0004C11.4766 11.6973 10.7747 12.2532 9.96234 12.6002C10.0571 12.4388 10.144 12.2696 10.2229 12.096C10.3739 11.764 10.5057 11.3962 10.6159 11ZM12.584 10H10.837C10.9431 9.3725 11 8.69854 11 8C11 7.30146 10.9431 6.6275 10.837 6H12.584C12.8516 6.61246 13 7.2889 13 8C13 8.7111 12.8516 9.38754 12.584 10ZM9.96234 3.39978C10.7747 3.74677 11.4766 4.30269 12.0004 5H10.6159C10.5057 4.6038 10.3739 4.23601 10.2229 3.90401C10.144 3.7304 10.0571 3.56117 9.96234 3.39978Z", fill: "currentColor" }));
9
+ return C("svg", { key: "ec642b0d935a6beb65806088a72133496a34a1e4", xmlns: "http://www.w3.org/2000/svg", width: this.width, height: this.height, viewBox: "0 0 16 16", fill: "none" }, C("path", { key: "d2430b66983aaf52ebd0df5a79ac9709c489794b", d: "M8 14C11.3137 14 14 11.3137 14 8C14 4.68629 11.3137 2 8 2C4.68629 2 2 4.68629 2 8C2 11.3137 4.68629 14 8 14ZM8 3C8.37372 3 8.87543 3.35608 9.31258 4.31781C9.4073 4.52619 9.49448 4.75446 9.57265 5H6.42735C6.50552 4.75446 6.5927 4.52619 6.68742 4.31781C7.12457 3.35608 7.62628 3 8 3ZM5.77705 3.90401C5.62614 4.23601 5.49428 4.6038 5.38411 5H3.99963C4.52341 4.30269 5.22525 3.74677 6.03766 3.39978C5.94287 3.56117 5.85596 3.7304 5.77705 3.90401ZM5.16299 6C5.05694 6.6275 5 7.30146 5 8C5 8.69854 5.05694 9.3725 5.16299 10H3.41604C3.14845 9.38754 3 8.7111 3 8C3 7.2889 3.14845 6.61246 3.41604 6H5.16299ZM5.38411 11C5.49428 11.3962 5.62614 11.764 5.77705 12.096C5.85596 12.2696 5.94287 12.4388 6.03766 12.6002C5.22525 12.2532 4.52341 11.6973 3.99963 11H5.38411ZM6.42735 11H9.57265C9.49448 11.2455 9.4073 11.4738 9.31258 11.6822C8.87543 12.6439 8.37372 13 8 13C7.62628 13 7.12457 12.6439 6.68742 11.6822C6.5927 11.4738 6.50552 11.2455 6.42735 11ZM9.82134 10H6.17866C6.06438 9.3892 6 8.71396 6 8C6 7.28604 6.06438 6.6108 6.17866 6H9.82134C9.93562 6.6108 10 7.28604 10 8C10 8.71396 9.93562 9.3892 9.82134 10ZM10.6159 11H12.0004C11.4766 11.6973 10.7747 12.2532 9.96234 12.6002C10.0571 12.4388 10.144 12.2696 10.2229 12.096C10.3739 11.764 10.5057 11.3962 10.6159 11ZM12.584 10H10.837C10.9431 9.3725 11 8.69854 11 8C11 7.30146 10.9431 6.6275 10.837 6H12.584C12.8516 6.61246 13 7.2889 13 8C13 8.7111 12.8516 9.38754 12.584 10ZM9.96234 3.39978C10.7747 3.74677 11.4766 4.30269 12.0004 5H10.6159C10.5057 4.6038 10.3739 4.23601 10.2229 3.90401C10.144 3.7304 10.0571 3.56117 9.96234 3.39978Z", fill: "currentColor" }));
10
10
  }
11
11
  };
12
12
  i.style = s;
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index-e3e9b594.cjs");require("react");require("react-dom");const i=".sc-globe-icon-h{display:flex}",o=i,C=class{constructor(t){e.registerInstance(this,t),this.width="16",this.height="16"}render(){return e.h("svg",{key:"e118f6587042dbd2405c644943d89e7711e9a384",xmlns:"http://www.w3.org/2000/svg",width:this.width,height:this.height,viewBox:"0 0 16 16",fill:"none"},e.h("path",{key:"05682560c53869ae2fd5a8531736f511386a0db2",d:"M8 14C11.3137 14 14 11.3137 14 8C14 4.68629 11.3137 2 8 2C4.68629 2 2 4.68629 2 8C2 11.3137 4.68629 14 8 14ZM8 3C8.37372 3 8.87543 3.35608 9.31258 4.31781C9.4073 4.52619 9.49448 4.75446 9.57265 5H6.42735C6.50552 4.75446 6.5927 4.52619 6.68742 4.31781C7.12457 3.35608 7.62628 3 8 3ZM5.77705 3.90401C5.62614 4.23601 5.49428 4.6038 5.38411 5H3.99963C4.52341 4.30269 5.22525 3.74677 6.03766 3.39978C5.94287 3.56117 5.85596 3.7304 5.77705 3.90401ZM5.16299 6C5.05694 6.6275 5 7.30146 5 8C5 8.69854 5.05694 9.3725 5.16299 10H3.41604C3.14845 9.38754 3 8.7111 3 8C3 7.2889 3.14845 6.61246 3.41604 6H5.16299ZM5.38411 11C5.49428 11.3962 5.62614 11.764 5.77705 12.096C5.85596 12.2696 5.94287 12.4388 6.03766 12.6002C5.22525 12.2532 4.52341 11.6973 3.99963 11H5.38411ZM6.42735 11H9.57265C9.49448 11.2455 9.4073 11.4738 9.31258 11.6822C8.87543 12.6439 8.37372 13 8 13C7.62628 13 7.12457 12.6439 6.68742 11.6822C6.5927 11.4738 6.50552 11.2455 6.42735 11ZM9.82134 10H6.17866C6.06438 9.3892 6 8.71396 6 8C6 7.28604 6.06438 6.6108 6.17866 6H9.82134C9.93562 6.6108 10 7.28604 10 8C10 8.71396 9.93562 9.3892 9.82134 10ZM10.6159 11H12.0004C11.4766 11.6973 10.7747 12.2532 9.96234 12.6002C10.0571 12.4388 10.144 12.2696 10.2229 12.096C10.3739 11.764 10.5057 11.3962 10.6159 11ZM12.584 10H10.837C10.9431 9.3725 11 8.69854 11 8C11 7.30146 10.9431 6.6275 10.837 6H12.584C12.8516 6.61246 13 7.2889 13 8C13 8.7111 12.8516 9.38754 12.584 10ZM9.96234 3.39978C10.7747 3.74677 11.4766 4.30269 12.0004 5H10.6159C10.5057 4.6038 10.3739 4.23601 10.2229 3.90401C10.144 3.7304 10.0571 3.56117 9.96234 3.39978Z",fill:"currentColor"}))}};C.style=o;exports.globe_icon=C;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index-a4831dfe.cjs");require("react");require("react-dom");const i=".sc-globe-icon-h{display:flex}",o=i,C=class{constructor(t){e.registerInstance(this,t),this.width="16",this.height="16"}render(){return e.h("svg",{key:"ec642b0d935a6beb65806088a72133496a34a1e4",xmlns:"http://www.w3.org/2000/svg",width:this.width,height:this.height,viewBox:"0 0 16 16",fill:"none"},e.h("path",{key:"d2430b66983aaf52ebd0df5a79ac9709c489794b",d:"M8 14C11.3137 14 14 11.3137 14 8C14 4.68629 11.3137 2 8 2C4.68629 2 2 4.68629 2 8C2 11.3137 4.68629 14 8 14ZM8 3C8.37372 3 8.87543 3.35608 9.31258 4.31781C9.4073 4.52619 9.49448 4.75446 9.57265 5H6.42735C6.50552 4.75446 6.5927 4.52619 6.68742 4.31781C7.12457 3.35608 7.62628 3 8 3ZM5.77705 3.90401C5.62614 4.23601 5.49428 4.6038 5.38411 5H3.99963C4.52341 4.30269 5.22525 3.74677 6.03766 3.39978C5.94287 3.56117 5.85596 3.7304 5.77705 3.90401ZM5.16299 6C5.05694 6.6275 5 7.30146 5 8C5 8.69854 5.05694 9.3725 5.16299 10H3.41604C3.14845 9.38754 3 8.7111 3 8C3 7.2889 3.14845 6.61246 3.41604 6H5.16299ZM5.38411 11C5.49428 11.3962 5.62614 11.764 5.77705 12.096C5.85596 12.2696 5.94287 12.4388 6.03766 12.6002C5.22525 12.2532 4.52341 11.6973 3.99963 11H5.38411ZM6.42735 11H9.57265C9.49448 11.2455 9.4073 11.4738 9.31258 11.6822C8.87543 12.6439 8.37372 13 8 13C7.62628 13 7.12457 12.6439 6.68742 11.6822C6.5927 11.4738 6.50552 11.2455 6.42735 11ZM9.82134 10H6.17866C6.06438 9.3892 6 8.71396 6 8C6 7.28604 6.06438 6.6108 6.17866 6H9.82134C9.93562 6.6108 10 7.28604 10 8C10 8.71396 9.93562 9.3892 9.82134 10ZM10.6159 11H12.0004C11.4766 11.6973 10.7747 12.2532 9.96234 12.6002C10.0571 12.4388 10.144 12.2696 10.2229 12.096C10.3739 11.764 10.5057 11.3962 10.6159 11ZM12.584 10H10.837C10.9431 9.3725 11 8.69854 11 8C11 7.30146 10.9431 6.6275 10.837 6H12.584C12.8516 6.61246 13 7.2889 13 8C13 8.7111 12.8516 9.38754 12.584 10ZM9.96234 3.39978C10.7747 3.74677 11.4766 4.30269 12.0004 5H10.6159C10.5057 4.6038 10.3739 4.23601 10.2229 3.90401C10.144 3.7304 10.0571 3.56117 9.96234 3.39978Z",fill:"currentColor"}))}};C.style=o;exports.globe_icon=C;
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index-a4831dfe.cjs"),gt=require("./register-component-a5a9ca5d-4439e573.cjs"),mt=require("./constants-7ce66b44-a6b777d4.cjs");require("react");require("react-dom");const wt=".sc-google-logo-icon-h{display:flex}",Ct=wt,_t=class{constructor(t){e.registerInstance(this,t),this.width="24",this.height="24"}render(){return e.h("svg",{key:"555521f048f2f287de7572071b43a53efeae7a10",width:this.width,height:this.height,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e.h("g",{key:"2613493e10c2c2bd60da54b6c5ec674ae56d4bb0","clip-path":"url(#clip0_959_12452)"},e.h("path",{key:"8467e8ba5977837e472bec1d8a2bec6ed08bbb8f",d:"M23.745 12.27C23.745 11.48 23.675 10.73 23.555 10H12.255V14.51H18.725C18.435 15.99 17.585 17.24 16.325 18.09V21.09H20.185C22.445 19 23.745 15.92 23.745 12.27Z",fill:"#4285F4"}),e.h("path",{key:"0a575c6bc170567883e793eebca58942de623a13",d:"M12.255 24C15.495 24 18.205 22.92 20.185 21.09L16.325 18.09C15.245 18.81 13.875 19.25 12.255 19.25C9.12504 19.25 6.47505 17.14 5.52505 14.29H1.54504V17.38C3.51504 21.3 7.56504 24 12.255 24Z",fill:"#34A853"}),e.h("path",{key:"4c4e6d0e4d8555fd3f7dedc24ccc27a5ac3209ea",d:"M5.52501 14.2901C5.27501 13.5701 5.145 12.8001 5.145 12.0001C5.145 11.2001 5.28501 10.4301 5.52501 9.71012V6.62012H1.545C0.725004 8.24012 0.255005 10.0601 0.255005 12.0001C0.255005 13.9401 0.725004 15.7601 1.545 17.3801L5.52501 14.2901Z",fill:"#FBBC05"}),e.h("path",{key:"d6dca8d2887f09a6d7a95b84238ec7615e3530c3",d:"M12.255 4.75C14.025 4.75 15.605 5.36 16.855 6.55L20.275 3.13C18.205 1.19 15.495 0 12.255 0C7.56504 0 3.51504 2.7 1.54504 6.62L5.52505 9.71C6.47505 6.86 9.12504 4.75 12.255 4.75Z",fill:"#EA4335"})),e.h("defs",{key:"5ea0838d988413517f09c07e413d97db3b942375"},e.h("clipPath",{key:"dd0a31b400e699406e194711fcbc949d5f3c8304",id:"clip0_959_12452"},e.h("rect",{key:"86cb4fe6ed9cada88e94516cf76ddaa3a2d62311",width:24,height:24,fill:"white"}))))}};_t.style=Ct;const kt=".sc-microsoft-logo-icon-h{display:flex}",xt=kt,vt=class{constructor(t){e.registerInstance(this,t),this.width="22",this.height="22"}render(){return e.h("svg",{key:"da59f9b8e18c52e2ca12e97ce694b7abc30aea0d",width:this.width,height:this.height,viewBox:"0 0 22 22",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e.h("path",{key:"ef4d02c0f11fd9df3a3e1a781d2379526404c469",d:"M0.043457 0.043457H10.4782V10.4782H0.043457V0.043457Z",fill:"#F35325"}),e.h("path",{key:"9799ab150bbdee2cf4ec6275b2388fe2c00dd85e",d:"M11.5217 0.043457H21.9565V10.4782H11.5217V0.043457Z",fill:"#81BC06"}),e.h("path",{key:"65f7ee7dedd27844e342d2f1e7065814c6012c46",d:"M0.043457 11.5217H10.4782V21.9565H0.043457V11.5217Z",fill:"#05A6F0"}),e.h("path",{key:"a21de9dcc8252feec5b07059371eba058b2d071c",d:"M11.5217 11.5217H21.9565V21.9565H11.5217V11.5217Z",fill:"#FFBA08"}))}};vt.style=xt;function St({id:t,formState:i,activeTab:a,calendars:s,currentUser:r}){switch(a){case"eventInfo":const n=i.title,l=i.description,o=parseInt(i.duration),u=i.location,p=i.conferencing;return e.h("div",{key:t},e.h("nylas-event-info",null,e.h("div",{slot:"inputs"},e.h("nylas-event-title",{name:"title",eventTitle:n,exportparts:"net, net__title, net__dropdown-content"}),e.h("nylas-event-duration",{name:"duration",eventDurationMinutes:o,exportparts:"ned, ned__dropdown, ned__dropdown-button, ned__dropdown-content, ned__input_dropdown, ned__input_dropdown-input, ned__input_dropdown-content"}),e.h("nylas-event-location",{name:"location",eventLocation:u,eventConferencing:p,userProvider:r.provider,exportparts:"nel, nel__location, nel__dropdown, nel__dropdown-button, nel__dropdown-content"}),e.h("nylas-event-description",{name:"description",eventDescription:l,exportparts:"nedesc, nedesc__textarea"}))));case"availability":const g=i.availability.openHours,C=i.availability.timezone?i.availability.timezone:Intl.DateTimeFormat().resolvedOptions().timeZone;return e.h("div",{key:t},e.h("nylas-participant-booking-calendars",{name:"participant-booking-calendars",participants:i.participants,calendars:s}),e.h("nylas-connected-calendars",{name:"connected-calendars",participants:i.participants}),e.h("nylas-availability-picker",{name:"availability",openHours:g,defaultTimezone:C,exportparts:"nap__header, nap__select-timezone, nap__select-timezone-button, nap__select-timezone-dropdown-content, nap__availability, nap__day, nap__time-ranges, nap__time-range, nap__add-time-range, nap__time-picker-container, nap__time-picker-input, nap__time-picker-times"}));case"bookingOptions":return e.h("div",{key:t},e.h("nylas-buffer-time",{name:"buffer-time",buffer:i.buffer,exportparts:"nbt, nbt__header, nbt__body, nbt__dropdown-before, nbt__dropdown-button-before, nbt__dropdown-content-before, nbt__dropdown-after, nbt__dropdown-button-after, nbt__dropdown-content-after, nbt__preview"}),e.h("nylas-event-limits",null,e.h("div",{slot:"inputs"},e.h("nylas-min-booking-notice",{name:"min-booking-notice",minBookingNotice:i.minBookingNotice,exportparts:"nmbn, nmbn__number-dropdown, nmbn__number-dropdown-button, nmbn__number-dropdown-content, nmbn__period-dropdown, nmbn__period-dropdown-button, nmbn__period-dropdown-content"}),e.h("nylas-limit-future-bookings",{name:"limit-future-bookings",availableDaysInFuture:i.availableDaysInFuture,exportparts:"nlfb, nlfb__number-dropdown, nlfb__number-dropdown-button, nlfb__number-dropdown-content, nlfb__period-dropdown, nlfb__period-dropdown-button, nlfb__period-dropdown-content"}),e.h("nylas-min-cancellation-notice",{name:"min-cancellation-notice",minCancellationNotice:i.minCancellationNotice,exportparts:"nmcn, nmcn__number-dropdown, nmcn__number-dropdown-button, nmcn__number-dropdown-content, nmcn__period-dropdown, nmcn__period-dropdown-button, nmcn__period-dropdown-content"}),e.h("nylas-cancellation-policy",{name:"cancellation-policy",cancellationPolicy:i.cancellationPolicy,exportparts:"ncpolicy, ncpolicy__textarea"}))),e.h("nylas-timeslot-interval",{name:"timeslot-interval",eventDurationMinutes:parseInt(i.duration),exportparts:"nti, nti__header, nti__input-label, nti__dropdown, nti__dropdown-button, nti__dropdown-content"}),e.h("nylas-customize-booking-settings",{name:"customize-booking-settings",exportparts:"ncbs, ncbs__header, ncbs__settings, ncbs__settings-div, ncbs__additional_guests, ncbs__cancellation_options, ncbs__rescheduling_options"}));case"participants":return e.h("div",{key:t},e.h("nylas-additional-participants",{name:"participants",eventParticipants:i.participants,exportparts:"nap__title, nap__subtitle, nap__content, nap__input_group, nap__input_wrapper, nap__input, nap__remove-participant"}),e.h("nylas-participants-custom-availability",{name:"participant-custom-availability",participants:i.participants,exportparts:"npca, npca__header, npca__content, npca__participant-container, npca__participant-title, npca__participant-toggle--container, npca__toggle-label, npca__toggle-input, npca__toggle-slider"}));case"bookingForm":const k=Object.entries(i.additionalFields).map(([x,S])=>({key:x,...S}));return e.h("div",{key:t},e.h("nylas-booking-form-config",{name:"additional-fields",additonalFields:k}))}}const Lt='.sc-nylas-editor-tabs-h{display:block;--nylas-primary:#2563eb;--nylas-error:#cc4841;--nylas-error-pressed:#992222;--nylas-wraning:#f06c00;--nylas-success:#16a392;--nylas-info:#2b8fc2;--nylas-base-0:#ffffff;--nylas-base-25:#fcfcfd;--nylas-base-50:#f8f9fc;--nylas-base-100:#eaecf5;--nylas-base-200:#d5d9eb;--nylas-base-300:#b3b8d8;--nylas-base-400:#717bbc;--nylas-base-500:#4e5ba6;--nylas-base-600:#3e4784;--nylas-base-700:#263f72;--nylas-base-800:#293056;--nylas-base-900:#101323;--nylas-base-950:#0e101b;--nylas-border-radius:0.25rem;--nylas-border-radius-2x:0.5rem;--nylas-border-radius-3x:0.75rem;--nylas-font-family:"Inter", sans-serif}.scheduler-editor.sc-nylas-editor-tabs{display:flex;flex-direction:column}.scheduler-editor.sc-nylas-editor-tabs .form-contents.sc-nylas-editor-tabs{height:554px;display:grid;grid-template-columns:minmax(224px, 25%) 1fr}@media screen and (max-width: 768px){.scheduler-editor.sc-nylas-editor-tabs .form-contents.sc-nylas-editor-tabs{display:table-column-group;height:auto}}.scheduler-editor.sc-nylas-editor-tabs .form-contents.sc-nylas-editor-tabs .tabs.sc-nylas-editor-tabs{display:flex;flex-direction:column;border-right:1px solid var(--nylas-base-200);background-color:var(--nylas-base-25)}.scheduler-editor.sc-nylas-editor-tabs .form-contents.sc-nylas-editor-tabs .tabs.sc-nylas-editor-tabs .tab.sc-nylas-editor-tabs{display:flex;align-items:center;gap:0.5rem;padding:0.5rem 1rem;color:var(--nylas-base-900);background:var(--nylas-base-0);border:none;height:56px;font-family:var(--nylas-font-family);font-size:16px;font-weight:500;line-height:24px;cursor:pointer}.scheduler-editor.sc-nylas-editor-tabs .form-contents.sc-nylas-editor-tabs .tabs.sc-nylas-editor-tabs .tab.sc-nylas-editor-tabs:not(:first-of-type){margin-top:0.25rem}.scheduler-editor.sc-nylas-editor-tabs .form-contents.sc-nylas-editor-tabs .tabs.sc-nylas-editor-tabs .tab.active.sc-nylas-editor-tabs{font-weight:600;background:var(--nylas-base-0);color:var(--nylas-primary);border-left:4px solid var(--nylas-primary);box-shadow:0px 1px 2px 0px rgba(0, 0, 0, 0.0588235294);box-shadow:0px 1px 3px 0px rgba(0, 0, 0, 0.1019607843)}.scheduler-editor.sc-nylas-editor-tabs .form-contents.sc-nylas-editor-tabs .tabs.sc-nylas-editor-tabs .tab.hide.sc-nylas-editor-tabs{display:none}.scheduler-editor.sc-nylas-editor-tabs .form-contents.sc-nylas-editor-tabs .tab-content.sc-nylas-editor-tabs{max-width:692px;overflow-y:auto}.scheduler-editor.sc-nylas-editor-tabs .form-contents.sc-nylas-editor-tabs .tab-content.sc-nylas-editor-tabs nylas-event-info.sc-nylas-editor-tabs,.scheduler-editor.sc-nylas-editor-tabs .form-contents.sc-nylas-editor-tabs .tab-content.sc-nylas-editor-tabs nylas-event-limits.sc-nylas-editor-tabs{width:inherit}.scheduler-editor.sc-nylas-editor-tabs .form-contents.sc-nylas-editor-tabs .tab-content.sc-nylas-editor-tabs nylas-event-info.sc-nylas-editor-tabs div[slot=inputs].sc-nylas-editor-tabs,.scheduler-editor.sc-nylas-editor-tabs .form-contents.sc-nylas-editor-tabs .tab-content.sc-nylas-editor-tabs nylas-event-limits.sc-nylas-editor-tabs div[slot=inputs].sc-nylas-editor-tabs{display:flex;flex-direction:column;gap:1rem}.footer.sc-nylas-editor-tabs{display:flex;justify-content:space-between;align-items:center;gap:1rem;min-height:80px;padding:0 1rem;border-top:1px solid var(--nylas-base-200)}@media screen and (max-width: 768px){.footer.sc-nylas-editor-tabs{flex-direction:column;height:auto}}@media screen and (max-width: 768px){.footer.sc-nylas-editor-tabs .preview.sc-nylas-editor-tabs{margin-top:1rem;width:100%}}.footer.sc-nylas-editor-tabs .buttons.sc-nylas-editor-tabs{display:flex;justify-content:flex-end;align-items:center;justify-self:flex-end;gap:1rem}@media screen and (max-width: 768px){.footer.sc-nylas-editor-tabs .buttons.sc-nylas-editor-tabs{flex-direction:column-reverse;width:100%}}.footer.sc-nylas-editor-tabs .buttons.sc-nylas-editor-tabs p.sc-nylas-editor-tabs{max-width:524px}.footer.sc-nylas-editor-tabs .buttons.sc-nylas-editor-tabs p.unsaved-changes.sc-nylas-editor-tabs{color:var(--nylas-base-600)}.footer.sc-nylas-editor-tabs .buttons.sc-nylas-editor-tabs p.saved-changes.sc-nylas-editor-tabs{color:var(--nylas-success)}.footer.sc-nylas-editor-tabs .buttons.sc-nylas-editor-tabs p.error.sc-nylas-editor-tabs{color:var(--nylas-error)}.footer.sc-nylas-editor-tabs .buttons.sc-nylas-editor-tabs p.error-full-width.sc-nylas-editor-tabs{max-width:660px}@media screen and (max-width: 768px){.footer.sc-nylas-editor-tabs .buttons.sc-nylas-editor-tabs button-component.sc-nylas-editor-tabs{width:100%}}.footer.sc-nylas-editor-tabs .buttons.sc-nylas-editor-tabs button.sc-nylas-editor-tabs{background:var(--nylas-primary);color:var(--nylas-base-0);height:48px;border:none;border-radius:var(--nylas-border-radius-2x);font-size:1rem;line-height:24px;padding:0 1rem;cursor:pointer;width:148px}.footer.sc-nylas-editor-tabs .buttons.sc-nylas-editor-tabs button.sc-nylas-editor-tabs:hover{background:var(--nylas-base-600)}.footer.sc-nylas-editor-tabs .buttons.sc-nylas-editor-tabs button.sc-nylas-editor-tabs:active{background:var(--nylas-base-800)}.footer.sc-nylas-editor-tabs .buttons.sc-nylas-editor-tabs button.sc-nylas-editor-tabs:disabled{background:var(--nylas-base-300);cursor:not-allowed}.footer.sc-nylas-editor-tabs .buttons.sc-nylas-editor-tabs button.sc-nylas-editor-tabs span.sc-nylas-editor-tabs{display:flex;align-items:center;justify-content:center;gap:0.5rem}',Tt=Lt;var Ft=function(t,i,a,s){var r=arguments.length,n=r<3?i:s===null?s=Object.getOwnPropertyDescriptor(i,a):s,l;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")n=Reflect.decorate(t,i,a,s);else for(var o=t.length-1;o>=0;o--)(l=t[o])&&(n=(r<3?l(n):r>3?l(i,a,n):l(i,a))||n);return r>3&&n&&Object.defineProperty(i,a,n),n},z=function(t,i){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(t,i)};const A=class{constructor(t){e.registerInstance(this,t),this.schedulerConfigChanged=e.createEvent(this,"schedulerConfigChanged",7),this.cancelButtonClick=e.createEvent(this,"cancelButtonClick",7),this.formSubmitted=e.createEvent(this,"formSubmitted",7),this.previewButtonClicked=e.createEvent(this,"previewButtonClicked",7),this.setError=i=>{this.error=i.message},this.formSubmissionHandler=async i=>{var P,$,Z,V,J,G,q,W,K,Q,X,Y,tt,et,it,at;if(i.preventDefault(),this.formSubmitted.emit(),!this.formRef.checkValidity()){this.error=this.formRef.validationMessage||"Please fix the form errors.";return}this.isLoading=!0,this.hasUnsavedChanges=!1;const s=this.updateFormState(),{title:r,description:n,duration:l,availability:o,bookingCalendar:u,location:p,bookingType:g,buffer:C,availableDaysInFuture:k,minCancellationNotice:x,minBookingNotice:S,cancellationPolicy:B,timeslotInterval:f,additionalGuestsHidden:D,hideCancellationOptions:N,hideReschedulingOptions:O,participants:_,participantOpenHours:h,additionalFields:I,participantCalendars:v,conferencing:R,participantBookingCalendars:m}=s,c=($=(P=this.selectedConfiguration)==null?void 0:P.participants)==null?void 0:$.find(d=>d.is_organizer),w=v&&(c!=null&&c.email)?v[c==null?void 0:c.email]:[],F=((Z=c==null?void 0:c.booking)==null?void 0:Z.calendar_id)||u,H=l?parseInt(l):30,L=_&&(_==null?void 0:_.length)>0?_:[{name:(c==null?void 0:c.name)??((V=this.currentUser)==null?void 0:V.name)??"",email:(c==null?void 0:c.email)??((J=this.currentUser)==null?void 0:J.email)??"",is_organizer:!0,timezone:(o==null?void 0:o.timezone)??Intl.DateTimeFormat().resolvedOptions().timeZone,availability:{calendar_ids:w.length?w:["primary"],open_hours:[]},booking:{calendar_id:u&&u!==""?u:"primary"}}],E={...((G=this.selectedConfiguration)==null?void 0:G.id)&&{id:this.selectedConfiguration.id},version:((q=this.selectedConfiguration)==null?void 0:q.version)??"1.0.0",availability:{duration_minutes:H,interval_minutes:(f==null?void 0:f.interval)??H,round_to:f==null?void 0:f.roundTo,availability_rules:{availability_method:((Q=(K=(W=this.selectedConfiguration)==null?void 0:W.availability)==null?void 0:K.availability_rules)==null?void 0:Q.availability_method)??"collective",buffer:C||{before:0,after:0},default_open_hours:(o==null?void 0:o.openHours)??((tt=(Y=(X=this.selectedConfiguration)==null?void 0:X.availability)==null?void 0:Y.availability_rules)==null?void 0:tt.default_open_hours)??mt.DEFAULT_OPEN_HOURS,round_robin_group_id:((at=(it=(et=this.selectedConfiguration)==null?void 0:et.availability)==null?void 0:it.availability_rules)==null?void 0:at.round_robin_group_id)??""}},participants:[...L==null?void 0:L.map(d=>{var nt,st,ot,rt,lt,dt,ct,ht,bt,ut,pt,yt,ft;return d.is_organizer?{name:d.name??"",email:d.email,is_organizer:!0,timezone:((st=(nt=h==null?void 0:h[d.email])==null?void 0:nt[0])==null?void 0:st.timezone)??((lt=(rt=(ot=d.availability)==null?void 0:ot.open_hours)==null?void 0:rt[0])==null?void 0:lt.timezone)??Intl.DateTimeFormat().resolvedOptions().timeZone,availability:{calendar_ids:w.length?w:["primary"],open_hours:(h==null?void 0:h[d.email])??((dt=d.availability)==null?void 0:dt.open_hours)??[]},booking:{calendar_id:F||"primary"}}:{...d,timezone:((ht=(ct=h==null?void 0:h[d.email])==null?void 0:ct[0])==null?void 0:ht.timezone)??((pt=(ut=(bt=d.availability)==null?void 0:bt.open_hours)==null?void 0:ut[0])==null?void 0:pt.timezone)??Intl.DateTimeFormat().resolvedOptions().timeZone,availability:d.availability?{calendar_ids:(v==null?void 0:v[d.email])??((yt=d.availability)==null?void 0:yt.calendar_ids)??["primary"],open_hours:(h==null?void 0:h[d.email])??((ft=d.availability)==null?void 0:ft.open_hours)??[]}:void 0,booking:m!=null&&m[d.email]?{calendar_id:m==null?void 0:m[d.email]}:void 0}})],event_booking:{title:(r==null?void 0:r.toString())??"",description:(n==null?void 0:n.toString())??"",location:(p==null?void 0:p.toString())??"",booking_type:(g==null?void 0:g.toString())??"booking",timezone:(o==null?void 0:o.timezone)??Intl.DateTimeFormat().resolvedOptions().timeZone,conferencing:R},scheduler:{cancellation_policy:B??"",available_days_in_future:k??30,min_cancellation_notice:x??0,min_booking_notice:S??60,hide_additional_guests:D??!1,hide_cancellation_options:N??!1,hide_rescheduling_options:O??!1,additional_fields:I}},M=e.mergeDeep(E,this.selectedConfiguration),b=this.action==="create"?M:E;this.isConfigRoundRobin(b)&&(b.participants=b.participants.map(d=>({...d,is_organizer:void 0})));const y=d=>{this.isLoading=!1,this.changesSaved=!0,setTimeout(()=>{this.changesSaved=!1},5e3)};this.checkForClientSideErrors(b)||this.schedulerConfigChanged.emit({config:b,resetLoadingState:y,setError:this.setError,action:this.action})},this.isConfigRoundRobin=i=>{var a,s,r,n;return((s=(a=i.availability)==null?void 0:a.availability_rules)==null?void 0:s.availability_method)==="max-availability"||((n=(r=i.availability)==null?void 0:r.availability_rules)==null?void 0:n.availability_method)==="max-fairness"},this.checkForClientSideErrors=i=>{var n;let a=!1,s="";const r=(n=i.scheduler)==null?void 0:n.additional_fields;return r&&(s="Booking form error: ",Object.entries(r).forEach(l=>{const o=l[1];if(o.label===""){s+=`Label is required for field of type ${o.type}.`,a=!0;return}if(o.options){for(const u of o.options)if(u===""){s+=`Empty option detected inside ${o.label} of type ${o.type}.`,a=!0;break}}})),a&&(this.isLoading=!1,this.setError(new Error(s))),a},this.calendars=void 0,this.selectedConfiguration=void 0,this.currentUser=void 0,this.schedulerPreviewLink="",this.mode="app",this.hideEditorTabs=[],this.action="create",this.activeTab="eventInfo",this.isLoading=!1,this.hasUnsavedChanges=!1,this.changesSaved=!1,this.formState={},this.error=""}configChangedHandler(t){e.debug("[nylas-editor-tabs]","configChangedHandler",t,this.selectedConfiguration),this.formState={...this.getFormStateFromConfig(t)},t.id?this.action="edit":this.action="create"}userChangedHandler(t){e.debug("[nylas-editor-tabs]","userChangedHandler",t),t&&(this.formState={...this.getFormStateFromConfig(this.selectedConfiguration)})}connectedCallback(){e.debug("[nylas-editor-tabs]","connectedCallback")}componentWillLoad(){e.debug("[nylas-editor-tabs]","componentWillLoad"),this.formState=this.getFormStateFromConfig(this.selectedConfiguration)}componentDidLoad(){e.debug("[nylas-editor-tabs]","componentDidLoad")}disconnectedCallback(){e.debug("[nylas-editor-tabs]","disconnectedCallback")}handleValueChanged(t){e.debug("[nylas-editor-tabs]","handleValueChanged",t);const{name:i,value:a}=t.detail;this.setFormState(a,i),this.formState={...this.formState},this.hasUnsavedChanges=!0,this.error=""}getFormStateFromConfig(t){var a,s,r,n,l,o,u,p,g,C,k,x,S,B,f,D,N,O,_,h,I,v,R,m,c,w,F,H,L,E,M;let i=(a=t==null?void 0:t.participants)==null?void 0:a.find(b=>b.is_organizer);return!i&&((r=(s=t==null?void 0:t.availability)==null?void 0:s.availability_rules)==null?void 0:r.availability_method)!=="collective"&&(i=(n=t==null?void 0:t.participants)==null?void 0:n.find(b=>{var y;return b.email===((y=this.currentUser)==null?void 0:y.email)}),i&&(i.is_organizer=!0)),{title:((l=t==null?void 0:t.event_booking)==null?void 0:l.title)??"",description:((o=t==null?void 0:t.event_booking)==null?void 0:o.description)??"",duration:((p=(u=t==null?void 0:t.availability)==null?void 0:u.duration_minutes)==null?void 0:p.toString())??"30",availability:{timezone:((g=t==null?void 0:t.event_booking)==null?void 0:g.timezone)??Intl.DateTimeFormat().resolvedOptions().timeZone,openHours:((k=(C=t==null?void 0:t.availability)==null?void 0:C.availability_rules)==null?void 0:k.default_open_hours)??mt.DEFAULT_OPEN_HOURS},additionalFields:((x=t==null?void 0:t.scheduler)==null?void 0:x.additional_fields)??{},conferencing:((S=t==null?void 0:t.event_booking)==null?void 0:S.conferencing)??{},calendarIds:((B=i==null?void 0:i.availability)==null?void 0:B.calendar_ids)??[],participants:(t==null?void 0:t.participants)??[],bookingCalendar:((f=i==null?void 0:i.booking)==null?void 0:f.calendar_id)??(i==null?void 0:i.email)??"",location:((D=t==null?void 0:t.event_booking)==null?void 0:D.location)??"",bookingType:((N=t==null?void 0:t.event_booking)==null?void 0:N.booking_type)??"booking",buffer:((_=(O=t==null?void 0:t.availability)==null?void 0:O.availability_rules)==null?void 0:_.buffer)??{before:0,after:0},cancellationPolicy:((h=t==null?void 0:t.scheduler)==null?void 0:h.cancellation_policy)??"",availableDaysInFuture:((I=t==null?void 0:t.scheduler)==null?void 0:I.available_days_in_future)??30,minCancellationNotice:((v=t==null?void 0:t.scheduler)==null?void 0:v.min_cancellation_notice)??0,minBookingNotice:((R=t==null?void 0:t.scheduler)==null?void 0:R.min_booking_notice)??60,timeslotInterval:{interval:((m=t==null?void 0:t.availability)==null?void 0:m.interval_minutes)??((c=t==null?void 0:t.availability)==null?void 0:c.duration_minutes),roundTo:(w=t==null?void 0:t.availability)==null?void 0:w.round_to},additionalGuestsHidden:((F=t==null?void 0:t.scheduler)==null?void 0:F.hide_additional_guests)??!1,hideCancellationOptions:((H=t==null?void 0:t.scheduler)==null?void 0:H.hide_cancellation_options)??!1,hideReschedulingOptions:((L=t==null?void 0:t.scheduler)==null?void 0:L.hide_rescheduling_options)??!1,participantBookingCalendars:((E=t==null?void 0:t.participants)==null?void 0:E.reduce((b,y)=>{var T,P;return(T=y.booking)!=null&&T.calendar_id&&(b[y.email]=(P=y.booking)==null?void 0:P.calendar_id),b}))??{},participantCalendars:((M=t==null?void 0:t.participants)==null?void 0:M.reduce((b,y)=>{var T;return b[y.email]=(T=y.availability)==null?void 0:T.calendar_ids,b},{}))??{}}}setFormState(t,i){switch(i){case"title":this.formState.title=t.toString();break;case"description":this.formState.description=t.toString();break;case"duration":this.formState.duration=t.toString();break;case"availability":this.formState.availability=JSON.parse(t.toString());break;case"participants":this.formState.participants=JSON.parse(t.toString());break;case"booking-calendar":this.formState.bookingCalendar=t.toString();break;case"participant-booking-calendars":this.formState.participantBookingCalendars=JSON.parse(t.toString());break;case"location":this.formState.location=t.toString();break;case"conference":this.formState.conferencing=JSON.parse(t.toString());break;case"booking-type":this.formState.bookingType=t.toString();break;case"buffer-time":this.formState.buffer=JSON.parse(t.toString());break;case"limit-future-bookings":this.formState.availableDaysInFuture=parseInt(t.toString());break;case"min-cancellation-notice":this.formState.minCancellationNotice=parseInt(t.toString());break;case"min-booking-notice":this.formState.minBookingNotice=parseInt(t.toString());break;case"cancellation-policy":this.formState.cancellationPolicy=t.toString();break;case"timeslot-interval":this.formState.timeslotInterval=JSON.parse(t.toString());break;case"customize-booking-settings":const a=JSON.parse(t.toString());this.formState.additionalGuestsHidden=a.additionalGuestsHidden,this.formState.hideCancellationOptions=a.hideCancellationOptions,this.formState.hideReschedulingOptions=a.hideReschedulingOptions;break;case"participant-custom-availability":const s=JSON.parse(t.toString());this.formState.participantOpenHours=s;break;case"additional-fields":this.formState.additionalFields=t;break;case"connected-calendars":this.formState.participantCalendars=JSON.parse(t.toString());break}}updateFormState(){return new FormData(this.formRef).forEach((i,a)=>{this.setFormState(i,a)}),this.formState={...this.formState},this.formState}setActiveTab(t,i){t.preventDefault(),this.updateFormState(),this.activeTab=i}hideTab(t){var i;return((i=this.hideEditorTabs)==null?void 0:i.includes(t))||!1}render(){var t;return e.debug("[nylas-editor-tabs]","render",this.formState),e.h(e.Host,{key:"8910be39d85bb9f663d86272d170927489970d83"},e.h("form",{key:"51a1bc5e0d186aed0a3b24b5285a86dcfc06ff23",onSubmit:this.formSubmissionHandler,class:"scheduler-editor",ref:i=>this.formRef=i,noValidate:!0},this.mode==="app"?e.h("div",{class:"form-contents"},e.h("div",{class:"tabs"},e.h("button",{class:{tab:!0,active:this.activeTab=="eventInfo",hide:this.hideTab("eventInfo")},part:"editortab__event-info",onClick:i=>this.setActiveTab(i,"eventInfo")},e.h("calendar-info-icon",{width:"16",height:"16"}),"Event info"),e.h("button",{class:{tab:!0,active:this.activeTab=="availability",hide:this.hideTab("availability")},part:"editortab__availability",onClick:i=>this.setActiveTab(i,"availability")},e.h("calendar-patterns-icon",{width:"16",height:"16"}),"Availability"),e.h("button",{class:{tab:!0,active:this.activeTab=="participants",hide:this.hideTab("participants")},part:"editortab__participants",onClick:i=>this.setActiveTab(i,"participants")},e.h("people-icon",{width:"16",height:"16"}),"Participants"),e.h("button",{class:{tab:!0,active:this.activeTab=="bookingOptions",hide:this.hideTab("bookingOptions")},part:"editortab__booking-options",onClick:i=>this.setActiveTab(i,"bookingOptions")},e.h("flow-icon",{width:"16",height:"16"}),"Booking options"),e.h("button",{class:{tab:!0,active:this.activeTab=="bookingForm",hide:this.hideTab("bookingForm")},part:"editortab__booking-form",onClick:i=>this.setActiveTab(i,"bookingForm")},this.activeTab=="bookingForm"?e.h("calendar-agenda-fill-icon",{width:"16",height:"16"}):e.h("calendar-agenda-icon",{width:"16",height:"16"}),"Booking form")),e.h("div",{class:"tab-content"},e.h(St,{formState:this.formState,activeTab:this.activeTab,currentUser:this.currentUser,calendars:this.calendars,id:((t=this.selectedConfiguration)==null?void 0:t.id)??"new"}))):e.h("slot",null),e.h("div",{key:"ba21b8b6dd0da3d2e7770693428771da98ae12b7",class:"footer"},e.h("div",{key:"a6ba70fe5a29ebc4565c3483cfdb9451c8feb45b",class:"preview"},this.schedulerPreviewLink!==""&&this.action==="edit"&&e.h("button-component",{type:"button",disabled:this.isLoading,clickHandler:i=>{i.preventDefault(),this.previewButtonClicked.emit(this.host).defaultPrevented||window.open(e.parsePreviewLink(this.schedulerPreviewLink,this.selectedConfiguration),"_blank")},variant:"basic"},"Preview")),e.h("div",{key:"f3c639c62c31b9717bca42f67ea8d11cead03c15",class:"buttons"},e.h("p",{key:"a45a7d9c0d473b81d792547a1fe819686d7a93f3",class:{"unsaved-changes":this.hasUnsavedChanges&&!this.changesSaved,"saved-changes":this.changesSaved,error:this.error!=="","error-full-width":this.error!==""&&this.action==="create"}},this.error!==""?this.error:"",this.error==""&&this.hasUnsavedChanges&&!this.changesSaved?"Unsaved changes":this.error==""&&this.changesSaved?"Changes saved!":""),e.h("button-component",{key:"61f8b4845edc4c84fb1fa11c00c2b798b543d86c",type:"button",disabled:this.isLoading,clickHandler:i=>{i.preventDefault(),this.cancelButtonClick.emit(),this.error=""},variant:"basic"},"Back"),e.h("button-component",{key:"cc1d668a38e6823cb63c2a127d6c51688c285a35",type:"submit",disabled:this.isLoading},this.isLoading?e.h("span",null,"Saving",e.h("loading-icon",null)," "):this.action=="create"?"Create":"Save changes")))))}get host(){return e.getElement(this)}static get watchers(){return{selectedConfiguration:["configChangedHandler"],currentUser:["userChangedHandler"]}}};Ft([gt.RegisterComponent({name:"nylas-editor-tabs",stateToProps:new Map([["schedulerConfig.calendars","calendars"],["schedulerConfig.selectedConfiguration","selectedConfiguration"],["schedulerConfig.currentUser","currentUser"],["schedulerConfig.hideEditorTabs","hideEditorTabs"]]),eventToProps:{schedulerConfigChanged:async(t,i)=>{const{resetLoadingState:a,setError:s,action:r,config:n}=t.detail,l=o=>{const[u,p]=o;!u&&p&&s&&s(p),a&&a(t)};if(r==="edit"){const o=await i.schedulerConfig.updateConfiguration(n);l(o)}else{const o=await i.schedulerConfig.createConfiguration(n);l(o)}},cancelButtonClick:async(t,i)=>{i.schedulerConfigStore.state.action=null},previewButtonClicked:async(t,i)=>{e.debug("[nylas-editor-tabs]","previewButtonClicked",i)},formSubmitted:async(t,i)=>{e.debug("[nylas-editor-tabs]","formSubmitted",i)}},localPropsToProp:new Map([["schedulerPreviewLink","schedulerPreviewLink"]]),fireRegisterEvent:!0}),z("design:type",Function),z("design:paramtypes",[]),z("design:returntype",void 0)],A.prototype,"render",null);A.style=Tt;const Ht=':host{display:grid;grid-auto-flow:row;width:100%;font-family:inherit;font-optical-sizing:auto;--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}.header{display:flex;align-items:center;justify-content:space-between;margin-bottom:1rem;gap:1rem}@media screen and (max-width: 768px){.header{flex-direction:column;gap:0.5rem;align-items:unset}}.header h2{margin:0;font-size:1.25rem;color:var(--nylas-base-900);font-weight:600}.header p{margin:0;font-size:1rem;color:var(--nylas-base-700)}.header .actions{justify-self:end}@media screen and (max-width: 768px){.header .actions{width:100%}}.configurations{border:1px solid var(--nylas-base-200);border-radius:var(--nylas-border-radius-2x);background:var(--nylas-base-0);height:100%;display:flex;flex-direction:column;position:relative;overflow-y:auto}.configurations table{width:100%;border-spacing:0;border-collapse:collapse;font-family:inherit;height:max-content}.configurations table.no-configurations{height:100%}.configurations table tr{color:var(--nylas-base-800);border-bottom:1px solid var(--nylas-base-200);font-family:inherit}.configurations table tr.hide{display:none}.configurations table th{font-weight:600;text-transform:uppercase;font-size:14px;line-height:20px}.configurations table th.actions-header{text-align:right}.configurations table tr.no-configurations td>div{display:flex;height:100%;justify-content:center;align-items:center;flex-direction:column;padding:var(--nylas-border-radius-3x)}.configurations table tr.no-configurations td>div h3{margin:0 0 1rem 0;color:var(--nylas-base-700)}.configurations table tr.no-configurations td>div p{margin:0 0 1rem 0;color:var(--nylas-base-600)}.configurations table tr.no-configurations td>div calendar-icon{margin-bottom:1rem;color:var(--nylas-base-200)}.configurations table th,.configurations table td{text-align:left;padding:1rem;font-family:inherit}.configurations table .actions{text-align:right}.configurations table .actions{display:flex;justify-content:flex-end;gap:1rem}@media screen and (max-width: 768px){.configurations table .actions{flex-direction:column;gap:0.5rem}}.configurations table .title{display:flex;flex-direction:column}.configurations table .title .config-event-title{font-weight:600}.configurations table .title .config-event-description{font-size:0.75rem}.configurations .pagination{padding:1rem;position:sticky;top:100%;display:flex;justify-content:flex-end;gap:0.5rem;background:white;width:calc(100% - 2rem);z-index:2}.configurations .pagination td.arrows{display:flex;justify-content:flex-end;gap:0.5rem}.configurations .pagination button{display:flex;flex-direction:row;justify-content:center;align-items:center;height:3vh;width:3vh;min-width:3em;min-height:3em;cursor:pointer;border-radius:var(--nylas-border-radius-2x);border:1px solid var(--nylas-base-300);background-color:transparent;color:var(--nylas-base-800);cursor:pointer}.configurations .pagination button:hover:not(:disabled){border:1px solid var(--nylas-primary)}.configurations .pagination button:active{border:1px solid var(--nylas-base-800)}.configurations .pagination button:disabled{border:1px solid var(--nylas-base-100);background-color:transparent;color:var(--nylas-base-300);cursor:not-allowed}.configurations .pagination button.right{transform:rotate(180deg)}.error-container{margin-top:1.5rem}.error-container .error{color:var(--nylas-error);padding:0.5rem 0;margin:1rem 0 0}button-component#copy button{width:108px}select-dropdown{width:auto}select-dropdown::part(sd_dropdown-button){display:block;height:48px;padding:0px 16px 8px}@media screen and (max-width: 768px){select-dropdown::part(sd_dropdown-button){width:92px}}select-dropdown::part(sd_dropdown-content){width:120px;right:0}select-dropdown::part(sd_dropdown-labelhtml){display:flex;gap:0.5rem;align-items:center;color:var(--nylas-base-900)}select-dropdown::part(sd_dropdown-labelhtml):hover{color:var(--nylas-primary)}',Et=Ht;var Pt=function(t,i,a,s){var r=arguments.length,n=r<3?i:s===null?s=Object.getOwnPropertyDescriptor(i,a):s,l;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")n=Reflect.decorate(t,i,a,s);else for(var o=t.length-1;o>=0;o--)(l=t[o])&&(n=(r<3?l(n):r>3?l(i,a,n):l(i,a))||n);return r>3&&n&&Object.defineProperty(i,a,n),n},j=function(t,i){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(t,i)};const U=class{constructor(t){e.registerInstance(this,t),this.initListConfigurations=e.createEvent(this,"initListConfigurations",7),this.createButtonClick=e.createEvent(this,"createButtonClick",7),this.editButtonClick=e.createEvent(this,"editButtonClick",7),this.deleteButtonClick=e.createEvent(this,"deleteButtonClick",7),this.configurations=[],this.schedulerPreviewLink="",this.listConfigurationsNextCursor=void 0,this.state="loading",this.error="",this.currentCursor=null,this.previousCursors=[],this.disableNextPageButton=!1}listConfigurationsNextCursorChangedHandler(t,i){if(!t||t===i){t===null&&(this.disableNextPageButton=!0);return}this.disableNextPageButton=!1,this.currentCursor=t}connectedCallback(){e.debug("[nylas-list-configurations]","connectedCallback")}componentWillLoad(){e.debug("[nylas-list-configurations]","componentWillLoad"),this.configurations&&this.configurations.length>0&&(this.state="loaded")}componentDidLoad(){e.debug("[nylas-list-configurations]","componentDidLoad"),this.initListConfigurations.emit({host:this.host})}disconnectedCallback(){e.debug("[nylas-list-configurations]","disconnectedCallback")}async handleNylasFormDropdownChanged(t){e.debug("[nylas-list-configurations]","handleNylasFormDropdownChanged",t.detail);const{value:i}=t.detail,[a,s]=i.split("-");switch(t.preventDefault(),a){case"delete":this.deleteButtonClick.emit({host:this.host,configuration:this.configurations[s]});break;case"preview":window.open(e.parsePreviewLink(this.schedulerPreviewLink,this.configurations[s]),"_blank");break;case"copy":await navigator.clipboard.writeText(e.parsePreviewLink(this.schedulerPreviewLink,this.configurations[s]));break}}async getState(){return this.state}async setState(t){this.state=t}async setError(t){this.error=t}getDurationString(t){const i=Math.floor(t/60),a=t%60;return`${i||""} ${i?`${i>1?"hours":"hour"}`:""} ${a||""} ${a?`${a>1?"mins":"min"}`:""}`}getActionLabelHTML(t){const i={display:"inline-flex",alignItems:"center",gap:"0.5rem"},a={color:"var(--nylas-error)"};switch(t){case"preview":return e.h("span",{style:i},e.h("eye-icon",{width:"16",height:"16"}),"Preview");case"copy":return e.h("span",{style:i},e.h("copy-icon",{width:"16",height:"16"}),"Copy");case"delete":return e.h("span",{style:{...i,...a}},e.h("delete-icon",{width:"15",height:"17"}),"Delete");default:return""}}previousPageClickedHandler(){if(this.previousCursors.length===0)return;this.currentCursor=this.previousCursors.pop()||null;const t=this.previousCursors[this.previousCursors.length-1]||void 0;this.initListConfigurations.emit({host:this.host,cursor:t})}nextPageClickedHandler(){this.currentCursor&&(this.previousCursors=[...this.previousCursors,this.currentCursor],this.initListConfigurations.emit({host:this.host,cursor:this.currentCursor}))}render(){return e.h(e.Host,null,e.h("div",{class:"header"},e.h("div",{class:"description"},e.h("h2",null,"All scheduling pages"),e.h("p",null,"Create, edit and manage all your scheduling pages.")),this.configurations&&this.configurations.length>0&&e.h("div",{class:"actions"},e.h("button-component",{clickHandler:()=>{this.createButtonClick.emit(this.host)}},"Create new"))),e.h("div",{class:"configurations"},e.h("table",{class:{"no-configurations":this.state!=="loading"&&(!this.configurations||this.configurations.length===0)}},e.h("tr",{class:{hide:this.state==="loading"||this.configurations&&this.configurations.length===0}},e.h("th",null,"Scheduling page title"),e.h("th",null,"Duration"),e.h("th",{class:"actions-header"},"Actions")),this.state==="loading"&&e.h("tr",{class:"no-configurations"},e.h("td",{colSpan:3},e.h("div",null,e.h("h3",null,"Loading..."),e.h("p",null,"Please wait while we fetch the scheduling pages")))),this.state!=="loading"&&(!this.configurations||this.configurations.length===0)&&e.h("tr",{class:"no-configurations"},e.h("td",{colSpan:3},e.h("div",null,e.h("calendar-icon",{width:"48",height:"48"}),e.h("h3",null,"No scheduling pages found"),e.h("p",null,"Get started with creating your first scheduling page"),e.h("button-component",{clickHandler:()=>{this.createButtonClick.emit(this.host)}},"Create new")))),this.state!=="loading"&&this.configurations.map((t,i)=>e.h("tr",{key:t.id},e.h("td",null,e.h("div",{class:"title"},e.h("span",{class:"config-event-title"},t.event_booking.title),e.h("span",{class:"config-event-description"},t.event_booking.description))),e.h("td",null,e.h("div",null,this.getDurationString(t.availability.duration_minutes))),e.h("td",null,e.h("div",{class:"actions"},e.h("button-component",{variant:"basic",key:`edit-${i}`,clickHandler:a=>{a.preventDefault(),this.editButtonClick.emit({host:this.host,configuration:t})}},e.h("edit-icon",{width:"16",height:"16"}),"Edit"),e.h("select-dropdown",{name:"actions",options:[{value:`preview-${i}`,label:"Preview",labelHTML:this.getActionLabelHTML("preview")},{value:`copy-${i}`,label:"Copy link",labelHTML:this.getActionLabelHTML("copy")},{value:`delete-${i}`,label:"Delete",labelHTML:this.getActionLabelHTML("delete")}],defaultSelectedOption:{value:"",label:""},dropdownButtonText:"...",withSearch:!1,withChevron:!1,exportparts:"sd_dropdown: actions__dropdown, sd_dropdown-button: actions__dropdown-button, sd_dropdown-content: actions__dropdown-content"})))))),e.h("div",{class:"pagination"},e.h("button",{class:"arrow left",onClick:()=>this.previousPageClickedHandler(),disabled:this.previousCursors.length<=0},e.h("chevron-icon",null)),e.h("button",{class:"arrow right",onClick:()=>this.nextPageClickedHandler(),disabled:this.disableNextPageButton},e.h("chevron-icon",null)))),this.state==="error"&&e.h("div",{class:"error-container"},e.h("p",{class:"error"},this.error)))}get host(){return e.getElement(this)}static get watchers(){return{listConfigurationsNextCursor:["listConfigurationsNextCursorChangedHandler"]}}};Pt([gt.RegisterComponent({name:"nylas-list-configurations",stateToProps:new Map([["schedulerConfig.configurations","configurations"],["schedulerConfig.listConfigurationsNextCursor","listConfigurationsNextCursor"]]),localPropsToProp:new Map([["schedulerPreviewLink","schedulerPreviewLink"]]),eventToProps:{initListConfigurations:async(t,i)=>{const{host:a,cursor:s}=t.detail;await a.setState("loading");const[r,n]=await i.schedulerConfig.getConfigurations(s);if(!r&&n&&n.message){await a.setState("error"),await a.setError(n.message);return}await a.setState("loaded")},createButtonClick:async(t,i)=>{i.schedulerConfigStore.resetSelectedConfiguration(),i.schedulerConfigStore.state.action="create"},deleteButtonClick:async(t,i)=>{const{host:a,configuration:s}=t.detail,[r,n]=await i.schedulerConfig.deleteConfiguration(s.id);!r&&n&&n.message&&(await a.setState("error"),await a.setError(n.message))},editButtonClick:async(t,i)=>{const{configuration:a}=t.detail;i.schedulerConfigStore.state.selectedConfiguration=a,i.schedulerConfigStore.state.action="edit"}},fireRegisterEvent:!0}),j("design:type",Function),j("design:paramtypes",[]),j("design:returntype",void 0)],U.prototype,"render",null);U.style=Et;exports.google_logo_icon=_t;exports.microsoft_logo_icon=vt;exports.nylas_editor_tabs=A;exports.nylas_list_configurations=U;