@nylas/react 1.1.0-canary.19 → 1.1.0-canary.21
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.
- package/dist/add-circle-icon_2.entry-29cc2385.cjs +1 -0
- package/dist/add-circle-icon_2.entry-b8d6df60.js +69 -0
- package/dist/{archive-icon_7.entry-896a1054.js → archive-icon_7.entry-3830776a.js} +18 -18
- package/dist/{archive-icon_7.entry-2b56ef80.cjs → archive-icon_7.entry-afaef817.cjs} +1 -1
- package/dist/{arrow-icon.entry-9aaa93fd.js → arrow-icon.entry-19f00716.js} +1 -1
- package/dist/{arrow-icon.entry-0288f3fc.cjs → arrow-icon.entry-460cdd9f.cjs} +1 -1
- package/dist/{bold-icon_3.entry-e7810620.cjs → bold-icon_3.entry-1893eeec.cjs} +1 -1
- package/dist/{bold-icon_3.entry-0061cf1f.js → bold-icon_3.entry-80abafbb.js} +3 -3
- package/dist/button-component.entry-36137536.js +16 -0
- package/dist/button-component.entry-b78dc39e.cjs +1 -0
- package/dist/calendar-agenda-fill-icon_40.entry-62c66fce.cjs +10 -0
- package/dist/{calendar-agenda-fill-icon_35.entry-a19cae9c.js → calendar-agenda-fill-icon_40.entry-f19d6ad7.js} +1474 -1077
- package/dist/{calendar-cancel-icon.entry-8e8b25b6.cjs → calendar-cancel-icon.entry-0d83ee82.cjs} +1 -1
- package/dist/{calendar-cancel-icon.entry-71eae711.js → calendar-cancel-icon.entry-1fae00c5.js} +1 -1
- package/dist/{calendar-check-icon_2.entry-6f971ca2.js → calendar-check-icon_2.entry-159c38af.js} +1 -1
- package/dist/{calendar-check-icon_2.entry-562e98cf.cjs → calendar-check-icon_2.entry-e01c9028.cjs} +1 -1
- package/dist/{calendar-icon.entry-3a59af30.cjs → calendar-icon.entry-2e701aab.cjs} +1 -1
- package/dist/{calendar-icon.entry-3e496896.js → calendar-icon.entry-3af9cb76.js} +1 -1
- package/dist/checkbox-component_2.entry-5eee51f6.js +56 -0
- package/dist/checkbox-component_2.entry-9ff2c85b.cjs +1 -0
- package/dist/checkmark-icon.entry-0749b942.js +15 -0
- package/dist/checkmark-icon.entry-f96f1117.cjs +1 -0
- package/dist/{chevron-icon_3.entry-7eac0ed5.js → chevron-icon_3.entry-2e9eebbc.js} +10 -10
- package/dist/{chevron-icon_3.entry-7ff10540.cjs → chevron-icon_3.entry-c3989df2.cjs} +1 -1
- package/dist/clock-icon_4.entry-9395d0cb.js +45 -0
- package/dist/clock-icon_4.entry-d4563931.cjs +1 -0
- package/dist/close-icon.entry-cf9f0a69.js +15 -0
- package/dist/close-icon.entry-e24af309.cjs +1 -0
- package/dist/{constants-7ce66b44-e7ca66c2.js → constants-67de2eec-b17f5b96.js} +37 -17
- package/dist/{constants-7ce66b44-a951d78c.cjs → constants-67de2eec-e3b50fc6.cjs} +5 -5
- package/dist/{copy-icon_4.entry-9a949d24.js → copy-icon_3.entry-7b276fa2.js} +9 -19
- package/dist/copy-icon_3.entry-7de3667f.cjs +1 -0
- package/dist/document-refresh-icon.entry-582ac233.cjs +1 -0
- package/dist/{document-refresh-icon.entry-f0d95ac8.js → document-refresh-icon.entry-6dd65cb6.js} +2 -2
- package/dist/elements/index.d.ts +8 -0
- package/dist/{elements-dc5b338e-62b53496.cjs → elements-dc5b338e-158dce67.cjs} +1 -1
- package/dist/{elements-dc5b338e-974e2077.js → elements-dc5b338e-5e8a704b.js} +1 -1
- package/dist/{focus-visible-e8093c16-923e1041.cjs → focus-visible-e8093c16-5883a317.cjs} +1 -1
- package/dist/{focus-visible-e8093c16-7a512fc0.js → focus-visible-e8093c16-9d88e8ee.js} +1 -1
- package/dist/{forward-icon_6.entry-45b70066.cjs → forward-icon_6.entry-a59dada5.cjs} +3 -3
- package/dist/{forward-icon_6.entry-675c0b73.js → forward-icon_6.entry-acdf04ad.js} +7 -7
- package/dist/{globe-icon.entry-3296e427.js → globe-icon.entry-389c0391.js} +2 -2
- package/dist/{globe-icon.entry-7ecd6221.cjs → globe-icon.entry-eef27331.cjs} +1 -1
- package/dist/google-logo-icon_4.entry-e9be320c.cjs +1 -0
- package/dist/google-logo-icon_4.entry-eae19fc8.js +637 -0
- package/dist/index-53420959-82a5306f.cjs +1 -0
- package/dist/index-53420959-9b1699ec.js +5 -0
- package/dist/{index-6d9eeb53-aa1dfa96.cjs → index-6d9eeb53-15c69801.cjs} +1 -1
- package/dist/{index-6d9eeb53-4e2a7f9f.js → index-6d9eeb53-c70fc8a7.js} +2 -2
- package/dist/index-db48e0b6.cjs +42 -0
- package/dist/index-f8317a8e.js +7638 -0
- package/dist/{index.es-9cc0eb3c-65f8af0c.js → index.es-b16d0cf5-386496a9.js} +1 -1
- package/dist/{index.es-9cc0eb3c-8eefd4fc.cjs → index.es-b16d0cf5-d7f30c4a.cjs} +1 -1
- package/dist/{info-icon_2.entry-e612f1d6.cjs → info-icon_2.entry-63914227.cjs} +1 -1
- package/dist/{info-icon_2.entry-f06c8dd0.js → info-icon_2.entry-97d75550.js} +5 -5
- package/dist/input-dropdown.entry-4d29246a.js +132 -0
- package/dist/input-dropdown.entry-629d7b54.cjs +1 -0
- package/dist/loading-icon.entry-2f15a09f.cjs +1 -0
- package/dist/loading-icon.entry-fc9bc740.js +15 -0
- package/dist/{mailbox-store-64b4ef7c-9bd02ffd.cjs → mailbox-store-f11de360-02a6de93.cjs} +1 -1
- package/dist/{mailbox-store-64b4ef7c-b56d5e78.js → mailbox-store-f11de360-d781fd36.js} +2 -2
- package/dist/{multi-select-dropdown.entry-5bb80d89.cjs → multi-select-dropdown.entry-68fcca98.cjs} +1 -1
- package/dist/{multi-select-dropdown.entry-edf10867.js → multi-select-dropdown.entry-8e14e9af.js} +2 -2
- package/dist/nylas-booked-event-card_10.entry-4da23b61.cjs +1 -0
- package/dist/{nylas-booked-event-card_10.entry-92f6e85d.js → nylas-booked-event-card_10.entry-9487941d.js} +357 -316
- package/dist/{nylas-custom-booking-flow.entry-b39a2bf2.js → nylas-custom-booking-flow.entry-0e16973b.js} +32 -32
- package/dist/{nylas-custom-booking-flow.entry-cef0041a.cjs → nylas-custom-booking-flow.entry-338b0a8f.cjs} +1 -1
- package/dist/nylas-form-card.entry-ca669dea.cjs +1 -0
- package/dist/{nylas-form-card.entry-bf4545e2.js → nylas-form-card.entry-ccfa5692.js} +10 -10
- package/dist/{nylas-if-state.entry-2739dc10.js → nylas-if-state.entry-93935670.js} +2 -2
- package/dist/{nylas-if-state.entry-d7b818a6.cjs → nylas-if-state.entry-faa11bb6.cjs} +1 -1
- package/dist/{nylas-list-folders.entry-3197e390.js → nylas-list-folders.entry-14fc1fe8.js} +4 -4
- package/dist/{nylas-list-folders.entry-0ec6ba20.cjs → nylas-list-folders.entry-e7e179ea.cjs} +1 -1
- package/dist/{nylas-list-threads.entry-9004c490.js → nylas-list-threads.entry-2118b146.js} +3 -3
- package/dist/{nylas-list-threads.entry-2a7e1e84.cjs → nylas-list-threads.entry-3f52fc06.cjs} +1 -1
- package/dist/{nylas-login.entry-f2927406.js → nylas-login.entry-87a902d6.js} +7 -7
- package/dist/{nylas-login.entry-c2ffd6a5.cjs → nylas-login.entry-915f0284.cjs} +1 -1
- package/dist/{nylas-mailbox-pagination.entry-839c9ad3.cjs → nylas-mailbox-pagination.entry-9aa8a606.cjs} +1 -1
- package/dist/{nylas-mailbox-pagination.entry-e9356835.js → nylas-mailbox-pagination.entry-eedbf796.js} +2 -2
- package/dist/{nylas-mailbox-toolbar-button.entry-298a3c47.js → nylas-mailbox-toolbar-button.entry-40b75810.js} +2 -2
- package/dist/{nylas-mailbox-toolbar-button.entry-43812d51.cjs → nylas-mailbox-toolbar-button.entry-ba5b826e.cjs} +1 -1
- package/dist/{nylas-mailbox.entry-aa42f6c4.js → nylas-mailbox.entry-179e5a5c.js} +3 -3
- package/dist/{nylas-mailbox.entry-cf13ddf5.cjs → nylas-mailbox.entry-31de7f8f.cjs} +1 -1
- package/dist/{nylas-provider.entry-843b5593.cjs → nylas-provider.entry-46fe01b6.cjs} +1 -1
- package/dist/{nylas-provider.entry-1a3a195f.js → nylas-provider.entry-7b70bbdc.js} +36 -36
- package/dist/{nylas-scheduler-editor.entry-048e7a8f.cjs → nylas-scheduler-editor.entry-76b68f66.cjs} +2 -2
- package/dist/{nylas-scheduler-editor.entry-d56d6d2a.js → nylas-scheduler-editor.entry-f1f80de1.js} +7 -10
- package/dist/{nylas-scheduling.entry-7039a890.js → nylas-scheduling.entry-31d13205.js} +83 -70
- package/dist/nylas-scheduling.entry-3ce8c52f.cjs +1 -0
- package/dist/{nylas-threads-refresh.entry-d951050a.js → nylas-threads-refresh.entry-a3ea46aa.js} +2 -2
- package/dist/{nylas-threads-refresh.entry-9cae6ac8.cjs → nylas-threads-refresh.entry-c9f9db8c.cjs} +1 -1
- package/dist/{nylas-threads-search.entry-7a4bbc75.js → nylas-threads-search.entry-01482ddf.js} +8 -8
- package/dist/{nylas-threads-search.entry-0d34c5a8.cjs → nylas-threads-search.entry-a4ab0d47.cjs} +1 -1
- package/dist/{nylas-time-window-picker.entry-062bc8c1.cjs → nylas-time-window-picker.entry-5a3bb0b7.cjs} +1 -1
- package/dist/{nylas-time-window-picker.entry-210c3f1a.js → nylas-time-window-picker.entry-5f063b2b.js} +18 -18
- package/dist/{nylas-view-thread.entry-db78ed9c.cjs → nylas-view-thread.entry-82e78b82.cjs} +1 -1
- package/dist/{nylas-view-thread.entry-8b39a997.js → nylas-view-thread.entry-cb057b9e.js} +6 -6
- package/dist/person-icon.entry-3e30c63c.js +15 -0
- package/dist/person-icon.entry-78cdc7f9.cjs +1 -0
- package/dist/play-icon_2.entry-4fb1938c.cjs +1 -0
- package/dist/play-icon_2.entry-71eaad5c.js +25 -0
- package/dist/react.cjs +1 -1
- package/dist/react.js +116 -108
- package/dist/{refresh-icon.entry-e695cf7f.cjs → refresh-icon.entry-3570353d.cjs} +1 -1
- package/dist/{refresh-icon.entry-75139a0c.js → refresh-icon.entry-db85d14d.js} +4 -4
- package/dist/{register-component-a5a9ca5d-d69a7a05.js → register-component-b2a51b20-8a262dcf.js} +1 -1
- package/dist/{register-component-a5a9ca5d-eebf89e7.cjs → register-component-b2a51b20-9a913603.cjs} +1 -1
- package/dist/{scheduler-config-store-9ccfba4d-22a58b7d.cjs → scheduler-config-store-9ccfba4d-6806e3cb.cjs} +1 -1
- package/dist/{scheduler-config-store-9ccfba4d-fd62a421.js → scheduler-config-store-9ccfba4d-a6745ccc.js} +1 -1
- package/dist/{scheduler-store-8a400448-3b007d4d.js → scheduler-store-db06b30a-1e63b67f.js} +119 -116
- package/dist/scheduler-store-db06b30a-d5e6b6c3.cjs +1 -0
- package/dist/{textarea-component.entry-48feabb3.cjs → textarea-component.entry-be870b8f.cjs} +1 -1
- package/dist/{textarea-component.entry-ead5ab00.js → textarea-component.entry-f5f402a1.js} +4 -4
- package/dist/time-period-selector.entry-d1a8470b.js +93 -0
- package/dist/time-period-selector.entry-fc7d61c6.cjs +1 -0
- package/dist/{translate-icon.entry-5f62bc61.cjs → translate-icon.entry-3ae0ddae.cjs} +1 -1
- package/dist/{translate-icon.entry-55043beb.js → translate-icon.entry-b91a0449.js} +2 -2
- package/dist/{warning-icon.entry-2e0a80da.cjs → warning-icon.entry-54127f45.cjs} +1 -1
- package/dist/{warning-icon.entry-fa644462.js → warning-icon.entry-acdc811b.js} +5 -5
- package/package.json +3 -3
- package/dist/add-circle-icon_2.entry-3ca337a6.js +0 -25
- package/dist/add-circle-icon_2.entry-adde5fdf.cjs +0 -1
- package/dist/button-component_4.entry-276606e6.js +0 -115
- package/dist/button-component_4.entry-e53a8f37.cjs +0 -1
- package/dist/calendar-agenda-fill-icon_35.entry-fa968081.cjs +0 -7
- package/dist/clock-icon_2.entry-120d672e.js +0 -25
- package/dist/clock-icon_2.entry-43873262.cjs +0 -1
- package/dist/copy-icon_4.entry-57874c4f.cjs +0 -1
- package/dist/document-refresh-icon.entry-f1d3f32d.cjs +0 -1
- package/dist/google-logo-icon_4.entry-aa9f8b35.js +0 -584
- package/dist/google-logo-icon_4.entry-fd734a59.cjs +0 -1
- package/dist/index-53420959-1c0d390d.js +0 -5
- package/dist/index-53420959-8e7b10db.cjs +0 -1
- package/dist/index-5efb84b8.js +0 -5011
- package/dist/index-d36b8fb8.cjs +0 -42
- package/dist/input-dropdown_2.entry-ad380260.cjs +0 -1
- package/dist/input-dropdown_2.entry-ccd95678.js +0 -220
- package/dist/loading-icon.entry-678a6b3f.cjs +0 -1
- package/dist/loading-icon.entry-9e6670d5.js +0 -15
- package/dist/nylas-booked-event-card_10.entry-ad4671b2.cjs +0 -1
- package/dist/nylas-form-card.entry-fba5d623.cjs +0 -1
- package/dist/nylas-scheduling.entry-0ad9b1d0.cjs +0 -1
- package/dist/play-icon_2.entry-19271982.cjs +0 -1
- package/dist/play-icon_2.entry-c53f3cac.js +0 -25
- package/dist/scheduler-store-8a400448-44e0edad.cjs +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { r as s, h as t } from "./index-
|
|
1
|
+
import { r as s, h as t } from "./index-f8317a8e.js";
|
|
2
2
|
import "react";
|
|
3
3
|
import "react-dom";
|
|
4
4
|
const c = ".sc-copy-icon-h{display:flex}", i = c, h = class {
|
|
@@ -6,40 +6,30 @@ const c = ".sc-copy-icon-h{display:flex}", i = c, h = class {
|
|
|
6
6
|
s(this, e), this.width = "16", this.height = "16";
|
|
7
7
|
}
|
|
8
8
|
render() {
|
|
9
|
-
return t("svg", { key: "
|
|
9
|
+
return t("svg", { key: "0f2555a15e81073aa55521da727d65cfc18cb4cb", width: this.width, height: this.height, fill: "none", xmlns: "http://www.w3.org/2000/svg" }, t("path", { key: "6e368efe2876f25a95a5a8650ea358031b233784", d: "M4 0.75C2.89543 0.75 2 1.64543 2 2.75V12.75C2 13.8546 2.89543 14.75 4 14.75H10C11.1046 14.75 12 13.8546 12 12.75V2.75C12 1.64543 11.1046 0.75 10 0.75H4ZM3 2.75C3 2.19772 3.44772 1.75 4 1.75H10C10.5523 1.75 11 2.19772 11 2.75V12.75C11 13.3023 10.5523 13.75 10 13.75H4C3.44772 13.75 3 13.3023 3 12.75V2.75ZM0 4.75001C0 4.00973 0.402199 3.36339 1 3.01758V13.25C1 14.6307 2.11929 15.75 3.5 15.75H9.73244C9.38663 16.3478 8.74028 16.75 8 16.75H3.5C1.567 16.75 0 15.183 0 13.25V4.75001Z", fill: "currentColor" }));
|
|
10
10
|
}
|
|
11
11
|
};
|
|
12
12
|
h.style = i;
|
|
13
|
-
const
|
|
13
|
+
const C = ".sc-delete-icon-h{display:flex}", o = C, n = class {
|
|
14
14
|
constructor(e) {
|
|
15
15
|
s(this, e), this.width = "15", this.height = "17";
|
|
16
16
|
}
|
|
17
17
|
render() {
|
|
18
|
-
return t("svg", { key: "
|
|
18
|
+
return t("svg", { key: "82df5832a012243a03e34a26bd5682eb679257ee", width: this.width, height: this.height, fill: "none", xmlns: "http://www.w3.org/2000/svg" }, t("path", { key: "ffb833566886c5c3b0b3c337bb449c09c88c4218", d: "M9.5 2.75C9.5 1.92157 8.82843 1.25 8 1.25C7.17157 1.25 6.5 1.92157 6.5 2.75H5.5C5.5 1.36929 6.61929 0.25 8 0.25C9.38071 0.25 10.5 1.36929 10.5 2.75H15C15.2761 2.75 15.5 2.97386 15.5 3.25C15.5 3.52614 15.2761 3.75 15 3.75H14.446L13.1499 14.9792C13.0335 15.9884 12.179 16.75 11.1631 16.75H4.83688C3.821 16.75 2.9665 15.9884 2.85006 14.9792L1.553 3.75H1C0.75454 3.75 0.550392 3.57312 0.508056 3.33988L0.5 3.25C0.5 2.97386 0.723858 2.75 1 2.75H9.5ZM13.438 3.75H2.561L3.84347 14.8646C3.90169 15.3692 4.32894 15.75 4.83688 15.75H11.1631C11.6711 15.75 12.0983 15.3692 12.1565 14.8646L13.438 3.75ZM6.5 6.25C6.74546 6.25 6.94961 6.40477 6.99194 6.60886L7 6.6875V12.8125C7 13.0541 6.77614 13.25 6.5 13.25C6.25454 13.25 6.05039 13.0952 6.00806 12.8911L6 12.8125V6.6875C6 6.44588 6.22386 6.25 6.5 6.25ZM9.5 6.25C9.74546 6.25 9.94961 6.40477 9.99194 6.60886L10 6.6875V12.8125C10 13.0541 9.77614 13.25 9.5 13.25C9.25454 13.25 9.05039 13.0952 9.00806 12.8911L9 12.8125V6.6875C9 6.44588 9.22386 6.25 9.5 6.25Z", fill: "currentColor" }));
|
|
19
19
|
}
|
|
20
20
|
};
|
|
21
|
-
n.style =
|
|
22
|
-
const
|
|
21
|
+
n.style = o;
|
|
22
|
+
const r = ".sc-eye-icon-h{display:flex}", l = r, a = class {
|
|
23
23
|
constructor(e) {
|
|
24
24
|
s(this, e), this.width = "16", this.height = "16";
|
|
25
25
|
}
|
|
26
26
|
render() {
|
|
27
|
-
return t("svg", { key: "
|
|
27
|
+
return t("svg", { key: "91ba63fd0c847ac3dc8b974fa6bf86af34b91b8e", width: this.width, height: this.height, fill: "none", xmlns: "http://www.w3.org/2000/svg" }, t("path", { key: "6edd77db7fcf2a506088beb9df2aa031e96c349d", d: "M1.25909 7.35214C1.94254 4.07689 4.79437 1.75 8.00002 1.75C11.2057 1.75 14.0574 4.07688 14.7409 7.35215C14.7974 7.62246 15.0622 7.79587 15.3325 7.73946C15.6029 7.68304 15.7763 7.41817 15.7199 7.14785C14.9425 3.42312 11.6934 0.75 8.00002 0.75C4.3066 0.75 1.05742 3.42311 0.280175 7.14786C0.223767 7.41818 0.397177 7.68305 0.667497 7.73946C0.937817 7.79587 1.20268 7.62246 1.25909 7.35214ZM7.98953 3.75C9.92253 3.75 11.4895 5.317 11.4895 7.25C11.4895 9.18299 9.92253 10.75 7.98953 10.75C6.05653 10.75 4.48953 9.18299 4.48953 7.25C4.48953 5.317 6.05653 3.75 7.98953 3.75Z", fill: "currentColor" }));
|
|
28
28
|
}
|
|
29
29
|
};
|
|
30
|
-
|
|
31
|
-
const f = ".sc-eye-icon-h{display:flex}", a = f, L = class {
|
|
32
|
-
constructor(e) {
|
|
33
|
-
s(this, e), this.width = "16", this.height = "16";
|
|
34
|
-
}
|
|
35
|
-
render() {
|
|
36
|
-
return t("svg", { key: "ffd54b236393eba52569beeb211be471689e1957", width: this.width, height: this.height, fill: "none", xmlns: "http://www.w3.org/2000/svg" }, t("path", { key: "2c5dcaf6b018fcbcbcbf2c23daf56728730ff146", d: "M1.25909 7.35214C1.94254 4.07689 4.79437 1.75 8.00002 1.75C11.2057 1.75 14.0574 4.07688 14.7409 7.35215C14.7974 7.62246 15.0622 7.79587 15.3325 7.73946C15.6029 7.68304 15.7763 7.41817 15.7199 7.14785C14.9425 3.42312 11.6934 0.75 8.00002 0.75C4.3066 0.75 1.05742 3.42311 0.280175 7.14786C0.223767 7.41818 0.397177 7.68305 0.667497 7.73946C0.937817 7.79587 1.20268 7.62246 1.25909 7.35214ZM7.98953 3.75C9.92253 3.75 11.4895 5.317 11.4895 7.25C11.4895 9.18299 9.92253 10.75 7.98953 10.75C6.05653 10.75 4.48953 9.18299 4.48953 7.25C4.48953 5.317 6.05653 3.75 7.98953 3.75Z", fill: "currentColor" }));
|
|
37
|
-
}
|
|
38
|
-
};
|
|
39
|
-
L.style = a;
|
|
30
|
+
a.style = l;
|
|
40
31
|
export {
|
|
41
32
|
h as copy_icon,
|
|
42
33
|
n as delete_icon,
|
|
43
|
-
|
|
44
|
-
L as eye_icon
|
|
34
|
+
a as eye_icon
|
|
45
35
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index-db48e0b6.cjs");require("react");require("react-dom");const h=".sc-copy-icon-h{display:flex}",n=h,s=class{constructor(t){e.registerInstance(this,t),this.width="16",this.height="16"}render(){return e.h("svg",{key:"0f2555a15e81073aa55521da727d65cfc18cb4cb",width:this.width,height:this.height,fill:"none",xmlns:"http://www.w3.org/2000/svg"},e.h("path",{key:"6e368efe2876f25a95a5a8650ea358031b233784",d:"M4 0.75C2.89543 0.75 2 1.64543 2 2.75V12.75C2 13.8546 2.89543 14.75 4 14.75H10C11.1046 14.75 12 13.8546 12 12.75V2.75C12 1.64543 11.1046 0.75 10 0.75H4ZM3 2.75C3 2.19772 3.44772 1.75 4 1.75H10C10.5523 1.75 11 2.19772 11 2.75V12.75C11 13.3023 10.5523 13.75 10 13.75H4C3.44772 13.75 3 13.3023 3 12.75V2.75ZM0 4.75001C0 4.00973 0.402199 3.36339 1 3.01758V13.25C1 14.6307 2.11929 15.75 3.5 15.75H9.73244C9.38663 16.3478 8.74028 16.75 8 16.75H3.5C1.567 16.75 0 15.183 0 13.25V4.75001Z",fill:"currentColor"}))}};s.style=n;const C=".sc-delete-icon-h{display:flex}",o=C,c=class{constructor(t){e.registerInstance(this,t),this.width="15",this.height="17"}render(){return e.h("svg",{key:"82df5832a012243a03e34a26bd5682eb679257ee",width:this.width,height:this.height,fill:"none",xmlns:"http://www.w3.org/2000/svg"},e.h("path",{key:"ffb833566886c5c3b0b3c337bb449c09c88c4218",d:"M9.5 2.75C9.5 1.92157 8.82843 1.25 8 1.25C7.17157 1.25 6.5 1.92157 6.5 2.75H5.5C5.5 1.36929 6.61929 0.25 8 0.25C9.38071 0.25 10.5 1.36929 10.5 2.75H15C15.2761 2.75 15.5 2.97386 15.5 3.25C15.5 3.52614 15.2761 3.75 15 3.75H14.446L13.1499 14.9792C13.0335 15.9884 12.179 16.75 11.1631 16.75H4.83688C3.821 16.75 2.9665 15.9884 2.85006 14.9792L1.553 3.75H1C0.75454 3.75 0.550392 3.57312 0.508056 3.33988L0.5 3.25C0.5 2.97386 0.723858 2.75 1 2.75H9.5ZM13.438 3.75H2.561L3.84347 14.8646C3.90169 15.3692 4.32894 15.75 4.83688 15.75H11.1631C11.6711 15.75 12.0983 15.3692 12.1565 14.8646L13.438 3.75ZM6.5 6.25C6.74546 6.25 6.94961 6.40477 6.99194 6.60886L7 6.6875V12.8125C7 13.0541 6.77614 13.25 6.5 13.25C6.25454 13.25 6.05039 13.0952 6.00806 12.8911L6 12.8125V6.6875C6 6.44588 6.22386 6.25 6.5 6.25ZM9.5 6.25C9.74546 6.25 9.94961 6.40477 9.99194 6.60886L10 6.6875V12.8125C10 13.0541 9.77614 13.25 9.5 13.25C9.25454 13.25 9.05039 13.0952 9.00806 12.8911L9 12.8125V6.6875C9 6.44588 9.22386 6.25 9.5 6.25Z",fill:"currentColor"}))}};c.style=o;const r=".sc-eye-icon-h{display:flex}",l=r,i=class{constructor(t){e.registerInstance(this,t),this.width="16",this.height="16"}render(){return e.h("svg",{key:"91ba63fd0c847ac3dc8b974fa6bf86af34b91b8e",width:this.width,height:this.height,fill:"none",xmlns:"http://www.w3.org/2000/svg"},e.h("path",{key:"6edd77db7fcf2a506088beb9df2aa031e96c349d",d:"M1.25909 7.35214C1.94254 4.07689 4.79437 1.75 8.00002 1.75C11.2057 1.75 14.0574 4.07688 14.7409 7.35215C14.7974 7.62246 15.0622 7.79587 15.3325 7.73946C15.6029 7.68304 15.7763 7.41817 15.7199 7.14785C14.9425 3.42312 11.6934 0.75 8.00002 0.75C4.3066 0.75 1.05742 3.42311 0.280175 7.14786C0.223767 7.41818 0.397177 7.68305 0.667497 7.73946C0.937817 7.79587 1.20268 7.62246 1.25909 7.35214ZM7.98953 3.75C9.92253 3.75 11.4895 5.317 11.4895 7.25C11.4895 9.18299 9.92253 10.75 7.98953 10.75C6.05653 10.75 4.48953 9.18299 4.48953 7.25C4.48953 5.317 6.05653 3.75 7.98953 3.75Z",fill:"currentColor"}))}};i.style=l;exports.copy_icon=s;exports.delete_icon=c;exports.eye_icon=i;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index-db48e0b6.cjs");require("react");require("react-dom");const a=".sc-document-refresh-icon-h{display:flex}",d=a,t=class{constructor(c){e.registerInstance(this,c),this.width="18",this.height="18"}render(){return e.h("svg",{key:"a3053bd3d13a837950938ece6ddbe01039144e30",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 18 18",width:this.width,height:this.height},e.h("rect",{key:"a84576d67949e16b509fab6baed89b6cd8120b28",id:"Canvas",fill:"#ff13dc",opacity:"0"}),e.h("path",{key:"00e92a704614a8690f2853d57d813b905bfbef2c",d:"M9.19763,12.26283A4.44131,4.44131,0,0,1,16.948,10.71741l.62524-.62524a.24433.24433,0,0,1,.1748-.07373.25035.25035,0,0,1,.252.24875v2.50143a.25.25,0,0,1-.25.25l-2.4995-.00016A.25088.25088,0,0,1,15,12.76721v-.00054a.24436.24436,0,0,1,.07373-.175l.86988-.86987a3.02827,3.02827,0,0,0-5.29847.71808.48835.48835,0,0,1-.46081.30981H9.55908a.37949.37949,0,0,1-.36145-.48686Z"}),e.h("path",{key:"33c4dfb07d0118088a615869e19b7f2d65dc9e6d",d:"M17.80237,14.77441A4.4413,4.4413,0,0,1,10.052,16.31982l-.62524.62524a.24429.24429,0,0,1-.1748.07373A.25036.25036,0,0,1,9,16.77V14.26863a.25.25,0,0,1,.25-.25l2.4995.00016A.25087.25087,0,0,1,12,14.27v.00052a.24434.24434,0,0,1-.07373.175l-.86988.86988a3.02828,3.02828,0,0,0,5.29847-.71808.48836.48836,0,0,1,.46081-.30982h.62525a.3795.3795,0,0,1,.36145.48687Z"}),e.h("path",{key:"b3966127005c056d0c95a13307ccf18cd2fb6651",d:"M7,13.5A6.5,6.5,0,0,1,13.5,7c.16883,0,.33447.01264.5.02527V5H9.5A.5.5,0,0,1,9,4.5V0H2.5A.5.5,0,0,0,2,.5v15a.5.5,0,0,0,.5.5H7.49981A6.4779,6.4779,0,0,1,7,13.5Z"}),e.h("path",{key:"84c8c1f068a86fc739e16ae7fab5c4a16cf5516f",d:"M10,0h.043a.5.5,0,0,1,.353.146L13.854,3.6A.5.5,0,0,1,14,3.957V4H10Z"}))}};t.style=d;exports.document_refresh_icon=t;
|
package/dist/{document-refresh-icon.entry-f0d95ac8.js → document-refresh-icon.entry-6dd65cb6.js}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { r as t, h as e } from "./index-
|
|
1
|
+
import { r as t, h as e } from "./index-f8317a8e.js";
|
|
2
2
|
import "react";
|
|
3
3
|
import "react-dom";
|
|
4
4
|
const c = ".sc-document-refresh-icon-h{display:flex}", d = c, s = class {
|
|
@@ -6,7 +6,7 @@ const c = ".sc-document-refresh-icon-h{display:flex}", d = c, s = class {
|
|
|
6
6
|
t(this, a), this.width = "18", this.height = "18";
|
|
7
7
|
}
|
|
8
8
|
render() {
|
|
9
|
-
return e("svg", { key: "
|
|
9
|
+
return e("svg", { key: "a3053bd3d13a837950938ece6ddbe01039144e30", xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 18 18", width: this.width, height: this.height }, e("rect", { key: "a84576d67949e16b509fab6baed89b6cd8120b28", id: "Canvas", fill: "#ff13dc", opacity: "0" }), e("path", { key: "00e92a704614a8690f2853d57d813b905bfbef2c", d: "M9.19763,12.26283A4.44131,4.44131,0,0,1,16.948,10.71741l.62524-.62524a.24433.24433,0,0,1,.1748-.07373.25035.25035,0,0,1,.252.24875v2.50143a.25.25,0,0,1-.25.25l-2.4995-.00016A.25088.25088,0,0,1,15,12.76721v-.00054a.24436.24436,0,0,1,.07373-.175l.86988-.86987a3.02827,3.02827,0,0,0-5.29847.71808.48835.48835,0,0,1-.46081.30981H9.55908a.37949.37949,0,0,1-.36145-.48686Z" }), e("path", { key: "33c4dfb07d0118088a615869e19b7f2d65dc9e6d", d: "M17.80237,14.77441A4.4413,4.4413,0,0,1,10.052,16.31982l-.62524.62524a.24429.24429,0,0,1-.1748.07373A.25036.25036,0,0,1,9,16.77V14.26863a.25.25,0,0,1,.25-.25l2.4995.00016A.25087.25087,0,0,1,12,14.27v.00052a.24434.24434,0,0,1-.07373.175l-.86988.86988a3.02828,3.02828,0,0,0,5.29847-.71808.48836.48836,0,0,1,.46081-.30982h.62525a.3795.3795,0,0,1,.36145.48687Z" }), e("path", { key: "b3966127005c056d0c95a13307ccf18cd2fb6651", d: "M7,13.5A6.5,6.5,0,0,1,13.5,7c.16883,0,.33447.01264.5.02527V5H9.5A.5.5,0,0,1,9,4.5V0H2.5A.5.5,0,0,0,2,.5v15a.5.5,0,0,0,.5.5H7.49981A6.4779,6.4779,0,0,1,7,13.5Z" }), e("path", { key: "84c8c1f068a86fc739e16ae7fab5c4a16cf5516f", d: "M10,0h.043a.5.5,0,0,1,.353.146L13.854,3.6A.5.5,0,0,1,14,3.957V4H10Z" }));
|
|
10
10
|
}
|
|
11
11
|
};
|
|
12
12
|
s.style = d;
|
package/dist/elements/index.d.ts
CHANGED
|
@@ -14,6 +14,7 @@ export declare const CalendarInfoIcon: import("react").ForwardRefExoticComponent
|
|
|
14
14
|
export declare const CalendarPatternsIcon: import("react").ForwardRefExoticComponent<JSX.CalendarPatternsIcon & Omit<import("react").HTMLAttributes<HTMLCalendarPatternsIconElement>, "style"> & import("./react-component-lib/interfaces").StyleReactProps & import("react").RefAttributes<HTMLCalendarPatternsIconElement>>;
|
|
15
15
|
export declare const CheckboxComponent: import("react").ForwardRefExoticComponent<JSX.CheckboxComponent & Omit<import("react").HTMLAttributes<HTMLCheckboxComponentElement>, "style"> & import("./react-component-lib/interfaces").StyleReactProps & import("react").RefAttributes<HTMLCheckboxComponentElement>>;
|
|
16
16
|
export declare const CheckmarkCircleIcon: import("react").ForwardRefExoticComponent<JSX.CheckmarkCircleIcon & Omit<import("react").HTMLAttributes<HTMLCheckmarkCircleIconElement>, "style"> & import("./react-component-lib/interfaces").StyleReactProps & import("react").RefAttributes<HTMLCheckmarkCircleIconElement>>;
|
|
17
|
+
export declare const CheckmarkIcon: import("react").ForwardRefExoticComponent<JSX.CheckmarkIcon & Omit<import("react").HTMLAttributes<HTMLCheckmarkIconElement>, "style"> & import("./react-component-lib/interfaces").StyleReactProps & import("react").RefAttributes<HTMLCheckmarkIconElement>>;
|
|
17
18
|
export declare const ChevronIcon: import("react").ForwardRefExoticComponent<JSX.ChevronIcon & Omit<import("react").HTMLAttributes<HTMLChevronIconElement>, "style"> & import("./react-component-lib/interfaces").StyleReactProps & import("react").RefAttributes<HTMLChevronIconElement>>;
|
|
18
19
|
export declare const ClockIcon: import("react").ForwardRefExoticComponent<JSX.ClockIcon & Omit<import("react").HTMLAttributes<HTMLClockIconElement>, "style"> & import("./react-component-lib/interfaces").StyleReactProps & import("react").RefAttributes<HTMLClockIconElement>>;
|
|
19
20
|
export declare const CloseIcon: import("react").ForwardRefExoticComponent<JSX.CloseIcon & Omit<import("react").HTMLAttributes<HTMLCloseIconElement>, "style"> & import("./react-component-lib/interfaces").StyleReactProps & import("react").RefAttributes<HTMLCloseIconElement>>;
|
|
@@ -22,6 +23,8 @@ export declare const DeleteIcon: import("react").ForwardRefExoticComponent<JSX.D
|
|
|
22
23
|
export declare const DocumentRefreshIcon: import("react").ForwardRefExoticComponent<JSX.DocumentRefreshIcon & Omit<import("react").HTMLAttributes<HTMLDocumentRefreshIconElement>, "style"> & import("./react-component-lib/interfaces").StyleReactProps & import("react").RefAttributes<HTMLDocumentRefreshIconElement>>;
|
|
23
24
|
export declare const DragableIcon: import("react").ForwardRefExoticComponent<JSX.DragableIcon & Omit<import("react").HTMLAttributes<HTMLDragableIconElement>, "style"> & import("./react-component-lib/interfaces").StyleReactProps & import("react").RefAttributes<HTMLDragableIconElement>>;
|
|
24
25
|
export declare const EditIcon: import("react").ForwardRefExoticComponent<JSX.EditIcon & Omit<import("react").HTMLAttributes<HTMLEditIconElement>, "style"> & import("./react-component-lib/interfaces").StyleReactProps & import("react").RefAttributes<HTMLEditIconElement>>;
|
|
26
|
+
export declare const EnvelopeFillIcon: import("react").ForwardRefExoticComponent<JSX.EnvelopeFillIcon & Omit<import("react").HTMLAttributes<HTMLEnvelopeFillIconElement>, "style"> & import("./react-component-lib/interfaces").StyleReactProps & import("react").RefAttributes<HTMLEnvelopeFillIconElement>>;
|
|
27
|
+
export declare const EnvelopeIcon: import("react").ForwardRefExoticComponent<JSX.EnvelopeIcon & Omit<import("react").HTMLAttributes<HTMLEnvelopeIconElement>, "style"> & import("./react-component-lib/interfaces").StyleReactProps & import("react").RefAttributes<HTMLEnvelopeIconElement>>;
|
|
25
28
|
export declare const EyeIcon: import("react").ForwardRefExoticComponent<JSX.EyeIcon & Omit<import("react").HTMLAttributes<HTMLEyeIconElement>, "style"> & import("./react-component-lib/interfaces").StyleReactProps & import("react").RefAttributes<HTMLEyeIconElement>>;
|
|
26
29
|
export declare const FlowIcon: import("react").ForwardRefExoticComponent<JSX.FlowIcon & Omit<import("react").HTMLAttributes<HTMLFlowIconElement>, "style"> & import("./react-component-lib/interfaces").StyleReactProps & import("react").RefAttributes<HTMLFlowIconElement>>;
|
|
27
30
|
export declare const FolderIcon: import("react").ForwardRefExoticComponent<JSX.FolderIcon & Omit<import("react").HTMLAttributes<HTMLFolderIconElement>, "style"> & import("./react-component-lib/interfaces").StyleReactProps & import("react").RefAttributes<HTMLFolderIconElement>>;
|
|
@@ -52,6 +55,7 @@ export declare const NylasCancelBookingForm: import("react").ForwardRefExoticCom
|
|
|
52
55
|
export declare const NylasCancellationPolicy: import("react").ForwardRefExoticComponent<JSX.NylasCancellationPolicy & Omit<import("react").HTMLAttributes<HTMLNylasCancellationPolicyElement>, "style"> & import("./react-component-lib/interfaces").StyleReactProps & import("react").RefAttributes<HTMLNylasCancellationPolicyElement>>;
|
|
53
56
|
export declare const NylasCancelledEventCard: import("react").ForwardRefExoticComponent<JSX.NylasCancelledEventCard & Omit<import("react").HTMLAttributes<HTMLNylasCancelledEventCardElement>, "style"> & import("./react-component-lib/interfaces").StyleReactProps & import("react").RefAttributes<HTMLNylasCancelledEventCardElement>>;
|
|
54
57
|
export declare const NylasComposer: import("react").ForwardRefExoticComponent<JSX.NylasComposer & Omit<import("react").HTMLAttributes<HTMLNylasComposerElement>, "style"> & import("./react-component-lib/interfaces").StyleReactProps & import("react").RefAttributes<HTMLNylasComposerElement>>;
|
|
58
|
+
export declare const NylasConfirmationEmail: import("react").ForwardRefExoticComponent<JSX.NylasConfirmationEmail & Omit<import("react").HTMLAttributes<HTMLNylasConfirmationEmailElement>, "style"> & import("./react-component-lib/interfaces").StyleReactProps & import("react").RefAttributes<HTMLNylasConfirmationEmailElement>>;
|
|
55
59
|
export declare const NylasConnectedCalendars: import("react").ForwardRefExoticComponent<JSX.NylasConnectedCalendars & Omit<import("react").HTMLAttributes<HTMLNylasConnectedCalendarsElement>, "style"> & import("./react-component-lib/interfaces").StyleReactProps & import("react").RefAttributes<HTMLNylasConnectedCalendarsElement>>;
|
|
56
60
|
export declare const NylasCustomBookingFlow: import("react").ForwardRefExoticComponent<JSX.NylasCustomBookingFlow & Omit<import("react").HTMLAttributes<HTMLNylasCustomBookingFlowElement>, "style"> & import("./react-component-lib/interfaces").StyleReactProps & import("react").RefAttributes<HTMLNylasCustomBookingFlowElement>>;
|
|
57
61
|
export declare const NylasCustomizeBookingSettings: import("react").ForwardRefExoticComponent<JSX.NylasCustomizeBookingSettings & Omit<import("react").HTMLAttributes<HTMLNylasCustomizeBookingSettingsElement>, "style"> & import("./react-component-lib/interfaces").StyleReactProps & import("react").RefAttributes<HTMLNylasCustomizeBookingSettingsElement>>;
|
|
@@ -81,6 +85,8 @@ export declare const NylasNotification: import("react").ForwardRefExoticComponen
|
|
|
81
85
|
export declare const NylasParticipantBookingCalendars: import("react").ForwardRefExoticComponent<JSX.NylasParticipantBookingCalendars & Omit<import("react").HTMLAttributes<HTMLNylasParticipantBookingCalendarsElement>, "style"> & import("./react-component-lib/interfaces").StyleReactProps & import("react").RefAttributes<HTMLNylasParticipantBookingCalendarsElement>>;
|
|
82
86
|
export declare const NylasParticipantsCustomAvailability: import("react").ForwardRefExoticComponent<JSX.NylasParticipantsCustomAvailability & Omit<import("react").HTMLAttributes<HTMLNylasParticipantsCustomAvailabilityElement>, "style"> & import("./react-component-lib/interfaces").StyleReactProps & import("react").RefAttributes<HTMLNylasParticipantsCustomAvailabilityElement>>;
|
|
83
87
|
export declare const NylasProvider: import("react").ForwardRefExoticComponent<JSX.NylasProvider & Omit<import("react").HTMLAttributes<HTMLNylasProviderElement>, "style"> & import("./react-component-lib/interfaces").StyleReactProps & import("react").RefAttributes<HTMLNylasProviderElement>>;
|
|
88
|
+
export declare const NylasReminderEmails: import("react").ForwardRefExoticComponent<JSX.NylasReminderEmails & Omit<import("react").HTMLAttributes<HTMLNylasReminderEmailsElement>, "style"> & import("./react-component-lib/interfaces").StyleReactProps & import("react").RefAttributes<HTMLNylasReminderEmailsElement>>;
|
|
89
|
+
export declare const NylasReminderTime: import("react").ForwardRefExoticComponent<JSX.NylasReminderTime & Omit<import("react").HTMLAttributes<HTMLNylasReminderTimeElement>, "style"> & import("./react-component-lib/interfaces").StyleReactProps & import("react").RefAttributes<HTMLNylasReminderTimeElement>>;
|
|
84
90
|
export declare const NylasSchedulerEditor: import("react").ForwardRefExoticComponent<JSX.NylasSchedulerEditor & Omit<import("react").HTMLAttributes<HTMLNylasSchedulerEditorElement>, "style"> & import("./react-component-lib/interfaces").StyleReactProps & import("react").RefAttributes<HTMLNylasSchedulerEditorElement>>;
|
|
85
91
|
export declare const NylasScheduling: import("react").ForwardRefExoticComponent<JSX.NylasScheduling & Omit<import("react").HTMLAttributes<HTMLNylasSchedulingElement>, "style"> & import("./react-component-lib/interfaces").StyleReactProps & import("react").RefAttributes<HTMLNylasSchedulingElement>>;
|
|
86
92
|
export declare const NylasSelectedEventCard: import("react").ForwardRefExoticComponent<JSX.NylasSelectedEventCard & Omit<import("react").HTMLAttributes<HTMLNylasSelectedEventCardElement>, "style"> & import("./react-component-lib/interfaces").StyleReactProps & import("react").RefAttributes<HTMLNylasSelectedEventCardElement>>;
|
|
@@ -93,6 +99,7 @@ export declare const NylasTimeslotPicker: import("react").ForwardRefExoticCompon
|
|
|
93
99
|
export declare const NylasViewEmail: import("react").ForwardRefExoticComponent<JSX.NylasViewEmail & Omit<import("react").HTMLAttributes<HTMLNylasViewEmailElement>, "style"> & import("./react-component-lib/interfaces").StyleReactProps & import("react").RefAttributes<HTMLNylasViewEmailElement>>;
|
|
94
100
|
export declare const NylasViewThread: import("react").ForwardRefExoticComponent<JSX.NylasViewThread & Omit<import("react").HTMLAttributes<HTMLNylasViewThreadElement>, "style"> & import("./react-component-lib/interfaces").StyleReactProps & import("react").RefAttributes<HTMLNylasViewThreadElement>>;
|
|
95
101
|
export declare const PeopleIcon: import("react").ForwardRefExoticComponent<JSX.PeopleIcon & Omit<import("react").HTMLAttributes<HTMLPeopleIconElement>, "style"> & import("./react-component-lib/interfaces").StyleReactProps & import("react").RefAttributes<HTMLPeopleIconElement>>;
|
|
102
|
+
export declare const PersonClipboardIcon: import("react").ForwardRefExoticComponent<JSX.PersonClipboardIcon & Omit<import("react").HTMLAttributes<HTMLPersonClipboardIconElement>, "style"> & import("./react-component-lib/interfaces").StyleReactProps & import("react").RefAttributes<HTMLPersonClipboardIconElement>>;
|
|
96
103
|
export declare const PersonIcon: import("react").ForwardRefExoticComponent<JSX.PersonIcon & Omit<import("react").HTMLAttributes<HTMLPersonIconElement>, "style"> & import("./react-component-lib/interfaces").StyleReactProps & import("react").RefAttributes<HTMLPersonIconElement>>;
|
|
97
104
|
export declare const PlayIcon: import("react").ForwardRefExoticComponent<JSX.PlayIcon & Omit<import("react").HTMLAttributes<HTMLPlayIconElement>, "style"> & import("./react-component-lib/interfaces").StyleReactProps & import("react").RefAttributes<HTMLPlayIconElement>>;
|
|
98
105
|
export declare const PlusIcon: import("react").ForwardRefExoticComponent<JSX.PlusIcon & Omit<import("react").HTMLAttributes<HTMLPlusIconElement>, "style"> & import("./react-component-lib/interfaces").StyleReactProps & import("react").RefAttributes<HTMLPlusIconElement>>;
|
|
@@ -111,6 +118,7 @@ export declare const TimePeriodSelector: import("react").ForwardRefExoticCompone
|
|
|
111
118
|
export declare const ToggleSwitch: import("react").ForwardRefExoticComponent<JSX.ToggleSwitch & Omit<import("react").HTMLAttributes<HTMLToggleSwitchElement>, "style"> & import("./react-component-lib/interfaces").StyleReactProps & import("react").RefAttributes<HTMLToggleSwitchElement>>;
|
|
112
119
|
export declare const TooltipComponent: import("react").ForwardRefExoticComponent<JSX.TooltipComponent & Omit<import("react").HTMLAttributes<HTMLTooltipComponentElement>, "style"> & import("./react-component-lib/interfaces").StyleReactProps & import("react").RefAttributes<HTMLTooltipComponentElement>>;
|
|
113
120
|
export declare const TranslateIcon: import("react").ForwardRefExoticComponent<JSX.TranslateIcon & Omit<import("react").HTMLAttributes<HTMLTranslateIconElement>, "style"> & import("./react-component-lib/interfaces").StyleReactProps & import("react").RefAttributes<HTMLTranslateIconElement>>;
|
|
121
|
+
export declare const TrashFillIcon: import("react").ForwardRefExoticComponent<JSX.TrashFillIcon & Omit<import("react").HTMLAttributes<HTMLTrashFillIconElement>, "style"> & import("./react-component-lib/interfaces").StyleReactProps & import("react").RefAttributes<HTMLTrashFillIconElement>>;
|
|
114
122
|
export declare const TrashIcon: import("react").ForwardRefExoticComponent<JSX.TrashIcon & Omit<import("react").HTMLAttributes<HTMLTrashIconElement>, "style"> & import("./react-component-lib/interfaces").StyleReactProps & import("react").RefAttributes<HTMLTrashIconElement>>;
|
|
115
123
|
export declare const UnderlineIcon: import("react").ForwardRefExoticComponent<JSX.UnderlineIcon & Omit<import("react").HTMLAttributes<HTMLUnderlineIconElement>, "style"> & import("./react-component-lib/interfaces").StyleReactProps & import("react").RefAttributes<HTMLUnderlineIconElement>>;
|
|
116
124
|
export declare const WarningIcon: import("react").ForwardRefExoticComponent<JSX.WarningIcon & Omit<import("react").HTMLAttributes<HTMLWarningIconElement>, "style"> & import("./react-component-lib/interfaces").StyleReactProps & import("react").RefAttributes<HTMLWarningIconElement>>;
|
|
@@ -169,7 +169,7 @@ var(--spectrum-accordion-item-header-line-height)
|
|
|
169
169
|
@slotchange=${this.handleSlotchange}
|
|
170
170
|
@sp-accordion-item-toggle=${this.onToggle}
|
|
171
171
|
></slot>
|
|
172
|
-
`}}zs([i({type:Boolean,reflect:!0,attribute:"allow-multiple"})],Bo.prototype,"allowMultiple",2),zs([i({type:String,reflect:!0})],Bo.prototype,"density",2),zs([oo()],Bo.prototype,"defaultNodes",2);function v(s,t){customElements.define(s,t)}v("sp-accordion",Bo);let ea=!0;try{document.body.querySelector(":focus-visible")}catch{ea=!1,Promise.resolve().then(()=>require("./focus-visible-e8093c16-
|
|
172
|
+
`}}zs([i({type:Boolean,reflect:!0,attribute:"allow-multiple"})],Bo.prototype,"allowMultiple",2),zs([i({type:String,reflect:!0})],Bo.prototype,"density",2),zs([oo()],Bo.prototype,"defaultNodes",2);function v(s,t){customElements.define(s,t)}v("sp-accordion",Bo);let ea=!0;try{document.body.querySelector(":focus-visible")}catch{ea=!1,Promise.resolve().then(()=>require("./focus-visible-e8093c16-5883a317.cjs")).then(function(t){return t.f})}const Qt=s=>{var t;const e=a=>{if(a.shadowRoot==null||a.hasAttribute("data-js-focus-visible"))return()=>{};if(self.applyFocusVisiblePolyfill)self.applyFocusVisiblePolyfill(a.shadowRoot),a.manageAutoFocus&&a.manageAutoFocus();else{const c=()=>{self.applyFocusVisiblePolyfill&&a.shadowRoot&&self.applyFocusVisiblePolyfill(a.shadowRoot),a.manageAutoFocus&&a.manageAutoFocus()};return self.addEventListener("focus-visible-polyfill-ready",c,{once:!0}),()=>{self.removeEventListener("focus-visible-polyfill-ready",c)}}return()=>{}},r=Symbol("endPolyfillCoordination");class o extends s{constructor(){super(...arguments),this[t]=null}connectedCallback(){super.connectedCallback&&super.connectedCallback(),ea||requestAnimationFrame(()=>{this[r]==null&&(this[r]=e(this))})}disconnectedCallback(){super.disconnectedCallback&&super.disconnectedCallback(),ea||requestAnimationFrame(()=>{this[r]!=null&&(this[r](),this[r]=null)})}}return t=r,o};var Dl=Object.defineProperty,Bl=Object.getOwnPropertyDescriptor,$s=(s,t,e,r)=>{for(var o=r>1?void 0:r?Bl(t,e):t,a=s.length-1,c;a>=0;a--)(c=s[a])&&(o=(r?c(t,e,o):c(o))||o);return r&&o&&Dl(t,e,o),o};function yc(){return new Promise(s=>requestAnimationFrame(()=>s()))}class L extends Qt($){constructor(){super(...arguments),this.disabled=!1,this.autofocus=!1,this._tabIndex=0,this.manipulatingTabindex=!1,this._recentlyConnected=!1}get tabIndex(){if(this.focusElement===this){const e=this.hasAttribute("tabindex")?Number(this.getAttribute("tabindex")):NaN;return isNaN(e)?-1:e}const t=parseFloat(this.hasAttribute("tabindex")&&this.getAttribute("tabindex")||"0");return this.disabled||t<0?-1:this.focusElement?this.focusElement.tabIndex:t}set tabIndex(t){if(this.manipulatingTabindex){this.manipulatingTabindex=!1;return}if(this.focusElement===this){if(t!==this._tabIndex){this._tabIndex=t;const e=this.disabled?"-1":""+t;this.manipulatingTabindex=!0,this.setAttribute("tabindex",e)}return}if(t===-1?this.addEventListener("pointerdown",this.onPointerdownManagementOfTabIndex):(this.manipulatingTabindex=!0,this.removeEventListener("pointerdown",this.onPointerdownManagementOfTabIndex)),t===-1||this.disabled){this.setAttribute("tabindex","-1"),this.removeAttribute("focusable"),t!==-1&&this.manageFocusElementTabindex(t);return}this.setAttribute("focusable",""),this.hasAttribute("tabindex")?this.removeAttribute("tabindex"):this.manipulatingTabindex=!1,this.manageFocusElementTabindex(t)}onPointerdownManagementOfTabIndex(){this.tabIndex===-1&&(this.tabIndex=0,this.focus({preventScroll:!0}))}async manageFocusElementTabindex(t){this.focusElement||await this.updateComplete,t===null?this.focusElement.removeAttribute("tabindex"):this.focusElement.tabIndex=t}get focusElement(){throw new Error("Must implement focusElement getter!")}focus(t){this.disabled||!this.focusElement||(this.focusElement!==this?this.focusElement.focus(t):HTMLElement.prototype.focus.apply(this,[t]))}blur(){const t=this.focusElement||this;t!==this?t.blur():HTMLElement.prototype.blur.apply(this)}click(){if(this.disabled)return;const t=this.focusElement||this;t!==this?t.click():HTMLElement.prototype.click.apply(this)}manageAutoFocus(){this.autofocus&&(this.dispatchEvent(new KeyboardEvent("keydown",{code:"Tab"})),this.focusElement.focus())}firstUpdated(t){super.firstUpdated(t),(!this.hasAttribute("tabindex")||this.getAttribute("tabindex")!=="-1")&&this.setAttribute("focusable","")}update(t){t.has("disabled")&&this.handleDisabledChanged(this.disabled,t.get("disabled")),super.update(t)}updated(t){super.updated(t),t.has("disabled")&&this.disabled&&this.blur()}async handleDisabledChanged(t,e){const r=()=>this.focusElement!==this&&typeof this.focusElement.disabled<"u";t?(this.manipulatingTabindex=!0,this.setAttribute("tabindex","-1"),await this.updateComplete,r()?this.focusElement.disabled=!0:this.setAttribute("aria-disabled","true")):e&&(this.manipulatingTabindex=!0,this.focusElement===this?this.setAttribute("tabindex",""+this._tabIndex):this.removeAttribute("tabindex"),await this.updateComplete,r()?this.focusElement.disabled=!1:this.removeAttribute("aria-disabled"))}async getUpdateComplete(){const t=await super.getUpdateComplete();return this._recentlyConnected&&(this._recentlyConnected=!1,await yc(),await yc()),t}connectedCallback(){super.connectedCallback(),this._recentlyConnected=!0,this.updateComplete.then(()=>{this.manageAutoFocus()})}}$s([i({type:Boolean,reflect:!0})],L.prototype,"disabled",2),$s([i({type:Boolean})],L.prototype,"autofocus",2),$s([i({type:Number})],L.prototype,"tabIndex",1);/**
|
|
173
173
|
* @license
|
|
174
174
|
* Copyright 2018 Google LLC
|
|
175
175
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
@@ -1067,7 +1067,7 @@ let ea = !0;
|
|
|
1067
1067
|
try {
|
|
1068
1068
|
document.body.querySelector(":focus-visible");
|
|
1069
1069
|
} catch {
|
|
1070
|
-
ea = !1, import("./focus-visible-e8093c16-
|
|
1070
|
+
ea = !1, import("./focus-visible-e8093c16-9d88e8ee.js").then(function(t) {
|
|
1071
1071
|
return t.f;
|
|
1072
1072
|
});
|
|
1073
1073
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const T=require("./index-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const T=require("./index-db48e0b6.cjs");require("react");require("react-dom");var f={exports:{}};(function(V,A){(function(r,i){i()})(T.commonjsGlobal,function(){function r(n){var o=!0,u=!1,a=null,v={text:!0,search:!0,url:!0,tel:!0,email:!0,password:!0,number:!0,date:!0,month:!0,week:!0,time:!0,datetime:!0,"datetime-local":!0};function s(e){return!!(e&&e!==document&&e.nodeName!=="HTML"&&e.nodeName!=="BODY"&&"classList"in e&&"contains"in e.classList)}function b(e){var g=e.type,l=e.tagName;return!!(l==="INPUT"&&v[g]&&!e.readOnly||l==="TEXTAREA"&&!e.readOnly||e.isContentEditable)}function c(e){e.classList.contains("focus-visible")||(e.classList.add("focus-visible"),e.setAttribute("data-focus-visible-added",""))}function E(e){e.hasAttribute("data-focus-visible-added")&&(e.classList.remove("focus-visible"),e.removeAttribute("data-focus-visible-added"))}function L(e){e.metaKey||e.altKey||e.ctrlKey||(s(n.activeElement)&&c(n.activeElement),o=!0)}function d(e){o=!1}function y(e){s(e.target)&&(o||b(e.target))&&c(e.target)}function p(e){s(e.target)&&(e.target.classList.contains("focus-visible")||e.target.hasAttribute("data-focus-visible-added"))&&(u=!0,window.clearTimeout(a),a=window.setTimeout(function(){u=!1},100),E(e.target))}function w(e){document.visibilityState==="hidden"&&(u&&(o=!0),m())}function m(){document.addEventListener("mousemove",t),document.addEventListener("mousedown",t),document.addEventListener("mouseup",t),document.addEventListener("pointermove",t),document.addEventListener("pointerdown",t),document.addEventListener("pointerup",t),document.addEventListener("touchmove",t),document.addEventListener("touchstart",t),document.addEventListener("touchend",t)}function h(){document.removeEventListener("mousemove",t),document.removeEventListener("mousedown",t),document.removeEventListener("mouseup",t),document.removeEventListener("pointermove",t),document.removeEventListener("pointerdown",t),document.removeEventListener("pointerup",t),document.removeEventListener("touchmove",t),document.removeEventListener("touchstart",t),document.removeEventListener("touchend",t)}function t(e){e.target.nodeName&&e.target.nodeName.toLowerCase()==="html"||(o=!1,h())}document.addEventListener("keydown",L,!0),document.addEventListener("mousedown",d,!0),document.addEventListener("pointerdown",d,!0),document.addEventListener("touchstart",d,!0),document.addEventListener("visibilitychange",w,!0),m(),n.addEventListener("focus",y,!0),n.addEventListener("blur",p,!0),n.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&n.host?n.host.setAttribute("data-js-focus-visible",""):n.nodeType===Node.DOCUMENT_NODE&&(document.documentElement.classList.add("js-focus-visible"),document.documentElement.setAttribute("data-js-focus-visible",""))}if(typeof window<"u"&&typeof document<"u"){window.applyFocusVisiblePolyfill=r;var i;try{i=new CustomEvent("focus-visible-polyfill-ready")}catch{i=document.createEvent("CustomEvent"),i.initCustomEvent("focus-visible-polyfill-ready",!1,!1,{})}window.dispatchEvent(i)}typeof document<"u"&&r(document)})})();const N=f.exports,O=Object.freeze(Object.assign(Object.create(null),f.exports,{default:N}));exports.f=O;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("./index-d36b8fb8.cjs"),yn=require("./register-component-a5a9ca5d-eebf89e7.cjs");require("react");require("react-dom");const bn=".sc-forward-icon-h{display:flex}",En=bn,St=class{constructor(t){o.registerInstance(this,t),this.width="15",this.height="15"}render(){return o.h("svg",{key:"cb5aaea71d642a44a5f53655c7ae98190aaf3745",fill:"auto",width:this.width,height:this.height,viewBox:"0 0 1920 1920",xmlns:"http://www.w3.org/2000/svg"},o.h("path",{key:"e15b175864ce7c39e04c3885653da3f4d9f35fb1",d:"m1246.246 64-90.496 90.496 477.952 477.952h-590.848C467.878 632.448.038 1100.416.038 1675.392v109.056h128v-109.056c0-504.576 410.368-914.944 914.816-914.944h590.848l-477.952 478.08 90.496 90.496 632.448-632.576L1246.246 64Z","fill-rule":"evenodd"}))}};St.style=En;const Tn=':host{display:grid;color:var(--nylas-color-primary-900)}.editor{position:relative;display:block;max-height:300px;overflow:auto;padding:1rem;border:1px solid var(--nylas-color-primary-300)}.editor blockquote{visibility:hidden;overflow:hidden;position:relative;transition:height 0.3s ease;margin:0}.editor blockquote::before{content:"...";visibility:visible;opacity:1;position:absolute;top:0;left:0;background-color:var(--nylas-color-primary-300);width:20px;text-align:center;color:var(--nylas-color-primary-800);vertical-align:middle;display:flex;justify-content:center;align-items:center;align-self:center;cursor:pointer}.editor .collapsed{height:20px}.editor .expanded{visibility:visible;opacity:1;height:auto;margin:0px 0px 0px 0.8ex;border-left:1px solid var(--nylas-color-primary-300);padding-left:1rem}.editor .expanded::before{display:none;}.buttons{display:flex;margin-top:1rem;justify-content:space-between}.buttons sp-button{border-radius:var(--nylas-border-radius);background-color:var(--nylas-color-primary-400);color:var(--nylas-color-primary-900);fill:var(--nylas-color-primary-900)}.buttons sp-button:hover{background-color:var(--nylas-color-primary-500)}.buttons sp-button:disabled{background-color:var(--nylas-color-primary-200);color:var(--nylas-color-primary-600);cursor:not-allowed}.buttons sp-button chevron-icon{display:inline-block}.buttons .close{justify-self:end}.toolbar{position:absolute;display:none;background-color:var(--nylas-color-primary-200);border-radius:var(--nylas-border-radius);z-index:1}.toolbar sp-button{border:0}',An=Tn,Ct=class{constructor(t){o.registerInstance(this,t),this.close=o.createEvent(this,"close",7),this.send=o.createEvent(this,"send",7),this.closeComposer=i=>{this.close.emit(i)},this.sendComposer=i=>{var l;if(!this.editorEl){o.debug("no editor element");return}const f=this.editorEl.querySelector(".message-body");if(!f){o.debug("no message body");return}this.message&&(this.send.emit({message:this.message,replyBody:((l=f.querySelector(".message-body"))==null?void 0:l.innerHTML)||""}),this.close.emit(i),this.editorEl.innerHTML="")},this.message=void 0,this.viewEmailElement=void 0}connectedCallback(){}disconnectedCallback(){this.editorEl&&(this.editorEl.innerHTML="")}componentWillLoad(){}async componentDidLoad(){if(this.message&&this.watchBody(this.message),!this.editorEl){o.debug("[connectedCallback] no editor element");return}if(!this.toolbarEl){o.debug("[connectedCallback] no toolbar element");return}const t=this.editorEl,i=this.toolbarEl;t.addEventListener("mouseup",f=>{var B;const l=(B=this.host.shadowRoot)==null?void 0:B.getSelection();if(!l){o.debug("no selection");return}const p=l.getRangeAt(0),a=l.toString();if(!a){i.style.display="none";return}const m=t.querySelector(".message-body");if(!m){o.debug("no message body");return}const c=p.commonAncestorContainer.parentElement;if(!c)return;const E=m.getBoundingClientRect();o.debug("messageBodyRect",{messageBodyRect:E});const A=c.getBoundingClientRect();o.debug("foundRect",{foundRect:A});const le=(c.childNodes[0].textContent||"").indexOf(a),W=window.getComputedStyle(c).fontSize,j=parseInt(W.replace("px",""),10),te=A.top-E.top-i.clientHeight,ye=le*(1/j)*100;i.style.top=`${te}px`,i.style.left=`${ye}px`,i.style.display="block"})}watchBody(t){var a;if(!this.editorEl){o.debug("no editor element");return}this.editorEl.querySelectorAll(".message-body").forEach(m=>m.remove());const i=document.createElement("div");i.classList.add("message-body");const f=document.createElement("p");f.innerHTML=" ",i.appendChild(f);const l=document.createElement("br");i.appendChild(l);const p=document.createElement("div");if(p.classList.add("reply-text"),p.innerText=`On ${new Date(t.date*1e3).toLocaleDateString(void 0,{dateStyle:"full"})} <${(a=t.from)==null?void 0:a.map(m=>m.name||m.email).join(", ")}> wrote:`,i.appendChild(p),t.body){const m=document.createElement("html");m.innerHTML=t.body;const r=document.createElement("blockquote");r.classList.add("collapsed"),r.classList.add("gmail_quote"),r.innerHTML=m.innerHTML,i.appendChild(r),o.debug("replyContainer",{replyContainer:r})}this.editorEl.appendChild(i),this.editorEl.querySelectorAll("blockquote.collapsed").forEach(m=>{m.addEventListener("click",function(r){r.preventDefault();const c=r.target;c.classList.remove("collapsed"),c.classList.add("expanded")},{once:!0})}),this.editorEl.focus()}render(){return o.h(o.Host,{key:"a8cae87973663ced987b12f8a41385f3311910e5"},o.h("sp-theme",{key:"9b732690d1f0c529704c614955c603af602f1805",scale:"medium",color:"dark"},o.h("div",{key:"6f9da518afc2027bb938b50dced65383c83281f5",class:"editor",contentEditable:!0,ref:t=>this.editorEl=t},o.h("div",{key:"d665e4adebc7352b5c07137ead22793da96b1a6a",class:"toolbar",ref:t=>this.toolbarEl=t,contentEditable:!1},o.h("sp-button",{key:"cf4c80151daac614613530c7f3973fa44285b943",quiet:!0,onClick:()=>document.execCommand("bold")},o.h("div",{key:"406b64ee65391632212f69aab967cce595ef3145",slot:"icon"},o.h("bold-icon",{key:"38a82fba1133e28052ae18f59148056213c76e63"})),o.h("div",{key:"8ab054e1caa8da4d5745a991e0a2ad197124466b",slot:"label"},"Bold")),o.h("sp-button",{key:"52d7e1302c0624d4e1e5c337a412a5e0e3752914",quiet:!0,onClick:()=>document.execCommand("underline")},o.h("div",{key:"c64009e9818a9ccf0385f7cd2c8e3c9df2e08d0d",slot:"icon"},o.h("underline-icon",{key:"75de67cc0add37d483d564c1cae6486147ad6669"})),o.h("div",{key:"d46d90b0959349c237720890afd7b700a6f3cd71",slot:"label"},"Underline")),o.h("sp-button",{key:"af87cc784ed3c77e471ba54abbf7e18c3c391e1c",quiet:!0,onClick:()=>document.execCommand("italic")},o.h("div",{key:"0e1d03379b6f212fe9b0d080577f0633c2ce5c4a",slot:"icon"},o.h("italic-icon",{key:"6e127d2755fccaf634d6a261d95dc191bda77bd2"})),o.h("div",{key:"f2e251b97838ed752af350ed0dae3213a3a14e68",slot:"label"},"Italic")))),o.h("div",{key:"70399bf4636e5c061562c478504799b6fdf6e15c",class:"buttons"},o.h("sp-button",{key:"90d7d39c6dd284ea399425ea07e205f0562d1423",onClick:this.sendComposer,class:"send"},"Send"),o.h("sp-button",{key:"7a1cd27929d585a43b076b8e8131b01f6835aba7",onClick:this.closeComposer,class:"close"},"Close"))))}get host(){return o.getElement(this)}static get watchers(){return{message:["watchBody"]}}};Ct.style=An;const _n=":host{display:block}sp-button{padding:0;border:0;border-radius:var(--nylas-border-radius);min-block-size:50%;min-inline-size:2rem;background-color:var(--nylas-color-primary-300);fill:var(--nylas-color-primary-800)}sp-button:hover{background-color:var(--nylas-color-primary-400)}.summarize-button.stopped{animation:none}.summarize-button.playing{animation:pulse 2s infinite}.summarize-button.loading{display:flex;align-content:center;height:1.5rem;width:2rem;vertical-align:middle;animation:pulse 2s infinite;flex-wrap:wrap}.summarize-button.loading loading-icon{--dot-color:var(--nylas-color-primary-600)}@keyframes pulse{0%{transform:scale(1);box-shadow:0 0 0 0 var(--nylas-color-primary-300)}70%{transform:scale(1.05);box-shadow:0 0 0 10px rgba(255, 69, 0, 0)}100%{transform:scale(1);box-shadow:0 0 0 0 rgba(255, 69, 0, 0)}}@keyframes wave{0%{transform:translateX(0)}50%{transform:translateX(100%)}100%{transform:translateX(0)}}",wn=_n;var vn=function(t,i,f,l){var p=arguments.length,a=p<3?i:l===null?l=Object.getOwnPropertyDescriptor(i,f):l,m;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")a=Reflect.decorate(t,i,f,l);else for(var r=t.length-1;r>=0;r--)(m=t[r])&&(a=(p<3?m(a):p>3?m(i,f,a):m(i,f))||a);return p>3&&a&&Object.defineProperty(i,f,a),a},Fe=function(t,i){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(t,i)};const Be=class{constructor(t){o.registerInstance(this,t),this.summarize=o.createEvent(this,"summarize",7),this.abortController=new AbortController,this.onClick=async i=>{var f,l;i.preventDefault(),i.stopPropagation(),this.state==="stopped"?this.message&&(this.abortController=new AbortController,this.summarize.emit({abortController:this.abortController,playAudio:this.playAudio,message:this.message,updateState:this.updateState}).defaultPrevented||(o.debug("[nylas-summarize-message-button] Default event not prevented, summarizing message"),this.audioRef&&(await this.audioRef.play().then(()=>{var a;return(a=this.audioRef)==null?void 0:a.pause()}).catch(a=>console.error("Error playing audio:",a)),await this.audioRef.play().catch(a=>console.error("Error playing audio:",a))))):this.state==="playing"?((f=this.abortController)==null||f.abort(),(l=this.audioRef)==null||l.pause()):this.state="stopped"},this.message=void 0,this.state="stopped",this.playAudio=this.playAudio.bind(this),this.updateState=this.updateState.bind(this)}connectedCallback(){}disconnectedCallback(){}async componentWillLoad(){o.debug("[nylas-summarize-message-button] Component will load")}async componentDidLoad(){o.debug("[nylas-summarize-message-button] Component did load")}async updateState(t){this.state=t}async playAudio(t){if(!this.audioRef){this.state="stopped";return}if(!t){this.state="stopped";return}const i=this.audioRef;if(!("MediaSource"in window)){const r=await t;if(r==null)throw new Error("ReadableStream not yet supported in this browser.");const c=r.getReader(),E=[];await this.readChunk(c,E);const A=new Blob(E,{type:"audio/mpeg"}),M=URL.createObjectURL(A);i.src=M;return}const f=new MediaSource;let l,p=!1;i.src=URL.createObjectURL(f),f.addEventListener("sourceopen",a);async function a(){l=f.addSourceBuffer("audio/mpeg"),l.addEventListener("updateend",m);const r=await t;if(r==null)throw new Error("ReadableStream not yet supported in this browser.");const c=r.getReader(),E=()=>{c.read().then(({done:A,value:M})=>{if(A){p=!0;return}l.updating||l.appendBuffer(M),E()}).catch(A=>{console.error("Error while fetching and appending chunks:",A)})};E(),i.paused&&i.play().catch(A=>console.error("Error playing audio:",A))}function m(){if(p){f.endOfStream(),f.removeEventListener("sourceopen",a),f.removeEventListener("sourceclose",()=>{o.debug("[nylas-summarize-message-button] Source closed")}),l.removeEventListener("updateend",m);return}}}async readChunk(t,i){return t.read().then(({done:f,value:l})=>f?i:(i.push(l),this.readChunk(t,i)))}render(){return o.h(o.Host,{key:"66c864d9b70e34daf876f49120810dbd9082256e"},o.h("sp-theme",{key:"f210e4a870993a8c620b64458f1fb7abfdac88dd",scale:"medium",color:"dark"},o.h("sp-button",{key:"9244f97e26c3ecfc1edcedd5b4b6a6080ad9920f",label:"Summarize email","icon-only":!0,onClickCapture:this.onClick,class:{"summarize-button":!0,stopped:this.state==="stopped",loading:this.state==="loading",playing:this.state==="playing"}},this.state==="stopped"&&o.h("play-icon",null),this.state==="loading"&&o.h("loading-icon",null),this.state==="playing"&&o.h("stop-icon",null)),o.h("audio",{key:"f748ef06f332f119dbe6b5bd527e9db5e585cb08",ref:t=>this.audioRef=t,autoPlay:!0,onPlaying:()=>this.state="playing",onPause:()=>this.state="stopped",onEnded:()=>{this.state="stopped",o.debug("[nylas-summarize-message-button] Audio ended")}})))}};vn([yn.RegisterComponent({name:"nylas-summarize-message-button",eventToProps:{summarize:async(t,i)=>{const{playAudio:f,updateState:l,abortController:p,message:a}=t.detail,m=o.htmlToPlainText(a.body||"");await l("loading");try{const r=await i.messages.summarizeText(m),c=i.messages.textToSpeech(r,p);await f(c)}catch(r){await l("stopped"),console.error("Error summarizing message:",r)}}},fireRegisterEvent:!0}),Fe("design:type",Function),Fe("design:paramtypes",[]),Fe("design:returntype",void 0)],Be.prototype,"render",null);Be.style=wn;function I(t){return!window.matchMedia("(prefers-color-scheme: dark)").matches||!t?t:t==="transparent"?"color":t.startsWith("#")?Sn(t):t.startsWith("rgb")?Lt(t):t.startsWith("hsl")?Cn(t):Ln(t)?Rn(t):t}function Sn(t){t.length<7&&(t="#"+t[1]+t[1]+t[2]+t[2]+t[3]+t[3]);const i=(255-parseInt(t.slice(1,3),16)).toString(16).padStart(2,"0"),f=(255-parseInt(t.slice(3,5),16)).toString(16).padStart(2,"0"),l=(255-parseInt(t.slice(5,7),16)).toString(16).padStart(2,"0");return`#${i}${f}${l}`}function Lt(t){var a;const i=(a=t.match(/\d+/g))==null?void 0:a.map(Number);if(!i)return t;const[f,l,p]=i;return`rgb(${255-f}, ${255-l}, ${255-p})`}function Cn(t){var a;const i=(a=t.match(/\d+\.?\d*/g))==null?void 0:a.map(Number);if(!i)return t;const[f,l,p]=i;return`hsl(${f}, ${l}%, ${100-p}%)`}function Ln(t){return/^[a-z]+$/i.test(t)}function Rn(t){return Lt(kn(t))}function kn(t){return t.toLowerCase()==="red"?"rgb(255, 0, 0)":"rgb(0, 0, 0)"}function vt(t){if(t instanceof HTMLStyleElement){let i=t.textContent;if(i){i=i.replaceAll(/@media\s*\(prefers-color-scheme:\s*(dark|light)\)\s*\{([^}]+)\}/g,"");const f=i.matchAll(/border-color:\s*([^;]+)/g);if(f)for(const r of f){const[c,E]=r,A=c.replace(/[-/\\^$*+?.()|[\]{}]/g,"\\$&");i=i.replaceAll(A,c.replace(E,I(E)))}const l=i.matchAll(/border:\s*([^;]+)/g);if(l)for(const r of l){const c=r[0].trim(),E=c.replace(/[-/\\^$*+?.()|[\]{}]/g,"\\$&"),[A,M,P]=r[1].split(" ");i=i.replaceAll(E,c.replace(P,I(P)))}const p=i.matchAll(/background-color:\s*([^;]+)/g);if(p)for(const r of p){const[c,E]=r,A=c.replace(/[-/\\^$*+?.()|[\]{}]/g,"\\$&");i=i.replaceAll(A,c.replace(E,I(E))),o.debug("backgroundColor",{fullMatch:c,replace:c.replace(E,I(E)),color:E,invertColor:I(E)})}const a=i.matchAll(/background:\s*([^;]+)/g);if(a)for(const r of a){const c=r[0].trim(),E=c.replace(/[-/\\^$*+?.()|[\]{}]/g,"\\$&"),[A,M,P]=r[1].split(" ");i=i.replaceAll(E,c.replace(P,I(P)))}const m=i.matchAll(/color:\s*([^;]+)/g);if(m)for(const r of m){const[c,E]=r,A=c.replace(/[-/\\^$*+?.()|[\]{}]/g,"\\$&");i=i.replaceAll(A,c.replace(E,I(E)))}t.textContent=i}}if(t instanceof HTMLElement){const i=window.getComputedStyle(t),f=i.color||t.style.color,l=i.backgroundColor||t.style.backgroundColor,p=i.borderColor||t.style.borderColor;f&&!l?t.style.color="":f&&l?(t.style.color=I(f),t.style.backgroundColor=I(l),o.debug("element",t),o.debug("computedStyle.color",f),o.debug("computedStyle.backgroundColor",l),o.debug("invertColor(color)",I(f)),o.debug("invertColor(backgroundColor)",I(l))):!f&&l&&(t.style.backgroundColor=""),p&&(o.debug("borderColor",p),t.style.borderColor=I(p)),t.hasAttribute("bgcolor")&&t.removeAttribute("bgcolor")}}function Mn(t){vt(t),t.querySelectorAll("*").forEach(f=>vt(f))}var Rt={exports:{}};/*! @license DOMPurify 3.0.8 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.0.8/LICENSE */(function(t,i){(function(f,l){t.exports=l()})(o.commonjsGlobal,function(){const{entries:f,setPrototypeOf:l,isFrozen:p,getPrototypeOf:a,getOwnPropertyDescriptor:m}=Object;let{freeze:r,seal:c,create:E}=Object,{apply:A,construct:M}=typeof Reflect<"u"&&Reflect;r||(r=function(d){return d}),c||(c=function(d){return d}),A||(A=function(d,b,g){return d.apply(b,g)}),M||(M=function(d,b){return new d(...b)});const P=O(Array.prototype.forEach),le=O(Array.prototype.pop),W=O(Array.prototype.push),j=O(String.prototype.toLowerCase),te=O(String.prototype.toString),ye=O(String.prototype.match),B=O(String.prototype.replace),xt=O(String.prototype.indexOf),Dt=O(String.prototype.trim),D=O(RegExp.prototype.test),ne=Ot(TypeError);function O(y){return function(d){for(var b=arguments.length,g=new Array(b>1?b-1:0),R=1;R<b;R++)g[R-1]=arguments[R];return A(y,d,g)}}function Ot(y){return function(){for(var d=arguments.length,b=new Array(d),g=0;g<d;g++)b[g]=arguments[g];return M(y,b)}}function h(y,d){let b=arguments.length>2&&arguments[2]!==void 0?arguments[2]:j;l&&l(y,null);let g=d.length;for(;g--;){let R=d[g];if(typeof R=="string"){const z=b(R);z!==R&&(p(d)||(d[g]=z),R=z)}y[R]=!0}return y}function It(y){for(let d=0;d<y.length;d++)m(y,d)===void 0&&(y[d]=null);return y}function G(y){const d=E(null);for(const[b,g]of f(y))m(y,b)!==void 0&&(Array.isArray(g)?d[b]=It(g):g&&typeof g=="object"&&g.constructor===Object?d[b]=G(g):d[b]=g);return d}function ce(y,d){for(;y!==null;){const g=m(y,d);if(g){if(g.get)return O(g.get);if(typeof g.value=="function")return O(g.value)}y=a(y)}function b(g){return console.warn("fallback value for",g),null}return b}const We=r(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","section","select","shadow","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),be=r(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","filter","font","g","glyph","glyphref","hkern","image","line","lineargradient","marker","mask","metadata","mpath","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),Ee=r(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),Pt=r(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),Te=r(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),Ut=r(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),Ge=r(["#text"]),qe=r(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","face","for","headers","height","hidden","high","href","hreflang","id","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","pattern","placeholder","playsinline","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","xmlns","slot"]),Ae=r(["accent-height","accumulate","additive","alignment-baseline","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),$e=r(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),de=r(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),zt=c(/\{\{[\w\W]*|[\w\W]*\}\}/gm),Ft=c(/<%[\w\W]*|[\w\W]*%>/gm),Ht=c(/\${[\w\W]*}/gm),Bt=c(/^data-[\-\w.\u00B7-\uFFFF]/),Wt=c(/^aria-[\-\w]+$/),Ye=c(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),Gt=c(/^(?:\w+script|data):/i),qt=c(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),je=c(/^html$/i);var Xe=Object.freeze({__proto__:null,MUSTACHE_EXPR:zt,ERB_EXPR:Ft,TMPLIT_EXPR:Ht,DATA_ATTR:Bt,ARIA_ATTR:Wt,IS_ALLOWED_URI:Ye,IS_SCRIPT_OR_DATA:Gt,ATTR_WHITESPACE:qt,DOCTYPE_NAME:je});const $t=function(){return typeof window>"u"?null:window},Yt=function(d,b){if(typeof d!="object"||typeof d.createPolicy!="function")return null;let g=null;const R="data-tt-policy-suffix";b&&b.hasAttribute(R)&&(g=b.getAttribute(R));const z="dompurify"+(g?"#"+g:"");try{return d.createPolicy(z,{createHTML(X){return X},createScriptURL(X){return X}})}catch{return console.warn("TrustedTypes policy "+z+" could not be created."),null}};function Ve(){let y=arguments.length>0&&arguments[0]!==void 0?arguments[0]:$t();const d=u=>Ve(u);if(d.version="3.0.8",d.removed=[],!y||!y.document||y.document.nodeType!==9)return d.isSupported=!1,d;let{document:b}=y;const g=b,R=g.currentScript,{DocumentFragment:z,HTMLTemplateElement:X,Node:_e,Element:Ze,NodeFilter:we,NamedNodeMap:Xt=y.NamedNodeMap||y.MozNamedAttrMap,HTMLFormElement:Vt,DOMParser:Zt,trustedTypes:ue}=y,fe=Ze.prototype,Kt=ce(fe,"cloneNode"),Qt=ce(fe,"nextSibling"),Jt=ce(fe,"childNodes"),ve=ce(fe,"parentNode");if(typeof X=="function"){const u=b.createElement("template");u.content&&u.content.ownerDocument&&(b=u.content.ownerDocument)}let k,oe="";const{implementation:Se,createNodeIterator:en,createDocumentFragment:tn,getElementsByTagName:nn}=b,{importNode:on}=g;let U={};d.isSupported=typeof f=="function"&&typeof ve=="function"&&Se&&Se.createHTMLDocument!==void 0;const{MUSTACHE_EXPR:Ce,ERB_EXPR:Le,TMPLIT_EXPR:Re,DATA_ATTR:rn,ARIA_ATTR:an,IS_SCRIPT_OR_DATA:sn,ATTR_WHITESPACE:Ke}=Xe;let{IS_ALLOWED_URI:Qe}=Xe,w=null;const Je=h({},[...We,...be,...Ee,...Te,...Ge]);let v=null;const et=h({},[...qe,...Ae,...$e,...de]);let _=Object.seal(E(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),ie=null,ke=null,tt=!0,Me=!0,nt=!1,ot=!0,V=!1,q=!1,Ne=!1,xe=!1,Z=!1,me=!1,pe=!1,it=!0,rt=!1;const ln="user-content-";let De=!0,re=!1,K={},Q=null;const at=h({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);let st=null;const lt=h({},["audio","video","img","source","image","track"]);let Oe=null;const ct=h({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),he="http://www.w3.org/1998/Math/MathML",ge="http://www.w3.org/2000/svg",F="http://www.w3.org/1999/xhtml";let J=F,Ie=!1,Pe=null;const cn=h({},[he,ge,F],te);let ae=null;const dn=["application/xhtml+xml","text/html"],un="text/html";let S=null,ee=null;const fn=b.createElement("form"),dt=function(e){return e instanceof RegExp||e instanceof Function},Ue=function(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!(ee&&ee===e)){if((!e||typeof e!="object")&&(e={}),e=G(e),ae=dn.indexOf(e.PARSER_MEDIA_TYPE)===-1?un:e.PARSER_MEDIA_TYPE,S=ae==="application/xhtml+xml"?te:j,w="ALLOWED_TAGS"in e?h({},e.ALLOWED_TAGS,S):Je,v="ALLOWED_ATTR"in e?h({},e.ALLOWED_ATTR,S):et,Pe="ALLOWED_NAMESPACES"in e?h({},e.ALLOWED_NAMESPACES,te):cn,Oe="ADD_URI_SAFE_ATTR"in e?h(G(ct),e.ADD_URI_SAFE_ATTR,S):ct,st="ADD_DATA_URI_TAGS"in e?h(G(lt),e.ADD_DATA_URI_TAGS,S):lt,Q="FORBID_CONTENTS"in e?h({},e.FORBID_CONTENTS,S):at,ie="FORBID_TAGS"in e?h({},e.FORBID_TAGS,S):{},ke="FORBID_ATTR"in e?h({},e.FORBID_ATTR,S):{},K="USE_PROFILES"in e?e.USE_PROFILES:!1,tt=e.ALLOW_ARIA_ATTR!==!1,Me=e.ALLOW_DATA_ATTR!==!1,nt=e.ALLOW_UNKNOWN_PROTOCOLS||!1,ot=e.ALLOW_SELF_CLOSE_IN_ATTR!==!1,V=e.SAFE_FOR_TEMPLATES||!1,q=e.WHOLE_DOCUMENT||!1,Z=e.RETURN_DOM||!1,me=e.RETURN_DOM_FRAGMENT||!1,pe=e.RETURN_TRUSTED_TYPE||!1,xe=e.FORCE_BODY||!1,it=e.SANITIZE_DOM!==!1,rt=e.SANITIZE_NAMED_PROPS||!1,De=e.KEEP_CONTENT!==!1,re=e.IN_PLACE||!1,Qe=e.ALLOWED_URI_REGEXP||Ye,J=e.NAMESPACE||F,_=e.CUSTOM_ELEMENT_HANDLING||{},e.CUSTOM_ELEMENT_HANDLING&&dt(e.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(_.tagNameCheck=e.CUSTOM_ELEMENT_HANDLING.tagNameCheck),e.CUSTOM_ELEMENT_HANDLING&&dt(e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(_.attributeNameCheck=e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),e.CUSTOM_ELEMENT_HANDLING&&typeof e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements=="boolean"&&(_.allowCustomizedBuiltInElements=e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),V&&(Me=!1),me&&(Z=!0),K&&(w=h({},Ge),v=[],K.html===!0&&(h(w,We),h(v,qe)),K.svg===!0&&(h(w,be),h(v,Ae),h(v,de)),K.svgFilters===!0&&(h(w,Ee),h(v,Ae),h(v,de)),K.mathMl===!0&&(h(w,Te),h(v,$e),h(v,de))),e.ADD_TAGS&&(w===Je&&(w=G(w)),h(w,e.ADD_TAGS,S)),e.ADD_ATTR&&(v===et&&(v=G(v)),h(v,e.ADD_ATTR,S)),e.ADD_URI_SAFE_ATTR&&h(Oe,e.ADD_URI_SAFE_ATTR,S),e.FORBID_CONTENTS&&(Q===at&&(Q=G(Q)),h(Q,e.FORBID_CONTENTS,S)),De&&(w["#text"]=!0),q&&h(w,["html","head","body"]),w.table&&(h(w,["tbody"]),delete ie.tbody),e.TRUSTED_TYPES_POLICY){if(typeof e.TRUSTED_TYPES_POLICY.createHTML!="function")throw ne('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof e.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw ne('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');k=e.TRUSTED_TYPES_POLICY,oe=k.createHTML("")}else k===void 0&&(k=Yt(ue,R)),k!==null&&typeof oe=="string"&&(oe=k.createHTML(""));r&&r(e),ee=e}},ut=h({},["mi","mo","mn","ms","mtext"]),ft=h({},["foreignobject","desc","title","annotation-xml"]),mn=h({},["title","style","font","a","script"]),mt=h({},[...be,...Ee,...Pt]),pt=h({},[...Te,...Ut]),pn=function(e){let n=ve(e);(!n||!n.tagName)&&(n={namespaceURI:J,tagName:"template"});const s=j(e.tagName),T=j(n.tagName);return Pe[e.namespaceURI]?e.namespaceURI===ge?n.namespaceURI===F?s==="svg":n.namespaceURI===he?s==="svg"&&(T==="annotation-xml"||ut[T]):!!mt[s]:e.namespaceURI===he?n.namespaceURI===F?s==="math":n.namespaceURI===ge?s==="math"&&ft[T]:!!pt[s]:e.namespaceURI===F?n.namespaceURI===ge&&!ft[T]||n.namespaceURI===he&&!ut[T]?!1:!pt[s]&&(mn[s]||!mt[s]):!!(ae==="application/xhtml+xml"&&Pe[e.namespaceURI]):!1},$=function(e){W(d.removed,{element:e});try{e.parentNode.removeChild(e)}catch{e.remove()}},ze=function(e,n){try{W(d.removed,{attribute:n.getAttributeNode(e),from:n})}catch{W(d.removed,{attribute:null,from:n})}if(n.removeAttribute(e),e==="is"&&!v[e])if(Z||me)try{$(n)}catch{}else try{n.setAttribute(e,"")}catch{}},ht=function(e){let n=null,s=null;if(xe)e="<remove></remove>"+e;else{const L=ye(e,/^[\r\n\t ]+/);s=L&&L[0]}ae==="application/xhtml+xml"&&J===F&&(e='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+e+"</body></html>");const T=k?k.createHTML(e):e;if(J===F)try{n=new Zt().parseFromString(T,ae)}catch{}if(!n||!n.documentElement){n=Se.createDocument(J,"template",null);try{n.documentElement.innerHTML=Ie?oe:T}catch{}}const C=n.body||n.documentElement;return e&&s&&C.insertBefore(b.createTextNode(s),C.childNodes[0]||null),J===F?nn.call(n,q?"html":"body")[0]:q?n.documentElement:C},gt=function(e){return en.call(e.ownerDocument||e,e,we.SHOW_ELEMENT|we.SHOW_COMMENT|we.SHOW_TEXT,null)},hn=function(e){return e instanceof Vt&&(typeof e.nodeName!="string"||typeof e.textContent!="string"||typeof e.removeChild!="function"||!(e.attributes instanceof Xt)||typeof e.removeAttribute!="function"||typeof e.setAttribute!="function"||typeof e.namespaceURI!="string"||typeof e.insertBefore!="function"||typeof e.hasChildNodes!="function")},yt=function(e){return typeof _e=="function"&&e instanceof _e},H=function(e,n,s){U[e]&&P(U[e],T=>{T.call(d,n,s,ee)})},bt=function(e){let n=null;if(H("beforeSanitizeElements",e,null),hn(e))return $(e),!0;const s=S(e.nodeName);if(H("uponSanitizeElement",e,{tagName:s,allowedTags:w}),e.hasChildNodes()&&!yt(e.firstElementChild)&&D(/<[/\w]/g,e.innerHTML)&&D(/<[/\w]/g,e.textContent))return $(e),!0;if(!w[s]||ie[s]){if(!ie[s]&&Tt(s)&&(_.tagNameCheck instanceof RegExp&&D(_.tagNameCheck,s)||_.tagNameCheck instanceof Function&&_.tagNameCheck(s)))return!1;if(De&&!Q[s]){const T=ve(e)||e.parentNode,C=Jt(e)||e.childNodes;if(C&&T){const L=C.length;for(let N=L-1;N>=0;--N)T.insertBefore(Kt(C[N],!0),Qt(e))}}return $(e),!0}return e instanceof Ze&&!pn(e)||(s==="noscript"||s==="noembed"||s==="noframes")&&D(/<\/no(script|embed|frames)/i,e.innerHTML)?($(e),!0):(V&&e.nodeType===3&&(n=e.textContent,P([Ce,Le,Re],T=>{n=B(n,T," ")}),e.textContent!==n&&(W(d.removed,{element:e.cloneNode()}),e.textContent=n)),H("afterSanitizeElements",e,null),!1)},Et=function(e,n,s){if(it&&(n==="id"||n==="name")&&(s in b||s in fn))return!1;if(!(Me&&!ke[n]&&D(rn,n))){if(!(tt&&D(an,n))){if(!v[n]||ke[n]){if(!(Tt(e)&&(_.tagNameCheck instanceof RegExp&&D(_.tagNameCheck,e)||_.tagNameCheck instanceof Function&&_.tagNameCheck(e))&&(_.attributeNameCheck instanceof RegExp&&D(_.attributeNameCheck,n)||_.attributeNameCheck instanceof Function&&_.attributeNameCheck(n))||n==="is"&&_.allowCustomizedBuiltInElements&&(_.tagNameCheck instanceof RegExp&&D(_.tagNameCheck,s)||_.tagNameCheck instanceof Function&&_.tagNameCheck(s))))return!1}else if(!Oe[n]){if(!D(Qe,B(s,Ke,""))){if(!((n==="src"||n==="xlink:href"||n==="href")&&e!=="script"&&xt(s,"data:")===0&&st[e])){if(!(nt&&!D(sn,B(s,Ke,"")))){if(s)return!1}}}}}}return!0},Tt=function(e){return e.indexOf("-")>0},At=function(e){H("beforeSanitizeAttributes",e,null);const{attributes:n}=e;if(!n)return;const s={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:v};let T=n.length;for(;T--;){const C=n[T],{name:L,namespaceURI:N,value:Y}=C,se=S(L);let x=L==="value"?Y:Dt(Y);if(s.attrName=se,s.attrValue=x,s.keepAttr=!0,s.forceKeepAttr=void 0,H("uponSanitizeAttribute",e,s),x=s.attrValue,s.forceKeepAttr||(ze(L,e),!s.keepAttr))continue;if(!ot&&D(/\/>/i,x)){ze(L,e);continue}V&&P([Ce,Le,Re],wt=>{x=B(x,wt," ")});const _t=S(e.nodeName);if(Et(_t,se,x)){if(rt&&(se==="id"||se==="name")&&(ze(L,e),x=ln+x),k&&typeof ue=="object"&&typeof ue.getAttributeType=="function"&&!N)switch(ue.getAttributeType(_t,se)){case"TrustedHTML":{x=k.createHTML(x);break}case"TrustedScriptURL":{x=k.createScriptURL(x);break}}try{N?e.setAttributeNS(N,L,x):e.setAttribute(L,x),le(d.removed)}catch{}}}H("afterSanitizeAttributes",e,null)},gn=function u(e){let n=null;const s=gt(e);for(H("beforeSanitizeShadowDOM",e,null);n=s.nextNode();)H("uponSanitizeShadowNode",n,null),!bt(n)&&(n.content instanceof z&&u(n.content),At(n));H("afterSanitizeShadowDOM",e,null)};return d.sanitize=function(u){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=null,s=null,T=null,C=null;if(Ie=!u,Ie&&(u="<!-->"),typeof u!="string"&&!yt(u))if(typeof u.toString=="function"){if(u=u.toString(),typeof u!="string")throw ne("dirty is not a string, aborting")}else throw ne("toString is not a function");if(!d.isSupported)return u;if(Ne||Ue(e),d.removed=[],typeof u=="string"&&(re=!1),re){if(u.nodeName){const Y=S(u.nodeName);if(!w[Y]||ie[Y])throw ne("root node is forbidden and cannot be sanitized in-place")}}else if(u instanceof _e)n=ht("<!---->"),s=n.ownerDocument.importNode(u,!0),s.nodeType===1&&s.nodeName==="BODY"||s.nodeName==="HTML"?n=s:n.appendChild(s);else{if(!Z&&!V&&!q&&u.indexOf("<")===-1)return k&&pe?k.createHTML(u):u;if(n=ht(u),!n)return Z?null:pe?oe:""}n&&xe&&$(n.firstChild);const L=gt(re?u:n);for(;T=L.nextNode();)bt(T)||(T.content instanceof z&&gn(T.content),At(T));if(re)return u;if(Z){if(me)for(C=tn.call(n.ownerDocument);n.firstChild;)C.appendChild(n.firstChild);else C=n;return(v.shadowroot||v.shadowrootmode)&&(C=on.call(g,C,!0)),C}let N=q?n.outerHTML:n.innerHTML;return q&&w["!doctype"]&&n.ownerDocument&&n.ownerDocument.doctype&&n.ownerDocument.doctype.name&&D(je,n.ownerDocument.doctype.name)&&(N="<!DOCTYPE "+n.ownerDocument.doctype.name+`>
|
|
2
|
-
`+N),V&&P([Ce,Le,Re],Y=>{N=B(N,Y," ")}),k&&pe?k.createHTML(N):N},d.setConfig=function(){let u=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};Ue(u),Ne=!0},d.clearConfig=function(){ee=null,Ne=!1},d.isValidAttribute=function(u,e,n){ee||Ue({});const s=S(u),T=S(e);return Et(s,T,n)},d.addHook=function(u,e){typeof e=="function"&&(U[u]=U[u]||[],W(U[u],e))},d.removeHook=function(u){if(U[u])return le(U[u])},d.removeHooks=function(u){U[u]&&(U[u]=[])},d.removeAllHooks=function(){U={}},d}var jt=Ve();return jt})})(Rt);const He=Rt.exports,Nn=":host{display:inline-grid;overflow:hidden;width:100%}.view-email{width:100%}.view-email div.gmail_quote{display:none;color:var(--nylas-color-primary-400)}.view-email div.gmail_quote.show{display:block}.view-email blockquote{border-color:var(--nylas-color-primary-500) !important}.view-email .nylas-view-email-toggle-button{display:flex;justify-content:center;align-items:center;cursor:pointer;background-color:var(--nylas-color-primary-200);color:var(--nylas-color-primary-600);border:0;border-radius:2px;font-size:14px;font-weight:500;line-height:1.5;transition:all 0.2s ease-in-out}.view-email .nylas-view-email-toggle-button:hover{background-color:var(--nylas-color-primary-200);color:var(--nylas-color-primary-600)}",xn=Nn;He.addHook("afterSanitizeAttributes",function(t){"target"in t&&(t.setAttribute("target","_blank"),t.setAttribute("rel","noopener"))});const kt=class{constructor(t){o.registerInstance(this,t),this.htmlElement=document.createElement("html"),this.setBody=i=>{var p;this.state="loading",this.styles=[],this.hoistedFontURLs=new Map,this.sanitizedBody="",document.querySelectorAll(".nylas-view-email-font").forEach(
|
|
3
|
-
`).forEach(m=>{const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("./index-db48e0b6.cjs"),bn=require("./register-component-b2a51b20-9a913603.cjs");require("react");require("react-dom");const yn=".sc-forward-icon-h{display:flex}",En=yn,St=class{constructor(t){o.registerInstance(this,t),this.width="15",this.height="15"}render(){return o.h("svg",{key:"ba8b910e873ccb02317d9d8a430d6571cacb45f3",fill:"auto",width:this.width,height:this.height,viewBox:"0 0 1920 1920",xmlns:"http://www.w3.org/2000/svg"},o.h("path",{key:"390bf0b7bd7ac699af87de2cb8b485f0295fda03",d:"m1246.246 64-90.496 90.496 477.952 477.952h-590.848C467.878 632.448.038 1100.416.038 1675.392v109.056h128v-109.056c0-504.576 410.368-914.944 914.816-914.944h590.848l-477.952 478.08 90.496 90.496 632.448-632.576L1246.246 64Z","fill-rule":"evenodd"}))}};St.style=En;const Tn=':host{display:grid;color:var(--nylas-color-primary-900)}.editor{position:relative;display:block;max-height:300px;overflow:auto;padding:1rem;border:1px solid var(--nylas-color-primary-300)}.editor blockquote{visibility:hidden;overflow:hidden;position:relative;transition:height 0.3s ease;margin:0}.editor blockquote::before{content:"...";visibility:visible;opacity:1;position:absolute;top:0;left:0;background-color:var(--nylas-color-primary-300);width:20px;text-align:center;color:var(--nylas-color-primary-800);vertical-align:middle;display:flex;justify-content:center;align-items:center;align-self:center;cursor:pointer}.editor .collapsed{height:20px}.editor .expanded{visibility:visible;opacity:1;height:auto;margin:0px 0px 0px 0.8ex;border-left:1px solid var(--nylas-color-primary-300);padding-left:1rem}.editor .expanded::before{display:none;}.buttons{display:flex;margin-top:1rem;justify-content:space-between}.buttons sp-button{border-radius:var(--nylas-border-radius);background-color:var(--nylas-color-primary-400);color:var(--nylas-color-primary-900);fill:var(--nylas-color-primary-900)}.buttons sp-button:hover{background-color:var(--nylas-color-primary-500)}.buttons sp-button:disabled{background-color:var(--nylas-color-primary-200);color:var(--nylas-color-primary-600);cursor:not-allowed}.buttons sp-button chevron-icon{display:inline-block}.buttons .close{justify-self:end}.toolbar{position:absolute;display:none;background-color:var(--nylas-color-primary-200);border-radius:var(--nylas-border-radius);z-index:1}.toolbar sp-button{border:0}',An=Tn,Ct=class{constructor(t){o.registerInstance(this,t),this.close=o.createEvent(this,"close",7),this.send=o.createEvent(this,"send",7),this.closeComposer=i=>{this.close.emit(i)},this.sendComposer=i=>{var l;if(!this.editorEl){o.debug("no editor element");return}const f=this.editorEl.querySelector(".message-body");if(!f){o.debug("no message body");return}this.message&&(this.send.emit({message:this.message,replyBody:((l=f.querySelector(".message-body"))==null?void 0:l.innerHTML)||""}),this.close.emit(i),this.editorEl.innerHTML="")},this.message=void 0,this.viewEmailElement=void 0}connectedCallback(){}disconnectedCallback(){this.editorEl&&(this.editorEl.innerHTML="")}componentWillLoad(){}async componentDidLoad(){if(this.message&&this.watchBody(this.message),!this.editorEl){o.debug("[connectedCallback] no editor element");return}if(!this.toolbarEl){o.debug("[connectedCallback] no toolbar element");return}const t=this.editorEl,i=this.toolbarEl;t.addEventListener("mouseup",f=>{var B;const l=(B=this.host.shadowRoot)==null?void 0:B.getSelection();if(!l){o.debug("no selection");return}const p=l.getRangeAt(0),r=l.toString();if(!r){i.style.display="none";return}const m=t.querySelector(".message-body");if(!m){o.debug("no message body");return}const c=p.commonAncestorContainer.parentElement;if(!c)return;const E=m.getBoundingClientRect();o.debug("messageBodyRect",{messageBodyRect:E});const A=c.getBoundingClientRect();o.debug("foundRect",{foundRect:A});const le=(c.childNodes[0].textContent||"").indexOf(r),W=window.getComputedStyle(c).fontSize,j=parseInt(W.replace("px",""),10),te=A.top-E.top-i.clientHeight,be=le*(1/j)*100;i.style.top=`${te}px`,i.style.left=`${be}px`,i.style.display="block"})}watchBody(t){var r;if(!this.editorEl){o.debug("no editor element");return}this.editorEl.querySelectorAll(".message-body").forEach(m=>m.remove());const i=document.createElement("div");i.classList.add("message-body");const f=document.createElement("p");f.innerHTML=" ",i.appendChild(f);const l=document.createElement("br");i.appendChild(l);const p=document.createElement("div");if(p.classList.add("reply-text"),p.innerText=`On ${new Date(t.date*1e3).toLocaleDateString(void 0,{dateStyle:"full"})} <${(r=t.from)==null?void 0:r.map(m=>m.name||m.email).join(", ")}> wrote:`,i.appendChild(p),t.body){const m=document.createElement("html");m.innerHTML=t.body;const a=document.createElement("blockquote");a.classList.add("collapsed"),a.classList.add("gmail_quote"),a.innerHTML=m.innerHTML,i.appendChild(a),o.debug("replyContainer",{replyContainer:a})}this.editorEl.appendChild(i),this.editorEl.querySelectorAll("blockquote.collapsed").forEach(m=>{m.addEventListener("click",function(a){a.preventDefault();const c=a.target;c.classList.remove("collapsed"),c.classList.add("expanded")},{once:!0})}),this.editorEl.focus()}render(){return o.h(o.Host,{key:"24eb3a7777d0d8d651986e780ccab3ed73f2940e"},o.h("sp-theme",{key:"e4f3ab2a32fc79eed17f504e50d9d63db4e58541",scale:"medium",color:"dark"},o.h("div",{key:"835738f8e29bae607a2d15e1253721bc2bfbb9f9",class:"editor",contentEditable:!0,ref:t=>this.editorEl=t},o.h("div",{key:"a8eaebb270c1eb0e046cc75ef442d07d7a301ffd",class:"toolbar",ref:t=>this.toolbarEl=t,contentEditable:!1},o.h("sp-button",{key:"ef149be7a599e823df35a8bb2daf6a6a05e491e6",quiet:!0,onClick:()=>document.execCommand("bold")},o.h("div",{key:"a016e06e3bd1e1693d602ca143a0db9ebc25f32f",slot:"icon"},o.h("bold-icon",{key:"2efa49d13983df8278c71b62765c4663b8f40d49"})),o.h("div",{key:"50753638d2cebaedfbb1c32e5c7d9fa652ca2182",slot:"label"},"Bold")),o.h("sp-button",{key:"9542448b18e7339d90204d6a2133b417e0c6ec76",quiet:!0,onClick:()=>document.execCommand("underline")},o.h("div",{key:"a89c054aaa20e5a5d75dc0ce0a60ed7d68ee3f52",slot:"icon"},o.h("underline-icon",{key:"0251dc3eae7df7229899b17722ecb61f59650be9"})),o.h("div",{key:"7dbdf879d504975c9f7ac81f5daf6e56618cd0f6",slot:"label"},"Underline")),o.h("sp-button",{key:"f1532cb5650c7aef22dbbb8509945ec2c1ee8d30",quiet:!0,onClick:()=>document.execCommand("italic")},o.h("div",{key:"abe8ada6e4c4cb71cb64313eaa6e580f019f4ad6",slot:"icon"},o.h("italic-icon",{key:"38c5bbe4725f72df108b3efbfe819fb84a5b974a"})),o.h("div",{key:"6ee318ade829600da35b18b917c15a92610d65ce",slot:"label"},"Italic")))),o.h("div",{key:"3b7551486b542a077aceaee81b9c59cdaba0f85a",class:"buttons"},o.h("sp-button",{key:"350040ee1cf93ad27cfdc467977eeeb3410e6496",onClick:this.sendComposer,class:"send"},"Send"),o.h("sp-button",{key:"1324a0e3a401fcee22cfe96dfa43736965ce7256",onClick:this.closeComposer,class:"close"},"Close"))))}get host(){return o.getElement(this)}static get watchers(){return{message:["watchBody"]}}};Ct.style=An;const _n=":host{display:block}sp-button{padding:0;border:0;border-radius:var(--nylas-border-radius);min-block-size:50%;min-inline-size:2rem;background-color:var(--nylas-color-primary-300);fill:var(--nylas-color-primary-800)}sp-button:hover{background-color:var(--nylas-color-primary-400)}.summarize-button.stopped{animation:none}.summarize-button.playing{animation:pulse 2s infinite}.summarize-button.loading{display:flex;align-content:center;height:1.5rem;width:2rem;vertical-align:middle;animation:pulse 2s infinite;flex-wrap:wrap}.summarize-button.loading loading-icon{--dot-color:var(--nylas-color-primary-600)}@keyframes pulse{0%{transform:scale(1);box-shadow:0 0 0 0 var(--nylas-color-primary-300)}70%{transform:scale(1.05);box-shadow:0 0 0 10px rgba(255, 69, 0, 0)}100%{transform:scale(1);box-shadow:0 0 0 0 rgba(255, 69, 0, 0)}}@keyframes wave{0%{transform:translateX(0)}50%{transform:translateX(100%)}100%{transform:translateX(0)}}",wn=_n;var vn=function(t,i,f,l){var p=arguments.length,r=p<3?i:l===null?l=Object.getOwnPropertyDescriptor(i,f):l,m;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(t,i,f,l);else for(var a=t.length-1;a>=0;a--)(m=t[a])&&(r=(p<3?m(r):p>3?m(i,f,r):m(i,f))||r);return p>3&&r&&Object.defineProperty(i,f,r),r},Fe=function(t,i){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(t,i)};const Be=class{constructor(t){o.registerInstance(this,t),this.summarize=o.createEvent(this,"summarize",7),this.abortController=new AbortController,this.onClick=async i=>{var f,l;i.preventDefault(),i.stopPropagation(),this.state==="stopped"?this.message&&(this.abortController=new AbortController,this.summarize.emit({abortController:this.abortController,playAudio:this.playAudio,message:this.message,updateState:this.updateState}).defaultPrevented||(o.debug("[nylas-summarize-message-button] Default event not prevented, summarizing message"),this.audioRef&&(await this.audioRef.play().then(()=>{var r;return(r=this.audioRef)==null?void 0:r.pause()}).catch(r=>console.error("Error playing audio:",r)),await this.audioRef.play().catch(r=>console.error("Error playing audio:",r))))):this.state==="playing"?((f=this.abortController)==null||f.abort(),(l=this.audioRef)==null||l.pause()):this.state="stopped"},this.message=void 0,this.state="stopped",this.playAudio=this.playAudio.bind(this),this.updateState=this.updateState.bind(this)}connectedCallback(){}disconnectedCallback(){}async componentWillLoad(){o.debug("[nylas-summarize-message-button] Component will load")}async componentDidLoad(){o.debug("[nylas-summarize-message-button] Component did load")}async updateState(t){this.state=t}async playAudio(t){if(!this.audioRef){this.state="stopped";return}if(!t){this.state="stopped";return}const i=this.audioRef;if(!("MediaSource"in window)){const a=await t;if(a==null)throw new Error("ReadableStream not yet supported in this browser.");const c=a.getReader(),E=[];await this.readChunk(c,E);const A=new Blob(E,{type:"audio/mpeg"}),M=URL.createObjectURL(A);i.src=M;return}const f=new MediaSource;let l,p=!1;i.src=URL.createObjectURL(f),f.addEventListener("sourceopen",r);async function r(){l=f.addSourceBuffer("audio/mpeg"),l.addEventListener("updateend",m);const a=await t;if(a==null)throw new Error("ReadableStream not yet supported in this browser.");const c=a.getReader(),E=()=>{c.read().then(({done:A,value:M})=>{if(A){p=!0;return}l.updating||l.appendBuffer(M),E()}).catch(A=>{console.error("Error while fetching and appending chunks:",A)})};E(),i.paused&&i.play().catch(A=>console.error("Error playing audio:",A))}function m(){if(p){f.endOfStream(),f.removeEventListener("sourceopen",r),f.removeEventListener("sourceclose",()=>{o.debug("[nylas-summarize-message-button] Source closed")}),l.removeEventListener("updateend",m);return}}}async readChunk(t,i){return t.read().then(({done:f,value:l})=>f?i:(i.push(l),this.readChunk(t,i)))}render(){return o.h(o.Host,{key:"66c864d9b70e34daf876f49120810dbd9082256e"},o.h("sp-theme",{key:"f210e4a870993a8c620b64458f1fb7abfdac88dd",scale:"medium",color:"dark"},o.h("sp-button",{key:"9244f97e26c3ecfc1edcedd5b4b6a6080ad9920f",label:"Summarize email","icon-only":!0,onClickCapture:this.onClick,class:{"summarize-button":!0,stopped:this.state==="stopped",loading:this.state==="loading",playing:this.state==="playing"}},this.state==="stopped"&&o.h("play-icon",null),this.state==="loading"&&o.h("loading-icon",null),this.state==="playing"&&o.h("stop-icon",null)),o.h("audio",{key:"f748ef06f332f119dbe6b5bd527e9db5e585cb08",ref:t=>this.audioRef=t,autoPlay:!0,onPlaying:()=>this.state="playing",onPause:()=>this.state="stopped",onEnded:()=>{this.state="stopped",o.debug("[nylas-summarize-message-button] Audio ended")}})))}};vn([bn.RegisterComponent({name:"nylas-summarize-message-button",eventToProps:{summarize:async(t,i)=>{const{playAudio:f,updateState:l,abortController:p,message:r}=t.detail,m=o.htmlToPlainText(r.body||"");await l("loading");try{const a=await i.messages.summarizeText(m),c=i.messages.textToSpeech(a,p);await f(c)}catch(a){await l("stopped"),console.error("Error summarizing message:",a)}}},fireRegisterEvent:!0}),Fe("design:type",Function),Fe("design:paramtypes",[]),Fe("design:returntype",void 0)],Be.prototype,"render",null);Be.style=wn;function I(t){return!window.matchMedia("(prefers-color-scheme: dark)").matches||!t?t:t==="transparent"?"color":t.startsWith("#")?Sn(t):t.startsWith("rgb")?Lt(t):t.startsWith("hsl")?Cn(t):Ln(t)?Rn(t):t}function Sn(t){t.length<7&&(t="#"+t[1]+t[1]+t[2]+t[2]+t[3]+t[3]);const i=(255-parseInt(t.slice(1,3),16)).toString(16).padStart(2,"0"),f=(255-parseInt(t.slice(3,5),16)).toString(16).padStart(2,"0"),l=(255-parseInt(t.slice(5,7),16)).toString(16).padStart(2,"0");return`#${i}${f}${l}`}function Lt(t){var r;const i=(r=t.match(/\d+/g))==null?void 0:r.map(Number);if(!i)return t;const[f,l,p]=i;return`rgb(${255-f}, ${255-l}, ${255-p})`}function Cn(t){var r;const i=(r=t.match(/\d+\.?\d*/g))==null?void 0:r.map(Number);if(!i)return t;const[f,l,p]=i;return`hsl(${f}, ${l}%, ${100-p}%)`}function Ln(t){return/^[a-z]+$/i.test(t)}function Rn(t){return Lt(kn(t))}function kn(t){return t.toLowerCase()==="red"?"rgb(255, 0, 0)":"rgb(0, 0, 0)"}function vt(t){if(t instanceof HTMLStyleElement){let i=t.textContent;if(i){i=i.replaceAll(/@media\s*\(prefers-color-scheme:\s*(dark|light)\)\s*\{([^}]+)\}/g,"");const f=i.matchAll(/border-color:\s*([^;]+)/g);if(f)for(const a of f){const[c,E]=a,A=c.replace(/[-/\\^$*+?.()|[\]{}]/g,"\\$&");i=i.replaceAll(A,c.replace(E,I(E)))}const l=i.matchAll(/border:\s*([^;]+)/g);if(l)for(const a of l){const c=a[0].trim(),E=c.replace(/[-/\\^$*+?.()|[\]{}]/g,"\\$&"),[A,M,P]=a[1].split(" ");i=i.replaceAll(E,c.replace(P,I(P)))}const p=i.matchAll(/background-color:\s*([^;]+)/g);if(p)for(const a of p){const[c,E]=a,A=c.replace(/[-/\\^$*+?.()|[\]{}]/g,"\\$&");i=i.replaceAll(A,c.replace(E,I(E))),o.debug("backgroundColor",{fullMatch:c,replace:c.replace(E,I(E)),color:E,invertColor:I(E)})}const r=i.matchAll(/background:\s*([^;]+)/g);if(r)for(const a of r){const c=a[0].trim(),E=c.replace(/[-/\\^$*+?.()|[\]{}]/g,"\\$&"),[A,M,P]=a[1].split(" ");i=i.replaceAll(E,c.replace(P,I(P)))}const m=i.matchAll(/color:\s*([^;]+)/g);if(m)for(const a of m){const[c,E]=a,A=c.replace(/[-/\\^$*+?.()|[\]{}]/g,"\\$&");i=i.replaceAll(A,c.replace(E,I(E)))}t.textContent=i}}if(t instanceof HTMLElement){const i=window.getComputedStyle(t),f=i.color||t.style.color,l=i.backgroundColor||t.style.backgroundColor,p=i.borderColor||t.style.borderColor;f&&!l?t.style.color="":f&&l?(t.style.color=I(f),t.style.backgroundColor=I(l),o.debug("element",t),o.debug("computedStyle.color",f),o.debug("computedStyle.backgroundColor",l),o.debug("invertColor(color)",I(f)),o.debug("invertColor(backgroundColor)",I(l))):!f&&l&&(t.style.backgroundColor=""),p&&(o.debug("borderColor",p),t.style.borderColor=I(p)),t.hasAttribute("bgcolor")&&t.removeAttribute("bgcolor")}}function Mn(t){vt(t),t.querySelectorAll("*").forEach(f=>vt(f))}var Rt={exports:{}};/*! @license DOMPurify 3.0.8 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.0.8/LICENSE */(function(t,i){(function(f,l){t.exports=l()})(o.commonjsGlobal,function(){const{entries:f,setPrototypeOf:l,isFrozen:p,getPrototypeOf:r,getOwnPropertyDescriptor:m}=Object;let{freeze:a,seal:c,create:E}=Object,{apply:A,construct:M}=typeof Reflect<"u"&&Reflect;a||(a=function(d){return d}),c||(c=function(d){return d}),A||(A=function(d,y,g){return d.apply(y,g)}),M||(M=function(d,y){return new d(...y)});const P=O(Array.prototype.forEach),le=O(Array.prototype.pop),W=O(Array.prototype.push),j=O(String.prototype.toLowerCase),te=O(String.prototype.toString),be=O(String.prototype.match),B=O(String.prototype.replace),xt=O(String.prototype.indexOf),Dt=O(String.prototype.trim),D=O(RegExp.prototype.test),ne=Ot(TypeError);function O(b){return function(d){for(var y=arguments.length,g=new Array(y>1?y-1:0),R=1;R<y;R++)g[R-1]=arguments[R];return A(b,d,g)}}function Ot(b){return function(){for(var d=arguments.length,y=new Array(d),g=0;g<d;g++)y[g]=arguments[g];return M(b,y)}}function h(b,d){let y=arguments.length>2&&arguments[2]!==void 0?arguments[2]:j;l&&l(b,null);let g=d.length;for(;g--;){let R=d[g];if(typeof R=="string"){const z=y(R);z!==R&&(p(d)||(d[g]=z),R=z)}b[R]=!0}return b}function It(b){for(let d=0;d<b.length;d++)m(b,d)===void 0&&(b[d]=null);return b}function G(b){const d=E(null);for(const[y,g]of f(b))m(b,y)!==void 0&&(Array.isArray(g)?d[y]=It(g):g&&typeof g=="object"&&g.constructor===Object?d[y]=G(g):d[y]=g);return d}function ce(b,d){for(;b!==null;){const g=m(b,d);if(g){if(g.get)return O(g.get);if(typeof g.value=="function")return O(g.value)}b=r(b)}function y(g){return console.warn("fallback value for",g),null}return y}const We=a(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","section","select","shadow","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),ye=a(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","filter","font","g","glyph","glyphref","hkern","image","line","lineargradient","marker","mask","metadata","mpath","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),Ee=a(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),Pt=a(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),Te=a(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),Ut=a(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),Ge=a(["#text"]),qe=a(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","face","for","headers","height","hidden","high","href","hreflang","id","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","pattern","placeholder","playsinline","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","xmlns","slot"]),Ae=a(["accent-height","accumulate","additive","alignment-baseline","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),$e=a(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),de=a(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),zt=c(/\{\{[\w\W]*|[\w\W]*\}\}/gm),Ft=c(/<%[\w\W]*|[\w\W]*%>/gm),Ht=c(/\${[\w\W]*}/gm),Bt=c(/^data-[\-\w.\u00B7-\uFFFF]/),Wt=c(/^aria-[\-\w]+$/),Ye=c(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),Gt=c(/^(?:\w+script|data):/i),qt=c(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),je=c(/^html$/i);var Xe=Object.freeze({__proto__:null,MUSTACHE_EXPR:zt,ERB_EXPR:Ft,TMPLIT_EXPR:Ht,DATA_ATTR:Bt,ARIA_ATTR:Wt,IS_ALLOWED_URI:Ye,IS_SCRIPT_OR_DATA:Gt,ATTR_WHITESPACE:qt,DOCTYPE_NAME:je});const $t=function(){return typeof window>"u"?null:window},Yt=function(d,y){if(typeof d!="object"||typeof d.createPolicy!="function")return null;let g=null;const R="data-tt-policy-suffix";y&&y.hasAttribute(R)&&(g=y.getAttribute(R));const z="dompurify"+(g?"#"+g:"");try{return d.createPolicy(z,{createHTML(X){return X},createScriptURL(X){return X}})}catch{return console.warn("TrustedTypes policy "+z+" could not be created."),null}};function Ve(){let b=arguments.length>0&&arguments[0]!==void 0?arguments[0]:$t();const d=u=>Ve(u);if(d.version="3.0.8",d.removed=[],!b||!b.document||b.document.nodeType!==9)return d.isSupported=!1,d;let{document:y}=b;const g=y,R=g.currentScript,{DocumentFragment:z,HTMLTemplateElement:X,Node:_e,Element:Ze,NodeFilter:we,NamedNodeMap:Xt=b.NamedNodeMap||b.MozNamedAttrMap,HTMLFormElement:Vt,DOMParser:Zt,trustedTypes:ue}=b,fe=Ze.prototype,Kt=ce(fe,"cloneNode"),Qt=ce(fe,"nextSibling"),Jt=ce(fe,"childNodes"),ve=ce(fe,"parentNode");if(typeof X=="function"){const u=y.createElement("template");u.content&&u.content.ownerDocument&&(y=u.content.ownerDocument)}let k,oe="";const{implementation:Se,createNodeIterator:en,createDocumentFragment:tn,getElementsByTagName:nn}=y,{importNode:on}=g;let U={};d.isSupported=typeof f=="function"&&typeof ve=="function"&&Se&&Se.createHTMLDocument!==void 0;const{MUSTACHE_EXPR:Ce,ERB_EXPR:Le,TMPLIT_EXPR:Re,DATA_ATTR:an,ARIA_ATTR:rn,IS_SCRIPT_OR_DATA:sn,ATTR_WHITESPACE:Ke}=Xe;let{IS_ALLOWED_URI:Qe}=Xe,w=null;const Je=h({},[...We,...ye,...Ee,...Te,...Ge]);let v=null;const et=h({},[...qe,...Ae,...$e,...de]);let _=Object.seal(E(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),ie=null,ke=null,tt=!0,Me=!0,nt=!1,ot=!0,V=!1,q=!1,Ne=!1,xe=!1,Z=!1,me=!1,pe=!1,it=!0,at=!1;const ln="user-content-";let De=!0,ae=!1,K={},Q=null;const rt=h({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);let st=null;const lt=h({},["audio","video","img","source","image","track"]);let Oe=null;const ct=h({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),he="http://www.w3.org/1998/Math/MathML",ge="http://www.w3.org/2000/svg",F="http://www.w3.org/1999/xhtml";let J=F,Ie=!1,Pe=null;const cn=h({},[he,ge,F],te);let re=null;const dn=["application/xhtml+xml","text/html"],un="text/html";let S=null,ee=null;const fn=y.createElement("form"),dt=function(e){return e instanceof RegExp||e instanceof Function},Ue=function(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!(ee&&ee===e)){if((!e||typeof e!="object")&&(e={}),e=G(e),re=dn.indexOf(e.PARSER_MEDIA_TYPE)===-1?un:e.PARSER_MEDIA_TYPE,S=re==="application/xhtml+xml"?te:j,w="ALLOWED_TAGS"in e?h({},e.ALLOWED_TAGS,S):Je,v="ALLOWED_ATTR"in e?h({},e.ALLOWED_ATTR,S):et,Pe="ALLOWED_NAMESPACES"in e?h({},e.ALLOWED_NAMESPACES,te):cn,Oe="ADD_URI_SAFE_ATTR"in e?h(G(ct),e.ADD_URI_SAFE_ATTR,S):ct,st="ADD_DATA_URI_TAGS"in e?h(G(lt),e.ADD_DATA_URI_TAGS,S):lt,Q="FORBID_CONTENTS"in e?h({},e.FORBID_CONTENTS,S):rt,ie="FORBID_TAGS"in e?h({},e.FORBID_TAGS,S):{},ke="FORBID_ATTR"in e?h({},e.FORBID_ATTR,S):{},K="USE_PROFILES"in e?e.USE_PROFILES:!1,tt=e.ALLOW_ARIA_ATTR!==!1,Me=e.ALLOW_DATA_ATTR!==!1,nt=e.ALLOW_UNKNOWN_PROTOCOLS||!1,ot=e.ALLOW_SELF_CLOSE_IN_ATTR!==!1,V=e.SAFE_FOR_TEMPLATES||!1,q=e.WHOLE_DOCUMENT||!1,Z=e.RETURN_DOM||!1,me=e.RETURN_DOM_FRAGMENT||!1,pe=e.RETURN_TRUSTED_TYPE||!1,xe=e.FORCE_BODY||!1,it=e.SANITIZE_DOM!==!1,at=e.SANITIZE_NAMED_PROPS||!1,De=e.KEEP_CONTENT!==!1,ae=e.IN_PLACE||!1,Qe=e.ALLOWED_URI_REGEXP||Ye,J=e.NAMESPACE||F,_=e.CUSTOM_ELEMENT_HANDLING||{},e.CUSTOM_ELEMENT_HANDLING&&dt(e.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(_.tagNameCheck=e.CUSTOM_ELEMENT_HANDLING.tagNameCheck),e.CUSTOM_ELEMENT_HANDLING&&dt(e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(_.attributeNameCheck=e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),e.CUSTOM_ELEMENT_HANDLING&&typeof e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements=="boolean"&&(_.allowCustomizedBuiltInElements=e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),V&&(Me=!1),me&&(Z=!0),K&&(w=h({},Ge),v=[],K.html===!0&&(h(w,We),h(v,qe)),K.svg===!0&&(h(w,ye),h(v,Ae),h(v,de)),K.svgFilters===!0&&(h(w,Ee),h(v,Ae),h(v,de)),K.mathMl===!0&&(h(w,Te),h(v,$e),h(v,de))),e.ADD_TAGS&&(w===Je&&(w=G(w)),h(w,e.ADD_TAGS,S)),e.ADD_ATTR&&(v===et&&(v=G(v)),h(v,e.ADD_ATTR,S)),e.ADD_URI_SAFE_ATTR&&h(Oe,e.ADD_URI_SAFE_ATTR,S),e.FORBID_CONTENTS&&(Q===rt&&(Q=G(Q)),h(Q,e.FORBID_CONTENTS,S)),De&&(w["#text"]=!0),q&&h(w,["html","head","body"]),w.table&&(h(w,["tbody"]),delete ie.tbody),e.TRUSTED_TYPES_POLICY){if(typeof e.TRUSTED_TYPES_POLICY.createHTML!="function")throw ne('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof e.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw ne('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');k=e.TRUSTED_TYPES_POLICY,oe=k.createHTML("")}else k===void 0&&(k=Yt(ue,R)),k!==null&&typeof oe=="string"&&(oe=k.createHTML(""));a&&a(e),ee=e}},ut=h({},["mi","mo","mn","ms","mtext"]),ft=h({},["foreignobject","desc","title","annotation-xml"]),mn=h({},["title","style","font","a","script"]),mt=h({},[...ye,...Ee,...Pt]),pt=h({},[...Te,...Ut]),pn=function(e){let n=ve(e);(!n||!n.tagName)&&(n={namespaceURI:J,tagName:"template"});const s=j(e.tagName),T=j(n.tagName);return Pe[e.namespaceURI]?e.namespaceURI===ge?n.namespaceURI===F?s==="svg":n.namespaceURI===he?s==="svg"&&(T==="annotation-xml"||ut[T]):!!mt[s]:e.namespaceURI===he?n.namespaceURI===F?s==="math":n.namespaceURI===ge?s==="math"&&ft[T]:!!pt[s]:e.namespaceURI===F?n.namespaceURI===ge&&!ft[T]||n.namespaceURI===he&&!ut[T]?!1:!pt[s]&&(mn[s]||!mt[s]):!!(re==="application/xhtml+xml"&&Pe[e.namespaceURI]):!1},$=function(e){W(d.removed,{element:e});try{e.parentNode.removeChild(e)}catch{e.remove()}},ze=function(e,n){try{W(d.removed,{attribute:n.getAttributeNode(e),from:n})}catch{W(d.removed,{attribute:null,from:n})}if(n.removeAttribute(e),e==="is"&&!v[e])if(Z||me)try{$(n)}catch{}else try{n.setAttribute(e,"")}catch{}},ht=function(e){let n=null,s=null;if(xe)e="<remove></remove>"+e;else{const L=be(e,/^[\r\n\t ]+/);s=L&&L[0]}re==="application/xhtml+xml"&&J===F&&(e='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+e+"</body></html>");const T=k?k.createHTML(e):e;if(J===F)try{n=new Zt().parseFromString(T,re)}catch{}if(!n||!n.documentElement){n=Se.createDocument(J,"template",null);try{n.documentElement.innerHTML=Ie?oe:T}catch{}}const C=n.body||n.documentElement;return e&&s&&C.insertBefore(y.createTextNode(s),C.childNodes[0]||null),J===F?nn.call(n,q?"html":"body")[0]:q?n.documentElement:C},gt=function(e){return en.call(e.ownerDocument||e,e,we.SHOW_ELEMENT|we.SHOW_COMMENT|we.SHOW_TEXT,null)},hn=function(e){return e instanceof Vt&&(typeof e.nodeName!="string"||typeof e.textContent!="string"||typeof e.removeChild!="function"||!(e.attributes instanceof Xt)||typeof e.removeAttribute!="function"||typeof e.setAttribute!="function"||typeof e.namespaceURI!="string"||typeof e.insertBefore!="function"||typeof e.hasChildNodes!="function")},bt=function(e){return typeof _e=="function"&&e instanceof _e},H=function(e,n,s){U[e]&&P(U[e],T=>{T.call(d,n,s,ee)})},yt=function(e){let n=null;if(H("beforeSanitizeElements",e,null),hn(e))return $(e),!0;const s=S(e.nodeName);if(H("uponSanitizeElement",e,{tagName:s,allowedTags:w}),e.hasChildNodes()&&!bt(e.firstElementChild)&&D(/<[/\w]/g,e.innerHTML)&&D(/<[/\w]/g,e.textContent))return $(e),!0;if(!w[s]||ie[s]){if(!ie[s]&&Tt(s)&&(_.tagNameCheck instanceof RegExp&&D(_.tagNameCheck,s)||_.tagNameCheck instanceof Function&&_.tagNameCheck(s)))return!1;if(De&&!Q[s]){const T=ve(e)||e.parentNode,C=Jt(e)||e.childNodes;if(C&&T){const L=C.length;for(let N=L-1;N>=0;--N)T.insertBefore(Kt(C[N],!0),Qt(e))}}return $(e),!0}return e instanceof Ze&&!pn(e)||(s==="noscript"||s==="noembed"||s==="noframes")&&D(/<\/no(script|embed|frames)/i,e.innerHTML)?($(e),!0):(V&&e.nodeType===3&&(n=e.textContent,P([Ce,Le,Re],T=>{n=B(n,T," ")}),e.textContent!==n&&(W(d.removed,{element:e.cloneNode()}),e.textContent=n)),H("afterSanitizeElements",e,null),!1)},Et=function(e,n,s){if(it&&(n==="id"||n==="name")&&(s in y||s in fn))return!1;if(!(Me&&!ke[n]&&D(an,n))){if(!(tt&&D(rn,n))){if(!v[n]||ke[n]){if(!(Tt(e)&&(_.tagNameCheck instanceof RegExp&&D(_.tagNameCheck,e)||_.tagNameCheck instanceof Function&&_.tagNameCheck(e))&&(_.attributeNameCheck instanceof RegExp&&D(_.attributeNameCheck,n)||_.attributeNameCheck instanceof Function&&_.attributeNameCheck(n))||n==="is"&&_.allowCustomizedBuiltInElements&&(_.tagNameCheck instanceof RegExp&&D(_.tagNameCheck,s)||_.tagNameCheck instanceof Function&&_.tagNameCheck(s))))return!1}else if(!Oe[n]){if(!D(Qe,B(s,Ke,""))){if(!((n==="src"||n==="xlink:href"||n==="href")&&e!=="script"&&xt(s,"data:")===0&&st[e])){if(!(nt&&!D(sn,B(s,Ke,"")))){if(s)return!1}}}}}}return!0},Tt=function(e){return e.indexOf("-")>0},At=function(e){H("beforeSanitizeAttributes",e,null);const{attributes:n}=e;if(!n)return;const s={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:v};let T=n.length;for(;T--;){const C=n[T],{name:L,namespaceURI:N,value:Y}=C,se=S(L);let x=L==="value"?Y:Dt(Y);if(s.attrName=se,s.attrValue=x,s.keepAttr=!0,s.forceKeepAttr=void 0,H("uponSanitizeAttribute",e,s),x=s.attrValue,s.forceKeepAttr||(ze(L,e),!s.keepAttr))continue;if(!ot&&D(/\/>/i,x)){ze(L,e);continue}V&&P([Ce,Le,Re],wt=>{x=B(x,wt," ")});const _t=S(e.nodeName);if(Et(_t,se,x)){if(at&&(se==="id"||se==="name")&&(ze(L,e),x=ln+x),k&&typeof ue=="object"&&typeof ue.getAttributeType=="function"&&!N)switch(ue.getAttributeType(_t,se)){case"TrustedHTML":{x=k.createHTML(x);break}case"TrustedScriptURL":{x=k.createScriptURL(x);break}}try{N?e.setAttributeNS(N,L,x):e.setAttribute(L,x),le(d.removed)}catch{}}}H("afterSanitizeAttributes",e,null)},gn=function u(e){let n=null;const s=gt(e);for(H("beforeSanitizeShadowDOM",e,null);n=s.nextNode();)H("uponSanitizeShadowNode",n,null),!yt(n)&&(n.content instanceof z&&u(n.content),At(n));H("afterSanitizeShadowDOM",e,null)};return d.sanitize=function(u){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=null,s=null,T=null,C=null;if(Ie=!u,Ie&&(u="<!-->"),typeof u!="string"&&!bt(u))if(typeof u.toString=="function"){if(u=u.toString(),typeof u!="string")throw ne("dirty is not a string, aborting")}else throw ne("toString is not a function");if(!d.isSupported)return u;if(Ne||Ue(e),d.removed=[],typeof u=="string"&&(ae=!1),ae){if(u.nodeName){const Y=S(u.nodeName);if(!w[Y]||ie[Y])throw ne("root node is forbidden and cannot be sanitized in-place")}}else if(u instanceof _e)n=ht("<!---->"),s=n.ownerDocument.importNode(u,!0),s.nodeType===1&&s.nodeName==="BODY"||s.nodeName==="HTML"?n=s:n.appendChild(s);else{if(!Z&&!V&&!q&&u.indexOf("<")===-1)return k&&pe?k.createHTML(u):u;if(n=ht(u),!n)return Z?null:pe?oe:""}n&&xe&&$(n.firstChild);const L=gt(ae?u:n);for(;T=L.nextNode();)yt(T)||(T.content instanceof z&&gn(T.content),At(T));if(ae)return u;if(Z){if(me)for(C=tn.call(n.ownerDocument);n.firstChild;)C.appendChild(n.firstChild);else C=n;return(v.shadowroot||v.shadowrootmode)&&(C=on.call(g,C,!0)),C}let N=q?n.outerHTML:n.innerHTML;return q&&w["!doctype"]&&n.ownerDocument&&n.ownerDocument.doctype&&n.ownerDocument.doctype.name&&D(je,n.ownerDocument.doctype.name)&&(N="<!DOCTYPE "+n.ownerDocument.doctype.name+`>
|
|
2
|
+
`+N),V&&P([Ce,Le,Re],Y=>{N=B(N,Y," ")}),k&&pe?k.createHTML(N):N},d.setConfig=function(){let u=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};Ue(u),Ne=!0},d.clearConfig=function(){ee=null,Ne=!1},d.isValidAttribute=function(u,e,n){ee||Ue({});const s=S(u),T=S(e);return Et(s,T,n)},d.addHook=function(u,e){typeof e=="function"&&(U[u]=U[u]||[],W(U[u],e))},d.removeHook=function(u){if(U[u])return le(U[u])},d.removeHooks=function(u){U[u]&&(U[u]=[])},d.removeAllHooks=function(){U={}},d}var jt=Ve();return jt})})(Rt);const He=Rt.exports,Nn=":host{display:inline-grid;overflow:hidden;width:100%}.view-email{width:100%}.view-email div.gmail_quote{display:none;color:var(--nylas-color-primary-400)}.view-email div.gmail_quote.show{display:block}.view-email blockquote{border-color:var(--nylas-color-primary-500) !important}.view-email .nylas-view-email-toggle-button{display:flex;justify-content:center;align-items:center;cursor:pointer;background-color:var(--nylas-color-primary-200);color:var(--nylas-color-primary-600);border:0;border-radius:2px;font-size:14px;font-weight:500;line-height:1.5;transition:all 0.2s ease-in-out}.view-email .nylas-view-email-toggle-button:hover{background-color:var(--nylas-color-primary-200);color:var(--nylas-color-primary-600)}",xn=Nn;He.addHook("afterSanitizeAttributes",function(t){"target"in t&&(t.setAttribute("target","_blank"),t.setAttribute("rel","noopener"))});const kt=class{constructor(t){o.registerInstance(this,t),this.htmlElement=document.createElement("html"),this.setBody=i=>{var p;this.state="loading",this.styles=[],this.hoistedFontURLs=new Map,this.sanitizedBody="",document.querySelectorAll(".nylas-view-email-font").forEach(r=>{r.remove()}),(this.message?o.detectIfMessageIsHTML(this.message):o.detectHTMLOrPlainText(i))||(i=`<html><body>${o.parsePlainTextToHTML(i)}</body></html>`),this.htmlElement.innerHTML=i,this.detectDarkMode&&Mn(this.htmlElement),this.htmlElement.querySelectorAll("link").forEach(r=>{if(console.debug(`[nylas-view-email] Hoisting link: ${r.getAttribute("href")}`),r.getAttribute("rel")==="stylesheet"&&r.getAttribute("href")){const m=r.getAttribute("href");if(m){const a=new URL(m,window.location.href);(a.protocol==="https:"||a.protocol==="http:")&&this.hoistedFontURLs.set(a.href,a.href)}}}),this.htmlElement.querySelectorAll("style").forEach(r=>{r.innerHTML.split(`
|
|
3
|
+
`).forEach(m=>{const a=m.match(/@import url\((.*)\)/);if(a){const c=new URL(a[1],window.location.href);(c.protocol==="https:"||c.protocol==="http:")&&this.hoistedFontURLs.set(c.href,c.href)}}),r.innerHTML=r.innerHTML.replace("body",":host"),this.styles.push(r),r.remove()}),this.htmlElement.querySelectorAll("a").forEach(r=>{r.setAttribute("target","_blank")});const l=this.htmlElement.querySelector(".gmail_quote");if(l){const r=document.createElement("button");r.classList.add("nylas-view-email-toggle-button"),r.setAttribute("aria-label","Show quoted text"),r.innerText="...",(p=l.parentElement)==null||p.insertBefore(r,l)}this.sanitizedBody=He.sanitize(this.htmlElement.innerHTML),this.hoistedFontURLs.forEach((r,m)=>{const a=document.createElement("link");a.setAttribute("rel","stylesheet"),a.setAttribute("href",r),a.classList.add("nylas-view-email-font"),document.head.appendChild(a)}),this.state="ready"},this.handleMobileSize=()=>{var f,l,p,r;const i=Math.max(document.documentElement.clientWidth||0,window.innerWidth||0);if(i<=768){const m=(f=this.viewEmailElement)==null?void 0:f.getBoundingClientRect();if(m&&this.viewEmailElement&&this.parent&&m.width>i){const a=this.parent,c=a==null?void 0:a.getBoundingClientRect();o.debug("Parent width:",c==null?void 0:c.width,"Parent height:",c==null?void 0:c.height),o.debug("Parent client width:",a.clientWidth,"Parent client height:",a.clientHeight);const E=c.width/m.width,A=c.height/m.height,M=Math.min(E,A);o.debug("Scale:",M),this.viewEmailElement.style.setProperty("transform",`scale(${M})`),this.viewEmailElement.style.setProperty("transform-origin","top left"),this.viewEmailElement.style.setProperty("height",`${m.height*M}px`)}}else(l=this.viewEmailElement)==null||l.style.removeProperty("transform"),(p=this.viewEmailElement)==null||p.style.removeProperty("transform-origin"),(r=this.viewEmailElement)==null||r.style.removeProperty("height")},this.message=void 0,this.parent=void 0,this.attachments=[],this.detectDarkMode=!0,this.state="loading",this.sanitizedBody="",this.styles=[],this.viewEmailElement=void 0,this.hoistedFontURLs=new Map}connectedCallback(){}disconnectedCallback(){o.debug("[nylas-view-email] Component disconnected"),this.state="loading",this.styles=[],this.hoistedFontURLs=new Map,this.sanitizedBody="",document.querySelectorAll(".nylas-view-email-font").forEach(t=>{t.remove()})}async componentWillLoad(){var t;o.debug("[nylas-view-email] component loaded"),this.setBody(((t=this.message)==null?void 0:t.body)??"")}async componentDidLoad(){o.debug("[nylas-view-thread] Component did load"),this.handleMobileSize()}async messageChanged(){var t;o.debug("[nylas-view-thread] Message changed",{message:this.message}),this.setBody(((t=this.message)==null?void 0:t.body)??"")}handleScroll(){this.handleMobileSize()}viewEmailElementChanged(){var i;const t=(i=this.viewEmailElement)==null?void 0:i.querySelectorAll(".nylas-view-email-toggle-button");t&&t.forEach(f=>{f.addEventListener("click",()=>{var p;const l=(p=this.viewEmailElement)==null?void 0:p.querySelector(".gmail_quote");l&&l.classList.toggle("show")})})}render(){return console.debug("[nylas-view-email] render",{hoistedFontURLs:this.hoistedFontURLs}),o.h(o.Host,{key:"43eacf68af3d674b391490436c9b99daabb1eafb"},this.state==="loading"&&o.h("div",null,"Loading..."),this.state==="ready"&&o.h(o.Fragment,null,this.styles.map(t=>o.h("style",null,He.sanitize(t.innerHTML))),o.h("div",{class:"view-email",part:"view-email",innerHTML:this.sanitizedBody,ref:t=>this.viewEmailElement=t})))}get host(){return o.getElement(this)}static get watchers(){return{message:["messageChanged"],viewEmailElement:["viewEmailElementChanged"]}}};kt.style=xn;const Dn=".sc-reply-all-icon-h{display:flex}",On=Dn,Mt=class{constructor(t){o.registerInstance(this,t),this.width="15",this.height="15"}render(){return o.h("svg",{key:"1828cbf84b5c319ae5f49a26899d07a5887530b0",fill:"auto",width:this.width,height:this.height,viewBox:"0 0 1920 1920",xmlns:"http://www.w3.org/2000/svg"},o.h("path",{key:"fd9631d0eca90b3ee04beb055b776e1b3643e7d5",d:"m1030.975 188 81.249 81.249-429.228 429.228h300.747c516.223 0 936.257 420.034 936.257 936.257v98.028h-114.92v-98.028c0-452.901-368.436-821.337-821.337-821.337H682.996l429.228 429.229-81.25 81.248-567.936-567.937L1030.975 188Zm-463.038.011 81.249 81.25-486.688 486.688 486.688 486.688-81.249 81.249L0 755.949 567.937 188.01Z","fill-rule":"evenodd"}))}};Mt.style=On;const In=".sc-reply-icon-h{display:flex}",Pn=In,Nt=class{constructor(t){o.registerInstance(this,t),this.width="15",this.height="15"}render(){return o.h("svg",{key:"335c0da2d5f172a9775dad2013550ce1ce436bac",fill:"auto",width:this.width,height:this.height,viewBox:"0 0 1920 1920",xmlns:"http://www.w3.org/2000/svg"},o.h("path",{key:"44711cc95b1da82767491f45e921a51d8155faf9",d:"M835.942 632.563H244.966l478.08-478.08-90.496-90.496L-.026 696.563 632.55 1329.14l90.496-90.496-478.08-478.08h590.976c504.448 0 914.816 410.368 914.816 914.816v109.184h128V1675.38c0-574.976-467.84-1042.816-1042.816-1042.816","fill-rule":"evenodd"}))}};Nt.style=Pn;exports.forward_icon=St;exports.nylas_composer=Ct;exports.nylas_summarize_message_button=Be;exports.nylas_view_email=kt;exports.reply_all_icon=Mt;exports.reply_icon=Nt;
|