@nylas/react 1.0.2-canary.0 → 1.0.2-canary.2

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 (124) hide show
  1. package/dist/add-circle-icon_18.entry-b66b6343.cjs +1 -0
  2. package/dist/add-circle-icon_18.entry-f86ae88d.js +1527 -0
  3. package/dist/{archive-icon_7.entry-0deb31c2.cjs → archive-icon_7.entry-052ac074.cjs} +1 -1
  4. package/dist/{archive-icon_7.entry-187a3484.js → archive-icon_7.entry-0e34d6e7.js} +17 -17
  5. package/dist/arrow-icon.entry-2afd9ea9.js +15 -0
  6. package/dist/{arrow-icon.entry-fb0ebc89.cjs → arrow-icon.entry-93f21385.cjs} +1 -1
  7. package/dist/{auth-store-764d3768-ce84fc6a.cjs → auth-store-69ac49c7-5a0bbb90.cjs} +1 -1
  8. package/dist/{auth-store-764d3768-3e9c24a0.js → auth-store-69ac49c7-cbfda055.js} +2 -2
  9. package/dist/{bold-icon_3.entry-8aebbbdb.js → bold-icon_3.entry-88ce1d25.js} +8 -8
  10. package/dist/bold-icon_3.entry-8f55a9e7.cjs +1 -0
  11. package/dist/{calendar-cancel-icon.entry-3f4d6cf2.cjs → calendar-cancel-icon.entry-574c8aa4.cjs} +1 -1
  12. package/dist/{calendar-cancel-icon.entry-305c099c.js → calendar-cancel-icon.entry-e9c692fa.js} +5 -5
  13. package/dist/{calendar-check-icon_2.entry-fa7c033a.cjs → calendar-check-icon_2.entry-b0476bca.cjs} +1 -1
  14. package/dist/{calendar-check-icon_2.entry-1bf4163c.js → calendar-check-icon_2.entry-d461c713.js} +7 -7
  15. package/dist/{calendar-icon.entry-b5678535.js → calendar-icon.entry-1ca202a4.js} +4 -4
  16. package/dist/{calendar-icon.entry-78433555.cjs → calendar-icon.entry-98936e6d.cjs} +1 -1
  17. package/dist/chevron-icon_3.entry-830f52c2.js +105 -0
  18. package/dist/chevron-icon_3.entry-f7801467.cjs +1 -0
  19. package/dist/close-icon.entry-37e8361f.js +15 -0
  20. package/dist/close-icon.entry-8d6e9816.cjs +1 -0
  21. package/dist/{constants-d93cf397-e3587f5c.cjs → constants-b6bf6671-27e2557d.cjs} +4 -4
  22. package/dist/{constants-d93cf397-dd67263d.js → constants-b6bf6671-49a0f1f2.js} +464 -442
  23. package/dist/{document-refresh-icon.entry-8791ab16.js → document-refresh-icon.entry-faea08ce.js} +2 -2
  24. package/dist/document-refresh-icon.entry-fcb33921.cjs +1 -0
  25. package/dist/elements/index.d.ts +9 -3
  26. package/dist/{forward-icon_6.entry-cb605bfc.js → forward-icon_6.entry-8da1f65d.js} +10 -10
  27. package/dist/{forward-icon_6.entry-903ccd33.cjs → forward-icon_6.entry-c4b37cb1.cjs} +2 -2
  28. package/dist/globe-icon.entry-4720304b.js +15 -0
  29. package/dist/globe-icon.entry-90a0b9c9.cjs +1 -0
  30. package/dist/{index-10914bc1-1a809477.js → index-10914bc1-346f04fa.js} +3 -3
  31. package/dist/{index-10914bc1-93ff6f46.cjs → index-10914bc1-c8c3a2f3.cjs} +1 -1
  32. package/dist/index-457dcf0b.cjs +30 -0
  33. package/dist/index-ce40ad47.js +1570 -0
  34. package/dist/info-icon_2.entry-81e95048.cjs +1 -0
  35. package/dist/info-icon_2.entry-9307db18.js +34 -0
  36. package/dist/loading-icon.entry-06d37ef0.cjs +1 -0
  37. package/dist/loading-icon.entry-dc518df4.js +15 -0
  38. package/dist/{mailbox-store-6b9425dc-a0366cf2.cjs → mailbox-store-e721b17c-4e97e07d.cjs} +1 -1
  39. package/dist/{mailbox-store-6b9425dc-c249fa99.js → mailbox-store-e721b17c-cf9a43dd.js} +2 -2
  40. package/dist/nylas-additional-participants.entry-1653dec7.js +83 -0
  41. package/dist/nylas-additional-participants.entry-ff8bf378.cjs +1 -0
  42. package/dist/nylas-booked-event-card_10.entry-06bc3c51.cjs +1 -0
  43. package/dist/nylas-booked-event-card_10.entry-aa971e8a.js +784 -0
  44. package/dist/nylas-editor-tabs.entry-49b5a3ab.cjs +1 -0
  45. package/dist/nylas-editor-tabs.entry-9d0959bf.js +181 -0
  46. package/dist/nylas-form-card.entry-69d2095b.cjs +1 -0
  47. package/dist/nylas-form-card.entry-c4e78f88.js +56 -0
  48. package/dist/{nylas-if-state_3.entry-e7b615a1.js → nylas-if-state_3.entry-2eb3f385.js} +8 -8
  49. package/dist/{nylas-if-state_3.entry-2093c593.cjs → nylas-if-state_3.entry-5baf6d6f.cjs} +1 -1
  50. package/dist/{nylas-list-folders.entry-dff7a835.cjs → nylas-list-folders.entry-3b24d92d.cjs} +1 -1
  51. package/dist/{nylas-list-folders.entry-744293ae.js → nylas-list-folders.entry-995fa819.js} +4 -4
  52. package/dist/{nylas-list-threads.entry-85ad1b74.js → nylas-list-threads.entry-21466eb3.js} +6 -6
  53. package/dist/{nylas-list-threads.entry-edb1d265.cjs → nylas-list-threads.entry-fda42ded.cjs} +1 -1
  54. package/dist/{nylas-mailbox-pagination.entry-55ef4b8c.js → nylas-mailbox-pagination.entry-02d40186.js} +3 -3
  55. package/dist/{nylas-mailbox-pagination.entry-5b888a0e.cjs → nylas-mailbox-pagination.entry-9dcd4901.cjs} +1 -1
  56. package/dist/{nylas-mailbox-toolbar-button.entry-bb42156a.cjs → nylas-mailbox-toolbar-button.entry-d1099fab.cjs} +1 -1
  57. package/dist/{nylas-mailbox-toolbar-button.entry-bdcf7d17.js → nylas-mailbox-toolbar-button.entry-dbad44b4.js} +9 -9
  58. package/dist/{nylas-provider.entry-cb1ef04e.cjs → nylas-provider.entry-78e2fa30.cjs} +1 -1
  59. package/dist/{nylas-provider.entry-1dc58829.js → nylas-provider.entry-bbee8c99.js} +8 -8
  60. package/dist/nylas-scheduler-editor.entry-550d3c59.cjs +1 -0
  61. package/dist/{nylas-scheduler-config.entry-2382ac1b.js → nylas-scheduler-editor.entry-8f7ecf3b.js} +32 -35
  62. package/dist/nylas-scheduling.entry-22b5ad07.js +236 -0
  63. package/dist/nylas-scheduling.entry-30a63738.cjs +1 -0
  64. package/dist/{nylas-threads-refresh.entry-b35f1b68.cjs → nylas-threads-refresh.entry-05258b36.cjs} +1 -1
  65. package/dist/{nylas-threads-refresh.entry-ef5d6dfd.js → nylas-threads-refresh.entry-414d8740.js} +12 -12
  66. package/dist/{nylas-threads-search.entry-e570bf8e.js → nylas-threads-search.entry-a19dc90f.js} +8 -8
  67. package/dist/{nylas-threads-search.entry-2dda7524.cjs → nylas-threads-search.entry-ff21fc65.cjs} +1 -1
  68. package/dist/{nylas-view-thread.entry-3939c913.js → nylas-view-thread.entry-38149162.js} +4 -4
  69. package/dist/{nylas-view-thread.entry-1ee0680f.cjs → nylas-view-thread.entry-5da81e99.cjs} +1 -1
  70. package/dist/{people-icon.entry-4a88822e.cjs → people-icon.entry-4b682757.cjs} +1 -1
  71. package/dist/{people-icon.entry-69465395.js → people-icon.entry-5c244c8d.js} +6 -6
  72. package/dist/play-icon_2.entry-ccdc6b9c.cjs +1 -0
  73. package/dist/play-icon_2.entry-f36d6d55.js +25 -0
  74. package/dist/react.cjs +1 -1
  75. package/dist/react.js +70 -64
  76. package/dist/{refresh-icon.entry-678f92e7.cjs → refresh-icon.entry-59fff3d4.cjs} +1 -1
  77. package/dist/{refresh-icon.entry-bd2bf7ce.js → refresh-icon.entry-63456c9a.js} +4 -4
  78. package/dist/{register-component-486ea571-cdfe1ef9.cjs → register-component-d056a880-2be11c56.cjs} +1 -1
  79. package/dist/{register-component-486ea571-1f151779.js → register-component-d056a880-f3003d6c.js} +2 -2
  80. package/dist/{scheduler-config-store-a059f30b-06c1aa21.cjs → scheduler-config-store-4d035001-0256b40c.cjs} +1 -1
  81. package/dist/{scheduler-config-store-a059f30b-ff3efc00.js → scheduler-config-store-4d035001-db9dc78a.js} +1 -1
  82. package/dist/{scheduler-store-81058220-263a5f44.js → scheduler-store-0fbe642c-14466305.js} +85 -89
  83. package/dist/scheduler-store-0fbe642c-410fdbf4.cjs +1 -0
  84. package/dist/{translate-icon.entry-0c0dbba6.cjs → translate-icon.entry-1784c18e.cjs} +1 -1
  85. package/dist/{translate-icon.entry-c1fcd2f8.js → translate-icon.entry-35999e70.js} +2 -2
  86. package/dist/{utils-df5c1963-d9833bcb.js → utils-0cd66d04-89ab163d.js} +98 -101
  87. package/dist/{utils-df5c1963-1c47e21c.cjs → utils-0cd66d04-94b9c3b6.cjs} +5 -5
  88. package/dist/{warning-icon.entry-dbd44cdb.cjs → warning-icon.entry-3a702d1d.cjs} +1 -1
  89. package/dist/warning-icon.entry-73de08c3.js +15 -0
  90. package/package.json +4 -4
  91. package/dist/add-circle-icon_13.entry-6dccb5e5.cjs +0 -1
  92. package/dist/add-circle-icon_13.entry-ab84be80.js +0 -1050
  93. package/dist/arrow-icon.entry-b782e05a.js +0 -15
  94. package/dist/bold-icon_3.entry-49e5a1d0.cjs +0 -1
  95. package/dist/chevron-icon.entry-49b0d3e7.cjs +0 -1
  96. package/dist/chevron-icon.entry-f484c9a3.js +0 -15
  97. package/dist/close-icon.entry-24d5c268.js +0 -15
  98. package/dist/close-icon.entry-37965d55.cjs +0 -1
  99. package/dist/document-refresh-icon.entry-0e8935fa.cjs +0 -1
  100. package/dist/duration-bddc4a13-05d3e3e2.cjs +0 -1
  101. package/dist/duration-bddc4a13-179ce826.js +0 -41
  102. package/dist/globe-icon_3.entry-71d83904.js +0 -109
  103. package/dist/globe-icon_3.entry-c6aefc52.cjs +0 -1
  104. package/dist/index-cee193d2.cjs +0 -30
  105. package/dist/index-e834697b.js +0 -1562
  106. package/dist/info-icon.entry-3774a4e3.js +0 -15
  107. package/dist/info-icon.entry-85bf3fbc.cjs +0 -1
  108. package/dist/loading-icon.entry-8941102c.js +0 -15
  109. package/dist/loading-icon.entry-ae6c7b74.cjs +0 -1
  110. package/dist/nylas-booked-event-card_10.entry-a166d51d.js +0 -739
  111. package/dist/nylas-booked-event-card_10.entry-b181a874.cjs +0 -1
  112. package/dist/nylas-form-card.entry-7173dd4a.js +0 -56
  113. package/dist/nylas-form-card.entry-8fdbefa6.cjs +0 -1
  114. package/dist/nylas-open-hours-picker.entry-0f4f34f6.cjs +0 -1
  115. package/dist/nylas-open-hours-picker.entry-7e7060fe.js +0 -187
  116. package/dist/nylas-scheduler-config.entry-477d2171.cjs +0 -1
  117. package/dist/nylas-scheduler-editor.entry-1a95d313.cjs +0 -1
  118. package/dist/nylas-scheduler-editor.entry-c0479087.js +0 -140
  119. package/dist/nylas-scheduler.entry-69ecc3ae.cjs +0 -1
  120. package/dist/nylas-scheduler.entry-7084c148.js +0 -231
  121. package/dist/play-icon_2.entry-bc24fda7.js +0 -25
  122. package/dist/play-icon_2.entry-bd9f650e.cjs +0 -1
  123. package/dist/scheduler-store-81058220-a20698af.cjs +0 -1
  124. package/dist/warning-icon.entry-9631cd2e.js +0 -15
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("./index-457dcf0b.cjs"),r=require("./utils-0cd66d04-94b9c3b6.cjs"),w=require("./register-component-d056a880-2be11c56.cjs"),j=require("./constants-b6bf6671-27e2557d.cjs"),Le=require("./_commonjsHelpers-57e89916-4a3ae7d8.cjs");require("react");require("react-dom");const $e=".sc-add-circle-icon-h{display:flex}",Ae=$e,ye=class{constructor(e){n.registerInstance(this,e),this.width="24",this.height="25"}render(){return n.h("svg",{key:"58ce81214aeed7ddc1ce5f76d674aba576422d48",width:this.width,height:this.height,fill:"none",xmlns:"http://www.w3.org/2000/svg"},n.h("path",{key:"2a47ed74601a5370f0300da06295a2b5969d7e5f",d:"M12 2.5c5.523 0 10 4.477 10 10s-4.477 10-10 10-10-4.477-10-10 4.477-10 10-10ZM12 4a8.5 8.5 0 1 0 0 17 8.5 8.5 0 0 0 0-17Zm0 3.5a.75.75 0 0 1 .75.75v3.5h3.5a.75.75 0 0 1 0 1.5h-3.5v3.5a.75.75 0 0 1-1.5 0v-3.5h-3.5a.75.75 0 0 1 0-1.5h3.5v-3.5A.75.75 0 0 1 12 7.5Z",fill:"currentColor"}))}};ye.style=Ae;const He=".sc-calendar-info-icon-h{display:flex}",Fe=He,ge=class{constructor(e){n.registerInstance(this,e),this.width="20",this.height="20"}render(){return n.h("svg",{key:"4c290eae1d55ec9df96cbe6d9ba85d5d8b7ee102",width:this.width,height:this.height,fill:"none",xmlns:"http://www.w3.org/2000/svg"},n.h("path",{key:"a2a76a5d0183952d59f1d2f448dc7c460694e410",d:"M12 0C13.3807 0 14.5 1.11929 14.5 2.5V6.59971C14.1832 6.43777 13.8486 6.30564 13.5 6.20703V4H1.5V11.5C1.5 12.3284 2.17157 13 3 13H6.70703C6.80564 13.3486 6.93777 13.6832 7.09971 14H3C1.61929 14 0.5 12.8807 0.5 11.5V2.5C0.5 1.11929 1.61929 0 3 0H12ZM12 1H3C2.17157 1 1.5 1.67157 1.5 2.5V3H13.5V2.5C13.5 1.67157 12.8284 1 12 1ZM11.375 9.5C11.375 9.15482 11.6548 8.875 12 8.875C12.3452 8.875 12.625 9.15482 12.625 9.5C12.625 9.84518 12.3452 10.125 12 10.125C11.6548 10.125 11.375 9.84518 11.375 9.5ZM12.5 13.5C12.5 13.7761 12.2761 14 12 14C11.7239 14 11.5 13.7761 11.5 13.5V11.5C11.5 11.2239 11.7239 11 12 11C12.2761 11 12.5 11.2239 12.5 11.5V13.5ZM7.5 11.5C7.5 9.01472 9.51472 7 12 7C14.4853 7 16.5 9.01472 16.5 11.5C16.5 13.9853 14.4853 16 12 16C9.51472 16 7.5 13.9853 7.5 11.5ZM8.5 11.5C8.5 13.433 10.067 15 12 15C13.933 15 15.5 13.433 15.5 11.5C15.5 9.567 13.933 8 12 8C10.067 8 8.5 9.567 8.5 11.5Z",fill:"currentColor"}))}};ge.style=Fe;const Me=".sc-calendar-patterns-icon-h{display:flex}",Re=Me,ve=class{constructor(e){n.registerInstance(this,e),this.width="20",this.height="20"}render(){return n.h("svg",{key:"cf8071f578ad04793f5bd5b446dccaa1f6d4c1a3",width:this.width,height:this.height,fill:"none",xmlns:"http://www.w3.org/2000/svg"},n.h("path",{key:"8e8a3c7d87bc41c6d6973a34863d05d996155c1d",d:"M3.25 0H11.75C13.2688 0 14.5 1.23122 14.5 2.75V11.25C14.5 12.7688 13.2688 14 11.75 14H3.25C1.73122 14 0.5 12.7688 0.5 11.25V2.75C0.5 1.23122 1.73122 0 3.25 0ZM2 2.75V4H13V2.75C13 2.05964 12.4404 1.5 11.75 1.5H3.25C2.55964 1.5 2 2.05964 2 2.75ZM12.2071 5L8.20711 9H10.7929L13 6.79289V5H12.2071ZM10.7929 5H8.20711L4.20711 9H6.79289L10.7929 5ZM2.79289 9L6.79289 5H4.20711L2 7.20711V9H2.79289ZM2 5.79289L2.79289 5H2V5.79289ZM12.2071 9H13V8.20711L12.2071 9Z",fill:"currentColor"}))}};ve.style=Re;const Ne=".sc-flow-icon-h{display:flex}",Be=Ne,ke=class{constructor(e){n.registerInstance(this,e),this.width="16",this.height="12"}render(){return n.h("svg",{key:"e0f4da46b751754406e8b0551890a1bffb1100e4",width:this.width,height:this.height,fill:"none",xmlns:"http://www.w3.org/2000/svg"},n.h("path",{key:"21997cb261d91c8589c3e87a01036dc8f91a8d9b",d:"M13 1.66211C11.8954 1.66211 11 2.55754 11 3.66211C11 4.76668 11.8954 5.66211 13 5.66211C14.1046 5.66211 15 4.76668 15 3.66211C15 2.55754 14.1046 1.66211 13 1.66211ZM10.0407 3.16678C10.2768 1.74563 11.5119 0.662109 13 0.662109C14.6569 0.662109 16 2.00526 16 3.66211C16 5.31896 14.6569 6.66211 13 6.66211C11.5162 6.66211 10.2839 5.58482 10.0428 4.16971C9.37629 4.23688 8.82682 4.7426 8.71466 5.41551L8.27173 8.07311C8.07929 9.22776 7.11428 10.087 5.9593 10.1574C5.72319 11.5786 4.48813 12.6621 3 12.6621C1.34315 12.6621 0 11.319 0 9.66211C0 8.00526 1.34315 6.66211 3 6.66211C4.48384 6.66211 5.71607 7.73939 5.95724 9.15451C6.62371 9.08734 7.17318 8.58162 7.28534 7.90871L7.72827 5.25111C7.92071 4.09646 8.88571 3.23718 10.0407 3.16678ZM3 7.66211C1.89543 7.66211 1 8.55754 1 9.66211C1 10.7667 1.89543 11.6621 3 11.6621C4.10457 11.6621 5 10.7667 5 9.66211C5 8.55754 4.10457 7.66211 3 7.66211Z",fill:"currentColor"}))}};ke.style=Be;const ze=".sc-location-icon-h{display:flex}",Pe=ze,xe=class{constructor(e){n.registerInstance(this,e),this.width="16",this.height="18"}render(){return n.h("svg",{key:"5b9c42e29bed565ef37d35d8196c038d0fb12a0c",width:this.width,height:this.height,fill:"none",xmlns:"http://www.w3.org/2000/svg"},n.h("path",{key:"8be7bf4ede319cce00e35be8270c85c14bcbc4b5",d:"M10 7.66211C10 9.31896 8.65685 10.6621 7 10.6621C5.34315 10.6621 4 9.31896 4 7.66211C4 6.00526 5.34315 4.66211 7 4.66211C8.65685 4.66211 10 6.00526 10 7.66211ZM9 7.66211C9 6.55754 8.10457 5.66211 7 5.66211C5.89543 5.66211 5 6.55754 5 7.66211C5 8.76668 5.89543 9.66211 7 9.66211C8.10457 9.66211 9 8.76668 9 7.66211ZM11.9497 12.6171C14.6834 9.88221 14.6834 5.44812 11.9497 2.71326C9.21608 -0.0216067 4.78392 -0.0216067 2.05025 2.71326C-0.683418 5.44812 -0.683418 9.88221 2.05025 12.6171L3.57128 14.1159L5.61408 16.101L5.74691 16.2188C6.52168 16.8468 7.65623 16.8076 8.38611 16.1012L10.8223 13.7312L11.9497 12.6171ZM2.75499 3.4183C5.09944 1.07282 8.90055 1.07282 11.245 3.4183C13.5294 5.70364 13.5879 9.3725 11.4207 11.7288L11.245 11.912L9.92371 13.216L7.69315 15.3846L7.60016 15.4642C7.24594 15.732 6.7543 15.732 6.40012 15.4642L6.30713 15.3845L3.3263 12.4791L2.75499 11.912L2.57927 11.7288C0.412077 9.3725 0.47065 5.70364 2.75499 3.4183Z",fill:"currentColor"}))}};xe.style=Pe;const je=".sc-location-off-icon-h{display:flex}",We=je,we=class{constructor(e){n.registerInstance(this,e),this.width="16",this.height="18"}render(){return n.h("svg",{key:"9f486b38064361394fa89c330d79cf275c862143",width:this.width,height:this.height,fill:"none",xmlns:"http://www.w3.org/2000/svg"},n.h("path",{key:"02ef40d3c0d44a0eb38e8018ede7d30102e5e74b",d:"M0.146447 0.808556C0.341709 0.613294 0.658291 0.613294 0.853553 0.808556L15.8536 15.8086C16.0488 16.0038 16.0488 16.3204 15.8536 16.5157C15.6583 16.7109 15.3417 16.7109 15.1464 16.5157L12.0938 13.463L11.8223 13.7312L9.38611 16.1012C8.65623 16.8076 7.52168 16.8468 6.74691 16.2188L6.61408 16.101L4.57128 14.1159L3.05025 12.6171C0.607421 10.1732 0.347525 6.37239 2.27056 3.63976L0.146447 1.51566C-0.0488155 1.3204 -0.0488155 1.00382 0.146447 0.808556ZM9.07768 10.4469C8.74346 10.576 8.38024 10.6468 8.0005 10.6468C6.34839 10.6468 5.00909 9.30689 5.00909 7.65406C5.00909 7.27461 5.07967 6.91166 5.20843 6.57763L2.98793 4.35713C1.49206 6.62038 1.68917 9.67377 3.57927 11.7288L3.75499 11.912L4.3263 12.4791L7.30713 15.3845L7.40012 15.4642C7.7543 15.732 8.24594 15.732 8.60016 15.4642L8.69315 15.3846L10.9237 13.216L11.3883 12.7575L9.07768 10.4469ZM9.85409 8.39486L10.5983 9.13904C10.8487 8.70143 10.9919 8.19447 10.9919 7.65406C10.9919 6.00122 9.65261 4.66134 8.0005 4.66134C7.45986 4.66134 6.95271 4.80482 6.51504 5.05581L7.25921 5.79998C7.48839 5.70819 7.73855 5.6577 8.0005 5.6577C9.10258 5.6577 9.99599 6.5515 9.99599 7.65406C9.99599 7.91581 9.94564 8.16581 9.85409 8.39486ZM4.35291 2.89368C6.70671 1.08827 10.0908 1.26314 12.245 3.4183C14.3986 5.57283 14.5739 8.95702 12.771 11.3118L13.4812 12.022C15.6702 9.27273 15.493 5.25762 12.9497 2.71326C10.4058 0.168159 6.39081 -0.00843871 3.64269 2.18347L4.35291 2.89368Z",fill:"currentColor"}))}};we.style=We;const Ve=':host{display:block;width:inherit;--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}.dropdown{display:inline-block;width:100%;position:relative}.dropdown .dropdown-label{display:flex;align-items:center;gap:0.25rem;color:var(--nylas-base-800)}.dropbtn{width:inherit;height:48px;color:black;padding:0.5rem;font-size:1rem;cursor:pointer;display:flex;gap:0.5rem;justify-content:space-between;align-items:center;background:transparent;border:1px solid var(--nylas-base-200);border-radius:var(--nylas-border-radius-2x)}.dropbtn.focus{background:transparent}.dropbtn:hover,.dropbtn:active{border:1px solid var(--nylas-primary)}.dropbtn:active{outline:2px solid var(--nylas-primary)}.dropbtn span.open{transform:rotate(90deg)}.dropbtn span.closed{transform:rotate(270deg)}.dropdown-content{display:block;margin-top:0.5rem;background-color:var(--nylas-base-0);width:100%;max-height:336px;overflow:auto;border:1px solid #ddd;z-index:1;border-radius:4px;position:absolute;box-shadow:0px 4px 6px -2px rgba(0, 0, 0, 0.0509803922);box-shadow:0px 10px 15px -3px rgba(0, 0, 0, 0.1019607843)}.dropdown-content ul{padding:0;list-style-type:none;color:var(--nylas-base-900);max-height:336px}.dropdown-content ul li{padding:16px, 12px, 16px, 12px;color:black;padding:12px 16px;text-decoration:none;display:block;font-family:inherit;font-size:14px;font-weight:400;line-height:20px;letter-spacing:0px;text-align:left;cursor:pointer}.dropdown-content ul li:hover,.dropdown-content ul li:focus{background-color:var(--nylas-base-100)}.dropdown-content ul li label{display:flex;align-items:center;gap:0.5rem}.dropdown-content ul li label input{margin:0}.selected-options{display:flex;flex-wrap:wrap;gap:0.5rem;padding:0.5rem 0;margin-top:0.25rem;background:var(--nylas-base-0)}.selected-options .selected-option{display:flex;align-items:center;gap:0.5rem;padding:4px 8px;border-radius:var(--nylas-border-radius-2x);background:var(--nylas-base-100);color:var(--nylas-base-800);font-size:16px;font-weight:500;line-height:1.5rem;letter-spacing:0.5px}.selected-options .selected-option button{background:transparent;border:none;cursor:pointer;padding:0}.selected-options .selected-option button:hover{color:var(--nylas-primary)}',Ze=Ve,Ce=class{constructor(e){n.registerInstance(this,e),this.selectedOptionsChanged=n.createEvent(this,"selectedOptionsChanged",7),this.name=void 0,this.label=void 0,this.options=[],this.availableOptions=this.options,this.isOpen=!1,this.ariaActivedescendant="",this.shouldFocusFirstOption=!1}componentDidRender(){r.debug("multi-select-dropdown","componentDidRender"),this.isOpen&&this.shouldFocusFirstOption&&(this.ariaActivedescendant=this.availableOptions[0].value,this.focusOption(0),this.shouldFocusFirstOption=!1)}handleOutsideClick(e){!e.composedPath().includes(this.el)&&this.isOpen&&(this.isOpen=!1)}selectOption(e){this.availableOptions=this.availableOptions.map(a=>(a.value===e.value&&(a.selected=!e.selected),a));const t=this.availableOptions.filter(a=>a.selected).map(a=>a.value);this.selectedOptionsChanged.emit({value:t,name:this.name})}toggleDropdown(){this.isOpen=!this.isOpen,this.isOpen?this.shouldFocusFirstOption=!0:this.ariaActivedescendant=""}handleSelectButtonKeyDown(e){switch(e.key){case"ArrowDown":case"Enter":e.preventDefault(),this.isOpen||this.toggleDropdown();break;case"Escape":this.isOpen=!1;break}}handleListboxKeydown(e){const t=this.availableOptions,a=t.findIndex(s=>s.value===this.ariaActivedescendant);switch(e.key){case"ArrowDown":case"Tab":if(e.shiftKey){e.preventDefault();const o=a-1>=0?a-1:t.length-1;this.ariaActivedescendant=t[o].value,this.focusOption(o)}else{e.preventDefault();const o=a+1<t.length?a+1:0;this.ariaActivedescendant=t[o].value,this.focusOption(o)}break;case"ArrowUp":e.preventDefault();const s=a-1>=0?a-1:t.length-1;this.ariaActivedescendant=t[s].value,this.focusOption(s);break;case"Enter":e.preventDefault(),this.ariaActivedescendant&&this.selectOption(t[a]);break;case"Escape":this.isOpen=!1;break}}focusOption(e){var o;const t=this.availableOptions[e];if(!t)return;const a=t.value,s=(o=this.el.shadowRoot)==null?void 0:o.getElementById(a);s&&(s.focus(),s.scrollIntoView({behavior:"smooth",block:"nearest"}))}getSelectedOptions(){return this.availableOptions.filter(e=>e.selected)}renderOption(e){return n.h("li",{key:e.value,id:e.value,role:"option",tabindex:"0","aria-selected":e.selected?"true":"false",onClick:t=>{t.stopImmediatePropagation(),this.selectOption(e)},class:{selected:!!e.selected}},n.h("label",{htmlFor:e.value},n.h("input",{"aria-hidden":"true",id:e.value,type:"checkbox",checked:e.selected}),n.h("span",null,e.label)))}render(){var e,t;return n.h(n.Host,{key:"ff71916f4c5b0904c1c88acc24092685bb1a8c56"},n.h("div",{key:"e9ff8065a2c85506b433bd5d9a58227f92486187",class:"dropdown",part:"msd_dropdown"},n.h("label",{key:"10b60608219600df241af49b91ab63d1c70394a5",class:"dropdown-label"},this.label,n.h("slot",{key:"9a9ceafb10875657f758a4f315dbe88c7184ef15",name:"label-icon","aria-hidden":"true"})),n.h("button",{key:"4d004314767768524db8ab302e602e6a28929558",part:"msd_dropdown-button",class:{dropbtn:!0,open:this.isOpen},onClick:()=>this.toggleDropdown(),"aria-haspopup":"listbox","aria-expanded":this.isOpen?"true":"false","aria-label":this.name,onKeyDown:a=>this.handleSelectButtonKeyDown(a)},n.h("slot",{key:"2556aed7a1ff5a5428d5a334d80aa408a26b836a",name:"select-icon","aria-hidden":"true"}),n.h("span",{key:"e237a06138def9e1279231715c933c0d27f7b5ea",class:"selected-option",part:"msd_dropdown-button-selected-label"},this.getSelectedOptions().length>1?`Multiple ${this.name}s selected`:((e=this.availableOptions.filter(a=>a.selected)[0])==null?void 0:e.label)??((t=this.availableOptions[0])==null?void 0:t.label)),n.h("span",{key:"0ff8048547586614e1b14dca82e271c3e3bb49c7",class:this.isOpen?"open":"closed","aria-hidden":"true"},n.h("chevron-icon",{key:"aab301fdd0e369aede69e378649d2b294b049d88",width:"16",height:"16"}))),this.isOpen?null:n.h("div",{class:"selected-options"},this.getSelectedOptions().map(a=>n.h("span",{class:"selected-option"},a.label,n.h("button",{key:a.label,onClick:()=>this.selectOption(a)},n.h("close-icon",null))))),this.isOpen?n.h("div",{class:"dropdown-content",part:"msd_dropdown-content"},n.h("ul",{tabindex:"-1",role:"listbox","aria-label":this.name,"aria-multiselectable":!0,"aria-activedescendant":this.ariaActivedescendant,onKeyDown:a=>this.handleListboxKeydown(a)},this.availableOptions.map(a=>this.renderOption(a)))):null))}get el(){return n.getElement(this)}};Ce.style=Ze;const Ue=':host{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;width:inherit}.nylas-availability-picker{width:inherit;display:flex;flex-direction:column;margin:1rem;border-radius:var(--nylas-border-radius-2x);border:1px solid var(--nylas-base-200)}.nylas-availability-picker .header{padding:1rem;border-bottom:1px solid var(--nylas-base-200)}.nylas-availability-picker .header h3{margin:0;font-size:1rem;font-weight:600;line-height:20px;color:var(--nylas-base-900);text-align:left}.nylas-availability-picker .header p{margin:0.25rem 0 0 0;font-size:0.875rem;font-weight:400;line-height:20px;color:var(--nylas-base-600);text-align:left}.nylas-availability-picker .content{padding:1rem;color:var(--nylas-base-900)}.nylas-availability-picker .content .select-timezone{display:flex;justify-content:space-between;align-items:center;border-bottom:1px solid var(--nylas-base-200);padding-bottom:1rem}.nylas-availability-picker .content .select-timezone h4{display:flex;gap:0.5rem;align-items:center;margin:0;font-size:1rem;font-weight:500;line-height:20px}.nylas-availability-picker .content .select-timezone select-dropdown{border:1px solid var(--nylas-base-200);border-radius:var(--nylas-border-radius-2x)}.nylas-availability-picker .content .availability{display:flex;flex-direction:column;gap:1rem;padding:0 0.5rem;margin:1rem 0}.nylas-availability-picker .content .availability .availability-day{display:grid;grid-template-columns:minmax(auto, 65px) 1fr minmax(auto, 40px);gap:1rem;align-items:baseline}@media screen and (max-width: 768px){.nylas-availability-picker .content .availability .availability-day{grid-template-columns:auto}}.nylas-availability-picker .content .availability .availability-day .day{display:flex;gap:0.5rem;align-items:center}.nylas-availability-picker .content .availability .availability-day .time-ranges span.unavailable{height:48px;display:flex;align-items:center}.nylas-availability-picker .content .availability .availability-day .time-ranges .time-range{display:flex;gap:1.5rem;justify-content:space-between;align-items:baseline}.nylas-availability-picker .content .availability .availability-day .time-ranges .time-range .pickers{display:flex;gap:1rem}.nylas-availability-picker .content .availability .availability-day .time-ranges .time-range .pickers span{margin-top:0.75rem}.nylas-availability-picker .content .availability .availability-day .time-ranges .time-range:not(:last-of-type){margin-bottom:1rem}.nylas-availability-picker .content .availability .availability-day .time-ranges p.error{color:var(--nylas-error)}.nylas-availability-picker .content .availability .availability-day button{border:none;background:transparent;height:40px;cursor:pointer;color:var(--nylas-base-800)}.nylas-availability-picker .content .availability .availability-day button:hover,.nylas-availability-picker .content .availability .availability-day button:active{color:var(--nylas-primary)}',Ye=Ue;var Ke=function(e,t,a,s){var o=arguments.length,i=o<3?t:s===null?s=Object.getOwnPropertyDescriptor(t,a):s,l;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(e,t,a,s);else for(var d=e.length-1;d>=0;d--)(l=e[d])&&(i=(o<3?l(i):o>3?l(t,a,i):l(t,a))||i);return o>3&&i&&Object.defineProperty(t,a,i),i},J=function(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)};const oe=class{constructor(e){n.registerInstance(this,e),this.valueChanged=n.createEvent(this,"valueChanged",7),e.$hostElement$["s-ei"]?this.internals=e.$hostElement$["s-ei"]:(this.internals=e.$hostElement$.attachInternals(),e.$hostElement$["s-ei"]=this.internals),this.openHours=void 0,this.name="availability",this.defaultTimezone=Intl.DateTimeFormat().resolvedOptions().timeZone,this.schedule={SUN:[],MON:[{start:"09:00am",end:"05:00pm"}],TUE:[{start:"09:00am",end:"05:00pm"}],WED:[{start:"09:00am",end:"05:00pm"}],THU:[{start:"09:00am",end:"05:00pm"}],FRI:[{start:"09:00am",end:"05:00pm"}],SAT:[]},this.timezone=Intl.DateTimeFormat().resolvedOptions().timeZone,this.overlapDays={}}elementNameChangedHandler(e){r.debug("nylas-calendar-picker","elementNameChangedHandler",e),this.host.setAttribute("name",e)}scheduleChanged(e,t){var a;if(e!==t){this.valueChanged.emit({value:this.scheduleToOpenHours(e,this.timezone),name:this.name});let s={};if(Object.keys(e).forEach(o=>{const i=e[o];if(i.length>0){const l=this.getOverlaps(i);l.length>0&&(s[o]=l)}}),this.overlapDays=s,typeof this.internals.setFormValue!="function")return;if(Object.keys(s).length>0){const o=(a=this.host.shadowRoot)==null?void 0:a.getElementById(Object.keys(s)[0]);o&&this.internals.setValidity({customError:!0},"Overlapping time ranges found",o)}else this.internals.setValidity({customError:!1}),this.internals.setFormValue(JSON.stringify(this.scheduleToOpenHours(e,this.timezone)))}}selectedOptionChangedHandler(e){const{name:t,value:a}=e.detail;if(t==="timezone"){if(this.timezone=a,typeof this.internals.setFormValue!="function")return;this.internals.setFormValue(JSON.stringify(this.scheduleToOpenHours(this.schedule,this.timezone)))}}connectedCallback(){r.debug("nylas-availability-picker","connectedCallback")}disconnectedCallback(){r.debug("nylas-availability-picker","disconnectedCallback")}componentWillLoad(){r.debug("nylas-availability-picker","componentWillLoad"),this.host.setAttribute("name",this.name)}componentDidLoad(){r.debug("nylas-availability-picker","componentDidLoad"),this.openHours&&this.openHours.length>0&&this.updateSchedule(this.openHours),typeof this.internals.setFormValue=="function"&&this.internals.setFormValue(JSON.stringify(this.scheduleToOpenHours(this.schedule,this.timezone)))}getOverlaps(e){let t=e.map((s,o)=>({start:r.timeToMinutes(s.start),end:r.timeToMinutes(s.end),originalIndex:o}));t.sort((s,o)=>s.start-o.start);let a=[];for(let s=1;s<t.length;s++)t[s].start<t[s-1].end&&(a.includes(t[s].originalIndex)||a.push(t[s].originalIndex),a.includes(t[s-1].originalIndex)||a.push(t[s-1].originalIndex));return a.sort((s,o)=>s-o)}addTimeRange(e){const t=this.schedule[e],a=0,s=1425;if(t.length===0)this.schedule[e]=[{start:"09:00am",end:"05:00pm"}];else{const o=t.map(l=>({start:r.timeToMinutes(l.start),end:r.timeToMinutes(l.end)})).sort((l,d)=>l.start-d.start),i=o[o.length-1].end;if(i+60<=s)this.schedule[e].push({start:r.convertTo12HourFormat(r.minutesToTime(i)),end:r.convertTo12HourFormat(r.minutesToTime(i+60))});else{let l=!1;if(o[0].start>a+60&&(this.schedule[e].push({start:r.convertTo12HourFormat(r.minutesToTime(a)),end:r.convertTo12HourFormat(r.minutesToTime(a+60))}),l=!0),!l)for(let d=0;d<o.length-1;d++){const p=o[d].end;if(o[d+1].start-p>=60){this.schedule[e].push({start:r.convertTo12HourFormat(r.minutesToTime(p)),end:r.convertTo12HourFormat(r.minutesToTime(p+60))});break}}}}this.schedule[e].sort((o,i)=>r.timeToMinutes(o.start)-r.timeToMinutes(i.start)),this.schedule={...this.schedule}}removeTimeRange(e,t){this.schedule[e].splice(t,1),this.schedule={...this.schedule}}setTime(e,t,a){const[s,o]=e.split("_"),[i,l]=s.split(":");o==="start"?this.schedule[i][l].start=a:o==="end"&&(this.schedule[i][l].end=a),this.internals.setValidity({customError:!1}),this.schedule={...this.schedule}}setFormError(e,t,a){var l;const[s,o]=e.split("_"),i=(l=this.host.shadowRoot)==null?void 0:l.getElementById(e);i&&this.internals.setValidity({customError:!0},`Invalid ${o} time`,i)}updateSchedule(e){const t={SUN:[],MON:[],TUE:[],WED:[],THU:[],FRI:[],SAT:[]};e.forEach(a=>{a.days.forEach(s=>{const o=this.getDayKey(s),i=r.convertTo12HourFormat(a.start),l=r.convertTo12HourFormat(a.end),d={start:i,end:l};let p=!1;t[o]&&(p=t[o].some(h=>h.start===d.start&&h.end===d.end)),p||(t[o]?t[o].push(d):t[o]=[d])})}),e.length===0&&(this.timezone=e[0].timezone),this.timezone=e[0].timezone,this.schedule=t}getDayKey(e){return["SUN","MON","TUE","WED","THU","FRI","SAT"][e]}scheduleToOpenHours(e,t="UTC"){const a=["SUN","MON","TUE","WED","THU","FRI","SAT"];let s=new Map;a.forEach((i,l)=>{e[i]&&e[i].forEach(d=>{const p=r.convertTo24HourFormat(d.start),h=r.convertTo24HourFormat(d.end),b=`${p}-${h}`;if(!s.has(b))s.set(b,{days:[l],start:p,end:h});else{let f=s.get(b);f&&(f.days.push(l),s.set(b,f))}})});let o=[];return s.forEach((i,l)=>{o.push({days:i.days,start:i.start,end:i.end,timezone:t})}),o}render(){const e=Object.keys(j.TIMEZONE_MAP).map(t=>({label:j.TIMEZONE_MAP[t],value:t}));return n.h(n.Host,{key:"212096aa82e4abcfb7ab34a0a0921e541c4570af"},n.h("div",{key:"83a12b281dd08f77e2a184941f47f69c29d804ba",class:"nylas-availability-picker"},n.h("div",{key:"82f32b28ac7e9e13c1aa01a0cc99bd2ea68f2400",class:"header",part:"ncp__header"},n.h("h3",{key:"c47f420a6c0226b2d3352d178f8c739978554195"},"General availability"),n.h("p",{key:"badf2c5553670dc99da06815fc418dba59772f7a"},"Set your availability for scheduling meetings.")),n.h("div",{key:"32d90f90f5c98ec4afb71286d5963e4431b65932",class:"content"},n.h("div",{key:"f29ed9e09dd1c480b1cc93f6adebf0af6d7a17f9",class:"select-timezone"},n.h("h4",{key:"82f68bd68a4c775afb5c16641ce7c42769850722",class:"sub-header"},"Select timezone",n.h("span",{key:"3f6113c3d9703096321389d4f7ac6daa259f13f5",class:"icon"},n.h("tooltip-component",{key:"c2c8212ae124d05ccc150c14a3efd1a16e027970"},n.h("info-icon",{key:"f80669ec0e2200c94351a98ce3a7ba710f154df4",slot:"tooltip-icon"}),n.h("span",{key:"25f33c0424a8bcb48b5e09a9e1297877834f9ff2",slot:"tooltip-content"},"Select your timezone for displaying availability.")))),n.h("select-dropdown",{key:"fa2b1fbb694ac302e94e8b75740a26b3ec841fdc",name:"timezone",options:e,defaultSelectedOption:e.find(t=>t.value===this.defaultTimezone)},n.h("span",{key:"a8795a7bbf57c96e54ed30a8bf53884119f5a051",slot:"select-icon"},n.h("globe-icon",{key:"f041371f0d5be498ee7c474296f97d8995bcd9e4",width:"20",height:"20"})))),n.h("div",{key:"caa143f02b423a5bee811b944246fff8746e2229",class:"availability"},Object.keys(this.schedule).map(t=>{const a=t,s=this.schedule[t];return n.h("div",{class:"availability-day"},n.h("div",{class:"day",part:"ndp__day"},n.h("input",{type:"checkbox",name:a,id:a,checked:s.length>0,onClick:()=>{s.length>0?this.schedule[a]=[]:this.schedule[a]=[{start:"09:00am",end:"05:00pm"}],this.schedule={...this.schedule}}}),n.h("label",{htmlFor:a,"aria-label":"Select day"},a)),n.h("div",{class:"time-ranges"},s.length?null:n.h("span",{class:"unavailable"},"Unavailable"),s.length>0&&s.map((o,i)=>{var p,h;const l=`${t}:${i}_start`,d=`${t}:${i}_end`;return n.h("div",{class:"time-range"},n.h("div",{class:"pickers"},n.h("nylas-time-window-picker",{id:l,hasError:(p=this.overlapDays[a])==null?void 0:p.includes(i),time:o.start,name:l,key:l,setTime:(b,f)=>this.setTime(l,b,f),setFormError:(b,f)=>this.setFormError(l,b,f)}),n.h("span",null," - "),n.h("nylas-time-window-picker",{id:d,hasError:(h=this.overlapDays[a])==null?void 0:h.includes(i),time:o.end,name:d,key:d,minimumStartTime:o.start,setTime:(b,f)=>this.setTime(d,b,f),setFormError:(b,f)=>this.setFormError(d,b,f)})),n.h("button",{onClick:()=>this.removeTimeRange(a,i)},n.h("close-icon",null)))}),n.h("p",{class:"error"},this.overlapDays[a]?"Overlapping time ranges":"")),n.h("div",null,s.length>0?n.h("button",{onClick:()=>this.addTimeRange(a)},n.h("add-circle-icon",null)):null))})))))}static get formAssociated(){return!0}get host(){return n.getElement(this)}static get watchers(){return{name:["elementNameChangedHandler"],schedule:["scheduleChanged"]}}};Ke([w.RegisterComponent({name:"nylas-availability-picker",fireRegisterEvent:!0}),J("design:type",Function),J("design:paramtypes",[]),J("design:returntype",void 0)],oe.prototype,"render",null);oe.style=Ye;const qe=':host{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;width:inherit}.nylas-booking-calendar-picker{width:inherit;display:flex;flex-direction:column;margin:1rem;border-radius:var(--nylas-border-radius-2x);border:1px solid var(--nylas-base-200)}.nylas-booking-calendar-picker .header{padding:1rem;border-bottom:1px solid var(--nylas-base-200)}.nylas-booking-calendar-picker .header h3{margin:0;font-size:1rem;font-weight:600;line-height:20px;color:var(--nylas-base-900);text-align:left}.nylas-booking-calendar-picker .header p{margin:0.25rem 0 0 0;font-size:0.875rem;font-weight:400;line-height:20px;color:var(--nylas-base-600);text-align:left}.nylas-booking-calendar-picker .nylas-booking-calendar-picker__loading{padding-bottom:1rem}.nylas-booking-calendar-picker .nylas-booking-calendar-picker__loading .label{display:flex;align-items:center;gap:0.5rem;margin:1rem 1rem 0;color:var(--nylas-base-800)}.nylas-booking-calendar-picker .nylas-booking-calendar-picker__loading .loading-button{margin:0 1rem;padding:0;width:inherit;height:48px;color:black;font-size:1rem;cursor:not-allowed;display:flex;gap:0.5rem;justify-content:space-between;align-items:center;background:transparent;border:1px solid var(--nylas-base-200);border-radius:var(--nylas-border-radius-2x)}.nylas-booking-calendar-picker .nylas-booking-calendar-picker__loading .loading-button span{padding:0 1rem}.nylas-booking-calendar-picker .nylas-booking-calendar-picker__dropdown{padding:1rem}.nylas-booking-calendar-picker .nylas-booking-calendar-picker__dropdown span.label{display:flex;align-items:center;gap:4px;color:var(--nylas-base-800)}.nylas-booking-calendar-picker .nylas-booking-calendar-picker__dropdown span.label tooltip-component{display:flex}.nylas-booking-calendar-picker .nylas-booking-calendar-picker__dropdown select-dropdown::part(sd_dropdown){width:100%}.nylas-booking-calendar-picker .nylas-booking-calendar-picker__dropdown select-dropdown::part(sd_dropdown-content){width:100%;max-width:unset}.nylas-booking-calendar-picker .nylas-booking-calendar-picker__dropdown select-dropdown::part(sd_dropdown-button){width:100%;display:flex;justify-content:space-between;align-items:center;border:1px solid var(--nylas-base-200);border-radius:var(--nylas-border-radius-2x);padding:1rem}.nylas-booking-calendar-picker .nylas-booking-calendar-picker__dropdown select-dropdown::part(sd_dropdown-button-selected-label){max-width:calc(100% - 2rem);font-family:var(--nylas-font-family);font-size:16px;line-height:24px}',Je=qe;var Ge=function(e,t,a,s){var o=arguments.length,i=o<3?t:s===null?s=Object.getOwnPropertyDescriptor(t,a):s,l;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(e,t,a,s);else for(var d=e.length-1;d>=0;d--)(l=e[d])&&(i=(o<3?l(i):o>3?l(t,a,i):l(t,a))||i);return o>3&&i&&Object.defineProperty(t,a,i),i},G=function(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)};const le=class{constructor(e){n.registerInstance(this,e),this.valueChanged=n.createEvent(this,"valueChanged",7),e.$hostElement$["s-ei"]?this.internals=e.$hostElement$["s-ei"]:(this.internals=e.$hostElement$.attachInternals(),e.$hostElement$["s-ei"]=this.internals),this.calendars=void 0,this.name="calendar",this.defaultBookingCalendar="",this.selectedCalendar=""}connectedCallback(){r.debug("nylas-booking-calendar-picker","connectedCallback")}disconnectedCallback(){r.debug("nylas-booking-calendar-picker","disconnectedCallback")}componentWillLoad(){r.debug("nylas-booking-calendar-picker","componentWillLoad"),this.host.setAttribute("name",this.name)}componentDidLoad(){r.debug("nylas-booking-calendar-picker","componentDidLoad"),typeof this.internals.setFormValue=="function"&&this.internals.setFormValue(this.defaultBookingCalendar.toString(),"booking-calendar"),this.selectedCalendar=this.defaultBookingCalendar}componentWillUpdate(){r.debug("nylas-booking-calendar-picker","componentWillUpdate")}componentDidUpdate(){r.debug("nylas-booking-calendar-picker","componentDidUpdate")}componentWillRender(){r.debug("nylas-booking-calendar-picker","componentWillRender")}componentDidRender(){r.debug("nylas-booking-calendar-picker","componentDidRender")}elementNameChangedHandler(e){r.debug("nylas-booking-calendar-picker","elementNameChangedHandler",e),this.host.setAttribute("name",e)}selectedOptionChangedHandler(e){r.debug("nylas-booking-calendar-picker","selectedOptionChangedHandler",e.detail);const t=a=>{const{value:s}=a.detail;this.selectedCalendar=s,this.internals.setFormValue(s.toString(),"booking-calendar")};this.valueChanged.emit({...e.detail,valueChanged:t})}render(){var t;const e=((t=this.calendars)==null?void 0:t.map(a=>({value:a.id,label:a.name})))??[];return n.h(n.Host,null,n.h("div",{class:"nylas-booking-calendar-picker"},n.h("div",{class:"header",part:"ncp__header"},n.h("h3",null,"Calendar booking"),n.h("p",null,"Choose calendar where you’d like the event bookings to show up.")),e.length>0?n.h("div",{class:"nylas-booking-calendar-picker__dropdown"},n.h("span",{class:"label"},"Select a calendar to book meetings on",n.h("tooltip-component",null,n.h("info-icon",{slot:"tooltip-icon"}),n.h("span",{slot:"tooltip-content"},"Check availability across one or multiple calendars. If multiple calendars are selected, you must be available across all of them to be considered available."))),n.h("select-dropdown",{name:"booking-calendar",options:e,withSearch:!1,defaultSelectedOption:e.find(a=>a.value==this.defaultBookingCalendar)??e[0]})):n.h("div",{class:"nylas-booking-calendar-picker__loading"},n.h("span",{class:"label"},"Select a calendar to book meetings on ",n.h("info-icon",null)),n.h("div",{class:"loading-button"},n.h("span",null,"Loading...")))))}static get formAssociated(){return!0}get host(){return n.getElement(this)}static get watchers(){return{name:["elementNameChangedHandler"]}}};Ge([w.RegisterComponent({name:"nylas-booking-calendar-picker",eventToProps:{valueChanged:async(e,t)=>{const{valueChanged:a}=e.detail;a&&a(e)}},fireRegisterEvent:!0}),G("design:type",Function),G("design:paramtypes",[]),G("design:returntype",void 0)],le.prototype,"render",null);le.style=Je;const Xe=':host{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;width:inherit}.nylas-buffer-time{width:inherit;display:flex;flex-direction:column;margin:1rem;border-radius:var(--nylas-border-radius-2x);border:1px solid var(--nylas-base-200);text-align:left}.nylas-buffer-time .header{padding:1rem;border-bottom:1px solid var(--nylas-base-200)}.nylas-buffer-time .header h3{margin:0;font-size:1rem;font-weight:600;line-height:20px;color:var(--nylas-base-900);text-align:left}.nylas-buffer-time .header p{margin:0.25rem 0 0 0;font-size:0.875rem;font-weight:400;line-height:20px;color:var(--nylas-base-600);text-align:left}.nylas-buffer-time .nylas-buffer-time__body{display:grid;grid-template-columns:1fr auto}.nylas-buffer-time .nylas-buffer-time__body .nylas-buffer-time__dropdown{padding:1rem;display:flex;flex-direction:column;gap:1rem;border-right:1px solid var(--nylas-base-200)}.nylas-buffer-time .nylas-buffer-time__body .nylas-buffer-time__dropdown .nylas-buffer-time__row{display:grid;grid-template-columns:auto 1fr;align-items:center;gap:1rem}.nylas-buffer-time .nylas-buffer-time__body .nylas-buffer-time__dropdown .nylas-buffer-time__row label{width:200px}.nylas-buffer-time .nylas-buffer-time__body .nylas-buffer-time__dropdown .nylas-buffer-time__row .dropdown-container{display:flex;gap:1rem;align-items:center}.nylas-buffer-time .nylas-buffer-time__body .nylas-buffer-time__preview{width:200px;padding:1rem;background:var(--nylas-base-25);border-bottom-right-radius:var(--nylas-border-radius-2x)}.nylas-buffer-time .nylas-buffer-time__body .nylas-buffer-time__preview h4{font-size:12px;line-height:24px;color:var(--nylas-base-600);font-family:var(--nylas-font-family);font-weight:500;text-align:center}.nylas-buffer-time .nylas-buffer-time__body .nylas-buffer-time__preview .preview-container .slot{background-color:transparent;border-top:1px solid var(--nylas-base-300)}.nylas-buffer-time .nylas-buffer-time__body .nylas-buffer-time__preview .preview-container .slot.active{background-color:var(--nylas-base-100)}.nylas-buffer-time .nylas-buffer-time__body .nylas-buffer-time__preview .preview-container .slot:last-of-type{border-bottom:1px solid var(--nylas-base-300)}.nylas-buffer-time .nylas-buffer-time__body .nylas-buffer-time__preview .preview-container .event-slot{background-color:var(--nylas-base-600);border-top:1px solid var(--nylas-base-300);border-bottom:1px solid var(--nylas-base-300)}.nylas-buffer-time .nylas-buffer-time__dropdown select-dropdown::part(sd_dropdown-button){width:104px;display:flex;justify-content:space-between;align-items:center;border:1px solid var(--nylas-base-200);border-radius:var(--nylas-border-radius-2x);padding:1rem}.nylas-buffer-time .nylas-buffer-time__dropdown select-dropdown::part(sd_dropdown-content){width:100%}.nylas-buffer-time .nylas-buffer-time__dropdown select-dropdown::part(sd_dropdown-button-selected-label){max-width:calc(100% - 2rem);font-family:var(--nylas-font-family);font-size:16px;line-height:24px}',Qe=Xe;var et=function(e,t,a,s){var o=arguments.length,i=o<3?t:s===null?s=Object.getOwnPropertyDescriptor(t,a):s,l;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(e,t,a,s);else for(var d=e.length-1;d>=0;d--)(l=e[d])&&(i=(o<3?l(i):o>3?l(t,a,i):l(t,a))||i);return o>3&&i&&Object.defineProperty(t,a,i),i},X=function(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)};const re=class{constructor(e){n.registerInstance(this,e),this.valueChanged=n.createEvent(this,"valueChanged",7),e.$hostElement$["s-ei"]?this.internals=e.$hostElement$["s-ei"]:(this.internals=e.$hostElement$.attachInternals(),e.$hostElement$["s-ei"]=this.internals),this.name="buffer-time",this.buffer={before:0,after:0},this.selectedBeforeBufferTime=this.buffer.before,this.selectedAfterBufferTime=this.buffer.after}connectedCallback(){r.debug("nylas-buffer-time","connectedCallback")}disconnectedCallback(){r.debug("nylas-buffer-time","disconnectedCallback")}componentWillLoad(){r.debug("nylas-buffer-time","componentWillLoad"),this.host.setAttribute("name",this.name)}componentDidLoad(){if(r.debug("nylas-buffer-time","componentDidLoad"),typeof this.internals.setFormValue=="function"){const e={before:this.selectedBeforeBufferTime,after:this.selectedAfterBufferTime};this.internals.setFormValue(JSON.stringify(e),this.name)}this.selectedAfterBufferTime=this.buffer.after,this.selectedBeforeBufferTime=this.buffer.before}componentWillUpdate(){r.debug("nylas-buffer-time","componentWillUpdate")}componentDidUpdate(){r.debug("nylas-buffer-time","componentDidUpdate")}componentWillRender(){r.debug("nylas-buffer-time","componentWillRender")}componentDidRender(){r.debug("nylas-buffer-time","componentDidRender")}elementNameChangedHandler(e){r.debug("nylas-buffer-time","elementNameChangedHandler",e),this.host.setAttribute("name",e)}selectedOptionChangedHandler(e){r.debug("nylas-buffer-time","selectedOptionChangedHandler",e.detail);const t=a=>{const{value:s,name:o}=a.detail;o==="before-buffer-time"?this.selectedBeforeBufferTime=parseInt(s):o==="after-buffer-time"&&(this.selectedAfterBufferTime=parseInt(s));const i={before:this.selectedBeforeBufferTime,after:this.selectedAfterBufferTime};this.internals.setFormValue(JSON.stringify(i),"booking-calendar")};this.valueChanged.emit({...e.detail,valueChanged:t})}renderPreview(){const s=l=>{const d=Math.floor(l/30),p=l%30/30*20;return{fullSlots:d,partialFillHeight:p}},o=()=>{const{fullSlots:l,partialFillHeight:d}=s(this.selectedBeforeBufferTime);return Array.from({length:4},(p,h)=>{const b=this.selectedBeforeBufferTime>0&&h>4-l-1,f=this.selectedBeforeBufferTime>0&&h===4-l-1&&d>0;let g={};return b&&!f?g.backgroundColor="var(--nylas-base-100)":f&&(g.background=`linear-gradient(to top, var(--nylas-base-100) ${d}px, transparent 0)`),n.h("div",{class:`slot ${b?"active":""}`,style:{height:"20px",...g}})})},i=()=>{const{fullSlots:l,partialFillHeight:d}=s(this.selectedAfterBufferTime);return Array.from({length:4},(p,h)=>{const b=this.selectedAfterBufferTime>0&&h<l,f=h===l&&d>0;let g={};return b&&!f?g.backgroundColor="var(--nylas-base-100)":f&&(g.background=`linear-gradient(to bottom, var(--nylas-base-100) ${d}px, transparent 0)`),n.h("div",{class:`slot ${b?"active":""}`,style:{height:"20px",...g}})})};return n.h("div",{class:"preview-container"},o(),n.h("div",{class:"event-slot",style:{height:"40px"}}),i())}render(){const e=Array.from({length:121},(t,a)=>({label:a.toString(),value:a}));return n.h(n.Host,null,n.h("div",{class:"nylas-buffer-time"},n.h("div",{class:"header",part:"ncp__header"},n.h("h3",null,"Buffer time"),n.h("p",null,"Add buffer time before and after the event.")),n.h("div",{class:"nylas-buffer-time__body"},n.h("div",{class:"nylas-buffer-time__dropdown"},n.h("div",{class:"nylas-buffer-time__row"},n.h("label",null,"Before the event"),n.h("div",{class:"dropdown-container"},n.h("select-dropdown",{id:"before-buffer-time",name:"before-buffer-time",options:e,defaultSelectedOption:e.find(t=>t.value==this.selectedBeforeBufferTime)??e[0]}),n.h("span",null,"mins"))),n.h("div",{class:"nylas-buffer-time__row"},n.h("label",null,"After the event"),n.h("div",{class:"dropdown-container"},n.h("select-dropdown",{id:"after-buffer-time",name:"after-buffer-time",options:e,defaultSelectedOption:e.find(t=>t.value==this.selectedAfterBufferTime)??e[0]}),n.h("span",null,"mins")))),n.h("div",{class:"nylas-buffer-time__preview"},n.h("h4",null,"PREVIEW"),this.renderPreview()))))}static get formAssociated(){return!0}get host(){return n.getElement(this)}static get watchers(){return{name:["elementNameChangedHandler"]}}};et([w.RegisterComponent({name:"nylas-buffer-time",eventToProps:{valueChanged:async(e,t)=>{const{valueChanged:a}=e.detail;a&&a(e)}},fireRegisterEvent:!0}),X("design:type",Function),X("design:paramtypes",[]),X("design:returntype",void 0)],re.prototype,"render",null);re.style=Qe;const tt=':host{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;width:inherit}.nylas-calendar-picker{width:inherit;display:flex;flex-direction:column;margin:1rem;border-radius:var(--nylas-border-radius-2x);border:1px solid var(--nylas-base-200)}.nylas-calendar-picker .header{padding:1rem;border-bottom:1px solid var(--nylas-base-200)}.nylas-calendar-picker .header h3{margin:0;font-size:1rem;font-weight:600;line-height:20px;color:var(--nylas-base-900);text-align:left}.nylas-calendar-picker .header p{margin:0.25rem 0 0 0;font-size:0.875rem;font-weight:400;line-height:20px;color:var(--nylas-base-600);text-align:left}.nylas-calendar-picker .nylas-calendar-picker__loading{padding-bottom:1rem}.nylas-calendar-picker .nylas-calendar-picker__loading .label{display:flex;align-items:center;gap:0.5rem;margin:1rem 1rem 0;color:var(--nylas-base-800)}.nylas-calendar-picker .nylas-calendar-picker__loading .label tooltip-component{display:flex}.nylas-calendar-picker .nylas-calendar-picker__loading .loading-button{margin:0 1rem;padding:0;width:inherit;height:48px;color:black;font-size:1rem;cursor:not-allowed;display:flex;gap:0.5rem;justify-content:space-between;align-items:center;background:transparent;border:1px solid var(--nylas-base-200);border-radius:var(--nylas-border-radius-2x)}.nylas-calendar-picker .nylas-calendar-picker__loading .loading-button span{padding:0 1rem}.nylas-calendar-picker .nylas-calendar-picker__dropdown{padding:1rem}.nylas-calendar-picker .nylas-calendar-picker__dropdown multi-select-dropdown::part(msd_dropdown){width:100%}.nylas-calendar-picker .nylas-calendar-picker__dropdown multi-select-dropdown::part(msd_dropdown-button){width:100%;display:flex;justify-content:space-between;align-items:center;border:1px solid var(--nylas-base-200);border-radius:var(--nylas-border-radius-2x);padding:1rem}.nylas-calendar-picker .nylas-calendar-picker__dropdown multi-select-dropdown::part(msd_dropdown-content){width:100%;max-width:unset}.nylas-calendar-picker .nylas-calendar-picker__dropdown multi-select-dropdown::part(msd_dropdown-button-selected-label){max-width:calc(100% - 2rem);font-family:var(--nylas-font-family);font-size:16px;line-height:24px}',nt=tt;var at=function(e,t,a,s){var o=arguments.length,i=o<3?t:s===null?s=Object.getOwnPropertyDescriptor(t,a):s,l;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(e,t,a,s);else for(var d=e.length-1;d>=0;d--)(l=e[d])&&(i=(o<3?l(i):o>3?l(t,a,i):l(t,a))||i);return o>3&&i&&Object.defineProperty(t,a,i),i},Q=function(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)};const de=class{constructor(e){n.registerInstance(this,e),this.valueChanged=n.createEvent(this,"valueChanged",7),e.$hostElement$["s-ei"]?this.internals=e.$hostElement$["s-ei"]:(this.internals=e.$hostElement$.attachInternals(),e.$hostElement$["s-ei"]=this.internals),this.calendars=void 0,this.organizerEmail=void 0,this.name="calendar",this.defaultSelectedCalendars=[],this.selectedCalendars=[]}connectedCallback(){r.debug("nylas-calendar-picker","connectedCallback")}disconnectedCallback(){r.debug("nylas-calendar-picker","disconnectedCallback")}componentWillLoad(){r.debug("nylas-calendar-picker","componentWillLoad"),this.host.setAttribute("name",this.name)}componentDidLoad(){r.debug("nylas-calendar-picker","componentDidLoad"),typeof this.internals.setFormValue=="function"&&this.internals.setFormValue(this.defaultSelectedCalendars.toString(),"calendar")}componentWillUpdate(){r.debug("nylas-calendar-picker","componentWillUpdate")}componentDidUpdate(){r.debug("nylas-calendar-picker","componentDidUpdate")}componentWillRender(){r.debug("nylas-calendar-picker","componentWillRender")}componentDidRender(){r.debug("nylas-calendar-picker","componentDidRender")}elementNameChangedHandler(e){r.debug("nylas-calendar-picker","elementNameChangedHandler",e),this.host.setAttribute("name",e)}selectedOptionsChangedHandler(e){r.debug("nylas-calendar-picker","selectedOptionChangedHandler",e.detail);const t=a=>{const{value:s}=a.detail;this.selectedCalendars=[...s],this.internals.setFormValue(s.toString(),"calendar")};this.valueChanged.emit({...e.detail,name:this.name,valueChangedHandler:t})}render(){var t;const e=((t=this.calendars)==null?void 0:t.map(a=>{var s,o;return{value:a.id,label:a.name,selected:((s=this.defaultSelectedCalendars)==null?void 0:s.includes(a.id))||((o=this.defaultSelectedCalendars)==null?void 0:o.includes("primary"))&&a.id===this.organizerEmail}}))??[];return n.h(n.Host,null,n.h("div",{class:"nylas-calendar-picker"},n.h("div",{class:"header",part:"ncp__header"},n.h("h3",null,"Calendar availability"),n.h("p",null,"Select calendars that you’d like to use for checking your availability.")),e.length>0?n.h("div",{class:"nylas-calendar-picker__dropdown"},n.h("multi-select-dropdown",{name:"calendar",label:"Select calendars that will be checked for availability",options:e},n.h("span",{slot:"label-icon"},n.h("tooltip-component",null,n.h("info-icon",{slot:"tooltip-icon"}),n.h("span",{slot:"tooltip-content"},"Check availability across one or multiple calendars. If multiple calendars are selected, you must be available across all of them to be considered available. The default is your primary calendar if none are selected."))))):n.h("div",{class:"nylas-calendar-picker__loading"},n.h("span",{class:"label"},"Select calendars that will be checked for availability ",n.h("info-icon",null)),n.h("div",{class:"loading-button"},n.h("span",null,"Loading...")))))}static get formAssociated(){return!0}get host(){return n.getElement(this)}static get watchers(){return{name:["elementNameChangedHandler"]}}};at([w.RegisterComponent({name:"nylas-calendar-picker",eventToProps:{valueChanged:async(e,t)=>{const{valueChangedHandler:a}=e.detail;a&&a(e)}},fireRegisterEvent:!0}),Q("design:type",Function),Q("design:paramtypes",[]),Q("design:returntype",void 0)],de.prototype,"render",null);de.style=nt;const it=':host{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;width:inherit}.nylas-custom-booking-flow{width:inherit;display:flex;flex-direction:column;margin:1rem;border-radius:var(--nylas-border-radius-2x);border:1px solid var(--nylas-base-200)}.nylas-custom-booking-flow .header{padding:1rem;border-bottom:1px solid var(--nylas-base-200)}.nylas-custom-booking-flow .header h3{margin:0;font-size:1rem;font-weight:600;line-height:20px;color:var(--nylas-base-900);text-align:left}.nylas-custom-booking-flow .header p{margin:0.25rem 0 0 0;font-size:0.875rem;font-weight:400;line-height:20px;color:var(--nylas-base-600);text-align:left}.nylas-custom-booking-flow .nylas-custom-booking-flow__loading{padding-bottom:1rem}.nylas-custom-booking-flow .nylas-custom-booking-flow__loading .label{display:flex;align-items:center;gap:0.5rem;margin:1rem 1rem 0;color:var(--nylas-base-800)}.nylas-custom-booking-flow .nylas-custom-booking-flow__loading .loading-button{margin:0 1rem;padding:0;width:inherit;height:48px;color:black;font-size:1rem;cursor:not-allowed;display:flex;gap:0.5rem;justify-content:space-between;align-items:center;background:transparent;border:1px solid var(--nylas-base-200);border-radius:var(--nylas-border-radius-2x)}.nylas-custom-booking-flow .nylas-custom-booking-flow__loading .loading-button span{padding:0 1rem}.nylas-custom-booking-flow .nylas-custom-booking-flow__dropdown{padding:1rem}.nylas-custom-booking-flow .nylas-custom-booking-flow__dropdown span.label{display:flex;align-items:center;gap:4px;color:var(--nylas-base-800)}.nylas-custom-booking-flow .nylas-custom-booking-flow__dropdown span.label tooltip-component{display:flex}.nylas-custom-booking-flow .nylas-custom-booking-flow__dropdown select-dropdown::part(sd_dropdown){width:100%}.nylas-custom-booking-flow .nylas-custom-booking-flow__dropdown select-dropdown::part(sd_dropdown-button){width:100%;display:flex;justify-content:space-between;align-items:center;border:1px solid var(--nylas-base-200);border-radius:var(--nylas-border-radius-2x);padding:1rem}.nylas-custom-booking-flow .nylas-custom-booking-flow__dropdown select-dropdown::part(sd_dropdown-content){width:100%;max-width:unset}.nylas-custom-booking-flow .nylas-custom-booking-flow__dropdown select-dropdown::part(sd_dropdown-button-selected-label){max-width:calc(100% - 2rem);font-family:var(--nylas-font-family);font-size:16px;line-height:24px}',st=it;var ot=function(e,t,a,s){var o=arguments.length,i=o<3?t:s===null?s=Object.getOwnPropertyDescriptor(t,a):s,l;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(e,t,a,s);else for(var d=e.length-1;d>=0;d--)(l=e[d])&&(i=(o<3?l(i):o>3?l(t,a,i):l(t,a))||i);return o>3&&i&&Object.defineProperty(t,a,i),i},ee=function(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)};const ce=class{constructor(e){n.registerInstance(this,e),this.valueChanged=n.createEvent(this,"valueChanged",7),e.$hostElement$["s-ei"]?this.internals=e.$hostElement$["s-ei"]:(this.internals=e.$hostElement$.attachInternals(),e.$hostElement$["s-ei"]=this.internals),this.name="booking-type",this.bookingType="",this.selectedBookingType=""}connectedCallback(){r.debug("nylas-custom-booking-flow","connectedCallback")}disconnectedCallback(){r.debug("nylas-custom-booking-flow","disconnectedCallback")}componentWillLoad(){r.debug("nylas-custom-booking-flow","componentWillLoad"),this.host.setAttribute("name",this.name)}componentDidLoad(){r.debug("nylas-custom-booking-flow","componentDidLoad"),typeof this.internals.setFormValue=="function"&&this.internals.setFormValue(this.bookingType.toString(),"booking-calendar"),this.selectedBookingType=this.bookingType}componentWillUpdate(){r.debug("nylas-custom-booking-flow","componentWillUpdate")}componentDidUpdate(){r.debug("nylas-custom-booking-flow","componentDidUpdate")}componentWillRender(){r.debug("nylas-custom-booking-flow","componentWillRender")}componentDidRender(){r.debug("nylas-custom-booking-flow","componentDidRender")}elementNameChangedHandler(e){r.debug("nylas-custom-booking-flow","elementNameChangedHandler",e),this.host.setAttribute("name",e)}selectedOptionChangedHandler(e){r.debug("nylas-custom-booking-flow","selectedOptionChangedHandler",e.detail);const t=a=>{const{value:s}=a.detail;this.selectedBookingType=s,this.internals.setFormValue(s.toString(),"booking-calendar")};this.valueChanged.emit({...e.detail,valueChanged:t})}render(){const e=[{label:"Automatically accept bookings",value:"booking"},{label:"Manually confirm/decline bookings",value:"pre-booking"}];return n.h(n.Host,{key:"8caff7b115db52f355185615eab1e5c0c3fe32db"},n.h("div",{key:"9c43d51b15ceefa958560b8fbb0a684f77e58eb0",class:"nylas-custom-booking-flow"},n.h("div",{key:"2d25054eef5b8208ad0e1b9ac165e023061cb85c",class:"header",part:"ncp__header"},n.h("h3",{key:"63f570c5f8e6423123eaec621dacda10be0a33e6"},"Customize booking flow"),n.h("p",{key:"cf6b5cb225510a9bb6ba9cee1fa850caa331c9ea"},"Customize how new bookings are handled when a booking is completed.")),e.length>0?n.h("div",{class:"nylas-custom-booking-flow__dropdown"},n.h("span",{class:"label"},"After a booking is confirmed",n.h("tooltip-component",null,n.h("info-icon",{slot:"tooltip-icon"}),n.h("span",{slot:"tooltip-content"},"Choose how you’d like to handle new bookings. If you choose to manually confirm/decline bookings, you will be able to review and accept or decline each booking request."))),n.h("select-dropdown",{name:"booking-type",options:e,withSearch:!1,defaultSelectedOption:e.find(t=>t.value==this.bookingType)??e[0]})):n.h("div",{class:"nylas-custom-booking-flow__loading"},n.h("span",{class:"label"},"Select a calendar to book meetings on ",n.h("info-icon",null)),n.h("div",{class:"loading-button"},n.h("span",null,"Loading...")))))}static get formAssociated(){return!0}get host(){return n.getElement(this)}static get watchers(){return{name:["elementNameChangedHandler"]}}};ot([w.RegisterComponent({name:"nylas-custom-booking-flow",eventToProps:{valueChanged:async(e,t)=>{const{valueChanged:a}=e.detail;a&&a(e)}},fireRegisterEvent:!0}),ee("design:type",Function),ee("design:paramtypes",[]),ee("design:returntype",void 0)],ce.prototype,"render",null);ce.style=st;const lt=':host{--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}.nylas-event-description{display:flex;flex-direction:column;gap:4px}.nylas-event-description label{display:flex;align-items:center;color:var(--nylas-base-800);font-size:14px;font-style:normal;font-weight:400;line-height:150%;}.nylas-event-description label span.label-icon{margin-left:4px}.nylas-event-description label span.label-icon tooltip-component{display:flex}.nylas-event-description textarea{padding:12px 16px;border-width:1;resize:vertical;border-radius:8px;font-family:var(--nylas-font-family);font-size:16px;line-height:24px;border:1px solid var(--nylas-base-200)}.nylas-event-description textarea::-webkit-resizer{display:none}',rt=lt;var dt=function(e,t,a,s){var o=arguments.length,i=o<3?t:s===null?s=Object.getOwnPropertyDescriptor(t,a):s,l;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(e,t,a,s);else for(var d=e.length-1;d>=0;d--)(l=e[d])&&(i=(o<3?l(i):o>3?l(t,a,i):l(t,a))||i);return o>3&&i&&Object.defineProperty(t,a,i),i},te=function(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)};const he=class{constructor(e){n.registerInstance(this,e),this.valueChanged=n.createEvent(this,"valueChanged",7),e.$hostElement$["s-ei"]?this.internals=e.$hostElement$["s-ei"]:(this.internals=e.$hostElement$.attachInternals(),e.$hostElement$["s-ei"]=this.internals),this.eventDescription=void 0,this.description=this.eventDescription??"",this.name="description"}elementNameChangedHandler(e){r.debug("nylas-event-description","elementNameChangedHandler",e),this.host.setAttribute("name",e)}connectedCallback(){r.debug("nylas-event-description","connectedCallback")}componentWillLoad(){r.debug("nylas-event-description","componentWillLoad"),this.host.setAttribute("name",this.name)}componentDidLoad(){r.debug("nylas-event-description","componentDidLoad")}disconnectedCallback(){r.debug("nylas-event-description","disconnectedCallback")}handleChange(e){this.description=e.target.value,this.internals.setFormValue(e.target.value,"description"),this.valueChanged.emit({value:e.target.value,name:this.name})}render(){return n.h(n.Host,{key:"d9ddc56b47dc13868d46d5ecccaf573125d9d930"},n.h("div",{key:"e266bc83de28714a40934cd97d3d7faa9b579612",class:"nylas-event-description"},n.h("label",{key:"15dea6c63596093c5dbc2f1abb8c414af6a7d059",htmlFor:"description"},"Event description",n.h("span",{key:"615987a7b3b7595fed47462d9337f3731449586d",class:"label-icon"},n.h("tooltip-component",{key:"ea67b662376df9d50b6dd51892ae5ed241e0c911"},n.h("info-icon",{key:"2e6dafef89f8d1575c583b7bcb7da7486687439b",slot:"tooltip-icon"}),n.h("span",{key:"b435c40a6abfef7114f04f752e97a20eade17ae5",slot:"tooltip-content"},"Provide any additional details for your event.")))),n.h("textarea",{key:"35d614a13f24213668c504ee427956e81d18185d",id:"description",name:"description",value:this.description,maxlength:"8192",onInput:e=>this.handleChange(e)})))}static get formAssociated(){return!0}get host(){return n.getElement(this)}static get watchers(){return{name:["elementNameChangedHandler"]}}};dt([w.RegisterComponent({name:"nylas-event-description",eventToProps:{},fireRegisterEvent:!0}),te("design:type",Function),te("design:paramtypes",[]),te("design:returntype",void 0)],he.prototype,"render",null);he.style=rt;const ct=':host{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}.nylas-event-duration{display:flex;flex-direction:column;gap:4px}.nylas-event-duration label{display:flex;align-items:center;color:var(--nylas-base-800);font-size:14px;font-style:normal;font-weight:400;line-height:150%;}.nylas-event-duration label span.required{color:var(--nylas-error, #cc4841)}.nylas-event-duration label span.label-icon{margin-left:4px}.nylas-event-duration label span.label-icon tooltip-component{display:flex}.nylas-event-duration__wrapper{display:flex;align-items:center;gap:0.5rem}.nylas-event-duration__wrapper input{padding:12px 16px;border-width:1;border-radius:8px;border:1px solid var(--nylas-base-200);font-family:var(--nylas-font-family);font-size:16px;line-height:24px;width:48px}.nylas-event-duration__wrapper select-dropdown::part(sd_dropdown-button){border:1px solid var(--nylas-base-200);border-radius:var(--nylas-border-radius-2x);padding:12px 16px}.nylas-event-duration__wrapper select-dropdown::part(sd_dropdown-button-selected-label){font-family:var(--nylas-font-family);font-size:16px;line-height:24px}',ht=ct;var ft=function(e,t,a,s){var o=arguments.length,i=o<3?t:s===null?s=Object.getOwnPropertyDescriptor(t,a):s,l;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(e,t,a,s);else for(var d=e.length-1;d>=0;d--)(l=e[d])&&(i=(o<3?l(i):o>3?l(t,a,i):l(t,a))||i);return o>3&&i&&Object.defineProperty(t,a,i),i},ne=function(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)};const fe=class{constructor(e){n.registerInstance(this,e),this.valueChanged=n.createEvent(this,"valueChanged",7),e.$hostElement$["s-ei"]?this.internals=e.$hostElement$["s-ei"]:(this.internals=e.$hostElement$.attachInternals(),e.$hostElement$["s-ei"]=this.internals),this.name="duration",this.eventDurationMinutes=void 0,this.duration=this.eventDurationMinutes?this.eventDurationMinutes>=60?this.eventDurationMinutes/60:this.eventDurationMinutes:5,this.durationMinutes=this.eventDurationMinutes??5,this.durationIncrement=this.eventDurationMinutes&&this.eventDurationMinutes>=60?60:1}elementNameChangedHandler(e){r.debug("nylas-event-duration","elementNameChangedHandler",e),this.host.setAttribute("name",e)}durationMinutesChangedHandler(e,t){r.debug("nylas-event-duration","durationMinutesChangedHandler",e),e!==t&&this.valueChanged.emit({value:e.toString(),name:this.name})}connectedCallback(){r.debug("nylas-event-duration","connectedCallback")}componentWillLoad(){r.debug("nylas-event-duration","componentWillLoad"),this.host.setAttribute("name",this.name)}componentDidLoad(){r.debug("nylas-event-duration","componentDidLoad"),this.internals.setFormValue(this.durationMinutes.toString(),"duration")}disconnectedCallback(){r.debug("nylas-event-duration","disconnectedCallback")}handleChange(e){this.duration=e.target.value,this.durationMinutes=this.duration*this.durationIncrement,this.internals.setFormValue(this.durationMinutes.toString(),"duration")}handleBlur(){(this.duration===null||this.duration===void 0)&&this.durationIncrement===1&&(this.duration=5),(this.duration<=0||this.duration===null||this.duration===void 0)&&this.durationIncrement===60&&(this.duration=1),this.duration<5&&this.durationIncrement===1&&(this.duration=5),this.duration>720&&this.durationIncrement===1&&(this.duration=720),this.duration>12&&this.durationIncrement===60&&(this.duration=12),this.durationMinutes=this.duration*this.durationIncrement,this.internals.setFormValue(this.durationMinutes.toString(),"duration")}selectedOptionChangedHandler(e){r.debug("nylas-calendar-picker","selectedOptionChangedHandler",e.detail);const{value:t}=e.detail;this.durationIncrement=parseInt(t),this.durationIncrement===1?this.duration=5:this.duration=1,this.durationMinutes=this.duration*this.durationIncrement,this.internals.setFormValue(this.durationMinutes.toString(),"duration")}render(){const e=[{value:1,label:"minutes"},{value:60,label:"hours"}];return n.h(n.Host,{key:"75a6d393097f97adeee60d72fb29054876965598"},n.h("div",{key:"e9f8bb8666505fde3ed1979cca7288c3eef13e20",class:"nylas-event-duration"},n.h("label",{key:"37701c923fff3654317cfcc36e2300f20d4c4925",htmlFor:"duration"},"Event duration",n.h("span",{key:"7f39f7f4fb8ffdc0fd7900edee0ac3ec330a88b0",class:"required"},"*"),n.h("span",{key:"410df0fe6b679346d2347e2df08aa17a29b21b98",class:"label-icon"},n.h("tooltip-component",{key:"42883303ef733e39e110568d556c3d9f943a8292"},n.h("info-icon",{key:"feda0379b69dbe55563959d5f7bc10b8230c2ad9",slot:"tooltip-icon"}),n.h("span",{key:"44f88a269e336398bb5c48dca1e529aac07a5ddb",slot:"tooltip-content"},"Set the duration of your event.")))),n.h("div",{key:"84b6c6aa9b431ef3e300e26b8ea81b49e975a003",class:"nylas-event-duration__wrapper"},n.h("input",{key:"599e0d424d7366cce3723fe9d30c45d52ec75958",type:"number",id:"duration",name:"duration",value:this.duration,onBlur:()=>this.handleBlur(),onInput:t=>this.handleChange(t),min:5}),n.h("select-dropdown",{key:"f699922c7ac3854c22356bfaefced2834fc0ca7b",name:"event-duration",options:e,defaultSelectedOption:e.find(t=>t.value==this.durationIncrement)??e[0],withSearch:!1}))))}static get formAssociated(){return!0}get host(){return n.getElement(this)}static get watchers(){return{name:["elementNameChangedHandler"],durationMinutes:["durationMinutesChangedHandler"]}}};ft([w.RegisterComponent({name:"nylas-event-duration",eventToProps:{},fireRegisterEvent:!0}),ne("design:type",Function),ne("design:paramtypes",[]),ne("design:returntype",void 0)],fe.prototype,"render",null);fe.style=ht;const pt=':host{display:block;margin:1rem;--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}.nylas-event-info__title{color:var(--nylas-base-nylas-base-900-aaa, #101323);font-size:16px;font-style:normal;font-weight:600;line-height:20px;margin:0;text-align:left}.nylas-event-info__subtitle{color:var(--nylas-base-nylas-base-600-aaa, #3e4784);font-size:14px;font-style:normal;font-weight:400;line-height:20px;margin:0.25rem 0px 0px;text-align:left}.nylas-event-info__content{padding:1rem;display:flex;flex-direction:column;gap:1rem}.nylas-event-info__block{display:flex;justify-content:space-between;gap:0.5rem}',ut=pt;var bt=function(e,t,a,s){var o=arguments.length,i=o<3?t:s===null?s=Object.getOwnPropertyDescriptor(t,a):s,l;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(e,t,a,s);else for(var d=e.length-1;d>=0;d--)(l=e[d])&&(i=(o<3?l(i):o>3?l(t,a,i):l(t,a))||i);return o>3&&i&&Object.defineProperty(t,a,i),i},ae=function(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)};const pe=class{constructor(e){n.registerInstance(this,e),e.$hostElement$["s-ei"]?this.internals=e.$hostElement$["s-ei"]:(this.internals=e.$hostElement$.attachInternals(),e.$hostElement$["s-ei"]=this.internals)}connectedCallback(){r.debug("nylas-event-info","connectedCallback")}componentWillLoad(){r.debug("nylas-event-info","componentWillLoad")}componentDidLoad(){r.debug("nylas-event-info","componentDidLoad")}disconnectedCallback(){r.debug("nylas-event-info","disconnectedCallback")}render(){return n.h(n.Host,{key:"0bb711d5c047feb6eabe91f0067fa12080ff1e05"},n.h("nylas-form-card",{key:"c01cb8fc177acda4a20b0327f3567cd98ff4d1c1"},n.h("h1",{key:"b6bb50950769c270a06b6af0e3af527cac3202d4",slot:"header-title",class:"nylas-event-info__title"},"Event information"),n.h("h3",{key:"e02f8407c1737626118e4bf85c81ae9cfbf11167",slot:"header-subtitle",class:"nylas-event-info__subtitle"},"Enter all event information."),n.h("div",{key:"a2e3467a533b29de82a30ee540f1cd7249cefaf4",slot:"content",class:"nylas-event-info__content"},n.h("slot",{key:"90659526ed86eba38a7d1974bd14e16994fb61dd",name:"inputs"}))))}static get formAssociated(){return!0}};bt([w.RegisterComponent({name:"nylas-event-info",eventToProps:{},fireRegisterEvent:!0}),ae("design:type",Function),ae("design:paramtypes",[]),ae("design:returntype",void 0)],pe.prototype,"render",null);pe.style=ut;const mt=':host{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}.nylas-event-title{display:flex;flex-direction:column;gap:4px;position:relative;text-align:left}.nylas-event-title div.title{padding:12px 16px;border:1px solid var(--nylas-base-200);border-radius:var(--nylas-border-radius-2x);overflow:scroll;white-space:nowrap;scrollbar-width:thin}.nylas-event-title div.title::-webkit-scrollbar{width:6px;height:6px}.nylas-event-title input{padding:12px 16px;border-width:1;border-radius:8px;border:1px solid var(--nylas-base-200)}.nylas-event-title span.help-text{color:var(--nylas-base-800);font-size:14px;font-style:normal;font-weight:400;line-height:21px}.nylas-event-title label{display:flex;align-items:center;color:var(--nylas-base-800);font-size:14px;font-style:normal;font-weight:400;line-height:150%;}.nylas-event-title label span.required{color:var(--nylas-error, #cc4841)}.nylas-event-title label span.label-icon{margin-left:4px}.nylas-event-title label span.label-icon tooltip-component{display:flex}.highlighted-tag{background-color:var(--nylas-base-200);border-radius:var(--nylas-border-radius);padding:5px;margin-left:4px}.token-options{display:block;background-color:var(--nylas-base-0);width:100%;max-height:336px;overflow:auto;z-index:1;border-radius:4px;position:absolute;top:80px;box-shadow:0px 4px 6px -2px rgba(0, 0, 0, 0.0509803922);box-shadow:0px 10px 15px -3px rgba(0, 0, 0, 0.1019607843)}@media screen and (max-width: 768px){.token-options{right:0;width:325px;max-width:unset}}.token-options ul{padding:0;list-style-type:none;color:var(--nylas-base-900);max-height:336px;margin:0}.token-options ul li{padding:16px, 12px, 16px, 12px;color:black;padding:12px 16px;text-decoration:none;display:block;font-family:inherit;font-size:14px;font-weight:400;line-height:20px;letter-spacing:0px;text-align:left;cursor:pointer}.token-options ul li .token-label{display:flex;flex-direction:column;font-weight:400}.token-options ul li .token-label .token{color:var(--nylas-abse-900);font-size:16px;line-height:24px}.token-options ul li .token-label .description{color:var(--nylas-base-600);font-size:14px;line-height:21px}.token-options ul li:hover,.token-options ul li:focus,.token-options ul li:active,.token-options ul li.active{background-color:var(--nylas-base-100)}.token-options ul li:hover .token-label .token,.token-options ul li:focus .token-label .token,.token-options ul li:active .token-label .token,.token-options ul li.active .token-label .token{color:var(--nylas-primary)}.token-options .selected{background-color:var(--nylas-base-100)}',yt=mt;var gt=function(e,t,a,s){var o=arguments.length,i=o<3?t:s===null?s=Object.getOwnPropertyDescriptor(t,a):s,l;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(e,t,a,s);else for(var d=e.length-1;d>=0;d--)(l=e[d])&&(i=(o<3?l(i):o>3?l(t,a,i):l(t,a))||i);return o>3&&i&&Object.defineProperty(t,a,i),i},ie=function(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)};const ue=class{constructor(e){n.registerInstance(this,e),this.valueChanged=n.createEvent(this,"valueChanged",7),e.$hostElement$["s-ei"]?this.internals=e.$hostElement$["s-ei"]:(this.internals=e.$hostElement$.attachInternals(),e.$hostElement$["s-ei"]=this.internals),this.eventTitle=void 0,this.name="title",this.showTokens=!1,this.availableTokens=j.EVENT_TITLE_TOKENS.map(t=>({label:t.token,value:t.value,labelHTML:t})),this.filteredTokens=this.availableTokens,this.ariaActivedescendant="",this.currentWord={$value:"",fullText:"",index:-1,focusOffset:-1}}elementNameChangedHandler(e){r.debug("nylas-event-title","elementNameChangedHandler",e),this.host.setAttribute("name",e)}ariaActivedescendantChangedHandler(e){var t,a;if(r.debug("nylas-event-title","ariaActivedescendantChangedHandler",e),e!==""){const s=(t=this.host.shadowRoot)==null?void 0:t.getElementById(e);s==null||s.classList.add("active")}else{const s=(a=this.host.shadowRoot)==null?void 0:a.querySelectorAll(".token-options li.active");s==null||s.forEach(o=>o.classList.remove("active"))}}connectedCallback(){r.debug("nylas-event-title","connectedCallback")}componentWillLoad(){r.debug("nylas-event-title","componentWillLoad"),this.host.setAttribute("name",this.name)}componentDidLoad(){r.debug("nylas-event-title","componentDidLoad"),this.updateEventTitleFromProp(this.eventTitle||"")}disconnectedCallback(){r.debug("nylas-event-title","disconnectedCallback")}updateEventTitleFromProp(e){r.debug("nylas-event-title","eventTitleChangedHandler",e),this.titleRef.innerHTML=this.highlightTokens(),this.titleRef.focus()}highlightTokens(){let e=this.eventTitle||"";return j.EVENT_TITLE_TOKENS.forEach(t=>{const a=t.value,s=new RegExp(`(\\${a})(?!\\w)`,"g");e=e.replace(s,'<span class="highlighted-tag">$1</span>')}),e}getCurrentSelectionForBrowser(){var a,s,o;const e=(i,l,d)=>{const p=i.replace(/[\u200B-\u200D\uFEFF]/g,""),h=p.lastIndexOf("$"),b=p.substring(h).split(" ")[0];return{focusOffset:l,dollarIndex:h,lastWord:b,currentText:p,node:d}},t=r.getBrowser();switch(console.log("currentBrowser",t),t){case"Chrome":const i=(a=this.host.shadowRoot)==null?void 0:a.getSelection(),l=i==null?void 0:i.focusNode,d=(l==null?void 0:l.nodeValue)||"";return e(d,(i==null?void 0:i.focusOffset)||-1,l);case"Firefox":const p=document.getSelection(),h=((s=p==null?void 0:p.anchorNode)==null?void 0:s.nodeValue)||"";return e(h,(p==null?void 0:p.focusOffset)||-1,p==null?void 0:p.anchorNode);case"Safari":const b=window.getSelection(),f=b==null?void 0:b.getComposedRanges(this.host.shadowRoot)[0],g=((o=f==null?void 0:f.startContainer)==null?void 0:o.nodeValue)||"";return e(g,(f==null?void 0:f.endOffset)||-1,f==null?void 0:f.startContainer);default:return console.warn("Browser not supported"),null}}handleChange(e){const t=e.target.textContent||"",a=this.getCurrentSelectionForBrowser();if(!a){this.updateEventTitle(t),this.resetDropdown();return}const{focusOffset:s,dollarIndex:o,lastWord:i,currentText:l}=a;if(o===-1||s<o){this.updateEventTitle(t),this.resetDropdown();return}i.startsWith("$")?(this.showTokens=!0,this.currentWord={$value:i,fullText:l,index:o,focusOffset:s},this.populateSuggestionsDropdown(i)):this.resetDropdown(),this.updateEventTitle(t)}handleInputKeyDown(e){var t,a,s,o;if(e.key==="Enter"){e.preventDefault();const i=(t=this.host.shadowRoot)==null?void 0:t.getElementById(this.ariaActivedescendant);i&&(i.click(),this.ariaActivedescendant="")}else if(e.key==="ArrowDown"){e.preventDefault();const i=(a=this.host.shadowRoot)==null?void 0:a.getElementById(this.ariaActivedescendant);if(i){const l=i.nextElementSibling;l?this.ariaActivedescendant=l.id:this.ariaActivedescendant=this.filteredTokens[0].label}else this.ariaActivedescendant=this.filteredTokens[0].label}else if(e.key==="ArrowUp"){e.preventDefault();const i=(s=this.host.shadowRoot)==null?void 0:s.getElementById(this.ariaActivedescendant);if(i){const l=i.previousElementSibling;l?this.ariaActivedescendant=l.id:this.ariaActivedescendant=this.filteredTokens[this.filteredTokens.length-1].label}else this.ariaActivedescendant=this.filteredTokens[this.filteredTokens.length-1].label}else if(e.key==="Escape")e.preventDefault(),this.resetDropdown();else if(e.key==="Backspace"||e.key==="Delete"){const i=this.getCurrentSelectionForBrowser();i!=null&&i.currentText.startsWith("${")&&(o=i==null?void 0:i.node)!=null&&o.parentNode&&i.node.parentNode.removeChild(i.node)}}selectOption(e,t){var c;e.preventDefault();const a=this.currentWord.fullText,s=this.currentWord.$value;let o=this.titleRef.firstChild,i=null;for(;o;){if(o.nodeType===3){const u=((c=o.textContent)==null?void 0:c.replace(/[\u200B-\u200D\uFEFF]/g,""))||"",m=a.replace(/[\u200B-\u200D\uFEFF]/g,"");if(u.includes(m)){i=o;break}}o=o.nextSibling}if(!i)return;const l=i.textContent||"",d=l.indexOf(s),p=l.substring(0,d),h=l.substring(d+s.length),b=document.createTextNode(p),f=document.createRange(),g=document.createElement("span");g.classList.add("highlighted-tag"),g.textContent=`${t.value}`;const N=document.createTextNode(h);if(h!=="")i.replaceWith(b,g,N),f.setStart(N,0);else{const u=document.createTextNode("​");i.replaceWith(b,g,u),f.setStart(u,0)}this.resetDropdown(),this.titleRef.focus();const O=window.getSelection();f.collapse(!0),O==null||O.removeAllRanges(),O==null||O.addRange(f),this.updateEventTitle(this.titleRef.textContent||"")}populateSuggestionsDropdown(e=""){this.filteredTokens=this.availableTokens.filter(t=>t.label.startsWith(e.toString())||t.value.startsWith(e.toString())),this.filteredTokens.length>0&&(this.ariaActivedescendant=this.filteredTokens[0].label)}updateEventTitle(e){const t=e.replace(/ +/g," ");this.valueChanged.emit({value:t,name:this.name})}resetDropdown(){this.showTokens=!1,this.ariaActivedescendant=""}getLabelHTML(e){return n.h("div",{class:"token-label"},n.h("span",{class:"token"},e.token),n.h("span",{class:"description"},e.description))}render(){var e;return n.h(n.Host,{key:"3a7d0d3f26d3a8e3b5aa8c05f50f6d29c174b842"},n.h("div",{key:"23a7a97be25be6c4a3e9f6cba2da58221bfa577f",class:"nylas-event-title"},n.h("label",{key:"43c64b93196da3ead8579832d41ce441b585ee47",htmlFor:"title"},"Event title",n.h("span",{key:"92948ef95c675e976bc390947ae7f59368ded040",class:"required"},"*"),n.h("span",{key:"e4d974e193065f9ddd27c3a1c6cbdfa4b887d555",class:"label-icon"},n.h("tooltip-component",{key:"5a22f040163c9a437d0be6850ece29f2e0a48985"},n.h("info-icon",{key:"4f065a1ff2a00f9d1974915a52722cfc38a30d7a",slot:"tooltip-icon"}),n.h("span",{key:"5517a19abdcfe5cec829140dea3cd810a3575a27",slot:"tooltip-content"},"Enter a title for your event.")))),n.h("div",{key:"de04b5e1505e50f61bbf43430db853b04149be3e",class:"title",ref:t=>this.titleRef=t,contentEditable:"true",onInput:t=>this.handleChange(t),onKeyDown:t=>this.handleInputKeyDown(t)}),this.showTokens&&((e=this.filteredTokens)==null?void 0:e.length)>0&&n.h("div",{class:"token-options"},n.h("ul",{tabindex:"-1",role:"listbox","aria-label":this.name,"aria-activedescendant":this.ariaActivedescendant},this.filteredTokens.map(t=>n.h("li",{tabindex:"0",key:t.label,id:t.label,class:{active:this.ariaActivedescendant===t.label},onClick:a=>this.selectOption(a,t),role:"option"},this.getLabelHTML(t.labelHTML))))),n.h("span",{key:"c3b75b0038f5cc22c7c9a4db0aaa0c9f5d61036a",class:"help-text"},"Create a dynamic templated event title by typing $. Learn more")))}static get formAssociated(){return!0}get host(){return n.getElement(this)}static get watchers(){return{name:["elementNameChangedHandler"],ariaActivedescendant:["ariaActivedescendantChangedHandler"]}}};gt([w.RegisterComponent({name:"nylas-event-title",eventToProps:{},fireRegisterEvent:!0}),ie("design:type",Function),ie("design:paramtypes",[]),ie("design:returntype",void 0)],ue.prototype,"render",null);ue.style=yt;const vt=':host{--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}.nylas-event-location{display:flex;flex-direction:column;gap:4px;font-family:var(--nylas-font-family)}.nylas-event-location label{display:flex;align-items:center;color:var(--nylas-base-nylas-base-800);font-size:14px;font-style:normal;font-weight:400;line-height:150%;}.nylas-event-location label span.label-icon{margin-left:4px}.nylas-event-location label span.label-icon tooltip-component{display:flex}.nylas-event-location span[slot=select-icon]{border-right:1px solid var(--nylas-base-200);padding:16px 0.75rem 16px 0.5rem;border-radius:var(--nylas-border-radius-2x);border-bottom-right-radius:0;border-top-right-radius:0;height:20px}.nylas-event-location div.location-input{display:grid;grid-template-columns:auto 1fr;width:100%;gap:0.5rem}.nylas-event-location div.location-input input{border:1px solid var(--nylas-base-200);border-radius:var(--nylas-border-radius-2x);padding:12px 16px;font-family:var(--nylas-font-family);font-size:16px;line-height:24px}.nylas-event-location select-dropdown{width:208px}@media screen and (max-width: 768px){.nylas-event-location select-dropdown{width:100%}}.nylas-event-location select-dropdown::part(sd_dropdown){width:100%}.nylas-event-location select-dropdown::part(sd_dropdown-content){left:calc(35px + 0.5rem)}.nylas-event-location select-dropdown::part(sd_dropdown-button){display:flex;justify-content:space-between;width:100%;border:1px solid var(--nylas-base-200);padding:0 0.5rem}.nylas-event-location select-dropdown::part(sd_dropdown-button-selected-label){display:inline-flex;align-self:center;padding:14px 0;font-family:var(--nylas-font-family);font-size:16px;line-height:24px}',kt=vt;var xt=function(e,t,a,s){var o=arguments.length,i=o<3?t:s===null?s=Object.getOwnPropertyDescriptor(t,a):s,l;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(e,t,a,s);else for(var d=e.length-1;d>=0;d--)(l=e[d])&&(i=(o<3?l(i):o>3?l(t,a,i):l(t,a))||i);return o>3&&i&&Object.defineProperty(t,a,i),i},se=function(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)};const be=class{constructor(e){n.registerInstance(this,e),this.valueChanged=n.createEvent(this,"valueChanged",7),e.$hostElement$["s-ei"]?this.internals=e.$hostElement$["s-ei"]:(this.internals=e.$hostElement$.attachInternals(),e.$hostElement$["s-ei"]=this.internals),this.eventLocation=void 0,this.location=this.eventLocation??"",this.selectedLocationOption=this.eventLocation?"custom":"none",this.name="location"}elementNameChangedHandler(e){r.debug("nylas-location-component","elementNameChangedHandler",e),this.host.setAttribute("name",e)}eventLocationChangedHandler(e,t){r.debug("nylas-location-component","eventLocationChangedHandler",e),e!==t&&(this.selectedLocationOption=e?"custom":"none")}connectedCallback(){r.debug("nylas-location-component","connectedCallback")}componentWillLoad(){r.debug("nylas-location-component","componentWillLoad"),this.host.setAttribute("name",this.name)}componentDidLoad(){r.debug("nylas-location-component","componentDidLoad")}disconnectedCallback(){r.debug("nylas-location-component","disconnectedCallback")}selectedOptionChangedHandler(e){this.selectedLocationOption=e.detail.value,this.selectedLocationOption==="none"&&(this.location="",this.setFormValue("","location"),this.valueChanged.emit({value:"",name:this.name}))}setFormValue(e,t){typeof this.internals.setFormValue=="function"&&this.internals.setFormValue(e,t)}handleChange(e){this.location=e.target.value,this.setFormValue(e.target.value,"location"),this.valueChanged.emit({value:e.target.value,name:this.name})}render(){const e=[{value:"none",label:"None"},{value:"custom",label:"Custom location"}],t={none:n.h("location-off-icon",{key:"021fd97ea9f51cc9ef6edab397e12181f24bddb2"}),custom:n.h("location-icon",{key:"24a170f7a38501da4f46eef8da5231f9002347b1"})};return n.h(n.Host,{key:"8b520fcbc5f57bf6ab51d6cb83fd58eb452f702a"},n.h("div",{key:"6e7b240c7b5603cea809a8e83f003ffc48db183b",class:"nylas-event-location"},n.h("label",{key:"e6979aeff1965f62540bc274818cbb7b46f454d6",htmlFor:"location"},"Location type",n.h("span",{key:"0334a62e0b8d15d07f35722561743d9654364176",class:"label-icon"},n.h("tooltip-component",{key:"a1267dbc795c9abc4faa08ee4bd28d5fbb0dcc8f"},n.h("info-icon",{key:"ad03af910d69f86b5459e8e3d9129a6532b67b27",slot:"tooltip-icon"}),n.h("span",{key:"8bec251481f72beea08ed8649b628a6d9604ef39",slot:"tooltip-content"},"Choose how you’ll meet with the participants at the scheduled time. Pick from available conferencing options or add a custom location.")))),n.h("div",{key:"4cddd535ae80ee17f25566fff3c79cb92fe5ed73",class:"location-input"},n.h("select-dropdown",{key:"efe580f62aa4ea955cefff02a9e133a1eb66057d",withSearch:!1,name:"location",options:e,defaultSelectedOption:e.find(a=>a.value==this.selectedLocationOption)},n.h("span",{key:"58faabe958e2faf6cc518d3a02ff7dee5586f48d",slot:"select-icon"},t[this.selectedLocationOption])),this.selectedLocationOption==="custom"&&n.h("input",{type:"text",id:"location",name:"location",maxlength:"1024",value:this.location,onInput:a=>this.handleChange(a)}))))}static get formAssociated(){return!0}get host(){return n.getElement(this)}static get watchers(){return{name:["elementNameChangedHandler"],eventLocation:["eventLocationChangedHandler"]}}};xt([w.RegisterComponent({name:"nylas-location-component",eventToProps:{},fireRegisterEvent:!0}),se("design:type",Function),se("design:paramtypes",[]),se("design:returntype",void 0)],be.prototype,"render",null);be.style=kt;var _e={exports:{}};(function(e,t){(function(a,s){e.exports=s()})(Le.commonjsGlobal,function(){var a={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},s=/(\[[^[]*\])|([-_:/.,()\s]+)|(A|a|YYYY|YY?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g,o=/\d\d/,i=/\d\d?/,l=/\d*[^-_:/,()\s\d]+/,d={},p=function(c){return(c=+c)+(c>68?1900:2e3)},h=function(c){return function(u){this[c]=+u}},b=[/[+-]\d\d:?(\d\d)?|Z/,function(c){(this.zone||(this.zone={})).offset=function(u){if(!u||u==="Z")return 0;var m=u.match(/([+-]|\d\d)/g),y=60*m[1]+(+m[2]||0);return y===0?0:m[0]==="+"?-y:y}(c)}],f=function(c){var u=d[c];return u&&(u.indexOf?u:u.s.concat(u.f))},g=function(c,u){var m,y=d.meridiem;if(y){for(var C=1;C<=24;C+=1)if(c.indexOf(y(C,0,u))>-1){m=C>12;break}}else m=c===(u?"pm":"PM");return m},N={A:[l,function(c){this.afternoon=g(c,!1)}],a:[l,function(c){this.afternoon=g(c,!0)}],S:[/\d/,function(c){this.milliseconds=100*+c}],SS:[o,function(c){this.milliseconds=10*+c}],SSS:[/\d{3}/,function(c){this.milliseconds=+c}],s:[i,h("seconds")],ss:[i,h("seconds")],m:[i,h("minutes")],mm:[i,h("minutes")],H:[i,h("hours")],h:[i,h("hours")],HH:[i,h("hours")],hh:[i,h("hours")],D:[i,h("day")],DD:[o,h("day")],Do:[l,function(c){var u=d.ordinal,m=c.match(/\d+/);if(this.day=m[0],u)for(var y=1;y<=31;y+=1)u(y).replace(/\[|\]/g,"")===c&&(this.day=y)}],M:[i,h("month")],MM:[o,h("month")],MMM:[l,function(c){var u=f("months"),m=(f("monthsShort")||u.map(function(y){return y.slice(0,3)})).indexOf(c)+1;if(m<1)throw new Error;this.month=m%12||m}],MMMM:[l,function(c){var u=f("months").indexOf(c)+1;if(u<1)throw new Error;this.month=u%12||u}],Y:[/[+-]?\d+/,h("year")],YY:[o,function(c){this.year=p(c)}],YYYY:[/\d{4}/,h("year")],Z:b,ZZ:b};function O(c){var u,m;u=c,m=d&&d.formats;for(var y=(c=u.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,function($,S,x){var v=x&&x.toUpperCase();return S||m[x]||a[x]||m[v].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,function(I,D,A){return D||A.slice(1)})})).match(s),C=y.length,_=0;_<C;_+=1){var R=y[_],L=N[R],T=L&&L[0],E=L&&L[1];y[_]=E?{regex:T,parser:E}:R.replace(/^\[|\]$/g,"")}return function($){for(var S={},x=0,v=0;x<C;x+=1){var I=y[x];if(typeof I=="string")v+=I.length;else{var D=I.regex,A=I.parser,B=$.slice(v),F=D.exec(B)[0];A.call(S,F),$=$.replace(F,"")}}return function(H){var k=H.afternoon;if(k!==void 0){var M=H.hours;k?M<12&&(H.hours+=12):M===12&&(H.hours=0),delete H.afternoon}}(S),S}}return function(c,u,m){m.p.customParseFormat=!0,c&&c.parseTwoDigitYear&&(p=c.parseTwoDigitYear);var y=u.prototype,C=y.parse;y.parse=function(_){var R=_.date,L=_.utc,T=_.args;this.$u=L;var E=T[1];if(typeof E=="string"){var $=T[2]===!0,S=T[3]===!0,x=$||S,v=T[2];S&&(v=T[2]),d=this.$locale(),!$&&v&&(d=m.Ls[v]),this.$d=function(B,F,H){try{if(["x","X"].indexOf(F)>-1)return new Date((F==="X"?1e3:1)*B);var k=O(F)(B),M=k.year,z=k.month,Ee=k.day,Oe=k.hours,Se=k.minutes,Ie=k.seconds,De=k.milliseconds,me=k.zone,W=new Date,V=Ee||(M||z?1:W.getDate()),Z=M||W.getFullYear(),P=0;M&&!z||(P=z>0?z-1:W.getMonth());var U=Oe||0,Y=Se||0,K=Ie||0,q=De||0;return me?new Date(Date.UTC(Z,P,V,U,Y,K,q+60*me.offset*1e3)):H?new Date(Date.UTC(Z,P,V,U,Y,K,q)):new Date(Z,P,V,U,Y,K,q)}catch{return new Date("")}}(R,E,L),this.init(),v&&v!==!0&&(this.$L=this.locale(v).$L),x&&R!=this.format(E)&&(this.$d=new Date("")),d={}}else if(E instanceof Array)for(var I=E.length,D=1;D<=I;D+=1){T[1]=E[D-1];var A=m.apply(this,T);if(A.isValid()){this.$d=A.$d,this.$L=A.$L,this.init();break}D===I&&(this.$d=new Date(""))}else C.call(this,_)}}})})(_e);const wt=_e.exports,Ct=':host{display:block;position:relative;--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}.time-picker{display:inline-block;width:150px;position:relative}@media screen and (max-width: 768px){.time-picker{width:auto}}.time-picker input{width:150px;height:48px;text-align:center;font-size:1rem;cursor:pointer;background:transparent;border:1px solid var(--nylas-base-200);border-radius:var(--nylas-border-radius-2x)}@media screen and (max-width: 768px){.time-picker input{width:98px}}.time-picker input.focus{background:transparent}.time-picker input:hover,.time-picker input:active{border:1px solid var(--nylas-primary)}.time-picker input:active{outline:2px solid var(--nylas-primary)}.time-picker input span.open{transform:rotate(90deg)}.time-picker input span.closed{transform:rotate(270deg)}.time-picker input.error{border:1px solid var(--nylas-error)}.time-picker p.error{color:var(--nylas-error);font-size:0.875rem;margin:0}.times{display:block;margin-top:0.5rem;background-color:var(--nylas-base-0);width:100%;max-height:336px;overflow:auto;border:1px solid #ddd;z-index:1;border-radius:4px;position:absolute;box-shadow:0px 4px 6px -2px rgba(0, 0, 0, 0.0509803922);box-shadow:0px 10px 15px -3px rgba(0, 0, 0, 0.1019607843)}.times ul{padding:0;list-style-type:none;color:var(--nylas-base-900);max-height:336px}.times ul li{padding:16px, 12px, 16px, 12px;color:black;padding:12px 16px;text-decoration:none;display:block;font-family:inherit;font-size:14px;font-weight:400;line-height:20px;letter-spacing:0px;text-align:center;cursor:pointer}.times ul li.focused{background-color:var(--nylas-base-100)}.times ul li:hover,.times ul li:focus{background-color:var(--nylas-base-100)}.times ul li label{display:flex;align-items:center;gap:0.5rem}.times ul li label input{margin:0}',_t=Ct;r.dayjs.extend(wt);const Te=class{constructor(e){n.registerInstance(this,e),this.timeChange=n.createEvent(this,"timeChange",7),this.time=void 0,this.minimumStartTime=null,this.placeholder="hh:mmam/pm",this.setTime=void 0,this.name=void 0,this.hasError=!1,this.setFormError=void 0,this.err="",this.showTimes=!1,this.ariaActivedescendant="",this.times=this.generateTimes(),this.shouldAutoScroll=!1}handleOutsideClick(e){!e.composedPath().includes(this.el)&&this.showTimes&&(this.showTimes=!1)}minimumStartTimeChangedHandler(){if(this.minimumStartTime){let e=r.dayjs().hour(parseInt(this.minimumStartTime)).minute(parseInt(this.minimumStartTime.slice(-4,-2)));this.minimumStartTime.slice(-2).toLowerCase()==="pm"&&parseInt(this.minimumStartTime)!==12?e=e.add(12,"hour"):this.minimumStartTime.slice(-2).toLowerCase()==="am"&&parseInt(this.minimumStartTime)===12&&(e=e.subtract(12,"hour")),this.times=this.generateTimes();const t=r.dayjs(this.times[0].value,"hh:mma");r.dayjs(this.time,"hh:mma").isBefore(t)&&(this.err="Invalid",this.setFormError(null,"Invalid"))}}componentDidRender(){if(this.showTimes&&this.shouldAutoScroll){const e=r.autocompleteTimeFormat(this.time),t=this.times.findIndex(a=>a.value===e);t>-1&&(this.shouldAutoScroll=!1,this.scrollToViewWithinParent(t));return}}handleTimeChange(e,t){const a=t.split(":");a[0]==="00"&&a[1].slice(-2)=="pm"&&(this.err="Invalid",this.setFormError(e,"Invalid")),r.validateTimeFormatInput(t)?(this.err="",this.setFormError(null)):(this.err="Invalid",this.setFormError(e,"Invalid")),this.setTime(e,t),this.timeChange.emit(t)}handleTimeAutocomplete(e){var a;const t=(a=e.target)==null?void 0:a.value;if(!r.validateTimeFormatInput(t)){this.err="Invalid",this.setFormError(e,"Invalid");return}if(t===""){const s=r.roundToNearest15Minutes().format("hh:mma");this.setTime(e,s);return}if(!r.validateExactTimeFormat(t)){const s=r.autocompleteTimeFormat(t);this.setTime(s);return}this.setTime(e,t)}handleOnInput(e){var a;const t=(a=e.target)==null?void 0:a.value;if(r.validateTimeFormatInput(t)){if(t===""){const s=r.roundToNearest15Minutes().format("hh:mma"),o=this.times.findIndex(i=>i.value===s);o>-1&&this.scrollToViewWithinParent(o);return}if(!r.validateExactTimeFormat(t)){const s=r.autocompleteTimeFormat(t),o=this.times.findIndex(i=>i.value===s);o>-1&&this.scrollToViewWithinParent(o);return}}}generateTimes(){const e=[];let t=r.dayjs().set("hour",0).set("minute",0).set("second",0);this.minimumStartTime&&(t=r.dayjs(this.minimumStartTime,"hh:mma"));const a=t.endOf("day").diff(t,"minutes"),s=Math.round(a/15);for(let o=0;o<s+1;o++){const i=t.add(o*15,"minute");if(o==s&&i.format("hh:mma").includes("am"))break;e.push({id:o,value:i.format("hh:mma")})}return e}handleComboboxKeyDown(e){if(e.key==="ArrowDown"){if(e.preventDefault(),!this.showTimes){this.showTimes=!0,this.shouldAutoScroll=!0;return}if(this.ariaActivedescendant==="")this.ariaActivedescendant=this.times[0].id.toString(),this.focusOption(0);else{const t=this.times.findIndex(s=>s.id.toString()===this.ariaActivedescendant),a=t+1<this.times.length?t+1:0;this.ariaActivedescendant=this.times[a].id.toString(),this.focusOption(a)}}else if(e.key==="ArrowUp")if(e.preventDefault(),this.ariaActivedescendant==="")this.ariaActivedescendant=this.times[this.times.length-1].id.toString(),this.focusOption(this.times.length-1);else{const t=this.times.findIndex(s=>s.id.toString()===this.ariaActivedescendant),a=t-1>=0?t-1:this.times.length-1;this.ariaActivedescendant=this.times[a].id.toString(),this.focusOption(a)}else e.key==="Escape"&&(this.showTimes=!1,this.timeInput.focus())}handleListboxKeydown(e){const t=this.times,a=t.findIndex(s=>s.id.toString()===this.ariaActivedescendant);if(e.key==="ArrowDown"||e.key==="Tab"&&!e.shiftKey){e.preventDefault();const s=a+1<t.length?a+1:0;this.ariaActivedescendant=t[s].id.toString(),this.focusOption(s)}else if(e.key==="ArrowUp"||e.key==="Tab"&&e.shiftKey){e.preventDefault();const s=a-1>=0?a-1:t.length-1;this.ariaActivedescendant=t[s].id.toString(),this.focusOption(s)}else if(e.key==="Enter"){if(e.preventDefault(),this.ariaActivedescendant){const s=t[a];this.handleTimeChange(e,s.value),this.showTimes=!1,this.ariaActivedescendant="",this.timeInput.focus()}}else e.key==="Escape"&&(this.showTimes=!1,this.timeInput.focus())}scrollToViewWithinParent(e){var l;const t=this.times[e],a=(l=this.el.shadowRoot)==null?void 0:l.getElementById(t.id.toString()),s=this.timeMenu;this.ariaActivedescendant=t.id.toString();const o=a.getBoundingClientRect(),i=s.getBoundingClientRect();o.top<i.top?s.scrollTop-=i.top-o.top:o.bottom>i.bottom&&(s.scrollTop+=o.bottom-i.bottom),o.left<i.left?s.scrollLeft-=i.left-o.left:o.right>i.right&&(s.scrollLeft+=o.right-i.right)}focusOption(e){var o;const t=this.times[e];if(!t)return;const a=t.id.toString(),s=(o=this.el.shadowRoot)==null?void 0:o.getElementById(a);s&&(s.focus(),s.scrollIntoView({behavior:"smooth",block:"nearest"}))}render(){return n.h(n.Host,{key:"ae06613962a37471cde869695544eff5897956e7"},n.h("div",{key:"26062a373ad43bd0392e6c68cb8924719110912e",class:"time-picker"},n.h("input",{key:"6bbb11bd7e469ced0d09df07f8f60878337699c2",type:"text",name:this.name,id:this.name,class:{"time-input":!0,error:!!this.err||this.hasError},ref:e=>this.timeInput=e,value:this.time,onClick:()=>{this.showTimes=!0,this.shouldAutoScroll=!0},"aria-haspopup":"listbox","aria-label":this.name,"aria-expanded":this.showTimes?"true":"false",placeholder:this.placeholder,onKeyDown:e=>this.handleComboboxKeyDown(e),onInput:e=>this.handleOnInput(e),onBlur:e=>this.handleTimeAutocomplete(e)}),this.err&&n.h("div",{class:"invalid-time-icon"}),this.showTimes&&n.h("div",{class:"times",ref:e=>this.timeMenu=e},n.h("ul",{tabindex:"-1",role:"listbox","aria-label":this.name,"aria-activedescendant":this.ariaActivedescendant,onKeyDown:e=>this.handleListboxKeydown(e)},this.times.map(e=>n.h("li",{tabindex:"0",key:e.id,id:e.id.toString(),class:{focused:this.ariaActivedescendant===e.id.toString()},onClick:t=>{this.handleTimeChange(t,e.value),this.showTimes=!1,this.timeInput.focus()},role:"option"},`${e.value}`)))),!this.showTimes&&this.err&&n.h("p",{class:"error",id:"email-error"},this.err)))}get el(){return n.getElement(this)}static get watchers(){return{minimumStartTime:["minimumStartTimeChangedHandler"]}}};Te.style=_t;exports.add_circle_icon=ye;exports.calendar_info_icon=ge;exports.calendar_patterns_icon=ve;exports.flow_icon=ke;exports.location_icon=xe;exports.location_off_icon=we;exports.multi_select_dropdown=Ce;exports.nylas_availability_picker=oe;exports.nylas_booking_calendar_picker=le;exports.nylas_buffer_time=re;exports.nylas_calendar_picker=de;exports.nylas_custom_booking_flow=ce;exports.nylas_event_description=he;exports.nylas_event_duration=fe;exports.nylas_event_info=pe;exports.nylas_event_title=ue;exports.nylas_location_component=be;exports.nylas_time_window_picker=Te;