@novu/js 2.6.0 → 2.6.3
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/cjs/{chunk-R7DABK4G.js → chunk-JNGDKCKO.js} +1 -1
- package/dist/cjs/index.js +14 -14
- package/dist/cjs/themes/index.d.ts +1 -1
- package/dist/cjs/{types-Bg3djGZK.d.ts → types-DJ_8ubnK.d.ts} +1 -1
- package/dist/cjs/ui/index.d.ts +5 -2
- package/dist/cjs/ui/index.js +30 -29
- package/dist/esm/{chunk-BGMSCE2S.mjs → chunk-CRYKKYGT.mjs} +1 -1
- package/dist/esm/index.mjs +1 -1
- package/dist/esm/themes/index.d.mts +1 -1
- package/dist/esm/{types-Cuys78dx.d.mts → types-mimIUjS9.d.mts} +1 -1
- package/dist/esm/ui/index.d.mts +5 -2
- package/dist/esm/ui/index.mjs +27 -26
- package/dist/index.css +1 -1
- package/dist/novu.min.js +1 -1
- package/dist/novu.min.js.gz +0 -0
- package/package.json +20 -18
|
@@ -1593,7 +1593,7 @@ var InboxService = class {
|
|
|
1593
1593
|
_httpClient = new WeakMap();
|
|
1594
1594
|
|
|
1595
1595
|
// src/novu.ts
|
|
1596
|
-
var version = "2.6.
|
|
1596
|
+
var version = "2.6.3";
|
|
1597
1597
|
var name = "@novu/js";
|
|
1598
1598
|
var userAgent = `${name}@${version}`;
|
|
1599
1599
|
var _emitter7, _session, _socket, _inboxService3;
|
package/dist/cjs/index.js
CHANGED
|
@@ -1,59 +1,59 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunkJNGDKCKO_js = require('./chunk-JNGDKCKO.js');
|
|
4
4
|
require('./chunk-7B52C2XE.js');
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
|
|
8
8
|
Object.defineProperty(exports, "ActionTypeEnum", {
|
|
9
9
|
enumerable: true,
|
|
10
|
-
get: function () { return
|
|
10
|
+
get: function () { return chunkJNGDKCKO_js.ActionTypeEnum; }
|
|
11
11
|
});
|
|
12
12
|
Object.defineProperty(exports, "ChannelType", {
|
|
13
13
|
enumerable: true,
|
|
14
|
-
get: function () { return
|
|
14
|
+
get: function () { return chunkJNGDKCKO_js.ChannelType; }
|
|
15
15
|
});
|
|
16
16
|
Object.defineProperty(exports, "CtaType", {
|
|
17
17
|
enumerable: true,
|
|
18
|
-
get: function () { return
|
|
18
|
+
get: function () { return chunkJNGDKCKO_js.CtaType; }
|
|
19
19
|
});
|
|
20
20
|
Object.defineProperty(exports, "NotificationActionStatus", {
|
|
21
21
|
enumerable: true,
|
|
22
|
-
get: function () { return
|
|
22
|
+
get: function () { return chunkJNGDKCKO_js.NotificationActionStatus; }
|
|
23
23
|
});
|
|
24
24
|
Object.defineProperty(exports, "NotificationButton", {
|
|
25
25
|
enumerable: true,
|
|
26
|
-
get: function () { return
|
|
26
|
+
get: function () { return chunkJNGDKCKO_js.NotificationButton; }
|
|
27
27
|
});
|
|
28
28
|
Object.defineProperty(exports, "NotificationStatus", {
|
|
29
29
|
enumerable: true,
|
|
30
|
-
get: function () { return
|
|
30
|
+
get: function () { return chunkJNGDKCKO_js.NotificationStatus; }
|
|
31
31
|
});
|
|
32
32
|
Object.defineProperty(exports, "Novu", {
|
|
33
33
|
enumerable: true,
|
|
34
|
-
get: function () { return
|
|
34
|
+
get: function () { return chunkJNGDKCKO_js.Novu; }
|
|
35
35
|
});
|
|
36
36
|
Object.defineProperty(exports, "PreferenceLevel", {
|
|
37
37
|
enumerable: true,
|
|
38
|
-
get: function () { return
|
|
38
|
+
get: function () { return chunkJNGDKCKO_js.PreferenceLevel; }
|
|
39
39
|
});
|
|
40
40
|
Object.defineProperty(exports, "PreferenceOverrideSource", {
|
|
41
41
|
enumerable: true,
|
|
42
|
-
get: function () { return
|
|
42
|
+
get: function () { return chunkJNGDKCKO_js.PreferenceOverrideSource; }
|
|
43
43
|
});
|
|
44
44
|
Object.defineProperty(exports, "PreferenceOverrideSourceEnum", {
|
|
45
45
|
enumerable: true,
|
|
46
|
-
get: function () { return
|
|
46
|
+
get: function () { return chunkJNGDKCKO_js.PreferenceOverrideSourceEnum; }
|
|
47
47
|
});
|
|
48
48
|
Object.defineProperty(exports, "WebSocketEvent", {
|
|
49
49
|
enumerable: true,
|
|
50
|
-
get: function () { return
|
|
50
|
+
get: function () { return chunkJNGDKCKO_js.WebSocketEvent; }
|
|
51
51
|
});
|
|
52
52
|
Object.defineProperty(exports, "areTagsEqual", {
|
|
53
53
|
enumerable: true,
|
|
54
|
-
get: function () { return
|
|
54
|
+
get: function () { return chunkJNGDKCKO_js.areTagsEqual; }
|
|
55
55
|
});
|
|
56
56
|
Object.defineProperty(exports, "isSameFilter", {
|
|
57
57
|
enumerable: true,
|
|
58
|
-
get: function () { return
|
|
58
|
+
get: function () { return chunkJNGDKCKO_js.isSameFilter; }
|
|
59
59
|
});
|
|
@@ -25,7 +25,7 @@ declare const defaultLocalization: {
|
|
|
25
25
|
readonly 'preferences.workflow.disabled.tooltip': "Contact admin to edit";
|
|
26
26
|
};
|
|
27
27
|
|
|
28
|
-
declare const appearanceKeys: readonly ["button", "popoverContent", "popoverTrigger", "dropdownContent", "dropdownTrigger", "dropdownItem", "dropdownItemLabel", "dropdownItemLabelContainer", "dropdownItemLeftIcon", "dropdownItemRightIcon", "tooltipContent", "tooltipTrigger", "back__button", "skeletonText", "skeletonAvatar", "tabsRoot", "tabsList", "tabsContent", "tabsTrigger", "dots", "root", "bellIcon", "bellContainer", "bellDot", "preferences__button", "preferencesContainer", "inboxHeader", "loading", "inboxContent", "inbox__popoverTrigger", "inbox__popoverContent", "notificationListContainer", "notificationList", "notificationListEmptyNoticeContainer", "notificationListEmptyNotice", "notificationListEmptyNoticeIcon", "notificationListNewNotificationsNotice__button", "notification", "notificationDot", "notificationSubject", "notificationSubject__strong", "notificationBody", "notificationBody__strong", "notificationBodyContainer", "notificationImage", "notificationDate", "notificationDefaultActions", "notificationCustomActions", "notificationPrimaryAction__button", "notificationSecondaryAction__button", "notificationRead__button", "notificationUnread__button", "notificationArchive__button", "notificationUnarchive__button", "notificationsTabs__tabsRoot", "notificationsTabs__tabsList", "notificationsTabs__tabsContent", "notificationsTabs__tabsTrigger", "notificationsTabsTriggerLabel", "notificationsTabsTriggerCount", "inboxStatus__title", "inboxStatus__dropdownTrigger", "inboxStatus__dropdownContent", "inboxStatus__dropdownItem", "inboxStatus__dropdownItemLabel", "inboxStatus__dropdownItemLabelContainer", "inboxStatus__dropdownItemLeft__icon", "inboxStatus__dropdownItemRight__icon", "moreActionsContainer", "moreActions__dropdownTrigger", "moreActions__dropdownContent", "moreActions__dropdownItem", "moreActions__dropdownItemLabel", "moreActions__dropdownItemLeft__icon", "moreActions__dots", "moreTabs__button", "moreTabs__dots", "moreTabs__dropdownTrigger", "moreTabs__dropdownContent", "moreTabs__dropdownItem", "moreTabs__dropdownItemLabel", "moreTabs__dropdownItemRight__icon", "workflowContainer", "workflowLabel", "workflowLabelContainer", "workflowContainerDisabledNotice", "workflowLabelDisabled__icon", "workflowContainerRight__icon", "workflowArrow__icon", "channelContainer", "channelsContainerCollapsible", "channelsContainer", "channelLabel", "channelLabelContainer", "channelDescription", "channelName", "channelSwitchContainer", "channelSwitch", "channelSwitchThumb", "preferencesHeader", "preferencesHeader__back__button", "preferencesHeader__title", "preferencesLoadingContainer", "strong"];
|
|
28
|
+
declare const appearanceKeys: readonly ["button", "popoverContent", "popoverTrigger", "dropdownContent", "dropdownTrigger", "dropdownItem", "dropdownItemLabel", "dropdownItemLabelContainer", "dropdownItemLeftIcon", "dropdownItemRightIcon", "tooltipContent", "tooltipTrigger", "back__button", "skeletonText", "skeletonAvatar", "tabsRoot", "tabsList", "tabsContent", "tabsTrigger", "dots", "root", "bellIcon", "bellContainer", "bellDot", "preferences__button", "preferencesContainer", "inboxHeader", "loading", "inboxContent", "inbox__popoverTrigger", "inbox__popoverContent", "notificationListContainer", "notificationList", "notificationListEmptyNoticeContainer", "notificationListEmptyNotice", "notificationListEmptyNoticeIcon", "notificationListNewNotificationsNotice__button", "notification", "notificationDot", "notificationSubject", "notificationSubject__strong", "notificationBody", "notificationBody__strong", "notificationBodyContainer", "notificationImage", "notificationDate", "notificationDefaultActions", "notificationCustomActions", "notificationPrimaryAction__button", "notificationSecondaryAction__button", "notificationRead__button", "notificationUnread__button", "notificationArchive__button", "notificationUnarchive__button", "notificationsTabs__tabsRoot", "notificationsTabs__tabsList", "notificationsTabs__tabsContent", "notificationsTabs__tabsTrigger", "notificationsTabsTriggerLabel", "notificationsTabsTriggerCount", "inboxStatus__title", "inboxStatus__dropdownTrigger", "inboxStatus__dropdownContent", "inboxStatus__dropdownItem", "inboxStatus__dropdownItemLabel", "inboxStatus__dropdownItemLabelContainer", "inboxStatus__dropdownItemLeft__icon", "inboxStatus__dropdownItemRight__icon", "moreActionsContainer", "moreActions__dropdownTrigger", "moreActions__dropdownContent", "moreActions__dropdownItem", "moreActions__dropdownItemLabel", "moreActions__dropdownItemLeft__icon", "moreActions__dots", "moreTabs__button", "moreTabs__dots", "moreTabs__dropdownTrigger", "moreTabs__dropdownContent", "moreTabs__dropdownItem", "moreTabs__dropdownItemLabel", "moreTabs__dropdownItemRight__icon", "workflowContainer", "workflowLabel", "workflowLabelHeader", "workflowLabelContainer", "workflowContainerDisabledNotice", "workflowLabelDisabled__icon", "workflowContainerRight__icon", "workflowArrow__icon", "channelContainer", "channelsContainerCollapsible", "channelsContainer", "channelLabel", "channelLabelContainer", "channelDescription", "channelName", "channelSwitchContainer", "channelSwitch", "channelSwitchThumb", "preferencesHeader", "preferencesHeader__back__button", "preferencesHeader__title", "preferencesLoadingContainer", "strong"];
|
|
29
29
|
|
|
30
30
|
type LocalizationKey = keyof typeof defaultLocalization;
|
|
31
31
|
type Localization = {
|
package/dist/cjs/ui/index.d.ts
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { s as NovuOptions } from '../novu-C3OVXS9Q.js';
|
|
2
2
|
export { t as Notification } from '../novu-C3OVXS9Q.js';
|
|
3
|
-
import { N as NotificationRenderer, B as BellRenderer, a as NotificationClickHandler, b as NotificationActionClickHandler, c as NovuProviderProps, d as BaseNovuProviderProps, A as Appearance, L as Localization, T as Tab, P as PreferencesFilter, R as RouterPush } from '../types-
|
|
4
|
-
export { e as AppearanceKey, C as CSSProperties, E as ElementStyles, f as Elements, i as LocalizationKey, h as NotificationStatus, g as Theme, V as Variables } from '../types-
|
|
3
|
+
import { N as NotificationRenderer, B as BellRenderer, a as NotificationClickHandler, b as NotificationActionClickHandler, c as NovuProviderProps, d as BaseNovuProviderProps, A as Appearance, L as Localization, T as Tab, P as PreferencesFilter, R as RouterPush } from '../types-DJ_8ubnK.js';
|
|
4
|
+
export { e as AppearanceKey, C as CSSProperties, E as ElementStyles, f as Elements, i as LocalizationKey, h as NotificationStatus, g as Theme, V as Variables } from '../types-DJ_8ubnK.js';
|
|
5
|
+
import { Placement, OffsetOptions } from '@floating-ui/dom';
|
|
5
6
|
import * as solid_js from 'solid-js';
|
|
6
7
|
import { ComponentProps } from 'solid-js';
|
|
7
8
|
import { MountableElement } from 'solid-js/web';
|
|
@@ -14,6 +15,8 @@ type InboxProps = {
|
|
|
14
15
|
onNotificationClick?: NotificationClickHandler;
|
|
15
16
|
onPrimaryActionClick?: NotificationActionClickHandler;
|
|
16
17
|
onSecondaryActionClick?: NotificationActionClickHandler;
|
|
18
|
+
placement?: Placement;
|
|
19
|
+
placementOffset?: OffsetOptions;
|
|
17
20
|
};
|
|
18
21
|
declare enum InboxPage {
|
|
19
22
|
Notifications = "notifications",
|
package/dist/cjs/ui/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunkJNGDKCKO_js = require('../chunk-JNGDKCKO.js');
|
|
4
4
|
var chunkERC62PGI_js = require('../chunk-ERC62PGI.js');
|
|
5
5
|
var chunk7B52C2XE_js = require('../chunk-7B52C2XE.js');
|
|
6
6
|
var web = require('solid-js/web');
|
|
@@ -151,6 +151,7 @@ var appearanceKeys = [
|
|
|
151
151
|
// workflow
|
|
152
152
|
"workflowContainer",
|
|
153
153
|
"workflowLabel",
|
|
154
|
+
"workflowLabelHeader",
|
|
154
155
|
"workflowLabelContainer",
|
|
155
156
|
"workflowContainerDisabledNotice",
|
|
156
157
|
"workflowLabelDisabled__icon",
|
|
@@ -753,7 +754,7 @@ var useInboxContext = () => {
|
|
|
753
754
|
};
|
|
754
755
|
var NovuContext = solidJs.createContext(void 0);
|
|
755
756
|
function NovuProvider(props) {
|
|
756
|
-
const novu = solidJs.createMemo(() => props.novu || new
|
|
757
|
+
const novu = solidJs.createMemo(() => props.novu || new chunkJNGDKCKO_js.Novu(props.options));
|
|
757
758
|
return web.createComponent(NovuContext.Provider, {
|
|
758
759
|
get value() {
|
|
759
760
|
return novu();
|
|
@@ -1352,7 +1353,7 @@ var Motion = new Proxy(solidMotionone.Motion, {
|
|
|
1352
1353
|
});
|
|
1353
1354
|
var PopoverContext = solidJs.createContext(void 0);
|
|
1354
1355
|
function PopoverRoot(props) {
|
|
1355
|
-
var _a;
|
|
1356
|
+
var _a, _b;
|
|
1356
1357
|
const [uncontrolledIsOpen, setUncontrolledIsOpen] = solidJs.createSignal((_a = props.open) != null ? _a : false);
|
|
1357
1358
|
const onOpenChange = () => {
|
|
1358
1359
|
var _a2;
|
|
@@ -1372,16 +1373,16 @@ function PopoverRoot(props) {
|
|
|
1372
1373
|
animationFrame: false,
|
|
1373
1374
|
layoutShift: false
|
|
1374
1375
|
}),
|
|
1375
|
-
middleware: [dom.offset(10), dom.flip({
|
|
1376
|
+
middleware: [dom.offset((_b = props.offset) != null ? _b : 10), dom.flip({
|
|
1376
1377
|
fallbackPlacements: props.fallbackPlacements || ["top-start"]
|
|
1377
1378
|
}), dom.shift()]
|
|
1378
1379
|
});
|
|
1379
1380
|
const floatingStyles = solidJs.createMemo(() => {
|
|
1380
|
-
var _a2,
|
|
1381
|
+
var _a2, _b2;
|
|
1381
1382
|
return {
|
|
1382
1383
|
position: position.strategy,
|
|
1383
1384
|
top: `${(_a2 = position.y) != null ? _a2 : 0}px`,
|
|
1384
|
-
left: `${(
|
|
1385
|
+
left: `${(_b2 = position.x) != null ? _b2 : 0}px`
|
|
1385
1386
|
};
|
|
1386
1387
|
});
|
|
1387
1388
|
const onClose = () => {
|
|
@@ -2012,7 +2013,7 @@ var useNotificationsInfiniteScroll = (props) => {
|
|
|
2012
2013
|
}));
|
|
2013
2014
|
solidJs.onMount(() => {
|
|
2014
2015
|
const listener = ({ data: data2 }) => {
|
|
2015
|
-
if (!data2 || !
|
|
2016
|
+
if (!data2 || !chunkJNGDKCKO_js.isSameFilter(filter, data2.filter)) {
|
|
2016
2017
|
return;
|
|
2017
2018
|
}
|
|
2018
2019
|
mutate({ data: data2.notifications, hasMore: data2.hasMore });
|
|
@@ -2022,7 +2023,7 @@ var useNotificationsInfiniteScroll = (props) => {
|
|
|
2022
2023
|
});
|
|
2023
2024
|
solidJs.createEffect(() => {
|
|
2024
2025
|
const newFilter = chunk7B52C2XE_js.__spreadValues({}, props.options());
|
|
2025
|
-
if (
|
|
2026
|
+
if (chunkJNGDKCKO_js.isSameFilter(filter, newFilter)) {
|
|
2026
2027
|
return;
|
|
2027
2028
|
}
|
|
2028
2029
|
novu.notifications.clearCache();
|
|
@@ -2684,16 +2685,17 @@ var PreferencesRow = (props) => {
|
|
|
2684
2685
|
}
|
|
2685
2686
|
}), null);
|
|
2686
2687
|
web.effect((_p$) => {
|
|
2687
|
-
var _v$ = style("workflowContainer", `nt-p-4 nt-flex nt-flex-col nt-gap-1 nt-items-start nt-self-stretch hover:nt-bg-neutral-alpha-50 nt-rounded-lg data-[disabled=true]:nt-bg-neutral-alpha-50`), _v$2 = isOpen(), _v$3 = style("workflowLabelContainer", "nt-flex nt-justify-between nt-flex-nowrap nt-self-stretch nt-cursor-pointer nt-items-center"), _v$4 = isOpen(), _v$5 = style("
|
|
2688
|
+
var _v$ = style("workflowContainer", `nt-p-4 nt-flex nt-flex-col nt-gap-1 nt-items-start nt-self-stretch hover:nt-bg-neutral-alpha-50 nt-rounded-lg data-[disabled=true]:nt-bg-neutral-alpha-50`), _v$2 = isOpen(), _v$3 = style("workflowLabelContainer", "nt-flex nt-justify-between nt-flex-nowrap nt-self-stretch nt-cursor-pointer nt-items-center nt-overflow-hidden"), _v$4 = isOpen(), _v$5 = style("workflowLabelHeader", "nt-overflow-hidden"), _v$6 = style("workflowLabel", "nt-text-base nt-font-semibold nt-truncate"), _v$7 = props.localizationKey, _v$8 = isOpen(), _v$9 = style("workflowContainerRight__icon", `nt-text-foreground-alpha-600 nt-transition-all nt-duration-200 data-[open=true]:nt-transform data-[open=true]:nt-rotate-180`), _v$10 = isOpen();
|
|
2688
2689
|
_v$ !== _p$.e && web.className(_el$4, _p$.e = _v$);
|
|
2689
2690
|
_v$2 !== _p$.t && web.setAttribute(_el$4, "data-open", _p$.t = _v$2);
|
|
2690
2691
|
_v$3 !== _p$.a && web.className(_el$5, _p$.a = _v$3);
|
|
2691
2692
|
_v$4 !== _p$.o && web.setAttribute(_el$5, "data-open", _p$.o = _v$4);
|
|
2692
|
-
_v$5 !== _p$.i && web.className(_el$
|
|
2693
|
-
_v$6 !== _p$.n && web.
|
|
2694
|
-
_v$7 !== _p$.s && web.setAttribute(_el$7, "data-
|
|
2695
|
-
_v$8 !== _p$.h && web.
|
|
2696
|
-
_v$9 !== _p$.r && web.
|
|
2693
|
+
_v$5 !== _p$.i && web.className(_el$6, _p$.i = _v$5);
|
|
2694
|
+
_v$6 !== _p$.n && web.className(_el$7, _p$.n = _v$6);
|
|
2695
|
+
_v$7 !== _p$.s && web.setAttribute(_el$7, "data-localization", _p$.s = _v$7);
|
|
2696
|
+
_v$8 !== _p$.h && web.setAttribute(_el$7, "data-open", _p$.h = _v$8);
|
|
2697
|
+
_v$9 !== _p$.r && web.className(_el$8, _p$.r = _v$9);
|
|
2698
|
+
_v$10 !== _p$.d && web.setAttribute(_el$8, "data-open", _p$.d = _v$10);
|
|
2697
2699
|
return _p$;
|
|
2698
2700
|
}, {
|
|
2699
2701
|
e: void 0,
|
|
@@ -2704,7 +2706,8 @@ var PreferencesRow = (props) => {
|
|
|
2704
2706
|
n: void 0,
|
|
2705
2707
|
s: void 0,
|
|
2706
2708
|
h: void 0,
|
|
2707
|
-
r: void 0
|
|
2709
|
+
r: void 0,
|
|
2710
|
+
d: void 0
|
|
2708
2711
|
});
|
|
2709
2712
|
return _el$4;
|
|
2710
2713
|
}
|
|
@@ -3307,7 +3310,7 @@ var NotificationListSkeleton = (props) => {
|
|
|
3307
3310
|
};
|
|
3308
3311
|
|
|
3309
3312
|
// src/ui/components/Notification/NotificationList.tsx
|
|
3310
|
-
var _tmpl$47 = /* @__PURE__ */ web.template(`<div><p data-localization=notifications.emptyNotice>`);
|
|
3313
|
+
var _tmpl$47 = /* @__PURE__ */ web.template(`<div><p class=nt-text-center data-localization=notifications.emptyNotice>`);
|
|
3311
3314
|
var _tmpl$215 = /* @__PURE__ */ web.template(`<div>`);
|
|
3312
3315
|
var _tmpl$312 = /* @__PURE__ */ web.template(`<div><div>`);
|
|
3313
3316
|
var EmptyNotificationList = () => {
|
|
@@ -3323,15 +3326,7 @@ var EmptyNotificationList = () => {
|
|
|
3323
3326
|
}
|
|
3324
3327
|
}), _el$2);
|
|
3325
3328
|
web.insert(_el$2, () => t("notifications.emptyNotice"));
|
|
3326
|
-
web.effect((
|
|
3327
|
-
var _v$ = style("notificationListEmptyNoticeContainer", "nt-absolute nt-inset-0 nt-flex nt-flex-col nt-items-center nt-m-auto nt-h-fit nt-w-full nt-text-foreground-alpha-100"), _v$2 = style("notificationListEmptyNotice");
|
|
3328
|
-
_v$ !== _p$.e && web.className(_el$, _p$.e = _v$);
|
|
3329
|
-
_v$2 !== _p$.t && web.className(_el$2, _p$.t = _v$2);
|
|
3330
|
-
return _p$;
|
|
3331
|
-
}, {
|
|
3332
|
-
e: void 0,
|
|
3333
|
-
t: void 0
|
|
3334
|
-
});
|
|
3329
|
+
web.effect(() => web.className(_el$, style("notificationListEmptyNoticeContainer", "nt-flex nt-flex-col nt-items-center nt-m-auto nt-h-fit nt-w-full nt-text-foreground-alpha-100 nt-p-6 nt-text-center")));
|
|
3335
3330
|
return _el$;
|
|
3336
3331
|
})();
|
|
3337
3332
|
};
|
|
@@ -3452,9 +3447,9 @@ var NotificationList = (props) => {
|
|
|
3452
3447
|
}
|
|
3453
3448
|
}));
|
|
3454
3449
|
web.effect((_p$) => {
|
|
3455
|
-
var _v$
|
|
3456
|
-
_v$
|
|
3457
|
-
_v$
|
|
3450
|
+
var _v$ = style("notificationListContainer", "nt-relative nt-h-full nt-overflow-hidden"), _v$2 = style("notificationList", "nt-relative nt-h-full nt-flex nt-flex-col nt-overflow-y-auto");
|
|
3451
|
+
_v$ !== _p$.e && web.className(_el$3, _p$.e = _v$);
|
|
3452
|
+
_v$2 !== _p$.t && web.className(_el$4, _p$.t = _v$2);
|
|
3458
3453
|
return _p$;
|
|
3459
3454
|
}, {
|
|
3460
3455
|
e: void 0,
|
|
@@ -3842,6 +3837,12 @@ var Inbox2 = (props) => {
|
|
|
3842
3837
|
return isOpen();
|
|
3843
3838
|
},
|
|
3844
3839
|
onOpenChange: setIsOpened,
|
|
3840
|
+
get placement() {
|
|
3841
|
+
return props.placement;
|
|
3842
|
+
},
|
|
3843
|
+
get offset() {
|
|
3844
|
+
return props.placementOffset;
|
|
3845
|
+
},
|
|
3845
3846
|
get children() {
|
|
3846
3847
|
return [web.createComponent(Popover.Trigger, {
|
|
3847
3848
|
asChild: (triggerProps) => web.createComponent(Button, web.mergeProps({
|
|
@@ -3998,7 +3999,7 @@ var Renderer = (props) => {
|
|
|
3998
3999
|
}
|
|
3999
4000
|
});
|
|
4000
4001
|
};
|
|
4001
|
-
var version = "2.6.
|
|
4002
|
+
var version = "2.6.3";
|
|
4002
4003
|
var cssHref = `https://cdn.jsdelivr.net/npm/@novu/js@${version}/dist/index.css`;
|
|
4003
4004
|
var _dispose, _rootElement, _mountedElements, _setMountedElements, _appearance, _setAppearance, _localization, _setLocalization, _options, _setOptions, _tabs, _setTabs, _routerPush, _setRouterPush, _preferencesFilter, _setPreferencesFilter, _predefinedNovu, _NovuUI_instances, mountComponentRenderer_fn, updateComponentProps_fn;
|
|
4004
4005
|
var NovuUI = class {
|
|
@@ -1586,7 +1586,7 @@ var InboxService = class {
|
|
|
1586
1586
|
_httpClient = new WeakMap();
|
|
1587
1587
|
|
|
1588
1588
|
// src/novu.ts
|
|
1589
|
-
var version = "2.6.
|
|
1589
|
+
var version = "2.6.3";
|
|
1590
1590
|
var name = "@novu/js";
|
|
1591
1591
|
var userAgent = `${name}@${version}`;
|
|
1592
1592
|
var _emitter7, _session, _socket, _inboxService3;
|
package/dist/esm/index.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { ActionTypeEnum, ChannelType, CtaType, NotificationActionStatus, NotificationButton, NotificationStatus, Novu, PreferenceLevel, PreferenceOverrideSource, PreferenceOverrideSourceEnum, WebSocketEvent, areTagsEqual, isSameFilter } from './chunk-
|
|
1
|
+
export { ActionTypeEnum, ChannelType, CtaType, NotificationActionStatus, NotificationButton, NotificationStatus, Novu, PreferenceLevel, PreferenceOverrideSource, PreferenceOverrideSourceEnum, WebSocketEvent, areTagsEqual, isSameFilter } from './chunk-CRYKKYGT.mjs';
|
|
2
2
|
import './chunk-STZMOEWR.mjs';
|
|
@@ -25,7 +25,7 @@ declare const defaultLocalization: {
|
|
|
25
25
|
readonly 'preferences.workflow.disabled.tooltip': "Contact admin to edit";
|
|
26
26
|
};
|
|
27
27
|
|
|
28
|
-
declare const appearanceKeys: readonly ["button", "popoverContent", "popoverTrigger", "dropdownContent", "dropdownTrigger", "dropdownItem", "dropdownItemLabel", "dropdownItemLabelContainer", "dropdownItemLeftIcon", "dropdownItemRightIcon", "tooltipContent", "tooltipTrigger", "back__button", "skeletonText", "skeletonAvatar", "tabsRoot", "tabsList", "tabsContent", "tabsTrigger", "dots", "root", "bellIcon", "bellContainer", "bellDot", "preferences__button", "preferencesContainer", "inboxHeader", "loading", "inboxContent", "inbox__popoverTrigger", "inbox__popoverContent", "notificationListContainer", "notificationList", "notificationListEmptyNoticeContainer", "notificationListEmptyNotice", "notificationListEmptyNoticeIcon", "notificationListNewNotificationsNotice__button", "notification", "notificationDot", "notificationSubject", "notificationSubject__strong", "notificationBody", "notificationBody__strong", "notificationBodyContainer", "notificationImage", "notificationDate", "notificationDefaultActions", "notificationCustomActions", "notificationPrimaryAction__button", "notificationSecondaryAction__button", "notificationRead__button", "notificationUnread__button", "notificationArchive__button", "notificationUnarchive__button", "notificationsTabs__tabsRoot", "notificationsTabs__tabsList", "notificationsTabs__tabsContent", "notificationsTabs__tabsTrigger", "notificationsTabsTriggerLabel", "notificationsTabsTriggerCount", "inboxStatus__title", "inboxStatus__dropdownTrigger", "inboxStatus__dropdownContent", "inboxStatus__dropdownItem", "inboxStatus__dropdownItemLabel", "inboxStatus__dropdownItemLabelContainer", "inboxStatus__dropdownItemLeft__icon", "inboxStatus__dropdownItemRight__icon", "moreActionsContainer", "moreActions__dropdownTrigger", "moreActions__dropdownContent", "moreActions__dropdownItem", "moreActions__dropdownItemLabel", "moreActions__dropdownItemLeft__icon", "moreActions__dots", "moreTabs__button", "moreTabs__dots", "moreTabs__dropdownTrigger", "moreTabs__dropdownContent", "moreTabs__dropdownItem", "moreTabs__dropdownItemLabel", "moreTabs__dropdownItemRight__icon", "workflowContainer", "workflowLabel", "workflowLabelContainer", "workflowContainerDisabledNotice", "workflowLabelDisabled__icon", "workflowContainerRight__icon", "workflowArrow__icon", "channelContainer", "channelsContainerCollapsible", "channelsContainer", "channelLabel", "channelLabelContainer", "channelDescription", "channelName", "channelSwitchContainer", "channelSwitch", "channelSwitchThumb", "preferencesHeader", "preferencesHeader__back__button", "preferencesHeader__title", "preferencesLoadingContainer", "strong"];
|
|
28
|
+
declare const appearanceKeys: readonly ["button", "popoverContent", "popoverTrigger", "dropdownContent", "dropdownTrigger", "dropdownItem", "dropdownItemLabel", "dropdownItemLabelContainer", "dropdownItemLeftIcon", "dropdownItemRightIcon", "tooltipContent", "tooltipTrigger", "back__button", "skeletonText", "skeletonAvatar", "tabsRoot", "tabsList", "tabsContent", "tabsTrigger", "dots", "root", "bellIcon", "bellContainer", "bellDot", "preferences__button", "preferencesContainer", "inboxHeader", "loading", "inboxContent", "inbox__popoverTrigger", "inbox__popoverContent", "notificationListContainer", "notificationList", "notificationListEmptyNoticeContainer", "notificationListEmptyNotice", "notificationListEmptyNoticeIcon", "notificationListNewNotificationsNotice__button", "notification", "notificationDot", "notificationSubject", "notificationSubject__strong", "notificationBody", "notificationBody__strong", "notificationBodyContainer", "notificationImage", "notificationDate", "notificationDefaultActions", "notificationCustomActions", "notificationPrimaryAction__button", "notificationSecondaryAction__button", "notificationRead__button", "notificationUnread__button", "notificationArchive__button", "notificationUnarchive__button", "notificationsTabs__tabsRoot", "notificationsTabs__tabsList", "notificationsTabs__tabsContent", "notificationsTabs__tabsTrigger", "notificationsTabsTriggerLabel", "notificationsTabsTriggerCount", "inboxStatus__title", "inboxStatus__dropdownTrigger", "inboxStatus__dropdownContent", "inboxStatus__dropdownItem", "inboxStatus__dropdownItemLabel", "inboxStatus__dropdownItemLabelContainer", "inboxStatus__dropdownItemLeft__icon", "inboxStatus__dropdownItemRight__icon", "moreActionsContainer", "moreActions__dropdownTrigger", "moreActions__dropdownContent", "moreActions__dropdownItem", "moreActions__dropdownItemLabel", "moreActions__dropdownItemLeft__icon", "moreActions__dots", "moreTabs__button", "moreTabs__dots", "moreTabs__dropdownTrigger", "moreTabs__dropdownContent", "moreTabs__dropdownItem", "moreTabs__dropdownItemLabel", "moreTabs__dropdownItemRight__icon", "workflowContainer", "workflowLabel", "workflowLabelHeader", "workflowLabelContainer", "workflowContainerDisabledNotice", "workflowLabelDisabled__icon", "workflowContainerRight__icon", "workflowArrow__icon", "channelContainer", "channelsContainerCollapsible", "channelsContainer", "channelLabel", "channelLabelContainer", "channelDescription", "channelName", "channelSwitchContainer", "channelSwitch", "channelSwitchThumb", "preferencesHeader", "preferencesHeader__back__button", "preferencesHeader__title", "preferencesLoadingContainer", "strong"];
|
|
29
29
|
|
|
30
30
|
type LocalizationKey = keyof typeof defaultLocalization;
|
|
31
31
|
type Localization = {
|
package/dist/esm/ui/index.d.mts
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { s as NovuOptions } from '../novu-C3OVXS9Q.mjs';
|
|
2
2
|
export { t as Notification } from '../novu-C3OVXS9Q.mjs';
|
|
3
|
-
import { N as NotificationRenderer, B as BellRenderer, a as NotificationClickHandler, b as NotificationActionClickHandler, c as NovuProviderProps, d as BaseNovuProviderProps, A as Appearance, L as Localization, T as Tab, P as PreferencesFilter, R as RouterPush } from '../types-
|
|
4
|
-
export { e as AppearanceKey, C as CSSProperties, E as ElementStyles, f as Elements, i as LocalizationKey, h as NotificationStatus, g as Theme, V as Variables } from '../types-
|
|
3
|
+
import { N as NotificationRenderer, B as BellRenderer, a as NotificationClickHandler, b as NotificationActionClickHandler, c as NovuProviderProps, d as BaseNovuProviderProps, A as Appearance, L as Localization, T as Tab, P as PreferencesFilter, R as RouterPush } from '../types-mimIUjS9.mjs';
|
|
4
|
+
export { e as AppearanceKey, C as CSSProperties, E as ElementStyles, f as Elements, i as LocalizationKey, h as NotificationStatus, g as Theme, V as Variables } from '../types-mimIUjS9.mjs';
|
|
5
|
+
import { Placement, OffsetOptions } from '@floating-ui/dom';
|
|
5
6
|
import * as solid_js from 'solid-js';
|
|
6
7
|
import { ComponentProps } from 'solid-js';
|
|
7
8
|
import { MountableElement } from 'solid-js/web';
|
|
@@ -14,6 +15,8 @@ type InboxProps = {
|
|
|
14
15
|
onNotificationClick?: NotificationClickHandler;
|
|
15
16
|
onPrimaryActionClick?: NotificationActionClickHandler;
|
|
16
17
|
onSecondaryActionClick?: NotificationActionClickHandler;
|
|
18
|
+
placement?: Placement;
|
|
19
|
+
placementOffset?: OffsetOptions;
|
|
17
20
|
};
|
|
18
21
|
declare enum InboxPage {
|
|
19
22
|
Notifications = "notifications",
|
package/dist/esm/ui/index.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Novu, isSameFilter } from '../chunk-
|
|
1
|
+
import { Novu, isSameFilter } from '../chunk-CRYKKYGT.mjs';
|
|
2
2
|
import { parseMarkdownIntoTokens } from '../chunk-GPV65U5R.mjs';
|
|
3
3
|
import { __privateAdd, __privateSet, __privateMethod, __privateGet, __spreadProps, __spreadValues, __objRest, __async } from '../chunk-STZMOEWR.mjs';
|
|
4
4
|
import { delegateEvents, createComponent, mergeProps, render, Portal, spread, template, insert, memo, effect, className, use, addEventListener, setAttribute, Dynamic, isServer } from 'solid-js/web';
|
|
@@ -145,6 +145,7 @@ var appearanceKeys = [
|
|
|
145
145
|
// workflow
|
|
146
146
|
"workflowContainer",
|
|
147
147
|
"workflowLabel",
|
|
148
|
+
"workflowLabelHeader",
|
|
148
149
|
"workflowLabelContainer",
|
|
149
150
|
"workflowContainerDisabledNotice",
|
|
150
151
|
"workflowLabelDisabled__icon",
|
|
@@ -1346,7 +1347,7 @@ var Motion = new Proxy(Motion$1, {
|
|
|
1346
1347
|
});
|
|
1347
1348
|
var PopoverContext = createContext(void 0);
|
|
1348
1349
|
function PopoverRoot(props) {
|
|
1349
|
-
var _a;
|
|
1350
|
+
var _a, _b;
|
|
1350
1351
|
const [uncontrolledIsOpen, setUncontrolledIsOpen] = createSignal((_a = props.open) != null ? _a : false);
|
|
1351
1352
|
const onOpenChange = () => {
|
|
1352
1353
|
var _a2;
|
|
@@ -1366,16 +1367,16 @@ function PopoverRoot(props) {
|
|
|
1366
1367
|
animationFrame: false,
|
|
1367
1368
|
layoutShift: false
|
|
1368
1369
|
}),
|
|
1369
|
-
middleware: [offset(10), flip({
|
|
1370
|
+
middleware: [offset((_b = props.offset) != null ? _b : 10), flip({
|
|
1370
1371
|
fallbackPlacements: props.fallbackPlacements || ["top-start"]
|
|
1371
1372
|
}), shift()]
|
|
1372
1373
|
});
|
|
1373
1374
|
const floatingStyles = createMemo(() => {
|
|
1374
|
-
var _a2,
|
|
1375
|
+
var _a2, _b2;
|
|
1375
1376
|
return {
|
|
1376
1377
|
position: position.strategy,
|
|
1377
1378
|
top: `${(_a2 = position.y) != null ? _a2 : 0}px`,
|
|
1378
|
-
left: `${(
|
|
1379
|
+
left: `${(_b2 = position.x) != null ? _b2 : 0}px`
|
|
1379
1380
|
};
|
|
1380
1381
|
});
|
|
1381
1382
|
const onClose = () => {
|
|
@@ -2678,16 +2679,17 @@ var PreferencesRow = (props) => {
|
|
|
2678
2679
|
}
|
|
2679
2680
|
}), null);
|
|
2680
2681
|
effect((_p$) => {
|
|
2681
|
-
var _v$ = style("workflowContainer", `nt-p-4 nt-flex nt-flex-col nt-gap-1 nt-items-start nt-self-stretch hover:nt-bg-neutral-alpha-50 nt-rounded-lg data-[disabled=true]:nt-bg-neutral-alpha-50`), _v$2 = isOpen(), _v$3 = style("workflowLabelContainer", "nt-flex nt-justify-between nt-flex-nowrap nt-self-stretch nt-cursor-pointer nt-items-center"), _v$4 = isOpen(), _v$5 = style("
|
|
2682
|
+
var _v$ = style("workflowContainer", `nt-p-4 nt-flex nt-flex-col nt-gap-1 nt-items-start nt-self-stretch hover:nt-bg-neutral-alpha-50 nt-rounded-lg data-[disabled=true]:nt-bg-neutral-alpha-50`), _v$2 = isOpen(), _v$3 = style("workflowLabelContainer", "nt-flex nt-justify-between nt-flex-nowrap nt-self-stretch nt-cursor-pointer nt-items-center nt-overflow-hidden"), _v$4 = isOpen(), _v$5 = style("workflowLabelHeader", "nt-overflow-hidden"), _v$6 = style("workflowLabel", "nt-text-base nt-font-semibold nt-truncate"), _v$7 = props.localizationKey, _v$8 = isOpen(), _v$9 = style("workflowContainerRight__icon", `nt-text-foreground-alpha-600 nt-transition-all nt-duration-200 data-[open=true]:nt-transform data-[open=true]:nt-rotate-180`), _v$10 = isOpen();
|
|
2682
2683
|
_v$ !== _p$.e && className(_el$4, _p$.e = _v$);
|
|
2683
2684
|
_v$2 !== _p$.t && setAttribute(_el$4, "data-open", _p$.t = _v$2);
|
|
2684
2685
|
_v$3 !== _p$.a && className(_el$5, _p$.a = _v$3);
|
|
2685
2686
|
_v$4 !== _p$.o && setAttribute(_el$5, "data-open", _p$.o = _v$4);
|
|
2686
|
-
_v$5 !== _p$.i && className(_el$
|
|
2687
|
-
_v$6 !== _p$.n &&
|
|
2688
|
-
_v$7 !== _p$.s && setAttribute(_el$7, "data-
|
|
2689
|
-
_v$8 !== _p$.h &&
|
|
2690
|
-
_v$9 !== _p$.r &&
|
|
2687
|
+
_v$5 !== _p$.i && className(_el$6, _p$.i = _v$5);
|
|
2688
|
+
_v$6 !== _p$.n && className(_el$7, _p$.n = _v$6);
|
|
2689
|
+
_v$7 !== _p$.s && setAttribute(_el$7, "data-localization", _p$.s = _v$7);
|
|
2690
|
+
_v$8 !== _p$.h && setAttribute(_el$7, "data-open", _p$.h = _v$8);
|
|
2691
|
+
_v$9 !== _p$.r && className(_el$8, _p$.r = _v$9);
|
|
2692
|
+
_v$10 !== _p$.d && setAttribute(_el$8, "data-open", _p$.d = _v$10);
|
|
2691
2693
|
return _p$;
|
|
2692
2694
|
}, {
|
|
2693
2695
|
e: void 0,
|
|
@@ -2698,7 +2700,8 @@ var PreferencesRow = (props) => {
|
|
|
2698
2700
|
n: void 0,
|
|
2699
2701
|
s: void 0,
|
|
2700
2702
|
h: void 0,
|
|
2701
|
-
r: void 0
|
|
2703
|
+
r: void 0,
|
|
2704
|
+
d: void 0
|
|
2702
2705
|
});
|
|
2703
2706
|
return _el$4;
|
|
2704
2707
|
}
|
|
@@ -3301,7 +3304,7 @@ var NotificationListSkeleton = (props) => {
|
|
|
3301
3304
|
};
|
|
3302
3305
|
|
|
3303
3306
|
// src/ui/components/Notification/NotificationList.tsx
|
|
3304
|
-
var _tmpl$47 = /* @__PURE__ */ template(`<div><p data-localization=notifications.emptyNotice>`);
|
|
3307
|
+
var _tmpl$47 = /* @__PURE__ */ template(`<div><p class=nt-text-center data-localization=notifications.emptyNotice>`);
|
|
3305
3308
|
var _tmpl$215 = /* @__PURE__ */ template(`<div>`);
|
|
3306
3309
|
var _tmpl$312 = /* @__PURE__ */ template(`<div><div>`);
|
|
3307
3310
|
var EmptyNotificationList = () => {
|
|
@@ -3317,15 +3320,7 @@ var EmptyNotificationList = () => {
|
|
|
3317
3320
|
}
|
|
3318
3321
|
}), _el$2);
|
|
3319
3322
|
insert(_el$2, () => t("notifications.emptyNotice"));
|
|
3320
|
-
effect((
|
|
3321
|
-
var _v$ = style("notificationListEmptyNoticeContainer", "nt-absolute nt-inset-0 nt-flex nt-flex-col nt-items-center nt-m-auto nt-h-fit nt-w-full nt-text-foreground-alpha-100"), _v$2 = style("notificationListEmptyNotice");
|
|
3322
|
-
_v$ !== _p$.e && className(_el$, _p$.e = _v$);
|
|
3323
|
-
_v$2 !== _p$.t && className(_el$2, _p$.t = _v$2);
|
|
3324
|
-
return _p$;
|
|
3325
|
-
}, {
|
|
3326
|
-
e: void 0,
|
|
3327
|
-
t: void 0
|
|
3328
|
-
});
|
|
3323
|
+
effect(() => className(_el$, style("notificationListEmptyNoticeContainer", "nt-flex nt-flex-col nt-items-center nt-m-auto nt-h-fit nt-w-full nt-text-foreground-alpha-100 nt-p-6 nt-text-center")));
|
|
3329
3324
|
return _el$;
|
|
3330
3325
|
})();
|
|
3331
3326
|
};
|
|
@@ -3446,9 +3441,9 @@ var NotificationList = (props) => {
|
|
|
3446
3441
|
}
|
|
3447
3442
|
}));
|
|
3448
3443
|
effect((_p$) => {
|
|
3449
|
-
var _v$
|
|
3450
|
-
_v$
|
|
3451
|
-
_v$
|
|
3444
|
+
var _v$ = style("notificationListContainer", "nt-relative nt-h-full nt-overflow-hidden"), _v$2 = style("notificationList", "nt-relative nt-h-full nt-flex nt-flex-col nt-overflow-y-auto");
|
|
3445
|
+
_v$ !== _p$.e && className(_el$3, _p$.e = _v$);
|
|
3446
|
+
_v$2 !== _p$.t && className(_el$4, _p$.t = _v$2);
|
|
3452
3447
|
return _p$;
|
|
3453
3448
|
}, {
|
|
3454
3449
|
e: void 0,
|
|
@@ -3836,6 +3831,12 @@ var Inbox2 = (props) => {
|
|
|
3836
3831
|
return isOpen();
|
|
3837
3832
|
},
|
|
3838
3833
|
onOpenChange: setIsOpened,
|
|
3834
|
+
get placement() {
|
|
3835
|
+
return props.placement;
|
|
3836
|
+
},
|
|
3837
|
+
get offset() {
|
|
3838
|
+
return props.placementOffset;
|
|
3839
|
+
},
|
|
3839
3840
|
get children() {
|
|
3840
3841
|
return [createComponent(Popover.Trigger, {
|
|
3841
3842
|
asChild: (triggerProps) => createComponent(Button, mergeProps({
|
|
@@ -3992,7 +3993,7 @@ var Renderer = (props) => {
|
|
|
3992
3993
|
}
|
|
3993
3994
|
});
|
|
3994
3995
|
};
|
|
3995
|
-
var version = "2.6.
|
|
3996
|
+
var version = "2.6.3";
|
|
3996
3997
|
var cssHref = `https://cdn.jsdelivr.net/npm/@novu/js@${version}/dist/index.css`;
|
|
3997
3998
|
var _dispose, _rootElement, _mountedElements, _setMountedElements, _appearance, _setAppearance, _localization, _setLocalization, _options, _setOptions, _tabs, _setTabs, _routerPush, _setRouterPush, _preferencesFilter, _setPreferencesFilter, _predefinedNovu, _NovuUI_instances, mountComponentRenderer_fn, updateComponentProps_fn;
|
|
3998
3999
|
var NovuUI = class {
|
package/dist/index.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.novu{scrollbar-color:var(--nv-color-secondary-foreground-alpha-300) #0000;:where(*),:where(*) :after,:where(*) :before,:where(*):after,:where(*):before{border:0 solid #e5e7eb;box-sizing:border-box}:where(html,:host){line-height:1.5;-webkit-text-size-adjust:100%;font-family:ui-sans-serif,system-ui,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;font-feature-settings:normal;font-variation-settings:normal;tab-size:4;-webkit-tap-highlight-color:transparent}:where(body){line-height:inherit;margin:0}:where(hr){border-top-width:1px;color:inherit;height:0}:where(abbr:where([title])){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}:where(h1,h2,h3,h4,h5,h6){font-size:inherit;font-weight:inherit}:where(a){color:inherit;text-decoration:inherit}:where(b,strong){font-weight:bolder}:where(code,kbd,samp,pre){font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-feature-settings:normal;font-size:1em;font-variation-settings:normal}:where(small){font-size:80%}:where(sub,sup){font-size:75%;line-height:0;position:relative;vertical-align:initial}:where(sub){bottom:-.25em}:where(sup){top:-.5em}:where(table){border-collapse:collapse;border-color:inherit;text-indent:0}:where(button,input,optgroup,select,textarea){color:inherit;font-family:inherit;font-feature-settings:inherit;font-size:100%;font-variation-settings:inherit;font-weight:inherit;letter-spacing:inherit;line-height:inherit;margin:0;padding:0}:where(button,select){text-transform:none}:where(button,input:where([type=button]),input:where([type=reset]),input:where([type=submit])){-webkit-appearance:button;background-color:initial;background-image:none}:where(:-moz-focusring){outline:auto}:where(:-moz-ui-invalid){box-shadow:none}:where(progress){vertical-align:initial}:where(*)::-webkit-inner-spin-button,:where(*)::-webkit-outer-spin-button{height:auto}:where([type=search]){-webkit-appearance:textfield;outline-offset:-2px}:where(*)::-webkit-search-decoration{-webkit-appearance:none}:where(*)::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}:where(summary){display:list-item}:where(blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre){margin:0}:where(fieldset){margin:0;padding:0}:where(legend){padding:0}:where(ol,ul,menu){list-style:none;margin:0;padding:0}:where(dialog){padding:0}:where(textarea){resize:vertical}:where(input)::placeholder,:where(textarea)::placeholder{color:#9ca3af;opacity:1}:where(button,[role=button]){cursor:pointer}:where(:disabled){cursor:default}:where(img,svg,video,canvas,audio,iframe,embed,object){display:block;vertical-align:middle}:where(img,video){height:auto;max-width:100%}:where([hidden]){display:none}:where(*),:where(*) :after,:where(*) :before,:where(*):after,:where(*):before{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:#3b82f680;--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }:where(*) ::backdrop{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:#3b82f680;--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }::-webkit-scrollbar{height:.5rem;width:.5rem}::-webkit-scrollbar-thumb{background-clip:"padding-box",;background-color:var(--nv-color-secondary-foreground-alpha-300);border-radius:.25rem}::-webkit-scrollbar-corner,::-webkit-scrollbar-track{background-color:initial}}*,::backdrop,:after,:before{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:#3b82f680;--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }.nt-sr-only{height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px;clip:rect(0,0,0,0);border-width:0;white-space:nowrap}.nt-invisible{visibility:hidden}.nt-absolute{position:absolute}.nt-relative{position:relative}.nt-inset-0{inset:0}.nt-inset-2{inset:.5rem}.nt-right-0{right:0}.nt-right-2{right:.5rem}.nt-top-0{top:0}.nt-top-2{top:.5rem}.nt-z-10{z-index:10}.nt-z-\[-1\]{z-index:-1}.nt-float-right{float:right}.nt-m-auto{margin:auto}.nt-mx-auto{margin-left:auto;margin-right:auto}.nt-ml-1{margin-left:.25rem}.nt-mr-auto{margin-right:auto}.nt-mt-4{margin-top:1rem}.nt-mt-\[-0\.25rem\]{margin-top:-.25rem}.nt-mt-auto{margin-top:auto}.nt-block{display:block}.nt-flex{display:flex}.nt-inline-flex{display:inline-flex}.nt-grid{display:grid}.nt-hidden{display:none}.nt-size-2{height:.5rem;width:.5rem}.nt-size-2\.5{height:.625rem;width:.625rem}.nt-size-8{height:2rem;width:2rem}.nt-h-10{height:2.5rem}.nt-h-11{height:2.75rem}.nt-h-3{height:.75rem}.nt-h-6{height:1.5rem}.nt-h-7{height:1.75rem}.nt-h-8{height:2rem}.nt-h-\[600px\]{height:600px}.nt-h-fit{height:-moz-fit-content;height:fit-content}.nt-h-full{height:100%}.nt-w-1\/3{width:33.333333%}.nt-w-1\/4{width:25%}.nt-w-11{width:2.75rem}.nt-w-2\/3{width:66.666667%}.nt-w-6{width:1.5rem}.nt-w-\[400px\]{width:400px}.nt-w-fit{width:-moz-fit-content;width:fit-content}.nt-w-full{width:100%}.nt-w-max{width:max-content}.nt-min-w-52{min-width:13rem}.nt-flex-1{flex:1 1 0%}.nt-shrink-0{flex-shrink:0}.-nt-translate-x-\[1\.0625rem\]{--tw-translate-x:-1.0625rem}.-nt-translate-x-\[1\.0625rem\],.-nt-translate-y-1\/2{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.-nt-translate-y-1\/2{--tw-translate-y:-50%}.nt-translate-x-1\/2{--tw-translate-x:50%}.nt-translate-x-1\/2,.nt-translate-y-1\/2{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.nt-translate-y-1\/2{--tw-translate-y:50%}.nt-transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}@keyframes nt-pulse{50%{opacity:.5}}.nt-animate-pulse{animation:nt-pulse 2s cubic-bezier(.4,0,.6,1) infinite}.nt-cursor-default{cursor:default}.nt-cursor-pointer{cursor:pointer}.nt-flex-col{flex-direction:column}.nt-flex-wrap{flex-wrap:wrap}.nt-flex-nowrap{flex-wrap:nowrap}.nt-items-start{align-items:flex-start}.nt-items-center{align-items:center}.nt-justify-center{justify-content:center}.nt-justify-between{justify-content:space-between}.nt-gap-1{gap:.25rem}.nt-gap-2{gap:.5rem}.nt-gap-3{gap:.75rem}.nt-gap-4{gap:1rem}.nt-gap-6{gap:1.5rem}.nt-gap-8{gap:2rem}.nt-self-stretch{align-self:stretch}.nt-overflow-hidden{overflow:hidden}.nt-overflow-y-auto{overflow-y:auto}.nt-whitespace-nowrap{white-space:nowrap}.nt-rounded{border-radius:.25rem}.nt-rounded-full{border-radius:9999px}.nt-rounded-lg{border-radius:.5rem}.nt-rounded-md{border-radius:.375rem}.nt-rounded-xl{border-radius:.75rem}.nt-border{border-width:1px}.nt-border-t{border-top-width:1px}.nt-border-background{border-color:var(--nv-color-background)}.nt-border-neutral-alpha-200{border-color:var(--nv-color-neutral-alpha-200)}.nt-border-secondary{border-color:var(--nv-color-secondary)}.nt-bg-background{background-color:var(--nv-color-background)}.nt-bg-counter{background-color:var(--nv-color-counter)}.nt-bg-foreground{background-color:var(--nv-color-foreground)}.nt-bg-foreground-alpha-100{background-color:var(--nv-color-foreground-alpha-100)}.nt-bg-neutral-alpha-300{background-color:var(--nv-color-neutral-alpha-300)}.nt-bg-neutral-alpha-50{background-color:var(--nv-color-neutral-alpha-50)}.nt-bg-primary{background-color:var(--nv-color-primary)}.nt-bg-secondary{background-color:var(--nv-color-secondary)}.nt-p-0{padding:0}.nt-p-0\.5{padding:.125rem}.nt-p-1{padding:.25rem}.nt-p-2{padding:.5rem}.nt-p-4{padding:1rem}.nt-px-3{padding-left:.75rem;padding-right:.75rem}.nt-px-6{padding-left:1.5rem;padding-right:1.5rem}.nt-px-8{padding-left:2rem;padding-right:2rem}.nt-px-\[6px\]{padding-left:6px;padding-right:6px}.nt-py-1{padding-bottom:.25rem;padding-top:.25rem}.nt-py-4{padding-bottom:1rem;padding-top:1rem}.nt-py-5{padding-bottom:1.25rem;padding-top:1.25rem}.nt-pb-3{padding-bottom:.75rem}.nt-pb-\[0\.625rem\]{padding-bottom:.625rem}.nt-pr-1{padding-right:.25rem}.nt-pr-1\.5{padding-right:.375rem}.nt-pt-9{padding-top:2.25rem}.nt-text-right{text-align:right}.nt-text-start{text-align:start}.nt-text-base{font-size:1rem;line-height:1.5rem}.nt-text-sm{font-size:.875rem;line-height:1.25rem}.nt-text-xl{font-size:1.25rem;line-height:1.75rem}.nt-text-xs{font-size:.75rem;line-height:1rem}.nt-font-medium{font-weight:500}.nt-font-semibold{font-weight:600}.nt-text-background{color:var(--nv-color-background)}.nt-text-counter-foreground{color:var(--nv-color-counter-foreground)}.nt-text-foreground{color:var(--nv-color-foreground)}.nt-text-foreground-alpha-100{color:var(--nv-color-foreground-alpha-100)}.nt-text-foreground-alpha-200{color:var(--nv-color-foreground-alpha-200)}.nt-text-foreground-alpha-400{color:var(--nv-color-foreground-alpha-400)}.nt-text-foreground-alpha-600{color:var(--nv-color-foreground-alpha-600)}.nt-text-primary-foreground{color:var(--nv-color-primary-foreground)}.nt-text-secondary-foreground{color:var(--nv-color-secondary-foreground)}.nt-text-secondary-foreground-alpha-500{color:var(--nv-color-secondary-foreground-alpha-500)}.nt-opacity-0{opacity:0}.nt-shadow-dropdown{--tw-shadow:0 5px 20px 0 var(--nv-color-shadow);--tw-shadow-colored:0 5px 20px 0 var(--tw-shadow-color)}.nt-shadow-dropdown,.nt-shadow-popover{box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.nt-shadow-popover{--tw-shadow:0 5px 15px 0 var(--nv-color-shadow);--tw-shadow-colored:0 5px 15px 0 var(--tw-shadow-color)}.nt-shadow-tooltip{--tw-shadow:0 5px 20px 0 var(--nv-color-shadow);--tw-shadow-colored:0 5px 20px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.nt-outline-none{outline:2px solid #0000;outline-offset:2px}.nt-ring-offset-background{--tw-ring-offset-color:var(--nv-color-background)}.nt-backdrop-blur-md{--tw-backdrop-blur:blur(12px);-webkit-backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)}.nt-transition{transition-duration:.15s;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,-webkit-backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter,-webkit-backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1)}.nt-transition-all{transition-duration:.15s;transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1)}.nt-transition-colors{transition-duration:.15s;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1)}.nt-duration-100{transition-duration:.1s}.nt-duration-200{transition-duration:.2s}.nt-ease-out{transition-timing-function:cubic-bezier(0,0,.2,1)}@keyframes enter{0%{opacity:var(--tw-enter-opacity,1);transform:translate3d(var(--tw-enter-translate-x,0),var(--tw-enter-translate-y,0),0) scale3d(var(--tw-enter-scale,1),var(--tw-enter-scale,1),var(--tw-enter-scale,1)) rotate(var(--tw-enter-rotate,0))}}@keyframes exit{to{opacity:var(--tw-exit-opacity,1);transform:translate3d(var(--tw-exit-translate-x,0),var(--tw-exit-translate-y,0),0) scale3d(var(--tw-exit-scale,1),var(--tw-exit-scale,1),var(--tw-exit-scale,1)) rotate(var(--tw-exit-rotate,0))}}.nt-animate-in{animation-duration:.15s;animation-name:enter;--tw-enter-opacity:initial;--tw-enter-scale:initial;--tw-enter-rotate:initial;--tw-enter-translate-x:initial;--tw-enter-translate-y:initial}.nt-fade-in{--tw-enter-opacity:0}.nt-slide-in-from-top-2{--tw-enter-translate-y:-0.5rem}.nt-duration-100{animation-duration:.1s}.nt-duration-200{animation-duration:.2s}.nt-ease-out{animation-timing-function:cubic-bezier(0,0,.2,1)}.after\:nt-absolute:after{content:var(--tw-content);position:absolute}.after\:nt-bottom-0:after{bottom:0;content:var(--tw-content)}.after\:nt-left-0:after{content:var(--tw-content);left:0}.after\:nt-left-\[2px\]:after{content:var(--tw-content);left:2px}.after\:nt-top-0:after{content:var(--tw-content);top:0}.after\:nt-top-0\.5:after{content:var(--tw-content);top:.125rem}.after\:nt-h-5:after{content:var(--tw-content);height:1.25rem}.after\:nt-h-\[2px\]:after{content:var(--tw-content);height:2px}.after\:nt-w-5:after{content:var(--tw-content);width:1.25rem}.after\:nt-w-full:after{content:var(--tw-content);width:100%}.after\:nt-rounded-full:after{border-radius:9999px;content:var(--tw-content)}.after\:nt-border:after{border-width:1px;content:var(--tw-content)}.after\:nt-border-b-2:after{border-bottom-width:2px;content:var(--tw-content)}.after\:nt-border-neutral-alpha-400:after{border-color:var(--nv-color-neutral-alpha-400);content:var(--tw-content)}.after\:nt-border-b-primary:after{border-bottom-color:var(--nv-color-primary);content:var(--tw-content)}.after\:nt-border-b-transparent:after{border-bottom-color:#0000;content:var(--tw-content)}.after\:nt-bg-background:after{background-color:var(--nv-color-background);content:var(--tw-content)}.after\:nt-transition-all:after{content:var(--tw-content);transition-duration:.15s;transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1)}.after\:nt-duration-200:after{transition-duration:.2s}.after\:nt-content-\[\'\'\]:after{--tw-content:"";content:var(--tw-content)}.after\:nt-duration-200:after{animation-duration:.2s;content:var(--tw-content)}.hover\:nt-bg-foreground-alpha-50:hover{background-color:var(--nv-color-foreground-alpha-50)}.hover\:nt-bg-neutral-alpha-50:hover{background-color:var(--nv-color-neutral-alpha-50)}.hover\:nt-bg-primary-600:hover{background-color:var(--nv-color-primary-600)}.hover\:nt-bg-primary-alpha-900:hover{background-color:var(--nv-color-primary-alpha-900)}.hover\:nt-bg-secondary-alpha-800:hover{background-color:var(--nv-color-secondary-alpha-800)}.focus\:nt-bg-foreground-alpha-50:focus{background-color:var(--nv-color-foreground-alpha-50)}.focus\:nt-outline-none:focus{outline:2px solid #0000;outline-offset:2px}.focus-visible\:nt-bg-neutral-alpha-50:focus-visible{background-color:var(--nv-color-neutral-alpha-50)}.focus-visible\:nt-outline-none:focus-visible{outline:2px solid #0000;outline-offset:2px}.focus-visible\:nt-ring-2:focus-visible{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}.focus-visible\:nt-ring-primary:focus-visible{--tw-ring-color:var(--nv-color-primary)}.focus-visible\:nt-ring-offset-2:focus-visible{--tw-ring-offset-width:2px}.disabled\:nt-pointer-events-none:disabled{pointer-events:none}.disabled\:nt-opacity-50:disabled{opacity:.5}.nt-group:hover .group-hover\:nt-opacity-0{opacity:0}.nt-group:hover .group-hover\:nt-opacity-100{opacity:1}.nt-peer:checked~.peer-checked\:nt-border-neutral-alpha-400{border-color:var(--nv-color-neutral-alpha-400)}.nt-peer:checked~.peer-checked\:nt-bg-primary{background-color:var(--nv-color-primary)}.nt-peer:checked~.peer-checked\:after\:nt-translate-x-full:after{content:var(--tw-content);--tw-translate-x:100%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.nt-peer:checked~.peer-checked\:after\:nt-border-background:after{border-color:var(--nv-color-background);content:var(--tw-content)}.data-\[open\=true\]\:nt-rotate-180[data-open=true]{--tw-rotate:180deg}.data-\[open\=true\]\:nt-rotate-180[data-open=true],.data-\[open\=true\]\:nt-transform[data-open=true]{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.data-\[disabled\=true\]\:nt-bg-neutral-alpha-50[data-disabled=true]{background-color:var(--nv-color-neutral-alpha-50)}.data-\[disabled\=true\]\:nt-text-foreground-alpha-400[data-disabled=true]{color:var(--nv-color-foreground-alpha-400)}.data-\[disabled\=true\]\:nt-text-foreground-alpha-600[data-disabled=true]{color:var(--nv-color-foreground-alpha-600)}.data-\[state\=active\]\:nt-text-foreground[data-state=active]{color:var(--nv-color-foreground)}.data-\[state\=active\]\:after\:nt-border-primary[data-state=active]:after{border-color:var(--nv-color-primary);content:var(--tw-content)}
|
|
1
|
+
.novu{scrollbar-color:var(--nv-color-secondary-foreground-alpha-300) #0000;:where(*),:where(*) :after,:where(*) :before,:where(*):after,:where(*):before{border:0 solid #e5e7eb;box-sizing:border-box}:where(html,:host){line-height:1.5;-webkit-text-size-adjust:100%;font-family:ui-sans-serif,system-ui,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;font-feature-settings:normal;font-variation-settings:normal;tab-size:4;-webkit-tap-highlight-color:transparent}:where(body){line-height:inherit;margin:0}:where(hr){border-top-width:1px;color:inherit;height:0}:where(abbr:where([title])){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}:where(h1,h2,h3,h4,h5,h6){font-size:inherit;font-weight:inherit}:where(a){color:inherit;text-decoration:inherit}:where(b,strong){font-weight:bolder}:where(code,kbd,samp,pre){font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-feature-settings:normal;font-size:1em;font-variation-settings:normal}:where(small){font-size:80%}:where(sub,sup){font-size:75%;line-height:0;position:relative;vertical-align:initial}:where(sub){bottom:-.25em}:where(sup){top:-.5em}:where(table){border-collapse:collapse;border-color:inherit;text-indent:0}:where(button,input,optgroup,select,textarea){color:inherit;font-family:inherit;font-feature-settings:inherit;font-size:100%;font-variation-settings:inherit;font-weight:inherit;letter-spacing:inherit;line-height:inherit;margin:0;padding:0}:where(button,select){text-transform:none}:where(button,input:where([type=button]),input:where([type=reset]),input:where([type=submit])){-webkit-appearance:button;background-color:initial;background-image:none}:where(:-moz-focusring){outline:auto}:where(:-moz-ui-invalid){box-shadow:none}:where(progress){vertical-align:initial}:where(*)::-webkit-inner-spin-button,:where(*)::-webkit-outer-spin-button{height:auto}:where([type=search]){-webkit-appearance:textfield;outline-offset:-2px}:where(*)::-webkit-search-decoration{-webkit-appearance:none}:where(*)::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}:where(summary){display:list-item}:where(blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre){margin:0}:where(fieldset){margin:0;padding:0}:where(legend){padding:0}:where(ol,ul,menu){list-style:none;margin:0;padding:0}:where(dialog){padding:0}:where(textarea){resize:vertical}:where(input)::placeholder,:where(textarea)::placeholder{color:#9ca3af;opacity:1}:where(button,[role=button]){cursor:pointer}:where(:disabled){cursor:default}:where(img,svg,video,canvas,audio,iframe,embed,object){display:block;vertical-align:middle}:where(img,video){height:auto;max-width:100%}:where([hidden]){display:none}:where(*),:where(*) :after,:where(*) :before,:where(*):after,:where(*):before{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:#3b82f680;--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }:where(*) ::backdrop{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:#3b82f680;--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }::-webkit-scrollbar{height:.5rem;width:.5rem}::-webkit-scrollbar-thumb{background-clip:"padding-box";background-color:var(--nv-color-secondary-foreground-alpha-300);border-radius:.25rem}::-webkit-scrollbar-corner,::-webkit-scrollbar-track{background-color:initial}}*,::backdrop,:after,:before{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:#3b82f680;--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }.nt-sr-only{height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px;clip:rect(0,0,0,0);border-width:0;white-space:nowrap}.nt-invisible{visibility:hidden}.nt-absolute{position:absolute}.nt-relative{position:relative}.nt-inset-2{inset:.5rem}.nt-right-0{right:0}.nt-right-2{right:.5rem}.nt-top-0{top:0}.nt-top-2{top:.5rem}.nt-z-10{z-index:10}.nt-z-\[-1\]{z-index:-1}.nt-float-right{float:right}.nt-m-auto{margin:auto}.nt-mx-auto{margin-left:auto;margin-right:auto}.nt-ml-1{margin-left:.25rem}.nt-mr-auto{margin-right:auto}.nt-mt-4{margin-top:1rem}.nt-mt-\[-0\.25rem\]{margin-top:-.25rem}.nt-mt-auto{margin-top:auto}.nt-block{display:block}.nt-flex{display:flex}.nt-inline-flex{display:inline-flex}.nt-grid{display:grid}.nt-hidden{display:none}.nt-size-2{height:.5rem;width:.5rem}.nt-size-2\.5{height:.625rem;width:.625rem}.nt-size-8{height:2rem;width:2rem}.nt-h-10{height:2.5rem}.nt-h-11{height:2.75rem}.nt-h-3{height:.75rem}.nt-h-6{height:1.5rem}.nt-h-7{height:1.75rem}.nt-h-8{height:2rem}.nt-h-\[600px\]{height:600px}.nt-h-fit{height:-moz-fit-content;height:fit-content}.nt-h-full{height:100%}.nt-w-1\/3{width:33.333333%}.nt-w-1\/4{width:25%}.nt-w-11{width:2.75rem}.nt-w-2\/3{width:66.666667%}.nt-w-6{width:1.5rem}.nt-w-\[400px\]{width:400px}.nt-w-fit{width:-moz-fit-content;width:fit-content}.nt-w-full{width:100%}.nt-w-max{width:max-content}.nt-min-w-52{min-width:13rem}.nt-flex-1{flex:1 1 0%}.nt-shrink-0{flex-shrink:0}.-nt-translate-x-\[1\.0625rem\]{--tw-translate-x:-1.0625rem}.-nt-translate-x-\[1\.0625rem\],.-nt-translate-y-1\/2{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.-nt-translate-y-1\/2{--tw-translate-y:-50%}.nt-translate-x-1\/2{--tw-translate-x:50%}.nt-translate-x-1\/2,.nt-translate-y-1\/2{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.nt-translate-y-1\/2{--tw-translate-y:50%}.nt-transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}@keyframes nt-pulse{50%{opacity:.5}}.nt-animate-pulse{animation:nt-pulse 2s cubic-bezier(.4,0,.6,1) infinite}.nt-cursor-default{cursor:default}.nt-cursor-pointer{cursor:pointer}.nt-flex-col{flex-direction:column}.nt-flex-wrap{flex-wrap:wrap}.nt-flex-nowrap{flex-wrap:nowrap}.nt-items-start{align-items:flex-start}.nt-items-center{align-items:center}.nt-justify-center{justify-content:center}.nt-justify-between{justify-content:space-between}.nt-gap-1{gap:.25rem}.nt-gap-2{gap:.5rem}.nt-gap-3{gap:.75rem}.nt-gap-4{gap:1rem}.nt-gap-6{gap:1.5rem}.nt-gap-8{gap:2rem}.nt-self-stretch{align-self:stretch}.nt-overflow-hidden{overflow:hidden}.nt-overflow-y-auto{overflow-y:auto}.nt-truncate{overflow:hidden;text-overflow:ellipsis}.nt-truncate,.nt-whitespace-nowrap{white-space:nowrap}.nt-rounded{border-radius:.25rem}.nt-rounded-full{border-radius:9999px}.nt-rounded-lg{border-radius:.5rem}.nt-rounded-md{border-radius:.375rem}.nt-rounded-xl{border-radius:.75rem}.nt-border{border-width:1px}.nt-border-t{border-top-width:1px}.nt-border-background{border-color:var(--nv-color-background)}.nt-border-neutral-alpha-200{border-color:var(--nv-color-neutral-alpha-200)}.nt-border-secondary{border-color:var(--nv-color-secondary)}.nt-bg-background{background-color:var(--nv-color-background)}.nt-bg-counter{background-color:var(--nv-color-counter)}.nt-bg-foreground{background-color:var(--nv-color-foreground)}.nt-bg-foreground-alpha-100{background-color:var(--nv-color-foreground-alpha-100)}.nt-bg-neutral-alpha-300{background-color:var(--nv-color-neutral-alpha-300)}.nt-bg-neutral-alpha-50{background-color:var(--nv-color-neutral-alpha-50)}.nt-bg-primary{background-color:var(--nv-color-primary)}.nt-bg-secondary{background-color:var(--nv-color-secondary)}.nt-p-0{padding:0}.nt-p-0\.5{padding:.125rem}.nt-p-1{padding:.25rem}.nt-p-2{padding:.5rem}.nt-p-4{padding:1rem}.nt-p-6{padding:1.5rem}.nt-px-3{padding-left:.75rem;padding-right:.75rem}.nt-px-6{padding-left:1.5rem;padding-right:1.5rem}.nt-px-8{padding-left:2rem;padding-right:2rem}.nt-px-\[6px\]{padding-left:6px;padding-right:6px}.nt-py-1{padding-bottom:.25rem;padding-top:.25rem}.nt-py-4{padding-bottom:1rem;padding-top:1rem}.nt-py-5{padding-bottom:1.25rem;padding-top:1.25rem}.nt-pb-3{padding-bottom:.75rem}.nt-pb-\[0\.625rem\]{padding-bottom:.625rem}.nt-pr-1{padding-right:.25rem}.nt-pr-1\.5{padding-right:.375rem}.nt-pt-9{padding-top:2.25rem}.nt-text-center{text-align:center}.nt-text-right{text-align:right}.nt-text-start{text-align:start}.nt-text-base{font-size:1rem;line-height:1.5rem}.nt-text-sm{font-size:.875rem;line-height:1.25rem}.nt-text-xl{font-size:1.25rem;line-height:1.75rem}.nt-text-xs{font-size:.75rem;line-height:1rem}.nt-font-medium{font-weight:500}.nt-font-semibold{font-weight:600}.nt-text-background{color:var(--nv-color-background)}.nt-text-counter-foreground{color:var(--nv-color-counter-foreground)}.nt-text-foreground{color:var(--nv-color-foreground)}.nt-text-foreground-alpha-100{color:var(--nv-color-foreground-alpha-100)}.nt-text-foreground-alpha-200{color:var(--nv-color-foreground-alpha-200)}.nt-text-foreground-alpha-400{color:var(--nv-color-foreground-alpha-400)}.nt-text-foreground-alpha-600{color:var(--nv-color-foreground-alpha-600)}.nt-text-primary-foreground{color:var(--nv-color-primary-foreground)}.nt-text-secondary-foreground{color:var(--nv-color-secondary-foreground)}.nt-text-secondary-foreground-alpha-500{color:var(--nv-color-secondary-foreground-alpha-500)}.nt-opacity-0{opacity:0}.nt-shadow-dropdown{--tw-shadow:0 5px 20px 0 var(--nv-color-shadow);--tw-shadow-colored:0 5px 20px 0 var(--tw-shadow-color)}.nt-shadow-dropdown,.nt-shadow-popover{box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.nt-shadow-popover{--tw-shadow:0 5px 15px 0 var(--nv-color-shadow);--tw-shadow-colored:0 5px 15px 0 var(--tw-shadow-color)}.nt-shadow-tooltip{--tw-shadow:0 5px 20px 0 var(--nv-color-shadow);--tw-shadow-colored:0 5px 20px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.nt-outline-none{outline:2px solid #0000;outline-offset:2px}.nt-ring-offset-background{--tw-ring-offset-color:var(--nv-color-background)}.nt-backdrop-blur-md{--tw-backdrop-blur:blur(12px);-webkit-backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)}.nt-transition{transition-duration:.15s;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,-webkit-backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter,-webkit-backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1)}.nt-transition-all{transition-duration:.15s;transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1)}.nt-transition-colors{transition-duration:.15s;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1)}.nt-duration-100{transition-duration:.1s}.nt-duration-200{transition-duration:.2s}.nt-ease-out{transition-timing-function:cubic-bezier(0,0,.2,1)}@keyframes enter{0%{opacity:var(--tw-enter-opacity,1);transform:translate3d(var(--tw-enter-translate-x,0),var(--tw-enter-translate-y,0),0) scale3d(var(--tw-enter-scale,1),var(--tw-enter-scale,1),var(--tw-enter-scale,1)) rotate(var(--tw-enter-rotate,0))}}@keyframes exit{to{opacity:var(--tw-exit-opacity,1);transform:translate3d(var(--tw-exit-translate-x,0),var(--tw-exit-translate-y,0),0) scale3d(var(--tw-exit-scale,1),var(--tw-exit-scale,1),var(--tw-exit-scale,1)) rotate(var(--tw-exit-rotate,0))}}.nt-animate-in{animation-duration:.15s;animation-name:enter;--tw-enter-opacity:initial;--tw-enter-scale:initial;--tw-enter-rotate:initial;--tw-enter-translate-x:initial;--tw-enter-translate-y:initial}.nt-fade-in{--tw-enter-opacity:0}.nt-slide-in-from-top-2{--tw-enter-translate-y:-0.5rem}.nt-duration-100{animation-duration:.1s}.nt-duration-200{animation-duration:.2s}.nt-ease-out{animation-timing-function:cubic-bezier(0,0,.2,1)}.after\:nt-absolute:after{content:var(--tw-content);position:absolute}.after\:nt-bottom-0:after{bottom:0;content:var(--tw-content)}.after\:nt-left-0:after{content:var(--tw-content);left:0}.after\:nt-left-\[2px\]:after{content:var(--tw-content);left:2px}.after\:nt-top-0:after{content:var(--tw-content);top:0}.after\:nt-top-0\.5:after{content:var(--tw-content);top:.125rem}.after\:nt-h-5:after{content:var(--tw-content);height:1.25rem}.after\:nt-h-\[2px\]:after{content:var(--tw-content);height:2px}.after\:nt-w-5:after{content:var(--tw-content);width:1.25rem}.after\:nt-w-full:after{content:var(--tw-content);width:100%}.after\:nt-rounded-full:after{border-radius:9999px;content:var(--tw-content)}.after\:nt-border:after{border-width:1px;content:var(--tw-content)}.after\:nt-border-b-2:after{border-bottom-width:2px;content:var(--tw-content)}.after\:nt-border-neutral-alpha-400:after{border-color:var(--nv-color-neutral-alpha-400);content:var(--tw-content)}.after\:nt-border-b-primary:after{border-bottom-color:var(--nv-color-primary);content:var(--tw-content)}.after\:nt-border-b-transparent:after{border-bottom-color:#0000;content:var(--tw-content)}.after\:nt-bg-background:after{background-color:var(--nv-color-background);content:var(--tw-content)}.after\:nt-transition-all:after{content:var(--tw-content);transition-duration:.15s;transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1)}.after\:nt-duration-200:after{transition-duration:.2s}.after\:nt-content-\[\'\'\]:after{--tw-content:"";content:var(--tw-content)}.after\:nt-duration-200:after{animation-duration:.2s;content:var(--tw-content)}.hover\:nt-bg-foreground-alpha-50:hover{background-color:var(--nv-color-foreground-alpha-50)}.hover\:nt-bg-neutral-alpha-50:hover{background-color:var(--nv-color-neutral-alpha-50)}.hover\:nt-bg-primary-600:hover{background-color:var(--nv-color-primary-600)}.hover\:nt-bg-primary-alpha-900:hover{background-color:var(--nv-color-primary-alpha-900)}.hover\:nt-bg-secondary-alpha-800:hover{background-color:var(--nv-color-secondary-alpha-800)}.focus\:nt-bg-foreground-alpha-50:focus{background-color:var(--nv-color-foreground-alpha-50)}.focus\:nt-outline-none:focus{outline:2px solid #0000;outline-offset:2px}.focus-visible\:nt-bg-neutral-alpha-50:focus-visible{background-color:var(--nv-color-neutral-alpha-50)}.focus-visible\:nt-outline-none:focus-visible{outline:2px solid #0000;outline-offset:2px}.focus-visible\:nt-ring-2:focus-visible{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}.focus-visible\:nt-ring-primary:focus-visible{--tw-ring-color:var(--nv-color-primary)}.focus-visible\:nt-ring-offset-2:focus-visible{--tw-ring-offset-width:2px}.disabled\:nt-pointer-events-none:disabled{pointer-events:none}.disabled\:nt-opacity-50:disabled{opacity:.5}.nt-group:hover .group-hover\:nt-opacity-0{opacity:0}.nt-group:hover .group-hover\:nt-opacity-100{opacity:1}.nt-peer:checked~.peer-checked\:nt-border-neutral-alpha-400{border-color:var(--nv-color-neutral-alpha-400)}.nt-peer:checked~.peer-checked\:nt-bg-primary{background-color:var(--nv-color-primary)}.nt-peer:checked~.peer-checked\:after\:nt-translate-x-full:after{content:var(--tw-content);--tw-translate-x:100%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.nt-peer:checked~.peer-checked\:after\:nt-border-background:after{border-color:var(--nv-color-background);content:var(--tw-content)}.data-\[open\=true\]\:nt-rotate-180[data-open=true]{--tw-rotate:180deg}.data-\[open\=true\]\:nt-rotate-180[data-open=true],.data-\[open\=true\]\:nt-transform[data-open=true]{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.data-\[disabled\=true\]\:nt-bg-neutral-alpha-50[data-disabled=true]{background-color:var(--nv-color-neutral-alpha-50)}.data-\[disabled\=true\]\:nt-text-foreground-alpha-400[data-disabled=true]{color:var(--nv-color-foreground-alpha-400)}.data-\[disabled\=true\]\:nt-text-foreground-alpha-600[data-disabled=true]{color:var(--nv-color-foreground-alpha-600)}.data-\[state\=active\]\:nt-text-foreground[data-state=active]{color:var(--nv-color-foreground)}.data-\[state\=active\]\:after\:nt-border-primary[data-state=active]:after{border-color:var(--nv-color-primary);content:var(--tw-content)}
|
package/dist/novu.min.js
CHANGED
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
`).join(`
|
|
14
14
|
`+n),i.push(s+"m+"+Fi.exports.humanize(this.diff)+"\x1B[0m")}else i[0]=Mc()+e+" "+i[0]}function Mc(){return W.inspectOpts.hideDate?"":new Date().toISOString()+" "}function qc(...i){return process.stderr.write(Li.formatWithOptions(W.inspectOpts,...i)+`
|
|
15
15
|
`)}function $c(i){i?process.env.DEBUG=i:delete process.env.DEBUG}function Wc(){return process.env.DEBUG}function Vc(i){i.inspectOpts={};let e=Object.keys(W.inspectOpts);for(let t=0;t<e.length;t++)i.inspectOpts[e[t]]=W.inspectOpts[e[t]]}Fi.exports=kr()(W);var{formatters:Hn}=Fi.exports;Hn.o=function(i){return this.inspectOpts.colors=this.useColors,Li.inspect(i,this.inspectOpts).split(`
|
|
16
|
-
`).map(e=>e.trim()).join(" ")};Hn.O=function(i){return this.inspectOpts.colors=this.useColors,Li.inspect(i,this.inspectOpts)}});var Wt=k((Jh,Ir)=>{"use strict";typeof process=="undefined"||process.type==="renderer"||process.browser===!0||process.__nwjs?Ir.exports=$n():Ir.exports=Gn()});function zr(i){return{all:i=i||new Map,on:function(e,t){var r=i.get(e);r?r.push(t):i.set(e,[t])},off:function(e,t){var r=i.get(e);r&&(t?r.splice(r.indexOf(t)>>>0,1):i.set(e,[]))},emit:function(e,t){var r=i.get(e);r&&r.slice().map(function(s){s(t)}),(r=i.get("*"))&&r.slice().map(function(s){s(e,t)})}}}var Fe,ti=class{constructor(){_(this,Fe);E(this,Fe,zr())}on(e,t){return f(this,Fe).on(e,t),()=>{this.off(e,t)}}off(e,t){f(this,Fe).off(e,t)}emit(e,t){f(this,Fe).emit(e,t)}};Fe=new WeakMap;var F=class extends Error{constructor(e,t){super(e),this.originalError=t}};var Se,Ye,we=class{constructor({inboxServiceInstance:e,eventEmitterInstance:t}){_(this,Se,[]);_(this,Ye);this._emitter=t,this._inboxService=e,this._emitter.on("session.initialize.resolved",({error:r,data:s})=>{s?(this.onSessionSuccess(s),f(this,Se).forEach(a=>y(this,[a],function*({fn:n,resolve:o}){o(yield n())})),E(this,Se,[])):r&&(this.onSessionError(r),E(this,Ye,r),f(this,Se).forEach(({resolve:n})=>{n({error:new F("Failed to initialize session, please contact the support",r)})}),E(this,Se,[]))})}onSessionSuccess(e){}onSessionError(e){}callWithSession(e){return y(this,null,function*(){return this._inboxService.isSessionInitialized?e():f(this,Ye)?Promise.resolve({error:new F("Failed to initialize session, please contact the support",f(this,Ye))}):new Promise((t,r)=>{f(this,Se).push({fn:e,resolve:t,reject:r})})})}};Se=new WeakMap,Ye=new WeakMap;var J,se,H=class{constructor(e,t,r){_(this,J);_(this,se);E(this,J,t),E(this,se,r),this.id=e.id,this.subject=e.subject,this.body=e.body,this.to=e.to,this.isRead=e.isRead,this.isArchived=e.isArchived,this.createdAt=e.createdAt,this.readAt=e.readAt,this.archivedAt=e.archivedAt,this.avatar=e.avatar,this.primaryAction=e.primaryAction,this.secondaryAction=e.secondaryAction,this.channelType=e.channelType,this.tags=e.tags,this.redirect=e.redirect,this.data=e.data}read(){return ii({emitter:f(this,J),apiService:f(this,se),args:{notification:this}})}unread(){return ri({emitter:f(this,J),apiService:f(this,se),args:{notification:this}})}archive(){return si({emitter:f(this,J),apiService:f(this,se),args:{notification:this}})}unarchive(){return ni({emitter:f(this,J),apiService:f(this,se),args:{notification:this}})}completePrimary(){if(!this.primaryAction)throw new Error("Primary action is not available");return Je({emitter:f(this,J),apiService:f(this,se),args:{notification:this},actionType:"primary"})}completeSecondary(){if(!this.primaryAction)throw new Error("Secondary action is not available");return Je({emitter:f(this,J),apiService:f(this,se),args:{notification:this},actionType:"secondary"})}revertPrimary(){if(!this.primaryAction)throw new Error("Primary action is not available");return Xe({emitter:f(this,J),apiService:f(this,se),args:{notification:this},actionType:"primary"})}revertSecondary(){if(!this.primaryAction)throw new Error("Secondary action is not available");return Xe({emitter:f(this,J),apiService:f(this,se),args:{notification:this},actionType:"secondary"})}on(e,t){let r=f(this,J).on(e,t);return()=>{r()}}off(e,t){f(this,J).off(e,t)}};J=new WeakMap,se=new WeakMap;var ii=r=>y(void 0,[r],function*({emitter:i,apiService:e,args:t}){let{notificationId:s,optimisticValue:n}=Qe(t,{isRead:!0,readAt:new Date().toISOString(),isArchived:!1,archivedAt:void 0},{emitter:i,apiService:e});try{i.emit("notification.read.pending",{args:t,data:n});let o=yield e.read(s),a=new H(o,i,e);return i.emit("notification.read.resolved",{args:t,data:a}),{data:a}}catch(o){return i.emit("notification.read.resolved",{args:t,error:o}),{error:new F("Failed to read notification",o)}}}),ri=r=>y(void 0,[r],function*({emitter:i,apiService:e,args:t}){let{notificationId:s,optimisticValue:n}=Qe(t,{isRead:!1,readAt:null,isArchived:!1,archivedAt:void 0},{emitter:i,apiService:e});try{i.emit("notification.unread.pending",{args:t,data:n});let o=yield e.unread(s),a=new H(o,i,e);return i.emit("notification.unread.resolved",{args:t,data:a}),{data:a}}catch(o){return i.emit("notification.unread.resolved",{args:t,error:o}),{error:new F("Failed to unread notification",o)}}}),si=r=>y(void 0,[r],function*({emitter:i,apiService:e,args:t}){let{notificationId:s,optimisticValue:n}=Qe(t,{isArchived:!0,archivedAt:new Date().toISOString(),isRead:!0,readAt:new Date().toISOString()},{emitter:i,apiService:e});try{i.emit("notification.archive.pending",{args:t,data:n});let o=yield e.archive(s),a=new H(o,i,e);return i.emit("notification.archive.resolved",{args:t,data:a}),{data:a}}catch(o){return i.emit("notification.archive.resolved",{args:t,error:o}),{error:new F("Failed to archive notification",o)}}}),ni=r=>y(void 0,[r],function*({emitter:i,apiService:e,args:t}){let{notificationId:s,optimisticValue:n}=Qe(t,{isArchived:!1,archivedAt:null,isRead:!0,readAt:new Date().toISOString()},{emitter:i,apiService:e});try{i.emit("notification.unarchive.pending",{args:t,data:n});let o=yield e.unarchive(s),a=new H(o,i,e);return i.emit("notification.unarchive.resolved",{args:t,data:a}),{data:a}}catch(o){return i.emit("notification.unarchive.resolved",{args:t,error:o}),{error:new F("Failed to unarchive notification",o)}}}),Je=s=>y(void 0,[s],function*({emitter:i,apiService:e,args:t,actionType:r}){let n=r==="primary"?{primaryAction:T(C({},"notification"in t?t.notification.primaryAction:{}),{isCompleted:!0})}:{secondaryAction:T(C({},"notification"in t?t.notification.secondaryAction:{}),{isCompleted:!0})},{notificationId:o,optimisticValue:a}=Qe(t,n,{emitter:i,apiService:e});try{i.emit("notification.complete_action.pending",{args:t,data:a});let c=yield e.completeAction({actionType:r,notificationId:o}),u=new H(c,i,e);return i.emit("notification.complete_action.resolved",{args:t,data:u}),{data:u}}catch(c){return i.emit("notification.complete_action.resolved",{args:t,error:c}),{error:new F(`Failed to complete ${r} action on the notification`,c)}}}),Xe=s=>y(void 0,[s],function*({emitter:i,apiService:e,args:t,actionType:r}){let n=r==="primary"?{primaryAction:T(C({},"notification"in t?t.notification.primaryAction:{}),{isCompleted:!1})}:{secondaryAction:T(C({},"notification"in t?t.notification.secondaryAction:{}),{isCompleted:!1})},{notificationId:o,optimisticValue:a}=Qe(t,n,{emitter:i,apiService:e});try{i.emit("notification.revert_action.pending",{args:t,data:a});let c=yield e.revertAction({actionType:r,notificationId:o}),u=new H(c,i,e);return i.emit("notification.revert_action.resolved",{args:t,data:u}),{data:u}}catch(c){return i.emit("notification.revert_action.resolved",{args:t,error:c}),{error:new F("Failed to fetch notifications",c)}}}),Qe=(i,e,t)=>"notification"in i?{notificationId:i.notification.id,optimisticValue:new H(C(C({},i.notification),e),t.emitter,t.apiService)}:{notificationId:i.notificationId},Kr=s=>y(void 0,[s],function*({emitter:i,inboxService:e,notificationsCache:t,tags:r}){try{let o=t.getUniqueNotifications({tags:r}).map(a=>new H(T(C({},a),{isRead:!0,readAt:new Date().toISOString(),isArchived:!1,archivedAt:void 0}),i,e));return i.emit("notifications.read_all.pending",{args:{tags:r},data:o}),yield e.readAll({tags:r}),i.emit("notifications.read_all.resolved",{args:{tags:r},data:o}),{}}catch(n){return i.emit("notifications.read_all.resolved",{args:{tags:r},error:n}),{error:new F("Failed to read all notifications",n)}}}),Yr=s=>y(void 0,[s],function*({emitter:i,inboxService:e,notificationsCache:t,tags:r}){try{let o=t.getUniqueNotifications({tags:r}).map(a=>new H(T(C({},a),{isRead:!0,readAt:new Date().toISOString(),isArchived:!0,archivedAt:new Date().toISOString()}),i,e));return i.emit("notifications.archive_all.pending",{args:{tags:r},data:o}),yield e.archiveAll({tags:r}),i.emit("notifications.archive_all.resolved",{args:{tags:r},data:o}),{}}catch(n){return i.emit("notifications.archive_all.resolved",{args:{tags:r},error:n}),{error:new F("Failed to archive all notifications",n)}}}),Jr=s=>y(void 0,[s],function*({emitter:i,inboxService:e,notificationsCache:t,tags:r}){try{let o=t.getUniqueNotifications({tags:r,read:!0}).map(a=>new H(T(C({},a),{isArchived:!0,archivedAt:new Date().toISOString()}),i,e));return i.emit("notifications.archive_all_read.pending",{args:{tags:r},data:o}),yield e.archiveAllRead({tags:r}),i.emit("notifications.archive_all_read.resolved",{args:{tags:r},data:o}),{}}catch(n){return i.emit("notifications.archive_all_read.resolved",{args:{tags:r},error:n}),{error:new F("Failed to archive all read notifications",n)}}});var Xr=(i,e)=>i===e?!0:!i||!e||i.length!==e.length?!1:i.every((t,r)=>t===e[r]);var Al=["seen","unseen"],Rl=["read","unread"],Hi=(i,e)=>Xr(i,e)||!i&&(e==null?void 0:e.length)===0||(i==null?void 0:i.length)===0&&!e,Gi=(i,e)=>Hi(i.tags,e.tags)&&i.read===e.read&&i.archived===e.archived;var ce,Ze=class{constructor(){_(this,ce);E(this,ce,new Map)}get(e){return f(this,ce).get(e)}getValues(){return Array.from(f(this,ce).values())}entries(){return Array.from(f(this,ce).entries())}keys(){return Array.from(f(this,ce).keys())}set(e,t){f(this,ce).set(e,t)}remove(e){f(this,ce).delete(e)}clear(){f(this,ce).clear()}};ce=new WeakMap;var Qr=({tags:i,read:e,archived:t,limit:r,offset:s,after:n})=>Object.entries({tags:i,read:e,archived:t,limit:r,offset:s,after:n}).filter(([o,a])=>a!=null&&!(Array.isArray(a)&&a.length===0)).reduce((o,[a,c])=>(o[a]=c,o),{}),zi=({tags:i,read:e,archived:t,limit:r,offset:s,after:n})=>JSON.stringify(Qr({tags:i,read:e,archived:t,limit:r,offset:s,after:n})),Co=({tags:i,read:e,archived:t})=>JSON.stringify(Qr({tags:i,read:e,archived:t})),et=i=>JSON.parse(i),xo=["notification.read.pending","notification.read.resolved","notification.unread.pending","notification.unread.resolved","notification.complete_action.pending","notification.complete_action.resolved","notification.revert_action.pending","notification.revert_action.resolved","notifications.read_all.pending","notifications.read_all.resolved"],So=["notification.archive.pending","notification.unarchive.pending","notifications.archive_all.pending","notifications.archive_all_read.pending"],Ne,D,vt=class{constructor({emitter:e}){_(this,Ne);_(this,D);this.updateNotification=(e,t)=>{let r=f(this,D).get(e);if(!r)return!1;let s=r.notifications.findIndex(o=>o.id===t.id);if(s===-1)return!1;let n=[...r.notifications];return n[s]=t,f(this,D).set(e,T(C({},r),{notifications:n})),!0};this.removeNotification=(e,t)=>{let r=f(this,D).get(e);if(!r)return!1;let s=r.notifications.findIndex(o=>o.id===t.id);if(s===-1)return!1;let n=[...r.notifications];return n.splice(s,1),f(this,D).set(e,T(C({},r),{notifications:n})),!0};this.handleNotificationEvent=({remove:e}={remove:!1})=>({data:t})=>{if(!t)return;let r=Array.isArray(t)?t:[t],s=new Set;f(this,D).keys().forEach(n=>{r.forEach(o=>{let a=!1;e?a=this.removeNotification(n,o):a=this.updateNotification(n,o),a&&s.add(Co(et(n)))})}),s.forEach(n=>{let o=this.getAggregated(et(n));f(this,Ne).emit("notifications.list.updated",{data:o})})};E(this,Ne,e),xo.forEach(t=>{f(this,Ne).on(t,this.handleNotificationEvent())}),So.forEach(t=>{f(this,Ne).on(t,this.handleNotificationEvent({remove:!0}))}),E(this,D,new Ze)}getAggregated(e){return f(this,D).keys().filter(r=>{let s=et(r);return Gi(s,e)}).map(r=>f(this,D).get(r)).reduce((r,s)=>s?{hasMore:s.hasMore,filter:s.filter,notifications:[...r.notifications,...s.notifications]}:r,{hasMore:!1,filter:{},notifications:[]})}has(e){return f(this,D).get(zi(e))!==void 0}set(e,t){f(this,D).set(zi(e),t)}update(e,t){this.set(e,t);let r=this.getAggregated(et(zi(e)));f(this,Ne).emit("notifications.list.updated",{data:r})}getAll(e){if(this.has(e))return this.getAggregated({tags:e.tags,read:e.read,archived:e.archived})}getUniqueNotifications({tags:e,read:t}){let r=f(this,D).keys(),s=new Map;return r.forEach(n=>{let o=et(n);if(Hi(e,o.tags)){let a=f(this,D).get(n);if(!a)return;a.notifications.filter(c=>typeof t=="undefined"||t===c.isRead).forEach(c=>s.set(c.id,c))}}),Array.from(s.values())}clear(e){f(this,D).keys().forEach(r=>{Gi(et(r),e)&&f(this,D).remove(r)})}clearAll(){f(this,D).clear()}};Ne=new WeakMap,D=new WeakMap;var _t,oi=class extends we{constructor({useCache:t,inboxServiceInstance:r,eventEmitterInstance:s}){super({eventEmitterInstance:s,inboxServiceInstance:r});_(this,_t);this.cache=new vt({emitter:s}),E(this,_t,t)}list(){return y(this,arguments,function*(s={}){var n=s,{limit:t=10}=n,r=Gr(n,["limit"]);return this.callWithSession(()=>y(this,null,function*(){let o=C({limit:t},r);try{let a="useCache"in o?o.useCache:f(this,_t),c=a?this.cache.getAll(o):void 0;if(this._emitter.emit("notifications.list.pending",{args:o,data:c}),!c){let u=yield this._inboxService.fetchNotifications(C({limit:t},r));c={hasMore:u.hasMore,filter:u.filter,notifications:u.data.map(l=>new H(l,this._emitter,this._inboxService))},a&&(this.cache.set(o,c),c=this.cache.getAll(o))}return this._emitter.emit("notifications.list.resolved",{args:o,data:c}),{data:c}}catch(a){return this._emitter.emit("notifications.list.resolved",{args:o,error:a}),{error:new F("Failed to fetch notifications",a)}}}))})}count(t){return y(this,null,function*(){return this.callWithSession(()=>y(this,null,function*(){let r=t&&"filters"in t?t.filters:[C({},t)];try{this._emitter.emit("notifications.count.pending",{args:t});let s=yield this._inboxService.count({filters:r}),n=t&&"filters"in t?{counts:s.data}:s.data[0];return this._emitter.emit("notifications.count.resolved",{args:t,data:n}),{data:n}}catch(s){return this._emitter.emit("notifications.count.resolved",{args:t,error:s}),{error:new F("Failed to count notifications",s)}}}))})}read(t){return y(this,null,function*(){return this.callWithSession(()=>y(this,null,function*(){return ii({emitter:this._emitter,apiService:this._inboxService,args:t})}))})}unread(t){return y(this,null,function*(){return this.callWithSession(()=>y(this,null,function*(){return ri({emitter:this._emitter,apiService:this._inboxService,args:t})}))})}archive(t){return y(this,null,function*(){return this.callWithSession(()=>y(this,null,function*(){return si({emitter:this._emitter,apiService:this._inboxService,args:t})}))})}unarchive(t){return y(this,null,function*(){return this.callWithSession(()=>y(this,null,function*(){return ni({emitter:this._emitter,apiService:this._inboxService,args:t})}))})}completePrimary(t){return y(this,null,function*(){return this.callWithSession(()=>y(this,null,function*(){return Je({emitter:this._emitter,apiService:this._inboxService,args:t,actionType:"primary"})}))})}completeSecondary(t){return y(this,null,function*(){return this.callWithSession(()=>y(this,null,function*(){return Je({emitter:this._emitter,apiService:this._inboxService,args:t,actionType:"secondary"})}))})}revertPrimary(t){return y(this,null,function*(){return this.callWithSession(()=>y(this,null,function*(){return Xe({emitter:this._emitter,apiService:this._inboxService,args:t,actionType:"primary"})}))})}revertSecondary(t){return y(this,null,function*(){return this.callWithSession(()=>y(this,null,function*(){return Xe({emitter:this._emitter,apiService:this._inboxService,args:t,actionType:"secondary"})}))})}readAll(){return y(this,arguments,function*({tags:t}={}){return this.callWithSession(()=>y(this,null,function*(){return Kr({emitter:this._emitter,inboxService:this._inboxService,notificationsCache:this.cache,tags:t})}))})}archiveAll(){return y(this,arguments,function*({tags:t}={}){return this.callWithSession(()=>y(this,null,function*(){return Yr({emitter:this._emitter,inboxService:this._inboxService,notificationsCache:this.cache,tags:t})}))})}archiveAllRead(){return y(this,arguments,function*({tags:t}={}){return this.callWithSession(()=>y(this,null,function*(){return Jr({emitter:this._emitter,inboxService:this._inboxService,notificationsCache:this.cache,tags:t})}))})}clearCache({filter:t}={}){return t?this.cache.clear(t!=null?t:{}):this.cache.clearAll()}};_t=new WeakMap;var Be,Et,Ae,ai=class{constructor(e,t,r){_(this,Be);_(this,Et);_(this,Ae);E(this,Be,r),E(this,Et,t),E(this,Ae,e)}initialize(){return y(this,null,function*(){try{let{applicationIdentifier:e,subscriberId:t,subscriberHash:r}=f(this,Ae);f(this,Be).emit("session.initialize.pending",{args:f(this,Ae)});let s=yield f(this,Et).initializeSession({applicationIdentifier:e,subscriberId:t,subscriberHash:r});f(this,Be).emit("session.initialize.resolved",{args:f(this,Ae),data:s})}catch(e){f(this,Be).emit("session.initialize.resolved",{args:f(this,Ae),error:e})}})}};Be=new WeakMap,Et=new WeakMap,Ae=new WeakMap;var Zr=n=>y(void 0,[n],function*({emitter:i,apiService:e,cache:t,useCache:r,args:s}){let{workflowId:o,channelPreferences:a}=s;try{i.emit("preference.update.pending",{args:s,data:s.preference?new Re(T(C({},s.preference),{channels:C(C({},s.preference.channels),a)}),{emitterInstance:i,inboxServiceInstance:e,cache:t,useCache:r}):void 0});let c;o?c=yield e.updateWorkflowPreferences({workflowId:o,channelPreferences:a}):(wo({emitter:i,apiService:e,cache:t,useCache:r,args:s}),c=yield e.updateGlobalPreferences(a));let u=new Re(c,{emitterInstance:i,inboxServiceInstance:e,cache:t,useCache:r});return i.emit("preference.update.resolved",{args:s,data:u}),{data:u}}catch(c){return i.emit("preference.update.resolved",{args:s,error:c}),{error:new F("Failed to fetch notifications",c)}}}),wo=({emitter:i,apiService:e,cache:t,useCache:r,args:s})=>{let n=r?t==null?void 0:t.getAll({}):void 0;n==null||n.forEach(o=>{var a;if(o.level==="template"){let c=T(C({},o),{channels:Object.entries(o.channels).reduce((l,[h,d])=>{var S;let b=h;return l[b]=(S=s.channelPreferences[b])!=null?S:d,l},{})}),u=s.preference?new Re(c,{emitterInstance:i,inboxServiceInstance:e,cache:t,useCache:r}):void 0;u&&i.emit("preference.update.pending",{args:{workflowId:(a=o.workflow)==null?void 0:a.id,channelPreferences:u.channels},data:u})}})};var bt,Ct,xt,St,Re=class{constructor(e,{emitterInstance:t,inboxServiceInstance:r,cache:s,useCache:n}){_(this,bt);_(this,Ct);_(this,xt);_(this,St);E(this,bt,t),E(this,Ct,r),E(this,xt,s),E(this,St,n),this.level=e.level,this.enabled=e.enabled,this.channels=e.channels,this.workflow=e.workflow}update({channelPreferences:e}){var t;return Zr({emitter:f(this,bt),apiService:f(this,Ct),cache:f(this,xt),useCache:f(this,St),args:{workflowId:(t=this.workflow)==null?void 0:t.id,channelPreferences:e,preference:{level:this.level,enabled:this.enabled,channels:this.channels,workflow:this.workflow}}})}};bt=new WeakMap,Ct=new WeakMap,xt=new WeakMap,St=new WeakMap;var No=["preference.update.pending","preference.update.resolved"],Ao=({tags:i})=>Object.entries({tags:i}).reduce((e,[t,r])=>(r==null||Array.isArray(r)&&r.length===0||(e[t]=r),e),{}),Ki=({tags:i})=>JSON.stringify(Ao({tags:i})),tt,ne,ci=class{constructor({emitterInstance:e}){_(this,tt);_(this,ne);this.updatePreference=(e,t)=>{let r=f(this,ne).get(e);if(!r)return!1;let s=r.findIndex(o=>{var a,c;return((a=o.workflow)==null?void 0:a.id)===((c=t.workflow)==null?void 0:c.id)||o.level===t.level&&t.level==="global"});if(s===-1)return!1;let n=[...r];return n[s]=t,f(this,ne).set(e,n),!0};this.handlePreferenceEvent=({data:e})=>{e&&f(this,ne).keys().forEach(t=>{let r=this.updatePreference(t,e),s=f(this,ne).get(t);!r||!s||f(this,tt).emit("preferences.list.updated",{data:s})})};E(this,tt,e),No.forEach(t=>{f(this,tt).on(t,this.handlePreferenceEvent)}),E(this,ne,new Ze)}has(e){return f(this,ne).get(Ki(e))!==void 0}set(e,t){f(this,ne).set(Ki(e),t)}getAll(e){if(this.has(e))return f(this,ne).get(Ki(e))}clearAll(){f(this,ne).clear()}};tt=new WeakMap,ne=new WeakMap;var Ue,li=class extends we{constructor({useCache:t,inboxServiceInstance:r,eventEmitterInstance:s}){super({eventEmitterInstance:s,inboxServiceInstance:r});_(this,Ue);this.cache=new ci({emitterInstance:this._emitter}),E(this,Ue,t)}list(){return y(this,arguments,function*(t={}){return this.callWithSession(()=>y(this,null,function*(){try{let r=f(this,Ue)?this.cache.getAll(t):void 0;return this._emitter.emit("preferences.list.pending",{args:t,data:r}),r||(r=(yield this._inboxService.fetchPreferences(t.tags)).map(n=>new Re(n,{emitterInstance:this._emitter,inboxServiceInstance:this._inboxService,cache:this.cache,useCache:f(this,Ue)})),f(this,Ue)&&(this.cache.set(t,r),r=this.cache.getAll(t))),this._emitter.emit("preferences.list.resolved",{args:t,data:r}),{data:r}}catch(r){throw this._emitter.emit("preferences.list.resolved",{args:t,error:r}),r}}))})}};Ue=new WeakMap;var le=Object.create(null);le.open="0";le.close="1";le.ping="2";le.pong="3";le.message="4";le.upgrade="5";le.noop="6";var wt=Object.create(null);Object.keys(le).forEach(i=>{wt[le[i]]=i});var Nt={type:"error",data:"parser error"};var At=({type:i,data:e},t,r)=>e instanceof ArrayBuffer||ArrayBuffer.isView(e)?r(t?e:"b"+es(e,!0).toString("base64")):r(le[i]+(e||"")),es=(i,e)=>Buffer.isBuffer(i)||i instanceof Uint8Array&&!e?i:i instanceof ArrayBuffer?Buffer.from(i):Buffer.from(i.buffer,i.byteOffset,i.byteLength),Yi;function ts(i,e){if(i.data instanceof ArrayBuffer||ArrayBuffer.isView(i.data))return e(es(i.data,!1));At(i,!0,t=>{Yi||(Yi=new TextEncoder),e(Yi.encode(t))})}var Rt=(i,e)=>{if(typeof i!="string")return{type:"message",data:is(i,e)};let t=i.charAt(0);if(t==="b"){let r=Buffer.from(i.substring(1),"base64");return{type:"message",data:is(r,e)}}return wt[t]?i.length>1?{type:wt[t],data:i.substring(1)}:{type:wt[t]}:Nt},is=(i,e)=>{switch(e){case"arraybuffer":return i instanceof ArrayBuffer?i:Buffer.isBuffer(i)?i.buffer.slice(i.byteOffset,i.byteOffset+i.byteLength):i.buffer;case"nodebuffer":default:return Buffer.isBuffer(i)?i:Buffer.from(i)}};var rs="",ss=(i,e)=>{let t=i.length,r=new Array(t),s=0;i.forEach((n,o)=>{At(n,!1,a=>{r[o]=a,++s===t&&e(r.join(rs))})})},ns=(i,e)=>{let t=i.split(rs),r=[];for(let s=0;s<t.length;s++){let n=Rt(t[s],e);if(r.push(n),n.type==="error")break}return r};function os(){return new TransformStream({transform(i,e){ts(i,t=>{let r=t.length,s;if(r<126)s=new Uint8Array(1),new DataView(s.buffer).setUint8(0,r);else if(r<65536){s=new Uint8Array(3);let n=new DataView(s.buffer);n.setUint8(0,126),n.setUint16(1,r)}else{s=new Uint8Array(9);let n=new DataView(s.buffer);n.setUint8(0,127),n.setBigUint64(1,BigInt(r))}i.data&&typeof i.data!="string"&&(s[0]|=128),e.enqueue(s),e.enqueue(t)})}})}var Ji;function fi(i){return i.reduce((e,t)=>e+t.length,0)}function hi(i,e){if(i[0].length===e)return i.shift();let t=new Uint8Array(e),r=0;for(let s=0;s<e;s++)t[s]=i[0][r++],r===i[0].length&&(i.shift(),r=0);return i.length&&r<i[0].length&&(i[0]=i[0].slice(r)),t}function as(i,e){Ji||(Ji=new TextDecoder);let t=[],r=0,s=-1,n=!1;return new TransformStream({transform(o,a){for(t.push(o);;){if(r===0){if(fi(t)<1)break;let c=hi(t,1);n=(c[0]&128)===128,s=c[0]&127,s<126?r=3:s===126?r=1:r=2}else if(r===1){if(fi(t)<2)break;let c=hi(t,2);s=new DataView(c.buffer,c.byteOffset,c.length).getUint16(0),r=3}else if(r===2){if(fi(t)<8)break;let c=hi(t,8),u=new DataView(c.buffer,c.byteOffset,c.length),l=u.getUint32(0);if(l>Math.pow(2,21)-1){a.enqueue(Nt);break}s=l*Math.pow(2,32)+u.getUint32(4),r=3}else{if(fi(t)<s)break;let c=hi(t,s);a.enqueue(Rt(n?c:Ji.decode(c),e)),r=0}if(s===0||s>i){a.enqueue(Nt);break}}}})}var Xi=4;function O(i){if(i)return Ro(i)}function Ro(i){for(var e in O.prototype)i[e]=O.prototype[e];return i}O.prototype.on=O.prototype.addEventListener=function(i,e){return this._callbacks=this._callbacks||{},(this._callbacks["$"+i]=this._callbacks["$"+i]||[]).push(e),this};O.prototype.once=function(i,e){function t(){this.off(i,t),e.apply(this,arguments)}return t.fn=e,this.on(i,t),this};O.prototype.off=O.prototype.removeListener=O.prototype.removeAllListeners=O.prototype.removeEventListener=function(i,e){if(this._callbacks=this._callbacks||{},arguments.length==0)return this._callbacks={},this;var t=this._callbacks["$"+i];if(!t)return this;if(arguments.length==1)return delete this._callbacks["$"+i],this;for(var r,s=0;s<t.length;s++)if(r=t[s],r===e||r.fn===e){t.splice(s,1);break}return t.length===0&&delete this._callbacks["$"+i],this};O.prototype.emit=function(i){this._callbacks=this._callbacks||{};for(var e=new Array(arguments.length-1),t=this._callbacks["$"+i],r=1;r<arguments.length;r++)e[r-1]=arguments[r];if(t){t=t.slice(0);for(var r=0,s=t.length;r<s;++r)t[r].apply(this,e)}return this};O.prototype.emitReserved=O.prototype.emit;O.prototype.listeners=function(i){return this._callbacks=this._callbacks||{},this._callbacks["$"+i]||[]};O.prototype.hasListeners=function(i){return!!this.listeners(i).length};var fe=global;function ui(i,...e){return e.reduce((t,r)=>(i.hasOwnProperty(r)&&(t[r]=i[r]),t),{})}var ko=fe.setTimeout,Oo=fe.clearTimeout;function ve(i,e){e.useNativeTimers?(i.setTimeoutFn=ko.bind(fe),i.clearTimeoutFn=Oo.bind(fe)):(i.setTimeoutFn=fe.setTimeout.bind(fe),i.clearTimeoutFn=fe.clearTimeout.bind(fe))}var To=1.33;function cs(i){return typeof i=="string"?Io(i):Math.ceil((i.byteLength||i.size)*To)}function Io(i){let e=0,t=0;for(let r=0,s=i.length;r<s;r++)e=i.charCodeAt(r),e<128?t+=1:e<2048?t+=2:e<55296||e>=57344?t+=3:(r++,t+=4);return t}var Es=K(Me(),1);function vs(i){let e="";for(let t in i)i.hasOwnProperty(t)&&(e.length&&(e+="&"),e+=encodeURIComponent(t)+"="+encodeURIComponent(i[t]));return e}function _s(i){let e={},t=i.split("&");for(let r=0,s=t.length;r<s;r++){let n=t[r].split("=");e[decodeURIComponent(n[0])]=decodeURIComponent(n[1])}return e}var ra=(0,Es.default)("engine.io-client:transport"),rr=class extends Error{constructor(e,t,r){super(e),this.description=t,this.context=r,this.type="TransportError"}},_e=class extends O{constructor(e){super(),this.writable=!1,ve(this,e),this.opts=e,this.query=e.query,this.socket=e.socket}onError(e,t,r){return super.emitReserved("error",new rr(e,t,r)),this}open(){return this.readyState="opening",this.doOpen(),this}close(){return(this.readyState==="opening"||this.readyState==="open")&&(this.doClose(),this.onClose()),this}send(e){this.readyState==="open"?this.write(e):ra("transport is not open, discarding packets")}onOpen(){this.readyState="open",this.writable=!0,super.emitReserved("open")}onData(e){let t=Rt(e,this.socket.binaryType);this.onPacket(t)}onPacket(e){super.emitReserved("packet",e)}onClose(e){this.readyState="closed",super.emitReserved("close",e)}pause(e){}createUri(e,t={}){return e+"://"+this._hostname()+this._port()+this.opts.path+this._query(t)}_hostname(){let e=this.opts.hostname;return e.indexOf(":")===-1?e:"["+e+"]"}_port(){return this.opts.port&&(this.opts.secure&&+(this.opts.port!==443)||!this.opts.secure&&Number(this.opts.port)!==80)?":"+this.opts.port:""}_query(e){let t=vs(e);return t.length?"?"+t:""}};var Os=K(Me(),1);var Ss="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-_".split(""),sr=64,sa={},bs=0,vi=0,Cs;function xs(i){let e="";do e=Ss[i%sr]+e,i=Math.floor(i/sr);while(i>0);return e}function _i(){let i=xs(+new Date);return i!==Cs?(bs=0,Cs=i):i+"."+xs(bs++)}for(;vi<sr;vi++)sa[Ss[vi]]=vi;var ar=K(As(),1),cr=ar.default||ar;function Rs(){return new or}function oa(i){let e=i.split("; "),t=e[0].indexOf("=");if(t===-1)return;let r=e[0].substring(0,t).trim();if(!r.length)return;let s=e[0].substring(t+1).trim();s.charCodeAt(0)===34&&(s=s.slice(1,-1));let n={name:r,value:s};for(let o=1;o<e.length;o++){let a=e[o].split("=");if(a.length!==2)continue;let c=a[0].trim(),u=a[1].trim();switch(c){case"Expires":n.expires=new Date(u);break;case"Max-Age":let l=new Date;l.setUTCSeconds(l.getUTCSeconds()+parseInt(u,10)),n.expires=l;break;default:}}return n}var or=class{constructor(){this.cookies=new Map}parseCookies(e){let t=e.getResponseHeader("set-cookie");t&&t.forEach(r=>{let s=oa(r);s&&this.cookies.set(s.name,s)})}addCookies(e){let t=[];this.cookies.forEach((r,s)=>{var n;((n=r.expires)===null||n===void 0?void 0:n.getTime())<Date.now()?this.cookies.delete(s):t.push(`${s}=${r.value}`)}),t.length&&(e.setDisableHeaderCheck(!0),e.setRequestHeader("cookie",t.join("; ")))}};var X=(0,Os.default)("engine.io-client:polling");function aa(){}var ca=function(){return new cr({xdomain:!1}).responseType!=null}(),Ei=class extends _e{constructor(e){if(super(e),this.polling=!1,typeof location!="undefined"){let r=location.protocol==="https:",s=location.port;s||(s=r?"443":"80"),this.xd=typeof location!="undefined"&&e.hostname!==location.hostname||s!==e.port}let t=e&&e.forceBase64;this.supportsBinary=ca&&!t,this.opts.withCredentials&&(this.cookieJar=Rs())}get name(){return"polling"}doOpen(){this.poll()}pause(e){this.readyState="pausing";let t=()=>{X("paused"),this.readyState="paused",e()};if(this.polling||!this.writable){let r=0;this.polling&&(X("we are currently polling - waiting to pause"),r++,this.once("pollComplete",function(){X("pre-pause polling complete"),--r||t()})),this.writable||(X("we are currently writing - waiting to pause"),r++,this.once("drain",function(){X("pre-pause writing complete"),--r||t()}))}else t()}poll(){X("polling"),this.polling=!0,this.doPoll(),this.emitReserved("poll")}onData(e){X("polling got data %s",e);let t=r=>{if(this.readyState==="opening"&&r.type==="open"&&this.onOpen(),r.type==="close")return this.onClose({description:"transport closed by the server"}),!1;this.onPacket(r)};ns(e,this.socket.binaryType).forEach(t),this.readyState!=="closed"&&(this.polling=!1,this.emitReserved("pollComplete"),this.readyState==="open"?this.poll():X('ignoring poll - transport state "%s"',this.readyState))}doClose(){let e=()=>{X("writing close packet"),this.write([{type:"close"}])};this.readyState==="open"?(X("transport open - closing"),e()):(X("transport not open - deferring close"),this.once("open",e))}write(e){this.writable=!1,ss(e,t=>{this.doWrite(t,()=>{this.writable=!0,this.emitReserved("drain")})})}uri(){let e=this.opts.secure?"https":"http",t=this.query||{};return this.opts.timestampRequests!==!1&&(t[this.opts.timestampParam]=_i()),!this.supportsBinary&&!t.sid&&(t.b64=1),this.createUri(e,t)}request(e={}){return Object.assign(e,{xd:this.xd,cookieJar:this.cookieJar},this.opts),new ke(this.uri(),e)}doWrite(e,t){let r=this.request({method:"POST",data:e});r.on("success",t),r.on("error",(s,n)=>{this.onError("xhr post error",s,n)})}doPoll(){X("xhr poll");let e=this.request();e.on("data",this.onData.bind(this)),e.on("error",(t,r)=>{this.onError("xhr poll error",t,r)}),this.pollXhr=e}},ke=class i extends O{constructor(e,t){super(),ve(this,t),this.opts=t,this.method=t.method||"GET",this.uri=e,this.data=t.data!==void 0?t.data:null,this.create()}create(){var e;let t=ui(this.opts,"agent","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","autoUnref");t.xdomain=!!this.opts.xd;let r=this.xhr=new cr(t);try{X("xhr open %s: %s",this.method,this.uri),r.open(this.method,this.uri,!0);try{if(this.opts.extraHeaders){r.setDisableHeaderCheck&&r.setDisableHeaderCheck(!0);for(let s in this.opts.extraHeaders)this.opts.extraHeaders.hasOwnProperty(s)&&r.setRequestHeader(s,this.opts.extraHeaders[s])}}catch(s){}if(this.method==="POST")try{r.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch(s){}try{r.setRequestHeader("Accept","*/*")}catch(s){}(e=this.opts.cookieJar)===null||e===void 0||e.addCookies(r),"withCredentials"in r&&(r.withCredentials=this.opts.withCredentials),this.opts.requestTimeout&&(r.timeout=this.opts.requestTimeout),r.onreadystatechange=()=>{var s;r.readyState===3&&((s=this.opts.cookieJar)===null||s===void 0||s.parseCookies(r)),r.readyState===4&&(r.status===200||r.status===1223?this.onLoad():this.setTimeoutFn(()=>{this.onError(typeof r.status=="number"?r.status:0)},0))},X("xhr data %s",this.data),r.send(this.data)}catch(s){this.setTimeoutFn(()=>{this.onError(s)},0);return}typeof document!="undefined"&&(this.index=i.requestsCount++,i.requests[this.index]=this)}onError(e){this.emitReserved("error",e,this.xhr),this.cleanup(!0)}cleanup(e){if(!(typeof this.xhr=="undefined"||this.xhr===null)){if(this.xhr.onreadystatechange=aa,e)try{this.xhr.abort()}catch(t){}typeof document!="undefined"&&delete i.requests[this.index],this.xhr=null}}onLoad(){let e=this.xhr.responseText;e!==null&&(this.emitReserved("data",e),this.emitReserved("success"),this.cleanup())}abort(){this.cleanup()}};ke.requestsCount=0;ke.requests={};if(typeof document!="undefined"){if(typeof attachEvent=="function")attachEvent("onunload",ks);else if(typeof addEventListener=="function"){let i="onpagehide"in fe?"pagehide":"unload";addEventListener(i,ks,!1)}}function ks(){for(let i in ke.requests)ke.requests.hasOwnProperty(i)&&ke.requests[i].abort()}var vc=K(Ls(),1),_c=K(yr(),1),Ec=K(_r(),1),Pn=K(Nr(),1),bc=K(In(),1);var Ln=Pn.default;var qt=Ln,Oi=!1,Fn="nodebuffer",Ve=process.nextTick;var Un=K(Me(),1);var Cc=(0,Un.default)("engine.io-client:websocket"),Bn=typeof navigator!="undefined"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative",Ti=class extends _e{constructor(e){super(e),this.supportsBinary=!e.forceBase64}get name(){return"websocket"}doOpen(){if(!this.check())return;let e=this.uri(),t=this.opts.protocols,r=Bn?{}:ui(this.opts,"agent","perMessageDeflate","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","localAddress","protocolVersion","origin","maxPayload","family","checkServerIdentity");this.opts.extraHeaders&&(r.headers=this.opts.extraHeaders);try{this.ws=Oi&&!Bn?t?new qt(e,t):new qt(e):new qt(e,t,r)}catch(s){return this.emitReserved("error",s)}this.ws.binaryType=this.socket.binaryType,this.addEventListeners()}addEventListeners(){this.ws.onopen=()=>{this.opts.autoUnref&&this.ws._socket.unref(),this.onOpen()},this.ws.onclose=e=>this.onClose({description:"websocket connection closed",context:e}),this.ws.onmessage=e=>this.onData(e.data),this.ws.onerror=e=>this.onError("websocket error",e)}write(e){this.writable=!1;for(let t=0;t<e.length;t++){let r=e[t],s=t===e.length-1;At(r,this.supportsBinary,n=>{let o={};Oi||(r.options&&(o.compress=r.options.compress),this.opts.perMessageDeflate&&(typeof n=="string"?Buffer.byteLength(n):n.length)<this.opts.perMessageDeflate.threshold&&(o.compress=!1));try{Oi?this.ws.send(n):this.ws.send(n,o)}catch(a){Cc("websocket closed before onclose event")}s&&Ve(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){typeof this.ws!="undefined"&&(this.ws.close(),this.ws=null)}uri(){let e=this.opts.secure?"wss":"ws",t=this.query||{};return this.opts.timestampRequests&&(t[this.opts.timestampParam]=_i()),this.supportsBinary||(t.b64=1),this.createUri(e,t)}check(){return!!qt}};var Dn=K(Me(),1),$t=(0,Dn.default)("engine.io-client:webtransport"),Ii=class extends _e{get name(){return"webtransport"}doOpen(){typeof WebTransport=="function"&&(this.transport=new WebTransport(this.createUri("https"),this.opts.transportOptions[this.name]),this.transport.closed.then(()=>{$t("transport closed gracefully"),this.onClose()}).catch(e=>{$t("transport closed due to %s",e),this.onError("webtransport error",e)}),this.transport.ready.then(()=>{this.transport.createBidirectionalStream().then(e=>{let t=as(Number.MAX_SAFE_INTEGER,this.socket.binaryType),r=e.readable.pipeThrough(t).getReader(),s=os();s.readable.pipeTo(e.writable),this.writer=s.writable.getWriter();let n=()=>{r.read().then(({done:a,value:c})=>{if(a){$t("session is closed");return}$t("received chunk: %o",c),this.onPacket(c),n()}).catch(a=>{$t("an error occurred while reading: %s",a)})};n();let o={type:"open"};this.query.sid&&(o.data=`{"sid":"${this.query.sid}"}`),this.writer.write(o).then(()=>this.onOpen())})}))}write(e){this.writable=!1;for(let t=0;t<e.length;t++){let r=e[t],s=t===e.length-1;this.writer.write(r).then(()=>{s&&Ve(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){var e;(e=this.transport)===null||e===void 0||e.close()}};var Rr={websocket:Ti,webtransport:Ii,polling:Ei};var xc=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,Sc=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function lt(i){let e=i,t=i.indexOf("["),r=i.indexOf("]");t!=-1&&r!=-1&&(i=i.substring(0,t)+i.substring(t,r).replace(/:/g,";")+i.substring(r,i.length));let s=xc.exec(i||""),n={},o=14;for(;o--;)n[Sc[o]]=s[o]||"";return t!=-1&&r!=-1&&(n.source=e,n.host=n.host.substring(1,n.host.length-1).replace(/;/g,":"),n.authority=n.authority.replace("[","").replace("]","").replace(/;/g,":"),n.ipv6uri=!0),n.pathNames=wc(n,n.path),n.queryKey=Nc(n,n.query),n}function wc(i,e){let t=/\/{2,9}/g,r=e.replace(t,"/").split("/");return(e.slice(0,1)=="/"||e.length===0)&&r.splice(0,1),e.slice(-1)=="/"&&r.splice(r.length-1,1),r}function Nc(i,e){let t={};return e.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(r,s,n){s&&(t[s]=n)}),t}var Mn=K(Me(),1);var I=(0,Mn.default)("engine.io-client:socket"),je=class i extends O{constructor(e,t={}){super(),this.binaryType=Fn,this.writeBuffer=[],e&&typeof e=="object"&&(t=e,e=null),e?(e=lt(e),t.hostname=e.host,t.secure=e.protocol==="https"||e.protocol==="wss",t.port=e.port,e.query&&(t.query=e.query)):t.host&&(t.hostname=lt(t.host).host),ve(this,t),this.secure=t.secure!=null?t.secure:typeof location!="undefined"&&location.protocol==="https:",t.hostname&&!t.port&&(t.port=this.secure?"443":"80"),this.hostname=t.hostname||(typeof location!="undefined"?location.hostname:"localhost"),this.port=t.port||(typeof location!="undefined"&&location.port?location.port:this.secure?"443":"80"),this.transports=t.transports||["polling","websocket","webtransport"],this.writeBuffer=[],this.prevBufferLen=0,this.opts=Object.assign({path:"/engine.io",agent:!1,withCredentials:!1,upgrade:!0,timestampParam:"t",rememberUpgrade:!1,addTrailingSlash:!0,rejectUnauthorized:!0,perMessageDeflate:{threshold:1024},transportOptions:{},closeOnBeforeunload:!1},t),this.opts.path=this.opts.path.replace(/\/$/,"")+(this.opts.addTrailingSlash?"/":""),typeof this.opts.query=="string"&&(this.opts.query=_s(this.opts.query)),this.id=null,this.upgrades=null,this.pingInterval=null,this.pingTimeout=null,this.pingTimeoutTimer=null,typeof addEventListener=="function"&&(this.opts.closeOnBeforeunload&&(this.beforeunloadEventListener=()=>{this.transport&&(this.transport.removeAllListeners(),this.transport.close())},addEventListener("beforeunload",this.beforeunloadEventListener,!1)),this.hostname!=="localhost"&&(this.offlineEventListener=()=>{this.onClose("transport close",{description:"network connection lost"})},addEventListener("offline",this.offlineEventListener,!1))),this.open()}createTransport(e){I('creating transport "%s"',e);let t=Object.assign({},this.opts.query);t.EIO=Xi,t.transport=e,this.id&&(t.sid=this.id);let r=Object.assign({},this.opts,{query:t,socket:this,hostname:this.hostname,secure:this.secure,port:this.port},this.opts.transportOptions[e]);return I("options: %j",r),new Rr[e](r)}open(){let e;if(this.opts.rememberUpgrade&&i.priorWebsocketSuccess&&this.transports.indexOf("websocket")!==-1)e="websocket";else if(this.transports.length===0){this.setTimeoutFn(()=>{this.emitReserved("error","No transports available")},0);return}else e=this.transports[0];this.readyState="opening";try{e=this.createTransport(e)}catch(t){I("error while creating transport: %s",t),this.transports.shift(),this.open();return}e.open(),this.setTransport(e)}setTransport(e){I("setting transport %s",e.name),this.transport&&(I("clearing existing transport %s",this.transport.name),this.transport.removeAllListeners()),this.transport=e,e.on("drain",this.onDrain.bind(this)).on("packet",this.onPacket.bind(this)).on("error",this.onError.bind(this)).on("close",t=>this.onClose("transport close",t))}probe(e){I('probing transport "%s"',e);let t=this.createTransport(e),r=!1;i.priorWebsocketSuccess=!1;let s=()=>{r||(I('probe transport "%s" opened',e),t.send([{type:"ping",data:"probe"}]),t.once("packet",h=>{if(!r)if(h.type==="pong"&&h.data==="probe"){if(I('probe transport "%s" pong',e),this.upgrading=!0,this.emitReserved("upgrading",t),!t)return;i.priorWebsocketSuccess=t.name==="websocket",I('pausing current transport "%s"',this.transport.name),this.transport.pause(()=>{r||this.readyState!=="closed"&&(I("changing transport and sending upgrade packet"),l(),this.setTransport(t),t.send([{type:"upgrade"}]),this.emitReserved("upgrade",t),t=null,this.upgrading=!1,this.flush())})}else{I('probe transport "%s" failed',e);let d=new Error("probe error");d.transport=t.name,this.emitReserved("upgradeError",d)}}))};function n(){r||(r=!0,l(),t.close(),t=null)}let o=h=>{let d=new Error("probe error: "+h);d.transport=t.name,n(),I('probe transport "%s" failed because of error: %s',e,h),this.emitReserved("upgradeError",d)};function a(){o("transport closed")}function c(){o("socket closed")}function u(h){t&&h.name!==t.name&&(I('"%s" works - aborting "%s"',h.name,t.name),n())}let l=()=>{t.removeListener("open",s),t.removeListener("error",o),t.removeListener("close",a),this.off("close",c),this.off("upgrading",u)};t.once("open",s),t.once("error",o),t.once("close",a),this.once("close",c),this.once("upgrading",u),this.upgrades.indexOf("webtransport")!==-1&&e!=="webtransport"?this.setTimeoutFn(()=>{r||t.open()},200):t.open()}onOpen(){if(I("socket open"),this.readyState="open",i.priorWebsocketSuccess=this.transport.name==="websocket",this.emitReserved("open"),this.flush(),this.readyState==="open"&&this.opts.upgrade){I("starting upgrade probes");let e=0,t=this.upgrades.length;for(;e<t;e++)this.probe(this.upgrades[e])}}onPacket(e){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing")switch(I('socket receive: type "%s", data "%s"',e.type,e.data),this.emitReserved("packet",e),this.emitReserved("heartbeat"),this.resetPingTimeout(),e.type){case"open":this.onHandshake(JSON.parse(e.data));break;case"ping":this.sendPacket("pong"),this.emitReserved("ping"),this.emitReserved("pong");break;case"error":let t=new Error("server error");t.code=e.data,this.onError(t);break;case"message":this.emitReserved("data",e.data),this.emitReserved("message",e.data);break}else I('packet received with socket readyState "%s"',this.readyState)}onHandshake(e){this.emitReserved("handshake",e),this.id=e.sid,this.transport.query.sid=e.sid,this.upgrades=this.filterUpgrades(e.upgrades),this.pingInterval=e.pingInterval,this.pingTimeout=e.pingTimeout,this.maxPayload=e.maxPayload,this.onOpen(),this.readyState!=="closed"&&this.resetPingTimeout()}resetPingTimeout(){this.clearTimeoutFn(this.pingTimeoutTimer),this.pingTimeoutTimer=this.setTimeoutFn(()=>{this.onClose("ping timeout")},this.pingInterval+this.pingTimeout),this.opts.autoUnref&&this.pingTimeoutTimer.unref()}onDrain(){this.writeBuffer.splice(0,this.prevBufferLen),this.prevBufferLen=0,this.writeBuffer.length===0?this.emitReserved("drain"):this.flush()}flush(){if(this.readyState!=="closed"&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length){let e=this.getWritablePackets();I("flushing %d packets in socket",e.length),this.transport.send(e),this.prevBufferLen=e.length,this.emitReserved("flush")}}getWritablePackets(){if(!(this.maxPayload&&this.transport.name==="polling"&&this.writeBuffer.length>1))return this.writeBuffer;let t=1;for(let r=0;r<this.writeBuffer.length;r++){let s=this.writeBuffer[r].data;if(s&&(t+=cs(s)),r>0&&t>this.maxPayload)return I("only send %d out of %d packets",r,this.writeBuffer.length),this.writeBuffer.slice(0,r);t+=2}return I("payload size is %d (max: %d)",t,this.maxPayload),this.writeBuffer}write(e,t,r){return this.sendPacket("message",e,t,r),this}send(e,t,r){return this.sendPacket("message",e,t,r),this}sendPacket(e,t,r,s){if(typeof t=="function"&&(s=t,t=void 0),typeof r=="function"&&(s=r,r=null),this.readyState==="closing"||this.readyState==="closed")return;r=r||{},r.compress=r.compress!==!1;let n={type:e,data:t,options:r};this.emitReserved("packetCreate",n),this.writeBuffer.push(n),s&&this.once("flush",s),this.flush()}close(){let e=()=>{this.onClose("forced close"),I("socket closing - telling transport to close"),this.transport.close()},t=()=>{this.off("upgrade",t),this.off("upgradeError",t),e()},r=()=>{this.once("upgrade",t),this.once("upgradeError",t)};return(this.readyState==="opening"||this.readyState==="open")&&(this.readyState="closing",this.writeBuffer.length?this.once("drain",()=>{this.upgrading?r():e()}):this.upgrading?r():e()),this}onError(e){I("socket error %j",e),i.priorWebsocketSuccess=!1,this.emitReserved("error",e),this.onClose("transport error",e)}onClose(e,t){(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing")&&(I('socket close with reason: "%s"',e),this.clearTimeoutFn(this.pingTimeoutTimer),this.transport.removeAllListeners("close"),this.transport.close(),this.transport.removeAllListeners(),typeof removeEventListener=="function"&&(removeEventListener("beforeunload",this.beforeunloadEventListener,!1),removeEventListener("offline",this.offlineEventListener,!1)),this.readyState="closed",this.id=null,this.emitReserved("close",e,t),this.writeBuffer=[],this.prevBufferLen=0)}filterUpgrades(e){let t=[],r=0,s=e.length;for(;r<s;r++)~this.transports.indexOf(e[r])&&t.push(e[r]);return t}};je.protocol=Xi;var $h=je.protocol;var Kn=K(Wt(),1),zn=(0,Kn.default)("socket.io-client:url");function Yn(i,e="",t){let r=i;t=t||typeof location!="undefined"&&location,i==null&&(i=t.protocol+"//"+t.host),typeof i=="string"&&(i.charAt(0)==="/"&&(i.charAt(1)==="/"?i=t.protocol+i:i=t.host+i),/^(https?|wss?):\/\//.test(i)||(zn("protocol-less url %s",i),typeof t!="undefined"?i=t.protocol+"//"+i:i="https://"+i),zn("parse %s",i),r=lt(i)),r.port||(/^(http|ws)$/.test(r.protocol)?r.port="80":/^(http|ws)s$/.test(r.protocol)&&(r.port="443")),r.path=r.path||"/";let n=r.host.indexOf(":")!==-1?"["+r.host+"]":r.host;return r.id=r.protocol+"://"+n+":"+r.port+e,r.href=r.protocol+"://"+n+(t&&t.port===r.port?"":":"+r.port),r}var Mr={};Eo(Mr,{Decoder:()=>Ur,Encoder:()=>Br,PacketType:()=>x,protocol:()=>to});var jc=typeof ArrayBuffer=="function",Hc=i=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(i):i.buffer instanceof ArrayBuffer,Jn=Object.prototype.toString,Gc=typeof Blob=="function"||typeof Blob!="undefined"&&Jn.call(Blob)==="[object BlobConstructor]",zc=typeof File=="function"||typeof File!="undefined"&&Jn.call(File)==="[object FileConstructor]";function jt(i){return jc&&(i instanceof ArrayBuffer||Hc(i))||Gc&&i instanceof Blob||zc&&i instanceof File}function Vt(i,e){if(!i||typeof i!="object")return!1;if(Array.isArray(i)){for(let t=0,r=i.length;t<r;t++)if(Vt(i[t]))return!0;return!1}if(jt(i))return!0;if(i.toJSON&&typeof i.toJSON=="function"&&arguments.length===1)return Vt(i.toJSON(),!0);for(let t in i)if(Object.prototype.hasOwnProperty.call(i,t)&&Vt(i[t]))return!0;return!1}function Xn(i){let e=[],t=i.data,r=i;return r.data=Pr(t,e),r.attachments=e.length,{packet:r,buffers:e}}function Pr(i,e){if(!i)return i;if(jt(i)){let t={_placeholder:!0,num:e.length};return e.push(i),t}else if(Array.isArray(i)){let t=new Array(i.length);for(let r=0;r<i.length;r++)t[r]=Pr(i[r],e);return t}else if(typeof i=="object"&&!(i instanceof Date)){let t={};for(let r in i)Object.prototype.hasOwnProperty.call(i,r)&&(t[r]=Pr(i[r],e));return t}return i}function Qn(i,e){return i.data=Lr(i.data,e),delete i.attachments,i}function Lr(i,e){if(!i)return i;if(i&&i._placeholder===!0){if(typeof i.num=="number"&&i.num>=0&&i.num<e.length)return e[i.num];throw new Error("illegal attachments")}else if(Array.isArray(i))for(let t=0;t<i.length;t++)i[t]=Lr(i[t],e);else if(typeof i=="object")for(let t in i)Object.prototype.hasOwnProperty.call(i,t)&&(i[t]=Lr(i[t],e));return i}var eo=K(Me(),1),Fr=(0,eo.default)("socket.io-parser"),Kc=["connect","connect_error","disconnect","disconnecting","newListener","removeListener"],to=5,x;(function(i){i[i.CONNECT=0]="CONNECT",i[i.DISCONNECT=1]="DISCONNECT",i[i.EVENT=2]="EVENT",i[i.ACK=3]="ACK",i[i.CONNECT_ERROR=4]="CONNECT_ERROR",i[i.BINARY_EVENT=5]="BINARY_EVENT",i[i.BINARY_ACK=6]="BINARY_ACK"})(x||(x={}));var Br=class{constructor(e){this.replacer=e}encode(e){return Fr("encoding packet %j",e),(e.type===x.EVENT||e.type===x.ACK)&&Vt(e)?this.encodeAsBinary({type:e.type===x.EVENT?x.BINARY_EVENT:x.BINARY_ACK,nsp:e.nsp,data:e.data,id:e.id}):[this.encodeAsString(e)]}encodeAsString(e){let t=""+e.type;return(e.type===x.BINARY_EVENT||e.type===x.BINARY_ACK)&&(t+=e.attachments+"-"),e.nsp&&e.nsp!=="/"&&(t+=e.nsp+","),e.id!=null&&(t+=e.id),e.data!=null&&(t+=JSON.stringify(e.data,this.replacer)),Fr("encoded %j as %s",e,t),t}encodeAsBinary(e){let t=Xn(e),r=this.encodeAsString(t.packet),s=t.buffers;return s.unshift(r),s}};function Zn(i){return Object.prototype.toString.call(i)==="[object Object]"}var Ur=class i extends O{constructor(e){super(),this.reviver=e}add(e){let t;if(typeof e=="string"){if(this.reconstructor)throw new Error("got plaintext data when reconstructing a packet");t=this.decodeString(e);let r=t.type===x.BINARY_EVENT;r||t.type===x.BINARY_ACK?(t.type=r?x.EVENT:x.ACK,this.reconstructor=new Dr(t),t.attachments===0&&super.emitReserved("decoded",t)):super.emitReserved("decoded",t)}else if(jt(e)||e.base64)if(this.reconstructor)t=this.reconstructor.takeBinaryData(e),t&&(this.reconstructor=null,super.emitReserved("decoded",t));else throw new Error("got binary data when not reconstructing a packet");else throw new Error("Unknown type: "+e)}decodeString(e){let t=0,r={type:Number(e.charAt(0))};if(x[r.type]===void 0)throw new Error("unknown packet type "+r.type);if(r.type===x.BINARY_EVENT||r.type===x.BINARY_ACK){let n=t+1;for(;e.charAt(++t)!=="-"&&t!=e.length;);let o=e.substring(n,t);if(o!=Number(o)||e.charAt(t)!=="-")throw new Error("Illegal attachments");r.attachments=Number(o)}if(e.charAt(t+1)==="/"){let n=t+1;for(;++t&&!(e.charAt(t)===","||t===e.length););r.nsp=e.substring(n,t)}else r.nsp="/";let s=e.charAt(t+1);if(s!==""&&Number(s)==s){let n=t+1;for(;++t;){let o=e.charAt(t);if(o==null||Number(o)!=o){--t;break}if(t===e.length)break}r.id=Number(e.substring(n,t+1))}if(e.charAt(++t)){let n=this.tryParse(e.substr(t));if(i.isPayloadValid(r.type,n))r.data=n;else throw new Error("invalid payload")}return Fr("decoded %s as %j",e,r),r}tryParse(e){try{return JSON.parse(e,this.reviver)}catch(t){return!1}}static isPayloadValid(e,t){switch(e){case x.CONNECT:return Zn(t);case x.DISCONNECT:return t===void 0;case x.CONNECT_ERROR:return typeof t=="string"||Zn(t);case x.EVENT:case x.BINARY_EVENT:return Array.isArray(t)&&(typeof t[0]=="number"||typeof t[0]=="string"&&Kc.indexOf(t[0])===-1);case x.ACK:case x.BINARY_ACK:return Array.isArray(t)}}destroy(){this.reconstructor&&(this.reconstructor.finishedReconstruction(),this.reconstructor=null)}},Dr=class{constructor(e){this.packet=e,this.buffers=[],this.reconPack=e}takeBinaryData(e){if(this.buffers.push(e),this.buffers.length===this.reconPack.attachments){let t=Qn(this.reconPack,this.buffers);return this.finishedReconstruction(),t}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}};function te(i,e,t){return i.on(e,t),function(){i.off(e,t)}}var io=K(Wt(),1),U=(0,io.default)("socket.io-client:socket"),Yc=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1}),ft=class extends O{constructor(e,t,r){super(),this.connected=!1,this.recovered=!1,this.receiveBuffer=[],this.sendBuffer=[],this._queue=[],this._queueSeq=0,this.ids=0,this.acks={},this.flags={},this.io=e,this.nsp=t,r&&r.auth&&(this.auth=r.auth),this._opts=Object.assign({},r),this.io._autoConnect&&this.open()}get disconnected(){return!this.connected}subEvents(){if(this.subs)return;let e=this.io;this.subs=[te(e,"open",this.onopen.bind(this)),te(e,"packet",this.onpacket.bind(this)),te(e,"error",this.onerror.bind(this)),te(e,"close",this.onclose.bind(this))]}get active(){return!!this.subs}connect(){return this.connected?this:(this.subEvents(),this.io._reconnecting||this.io.open(),this.io._readyState==="open"&&this.onopen(),this)}open(){return this.connect()}send(...e){return e.unshift("message"),this.emit.apply(this,e),this}emit(e,...t){if(Yc.hasOwnProperty(e))throw new Error('"'+e.toString()+'" is a reserved event name');if(t.unshift(e),this._opts.retries&&!this.flags.fromQueue&&!this.flags.volatile)return this._addToQueue(t),this;let r={type:x.EVENT,data:t};if(r.options={},r.options.compress=this.flags.compress!==!1,typeof t[t.length-1]=="function"){let o=this.ids++;U("emitting packet with ack id %d",o);let a=t.pop();this._registerAckCallback(o,a),r.id=o}let s=this.io.engine&&this.io.engine.transport&&this.io.engine.transport.writable;return this.flags.volatile&&(!s||!this.connected)?U("discard packet as the transport is not currently writable"):this.connected?(this.notifyOutgoingListeners(r),this.packet(r)):this.sendBuffer.push(r),this.flags={},this}_registerAckCallback(e,t){var r;let s=(r=this.flags.timeout)!==null&&r!==void 0?r:this._opts.ackTimeout;if(s===void 0){this.acks[e]=t;return}let n=this.io.setTimeoutFn(()=>{delete this.acks[e];for(let o=0;o<this.sendBuffer.length;o++)this.sendBuffer[o].id===e&&(U("removing packet with ack id %d from the buffer",e),this.sendBuffer.splice(o,1));U("event with ack id %d has timed out after %d ms",e,s),t.call(this,new Error("operation has timed out"))},s);this.acks[e]=(...o)=>{this.io.clearTimeoutFn(n),t.apply(this,[null,...o])}}emitWithAck(e,...t){let r=this.flags.timeout!==void 0||this._opts.ackTimeout!==void 0;return new Promise((s,n)=>{t.push((o,a)=>r?o?n(o):s(a):s(o)),this.emit(e,...t)})}_addToQueue(e){let t;typeof e[e.length-1]=="function"&&(t=e.pop());let r={id:this._queueSeq++,tryCount:0,pending:!1,args:e,flags:Object.assign({fromQueue:!0},this.flags)};e.push((s,...n)=>r!==this._queue[0]?void 0:(s!==null?r.tryCount>this._opts.retries&&(U("packet [%d] is discarded after %d tries",r.id,r.tryCount),this._queue.shift(),t&&t(s)):(U("packet [%d] was successfully sent",r.id),this._queue.shift(),t&&t(null,...n)),r.pending=!1,this._drainQueue())),this._queue.push(r),this._drainQueue()}_drainQueue(e=!1){if(U("draining queue"),!this.connected||this._queue.length===0)return;let t=this._queue[0];if(t.pending&&!e){U("packet [%d] has already been sent and is waiting for an ack",t.id);return}t.pending=!0,t.tryCount++,U("sending packet [%d] (try n\xB0%d)",t.id,t.tryCount),this.flags=t.flags,this.emit.apply(this,t.args)}packet(e){e.nsp=this.nsp,this.io._packet(e)}onopen(){U("transport is open - connecting"),typeof this.auth=="function"?this.auth(e=>{this._sendConnectPacket(e)}):this._sendConnectPacket(this.auth)}_sendConnectPacket(e){this.packet({type:x.CONNECT,data:this._pid?Object.assign({pid:this._pid,offset:this._lastOffset},e):e})}onerror(e){this.connected||this.emitReserved("connect_error",e)}onclose(e,t){U("close (%s)",e),this.connected=!1,delete this.id,this.emitReserved("disconnect",e,t)}onpacket(e){if(e.nsp===this.nsp)switch(e.type){case x.CONNECT:e.data&&e.data.sid?this.onconnect(e.data.sid,e.data.pid):this.emitReserved("connect_error",new Error("It seems you are trying to reach a Socket.IO server in v2.x with a v3.x client, but they are not compatible (more information here: https://socket.io/docs/v3/migrating-from-2-x-to-3-0/)"));break;case x.EVENT:case x.BINARY_EVENT:this.onevent(e);break;case x.ACK:case x.BINARY_ACK:this.onack(e);break;case x.DISCONNECT:this.ondisconnect();break;case x.CONNECT_ERROR:this.destroy();let r=new Error(e.data.message);r.data=e.data.data,this.emitReserved("connect_error",r);break}}onevent(e){let t=e.data||[];U("emitting event %j",t),e.id!=null&&(U("attaching ack callback to event"),t.push(this.ack(e.id))),this.connected?this.emitEvent(t):this.receiveBuffer.push(Object.freeze(t))}emitEvent(e){if(this._anyListeners&&this._anyListeners.length){let t=this._anyListeners.slice();for(let r of t)r.apply(this,e)}super.emit.apply(this,e),this._pid&&e.length&&typeof e[e.length-1]=="string"&&(this._lastOffset=e[e.length-1])}ack(e){let t=this,r=!1;return function(...s){r||(r=!0,U("sending ack %j",s),t.packet({type:x.ACK,id:e,data:s}))}}onack(e){let t=this.acks[e.id];typeof t=="function"?(U("calling ack %s with %j",e.id,e.data),t.apply(this,e.data),delete this.acks[e.id]):U("bad ack %s",e.id)}onconnect(e,t){U("socket connected with id %s",e),this.id=e,this.recovered=t&&this._pid===t,this._pid=t,this.connected=!0,this.emitBuffered(),this.emitReserved("connect"),this._drainQueue(!0)}emitBuffered(){this.receiveBuffer.forEach(e=>this.emitEvent(e)),this.receiveBuffer=[],this.sendBuffer.forEach(e=>{this.notifyOutgoingListeners(e),this.packet(e)}),this.sendBuffer=[]}ondisconnect(){U("server disconnect (%s)",this.nsp),this.destroy(),this.onclose("io server disconnect")}destroy(){this.subs&&(this.subs.forEach(e=>e()),this.subs=void 0),this.io._destroy(this)}disconnect(){return this.connected&&(U("performing disconnect (%s)",this.nsp),this.packet({type:x.DISCONNECT})),this.destroy(),this.connected&&this.onclose("io client disconnect"),this}close(){return this.disconnect()}compress(e){return this.flags.compress=e,this}get volatile(){return this.flags.volatile=!0,this}timeout(e){return this.flags.timeout=e,this}onAny(e){return this._anyListeners=this._anyListeners||[],this._anyListeners.push(e),this}prependAny(e){return this._anyListeners=this._anyListeners||[],this._anyListeners.unshift(e),this}offAny(e){if(!this._anyListeners)return this;if(e){let t=this._anyListeners;for(let r=0;r<t.length;r++)if(e===t[r])return t.splice(r,1),this}else this._anyListeners=[];return this}listenersAny(){return this._anyListeners||[]}onAnyOutgoing(e){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.push(e),this}prependAnyOutgoing(e){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.unshift(e),this}offAnyOutgoing(e){if(!this._anyOutgoingListeners)return this;if(e){let t=this._anyOutgoingListeners;for(let r=0;r<t.length;r++)if(e===t[r])return t.splice(r,1),this}else this._anyOutgoingListeners=[];return this}listenersAnyOutgoing(){return this._anyOutgoingListeners||[]}notifyOutgoingListeners(e){if(this._anyOutgoingListeners&&this._anyOutgoingListeners.length){let t=this._anyOutgoingListeners.slice();for(let r of t)r.apply(this,e.data)}}};function He(i){i=i||{},this.ms=i.min||100,this.max=i.max||1e4,this.factor=i.factor||2,this.jitter=i.jitter>0&&i.jitter<=1?i.jitter:0,this.attempts=0}He.prototype.duration=function(){var i=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var e=Math.random(),t=Math.floor(e*this.jitter*i);i=Math.floor(e*10)&1?i+t:i-t}return Math.min(i,this.max)|0};He.prototype.reset=function(){this.attempts=0};He.prototype.setMin=function(i){this.ms=i};He.prototype.setMax=function(i){this.max=i};He.prototype.setJitter=function(i){this.jitter=i};var ro=K(Wt(),1),G=(0,ro.default)("socket.io-client:manager"),ht=class extends O{constructor(e,t){var r;super(),this.nsps={},this.subs=[],e&&typeof e=="object"&&(t=e,e=void 0),t=t||{},t.path=t.path||"/socket.io",this.opts=t,ve(this,t),this.reconnection(t.reconnection!==!1),this.reconnectionAttempts(t.reconnectionAttempts||1/0),this.reconnectionDelay(t.reconnectionDelay||1e3),this.reconnectionDelayMax(t.reconnectionDelayMax||5e3),this.randomizationFactor((r=t.randomizationFactor)!==null&&r!==void 0?r:.5),this.backoff=new He({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(t.timeout==null?2e4:t.timeout),this._readyState="closed",this.uri=e;let s=t.parser||Mr;this.encoder=new s.Encoder,this.decoder=new s.Decoder,this._autoConnect=t.autoConnect!==!1,this._autoConnect&&this.open()}reconnection(e){return arguments.length?(this._reconnection=!!e,this):this._reconnection}reconnectionAttempts(e){return e===void 0?this._reconnectionAttempts:(this._reconnectionAttempts=e,this)}reconnectionDelay(e){var t;return e===void 0?this._reconnectionDelay:(this._reconnectionDelay=e,(t=this.backoff)===null||t===void 0||t.setMin(e),this)}randomizationFactor(e){var t;return e===void 0?this._randomizationFactor:(this._randomizationFactor=e,(t=this.backoff)===null||t===void 0||t.setJitter(e),this)}reconnectionDelayMax(e){var t;return e===void 0?this._reconnectionDelayMax:(this._reconnectionDelayMax=e,(t=this.backoff)===null||t===void 0||t.setMax(e),this)}timeout(e){return arguments.length?(this._timeout=e,this):this._timeout}maybeReconnectOnOpen(){!this._reconnecting&&this._reconnection&&this.backoff.attempts===0&&this.reconnect()}open(e){if(G("readyState %s",this._readyState),~this._readyState.indexOf("open"))return this;G("opening %s",this.uri),this.engine=new je(this.uri,this.opts);let t=this.engine,r=this;this._readyState="opening",this.skipReconnect=!1;let s=te(t,"open",function(){r.onopen(),e&&e()}),n=a=>{G("error"),this.cleanup(),this._readyState="closed",this.emitReserved("error",a),e?e(a):this.maybeReconnectOnOpen()},o=te(t,"error",n);if(this._timeout!==!1){let a=this._timeout;G("connect attempt will timeout after %d",a);let c=this.setTimeoutFn(()=>{G("connect attempt timed out after %d",a),s(),n(new Error("timeout")),t.close()},a);this.opts.autoUnref&&c.unref(),this.subs.push(()=>{this.clearTimeoutFn(c)})}return this.subs.push(s),this.subs.push(o),this}connect(e){return this.open(e)}onopen(){G("open"),this.cleanup(),this._readyState="open",this.emitReserved("open");let e=this.engine;this.subs.push(te(e,"ping",this.onping.bind(this)),te(e,"data",this.ondata.bind(this)),te(e,"error",this.onerror.bind(this)),te(e,"close",this.onclose.bind(this)),te(this.decoder,"decoded",this.ondecoded.bind(this)))}onping(){this.emitReserved("ping")}ondata(e){try{this.decoder.add(e)}catch(t){this.onclose("parse error",t)}}ondecoded(e){Ve(()=>{this.emitReserved("packet",e)},this.setTimeoutFn)}onerror(e){G("error",e),this.emitReserved("error",e)}socket(e,t){let r=this.nsps[e];return r?this._autoConnect&&!r.active&&r.connect():(r=new ft(this,e,t),this.nsps[e]=r),r}_destroy(e){let t=Object.keys(this.nsps);for(let r of t)if(this.nsps[r].active){G("socket %s is still active, skipping close",r);return}this._close()}_packet(e){G("writing packet %j",e);let t=this.encoder.encode(e);for(let r=0;r<t.length;r++)this.engine.write(t[r],e.options)}cleanup(){G("cleanup"),this.subs.forEach(e=>e()),this.subs.length=0,this.decoder.destroy()}_close(){G("disconnect"),this.skipReconnect=!0,this._reconnecting=!1,this.onclose("forced close"),this.engine&&this.engine.close()}disconnect(){return this._close()}onclose(e,t){G("closed due to %s",e),this.cleanup(),this.backoff.reset(),this._readyState="closed",this.emitReserved("close",e,t),this._reconnection&&!this.skipReconnect&&this.reconnect()}reconnect(){if(this._reconnecting||this.skipReconnect)return this;let e=this;if(this.backoff.attempts>=this._reconnectionAttempts)G("reconnect failed"),this.backoff.reset(),this.emitReserved("reconnect_failed"),this._reconnecting=!1;else{let t=this.backoff.duration();G("will wait %dms before reconnect attempt",t),this._reconnecting=!0;let r=this.setTimeoutFn(()=>{e.skipReconnect||(G("attempting reconnect"),this.emitReserved("reconnect_attempt",e.backoff.attempts),!e.skipReconnect&&e.open(s=>{s?(G("reconnect attempt error"),e._reconnecting=!1,e.reconnect(),this.emitReserved("reconnect_error",s)):(G("reconnect success"),e.onreconnect())}))},t);this.opts.autoUnref&&r.unref(),this.subs.push(()=>{this.clearTimeoutFn(r)})}}onreconnect(){let e=this.backoff.attempts;this._reconnecting=!1,this.backoff.reset(),this.emitReserved("reconnect",e)}};var no=K(Wt(),1),so=(0,no.default)("socket.io-client"),Ht={};function Gt(i,e){typeof i=="object"&&(e=i,i=void 0),e=e||{};let t=Yn(i,e.path||"/socket.io"),r=t.source,s=t.id,n=t.path,o=Ht[s]&&n in Ht[s].nsps,a=e.forceNew||e["force new connection"]||e.multiplex===!1||o,c;return a?(so("ignoring socket cache for %s",r),c=new ht(r,e)):(Ht[s]||(so("new io instance for %s",r),Ht[s]=new ht(r,e)),c=Ht[s]),t.query&&!e.query&&(e.query=t.queryKey),c.socket(t.path,e)}Object.assign(Gt,{Manager:ht,Socket:ft,io:Gt,connect:Gt});var Jc="https://ws.novu.co",oo="notifications.notification_received",ao="notifications.unseen_count_changed",co="notifications.unread_count_changed",Xc=({_id:i,content:e,read:t,archived:r,createdAt:s,lastReadDate:n,archivedAt:o,channel:a,subscriber:c,subject:u,avatar:l,cta:h,tags:d,data:b})=>{var m,g,V,R,j,z,pe,Jt,Xt,ie;let S={id:(m=c==null?void 0:c._id)!=null?m:"",firstName:c==null?void 0:c.firstName,lastName:c==null?void 0:c.lastName,avatar:c==null?void 0:c.avatar,subscriberId:(g=c==null?void 0:c.subscriberId)!=null?g:""},p=(R=(V=h.action)==null?void 0:V.buttons)==null?void 0:R.find(ze=>ze.type==="primary"),v=(z=(j=h.action)==null?void 0:j.buttons)==null?void 0:z.find(ze=>ze.type==="secondary"),N=(Jt=(pe=h.action)==null?void 0:pe.result)==null?void 0:Jt.type,A=(Xt=h.action)==null?void 0:Xt.status;return{id:i,subject:u,body:e,to:S,isRead:t,isArchived:r,createdAt:s,readAt:n,archivedAt:o,avatar:l,primaryAction:p&&{label:p.content,isCompleted:N==="primary"&&A==="done",redirect:p.url?{target:p.target,url:p.url}:void 0},secondaryAction:v&&{label:v.content,isCompleted:N==="secondary"&&A==="done",redirect:v.url?{target:v.target,url:v.url}:void 0},channelType:a,tags:d,redirect:(ie=h.data)!=null&&ie.url?{url:h.data.url,target:h.data.target}:void 0,data:b}},ut,ue,ge,dt,Ui,Di,Mi,zt,qr,Bi=class extends we{constructor({socketUrl:t,inboxServiceInstance:r,eventEmitterInstance:s}){super({eventEmitterInstance:s,inboxServiceInstance:r});_(this,zt);_(this,ut);_(this,ue);_(this,ge);_(this,dt);_(this,Ui,({message:t})=>{f(this,ue).emit(oo,{result:new H(Xc(t),f(this,ue),this._inboxService)})});_(this,Di,({unseenCount:t})=>{f(this,ue).emit(ao,{result:t})});_(this,Mi,({unreadCount:t})=>{f(this,ue).emit(co,{result:t})});E(this,ue,s),E(this,dt,t!=null?t:Jc)}onSessionSuccess({token:t}){E(this,ut,t)}isSocketEvent(t){return t===oo||t===ao||t===co}initialize(){if(f(this,ut)){ji(this,zt,qr).call(this).catch(t=>{console.error(t)});return}this.callWithSession(()=>y(this,null,function*(){return ji(this,zt,qr).call(this).catch(t=>{console.error(t)}),{}}))}};ut=new WeakMap,ue=new WeakMap,ge=new WeakMap,dt=new WeakMap,Ui=new WeakMap,Di=new WeakMap,Mi=new WeakMap,zt=new WeakSet,qr=function(){return y(this,null,function*(){var r,s,n;if(f(this,ge))return;let t={socketUrl:f(this,dt)};f(this,ue).emit("socket.connect.pending",{args:t}),E(this,ge,Gt(f(this,dt),{reconnectionDelayMax:1e4,transports:["websocket"],query:{token:`${f(this,ut)}`}})),f(this,ge).on("connect",()=>{f(this,ue).emit("socket.connect.resolved",{args:t})}),f(this,ge).on("connect_error",o=>{f(this,ue).emit("socket.connect.resolved",{args:t,error:o})}),(r=f(this,ge))==null||r.on("notification_received",f(this,Ui)),(s=f(this,ge))==null||s.on("unseen_count_changed",f(this,Di)),(n=f(this,ge))==null||n.on("unread_count_changed",f(this,Mi))})};var lo="https://api.novu.co";var Ge=function(i,e,t,r){function s(n){return n instanceof t?n:new t(function(o){o(n)})}return new(t||(t=Promise))(function(n,o){function a(l){try{u(r.next(l))}catch(h){o(h)}}function c(l){try{u(r.throw(l))}catch(h){o(h)}}function u(l){l.done?n(l.value):s(l.value).then(a,c)}u((r=r.apply(i,e||[])).next())})},Qc="v1",Zc="https://api.novu.co",el="@novu/client",tl="2.0.0-canary.0",il=`${el}-${tl}`,pt=class{constructor({apiVersion:e=Qc,backendUrl:t=Zc,userAgent:r=il}={}){this.apiVersion=e,this.backendUrl=`${t}/${this.apiVersion}`,this.headers={"Content-Type":"application/json","User-Agent":r}}setAuthorizationToken(e){this.headers.Authorization=`Bearer ${e}`}disposeAuthorizationToken(){delete this.headers.Authorization}updateHeaders(e){this.headers=Object.assign(Object.assign({},this.headers),e)}getFullResponse(e,t){return Ge(this,void 0,void 0,function*(){return yield(yield this.doFetch(e+this.getQueryString(t))).json()})}get(e,t){return Ge(this,void 0,void 0,function*(){return(yield(yield this.doFetch(e+this.getQueryString(t))).json()).data})}post(e){return Ge(this,arguments,void 0,function*(t,r={}){let s=yield this.doFetch(t,{method:"POST",body:JSON.stringify(r)});return this.checkEmptyResponse(s)?void 0:(yield s.json()).data})}patch(e){return Ge(this,arguments,void 0,function*(t,r={}){let s=yield this.doFetch(t,{method:"PATCH",body:JSON.stringify(r)});return this.checkEmptyResponse(s)?void 0:(yield s.json()).data})}delete(e){return Ge(this,arguments,void 0,function*(t,r={}){let s=yield this.doFetch(t,{method:"DELETE",body:JSON.stringify(r)});return this.checkEmptyResponse(s)?void 0:(yield s.json()).data})}getQueryString(e){return e?`?${new URLSearchParams(e).toString()}`:""}doFetch(e){return Ge(this,arguments,void 0,function*(t,r={}){let s=yield fetch(this.backendUrl+t,Object.assign(Object.assign({},r),{headers:this.headers}));return yield this.checkResponseStatus(s),s})}checkResponseStatus(e){return Ge(this,void 0,void 0,function*(){if(!e.ok){let t=yield e.json();throw new Error(`HTTP error! Status: ${e.status}, Message: ${t.message}`)}})}checkEmptyResponse(e){return e.status===204}};var rl="2024-06-26",Kt="/inbox",de=`${Kt}/notifications`,L,qi=class{constructor(e={}){this.isSessionInitialized=!1;_(this,L);E(this,L,new pt(e)),f(this,L).updateHeaders({"Novu-API-Version":rl,"Novu-User-Agent":e.userAgent||"@novu/js"})}initializeSession(s){return y(this,arguments,function*({applicationIdentifier:e,subscriberId:t,subscriberHash:r}){let n=yield f(this,L).post(`${Kt}/session`,{applicationIdentifier:e,subscriberId:t,subscriberHash:r});return f(this,L).setAuthorizationToken(n.token),this.isSessionInitialized=!0,n})}fetchNotifications({after:e,archived:t,limit:r=10,offset:s,read:n,tags:o}){let a=new URLSearchParams(`limit=${r}`);return e&&a.append("after",e),s&&a.append("offset",`${s}`),o&&o.forEach(c=>a.append("tags[]",c)),n!==void 0&&a.append("read",`${n}`),t!==void 0&&a.append("archived",`${t}`),f(this,L).getFullResponse(`${de}?${a.toString()}`)}count({filters:e}){return f(this,L).getFullResponse(`${de}/count?filters=${JSON.stringify(e)}`)}read(e){return f(this,L).patch(`${de}/${e}/read`)}unread(e){return f(this,L).patch(`${de}/${e}/unread`)}archive(e){return f(this,L).patch(`${de}/${e}/archive`)}unarchive(e){return f(this,L).patch(`${de}/${e}/unarchive`)}readAll({tags:e}){return f(this,L).post(`${de}/read`,{tags:e})}archiveAll({tags:e}){return f(this,L).post(`${de}/archive`,{tags:e})}archiveAllRead({tags:e}){return f(this,L).post(`${de}/read-archive`,{tags:e})}completeAction({actionType:e,notificationId:t}){return f(this,L).patch(`${de}/${t}/complete`,{actionType:e})}revertAction({actionType:e,notificationId:t}){return f(this,L).patch(`${de}/${t}/revert`,{actionType:e})}fetchPreferences(e){let t=new URLSearchParams;e&&e.forEach(s=>t.append("tags[]",s));let r=t.size?`?${t.toString()}`:"";return f(this,L).get(`${Kt}/preferences${r}`)}updateGlobalPreferences(e){return f(this,L).patch(`${Kt}/preferences`,e)}updateWorkflowPreferences({workflowId:e,channelPreferences:t}){return f(this,L).patch(`${Kt}/preferences/${e}`,t)}};L=new WeakMap;var sl="2.6.0",nl="@novu/js",ol=`${nl}@${sl}`,ye,Yt,mt,Le,$i=class{constructor(e){_(this,ye);_(this,Yt);_(this,mt);_(this,Le);var t,r,s,n;E(this,Le,new qi({backendUrl:(t=e.backendUrl)!=null?t:lo,userAgent:(r=e.__userAgent)!=null?r:ol})),E(this,ye,new ti),E(this,Yt,new ai({applicationIdentifier:e.applicationIdentifier,subscriberId:e.subscriberId,subscriberHash:e.subscriberHash},f(this,Le),f(this,ye))),f(this,Yt).initialize(),this.notifications=new oi({useCache:(s=e.useCache)!=null?s:!0,inboxServiceInstance:f(this,Le),eventEmitterInstance:f(this,ye)}),this.preferences=new li({useCache:(n=e.useCache)!=null?n:!0,inboxServiceInstance:f(this,Le),eventEmitterInstance:f(this,ye)}),E(this,mt,new Bi({socketUrl:e.socketUrl,eventEmitterInstance:f(this,ye),inboxServiceInstance:f(this,Le)})),this.on=(o,a)=>{f(this,mt).isSocketEvent(o)&&f(this,mt).initialize();let c=f(this,ye).on(o,a);return()=>{c()}},this.off=(o,a)=>{f(this,ye).off(o,a)}}};ye=new WeakMap,Yt=new WeakMap,mt=new WeakMap,Le=new WeakMap;window.Novu=$i;})();
|
|
16
|
+
`).map(e=>e.trim()).join(" ")};Hn.O=function(i){return this.inspectOpts.colors=this.useColors,Li.inspect(i,this.inspectOpts)}});var Wt=k((Jh,Ir)=>{"use strict";typeof process=="undefined"||process.type==="renderer"||process.browser===!0||process.__nwjs?Ir.exports=$n():Ir.exports=Gn()});function zr(i){return{all:i=i||new Map,on:function(e,t){var r=i.get(e);r?r.push(t):i.set(e,[t])},off:function(e,t){var r=i.get(e);r&&(t?r.splice(r.indexOf(t)>>>0,1):i.set(e,[]))},emit:function(e,t){var r=i.get(e);r&&r.slice().map(function(s){s(t)}),(r=i.get("*"))&&r.slice().map(function(s){s(e,t)})}}}var Fe,ti=class{constructor(){_(this,Fe);E(this,Fe,zr())}on(e,t){return f(this,Fe).on(e,t),()=>{this.off(e,t)}}off(e,t){f(this,Fe).off(e,t)}emit(e,t){f(this,Fe).emit(e,t)}};Fe=new WeakMap;var F=class extends Error{constructor(e,t){super(e),this.originalError=t}};var Se,Ye,we=class{constructor({inboxServiceInstance:e,eventEmitterInstance:t}){_(this,Se,[]);_(this,Ye);this._emitter=t,this._inboxService=e,this._emitter.on("session.initialize.resolved",({error:r,data:s})=>{s?(this.onSessionSuccess(s),f(this,Se).forEach(a=>y(this,[a],function*({fn:n,resolve:o}){o(yield n())})),E(this,Se,[])):r&&(this.onSessionError(r),E(this,Ye,r),f(this,Se).forEach(({resolve:n})=>{n({error:new F("Failed to initialize session, please contact the support",r)})}),E(this,Se,[]))})}onSessionSuccess(e){}onSessionError(e){}callWithSession(e){return y(this,null,function*(){return this._inboxService.isSessionInitialized?e():f(this,Ye)?Promise.resolve({error:new F("Failed to initialize session, please contact the support",f(this,Ye))}):new Promise((t,r)=>{f(this,Se).push({fn:e,resolve:t,reject:r})})})}};Se=new WeakMap,Ye=new WeakMap;var J,se,H=class{constructor(e,t,r){_(this,J);_(this,se);E(this,J,t),E(this,se,r),this.id=e.id,this.subject=e.subject,this.body=e.body,this.to=e.to,this.isRead=e.isRead,this.isArchived=e.isArchived,this.createdAt=e.createdAt,this.readAt=e.readAt,this.archivedAt=e.archivedAt,this.avatar=e.avatar,this.primaryAction=e.primaryAction,this.secondaryAction=e.secondaryAction,this.channelType=e.channelType,this.tags=e.tags,this.redirect=e.redirect,this.data=e.data}read(){return ii({emitter:f(this,J),apiService:f(this,se),args:{notification:this}})}unread(){return ri({emitter:f(this,J),apiService:f(this,se),args:{notification:this}})}archive(){return si({emitter:f(this,J),apiService:f(this,se),args:{notification:this}})}unarchive(){return ni({emitter:f(this,J),apiService:f(this,se),args:{notification:this}})}completePrimary(){if(!this.primaryAction)throw new Error("Primary action is not available");return Je({emitter:f(this,J),apiService:f(this,se),args:{notification:this},actionType:"primary"})}completeSecondary(){if(!this.primaryAction)throw new Error("Secondary action is not available");return Je({emitter:f(this,J),apiService:f(this,se),args:{notification:this},actionType:"secondary"})}revertPrimary(){if(!this.primaryAction)throw new Error("Primary action is not available");return Xe({emitter:f(this,J),apiService:f(this,se),args:{notification:this},actionType:"primary"})}revertSecondary(){if(!this.primaryAction)throw new Error("Secondary action is not available");return Xe({emitter:f(this,J),apiService:f(this,se),args:{notification:this},actionType:"secondary"})}on(e,t){let r=f(this,J).on(e,t);return()=>{r()}}off(e,t){f(this,J).off(e,t)}};J=new WeakMap,se=new WeakMap;var ii=r=>y(void 0,[r],function*({emitter:i,apiService:e,args:t}){let{notificationId:s,optimisticValue:n}=Qe(t,{isRead:!0,readAt:new Date().toISOString(),isArchived:!1,archivedAt:void 0},{emitter:i,apiService:e});try{i.emit("notification.read.pending",{args:t,data:n});let o=yield e.read(s),a=new H(o,i,e);return i.emit("notification.read.resolved",{args:t,data:a}),{data:a}}catch(o){return i.emit("notification.read.resolved",{args:t,error:o}),{error:new F("Failed to read notification",o)}}}),ri=r=>y(void 0,[r],function*({emitter:i,apiService:e,args:t}){let{notificationId:s,optimisticValue:n}=Qe(t,{isRead:!1,readAt:null,isArchived:!1,archivedAt:void 0},{emitter:i,apiService:e});try{i.emit("notification.unread.pending",{args:t,data:n});let o=yield e.unread(s),a=new H(o,i,e);return i.emit("notification.unread.resolved",{args:t,data:a}),{data:a}}catch(o){return i.emit("notification.unread.resolved",{args:t,error:o}),{error:new F("Failed to unread notification",o)}}}),si=r=>y(void 0,[r],function*({emitter:i,apiService:e,args:t}){let{notificationId:s,optimisticValue:n}=Qe(t,{isArchived:!0,archivedAt:new Date().toISOString(),isRead:!0,readAt:new Date().toISOString()},{emitter:i,apiService:e});try{i.emit("notification.archive.pending",{args:t,data:n});let o=yield e.archive(s),a=new H(o,i,e);return i.emit("notification.archive.resolved",{args:t,data:a}),{data:a}}catch(o){return i.emit("notification.archive.resolved",{args:t,error:o}),{error:new F("Failed to archive notification",o)}}}),ni=r=>y(void 0,[r],function*({emitter:i,apiService:e,args:t}){let{notificationId:s,optimisticValue:n}=Qe(t,{isArchived:!1,archivedAt:null,isRead:!0,readAt:new Date().toISOString()},{emitter:i,apiService:e});try{i.emit("notification.unarchive.pending",{args:t,data:n});let o=yield e.unarchive(s),a=new H(o,i,e);return i.emit("notification.unarchive.resolved",{args:t,data:a}),{data:a}}catch(o){return i.emit("notification.unarchive.resolved",{args:t,error:o}),{error:new F("Failed to unarchive notification",o)}}}),Je=s=>y(void 0,[s],function*({emitter:i,apiService:e,args:t,actionType:r}){let n=r==="primary"?{primaryAction:T(C({},"notification"in t?t.notification.primaryAction:{}),{isCompleted:!0})}:{secondaryAction:T(C({},"notification"in t?t.notification.secondaryAction:{}),{isCompleted:!0})},{notificationId:o,optimisticValue:a}=Qe(t,n,{emitter:i,apiService:e});try{i.emit("notification.complete_action.pending",{args:t,data:a});let c=yield e.completeAction({actionType:r,notificationId:o}),u=new H(c,i,e);return i.emit("notification.complete_action.resolved",{args:t,data:u}),{data:u}}catch(c){return i.emit("notification.complete_action.resolved",{args:t,error:c}),{error:new F(`Failed to complete ${r} action on the notification`,c)}}}),Xe=s=>y(void 0,[s],function*({emitter:i,apiService:e,args:t,actionType:r}){let n=r==="primary"?{primaryAction:T(C({},"notification"in t?t.notification.primaryAction:{}),{isCompleted:!1})}:{secondaryAction:T(C({},"notification"in t?t.notification.secondaryAction:{}),{isCompleted:!1})},{notificationId:o,optimisticValue:a}=Qe(t,n,{emitter:i,apiService:e});try{i.emit("notification.revert_action.pending",{args:t,data:a});let c=yield e.revertAction({actionType:r,notificationId:o}),u=new H(c,i,e);return i.emit("notification.revert_action.resolved",{args:t,data:u}),{data:u}}catch(c){return i.emit("notification.revert_action.resolved",{args:t,error:c}),{error:new F("Failed to fetch notifications",c)}}}),Qe=(i,e,t)=>"notification"in i?{notificationId:i.notification.id,optimisticValue:new H(C(C({},i.notification),e),t.emitter,t.apiService)}:{notificationId:i.notificationId},Kr=s=>y(void 0,[s],function*({emitter:i,inboxService:e,notificationsCache:t,tags:r}){try{let o=t.getUniqueNotifications({tags:r}).map(a=>new H(T(C({},a),{isRead:!0,readAt:new Date().toISOString(),isArchived:!1,archivedAt:void 0}),i,e));return i.emit("notifications.read_all.pending",{args:{tags:r},data:o}),yield e.readAll({tags:r}),i.emit("notifications.read_all.resolved",{args:{tags:r},data:o}),{}}catch(n){return i.emit("notifications.read_all.resolved",{args:{tags:r},error:n}),{error:new F("Failed to read all notifications",n)}}}),Yr=s=>y(void 0,[s],function*({emitter:i,inboxService:e,notificationsCache:t,tags:r}){try{let o=t.getUniqueNotifications({tags:r}).map(a=>new H(T(C({},a),{isRead:!0,readAt:new Date().toISOString(),isArchived:!0,archivedAt:new Date().toISOString()}),i,e));return i.emit("notifications.archive_all.pending",{args:{tags:r},data:o}),yield e.archiveAll({tags:r}),i.emit("notifications.archive_all.resolved",{args:{tags:r},data:o}),{}}catch(n){return i.emit("notifications.archive_all.resolved",{args:{tags:r},error:n}),{error:new F("Failed to archive all notifications",n)}}}),Jr=s=>y(void 0,[s],function*({emitter:i,inboxService:e,notificationsCache:t,tags:r}){try{let o=t.getUniqueNotifications({tags:r,read:!0}).map(a=>new H(T(C({},a),{isArchived:!0,archivedAt:new Date().toISOString()}),i,e));return i.emit("notifications.archive_all_read.pending",{args:{tags:r},data:o}),yield e.archiveAllRead({tags:r}),i.emit("notifications.archive_all_read.resolved",{args:{tags:r},data:o}),{}}catch(n){return i.emit("notifications.archive_all_read.resolved",{args:{tags:r},error:n}),{error:new F("Failed to archive all read notifications",n)}}});var Xr=(i,e)=>i===e?!0:!i||!e||i.length!==e.length?!1:i.every((t,r)=>t===e[r]);var Al=["seen","unseen"],Rl=["read","unread"],Hi=(i,e)=>Xr(i,e)||!i&&(e==null?void 0:e.length)===0||(i==null?void 0:i.length)===0&&!e,Gi=(i,e)=>Hi(i.tags,e.tags)&&i.read===e.read&&i.archived===e.archived;var ce,Ze=class{constructor(){_(this,ce);E(this,ce,new Map)}get(e){return f(this,ce).get(e)}getValues(){return Array.from(f(this,ce).values())}entries(){return Array.from(f(this,ce).entries())}keys(){return Array.from(f(this,ce).keys())}set(e,t){f(this,ce).set(e,t)}remove(e){f(this,ce).delete(e)}clear(){f(this,ce).clear()}};ce=new WeakMap;var Qr=({tags:i,read:e,archived:t,limit:r,offset:s,after:n})=>Object.entries({tags:i,read:e,archived:t,limit:r,offset:s,after:n}).filter(([o,a])=>a!=null&&!(Array.isArray(a)&&a.length===0)).reduce((o,[a,c])=>(o[a]=c,o),{}),zi=({tags:i,read:e,archived:t,limit:r,offset:s,after:n})=>JSON.stringify(Qr({tags:i,read:e,archived:t,limit:r,offset:s,after:n})),Co=({tags:i,read:e,archived:t})=>JSON.stringify(Qr({tags:i,read:e,archived:t})),et=i=>JSON.parse(i),xo=["notification.read.pending","notification.read.resolved","notification.unread.pending","notification.unread.resolved","notification.complete_action.pending","notification.complete_action.resolved","notification.revert_action.pending","notification.revert_action.resolved","notifications.read_all.pending","notifications.read_all.resolved"],So=["notification.archive.pending","notification.unarchive.pending","notifications.archive_all.pending","notifications.archive_all_read.pending"],Ne,D,vt=class{constructor({emitter:e}){_(this,Ne);_(this,D);this.updateNotification=(e,t)=>{let r=f(this,D).get(e);if(!r)return!1;let s=r.notifications.findIndex(o=>o.id===t.id);if(s===-1)return!1;let n=[...r.notifications];return n[s]=t,f(this,D).set(e,T(C({},r),{notifications:n})),!0};this.removeNotification=(e,t)=>{let r=f(this,D).get(e);if(!r)return!1;let s=r.notifications.findIndex(o=>o.id===t.id);if(s===-1)return!1;let n=[...r.notifications];return n.splice(s,1),f(this,D).set(e,T(C({},r),{notifications:n})),!0};this.handleNotificationEvent=({remove:e}={remove:!1})=>({data:t})=>{if(!t)return;let r=Array.isArray(t)?t:[t],s=new Set;f(this,D).keys().forEach(n=>{r.forEach(o=>{let a=!1;e?a=this.removeNotification(n,o):a=this.updateNotification(n,o),a&&s.add(Co(et(n)))})}),s.forEach(n=>{let o=this.getAggregated(et(n));f(this,Ne).emit("notifications.list.updated",{data:o})})};E(this,Ne,e),xo.forEach(t=>{f(this,Ne).on(t,this.handleNotificationEvent())}),So.forEach(t=>{f(this,Ne).on(t,this.handleNotificationEvent({remove:!0}))}),E(this,D,new Ze)}getAggregated(e){return f(this,D).keys().filter(r=>{let s=et(r);return Gi(s,e)}).map(r=>f(this,D).get(r)).reduce((r,s)=>s?{hasMore:s.hasMore,filter:s.filter,notifications:[...r.notifications,...s.notifications]}:r,{hasMore:!1,filter:{},notifications:[]})}has(e){return f(this,D).get(zi(e))!==void 0}set(e,t){f(this,D).set(zi(e),t)}update(e,t){this.set(e,t);let r=this.getAggregated(et(zi(e)));f(this,Ne).emit("notifications.list.updated",{data:r})}getAll(e){if(this.has(e))return this.getAggregated({tags:e.tags,read:e.read,archived:e.archived})}getUniqueNotifications({tags:e,read:t}){let r=f(this,D).keys(),s=new Map;return r.forEach(n=>{let o=et(n);if(Hi(e,o.tags)){let a=f(this,D).get(n);if(!a)return;a.notifications.filter(c=>typeof t=="undefined"||t===c.isRead).forEach(c=>s.set(c.id,c))}}),Array.from(s.values())}clear(e){f(this,D).keys().forEach(r=>{Gi(et(r),e)&&f(this,D).remove(r)})}clearAll(){f(this,D).clear()}};Ne=new WeakMap,D=new WeakMap;var _t,oi=class extends we{constructor({useCache:t,inboxServiceInstance:r,eventEmitterInstance:s}){super({eventEmitterInstance:s,inboxServiceInstance:r});_(this,_t);this.cache=new vt({emitter:s}),E(this,_t,t)}list(){return y(this,arguments,function*(s={}){var n=s,{limit:t=10}=n,r=Gr(n,["limit"]);return this.callWithSession(()=>y(this,null,function*(){let o=C({limit:t},r);try{let a="useCache"in o?o.useCache:f(this,_t),c=a?this.cache.getAll(o):void 0;if(this._emitter.emit("notifications.list.pending",{args:o,data:c}),!c){let u=yield this._inboxService.fetchNotifications(C({limit:t},r));c={hasMore:u.hasMore,filter:u.filter,notifications:u.data.map(l=>new H(l,this._emitter,this._inboxService))},a&&(this.cache.set(o,c),c=this.cache.getAll(o))}return this._emitter.emit("notifications.list.resolved",{args:o,data:c}),{data:c}}catch(a){return this._emitter.emit("notifications.list.resolved",{args:o,error:a}),{error:new F("Failed to fetch notifications",a)}}}))})}count(t){return y(this,null,function*(){return this.callWithSession(()=>y(this,null,function*(){let r=t&&"filters"in t?t.filters:[C({},t)];try{this._emitter.emit("notifications.count.pending",{args:t});let s=yield this._inboxService.count({filters:r}),n=t&&"filters"in t?{counts:s.data}:s.data[0];return this._emitter.emit("notifications.count.resolved",{args:t,data:n}),{data:n}}catch(s){return this._emitter.emit("notifications.count.resolved",{args:t,error:s}),{error:new F("Failed to count notifications",s)}}}))})}read(t){return y(this,null,function*(){return this.callWithSession(()=>y(this,null,function*(){return ii({emitter:this._emitter,apiService:this._inboxService,args:t})}))})}unread(t){return y(this,null,function*(){return this.callWithSession(()=>y(this,null,function*(){return ri({emitter:this._emitter,apiService:this._inboxService,args:t})}))})}archive(t){return y(this,null,function*(){return this.callWithSession(()=>y(this,null,function*(){return si({emitter:this._emitter,apiService:this._inboxService,args:t})}))})}unarchive(t){return y(this,null,function*(){return this.callWithSession(()=>y(this,null,function*(){return ni({emitter:this._emitter,apiService:this._inboxService,args:t})}))})}completePrimary(t){return y(this,null,function*(){return this.callWithSession(()=>y(this,null,function*(){return Je({emitter:this._emitter,apiService:this._inboxService,args:t,actionType:"primary"})}))})}completeSecondary(t){return y(this,null,function*(){return this.callWithSession(()=>y(this,null,function*(){return Je({emitter:this._emitter,apiService:this._inboxService,args:t,actionType:"secondary"})}))})}revertPrimary(t){return y(this,null,function*(){return this.callWithSession(()=>y(this,null,function*(){return Xe({emitter:this._emitter,apiService:this._inboxService,args:t,actionType:"primary"})}))})}revertSecondary(t){return y(this,null,function*(){return this.callWithSession(()=>y(this,null,function*(){return Xe({emitter:this._emitter,apiService:this._inboxService,args:t,actionType:"secondary"})}))})}readAll(){return y(this,arguments,function*({tags:t}={}){return this.callWithSession(()=>y(this,null,function*(){return Kr({emitter:this._emitter,inboxService:this._inboxService,notificationsCache:this.cache,tags:t})}))})}archiveAll(){return y(this,arguments,function*({tags:t}={}){return this.callWithSession(()=>y(this,null,function*(){return Yr({emitter:this._emitter,inboxService:this._inboxService,notificationsCache:this.cache,tags:t})}))})}archiveAllRead(){return y(this,arguments,function*({tags:t}={}){return this.callWithSession(()=>y(this,null,function*(){return Jr({emitter:this._emitter,inboxService:this._inboxService,notificationsCache:this.cache,tags:t})}))})}clearCache({filter:t}={}){return t?this.cache.clear(t!=null?t:{}):this.cache.clearAll()}};_t=new WeakMap;var Be,Et,Ae,ai=class{constructor(e,t,r){_(this,Be);_(this,Et);_(this,Ae);E(this,Be,r),E(this,Et,t),E(this,Ae,e)}initialize(){return y(this,null,function*(){try{let{applicationIdentifier:e,subscriberId:t,subscriberHash:r}=f(this,Ae);f(this,Be).emit("session.initialize.pending",{args:f(this,Ae)});let s=yield f(this,Et).initializeSession({applicationIdentifier:e,subscriberId:t,subscriberHash:r});f(this,Be).emit("session.initialize.resolved",{args:f(this,Ae),data:s})}catch(e){f(this,Be).emit("session.initialize.resolved",{args:f(this,Ae),error:e})}})}};Be=new WeakMap,Et=new WeakMap,Ae=new WeakMap;var Zr=n=>y(void 0,[n],function*({emitter:i,apiService:e,cache:t,useCache:r,args:s}){let{workflowId:o,channelPreferences:a}=s;try{i.emit("preference.update.pending",{args:s,data:s.preference?new Re(T(C({},s.preference),{channels:C(C({},s.preference.channels),a)}),{emitterInstance:i,inboxServiceInstance:e,cache:t,useCache:r}):void 0});let c;o?c=yield e.updateWorkflowPreferences({workflowId:o,channelPreferences:a}):(wo({emitter:i,apiService:e,cache:t,useCache:r,args:s}),c=yield e.updateGlobalPreferences(a));let u=new Re(c,{emitterInstance:i,inboxServiceInstance:e,cache:t,useCache:r});return i.emit("preference.update.resolved",{args:s,data:u}),{data:u}}catch(c){return i.emit("preference.update.resolved",{args:s,error:c}),{error:new F("Failed to fetch notifications",c)}}}),wo=({emitter:i,apiService:e,cache:t,useCache:r,args:s})=>{let n=r?t==null?void 0:t.getAll({}):void 0;n==null||n.forEach(o=>{var a;if(o.level==="template"){let c=T(C({},o),{channels:Object.entries(o.channels).reduce((l,[h,d])=>{var S;let b=h;return l[b]=(S=s.channelPreferences[b])!=null?S:d,l},{})}),u=s.preference?new Re(c,{emitterInstance:i,inboxServiceInstance:e,cache:t,useCache:r}):void 0;u&&i.emit("preference.update.pending",{args:{workflowId:(a=o.workflow)==null?void 0:a.id,channelPreferences:u.channels},data:u})}})};var bt,Ct,xt,St,Re=class{constructor(e,{emitterInstance:t,inboxServiceInstance:r,cache:s,useCache:n}){_(this,bt);_(this,Ct);_(this,xt);_(this,St);E(this,bt,t),E(this,Ct,r),E(this,xt,s),E(this,St,n),this.level=e.level,this.enabled=e.enabled,this.channels=e.channels,this.workflow=e.workflow}update({channelPreferences:e}){var t;return Zr({emitter:f(this,bt),apiService:f(this,Ct),cache:f(this,xt),useCache:f(this,St),args:{workflowId:(t=this.workflow)==null?void 0:t.id,channelPreferences:e,preference:{level:this.level,enabled:this.enabled,channels:this.channels,workflow:this.workflow}}})}};bt=new WeakMap,Ct=new WeakMap,xt=new WeakMap,St=new WeakMap;var No=["preference.update.pending","preference.update.resolved"],Ao=({tags:i})=>Object.entries({tags:i}).reduce((e,[t,r])=>(r==null||Array.isArray(r)&&r.length===0||(e[t]=r),e),{}),Ki=({tags:i})=>JSON.stringify(Ao({tags:i})),tt,ne,ci=class{constructor({emitterInstance:e}){_(this,tt);_(this,ne);this.updatePreference=(e,t)=>{let r=f(this,ne).get(e);if(!r)return!1;let s=r.findIndex(o=>{var a,c;return((a=o.workflow)==null?void 0:a.id)===((c=t.workflow)==null?void 0:c.id)||o.level===t.level&&t.level==="global"});if(s===-1)return!1;let n=[...r];return n[s]=t,f(this,ne).set(e,n),!0};this.handlePreferenceEvent=({data:e})=>{e&&f(this,ne).keys().forEach(t=>{let r=this.updatePreference(t,e),s=f(this,ne).get(t);!r||!s||f(this,tt).emit("preferences.list.updated",{data:s})})};E(this,tt,e),No.forEach(t=>{f(this,tt).on(t,this.handlePreferenceEvent)}),E(this,ne,new Ze)}has(e){return f(this,ne).get(Ki(e))!==void 0}set(e,t){f(this,ne).set(Ki(e),t)}getAll(e){if(this.has(e))return f(this,ne).get(Ki(e))}clearAll(){f(this,ne).clear()}};tt=new WeakMap,ne=new WeakMap;var Ue,li=class extends we{constructor({useCache:t,inboxServiceInstance:r,eventEmitterInstance:s}){super({eventEmitterInstance:s,inboxServiceInstance:r});_(this,Ue);this.cache=new ci({emitterInstance:this._emitter}),E(this,Ue,t)}list(){return y(this,arguments,function*(t={}){return this.callWithSession(()=>y(this,null,function*(){try{let r=f(this,Ue)?this.cache.getAll(t):void 0;return this._emitter.emit("preferences.list.pending",{args:t,data:r}),r||(r=(yield this._inboxService.fetchPreferences(t.tags)).map(n=>new Re(n,{emitterInstance:this._emitter,inboxServiceInstance:this._inboxService,cache:this.cache,useCache:f(this,Ue)})),f(this,Ue)&&(this.cache.set(t,r),r=this.cache.getAll(t))),this._emitter.emit("preferences.list.resolved",{args:t,data:r}),{data:r}}catch(r){throw this._emitter.emit("preferences.list.resolved",{args:t,error:r}),r}}))})}};Ue=new WeakMap;var le=Object.create(null);le.open="0";le.close="1";le.ping="2";le.pong="3";le.message="4";le.upgrade="5";le.noop="6";var wt=Object.create(null);Object.keys(le).forEach(i=>{wt[le[i]]=i});var Nt={type:"error",data:"parser error"};var At=({type:i,data:e},t,r)=>e instanceof ArrayBuffer||ArrayBuffer.isView(e)?r(t?e:"b"+es(e,!0).toString("base64")):r(le[i]+(e||"")),es=(i,e)=>Buffer.isBuffer(i)||i instanceof Uint8Array&&!e?i:i instanceof ArrayBuffer?Buffer.from(i):Buffer.from(i.buffer,i.byteOffset,i.byteLength),Yi;function ts(i,e){if(i.data instanceof ArrayBuffer||ArrayBuffer.isView(i.data))return e(es(i.data,!1));At(i,!0,t=>{Yi||(Yi=new TextEncoder),e(Yi.encode(t))})}var Rt=(i,e)=>{if(typeof i!="string")return{type:"message",data:is(i,e)};let t=i.charAt(0);if(t==="b"){let r=Buffer.from(i.substring(1),"base64");return{type:"message",data:is(r,e)}}return wt[t]?i.length>1?{type:wt[t],data:i.substring(1)}:{type:wt[t]}:Nt},is=(i,e)=>{switch(e){case"arraybuffer":return i instanceof ArrayBuffer?i:Buffer.isBuffer(i)?i.buffer.slice(i.byteOffset,i.byteOffset+i.byteLength):i.buffer;case"nodebuffer":default:return Buffer.isBuffer(i)?i:Buffer.from(i)}};var rs="",ss=(i,e)=>{let t=i.length,r=new Array(t),s=0;i.forEach((n,o)=>{At(n,!1,a=>{r[o]=a,++s===t&&e(r.join(rs))})})},ns=(i,e)=>{let t=i.split(rs),r=[];for(let s=0;s<t.length;s++){let n=Rt(t[s],e);if(r.push(n),n.type==="error")break}return r};function os(){return new TransformStream({transform(i,e){ts(i,t=>{let r=t.length,s;if(r<126)s=new Uint8Array(1),new DataView(s.buffer).setUint8(0,r);else if(r<65536){s=new Uint8Array(3);let n=new DataView(s.buffer);n.setUint8(0,126),n.setUint16(1,r)}else{s=new Uint8Array(9);let n=new DataView(s.buffer);n.setUint8(0,127),n.setBigUint64(1,BigInt(r))}i.data&&typeof i.data!="string"&&(s[0]|=128),e.enqueue(s),e.enqueue(t)})}})}var Ji;function fi(i){return i.reduce((e,t)=>e+t.length,0)}function hi(i,e){if(i[0].length===e)return i.shift();let t=new Uint8Array(e),r=0;for(let s=0;s<e;s++)t[s]=i[0][r++],r===i[0].length&&(i.shift(),r=0);return i.length&&r<i[0].length&&(i[0]=i[0].slice(r)),t}function as(i,e){Ji||(Ji=new TextDecoder);let t=[],r=0,s=-1,n=!1;return new TransformStream({transform(o,a){for(t.push(o);;){if(r===0){if(fi(t)<1)break;let c=hi(t,1);n=(c[0]&128)===128,s=c[0]&127,s<126?r=3:s===126?r=1:r=2}else if(r===1){if(fi(t)<2)break;let c=hi(t,2);s=new DataView(c.buffer,c.byteOffset,c.length).getUint16(0),r=3}else if(r===2){if(fi(t)<8)break;let c=hi(t,8),u=new DataView(c.buffer,c.byteOffset,c.length),l=u.getUint32(0);if(l>Math.pow(2,21)-1){a.enqueue(Nt);break}s=l*Math.pow(2,32)+u.getUint32(4),r=3}else{if(fi(t)<s)break;let c=hi(t,s);a.enqueue(Rt(n?c:Ji.decode(c),e)),r=0}if(s===0||s>i){a.enqueue(Nt);break}}}})}var Xi=4;function O(i){if(i)return Ro(i)}function Ro(i){for(var e in O.prototype)i[e]=O.prototype[e];return i}O.prototype.on=O.prototype.addEventListener=function(i,e){return this._callbacks=this._callbacks||{},(this._callbacks["$"+i]=this._callbacks["$"+i]||[]).push(e),this};O.prototype.once=function(i,e){function t(){this.off(i,t),e.apply(this,arguments)}return t.fn=e,this.on(i,t),this};O.prototype.off=O.prototype.removeListener=O.prototype.removeAllListeners=O.prototype.removeEventListener=function(i,e){if(this._callbacks=this._callbacks||{},arguments.length==0)return this._callbacks={},this;var t=this._callbacks["$"+i];if(!t)return this;if(arguments.length==1)return delete this._callbacks["$"+i],this;for(var r,s=0;s<t.length;s++)if(r=t[s],r===e||r.fn===e){t.splice(s,1);break}return t.length===0&&delete this._callbacks["$"+i],this};O.prototype.emit=function(i){this._callbacks=this._callbacks||{};for(var e=new Array(arguments.length-1),t=this._callbacks["$"+i],r=1;r<arguments.length;r++)e[r-1]=arguments[r];if(t){t=t.slice(0);for(var r=0,s=t.length;r<s;++r)t[r].apply(this,e)}return this};O.prototype.emitReserved=O.prototype.emit;O.prototype.listeners=function(i){return this._callbacks=this._callbacks||{},this._callbacks["$"+i]||[]};O.prototype.hasListeners=function(i){return!!this.listeners(i).length};var fe=global;function ui(i,...e){return e.reduce((t,r)=>(i.hasOwnProperty(r)&&(t[r]=i[r]),t),{})}var ko=fe.setTimeout,Oo=fe.clearTimeout;function ve(i,e){e.useNativeTimers?(i.setTimeoutFn=ko.bind(fe),i.clearTimeoutFn=Oo.bind(fe)):(i.setTimeoutFn=fe.setTimeout.bind(fe),i.clearTimeoutFn=fe.clearTimeout.bind(fe))}var To=1.33;function cs(i){return typeof i=="string"?Io(i):Math.ceil((i.byteLength||i.size)*To)}function Io(i){let e=0,t=0;for(let r=0,s=i.length;r<s;r++)e=i.charCodeAt(r),e<128?t+=1:e<2048?t+=2:e<55296||e>=57344?t+=3:(r++,t+=4);return t}var Es=K(Me(),1);function vs(i){let e="";for(let t in i)i.hasOwnProperty(t)&&(e.length&&(e+="&"),e+=encodeURIComponent(t)+"="+encodeURIComponent(i[t]));return e}function _s(i){let e={},t=i.split("&");for(let r=0,s=t.length;r<s;r++){let n=t[r].split("=");e[decodeURIComponent(n[0])]=decodeURIComponent(n[1])}return e}var ra=(0,Es.default)("engine.io-client:transport"),rr=class extends Error{constructor(e,t,r){super(e),this.description=t,this.context=r,this.type="TransportError"}},_e=class extends O{constructor(e){super(),this.writable=!1,ve(this,e),this.opts=e,this.query=e.query,this.socket=e.socket}onError(e,t,r){return super.emitReserved("error",new rr(e,t,r)),this}open(){return this.readyState="opening",this.doOpen(),this}close(){return(this.readyState==="opening"||this.readyState==="open")&&(this.doClose(),this.onClose()),this}send(e){this.readyState==="open"?this.write(e):ra("transport is not open, discarding packets")}onOpen(){this.readyState="open",this.writable=!0,super.emitReserved("open")}onData(e){let t=Rt(e,this.socket.binaryType);this.onPacket(t)}onPacket(e){super.emitReserved("packet",e)}onClose(e){this.readyState="closed",super.emitReserved("close",e)}pause(e){}createUri(e,t={}){return e+"://"+this._hostname()+this._port()+this.opts.path+this._query(t)}_hostname(){let e=this.opts.hostname;return e.indexOf(":")===-1?e:"["+e+"]"}_port(){return this.opts.port&&(this.opts.secure&&+(this.opts.port!==443)||!this.opts.secure&&Number(this.opts.port)!==80)?":"+this.opts.port:""}_query(e){let t=vs(e);return t.length?"?"+t:""}};var Os=K(Me(),1);var Ss="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-_".split(""),sr=64,sa={},bs=0,vi=0,Cs;function xs(i){let e="";do e=Ss[i%sr]+e,i=Math.floor(i/sr);while(i>0);return e}function _i(){let i=xs(+new Date);return i!==Cs?(bs=0,Cs=i):i+"."+xs(bs++)}for(;vi<sr;vi++)sa[Ss[vi]]=vi;var ar=K(As(),1),cr=ar.default||ar;function Rs(){return new or}function oa(i){let e=i.split("; "),t=e[0].indexOf("=");if(t===-1)return;let r=e[0].substring(0,t).trim();if(!r.length)return;let s=e[0].substring(t+1).trim();s.charCodeAt(0)===34&&(s=s.slice(1,-1));let n={name:r,value:s};for(let o=1;o<e.length;o++){let a=e[o].split("=");if(a.length!==2)continue;let c=a[0].trim(),u=a[1].trim();switch(c){case"Expires":n.expires=new Date(u);break;case"Max-Age":let l=new Date;l.setUTCSeconds(l.getUTCSeconds()+parseInt(u,10)),n.expires=l;break;default:}}return n}var or=class{constructor(){this.cookies=new Map}parseCookies(e){let t=e.getResponseHeader("set-cookie");t&&t.forEach(r=>{let s=oa(r);s&&this.cookies.set(s.name,s)})}addCookies(e){let t=[];this.cookies.forEach((r,s)=>{var n;((n=r.expires)===null||n===void 0?void 0:n.getTime())<Date.now()?this.cookies.delete(s):t.push(`${s}=${r.value}`)}),t.length&&(e.setDisableHeaderCheck(!0),e.setRequestHeader("cookie",t.join("; ")))}};var X=(0,Os.default)("engine.io-client:polling");function aa(){}var ca=function(){return new cr({xdomain:!1}).responseType!=null}(),Ei=class extends _e{constructor(e){if(super(e),this.polling=!1,typeof location!="undefined"){let r=location.protocol==="https:",s=location.port;s||(s=r?"443":"80"),this.xd=typeof location!="undefined"&&e.hostname!==location.hostname||s!==e.port}let t=e&&e.forceBase64;this.supportsBinary=ca&&!t,this.opts.withCredentials&&(this.cookieJar=Rs())}get name(){return"polling"}doOpen(){this.poll()}pause(e){this.readyState="pausing";let t=()=>{X("paused"),this.readyState="paused",e()};if(this.polling||!this.writable){let r=0;this.polling&&(X("we are currently polling - waiting to pause"),r++,this.once("pollComplete",function(){X("pre-pause polling complete"),--r||t()})),this.writable||(X("we are currently writing - waiting to pause"),r++,this.once("drain",function(){X("pre-pause writing complete"),--r||t()}))}else t()}poll(){X("polling"),this.polling=!0,this.doPoll(),this.emitReserved("poll")}onData(e){X("polling got data %s",e);let t=r=>{if(this.readyState==="opening"&&r.type==="open"&&this.onOpen(),r.type==="close")return this.onClose({description:"transport closed by the server"}),!1;this.onPacket(r)};ns(e,this.socket.binaryType).forEach(t),this.readyState!=="closed"&&(this.polling=!1,this.emitReserved("pollComplete"),this.readyState==="open"?this.poll():X('ignoring poll - transport state "%s"',this.readyState))}doClose(){let e=()=>{X("writing close packet"),this.write([{type:"close"}])};this.readyState==="open"?(X("transport open - closing"),e()):(X("transport not open - deferring close"),this.once("open",e))}write(e){this.writable=!1,ss(e,t=>{this.doWrite(t,()=>{this.writable=!0,this.emitReserved("drain")})})}uri(){let e=this.opts.secure?"https":"http",t=this.query||{};return this.opts.timestampRequests!==!1&&(t[this.opts.timestampParam]=_i()),!this.supportsBinary&&!t.sid&&(t.b64=1),this.createUri(e,t)}request(e={}){return Object.assign(e,{xd:this.xd,cookieJar:this.cookieJar},this.opts),new ke(this.uri(),e)}doWrite(e,t){let r=this.request({method:"POST",data:e});r.on("success",t),r.on("error",(s,n)=>{this.onError("xhr post error",s,n)})}doPoll(){X("xhr poll");let e=this.request();e.on("data",this.onData.bind(this)),e.on("error",(t,r)=>{this.onError("xhr poll error",t,r)}),this.pollXhr=e}},ke=class i extends O{constructor(e,t){super(),ve(this,t),this.opts=t,this.method=t.method||"GET",this.uri=e,this.data=t.data!==void 0?t.data:null,this.create()}create(){var e;let t=ui(this.opts,"agent","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","autoUnref");t.xdomain=!!this.opts.xd;let r=this.xhr=new cr(t);try{X("xhr open %s: %s",this.method,this.uri),r.open(this.method,this.uri,!0);try{if(this.opts.extraHeaders){r.setDisableHeaderCheck&&r.setDisableHeaderCheck(!0);for(let s in this.opts.extraHeaders)this.opts.extraHeaders.hasOwnProperty(s)&&r.setRequestHeader(s,this.opts.extraHeaders[s])}}catch(s){}if(this.method==="POST")try{r.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch(s){}try{r.setRequestHeader("Accept","*/*")}catch(s){}(e=this.opts.cookieJar)===null||e===void 0||e.addCookies(r),"withCredentials"in r&&(r.withCredentials=this.opts.withCredentials),this.opts.requestTimeout&&(r.timeout=this.opts.requestTimeout),r.onreadystatechange=()=>{var s;r.readyState===3&&((s=this.opts.cookieJar)===null||s===void 0||s.parseCookies(r)),r.readyState===4&&(r.status===200||r.status===1223?this.onLoad():this.setTimeoutFn(()=>{this.onError(typeof r.status=="number"?r.status:0)},0))},X("xhr data %s",this.data),r.send(this.data)}catch(s){this.setTimeoutFn(()=>{this.onError(s)},0);return}typeof document!="undefined"&&(this.index=i.requestsCount++,i.requests[this.index]=this)}onError(e){this.emitReserved("error",e,this.xhr),this.cleanup(!0)}cleanup(e){if(!(typeof this.xhr=="undefined"||this.xhr===null)){if(this.xhr.onreadystatechange=aa,e)try{this.xhr.abort()}catch(t){}typeof document!="undefined"&&delete i.requests[this.index],this.xhr=null}}onLoad(){let e=this.xhr.responseText;e!==null&&(this.emitReserved("data",e),this.emitReserved("success"),this.cleanup())}abort(){this.cleanup()}};ke.requestsCount=0;ke.requests={};if(typeof document!="undefined"){if(typeof attachEvent=="function")attachEvent("onunload",ks);else if(typeof addEventListener=="function"){let i="onpagehide"in fe?"pagehide":"unload";addEventListener(i,ks,!1)}}function ks(){for(let i in ke.requests)ke.requests.hasOwnProperty(i)&&ke.requests[i].abort()}var vc=K(Ls(),1),_c=K(yr(),1),Ec=K(_r(),1),Pn=K(Nr(),1),bc=K(In(),1);var Ln=Pn.default;var qt=Ln,Oi=!1,Fn="nodebuffer",Ve=process.nextTick;var Un=K(Me(),1);var Cc=(0,Un.default)("engine.io-client:websocket"),Bn=typeof navigator!="undefined"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative",Ti=class extends _e{constructor(e){super(e),this.supportsBinary=!e.forceBase64}get name(){return"websocket"}doOpen(){if(!this.check())return;let e=this.uri(),t=this.opts.protocols,r=Bn?{}:ui(this.opts,"agent","perMessageDeflate","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","localAddress","protocolVersion","origin","maxPayload","family","checkServerIdentity");this.opts.extraHeaders&&(r.headers=this.opts.extraHeaders);try{this.ws=Oi&&!Bn?t?new qt(e,t):new qt(e):new qt(e,t,r)}catch(s){return this.emitReserved("error",s)}this.ws.binaryType=this.socket.binaryType,this.addEventListeners()}addEventListeners(){this.ws.onopen=()=>{this.opts.autoUnref&&this.ws._socket.unref(),this.onOpen()},this.ws.onclose=e=>this.onClose({description:"websocket connection closed",context:e}),this.ws.onmessage=e=>this.onData(e.data),this.ws.onerror=e=>this.onError("websocket error",e)}write(e){this.writable=!1;for(let t=0;t<e.length;t++){let r=e[t],s=t===e.length-1;At(r,this.supportsBinary,n=>{let o={};Oi||(r.options&&(o.compress=r.options.compress),this.opts.perMessageDeflate&&(typeof n=="string"?Buffer.byteLength(n):n.length)<this.opts.perMessageDeflate.threshold&&(o.compress=!1));try{Oi?this.ws.send(n):this.ws.send(n,o)}catch(a){Cc("websocket closed before onclose event")}s&&Ve(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){typeof this.ws!="undefined"&&(this.ws.close(),this.ws=null)}uri(){let e=this.opts.secure?"wss":"ws",t=this.query||{};return this.opts.timestampRequests&&(t[this.opts.timestampParam]=_i()),this.supportsBinary||(t.b64=1),this.createUri(e,t)}check(){return!!qt}};var Dn=K(Me(),1),$t=(0,Dn.default)("engine.io-client:webtransport"),Ii=class extends _e{get name(){return"webtransport"}doOpen(){typeof WebTransport=="function"&&(this.transport=new WebTransport(this.createUri("https"),this.opts.transportOptions[this.name]),this.transport.closed.then(()=>{$t("transport closed gracefully"),this.onClose()}).catch(e=>{$t("transport closed due to %s",e),this.onError("webtransport error",e)}),this.transport.ready.then(()=>{this.transport.createBidirectionalStream().then(e=>{let t=as(Number.MAX_SAFE_INTEGER,this.socket.binaryType),r=e.readable.pipeThrough(t).getReader(),s=os();s.readable.pipeTo(e.writable),this.writer=s.writable.getWriter();let n=()=>{r.read().then(({done:a,value:c})=>{if(a){$t("session is closed");return}$t("received chunk: %o",c),this.onPacket(c),n()}).catch(a=>{$t("an error occurred while reading: %s",a)})};n();let o={type:"open"};this.query.sid&&(o.data=`{"sid":"${this.query.sid}"}`),this.writer.write(o).then(()=>this.onOpen())})}))}write(e){this.writable=!1;for(let t=0;t<e.length;t++){let r=e[t],s=t===e.length-1;this.writer.write(r).then(()=>{s&&Ve(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){var e;(e=this.transport)===null||e===void 0||e.close()}};var Rr={websocket:Ti,webtransport:Ii,polling:Ei};var xc=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,Sc=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function lt(i){let e=i,t=i.indexOf("["),r=i.indexOf("]");t!=-1&&r!=-1&&(i=i.substring(0,t)+i.substring(t,r).replace(/:/g,";")+i.substring(r,i.length));let s=xc.exec(i||""),n={},o=14;for(;o--;)n[Sc[o]]=s[o]||"";return t!=-1&&r!=-1&&(n.source=e,n.host=n.host.substring(1,n.host.length-1).replace(/;/g,":"),n.authority=n.authority.replace("[","").replace("]","").replace(/;/g,":"),n.ipv6uri=!0),n.pathNames=wc(n,n.path),n.queryKey=Nc(n,n.query),n}function wc(i,e){let t=/\/{2,9}/g,r=e.replace(t,"/").split("/");return(e.slice(0,1)=="/"||e.length===0)&&r.splice(0,1),e.slice(-1)=="/"&&r.splice(r.length-1,1),r}function Nc(i,e){let t={};return e.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(r,s,n){s&&(t[s]=n)}),t}var Mn=K(Me(),1);var I=(0,Mn.default)("engine.io-client:socket"),je=class i extends O{constructor(e,t={}){super(),this.binaryType=Fn,this.writeBuffer=[],e&&typeof e=="object"&&(t=e,e=null),e?(e=lt(e),t.hostname=e.host,t.secure=e.protocol==="https"||e.protocol==="wss",t.port=e.port,e.query&&(t.query=e.query)):t.host&&(t.hostname=lt(t.host).host),ve(this,t),this.secure=t.secure!=null?t.secure:typeof location!="undefined"&&location.protocol==="https:",t.hostname&&!t.port&&(t.port=this.secure?"443":"80"),this.hostname=t.hostname||(typeof location!="undefined"?location.hostname:"localhost"),this.port=t.port||(typeof location!="undefined"&&location.port?location.port:this.secure?"443":"80"),this.transports=t.transports||["polling","websocket","webtransport"],this.writeBuffer=[],this.prevBufferLen=0,this.opts=Object.assign({path:"/engine.io",agent:!1,withCredentials:!1,upgrade:!0,timestampParam:"t",rememberUpgrade:!1,addTrailingSlash:!0,rejectUnauthorized:!0,perMessageDeflate:{threshold:1024},transportOptions:{},closeOnBeforeunload:!1},t),this.opts.path=this.opts.path.replace(/\/$/,"")+(this.opts.addTrailingSlash?"/":""),typeof this.opts.query=="string"&&(this.opts.query=_s(this.opts.query)),this.id=null,this.upgrades=null,this.pingInterval=null,this.pingTimeout=null,this.pingTimeoutTimer=null,typeof addEventListener=="function"&&(this.opts.closeOnBeforeunload&&(this.beforeunloadEventListener=()=>{this.transport&&(this.transport.removeAllListeners(),this.transport.close())},addEventListener("beforeunload",this.beforeunloadEventListener,!1)),this.hostname!=="localhost"&&(this.offlineEventListener=()=>{this.onClose("transport close",{description:"network connection lost"})},addEventListener("offline",this.offlineEventListener,!1))),this.open()}createTransport(e){I('creating transport "%s"',e);let t=Object.assign({},this.opts.query);t.EIO=Xi,t.transport=e,this.id&&(t.sid=this.id);let r=Object.assign({},this.opts,{query:t,socket:this,hostname:this.hostname,secure:this.secure,port:this.port},this.opts.transportOptions[e]);return I("options: %j",r),new Rr[e](r)}open(){let e;if(this.opts.rememberUpgrade&&i.priorWebsocketSuccess&&this.transports.indexOf("websocket")!==-1)e="websocket";else if(this.transports.length===0){this.setTimeoutFn(()=>{this.emitReserved("error","No transports available")},0);return}else e=this.transports[0];this.readyState="opening";try{e=this.createTransport(e)}catch(t){I("error while creating transport: %s",t),this.transports.shift(),this.open();return}e.open(),this.setTransport(e)}setTransport(e){I("setting transport %s",e.name),this.transport&&(I("clearing existing transport %s",this.transport.name),this.transport.removeAllListeners()),this.transport=e,e.on("drain",this.onDrain.bind(this)).on("packet",this.onPacket.bind(this)).on("error",this.onError.bind(this)).on("close",t=>this.onClose("transport close",t))}probe(e){I('probing transport "%s"',e);let t=this.createTransport(e),r=!1;i.priorWebsocketSuccess=!1;let s=()=>{r||(I('probe transport "%s" opened',e),t.send([{type:"ping",data:"probe"}]),t.once("packet",h=>{if(!r)if(h.type==="pong"&&h.data==="probe"){if(I('probe transport "%s" pong',e),this.upgrading=!0,this.emitReserved("upgrading",t),!t)return;i.priorWebsocketSuccess=t.name==="websocket",I('pausing current transport "%s"',this.transport.name),this.transport.pause(()=>{r||this.readyState!=="closed"&&(I("changing transport and sending upgrade packet"),l(),this.setTransport(t),t.send([{type:"upgrade"}]),this.emitReserved("upgrade",t),t=null,this.upgrading=!1,this.flush())})}else{I('probe transport "%s" failed',e);let d=new Error("probe error");d.transport=t.name,this.emitReserved("upgradeError",d)}}))};function n(){r||(r=!0,l(),t.close(),t=null)}let o=h=>{let d=new Error("probe error: "+h);d.transport=t.name,n(),I('probe transport "%s" failed because of error: %s',e,h),this.emitReserved("upgradeError",d)};function a(){o("transport closed")}function c(){o("socket closed")}function u(h){t&&h.name!==t.name&&(I('"%s" works - aborting "%s"',h.name,t.name),n())}let l=()=>{t.removeListener("open",s),t.removeListener("error",o),t.removeListener("close",a),this.off("close",c),this.off("upgrading",u)};t.once("open",s),t.once("error",o),t.once("close",a),this.once("close",c),this.once("upgrading",u),this.upgrades.indexOf("webtransport")!==-1&&e!=="webtransport"?this.setTimeoutFn(()=>{r||t.open()},200):t.open()}onOpen(){if(I("socket open"),this.readyState="open",i.priorWebsocketSuccess=this.transport.name==="websocket",this.emitReserved("open"),this.flush(),this.readyState==="open"&&this.opts.upgrade){I("starting upgrade probes");let e=0,t=this.upgrades.length;for(;e<t;e++)this.probe(this.upgrades[e])}}onPacket(e){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing")switch(I('socket receive: type "%s", data "%s"',e.type,e.data),this.emitReserved("packet",e),this.emitReserved("heartbeat"),this.resetPingTimeout(),e.type){case"open":this.onHandshake(JSON.parse(e.data));break;case"ping":this.sendPacket("pong"),this.emitReserved("ping"),this.emitReserved("pong");break;case"error":let t=new Error("server error");t.code=e.data,this.onError(t);break;case"message":this.emitReserved("data",e.data),this.emitReserved("message",e.data);break}else I('packet received with socket readyState "%s"',this.readyState)}onHandshake(e){this.emitReserved("handshake",e),this.id=e.sid,this.transport.query.sid=e.sid,this.upgrades=this.filterUpgrades(e.upgrades),this.pingInterval=e.pingInterval,this.pingTimeout=e.pingTimeout,this.maxPayload=e.maxPayload,this.onOpen(),this.readyState!=="closed"&&this.resetPingTimeout()}resetPingTimeout(){this.clearTimeoutFn(this.pingTimeoutTimer),this.pingTimeoutTimer=this.setTimeoutFn(()=>{this.onClose("ping timeout")},this.pingInterval+this.pingTimeout),this.opts.autoUnref&&this.pingTimeoutTimer.unref()}onDrain(){this.writeBuffer.splice(0,this.prevBufferLen),this.prevBufferLen=0,this.writeBuffer.length===0?this.emitReserved("drain"):this.flush()}flush(){if(this.readyState!=="closed"&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length){let e=this.getWritablePackets();I("flushing %d packets in socket",e.length),this.transport.send(e),this.prevBufferLen=e.length,this.emitReserved("flush")}}getWritablePackets(){if(!(this.maxPayload&&this.transport.name==="polling"&&this.writeBuffer.length>1))return this.writeBuffer;let t=1;for(let r=0;r<this.writeBuffer.length;r++){let s=this.writeBuffer[r].data;if(s&&(t+=cs(s)),r>0&&t>this.maxPayload)return I("only send %d out of %d packets",r,this.writeBuffer.length),this.writeBuffer.slice(0,r);t+=2}return I("payload size is %d (max: %d)",t,this.maxPayload),this.writeBuffer}write(e,t,r){return this.sendPacket("message",e,t,r),this}send(e,t,r){return this.sendPacket("message",e,t,r),this}sendPacket(e,t,r,s){if(typeof t=="function"&&(s=t,t=void 0),typeof r=="function"&&(s=r,r=null),this.readyState==="closing"||this.readyState==="closed")return;r=r||{},r.compress=r.compress!==!1;let n={type:e,data:t,options:r};this.emitReserved("packetCreate",n),this.writeBuffer.push(n),s&&this.once("flush",s),this.flush()}close(){let e=()=>{this.onClose("forced close"),I("socket closing - telling transport to close"),this.transport.close()},t=()=>{this.off("upgrade",t),this.off("upgradeError",t),e()},r=()=>{this.once("upgrade",t),this.once("upgradeError",t)};return(this.readyState==="opening"||this.readyState==="open")&&(this.readyState="closing",this.writeBuffer.length?this.once("drain",()=>{this.upgrading?r():e()}):this.upgrading?r():e()),this}onError(e){I("socket error %j",e),i.priorWebsocketSuccess=!1,this.emitReserved("error",e),this.onClose("transport error",e)}onClose(e,t){(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing")&&(I('socket close with reason: "%s"',e),this.clearTimeoutFn(this.pingTimeoutTimer),this.transport.removeAllListeners("close"),this.transport.close(),this.transport.removeAllListeners(),typeof removeEventListener=="function"&&(removeEventListener("beforeunload",this.beforeunloadEventListener,!1),removeEventListener("offline",this.offlineEventListener,!1)),this.readyState="closed",this.id=null,this.emitReserved("close",e,t),this.writeBuffer=[],this.prevBufferLen=0)}filterUpgrades(e){let t=[],r=0,s=e.length;for(;r<s;r++)~this.transports.indexOf(e[r])&&t.push(e[r]);return t}};je.protocol=Xi;var $h=je.protocol;var Kn=K(Wt(),1),zn=(0,Kn.default)("socket.io-client:url");function Yn(i,e="",t){let r=i;t=t||typeof location!="undefined"&&location,i==null&&(i=t.protocol+"//"+t.host),typeof i=="string"&&(i.charAt(0)==="/"&&(i.charAt(1)==="/"?i=t.protocol+i:i=t.host+i),/^(https?|wss?):\/\//.test(i)||(zn("protocol-less url %s",i),typeof t!="undefined"?i=t.protocol+"//"+i:i="https://"+i),zn("parse %s",i),r=lt(i)),r.port||(/^(http|ws)$/.test(r.protocol)?r.port="80":/^(http|ws)s$/.test(r.protocol)&&(r.port="443")),r.path=r.path||"/";let n=r.host.indexOf(":")!==-1?"["+r.host+"]":r.host;return r.id=r.protocol+"://"+n+":"+r.port+e,r.href=r.protocol+"://"+n+(t&&t.port===r.port?"":":"+r.port),r}var Mr={};Eo(Mr,{Decoder:()=>Ur,Encoder:()=>Br,PacketType:()=>x,protocol:()=>to});var jc=typeof ArrayBuffer=="function",Hc=i=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(i):i.buffer instanceof ArrayBuffer,Jn=Object.prototype.toString,Gc=typeof Blob=="function"||typeof Blob!="undefined"&&Jn.call(Blob)==="[object BlobConstructor]",zc=typeof File=="function"||typeof File!="undefined"&&Jn.call(File)==="[object FileConstructor]";function jt(i){return jc&&(i instanceof ArrayBuffer||Hc(i))||Gc&&i instanceof Blob||zc&&i instanceof File}function Vt(i,e){if(!i||typeof i!="object")return!1;if(Array.isArray(i)){for(let t=0,r=i.length;t<r;t++)if(Vt(i[t]))return!0;return!1}if(jt(i))return!0;if(i.toJSON&&typeof i.toJSON=="function"&&arguments.length===1)return Vt(i.toJSON(),!0);for(let t in i)if(Object.prototype.hasOwnProperty.call(i,t)&&Vt(i[t]))return!0;return!1}function Xn(i){let e=[],t=i.data,r=i;return r.data=Pr(t,e),r.attachments=e.length,{packet:r,buffers:e}}function Pr(i,e){if(!i)return i;if(jt(i)){let t={_placeholder:!0,num:e.length};return e.push(i),t}else if(Array.isArray(i)){let t=new Array(i.length);for(let r=0;r<i.length;r++)t[r]=Pr(i[r],e);return t}else if(typeof i=="object"&&!(i instanceof Date)){let t={};for(let r in i)Object.prototype.hasOwnProperty.call(i,r)&&(t[r]=Pr(i[r],e));return t}return i}function Qn(i,e){return i.data=Lr(i.data,e),delete i.attachments,i}function Lr(i,e){if(!i)return i;if(i&&i._placeholder===!0){if(typeof i.num=="number"&&i.num>=0&&i.num<e.length)return e[i.num];throw new Error("illegal attachments")}else if(Array.isArray(i))for(let t=0;t<i.length;t++)i[t]=Lr(i[t],e);else if(typeof i=="object")for(let t in i)Object.prototype.hasOwnProperty.call(i,t)&&(i[t]=Lr(i[t],e));return i}var eo=K(Me(),1),Fr=(0,eo.default)("socket.io-parser"),Kc=["connect","connect_error","disconnect","disconnecting","newListener","removeListener"],to=5,x;(function(i){i[i.CONNECT=0]="CONNECT",i[i.DISCONNECT=1]="DISCONNECT",i[i.EVENT=2]="EVENT",i[i.ACK=3]="ACK",i[i.CONNECT_ERROR=4]="CONNECT_ERROR",i[i.BINARY_EVENT=5]="BINARY_EVENT",i[i.BINARY_ACK=6]="BINARY_ACK"})(x||(x={}));var Br=class{constructor(e){this.replacer=e}encode(e){return Fr("encoding packet %j",e),(e.type===x.EVENT||e.type===x.ACK)&&Vt(e)?this.encodeAsBinary({type:e.type===x.EVENT?x.BINARY_EVENT:x.BINARY_ACK,nsp:e.nsp,data:e.data,id:e.id}):[this.encodeAsString(e)]}encodeAsString(e){let t=""+e.type;return(e.type===x.BINARY_EVENT||e.type===x.BINARY_ACK)&&(t+=e.attachments+"-"),e.nsp&&e.nsp!=="/"&&(t+=e.nsp+","),e.id!=null&&(t+=e.id),e.data!=null&&(t+=JSON.stringify(e.data,this.replacer)),Fr("encoded %j as %s",e,t),t}encodeAsBinary(e){let t=Xn(e),r=this.encodeAsString(t.packet),s=t.buffers;return s.unshift(r),s}};function Zn(i){return Object.prototype.toString.call(i)==="[object Object]"}var Ur=class i extends O{constructor(e){super(),this.reviver=e}add(e){let t;if(typeof e=="string"){if(this.reconstructor)throw new Error("got plaintext data when reconstructing a packet");t=this.decodeString(e);let r=t.type===x.BINARY_EVENT;r||t.type===x.BINARY_ACK?(t.type=r?x.EVENT:x.ACK,this.reconstructor=new Dr(t),t.attachments===0&&super.emitReserved("decoded",t)):super.emitReserved("decoded",t)}else if(jt(e)||e.base64)if(this.reconstructor)t=this.reconstructor.takeBinaryData(e),t&&(this.reconstructor=null,super.emitReserved("decoded",t));else throw new Error("got binary data when not reconstructing a packet");else throw new Error("Unknown type: "+e)}decodeString(e){let t=0,r={type:Number(e.charAt(0))};if(x[r.type]===void 0)throw new Error("unknown packet type "+r.type);if(r.type===x.BINARY_EVENT||r.type===x.BINARY_ACK){let n=t+1;for(;e.charAt(++t)!=="-"&&t!=e.length;);let o=e.substring(n,t);if(o!=Number(o)||e.charAt(t)!=="-")throw new Error("Illegal attachments");r.attachments=Number(o)}if(e.charAt(t+1)==="/"){let n=t+1;for(;++t&&!(e.charAt(t)===","||t===e.length););r.nsp=e.substring(n,t)}else r.nsp="/";let s=e.charAt(t+1);if(s!==""&&Number(s)==s){let n=t+1;for(;++t;){let o=e.charAt(t);if(o==null||Number(o)!=o){--t;break}if(t===e.length)break}r.id=Number(e.substring(n,t+1))}if(e.charAt(++t)){let n=this.tryParse(e.substr(t));if(i.isPayloadValid(r.type,n))r.data=n;else throw new Error("invalid payload")}return Fr("decoded %s as %j",e,r),r}tryParse(e){try{return JSON.parse(e,this.reviver)}catch(t){return!1}}static isPayloadValid(e,t){switch(e){case x.CONNECT:return Zn(t);case x.DISCONNECT:return t===void 0;case x.CONNECT_ERROR:return typeof t=="string"||Zn(t);case x.EVENT:case x.BINARY_EVENT:return Array.isArray(t)&&(typeof t[0]=="number"||typeof t[0]=="string"&&Kc.indexOf(t[0])===-1);case x.ACK:case x.BINARY_ACK:return Array.isArray(t)}}destroy(){this.reconstructor&&(this.reconstructor.finishedReconstruction(),this.reconstructor=null)}},Dr=class{constructor(e){this.packet=e,this.buffers=[],this.reconPack=e}takeBinaryData(e){if(this.buffers.push(e),this.buffers.length===this.reconPack.attachments){let t=Qn(this.reconPack,this.buffers);return this.finishedReconstruction(),t}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}};function te(i,e,t){return i.on(e,t),function(){i.off(e,t)}}var io=K(Wt(),1),U=(0,io.default)("socket.io-client:socket"),Yc=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1}),ft=class extends O{constructor(e,t,r){super(),this.connected=!1,this.recovered=!1,this.receiveBuffer=[],this.sendBuffer=[],this._queue=[],this._queueSeq=0,this.ids=0,this.acks={},this.flags={},this.io=e,this.nsp=t,r&&r.auth&&(this.auth=r.auth),this._opts=Object.assign({},r),this.io._autoConnect&&this.open()}get disconnected(){return!this.connected}subEvents(){if(this.subs)return;let e=this.io;this.subs=[te(e,"open",this.onopen.bind(this)),te(e,"packet",this.onpacket.bind(this)),te(e,"error",this.onerror.bind(this)),te(e,"close",this.onclose.bind(this))]}get active(){return!!this.subs}connect(){return this.connected?this:(this.subEvents(),this.io._reconnecting||this.io.open(),this.io._readyState==="open"&&this.onopen(),this)}open(){return this.connect()}send(...e){return e.unshift("message"),this.emit.apply(this,e),this}emit(e,...t){if(Yc.hasOwnProperty(e))throw new Error('"'+e.toString()+'" is a reserved event name');if(t.unshift(e),this._opts.retries&&!this.flags.fromQueue&&!this.flags.volatile)return this._addToQueue(t),this;let r={type:x.EVENT,data:t};if(r.options={},r.options.compress=this.flags.compress!==!1,typeof t[t.length-1]=="function"){let o=this.ids++;U("emitting packet with ack id %d",o);let a=t.pop();this._registerAckCallback(o,a),r.id=o}let s=this.io.engine&&this.io.engine.transport&&this.io.engine.transport.writable;return this.flags.volatile&&(!s||!this.connected)?U("discard packet as the transport is not currently writable"):this.connected?(this.notifyOutgoingListeners(r),this.packet(r)):this.sendBuffer.push(r),this.flags={},this}_registerAckCallback(e,t){var r;let s=(r=this.flags.timeout)!==null&&r!==void 0?r:this._opts.ackTimeout;if(s===void 0){this.acks[e]=t;return}let n=this.io.setTimeoutFn(()=>{delete this.acks[e];for(let o=0;o<this.sendBuffer.length;o++)this.sendBuffer[o].id===e&&(U("removing packet with ack id %d from the buffer",e),this.sendBuffer.splice(o,1));U("event with ack id %d has timed out after %d ms",e,s),t.call(this,new Error("operation has timed out"))},s);this.acks[e]=(...o)=>{this.io.clearTimeoutFn(n),t.apply(this,[null,...o])}}emitWithAck(e,...t){let r=this.flags.timeout!==void 0||this._opts.ackTimeout!==void 0;return new Promise((s,n)=>{t.push((o,a)=>r?o?n(o):s(a):s(o)),this.emit(e,...t)})}_addToQueue(e){let t;typeof e[e.length-1]=="function"&&(t=e.pop());let r={id:this._queueSeq++,tryCount:0,pending:!1,args:e,flags:Object.assign({fromQueue:!0},this.flags)};e.push((s,...n)=>r!==this._queue[0]?void 0:(s!==null?r.tryCount>this._opts.retries&&(U("packet [%d] is discarded after %d tries",r.id,r.tryCount),this._queue.shift(),t&&t(s)):(U("packet [%d] was successfully sent",r.id),this._queue.shift(),t&&t(null,...n)),r.pending=!1,this._drainQueue())),this._queue.push(r),this._drainQueue()}_drainQueue(e=!1){if(U("draining queue"),!this.connected||this._queue.length===0)return;let t=this._queue[0];if(t.pending&&!e){U("packet [%d] has already been sent and is waiting for an ack",t.id);return}t.pending=!0,t.tryCount++,U("sending packet [%d] (try n\xB0%d)",t.id,t.tryCount),this.flags=t.flags,this.emit.apply(this,t.args)}packet(e){e.nsp=this.nsp,this.io._packet(e)}onopen(){U("transport is open - connecting"),typeof this.auth=="function"?this.auth(e=>{this._sendConnectPacket(e)}):this._sendConnectPacket(this.auth)}_sendConnectPacket(e){this.packet({type:x.CONNECT,data:this._pid?Object.assign({pid:this._pid,offset:this._lastOffset},e):e})}onerror(e){this.connected||this.emitReserved("connect_error",e)}onclose(e,t){U("close (%s)",e),this.connected=!1,delete this.id,this.emitReserved("disconnect",e,t)}onpacket(e){if(e.nsp===this.nsp)switch(e.type){case x.CONNECT:e.data&&e.data.sid?this.onconnect(e.data.sid,e.data.pid):this.emitReserved("connect_error",new Error("It seems you are trying to reach a Socket.IO server in v2.x with a v3.x client, but they are not compatible (more information here: https://socket.io/docs/v3/migrating-from-2-x-to-3-0/)"));break;case x.EVENT:case x.BINARY_EVENT:this.onevent(e);break;case x.ACK:case x.BINARY_ACK:this.onack(e);break;case x.DISCONNECT:this.ondisconnect();break;case x.CONNECT_ERROR:this.destroy();let r=new Error(e.data.message);r.data=e.data.data,this.emitReserved("connect_error",r);break}}onevent(e){let t=e.data||[];U("emitting event %j",t),e.id!=null&&(U("attaching ack callback to event"),t.push(this.ack(e.id))),this.connected?this.emitEvent(t):this.receiveBuffer.push(Object.freeze(t))}emitEvent(e){if(this._anyListeners&&this._anyListeners.length){let t=this._anyListeners.slice();for(let r of t)r.apply(this,e)}super.emit.apply(this,e),this._pid&&e.length&&typeof e[e.length-1]=="string"&&(this._lastOffset=e[e.length-1])}ack(e){let t=this,r=!1;return function(...s){r||(r=!0,U("sending ack %j",s),t.packet({type:x.ACK,id:e,data:s}))}}onack(e){let t=this.acks[e.id];typeof t=="function"?(U("calling ack %s with %j",e.id,e.data),t.apply(this,e.data),delete this.acks[e.id]):U("bad ack %s",e.id)}onconnect(e,t){U("socket connected with id %s",e),this.id=e,this.recovered=t&&this._pid===t,this._pid=t,this.connected=!0,this.emitBuffered(),this.emitReserved("connect"),this._drainQueue(!0)}emitBuffered(){this.receiveBuffer.forEach(e=>this.emitEvent(e)),this.receiveBuffer=[],this.sendBuffer.forEach(e=>{this.notifyOutgoingListeners(e),this.packet(e)}),this.sendBuffer=[]}ondisconnect(){U("server disconnect (%s)",this.nsp),this.destroy(),this.onclose("io server disconnect")}destroy(){this.subs&&(this.subs.forEach(e=>e()),this.subs=void 0),this.io._destroy(this)}disconnect(){return this.connected&&(U("performing disconnect (%s)",this.nsp),this.packet({type:x.DISCONNECT})),this.destroy(),this.connected&&this.onclose("io client disconnect"),this}close(){return this.disconnect()}compress(e){return this.flags.compress=e,this}get volatile(){return this.flags.volatile=!0,this}timeout(e){return this.flags.timeout=e,this}onAny(e){return this._anyListeners=this._anyListeners||[],this._anyListeners.push(e),this}prependAny(e){return this._anyListeners=this._anyListeners||[],this._anyListeners.unshift(e),this}offAny(e){if(!this._anyListeners)return this;if(e){let t=this._anyListeners;for(let r=0;r<t.length;r++)if(e===t[r])return t.splice(r,1),this}else this._anyListeners=[];return this}listenersAny(){return this._anyListeners||[]}onAnyOutgoing(e){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.push(e),this}prependAnyOutgoing(e){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.unshift(e),this}offAnyOutgoing(e){if(!this._anyOutgoingListeners)return this;if(e){let t=this._anyOutgoingListeners;for(let r=0;r<t.length;r++)if(e===t[r])return t.splice(r,1),this}else this._anyOutgoingListeners=[];return this}listenersAnyOutgoing(){return this._anyOutgoingListeners||[]}notifyOutgoingListeners(e){if(this._anyOutgoingListeners&&this._anyOutgoingListeners.length){let t=this._anyOutgoingListeners.slice();for(let r of t)r.apply(this,e.data)}}};function He(i){i=i||{},this.ms=i.min||100,this.max=i.max||1e4,this.factor=i.factor||2,this.jitter=i.jitter>0&&i.jitter<=1?i.jitter:0,this.attempts=0}He.prototype.duration=function(){var i=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var e=Math.random(),t=Math.floor(e*this.jitter*i);i=Math.floor(e*10)&1?i+t:i-t}return Math.min(i,this.max)|0};He.prototype.reset=function(){this.attempts=0};He.prototype.setMin=function(i){this.ms=i};He.prototype.setMax=function(i){this.max=i};He.prototype.setJitter=function(i){this.jitter=i};var ro=K(Wt(),1),G=(0,ro.default)("socket.io-client:manager"),ht=class extends O{constructor(e,t){var r;super(),this.nsps={},this.subs=[],e&&typeof e=="object"&&(t=e,e=void 0),t=t||{},t.path=t.path||"/socket.io",this.opts=t,ve(this,t),this.reconnection(t.reconnection!==!1),this.reconnectionAttempts(t.reconnectionAttempts||1/0),this.reconnectionDelay(t.reconnectionDelay||1e3),this.reconnectionDelayMax(t.reconnectionDelayMax||5e3),this.randomizationFactor((r=t.randomizationFactor)!==null&&r!==void 0?r:.5),this.backoff=new He({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(t.timeout==null?2e4:t.timeout),this._readyState="closed",this.uri=e;let s=t.parser||Mr;this.encoder=new s.Encoder,this.decoder=new s.Decoder,this._autoConnect=t.autoConnect!==!1,this._autoConnect&&this.open()}reconnection(e){return arguments.length?(this._reconnection=!!e,this):this._reconnection}reconnectionAttempts(e){return e===void 0?this._reconnectionAttempts:(this._reconnectionAttempts=e,this)}reconnectionDelay(e){var t;return e===void 0?this._reconnectionDelay:(this._reconnectionDelay=e,(t=this.backoff)===null||t===void 0||t.setMin(e),this)}randomizationFactor(e){var t;return e===void 0?this._randomizationFactor:(this._randomizationFactor=e,(t=this.backoff)===null||t===void 0||t.setJitter(e),this)}reconnectionDelayMax(e){var t;return e===void 0?this._reconnectionDelayMax:(this._reconnectionDelayMax=e,(t=this.backoff)===null||t===void 0||t.setMax(e),this)}timeout(e){return arguments.length?(this._timeout=e,this):this._timeout}maybeReconnectOnOpen(){!this._reconnecting&&this._reconnection&&this.backoff.attempts===0&&this.reconnect()}open(e){if(G("readyState %s",this._readyState),~this._readyState.indexOf("open"))return this;G("opening %s",this.uri),this.engine=new je(this.uri,this.opts);let t=this.engine,r=this;this._readyState="opening",this.skipReconnect=!1;let s=te(t,"open",function(){r.onopen(),e&&e()}),n=a=>{G("error"),this.cleanup(),this._readyState="closed",this.emitReserved("error",a),e?e(a):this.maybeReconnectOnOpen()},o=te(t,"error",n);if(this._timeout!==!1){let a=this._timeout;G("connect attempt will timeout after %d",a);let c=this.setTimeoutFn(()=>{G("connect attempt timed out after %d",a),s(),n(new Error("timeout")),t.close()},a);this.opts.autoUnref&&c.unref(),this.subs.push(()=>{this.clearTimeoutFn(c)})}return this.subs.push(s),this.subs.push(o),this}connect(e){return this.open(e)}onopen(){G("open"),this.cleanup(),this._readyState="open",this.emitReserved("open");let e=this.engine;this.subs.push(te(e,"ping",this.onping.bind(this)),te(e,"data",this.ondata.bind(this)),te(e,"error",this.onerror.bind(this)),te(e,"close",this.onclose.bind(this)),te(this.decoder,"decoded",this.ondecoded.bind(this)))}onping(){this.emitReserved("ping")}ondata(e){try{this.decoder.add(e)}catch(t){this.onclose("parse error",t)}}ondecoded(e){Ve(()=>{this.emitReserved("packet",e)},this.setTimeoutFn)}onerror(e){G("error",e),this.emitReserved("error",e)}socket(e,t){let r=this.nsps[e];return r?this._autoConnect&&!r.active&&r.connect():(r=new ft(this,e,t),this.nsps[e]=r),r}_destroy(e){let t=Object.keys(this.nsps);for(let r of t)if(this.nsps[r].active){G("socket %s is still active, skipping close",r);return}this._close()}_packet(e){G("writing packet %j",e);let t=this.encoder.encode(e);for(let r=0;r<t.length;r++)this.engine.write(t[r],e.options)}cleanup(){G("cleanup"),this.subs.forEach(e=>e()),this.subs.length=0,this.decoder.destroy()}_close(){G("disconnect"),this.skipReconnect=!0,this._reconnecting=!1,this.onclose("forced close"),this.engine&&this.engine.close()}disconnect(){return this._close()}onclose(e,t){G("closed due to %s",e),this.cleanup(),this.backoff.reset(),this._readyState="closed",this.emitReserved("close",e,t),this._reconnection&&!this.skipReconnect&&this.reconnect()}reconnect(){if(this._reconnecting||this.skipReconnect)return this;let e=this;if(this.backoff.attempts>=this._reconnectionAttempts)G("reconnect failed"),this.backoff.reset(),this.emitReserved("reconnect_failed"),this._reconnecting=!1;else{let t=this.backoff.duration();G("will wait %dms before reconnect attempt",t),this._reconnecting=!0;let r=this.setTimeoutFn(()=>{e.skipReconnect||(G("attempting reconnect"),this.emitReserved("reconnect_attempt",e.backoff.attempts),!e.skipReconnect&&e.open(s=>{s?(G("reconnect attempt error"),e._reconnecting=!1,e.reconnect(),this.emitReserved("reconnect_error",s)):(G("reconnect success"),e.onreconnect())}))},t);this.opts.autoUnref&&r.unref(),this.subs.push(()=>{this.clearTimeoutFn(r)})}}onreconnect(){let e=this.backoff.attempts;this._reconnecting=!1,this.backoff.reset(),this.emitReserved("reconnect",e)}};var no=K(Wt(),1),so=(0,no.default)("socket.io-client"),Ht={};function Gt(i,e){typeof i=="object"&&(e=i,i=void 0),e=e||{};let t=Yn(i,e.path||"/socket.io"),r=t.source,s=t.id,n=t.path,o=Ht[s]&&n in Ht[s].nsps,a=e.forceNew||e["force new connection"]||e.multiplex===!1||o,c;return a?(so("ignoring socket cache for %s",r),c=new ht(r,e)):(Ht[s]||(so("new io instance for %s",r),Ht[s]=new ht(r,e)),c=Ht[s]),t.query&&!e.query&&(e.query=t.queryKey),c.socket(t.path,e)}Object.assign(Gt,{Manager:ht,Socket:ft,io:Gt,connect:Gt});var Jc="https://ws.novu.co",oo="notifications.notification_received",ao="notifications.unseen_count_changed",co="notifications.unread_count_changed",Xc=({_id:i,content:e,read:t,archived:r,createdAt:s,lastReadDate:n,archivedAt:o,channel:a,subscriber:c,subject:u,avatar:l,cta:h,tags:d,data:b})=>{var m,g,V,R,j,z,pe,Jt,Xt,ie;let S={id:(m=c==null?void 0:c._id)!=null?m:"",firstName:c==null?void 0:c.firstName,lastName:c==null?void 0:c.lastName,avatar:c==null?void 0:c.avatar,subscriberId:(g=c==null?void 0:c.subscriberId)!=null?g:""},p=(R=(V=h.action)==null?void 0:V.buttons)==null?void 0:R.find(ze=>ze.type==="primary"),v=(z=(j=h.action)==null?void 0:j.buttons)==null?void 0:z.find(ze=>ze.type==="secondary"),N=(Jt=(pe=h.action)==null?void 0:pe.result)==null?void 0:Jt.type,A=(Xt=h.action)==null?void 0:Xt.status;return{id:i,subject:u,body:e,to:S,isRead:t,isArchived:r,createdAt:s,readAt:n,archivedAt:o,avatar:l,primaryAction:p&&{label:p.content,isCompleted:N==="primary"&&A==="done",redirect:p.url?{target:p.target,url:p.url}:void 0},secondaryAction:v&&{label:v.content,isCompleted:N==="secondary"&&A==="done",redirect:v.url?{target:v.target,url:v.url}:void 0},channelType:a,tags:d,redirect:(ie=h.data)!=null&&ie.url?{url:h.data.url,target:h.data.target}:void 0,data:b}},ut,ue,ge,dt,Ui,Di,Mi,zt,qr,Bi=class extends we{constructor({socketUrl:t,inboxServiceInstance:r,eventEmitterInstance:s}){super({eventEmitterInstance:s,inboxServiceInstance:r});_(this,zt);_(this,ut);_(this,ue);_(this,ge);_(this,dt);_(this,Ui,({message:t})=>{f(this,ue).emit(oo,{result:new H(Xc(t),f(this,ue),this._inboxService)})});_(this,Di,({unseenCount:t})=>{f(this,ue).emit(ao,{result:t})});_(this,Mi,({unreadCount:t})=>{f(this,ue).emit(co,{result:t})});E(this,ue,s),E(this,dt,t!=null?t:Jc)}onSessionSuccess({token:t}){E(this,ut,t)}isSocketEvent(t){return t===oo||t===ao||t===co}initialize(){if(f(this,ut)){ji(this,zt,qr).call(this).catch(t=>{console.error(t)});return}this.callWithSession(()=>y(this,null,function*(){return ji(this,zt,qr).call(this).catch(t=>{console.error(t)}),{}}))}};ut=new WeakMap,ue=new WeakMap,ge=new WeakMap,dt=new WeakMap,Ui=new WeakMap,Di=new WeakMap,Mi=new WeakMap,zt=new WeakSet,qr=function(){return y(this,null,function*(){var r,s,n;if(f(this,ge))return;let t={socketUrl:f(this,dt)};f(this,ue).emit("socket.connect.pending",{args:t}),E(this,ge,Gt(f(this,dt),{reconnectionDelayMax:1e4,transports:["websocket"],query:{token:`${f(this,ut)}`}})),f(this,ge).on("connect",()=>{f(this,ue).emit("socket.connect.resolved",{args:t})}),f(this,ge).on("connect_error",o=>{f(this,ue).emit("socket.connect.resolved",{args:t,error:o})}),(r=f(this,ge))==null||r.on("notification_received",f(this,Ui)),(s=f(this,ge))==null||s.on("unseen_count_changed",f(this,Di)),(n=f(this,ge))==null||n.on("unread_count_changed",f(this,Mi))})};var lo="https://api.novu.co";var Ge=function(i,e,t,r){function s(n){return n instanceof t?n:new t(function(o){o(n)})}return new(t||(t=Promise))(function(n,o){function a(l){try{u(r.next(l))}catch(h){o(h)}}function c(l){try{u(r.throw(l))}catch(h){o(h)}}function u(l){l.done?n(l.value):s(l.value).then(a,c)}u((r=r.apply(i,e||[])).next())})},Qc="v1",Zc="https://api.novu.co",el="@novu/client",tl="2.0.0-canary.0",il=`${el}-${tl}`,pt=class{constructor({apiVersion:e=Qc,backendUrl:t=Zc,userAgent:r=il}={}){this.apiVersion=e,this.backendUrl=`${t}/${this.apiVersion}`,this.headers={"Content-Type":"application/json","User-Agent":r}}setAuthorizationToken(e){this.headers.Authorization=`Bearer ${e}`}disposeAuthorizationToken(){delete this.headers.Authorization}updateHeaders(e){this.headers=Object.assign(Object.assign({},this.headers),e)}getFullResponse(e,t){return Ge(this,void 0,void 0,function*(){return yield(yield this.doFetch(e+this.getQueryString(t))).json()})}get(e,t){return Ge(this,void 0,void 0,function*(){return(yield(yield this.doFetch(e+this.getQueryString(t))).json()).data})}post(e){return Ge(this,arguments,void 0,function*(t,r={}){let s=yield this.doFetch(t,{method:"POST",body:JSON.stringify(r)});return this.checkEmptyResponse(s)?void 0:(yield s.json()).data})}patch(e){return Ge(this,arguments,void 0,function*(t,r={}){let s=yield this.doFetch(t,{method:"PATCH",body:JSON.stringify(r)});return this.checkEmptyResponse(s)?void 0:(yield s.json()).data})}delete(e){return Ge(this,arguments,void 0,function*(t,r={}){let s=yield this.doFetch(t,{method:"DELETE",body:JSON.stringify(r)});return this.checkEmptyResponse(s)?void 0:(yield s.json()).data})}getQueryString(e){return e?`?${new URLSearchParams(e).toString()}`:""}doFetch(e){return Ge(this,arguments,void 0,function*(t,r={}){let s=yield fetch(this.backendUrl+t,Object.assign(Object.assign({},r),{headers:this.headers}));return yield this.checkResponseStatus(s),s})}checkResponseStatus(e){return Ge(this,void 0,void 0,function*(){if(!e.ok){let t=yield e.json();throw new Error(`HTTP error! Status: ${e.status}, Message: ${t.message}`)}})}checkEmptyResponse(e){return e.status===204}};var rl="2024-06-26",Kt="/inbox",de=`${Kt}/notifications`,L,qi=class{constructor(e={}){this.isSessionInitialized=!1;_(this,L);E(this,L,new pt(e)),f(this,L).updateHeaders({"Novu-API-Version":rl,"Novu-User-Agent":e.userAgent||"@novu/js"})}initializeSession(s){return y(this,arguments,function*({applicationIdentifier:e,subscriberId:t,subscriberHash:r}){let n=yield f(this,L).post(`${Kt}/session`,{applicationIdentifier:e,subscriberId:t,subscriberHash:r});return f(this,L).setAuthorizationToken(n.token),this.isSessionInitialized=!0,n})}fetchNotifications({after:e,archived:t,limit:r=10,offset:s,read:n,tags:o}){let a=new URLSearchParams(`limit=${r}`);return e&&a.append("after",e),s&&a.append("offset",`${s}`),o&&o.forEach(c=>a.append("tags[]",c)),n!==void 0&&a.append("read",`${n}`),t!==void 0&&a.append("archived",`${t}`),f(this,L).getFullResponse(`${de}?${a.toString()}`)}count({filters:e}){return f(this,L).getFullResponse(`${de}/count?filters=${JSON.stringify(e)}`)}read(e){return f(this,L).patch(`${de}/${e}/read`)}unread(e){return f(this,L).patch(`${de}/${e}/unread`)}archive(e){return f(this,L).patch(`${de}/${e}/archive`)}unarchive(e){return f(this,L).patch(`${de}/${e}/unarchive`)}readAll({tags:e}){return f(this,L).post(`${de}/read`,{tags:e})}archiveAll({tags:e}){return f(this,L).post(`${de}/archive`,{tags:e})}archiveAllRead({tags:e}){return f(this,L).post(`${de}/read-archive`,{tags:e})}completeAction({actionType:e,notificationId:t}){return f(this,L).patch(`${de}/${t}/complete`,{actionType:e})}revertAction({actionType:e,notificationId:t}){return f(this,L).patch(`${de}/${t}/revert`,{actionType:e})}fetchPreferences(e){let t=new URLSearchParams;e&&e.forEach(s=>t.append("tags[]",s));let r=t.size?`?${t.toString()}`:"";return f(this,L).get(`${Kt}/preferences${r}`)}updateGlobalPreferences(e){return f(this,L).patch(`${Kt}/preferences`,e)}updateWorkflowPreferences({workflowId:e,channelPreferences:t}){return f(this,L).patch(`${Kt}/preferences/${e}`,t)}};L=new WeakMap;var sl="2.6.3",nl="@novu/js",ol=`${nl}@${sl}`,ye,Yt,mt,Le,$i=class{constructor(e){_(this,ye);_(this,Yt);_(this,mt);_(this,Le);var t,r,s,n;E(this,Le,new qi({backendUrl:(t=e.backendUrl)!=null?t:lo,userAgent:(r=e.__userAgent)!=null?r:ol})),E(this,ye,new ti),E(this,Yt,new ai({applicationIdentifier:e.applicationIdentifier,subscriberId:e.subscriberId,subscriberHash:e.subscriberHash},f(this,Le),f(this,ye))),f(this,Yt).initialize(),this.notifications=new oi({useCache:(s=e.useCache)!=null?s:!0,inboxServiceInstance:f(this,Le),eventEmitterInstance:f(this,ye)}),this.preferences=new li({useCache:(n=e.useCache)!=null?n:!0,inboxServiceInstance:f(this,Le),eventEmitterInstance:f(this,ye)}),E(this,mt,new Bi({socketUrl:e.socketUrl,eventEmitterInstance:f(this,ye),inboxServiceInstance:f(this,Le)})),this.on=(o,a)=>{f(this,mt).isSocketEvent(o)&&f(this,mt).initialize();let c=f(this,ye).on(o,a);return()=>{c()}},this.off=(o,a)=>{f(this,ye).off(o,a)}}};ye=new WeakMap,Yt=new WeakMap,mt=new WeakMap,Le=new WeakMap;window.Novu=$i;})();
|
|
17
17
|
/*! Bundled license information:
|
|
18
18
|
|
|
19
19
|
xmlhttprequest-ssl/lib/XMLHttpRequest.js:
|
package/dist/novu.min.js.gz
CHANGED
|
Binary file
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@novu/js",
|
|
3
|
-
"version": "2.6.
|
|
3
|
+
"version": "2.6.3",
|
|
4
4
|
"repository": "https://github.com/novuhq/novu",
|
|
5
5
|
"description": "Novu's JavaScript SDK for building custom inbox notification experiences",
|
|
6
6
|
"author": "",
|
|
@@ -65,19 +65,6 @@
|
|
|
65
65
|
"publishConfig": {
|
|
66
66
|
"access": "public"
|
|
67
67
|
},
|
|
68
|
-
"scripts": {
|
|
69
|
-
"clean": "rimraf ./dist",
|
|
70
|
-
"start:server": "http-server ./dist -p 4010",
|
|
71
|
-
"build": "pnpm run clean && NODE_ENV=production tsup",
|
|
72
|
-
"postbuild": "./scripts/copy-package-json.sh && node scripts/size-limit.mjs && pnpm run check-exports",
|
|
73
|
-
"build:umd": "webpack --config webpack.config.cjs",
|
|
74
|
-
"build:watch": "concurrently \"pnpm run tsup:watch\" \"pnpm run start:server\"",
|
|
75
|
-
"tsup:watch": "tsup --watch",
|
|
76
|
-
"check-exports": "attw --pack .",
|
|
77
|
-
"lint": "eslint src",
|
|
78
|
-
"lint:fix": "pnpm lint -- --fix",
|
|
79
|
-
"test": "jest"
|
|
80
|
-
},
|
|
81
68
|
"browserslist": {
|
|
82
69
|
"production": [
|
|
83
70
|
">0.2%",
|
|
@@ -126,7 +113,6 @@
|
|
|
126
113
|
},
|
|
127
114
|
"dependencies": {
|
|
128
115
|
"@floating-ui/dom": "^1.6.7",
|
|
129
|
-
"@novu/client": "^2.0.0",
|
|
130
116
|
"class-variance-authority": "^0.7.0",
|
|
131
117
|
"clsx": "^2.1.1",
|
|
132
118
|
"mitt": "^3.0.1",
|
|
@@ -134,9 +120,25 @@
|
|
|
134
120
|
"solid-floating-ui": "^0.3.1",
|
|
135
121
|
"solid-js": "^1.8.11",
|
|
136
122
|
"solid-motionone": "^1.0.1",
|
|
137
|
-
"tailwind-merge": "^2.4.0"
|
|
123
|
+
"tailwind-merge": "^2.4.0",
|
|
124
|
+
"@novu/client": "2.0.3"
|
|
138
125
|
},
|
|
139
126
|
"nx": {
|
|
140
|
-
"tags": [
|
|
127
|
+
"tags": [
|
|
128
|
+
"package:public"
|
|
129
|
+
]
|
|
130
|
+
},
|
|
131
|
+
"scripts": {
|
|
132
|
+
"clean": "rimraf ./dist",
|
|
133
|
+
"start:server": "http-server ./dist -p 4010",
|
|
134
|
+
"build": "pnpm run clean && NODE_ENV=production tsup",
|
|
135
|
+
"postbuild": "./scripts/copy-package-json.sh && node scripts/size-limit.mjs && pnpm run check-exports",
|
|
136
|
+
"build:umd": "webpack --config webpack.config.cjs",
|
|
137
|
+
"build:watch": "concurrently \"pnpm run tsup:watch\" \"pnpm run start:server\"",
|
|
138
|
+
"tsup:watch": "tsup --watch",
|
|
139
|
+
"check-exports": "attw --pack .",
|
|
140
|
+
"lint": "eslint src",
|
|
141
|
+
"lint:fix": "pnpm lint -- --fix",
|
|
142
|
+
"test": "jest"
|
|
141
143
|
}
|
|
142
|
-
}
|
|
144
|
+
}
|