@mieweb/ui 0.6.1-dev.132 → 0.6.1-dev.134
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/README.md +46 -10
- package/dist/CsvBlock-7K6XVRYO.cjs +15 -0
- package/dist/CsvBlock-7K6XVRYO.cjs.map +1 -0
- package/dist/CsvBlock-AAV4QMSF.js +6 -0
- package/dist/CsvBlock-AAV4QMSF.js.map +1 -0
- package/dist/HtmlPreviewBlock-74XQF3KT.cjs +15 -0
- package/dist/HtmlPreviewBlock-74XQF3KT.cjs.map +1 -0
- package/dist/HtmlPreviewBlock-DNINC7RW.js +6 -0
- package/dist/HtmlPreviewBlock-DNINC7RW.js.map +1 -0
- package/dist/MermaidBlock-PKXGFGU6.js +6 -0
- package/dist/MermaidBlock-PKXGFGU6.js.map +1 -0
- package/dist/MermaidBlock-R4U7IHSZ.cjs +15 -0
- package/dist/MermaidBlock-R4U7IHSZ.cjs.map +1 -0
- package/dist/SurveyBlock-E52I4PW3.cjs +15 -0
- package/dist/SurveyBlock-E52I4PW3.cjs.map +1 -0
- package/dist/SurveyBlock-IULSBG22.js +6 -0
- package/dist/SurveyBlock-IULSBG22.js.map +1 -0
- package/dist/brands/index.cjs +12 -12
- package/dist/brands/index.js +3 -3
- package/dist/{chunk-2DS3RJ2D.js → chunk-33PO3J4O.js} +35 -3
- package/dist/chunk-33PO3J4O.js.map +1 -0
- package/dist/chunk-6RV7HQ4U.cjs +198 -0
- package/dist/chunk-6RV7HQ4U.cjs.map +1 -0
- package/dist/chunk-74NOFB34.cjs +137 -0
- package/dist/chunk-74NOFB34.cjs.map +1 -0
- package/dist/chunk-CPJIOOBM.js +196 -0
- package/dist/chunk-CPJIOOBM.js.map +1 -0
- package/dist/{chunk-R6PBBPU3.js → chunk-CYMZ2QS5.js} +2 -2
- package/dist/{chunk-R6PBBPU3.js.map → chunk-CYMZ2QS5.js.map} +1 -1
- package/dist/chunk-FGIIXD37.js +182 -0
- package/dist/chunk-FGIIXD37.js.map +1 -0
- package/dist/chunk-FZQAF3WA.cjs +154 -0
- package/dist/chunk-FZQAF3WA.cjs.map +1 -0
- package/dist/chunk-MHJMUKLA.js +89 -0
- package/dist/chunk-MHJMUKLA.js.map +1 -0
- package/dist/chunk-NCRYCG5G.js +135 -0
- package/dist/chunk-NCRYCG5G.js.map +1 -0
- package/dist/chunk-NSLR3B7K.js +318 -0
- package/dist/chunk-NSLR3B7K.js.map +1 -0
- package/dist/{chunk-Z6NRP4Z5.cjs → chunk-SNEQXSC5.cjs} +2 -2
- package/dist/{chunk-Z6NRP4Z5.cjs.map → chunk-SNEQXSC5.cjs.map} +1 -1
- package/dist/chunk-UL3PQ7HL.cjs +91 -0
- package/dist/chunk-UL3PQ7HL.cjs.map +1 -0
- package/dist/chunk-VO3NWSCQ.cjs +184 -0
- package/dist/chunk-VO3NWSCQ.cjs.map +1 -0
- package/dist/chunk-WGC3KOP7.js +148 -0
- package/dist/chunk-WGC3KOP7.js.map +1 -0
- package/dist/{chunk-IBZXDX4L.cjs → chunk-WHUD3XHR.cjs} +35 -3
- package/dist/chunk-WHUD3XHR.cjs.map +1 -0
- package/dist/chunk-Y65SK5Y2.cjs +338 -0
- package/dist/chunk-Y65SK5Y2.cjs.map +1 -0
- package/dist/components/Markdown/index.cjs +51 -0
- package/dist/components/Markdown/index.cjs.map +1 -0
- package/dist/components/Markdown/index.css +331 -0
- package/dist/components/Markdown/index.css.map +1 -0
- package/dist/components/Markdown/index.d.cts +82 -0
- package/dist/components/Markdown/index.d.ts +82 -0
- package/dist/components/Markdown/index.js +10 -0
- package/dist/components/Markdown/index.js.map +1 -0
- package/dist/components/Markdown/styles.css +351 -0
- package/dist/index.cjs +1244 -570
- package/dist/index.cjs.map +1 -1
- package/dist/index.css +331 -0
- package/dist/index.css.map +1 -0
- package/dist/index.d.cts +137 -1
- package/dist/index.d.ts +137 -1
- package/dist/index.js +1091 -456
- package/dist/index.js.map +1 -1
- package/dist/styles.css +1 -1
- package/dist/tailwind-preset.cjs +4 -4
- package/dist/tailwind-preset.js +1 -1
- package/package.json +23 -2
- package/dist/chunk-2DS3RJ2D.js.map +0 -1
- package/dist/chunk-IBZXDX4L.cjs.map +0 -1
package/dist/index.cjs
CHANGED
|
@@ -1,16 +1,18 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
+
var chunkDLNJLCNO_cjs = require('./chunk-DLNJLCNO.cjs');
|
|
3
4
|
var chunkZJCPW6MS_cjs = require('./chunk-ZJCPW6MS.cjs');
|
|
4
|
-
var
|
|
5
|
+
var chunkSNEQXSC5_cjs = require('./chunk-SNEQXSC5.cjs');
|
|
6
|
+
var chunkU7VQUOLS_cjs = require('./chunk-U7VQUOLS.cjs');
|
|
7
|
+
var chunkX7S76WB7_cjs = require('./chunk-X7S76WB7.cjs');
|
|
5
8
|
var chunkP52GA3GJ_cjs = require('./chunk-P52GA3GJ.cjs');
|
|
6
9
|
var chunkLCQGAOAZ_cjs = require('./chunk-LCQGAOAZ.cjs');
|
|
7
10
|
var chunkZ5J4NTPL_cjs = require('./chunk-Z5J4NTPL.cjs');
|
|
8
|
-
var chunkU7VQUOLS_cjs = require('./chunk-U7VQUOLS.cjs');
|
|
9
11
|
var chunkJ644FU54_cjs = require('./chunk-J644FU54.cjs');
|
|
10
12
|
var chunkWNJRS7Y7_cjs = require('./chunk-WNJRS7Y7.cjs');
|
|
11
13
|
var chunkUCGUA3QV_cjs = require('./chunk-UCGUA3QV.cjs');
|
|
12
14
|
var chunkRR2MJBGV_cjs = require('./chunk-RR2MJBGV.cjs');
|
|
13
|
-
var
|
|
15
|
+
var chunkGOKC4CCZ_cjs = require('./chunk-GOKC4CCZ.cjs');
|
|
14
16
|
var chunkDEZ7XSTG_cjs = require('./chunk-DEZ7XSTG.cjs');
|
|
15
17
|
var chunkNVHAQOHH_cjs = require('./chunk-NVHAQOHH.cjs');
|
|
16
18
|
var chunkTN33E2VN_cjs = require('./chunk-TN33E2VN.cjs');
|
|
@@ -19,7 +21,7 @@ var chunkPJAQDAMZ_cjs = require('./chunk-PJAQDAMZ.cjs');
|
|
|
19
21
|
var chunkU3ABLVYH_cjs = require('./chunk-U3ABLVYH.cjs');
|
|
20
22
|
var chunkJHPFOG2N_cjs = require('./chunk-JHPFOG2N.cjs');
|
|
21
23
|
var chunkRH43XBNV_cjs = require('./chunk-RH43XBNV.cjs');
|
|
22
|
-
var
|
|
24
|
+
var chunkK7IGBNZA_cjs = require('./chunk-K7IGBNZA.cjs');
|
|
23
25
|
var chunkMARLXJQO_cjs = require('./chunk-MARLXJQO.cjs');
|
|
24
26
|
var chunkQ2EWNXIB_cjs = require('./chunk-Q2EWNXIB.cjs');
|
|
25
27
|
var chunkAFKKJEV5_cjs = require('./chunk-AFKKJEV5.cjs');
|
|
@@ -27,14 +29,18 @@ var chunkFRT6RQND_cjs = require('./chunk-FRT6RQND.cjs');
|
|
|
27
29
|
var chunkOXYFTCRW_cjs = require('./chunk-OXYFTCRW.cjs');
|
|
28
30
|
var chunkKJ5BSGEO_cjs = require('./chunk-KJ5BSGEO.cjs');
|
|
29
31
|
var chunk3GGET5LK_cjs = require('./chunk-3GGET5LK.cjs');
|
|
30
|
-
var chunkGOKC4CCZ_cjs = require('./chunk-GOKC4CCZ.cjs');
|
|
31
32
|
var chunkUOOH356R_cjs = require('./chunk-UOOH356R.cjs');
|
|
33
|
+
var chunkY65SK5Y2_cjs = require('./chunk-Y65SK5Y2.cjs');
|
|
34
|
+
var chunkVO3NWSCQ_cjs = require('./chunk-VO3NWSCQ.cjs');
|
|
35
|
+
var chunk74NOFB34_cjs = require('./chunk-74NOFB34.cjs');
|
|
36
|
+
var chunkFZQAF3WA_cjs = require('./chunk-FZQAF3WA.cjs');
|
|
37
|
+
var chunk6RV7HQ4U_cjs = require('./chunk-6RV7HQ4U.cjs');
|
|
38
|
+
var chunkUL3PQ7HL_cjs = require('./chunk-UL3PQ7HL.cjs');
|
|
32
39
|
var chunkNIEIRA5A_cjs = require('./chunk-NIEIRA5A.cjs');
|
|
33
40
|
var chunk5MAGWW5X_cjs = require('./chunk-5MAGWW5X.cjs');
|
|
34
41
|
var chunkZNZZCB2M_cjs = require('./chunk-ZNZZCB2M.cjs');
|
|
35
42
|
var chunkKQAXXJ4G_cjs = require('./chunk-KQAXXJ4G.cjs');
|
|
36
43
|
var chunkXP6HELVG_cjs = require('./chunk-XP6HELVG.cjs');
|
|
37
|
-
var chunkK7IGBNZA_cjs = require('./chunk-K7IGBNZA.cjs');
|
|
38
44
|
var chunk3M4P2KMG_cjs = require('./chunk-3M4P2KMG.cjs');
|
|
39
45
|
var chunkDFCZPVG4_cjs = require('./chunk-DFCZPVG4.cjs');
|
|
40
46
|
var chunkBT3ZQJGT_cjs = require('./chunk-BT3ZQJGT.cjs');
|
|
@@ -64,10 +70,10 @@ var chunkC7RVKV25_cjs = require('./chunk-C7RVKV25.cjs');
|
|
|
64
70
|
var chunkL7YQBSEL_cjs = require('./chunk-L7YQBSEL.cjs');
|
|
65
71
|
var chunkCW75IKA6_cjs = require('./chunk-CW75IKA6.cjs');
|
|
66
72
|
var chunkSCV7C55E_cjs = require('./chunk-SCV7C55E.cjs');
|
|
67
|
-
var
|
|
73
|
+
var chunkWHUD3XHR_cjs = require('./chunk-WHUD3XHR.cjs');
|
|
68
74
|
var chunkWGPMTW36_cjs = require('./chunk-WGPMTW36.cjs');
|
|
69
75
|
var chunkOR5DRJCW_cjs = require('./chunk-OR5DRJCW.cjs');
|
|
70
|
-
var
|
|
76
|
+
var React49 = require('react');
|
|
71
77
|
var jsxRuntime = require('react/jsx-runtime');
|
|
72
78
|
var classVarianceAuthority = require('class-variance-authority');
|
|
73
79
|
var ReactDOM = require('react-dom');
|
|
@@ -91,7 +97,7 @@ function _interopNamespace(e) {
|
|
|
91
97
|
return Object.freeze(n);
|
|
92
98
|
}
|
|
93
99
|
|
|
94
|
-
var
|
|
100
|
+
var React49__namespace = /*#__PURE__*/_interopNamespace(React49);
|
|
95
101
|
var ReactDOM__namespace = /*#__PURE__*/_interopNamespace(ReactDOM);
|
|
96
102
|
|
|
97
103
|
var SEX_OPTIONS = [
|
|
@@ -129,9 +135,9 @@ function AddContactModal({
|
|
|
129
135
|
showCustomFields = true,
|
|
130
136
|
showPhone = true
|
|
131
137
|
}) {
|
|
132
|
-
const [formData, setFormData] =
|
|
133
|
-
const [errors, setErrors] =
|
|
134
|
-
|
|
138
|
+
const [formData, setFormData] = React49.useState(defaultContact);
|
|
139
|
+
const [errors, setErrors] = React49.useState({});
|
|
140
|
+
React49.useEffect(() => {
|
|
135
141
|
if (open) {
|
|
136
142
|
setFormData(contact ? { ...defaultContact, ...contact } : defaultContact);
|
|
137
143
|
setErrors({});
|
|
@@ -561,8 +567,8 @@ function AdditionalFields({
|
|
|
561
567
|
className,
|
|
562
568
|
collapsible = true
|
|
563
569
|
}) {
|
|
564
|
-
const [isExpanded, setIsExpanded] =
|
|
565
|
-
const contentId =
|
|
570
|
+
const [isExpanded, setIsExpanded] = React49__namespace.useState(defaultExpanded);
|
|
571
|
+
const contentId = React49__namespace.useId();
|
|
566
572
|
const handleNameChange = (id, name) => {
|
|
567
573
|
const updated = value.map(
|
|
568
574
|
(entry) => entry.id === id ? { ...entry, name } : entry
|
|
@@ -1000,10 +1006,10 @@ function AddressForm({
|
|
|
1000
1006
|
className,
|
|
1001
1007
|
googlePlaces
|
|
1002
1008
|
}) {
|
|
1003
|
-
const generatedId =
|
|
1009
|
+
const generatedId = React49__namespace.useId();
|
|
1004
1010
|
const idPrefix = id || generatedId;
|
|
1005
|
-
const autocompleteRef =
|
|
1006
|
-
const inputRef =
|
|
1011
|
+
const autocompleteRef = React49__namespace.useRef(null);
|
|
1012
|
+
const inputRef = React49__namespace.useRef(null);
|
|
1007
1013
|
const mergedLabels = { ...DEFAULT_LABELS, ...labels };
|
|
1008
1014
|
const mergedPlaceholders = { ...DEFAULT_PLACEHOLDERS, ...placeholders };
|
|
1009
1015
|
const handleChange = (field, fieldValue) => {
|
|
@@ -1012,7 +1018,7 @@ function AddressForm({
|
|
|
1012
1018
|
[field]: fieldValue
|
|
1013
1019
|
});
|
|
1014
1020
|
};
|
|
1015
|
-
|
|
1021
|
+
React49__namespace.useEffect(() => {
|
|
1016
1022
|
if (!googlePlaces?.enabled || !inputRef.current) return;
|
|
1017
1023
|
const googleMaps = globalThis.window?.google;
|
|
1018
1024
|
if (!googleMaps?.maps?.places?.Autocomplete) {
|
|
@@ -1873,7 +1879,7 @@ function ToolResultDisplay({
|
|
|
1873
1879
|
showRawData = false,
|
|
1874
1880
|
className
|
|
1875
1881
|
}) {
|
|
1876
|
-
const [showJson, setShowJson] =
|
|
1882
|
+
const [showJson, setShowJson] = React49__namespace.useState(false);
|
|
1877
1883
|
if (result.type === "error") {
|
|
1878
1884
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1879
1885
|
"div",
|
|
@@ -2035,7 +2041,7 @@ function MCPToolCallDisplay({
|
|
|
2035
2041
|
onLinkClick,
|
|
2036
2042
|
className
|
|
2037
2043
|
}) {
|
|
2038
|
-
const [showDetails, setShowDetails] =
|
|
2044
|
+
const [showDetails, setShowDetails] = React49__namespace.useState(!defaultCollapsed);
|
|
2039
2045
|
const formatDuration2 = (ms) => {
|
|
2040
2046
|
if (!ms) return null;
|
|
2041
2047
|
if (ms < 1e3) return `${ms}ms`;
|
|
@@ -2282,7 +2288,7 @@ function ContentBlock({
|
|
|
2282
2288
|
role,
|
|
2283
2289
|
renderTextContent
|
|
2284
2290
|
}) {
|
|
2285
|
-
const [isCollapsed, setIsCollapsed] =
|
|
2291
|
+
const [isCollapsed, setIsCollapsed] = React49__namespace.useState(
|
|
2286
2292
|
content.collapsed ?? false
|
|
2287
2293
|
);
|
|
2288
2294
|
if (content.type === "text" && content.text) {
|
|
@@ -2717,7 +2723,7 @@ function AttachmentPreviewItem({
|
|
|
2717
2723
|
);
|
|
2718
2724
|
}
|
|
2719
2725
|
AttachmentPreviewItem.displayName = "AttachmentPreviewItem";
|
|
2720
|
-
var AttachmentPicker =
|
|
2726
|
+
var AttachmentPicker = React49__namespace.forwardRef(
|
|
2721
2727
|
({
|
|
2722
2728
|
onFilesSelected,
|
|
2723
2729
|
acceptedTypes = ["image/*", "video/*", ".pdf", ".doc", ".docx"],
|
|
@@ -2730,8 +2736,8 @@ var AttachmentPicker = React48__namespace.forwardRef(
|
|
|
2730
2736
|
className,
|
|
2731
2737
|
children
|
|
2732
2738
|
}, ref) => {
|
|
2733
|
-
const inputRef =
|
|
2734
|
-
|
|
2739
|
+
const inputRef = React49__namespace.useRef(null);
|
|
2740
|
+
React49__namespace.useImperativeHandle(ref, () => inputRef.current);
|
|
2735
2741
|
const handleClick = () => {
|
|
2736
2742
|
inputRef.current?.click();
|
|
2737
2743
|
};
|
|
@@ -2823,8 +2829,8 @@ function DragDropZone({
|
|
|
2823
2829
|
children,
|
|
2824
2830
|
className
|
|
2825
2831
|
}) {
|
|
2826
|
-
const [isDragging, setIsDragging] =
|
|
2827
|
-
const dragCounterRef =
|
|
2832
|
+
const [isDragging, setIsDragging] = React49__namespace.useState(false);
|
|
2833
|
+
const dragCounterRef = React49__namespace.useRef(0);
|
|
2828
2834
|
const handleDragEnter = (event) => {
|
|
2829
2835
|
event.preventDefault();
|
|
2830
2836
|
event.stopPropagation();
|
|
@@ -2926,7 +2932,7 @@ function CameraButton({
|
|
|
2926
2932
|
disabled = false,
|
|
2927
2933
|
className
|
|
2928
2934
|
}) {
|
|
2929
|
-
const inputRef =
|
|
2935
|
+
const inputRef = React49__namespace.useRef(null);
|
|
2930
2936
|
const handleClick = () => {
|
|
2931
2937
|
inputRef.current?.click();
|
|
2932
2938
|
};
|
|
@@ -3064,7 +3070,7 @@ var sendButtonVariants = classVarianceAuthority.cva(
|
|
|
3064
3070
|
}
|
|
3065
3071
|
}
|
|
3066
3072
|
);
|
|
3067
|
-
var SendButton =
|
|
3073
|
+
var SendButton = React49__namespace.forwardRef(
|
|
3068
3074
|
({ className, variant, canSend, isLoading, disabled, ...props }, ref) => {
|
|
3069
3075
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
3070
3076
|
"button",
|
|
@@ -3129,7 +3135,7 @@ var SendButton = React48__namespace.forwardRef(
|
|
|
3129
3135
|
}
|
|
3130
3136
|
);
|
|
3131
3137
|
SendButton.displayName = "SendButton";
|
|
3132
|
-
var MessageComposer =
|
|
3138
|
+
var MessageComposer = React49__namespace.forwardRef(
|
|
3133
3139
|
({
|
|
3134
3140
|
onSend,
|
|
3135
3141
|
onTypingStart,
|
|
@@ -3154,11 +3160,11 @@ var MessageComposer = React48__namespace.forwardRef(
|
|
|
3154
3160
|
inputTrailing,
|
|
3155
3161
|
className
|
|
3156
3162
|
}, ref) => {
|
|
3157
|
-
const textareaRef =
|
|
3158
|
-
const [internalContent, setInternalContent] =
|
|
3163
|
+
const textareaRef = React49__namespace.useRef(null);
|
|
3164
|
+
const [internalContent, setInternalContent] = React49__namespace.useState("");
|
|
3159
3165
|
const isControlled = controlledValue !== void 0;
|
|
3160
3166
|
const content = isControlled ? controlledValue : internalContent;
|
|
3161
|
-
const setContent =
|
|
3167
|
+
const setContent = React49__namespace.useCallback(
|
|
3162
3168
|
(val) => {
|
|
3163
3169
|
if (isControlled) {
|
|
3164
3170
|
const newVal = typeof val === "function" ? val(controlledValue) : val;
|
|
@@ -3169,20 +3175,20 @@ var MessageComposer = React48__namespace.forwardRef(
|
|
|
3169
3175
|
},
|
|
3170
3176
|
[isControlled, controlledValue, onValueChange]
|
|
3171
3177
|
);
|
|
3172
|
-
const [attachments, setAttachments] =
|
|
3178
|
+
const [attachments, setAttachments] = React49__namespace.useState(
|
|
3173
3179
|
[]
|
|
3174
3180
|
);
|
|
3175
|
-
const [isTyping, setIsTyping] =
|
|
3176
|
-
const typingTimeoutRef =
|
|
3177
|
-
|
|
3178
|
-
|
|
3181
|
+
const [isTyping, setIsTyping] = React49__namespace.useState(false);
|
|
3182
|
+
const typingTimeoutRef = React49__namespace.useRef(null);
|
|
3183
|
+
React49__namespace.useImperativeHandle(ref, () => textareaRef.current);
|
|
3184
|
+
React49__namespace.useEffect(() => {
|
|
3179
3185
|
const textarea = textareaRef.current;
|
|
3180
3186
|
if (textarea) {
|
|
3181
3187
|
textarea.style.height = "auto";
|
|
3182
3188
|
textarea.style.height = `${Math.min(textarea.scrollHeight, 150)}px`;
|
|
3183
3189
|
}
|
|
3184
3190
|
}, [content]);
|
|
3185
|
-
|
|
3191
|
+
React49__namespace.useEffect(() => {
|
|
3186
3192
|
if (content.length > 0 && !isTyping) {
|
|
3187
3193
|
setIsTyping(true);
|
|
3188
3194
|
onTypingStart?.();
|
|
@@ -3202,12 +3208,12 @@ var MessageComposer = React48__namespace.forwardRef(
|
|
|
3202
3208
|
}
|
|
3203
3209
|
};
|
|
3204
3210
|
}, [content, isTyping, onTypingStart, onTypingStop]);
|
|
3205
|
-
|
|
3211
|
+
React49__namespace.useEffect(() => {
|
|
3206
3212
|
if (autoFocus) {
|
|
3207
3213
|
textareaRef.current?.focus();
|
|
3208
3214
|
}
|
|
3209
3215
|
}, [autoFocus]);
|
|
3210
|
-
|
|
3216
|
+
React49__namespace.useEffect(() => {
|
|
3211
3217
|
if (replyTo) {
|
|
3212
3218
|
textareaRef.current?.focus();
|
|
3213
3219
|
}
|
|
@@ -3271,7 +3277,7 @@ var MessageComposer = React48__namespace.forwardRef(
|
|
|
3271
3277
|
return prev.filter((a) => a.id !== attachmentId);
|
|
3272
3278
|
});
|
|
3273
3279
|
};
|
|
3274
|
-
|
|
3280
|
+
React49__namespace.useEffect(() => {
|
|
3275
3281
|
const currentAttachments = attachments;
|
|
3276
3282
|
return () => {
|
|
3277
3283
|
currentAttachments.forEach((a) => {
|
|
@@ -3838,7 +3844,7 @@ function defaultFormatTimestamp(timestamp) {
|
|
|
3838
3844
|
minute: "2-digit"
|
|
3839
3845
|
});
|
|
3840
3846
|
}
|
|
3841
|
-
var MessageBubble =
|
|
3847
|
+
var MessageBubble = React49__namespace.forwardRef(
|
|
3842
3848
|
({
|
|
3843
3849
|
className,
|
|
3844
3850
|
message,
|
|
@@ -4313,7 +4319,7 @@ function LoadMoreButton({
|
|
|
4313
4319
|
);
|
|
4314
4320
|
}
|
|
4315
4321
|
LoadMoreButton.displayName = "LoadMoreButton";
|
|
4316
|
-
var MessageList =
|
|
4322
|
+
var MessageList = React49__namespace.forwardRef(
|
|
4317
4323
|
({
|
|
4318
4324
|
messages,
|
|
4319
4325
|
currentUser,
|
|
@@ -4332,19 +4338,19 @@ var MessageList = React48__namespace.forwardRef(
|
|
|
4332
4338
|
className,
|
|
4333
4339
|
autoScroll = "onNewMessage"
|
|
4334
4340
|
}, ref) => {
|
|
4335
|
-
const scrollContainerRef =
|
|
4336
|
-
const bottomRef =
|
|
4337
|
-
const [isUserScrolled, setIsUserScrolled] =
|
|
4338
|
-
const prevMessageCountRef =
|
|
4339
|
-
|
|
4340
|
-
const handleScroll =
|
|
4341
|
+
const scrollContainerRef = React49__namespace.useRef(null);
|
|
4342
|
+
const bottomRef = React49__namespace.useRef(null);
|
|
4343
|
+
const [isUserScrolled, setIsUserScrolled] = React49__namespace.useState(false);
|
|
4344
|
+
const prevMessageCountRef = React49__namespace.useRef(messages.length);
|
|
4345
|
+
React49__namespace.useImperativeHandle(ref, () => scrollContainerRef.current);
|
|
4346
|
+
const handleScroll = React49__namespace.useCallback(() => {
|
|
4341
4347
|
const container = scrollContainerRef.current;
|
|
4342
4348
|
if (!container) return;
|
|
4343
4349
|
const { scrollTop, scrollHeight, clientHeight } = container;
|
|
4344
4350
|
const isAtBottom = scrollHeight - scrollTop - clientHeight < 100;
|
|
4345
4351
|
setIsUserScrolled(!isAtBottom);
|
|
4346
4352
|
}, []);
|
|
4347
|
-
|
|
4353
|
+
React49__namespace.useEffect(() => {
|
|
4348
4354
|
const container = scrollContainerRef.current;
|
|
4349
4355
|
const bottom = bottomRef.current;
|
|
4350
4356
|
if (!container || !bottom) return;
|
|
@@ -4360,7 +4366,7 @@ var MessageList = React48__namespace.forwardRef(
|
|
|
4360
4366
|
}
|
|
4361
4367
|
}
|
|
4362
4368
|
}, [messages, currentUser.id, autoScroll, isUserScrolled]);
|
|
4363
|
-
|
|
4369
|
+
React49__namespace.useEffect(() => {
|
|
4364
4370
|
const bottom = bottomRef.current;
|
|
4365
4371
|
if (bottom && !isLoading) {
|
|
4366
4372
|
bottom.scrollIntoView();
|
|
@@ -4413,7 +4419,7 @@ var MessageList = React48__namespace.forwardRef(
|
|
|
4413
4419
|
{
|
|
4414
4420
|
"data-slot": "message-list-content",
|
|
4415
4421
|
className: "flex flex-col gap-1 p-4",
|
|
4416
|
-
children: messageGroups.map((group) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
4422
|
+
children: messageGroups.map((group) => /* @__PURE__ */ jsxRuntime.jsxs(React49__namespace.Fragment, { children: [
|
|
4417
4423
|
groupByDate && group.label && /* @__PURE__ */ jsxRuntime.jsx(DateSeparator, { label: group.label }),
|
|
4418
4424
|
group.messages.map((message, index) => {
|
|
4419
4425
|
const prevMessage = group.messages[index - 1];
|
|
@@ -4720,13 +4726,13 @@ function AIChat({
|
|
|
4720
4726
|
onClose,
|
|
4721
4727
|
renderTextContent
|
|
4722
4728
|
}) {
|
|
4723
|
-
const messagesEndRef =
|
|
4724
|
-
const messages =
|
|
4729
|
+
const messagesEndRef = React49__namespace.useRef(null);
|
|
4730
|
+
const messages = React49__namespace.useMemo(
|
|
4725
4731
|
() => session?.messages || messagesProp || [],
|
|
4726
4732
|
[session?.messages, messagesProp]
|
|
4727
4733
|
);
|
|
4728
4734
|
const isGenerating = session?.isGenerating || isGeneratingProp || false;
|
|
4729
|
-
|
|
4735
|
+
React49__namespace.useEffect(() => {
|
|
4730
4736
|
messagesEndRef.current?.scrollIntoView({ behavior: "smooth" });
|
|
4731
4737
|
}, [messages]);
|
|
4732
4738
|
const handleSend = async (message) => {
|
|
@@ -5006,7 +5012,7 @@ function FloatingAIChat({
|
|
|
5006
5012
|
pulse = false,
|
|
5007
5013
|
...chatProps
|
|
5008
5014
|
}) {
|
|
5009
|
-
const [internalOpen, setInternalOpen] =
|
|
5015
|
+
const [internalOpen, setInternalOpen] = React49__namespace.useState(defaultOpen);
|
|
5010
5016
|
const isControlled = controlledOpen !== void 0;
|
|
5011
5017
|
const isOpen = isControlled ? controlledOpen : internalOpen;
|
|
5012
5018
|
const handleOpenChange = (open) => {
|
|
@@ -5036,6 +5042,635 @@ function FloatingAIChat({
|
|
|
5036
5042
|
)
|
|
5037
5043
|
] });
|
|
5038
5044
|
}
|
|
5045
|
+
function normalizeString(value) {
|
|
5046
|
+
return value.trim().replace(/\s+/g, " ").toLowerCase();
|
|
5047
|
+
}
|
|
5048
|
+
function stableStringify(value, seen = /* @__PURE__ */ new WeakSet()) {
|
|
5049
|
+
if (value === null || typeof value !== "object") return JSON.stringify(value);
|
|
5050
|
+
if (seen.has(value)) return '"[Circular]"';
|
|
5051
|
+
seen.add(value);
|
|
5052
|
+
if (Array.isArray(value))
|
|
5053
|
+
return "[" + value.map((v) => stableStringify(v, seen)).join(",") + "]";
|
|
5054
|
+
const keys = Object.keys(value).sort();
|
|
5055
|
+
return "{" + keys.map(
|
|
5056
|
+
(k) => JSON.stringify(k) + ":" + stableStringify(value[k], seen)
|
|
5057
|
+
).join(",") + "}";
|
|
5058
|
+
}
|
|
5059
|
+
function safeStableStringify(value) {
|
|
5060
|
+
try {
|
|
5061
|
+
return stableStringify(value);
|
|
5062
|
+
} catch {
|
|
5063
|
+
return '"[Unserializable]"';
|
|
5064
|
+
}
|
|
5065
|
+
}
|
|
5066
|
+
function defaultReconciliationIsEqual(current, proposed) {
|
|
5067
|
+
const a = current ?? "";
|
|
5068
|
+
const b = proposed ?? "";
|
|
5069
|
+
if (a === b) return true;
|
|
5070
|
+
if (typeof a === "string" && typeof b === "string") {
|
|
5071
|
+
return normalizeString(a) === normalizeString(b);
|
|
5072
|
+
}
|
|
5073
|
+
if (a instanceof Date && b instanceof Date) {
|
|
5074
|
+
return a.getTime() === b.getTime();
|
|
5075
|
+
}
|
|
5076
|
+
if (typeof a === "object" && typeof b === "object" && a && b) {
|
|
5077
|
+
try {
|
|
5078
|
+
return stableStringify(a) === stableStringify(b);
|
|
5079
|
+
} catch {
|
|
5080
|
+
return false;
|
|
5081
|
+
}
|
|
5082
|
+
}
|
|
5083
|
+
return false;
|
|
5084
|
+
}
|
|
5085
|
+
function resolveConfidenceLevel(p) {
|
|
5086
|
+
if (p.confidenceLevel) return p.confidenceLevel;
|
|
5087
|
+
if (typeof p.confidence !== "number") return void 0;
|
|
5088
|
+
if (p.confidence >= 0.85) return "high";
|
|
5089
|
+
if (p.confidence >= 0.6) return "medium";
|
|
5090
|
+
return "low";
|
|
5091
|
+
}
|
|
5092
|
+
function defaultAcceptedFor(p) {
|
|
5093
|
+
if (typeof p.defaultAccepted === "boolean") return p.defaultAccepted;
|
|
5094
|
+
if (p.required) return true;
|
|
5095
|
+
return resolveConfidenceLevel(p) !== "low";
|
|
5096
|
+
}
|
|
5097
|
+
var panelVariants = classVarianceAuthority.cva(
|
|
5098
|
+
[
|
|
5099
|
+
"rounded-xl bg-card text-card-foreground",
|
|
5100
|
+
"border border-border shadow-sm",
|
|
5101
|
+
"flex flex-col overflow-hidden"
|
|
5102
|
+
],
|
|
5103
|
+
{
|
|
5104
|
+
variants: {
|
|
5105
|
+
tone: {
|
|
5106
|
+
default: "",
|
|
5107
|
+
accent: "ring-1 ring-primary-200 dark:ring-primary-900"
|
|
5108
|
+
}
|
|
5109
|
+
},
|
|
5110
|
+
defaultVariants: {
|
|
5111
|
+
tone: "default"
|
|
5112
|
+
}
|
|
5113
|
+
}
|
|
5114
|
+
);
|
|
5115
|
+
var confidenceBadgeVariants = classVarianceAuthority.cva(
|
|
5116
|
+
"inline-flex items-center gap-1 rounded-full px-2 py-0.5 text-xs font-medium",
|
|
5117
|
+
{
|
|
5118
|
+
variants: {
|
|
5119
|
+
level: {
|
|
5120
|
+
high: "bg-success-100 text-success dark:bg-success-900/30 dark:text-success-300",
|
|
5121
|
+
medium: "bg-amber-100 text-amber-700 dark:bg-amber-900/30 dark:text-amber-300",
|
|
5122
|
+
low: "bg-amber-200 text-amber-800 dark:bg-amber-900/40 dark:text-amber-200"
|
|
5123
|
+
}
|
|
5124
|
+
},
|
|
5125
|
+
defaultVariants: { level: "high" }
|
|
5126
|
+
}
|
|
5127
|
+
);
|
|
5128
|
+
function formatValueDefault(value) {
|
|
5129
|
+
if (value === null || value === void 0 || value === "") {
|
|
5130
|
+
return /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-muted-foreground italic", "aria-label": "empty", children: "\u2014" });
|
|
5131
|
+
}
|
|
5132
|
+
if (value instanceof Date) return value.toLocaleDateString();
|
|
5133
|
+
if (typeof value === "object") {
|
|
5134
|
+
try {
|
|
5135
|
+
return JSON.stringify(value);
|
|
5136
|
+
} catch {
|
|
5137
|
+
return String(value);
|
|
5138
|
+
}
|
|
5139
|
+
}
|
|
5140
|
+
return String(value);
|
|
5141
|
+
}
|
|
5142
|
+
function ConfidenceBadge({ level }) {
|
|
5143
|
+
const labels = {
|
|
5144
|
+
high: "High confidence",
|
|
5145
|
+
medium: "Medium confidence",
|
|
5146
|
+
low: "Low confidence"
|
|
5147
|
+
};
|
|
5148
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
5149
|
+
"span",
|
|
5150
|
+
{
|
|
5151
|
+
className: chunkOR5DRJCW_cjs.cn(confidenceBadgeVariants({ level })),
|
|
5152
|
+
"data-slot": "reconciliation-confidence",
|
|
5153
|
+
children: labels[level]
|
|
5154
|
+
}
|
|
5155
|
+
);
|
|
5156
|
+
}
|
|
5157
|
+
function ReconciliationProposalRow({
|
|
5158
|
+
proposal,
|
|
5159
|
+
state,
|
|
5160
|
+
onAcceptedChange,
|
|
5161
|
+
onValueChange,
|
|
5162
|
+
onToggleEditing
|
|
5163
|
+
}) {
|
|
5164
|
+
const safeState = state ?? {
|
|
5165
|
+
accepted: defaultAcceptedFor(proposal),
|
|
5166
|
+
editing: false,
|
|
5167
|
+
value: proposal.proposed
|
|
5168
|
+
};
|
|
5169
|
+
const rowId = React49__namespace.useId();
|
|
5170
|
+
const checkboxId = `${rowId}-accept`;
|
|
5171
|
+
const level = resolveConfidenceLevel(proposal);
|
|
5172
|
+
const render = proposal.renderValue ?? formatValueDefault;
|
|
5173
|
+
const canEdit = Boolean(proposal.renderEditor);
|
|
5174
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
5175
|
+
"li",
|
|
5176
|
+
{
|
|
5177
|
+
"data-slot": "reconciliation-row",
|
|
5178
|
+
"data-accepted": safeState.accepted,
|
|
5179
|
+
className: chunkOR5DRJCW_cjs.cn(
|
|
5180
|
+
"flex gap-3 px-4 py-3 transition-colors",
|
|
5181
|
+
safeState.accepted ? "bg-background" : "bg-muted/40",
|
|
5182
|
+
"border-border border-b last:border-b-0"
|
|
5183
|
+
),
|
|
5184
|
+
children: [
|
|
5185
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "pt-0.5", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
5186
|
+
chunkDFCZPVG4_cjs.Checkbox,
|
|
5187
|
+
{
|
|
5188
|
+
id: checkboxId,
|
|
5189
|
+
checked: safeState.accepted,
|
|
5190
|
+
onChange: (e) => onAcceptedChange(e.target.checked),
|
|
5191
|
+
disabled: proposal.required,
|
|
5192
|
+
"aria-label": `Apply update for ${proposal.label}`
|
|
5193
|
+
}
|
|
5194
|
+
) }),
|
|
5195
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "min-w-0 flex-1", children: [
|
|
5196
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center justify-between gap-3", children: [
|
|
5197
|
+
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
5198
|
+
"label",
|
|
5199
|
+
{
|
|
5200
|
+
htmlFor: checkboxId,
|
|
5201
|
+
className: chunkOR5DRJCW_cjs.cn(
|
|
5202
|
+
"text-foreground cursor-pointer text-sm font-medium",
|
|
5203
|
+
proposal.required && "cursor-default"
|
|
5204
|
+
),
|
|
5205
|
+
children: [
|
|
5206
|
+
proposal.label,
|
|
5207
|
+
proposal.required && /* @__PURE__ */ jsxRuntime.jsx(
|
|
5208
|
+
"span",
|
|
5209
|
+
{
|
|
5210
|
+
className: "text-muted-foreground ml-1 text-xs font-normal",
|
|
5211
|
+
"aria-label": "required",
|
|
5212
|
+
children: "(required)"
|
|
5213
|
+
}
|
|
5214
|
+
)
|
|
5215
|
+
]
|
|
5216
|
+
}
|
|
5217
|
+
),
|
|
5218
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2", children: [
|
|
5219
|
+
level && /* @__PURE__ */ jsxRuntime.jsx(ConfidenceBadge, { level }),
|
|
5220
|
+
canEdit && /* @__PURE__ */ jsxRuntime.jsx(
|
|
5221
|
+
"button",
|
|
5222
|
+
{
|
|
5223
|
+
type: "button",
|
|
5224
|
+
onClick: onToggleEditing,
|
|
5225
|
+
className: chunkOR5DRJCW_cjs.cn(
|
|
5226
|
+
"text-muted-foreground hover:text-foreground text-xs",
|
|
5227
|
+
"focus-visible:ring-ring rounded focus-visible:ring-2 focus-visible:outline-none",
|
|
5228
|
+
"hover:underline"
|
|
5229
|
+
),
|
|
5230
|
+
"aria-expanded": safeState.editing,
|
|
5231
|
+
"aria-controls": `${rowId}-editor`,
|
|
5232
|
+
children: safeState.editing ? "Done" : "Edit"
|
|
5233
|
+
}
|
|
5234
|
+
)
|
|
5235
|
+
] })
|
|
5236
|
+
] }),
|
|
5237
|
+
proposal.description && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-muted-foreground mt-0.5 text-xs", children: proposal.description }),
|
|
5238
|
+
/* @__PURE__ */ jsxRuntime.jsxs("dl", { className: "mt-2 grid grid-cols-1 gap-2 text-sm sm:grid-cols-2", children: [
|
|
5239
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "border-border/60 rounded-md border border-dashed px-3 py-2", children: [
|
|
5240
|
+
/* @__PURE__ */ jsxRuntime.jsx("dt", { className: "text-muted-foreground text-[11px] tracking-wide uppercase", children: "On file" }),
|
|
5241
|
+
/* @__PURE__ */ jsxRuntime.jsx("dd", { className: "text-foreground mt-0.5 break-words", children: render(proposal.current) })
|
|
5242
|
+
] }),
|
|
5243
|
+
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
5244
|
+
"div",
|
|
5245
|
+
{
|
|
5246
|
+
className: chunkOR5DRJCW_cjs.cn(
|
|
5247
|
+
"rounded-md border px-3 py-2",
|
|
5248
|
+
safeState.accepted ? "border-primary-300 bg-primary-50/60 dark:border-primary-700 dark:bg-primary-950/30" : "border-border bg-background"
|
|
5249
|
+
),
|
|
5250
|
+
children: [
|
|
5251
|
+
/* @__PURE__ */ jsxRuntime.jsxs("dt", { className: "text-muted-foreground flex items-center gap-1 text-[11px] tracking-wide uppercase", children: [
|
|
5252
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
5253
|
+
SparklesIcon,
|
|
5254
|
+
{
|
|
5255
|
+
size: "sm",
|
|
5256
|
+
className: "text-primary-700 dark:text-primary-400"
|
|
5257
|
+
}
|
|
5258
|
+
),
|
|
5259
|
+
"From AI",
|
|
5260
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "sr-only", children: "(AI-suggested value)" })
|
|
5261
|
+
] }),
|
|
5262
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
5263
|
+
"dd",
|
|
5264
|
+
{
|
|
5265
|
+
id: `${rowId}-editor`,
|
|
5266
|
+
className: "text-foreground mt-0.5 break-words",
|
|
5267
|
+
children: safeState.editing && proposal.renderEditor ? proposal.renderEditor(safeState.value, onValueChange) : render(safeState.value)
|
|
5268
|
+
}
|
|
5269
|
+
)
|
|
5270
|
+
]
|
|
5271
|
+
}
|
|
5272
|
+
)
|
|
5273
|
+
] }),
|
|
5274
|
+
proposal.hint && /* @__PURE__ */ jsxRuntime.jsx(
|
|
5275
|
+
"p",
|
|
5276
|
+
{
|
|
5277
|
+
className: chunkOR5DRJCW_cjs.cn(
|
|
5278
|
+
"mt-2 text-xs",
|
|
5279
|
+
level === "low" ? "text-amber-700 dark:text-amber-300" : "text-muted-foreground"
|
|
5280
|
+
),
|
|
5281
|
+
children: proposal.hint
|
|
5282
|
+
}
|
|
5283
|
+
)
|
|
5284
|
+
] })
|
|
5285
|
+
]
|
|
5286
|
+
}
|
|
5287
|
+
);
|
|
5288
|
+
}
|
|
5289
|
+
function relativeTimeLabel(date) {
|
|
5290
|
+
const seconds = Math.max(0, Math.round((Date.now() - date.getTime()) / 1e3));
|
|
5291
|
+
if (seconds < 45) return "just now";
|
|
5292
|
+
if (seconds < 90) return "1 minute ago";
|
|
5293
|
+
if (seconds < 3600) return `${Math.round(seconds / 60)} minutes ago`;
|
|
5294
|
+
if (seconds < 5400) return "1 hour ago";
|
|
5295
|
+
if (seconds < 86400) return `${Math.round(seconds / 3600)} hours ago`;
|
|
5296
|
+
return date.toLocaleString();
|
|
5297
|
+
}
|
|
5298
|
+
function SourcePill({ source }) {
|
|
5299
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
5300
|
+
"div",
|
|
5301
|
+
{
|
|
5302
|
+
"data-slot": "reconciliation-source",
|
|
5303
|
+
className: chunkOR5DRJCW_cjs.cn(
|
|
5304
|
+
"inline-flex items-center gap-2 rounded-full",
|
|
5305
|
+
"border-border bg-muted/60 border px-3 py-1 text-xs font-medium",
|
|
5306
|
+
"text-muted-foreground"
|
|
5307
|
+
),
|
|
5308
|
+
children: [
|
|
5309
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-primary-700 dark:text-primary-400 flex items-center", children: source.icon ?? /* @__PURE__ */ jsxRuntime.jsx(SparklesIcon, { size: "sm" }) }),
|
|
5310
|
+
source.thumbnailUrl && /* @__PURE__ */ jsxRuntime.jsx(
|
|
5311
|
+
"img",
|
|
5312
|
+
{
|
|
5313
|
+
src: source.thumbnailUrl,
|
|
5314
|
+
alt: "",
|
|
5315
|
+
className: "h-5 w-5 rounded object-cover",
|
|
5316
|
+
"aria-hidden": "true"
|
|
5317
|
+
}
|
|
5318
|
+
),
|
|
5319
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-foreground", children: source.label }),
|
|
5320
|
+
source.generatedAt && /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "text-muted-foreground", children: [
|
|
5321
|
+
"\xB7 ",
|
|
5322
|
+
relativeTimeLabel(source.generatedAt)
|
|
5323
|
+
] })
|
|
5324
|
+
]
|
|
5325
|
+
}
|
|
5326
|
+
);
|
|
5327
|
+
}
|
|
5328
|
+
function AIReconciliationPanel({
|
|
5329
|
+
title,
|
|
5330
|
+
description,
|
|
5331
|
+
source,
|
|
5332
|
+
proposals,
|
|
5333
|
+
onApply,
|
|
5334
|
+
onSkip,
|
|
5335
|
+
variant = "panel",
|
|
5336
|
+
open,
|
|
5337
|
+
onOpenChange,
|
|
5338
|
+
tone,
|
|
5339
|
+
applyLabel,
|
|
5340
|
+
skipLabel = "Skip for now",
|
|
5341
|
+
acceptAllLabel = "Accept all",
|
|
5342
|
+
rejectAllLabel = "Reject all",
|
|
5343
|
+
hideBulkActions,
|
|
5344
|
+
isEqual = defaultReconciliationIsEqual,
|
|
5345
|
+
onNothingToReconcile,
|
|
5346
|
+
className
|
|
5347
|
+
}) {
|
|
5348
|
+
const effective = React49__namespace.useMemo(
|
|
5349
|
+
() => proposals.filter((p) => !isEqual(p.current, p.proposed)),
|
|
5350
|
+
[proposals, isEqual]
|
|
5351
|
+
);
|
|
5352
|
+
const stateSignature = React49__namespace.useMemo(
|
|
5353
|
+
() => effective.map(
|
|
5354
|
+
(p) => `${p.id}\u241F${safeStableStringify(p.proposed)}\u241F${p.defaultAccepted ?? ""}\u241F${p.required ?? ""}\u241F${p.confidence ?? ""}\u241F${p.confidenceLevel ?? ""}`
|
|
5355
|
+
).join("|"),
|
|
5356
|
+
[effective]
|
|
5357
|
+
);
|
|
5358
|
+
const [rowStates, setRowStates] = React49__namespace.useState(
|
|
5359
|
+
() => Object.fromEntries(
|
|
5360
|
+
effective.map((p) => [
|
|
5361
|
+
p.id,
|
|
5362
|
+
{
|
|
5363
|
+
accepted: defaultAcceptedFor(p),
|
|
5364
|
+
editing: false,
|
|
5365
|
+
value: p.proposed
|
|
5366
|
+
}
|
|
5367
|
+
])
|
|
5368
|
+
)
|
|
5369
|
+
);
|
|
5370
|
+
React49__namespace.useEffect(() => {
|
|
5371
|
+
setRowStates(
|
|
5372
|
+
Object.fromEntries(
|
|
5373
|
+
effective.map((p) => [
|
|
5374
|
+
p.id,
|
|
5375
|
+
{
|
|
5376
|
+
accepted: defaultAcceptedFor(p),
|
|
5377
|
+
editing: false,
|
|
5378
|
+
value: p.proposed
|
|
5379
|
+
}
|
|
5380
|
+
])
|
|
5381
|
+
)
|
|
5382
|
+
);
|
|
5383
|
+
}, [stateSignature]);
|
|
5384
|
+
const reportedEmpty = React49__namespace.useRef(false);
|
|
5385
|
+
React49__namespace.useEffect(() => {
|
|
5386
|
+
if (effective.length === 0 && !reportedEmpty.current) {
|
|
5387
|
+
reportedEmpty.current = true;
|
|
5388
|
+
onNothingToReconcile?.();
|
|
5389
|
+
}
|
|
5390
|
+
if (effective.length > 0) reportedEmpty.current = false;
|
|
5391
|
+
}, [effective.length, onNothingToReconcile]);
|
|
5392
|
+
const acceptedCount = React49__namespace.useMemo(
|
|
5393
|
+
() => Object.values(rowStates).filter((s) => s.accepted).length,
|
|
5394
|
+
[rowStates]
|
|
5395
|
+
);
|
|
5396
|
+
const [submitting, setSubmitting] = React49__namespace.useState(false);
|
|
5397
|
+
const setAllAccepted = React49__namespace.useCallback(
|
|
5398
|
+
(accepted) => {
|
|
5399
|
+
setRowStates((prev) => {
|
|
5400
|
+
const next = { ...prev };
|
|
5401
|
+
for (const p of effective) {
|
|
5402
|
+
if (p.required && !accepted) continue;
|
|
5403
|
+
const base = prev[p.id] ?? {
|
|
5404
|
+
accepted: defaultAcceptedFor(p),
|
|
5405
|
+
editing: false,
|
|
5406
|
+
value: p.proposed
|
|
5407
|
+
};
|
|
5408
|
+
next[p.id] = { ...base, accepted };
|
|
5409
|
+
}
|
|
5410
|
+
return next;
|
|
5411
|
+
});
|
|
5412
|
+
},
|
|
5413
|
+
[effective]
|
|
5414
|
+
);
|
|
5415
|
+
const setRowAccepted = React49__namespace.useCallback(
|
|
5416
|
+
(id, accepted) => {
|
|
5417
|
+
const proposal = effective.find((p) => p.id === id);
|
|
5418
|
+
setRowStates((prev) => {
|
|
5419
|
+
const base = prev[id] ?? {
|
|
5420
|
+
accepted: proposal ? defaultAcceptedFor(proposal) : false,
|
|
5421
|
+
editing: false,
|
|
5422
|
+
value: proposal?.proposed
|
|
5423
|
+
};
|
|
5424
|
+
return { ...prev, [id]: { ...base, accepted } };
|
|
5425
|
+
});
|
|
5426
|
+
},
|
|
5427
|
+
[effective]
|
|
5428
|
+
);
|
|
5429
|
+
const setRowValue = React49__namespace.useCallback(
|
|
5430
|
+
(id, value) => {
|
|
5431
|
+
const proposal = effective.find((p) => p.id === id);
|
|
5432
|
+
setRowStates((prev) => {
|
|
5433
|
+
const base = prev[id] ?? {
|
|
5434
|
+
accepted: proposal ? defaultAcceptedFor(proposal) : false,
|
|
5435
|
+
editing: false,
|
|
5436
|
+
value: proposal?.proposed
|
|
5437
|
+
};
|
|
5438
|
+
return { ...prev, [id]: { ...base, value } };
|
|
5439
|
+
});
|
|
5440
|
+
},
|
|
5441
|
+
[effective]
|
|
5442
|
+
);
|
|
5443
|
+
const toggleRowEditing = React49__namespace.useCallback(
|
|
5444
|
+
(id) => {
|
|
5445
|
+
const proposal = effective.find((p) => p.id === id);
|
|
5446
|
+
setRowStates((prev) => {
|
|
5447
|
+
const base = prev[id] ?? {
|
|
5448
|
+
accepted: proposal ? defaultAcceptedFor(proposal) : false,
|
|
5449
|
+
editing: false,
|
|
5450
|
+
value: proposal?.proposed
|
|
5451
|
+
};
|
|
5452
|
+
return { ...prev, [id]: { ...base, editing: !base.editing } };
|
|
5453
|
+
});
|
|
5454
|
+
},
|
|
5455
|
+
[effective]
|
|
5456
|
+
);
|
|
5457
|
+
const handleApply = React49__namespace.useCallback(async () => {
|
|
5458
|
+
const accepted = effective.filter((p) => rowStates[p.id]?.accepted).map((p) => ({
|
|
5459
|
+
id: p.id,
|
|
5460
|
+
value: rowStates[p.id]?.value ?? p.proposed
|
|
5461
|
+
}));
|
|
5462
|
+
if (accepted.length === 0) return;
|
|
5463
|
+
try {
|
|
5464
|
+
setSubmitting(true);
|
|
5465
|
+
await onApply(accepted);
|
|
5466
|
+
} finally {
|
|
5467
|
+
setSubmitting(false);
|
|
5468
|
+
}
|
|
5469
|
+
}, [effective, rowStates, onApply]);
|
|
5470
|
+
const containerRef = React49__namespace.useRef(null);
|
|
5471
|
+
React49__namespace.useEffect(() => {
|
|
5472
|
+
const el = containerRef.current;
|
|
5473
|
+
if (!el) return void 0;
|
|
5474
|
+
const handler = (e) => {
|
|
5475
|
+
if (e.key === "Enter" && (e.metaKey || e.ctrlKey)) {
|
|
5476
|
+
if (acceptedCount === 0 || submitting) return;
|
|
5477
|
+
e.preventDefault();
|
|
5478
|
+
void handleApply();
|
|
5479
|
+
return;
|
|
5480
|
+
}
|
|
5481
|
+
if (e.key !== "a" && e.key !== "A") return;
|
|
5482
|
+
if (e.metaKey || e.ctrlKey || e.altKey) return;
|
|
5483
|
+
const target = e.target;
|
|
5484
|
+
const tag = target?.tagName?.toLowerCase();
|
|
5485
|
+
if (tag === "input" || tag === "textarea" || target?.isContentEditable) {
|
|
5486
|
+
return;
|
|
5487
|
+
}
|
|
5488
|
+
e.preventDefault();
|
|
5489
|
+
setAllAccepted(acceptedCount !== effective.length);
|
|
5490
|
+
};
|
|
5491
|
+
el.addEventListener("keydown", handler);
|
|
5492
|
+
return () => el.removeEventListener("keydown", handler);
|
|
5493
|
+
}, [
|
|
5494
|
+
acceptedCount,
|
|
5495
|
+
effective.length,
|
|
5496
|
+
setAllAccepted,
|
|
5497
|
+
handleApply,
|
|
5498
|
+
submitting
|
|
5499
|
+
]);
|
|
5500
|
+
const allAccepted = effective.length > 0 && acceptedCount === effective.length;
|
|
5501
|
+
const someAccepted = acceptedCount > 0 && !allAccepted;
|
|
5502
|
+
const resolvedApplyLabel = applyLabel ?? (acceptedCount === 1 ? "Apply 1 update" : `Apply ${acceptedCount} updates`);
|
|
5503
|
+
const grouped = React49__namespace.useMemo(() => {
|
|
5504
|
+
const map = /* @__PURE__ */ new Map();
|
|
5505
|
+
for (const p of effective) {
|
|
5506
|
+
const key = p.group;
|
|
5507
|
+
const arr = map.get(key) ?? [];
|
|
5508
|
+
arr.push(p);
|
|
5509
|
+
map.set(key, arr);
|
|
5510
|
+
}
|
|
5511
|
+
return Array.from(map.entries());
|
|
5512
|
+
}, [effective]);
|
|
5513
|
+
const bulkBar = !hideBulkActions && effective.length > 1 ? /* @__PURE__ */ jsxRuntime.jsxs(
|
|
5514
|
+
"div",
|
|
5515
|
+
{
|
|
5516
|
+
className: chunkOR5DRJCW_cjs.cn(
|
|
5517
|
+
"border-border flex items-center justify-between gap-2 border-b",
|
|
5518
|
+
"bg-muted/40 px-4 py-2"
|
|
5519
|
+
),
|
|
5520
|
+
"data-slot": "reconciliation-bulk",
|
|
5521
|
+
children: [
|
|
5522
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
5523
|
+
chunkDFCZPVG4_cjs.Checkbox,
|
|
5524
|
+
{
|
|
5525
|
+
checked: allAccepted,
|
|
5526
|
+
indeterminate: someAccepted,
|
|
5527
|
+
onChange: (e) => setAllAccepted(e.target.checked),
|
|
5528
|
+
"aria-label": allAccepted ? rejectAllLabel : acceptAllLabel,
|
|
5529
|
+
label: allAccepted ? rejectAllLabel : acceptAllLabel
|
|
5530
|
+
}
|
|
5531
|
+
),
|
|
5532
|
+
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
5533
|
+
"p",
|
|
5534
|
+
{
|
|
5535
|
+
className: "text-muted-foreground text-xs",
|
|
5536
|
+
role: "status",
|
|
5537
|
+
"aria-live": "polite",
|
|
5538
|
+
children: [
|
|
5539
|
+
acceptedCount,
|
|
5540
|
+
" of ",
|
|
5541
|
+
effective.length,
|
|
5542
|
+
" selected"
|
|
5543
|
+
]
|
|
5544
|
+
}
|
|
5545
|
+
)
|
|
5546
|
+
]
|
|
5547
|
+
}
|
|
5548
|
+
) : null;
|
|
5549
|
+
const rowList = /* @__PURE__ */ jsxRuntime.jsx(
|
|
5550
|
+
"ul",
|
|
5551
|
+
{
|
|
5552
|
+
"data-slot": "reconciliation-rows",
|
|
5553
|
+
className: "divide-border max-h-[60vh] overflow-y-auto",
|
|
5554
|
+
children: grouped.map(([groupKey, items]) => /* @__PURE__ */ jsxRuntime.jsxs(React49__namespace.Fragment, { children: [
|
|
5555
|
+
groupKey && /* @__PURE__ */ jsxRuntime.jsx(
|
|
5556
|
+
"li",
|
|
5557
|
+
{
|
|
5558
|
+
"aria-hidden": "true",
|
|
5559
|
+
className: chunkOR5DRJCW_cjs.cn(
|
|
5560
|
+
"bg-muted/30 text-muted-foreground border-border",
|
|
5561
|
+
"border-b px-4 py-1.5 text-[11px] font-medium tracking-wide uppercase"
|
|
5562
|
+
),
|
|
5563
|
+
children: groupKey
|
|
5564
|
+
}
|
|
5565
|
+
),
|
|
5566
|
+
items.map((p) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
5567
|
+
ReconciliationProposalRow,
|
|
5568
|
+
{
|
|
5569
|
+
proposal: p,
|
|
5570
|
+
state: rowStates[p.id],
|
|
5571
|
+
onAcceptedChange: (a) => setRowAccepted(p.id, a),
|
|
5572
|
+
onValueChange: (v) => setRowValue(p.id, v),
|
|
5573
|
+
onToggleEditing: () => toggleRowEditing(p.id)
|
|
5574
|
+
},
|
|
5575
|
+
p.id
|
|
5576
|
+
))
|
|
5577
|
+
] }, groupKey ?? "__nogroup"))
|
|
5578
|
+
}
|
|
5579
|
+
);
|
|
5580
|
+
const footerButtons = /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
5581
|
+
onSkip && /* @__PURE__ */ jsxRuntime.jsx(
|
|
5582
|
+
chunkA2QVQF54_cjs.Button,
|
|
5583
|
+
{
|
|
5584
|
+
type: "button",
|
|
5585
|
+
variant: "ghost",
|
|
5586
|
+
onClick: onSkip,
|
|
5587
|
+
disabled: submitting,
|
|
5588
|
+
children: skipLabel
|
|
5589
|
+
}
|
|
5590
|
+
),
|
|
5591
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
5592
|
+
chunkA2QVQF54_cjs.Button,
|
|
5593
|
+
{
|
|
5594
|
+
type: "button",
|
|
5595
|
+
onClick: handleApply,
|
|
5596
|
+
disabled: acceptedCount === 0 || submitting,
|
|
5597
|
+
isLoading: submitting,
|
|
5598
|
+
loadingText: "Applying\u2026",
|
|
5599
|
+
children: resolvedApplyLabel
|
|
5600
|
+
}
|
|
5601
|
+
)
|
|
5602
|
+
] });
|
|
5603
|
+
if (variant === "modal") {
|
|
5604
|
+
if (!onOpenChange) {
|
|
5605
|
+
throw new Error(
|
|
5606
|
+
'AIReconciliationPanel: `onOpenChange` is required when `variant="modal"`.'
|
|
5607
|
+
);
|
|
5608
|
+
}
|
|
5609
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(chunkAWUADXYI_cjs.Modal, { open: Boolean(open), onOpenChange, size: "2xl", children: [
|
|
5610
|
+
/* @__PURE__ */ jsxRuntime.jsxs(chunkAWUADXYI_cjs.ModalHeader, { children: [
|
|
5611
|
+
/* @__PURE__ */ jsxRuntime.jsx(chunkAWUADXYI_cjs.ModalTitle, { children: title }),
|
|
5612
|
+
/* @__PURE__ */ jsxRuntime.jsx(chunkAWUADXYI_cjs.ModalClose, {})
|
|
5613
|
+
] }),
|
|
5614
|
+
/* @__PURE__ */ jsxRuntime.jsx(chunkAWUADXYI_cjs.ModalBody, { className: "px-0 py-0", children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
5615
|
+
"div",
|
|
5616
|
+
{
|
|
5617
|
+
ref: containerRef,
|
|
5618
|
+
"data-slot": "reconciliation-panel",
|
|
5619
|
+
"data-variant": "modal",
|
|
5620
|
+
className: chunkOR5DRJCW_cjs.cn("flex flex-col", className),
|
|
5621
|
+
role: "group",
|
|
5622
|
+
"aria-label": title,
|
|
5623
|
+
children: [
|
|
5624
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "border-border border-b px-6 py-3", children: [
|
|
5625
|
+
description && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-muted-foreground text-sm", children: description }),
|
|
5626
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: chunkOR5DRJCW_cjs.cn(description && "mt-3"), children: /* @__PURE__ */ jsxRuntime.jsx(SourcePill, { source }) })
|
|
5627
|
+
] }),
|
|
5628
|
+
effective.length === 0 ? /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-muted-foreground px-6 py-6 text-sm", children: "No updates to review \u2014 your profile already matches the scan." }) : /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
5629
|
+
bulkBar,
|
|
5630
|
+
rowList
|
|
5631
|
+
] })
|
|
5632
|
+
]
|
|
5633
|
+
}
|
|
5634
|
+
) }),
|
|
5635
|
+
/* @__PURE__ */ jsxRuntime.jsx(chunkAWUADXYI_cjs.ModalFooter, { children: effective.length === 0 ? /* @__PURE__ */ jsxRuntime.jsx(chunkA2QVQF54_cjs.Button, { onClick: () => onOpenChange(false), children: "Close" }) : footerButtons })
|
|
5636
|
+
] });
|
|
5637
|
+
}
|
|
5638
|
+
if (effective.length === 0) return null;
|
|
5639
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
5640
|
+
"div",
|
|
5641
|
+
{
|
|
5642
|
+
ref: containerRef,
|
|
5643
|
+
"data-slot": "reconciliation-panel",
|
|
5644
|
+
"data-variant": "panel",
|
|
5645
|
+
className: chunkOR5DRJCW_cjs.cn(panelVariants({ tone }), className),
|
|
5646
|
+
role: "group",
|
|
5647
|
+
"aria-label": title,
|
|
5648
|
+
children: [
|
|
5649
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "border-border border-b px-4 pt-4 pb-3", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-start justify-between gap-3", children: [
|
|
5650
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "min-w-0 flex-1", children: [
|
|
5651
|
+
/* @__PURE__ */ jsxRuntime.jsx("h2", { className: "text-foreground text-base font-semibold", children: title }),
|
|
5652
|
+
description && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-muted-foreground mt-1 text-sm", children: description })
|
|
5653
|
+
] }),
|
|
5654
|
+
/* @__PURE__ */ jsxRuntime.jsx(SourcePill, { source })
|
|
5655
|
+
] }) }),
|
|
5656
|
+
bulkBar,
|
|
5657
|
+
rowList,
|
|
5658
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
5659
|
+
"div",
|
|
5660
|
+
{
|
|
5661
|
+
className: chunkOR5DRJCW_cjs.cn(
|
|
5662
|
+
"border-border flex flex-col-reverse gap-2 border-t px-4 py-3",
|
|
5663
|
+
"sm:flex-row sm:items-center sm:justify-end sm:gap-3"
|
|
5664
|
+
),
|
|
5665
|
+
"data-slot": "reconciliation-footer",
|
|
5666
|
+
children: footerButtons
|
|
5667
|
+
}
|
|
5668
|
+
)
|
|
5669
|
+
]
|
|
5670
|
+
}
|
|
5671
|
+
);
|
|
5672
|
+
}
|
|
5673
|
+
AIReconciliationPanel.displayName = "AIReconciliationPanel";
|
|
5039
5674
|
function AppHeader({
|
|
5040
5675
|
children,
|
|
5041
5676
|
className,
|
|
@@ -5352,10 +5987,10 @@ function AuthDialog({
|
|
|
5352
5987
|
requireEmailVerification = false,
|
|
5353
5988
|
className
|
|
5354
5989
|
}) {
|
|
5355
|
-
const [internalMode, setInternalMode] =
|
|
5356
|
-
const [isLoading, setIsLoading] =
|
|
5357
|
-
const [error, setError] =
|
|
5358
|
-
const [success, setSuccess] =
|
|
5990
|
+
const [internalMode, setInternalMode] = React49__namespace.useState("login");
|
|
5991
|
+
const [isLoading, setIsLoading] = React49__namespace.useState(false);
|
|
5992
|
+
const [error, setError] = React49__namespace.useState(null);
|
|
5993
|
+
const [success, setSuccess] = React49__namespace.useState(null);
|
|
5359
5994
|
const mode = controlledMode ?? internalMode;
|
|
5360
5995
|
const setMode = (newMode) => {
|
|
5361
5996
|
setError(null);
|
|
@@ -5366,14 +6001,14 @@ function AuthDialog({
|
|
|
5366
6001
|
setInternalMode(newMode);
|
|
5367
6002
|
}
|
|
5368
6003
|
};
|
|
5369
|
-
|
|
6004
|
+
React49__namespace.useEffect(() => {
|
|
5370
6005
|
const handleEscape = (e) => {
|
|
5371
6006
|
if (e.key === "Escape" && isOpen) onClose();
|
|
5372
6007
|
};
|
|
5373
6008
|
document.addEventListener("keydown", handleEscape);
|
|
5374
6009
|
return () => document.removeEventListener("keydown", handleEscape);
|
|
5375
6010
|
}, [isOpen, onClose]);
|
|
5376
|
-
|
|
6011
|
+
React49__namespace.useEffect(() => {
|
|
5377
6012
|
if (isOpen) {
|
|
5378
6013
|
document.body.style.overflow = "hidden";
|
|
5379
6014
|
} else {
|
|
@@ -5599,9 +6234,9 @@ function AuthDialog({
|
|
|
5599
6234
|
);
|
|
5600
6235
|
}
|
|
5601
6236
|
function LoginForm({ onSubmit, isLoading, onForgotPassword }) {
|
|
5602
|
-
const [email, setEmail] =
|
|
5603
|
-
const [password, setPassword] =
|
|
5604
|
-
const [showPassword, setShowPassword] =
|
|
6237
|
+
const [email, setEmail] = React49__namespace.useState("");
|
|
6238
|
+
const [password, setPassword] = React49__namespace.useState("");
|
|
6239
|
+
const [showPassword, setShowPassword] = React49__namespace.useState(false);
|
|
5605
6240
|
const handleSubmit = (e) => {
|
|
5606
6241
|
e.preventDefault();
|
|
5607
6242
|
onSubmit(email, password);
|
|
@@ -5703,11 +6338,11 @@ function SignupForm({
|
|
|
5703
6338
|
termsUrl,
|
|
5704
6339
|
privacyUrl
|
|
5705
6340
|
}) {
|
|
5706
|
-
const [email, setEmail] =
|
|
5707
|
-
const [password, setPassword] =
|
|
5708
|
-
const [confirmPassword, setConfirmPassword] =
|
|
5709
|
-
const [acceptedTerms, setAcceptedTerms] =
|
|
5710
|
-
const [showPassword, setShowPassword] =
|
|
6341
|
+
const [email, setEmail] = React49__namespace.useState("");
|
|
6342
|
+
const [password, setPassword] = React49__namespace.useState("");
|
|
6343
|
+
const [confirmPassword, setConfirmPassword] = React49__namespace.useState("");
|
|
6344
|
+
const [acceptedTerms, setAcceptedTerms] = React49__namespace.useState(false);
|
|
6345
|
+
const [showPassword, setShowPassword] = React49__namespace.useState(false);
|
|
5711
6346
|
const passwordsMatch = password === confirmPassword;
|
|
5712
6347
|
const handleSubmit = (e) => {
|
|
5713
6348
|
e.preventDefault();
|
|
@@ -5856,7 +6491,7 @@ function ForgotPasswordForm({
|
|
|
5856
6491
|
isLoading,
|
|
5857
6492
|
onBack
|
|
5858
6493
|
}) {
|
|
5859
|
-
const [email, setEmail] =
|
|
6494
|
+
const [email, setEmail] = React49__namespace.useState("");
|
|
5860
6495
|
const handleSubmit = (e) => {
|
|
5861
6496
|
e.preventDefault();
|
|
5862
6497
|
onSubmit(email);
|
|
@@ -5907,9 +6542,9 @@ function ForgotPasswordForm({
|
|
|
5907
6542
|
] });
|
|
5908
6543
|
}
|
|
5909
6544
|
function ResetPasswordForm({ onSubmit, isLoading }) {
|
|
5910
|
-
const [password, setPassword] =
|
|
5911
|
-
const [confirmPassword, setConfirmPassword] =
|
|
5912
|
-
const [showPassword, setShowPassword] =
|
|
6545
|
+
const [password, setPassword] = React49__namespace.useState("");
|
|
6546
|
+
const [confirmPassword, setConfirmPassword] = React49__namespace.useState("");
|
|
6547
|
+
const [showPassword, setShowPassword] = React49__namespace.useState(false);
|
|
5913
6548
|
const passwordsMatch = password === confirmPassword;
|
|
5914
6549
|
const handleSubmit = (e) => {
|
|
5915
6550
|
e.preventDefault();
|
|
@@ -6275,9 +6910,9 @@ function ServiceSelect({
|
|
|
6275
6910
|
error,
|
|
6276
6911
|
className
|
|
6277
6912
|
}) {
|
|
6278
|
-
const [isOpen, setIsOpen] =
|
|
6279
|
-
const dropdownRef =
|
|
6280
|
-
|
|
6913
|
+
const [isOpen, setIsOpen] = React49__namespace.useState(false);
|
|
6914
|
+
const dropdownRef = React49__namespace.useRef(null);
|
|
6915
|
+
React49__namespace.useEffect(() => {
|
|
6281
6916
|
function handleClickOutside(event) {
|
|
6282
6917
|
if (dropdownRef.current && !dropdownRef.current.contains(event.target)) {
|
|
6283
6918
|
setIsOpen(false);
|
|
@@ -6452,7 +7087,7 @@ function DialogOverlay({
|
|
|
6452
7087
|
className,
|
|
6453
7088
|
titleId
|
|
6454
7089
|
}) {
|
|
6455
|
-
|
|
7090
|
+
React49__namespace.useEffect(() => {
|
|
6456
7091
|
if (!isOpen || chunkSCV7C55E_cjs.isStorybookDocsMode()) {
|
|
6457
7092
|
return void 0;
|
|
6458
7093
|
}
|
|
@@ -6506,8 +7141,8 @@ function BookingDialog({
|
|
|
6506
7141
|
isLoading = false,
|
|
6507
7142
|
className
|
|
6508
7143
|
}) {
|
|
6509
|
-
const titleId =
|
|
6510
|
-
const [formData, setFormData] =
|
|
7144
|
+
const titleId = React49__namespace.useId();
|
|
7145
|
+
const [formData, setFormData] = React49__namespace.useState({
|
|
6511
7146
|
firstName: defaultValues?.firstName || "",
|
|
6512
7147
|
lastName: defaultValues?.lastName || "",
|
|
6513
7148
|
phoneNumber: defaultValues?.phoneNumber || "",
|
|
@@ -6516,7 +7151,7 @@ function BookingDialog({
|
|
|
6516
7151
|
consentEmail: defaultValues?.consentEmail ?? false,
|
|
6517
7152
|
consentSms: defaultValues?.consentSms ?? false
|
|
6518
7153
|
});
|
|
6519
|
-
const [errors, setErrors] =
|
|
7154
|
+
const [errors, setErrors] = React49__namespace.useState({});
|
|
6520
7155
|
const validate = () => {
|
|
6521
7156
|
const newErrors = {};
|
|
6522
7157
|
if (!formData.firstName.trim()) {
|
|
@@ -6784,7 +7419,7 @@ function InlineBookingForm({
|
|
|
6784
7419
|
isLoading = false,
|
|
6785
7420
|
className
|
|
6786
7421
|
}) {
|
|
6787
|
-
const [formData, setFormData] =
|
|
7422
|
+
const [formData, setFormData] = React49__namespace.useState({
|
|
6788
7423
|
firstName: defaultValues?.firstName || "",
|
|
6789
7424
|
lastName: defaultValues?.lastName || "",
|
|
6790
7425
|
phoneNumber: defaultValues?.phoneNumber || "",
|
|
@@ -6793,7 +7428,7 @@ function InlineBookingForm({
|
|
|
6793
7428
|
consentEmail: defaultValues?.consentEmail ?? false,
|
|
6794
7429
|
consentSms: defaultValues?.consentSms ?? false
|
|
6795
7430
|
});
|
|
6796
|
-
const [errors, setErrors] =
|
|
7431
|
+
const [errors, setErrors] = React49__namespace.useState({});
|
|
6797
7432
|
const validate = () => {
|
|
6798
7433
|
const newErrors = {};
|
|
6799
7434
|
if (!formData.firstName.trim()) {
|
|
@@ -7522,7 +8157,7 @@ function HoursSummary({
|
|
|
7522
8157
|
defaultExpanded = false,
|
|
7523
8158
|
className
|
|
7524
8159
|
}) {
|
|
7525
|
-
const [isExpanded, setIsExpanded] =
|
|
8160
|
+
const [isExpanded, setIsExpanded] = React49__namespace.useState(defaultExpanded);
|
|
7526
8161
|
const isOpen = isCurrentlyOpen(schedule.officeHours);
|
|
7527
8162
|
const todayHours = getTodayHours(schedule.officeHours, use24Hour);
|
|
7528
8163
|
const hasStructuredHours = schedule.officeHours && schedule.officeHours.length > 0;
|
|
@@ -7630,7 +8265,7 @@ function BusinessHoursEditor({
|
|
|
7630
8265
|
}) {
|
|
7631
8266
|
const schedule = ensureAllDays(value);
|
|
7632
8267
|
const orderedDays = getOrderedDays(weekStartsOn);
|
|
7633
|
-
const handleAddTimeSlot =
|
|
8268
|
+
const handleAddTimeSlot = React49.useCallback(
|
|
7634
8269
|
(dayIndex) => {
|
|
7635
8270
|
const newSchedule = [...schedule];
|
|
7636
8271
|
const daySchedule = newSchedule.find((d) => d.day === dayIndex);
|
|
@@ -7644,7 +8279,7 @@ function BusinessHoursEditor({
|
|
|
7644
8279
|
},
|
|
7645
8280
|
[schedule, onChange]
|
|
7646
8281
|
);
|
|
7647
|
-
const handleRemoveTimeSlot =
|
|
8282
|
+
const handleRemoveTimeSlot = React49.useCallback(
|
|
7648
8283
|
(dayIndex, slotIndex) => {
|
|
7649
8284
|
const newSchedule = [...schedule];
|
|
7650
8285
|
const daySchedule = newSchedule.find((d) => d.day === dayIndex);
|
|
@@ -7655,7 +8290,7 @@ function BusinessHoursEditor({
|
|
|
7655
8290
|
},
|
|
7656
8291
|
[schedule, onChange]
|
|
7657
8292
|
);
|
|
7658
|
-
const handleTimeChange =
|
|
8293
|
+
const handleTimeChange = React49.useCallback(
|
|
7659
8294
|
(dayIndex, slotIndex, field, value2) => {
|
|
7660
8295
|
const newSchedule = [...schedule];
|
|
7661
8296
|
const daySchedule = newSchedule.find((d) => d.day === dayIndex);
|
|
@@ -7669,7 +8304,7 @@ function BusinessHoursEditor({
|
|
|
7669
8304
|
},
|
|
7670
8305
|
[schedule, onChange]
|
|
7671
8306
|
);
|
|
7672
|
-
const handleCopyToAll =
|
|
8307
|
+
const handleCopyToAll = React49.useCallback(
|
|
7673
8308
|
(sourceDayIndex) => {
|
|
7674
8309
|
const sourceDay = schedule.find((d) => d.day === sourceDayIndex);
|
|
7675
8310
|
if (!sourceDay || sourceDay.hours.length === 0) return;
|
|
@@ -7687,7 +8322,7 @@ function BusinessHoursEditor({
|
|
|
7687
8322
|
},
|
|
7688
8323
|
[schedule, onChange]
|
|
7689
8324
|
);
|
|
7690
|
-
const handleCopyToWeekdays =
|
|
8325
|
+
const handleCopyToWeekdays = React49.useCallback(
|
|
7691
8326
|
(sourceDayIndex) => {
|
|
7692
8327
|
const sourceDay = schedule.find((d) => d.day === sourceDayIndex);
|
|
7693
8328
|
if (!sourceDay || sourceDay.hours.length === 0) return;
|
|
@@ -7997,17 +8632,17 @@ function CheckrIntegration({
|
|
|
7997
8632
|
viewDetails = "View Details",
|
|
7998
8633
|
noReportsSelected = "No reports selected"
|
|
7999
8634
|
} = labels;
|
|
8000
|
-
const [showInviteModal, setShowInviteModal] =
|
|
8001
|
-
const [candidateName, setCandidateName] =
|
|
8002
|
-
const [candidateEmail, setCandidateEmail] =
|
|
8003
|
-
const [candidatePhone, setCandidatePhone] =
|
|
8004
|
-
const [selectedPackage, setSelectedPackage] =
|
|
8635
|
+
const [showInviteModal, setShowInviteModal] = React49__namespace.useState(false);
|
|
8636
|
+
const [candidateName, setCandidateName] = React49__namespace.useState("");
|
|
8637
|
+
const [candidateEmail, setCandidateEmail] = React49__namespace.useState("");
|
|
8638
|
+
const [candidatePhone, setCandidatePhone] = React49__namespace.useState("");
|
|
8639
|
+
const [selectedPackage, setSelectedPackage] = React49__namespace.useState(
|
|
8005
8640
|
packages[0]?.id || ""
|
|
8006
8641
|
);
|
|
8007
|
-
const [selectedReports, setSelectedReports] =
|
|
8642
|
+
const [selectedReports, setSelectedReports] = React49__namespace.useState(
|
|
8008
8643
|
/* @__PURE__ */ new Set()
|
|
8009
8644
|
);
|
|
8010
|
-
|
|
8645
|
+
React49__namespace.useEffect(() => {
|
|
8011
8646
|
setSelectedReports((prev) => prev.size > 0 ? /* @__PURE__ */ new Set() : prev);
|
|
8012
8647
|
}, [reports, connected]);
|
|
8013
8648
|
const statusLabels = {
|
|
@@ -8041,7 +8676,7 @@ function CheckrIntegration({
|
|
|
8041
8676
|
failed: "bg-destructive",
|
|
8042
8677
|
expired: "bg-muted-foreground"
|
|
8043
8678
|
};
|
|
8044
|
-
const statusCounts =
|
|
8679
|
+
const statusCounts = React49__namespace.useMemo(() => {
|
|
8045
8680
|
const counts = {
|
|
8046
8681
|
pending: 0,
|
|
8047
8682
|
running: 0,
|
|
@@ -8547,7 +9182,7 @@ function CheckrIntegration({
|
|
|
8547
9182
|
}
|
|
8548
9183
|
);
|
|
8549
9184
|
}
|
|
8550
|
-
var CommandPaletteContext =
|
|
9185
|
+
var CommandPaletteContext = React49.createContext(
|
|
8551
9186
|
null
|
|
8552
9187
|
);
|
|
8553
9188
|
function CommandPaletteProvider({
|
|
@@ -8555,24 +9190,24 @@ function CommandPaletteProvider({
|
|
|
8555
9190
|
enableShortcut = true,
|
|
8556
9191
|
customEventName
|
|
8557
9192
|
}) {
|
|
8558
|
-
const [isOpen, setIsOpen] =
|
|
8559
|
-
const [query, setQuery] =
|
|
8560
|
-
const [selectedIndex, setSelectedIndex] =
|
|
8561
|
-
const [activeCategory, setActiveCategory] =
|
|
8562
|
-
const [items, setItems] =
|
|
8563
|
-
const [categories, setCategories] =
|
|
8564
|
-
const open =
|
|
9193
|
+
const [isOpen, setIsOpen] = React49.useState(false);
|
|
9194
|
+
const [query, setQuery] = React49.useState("");
|
|
9195
|
+
const [selectedIndex, setSelectedIndex] = React49.useState(-1);
|
|
9196
|
+
const [activeCategory, setActiveCategory] = React49.useState(null);
|
|
9197
|
+
const [items, setItems] = React49.useState([]);
|
|
9198
|
+
const [categories, setCategories] = React49.useState([]);
|
|
9199
|
+
const open = React49.useCallback(() => {
|
|
8565
9200
|
setIsOpen(true);
|
|
8566
9201
|
setQuery("");
|
|
8567
9202
|
setSelectedIndex(-1);
|
|
8568
9203
|
setActiveCategory(null);
|
|
8569
9204
|
}, []);
|
|
8570
|
-
const close =
|
|
9205
|
+
const close = React49.useCallback(() => {
|
|
8571
9206
|
setIsOpen(false);
|
|
8572
9207
|
setQuery("");
|
|
8573
9208
|
setSelectedIndex(-1);
|
|
8574
9209
|
}, []);
|
|
8575
|
-
const toggle =
|
|
9210
|
+
const toggle = React49.useCallback(() => {
|
|
8576
9211
|
if (isOpen) {
|
|
8577
9212
|
close();
|
|
8578
9213
|
} else {
|
|
@@ -8580,13 +9215,13 @@ function CommandPaletteProvider({
|
|
|
8580
9215
|
}
|
|
8581
9216
|
}, [isOpen, open, close]);
|
|
8582
9217
|
chunkFSBFQBNE_cjs.useCommandK(toggle, enableShortcut);
|
|
8583
|
-
|
|
9218
|
+
React49__namespace.default.useEffect(() => {
|
|
8584
9219
|
if (!customEventName) return;
|
|
8585
9220
|
const handler = () => open();
|
|
8586
9221
|
document.addEventListener(customEventName, handler);
|
|
8587
9222
|
return () => document.removeEventListener(customEventName, handler);
|
|
8588
9223
|
}, [customEventName, open]);
|
|
8589
|
-
const contextValue =
|
|
9224
|
+
const contextValue = React49.useMemo(
|
|
8590
9225
|
() => ({
|
|
8591
9226
|
isOpen,
|
|
8592
9227
|
open,
|
|
@@ -8618,7 +9253,7 @@ function CommandPaletteProvider({
|
|
|
8618
9253
|
return /* @__PURE__ */ jsxRuntime.jsx(CommandPaletteContext.Provider, { value: contextValue, children });
|
|
8619
9254
|
}
|
|
8620
9255
|
function useCommandPalette() {
|
|
8621
|
-
const context =
|
|
9256
|
+
const context = React49.useContext(CommandPaletteContext);
|
|
8622
9257
|
if (!context) {
|
|
8623
9258
|
throw new Error(
|
|
8624
9259
|
"useCommandPalette must be used within a CommandPaletteProvider"
|
|
@@ -8723,16 +9358,16 @@ function CommandPalette({
|
|
|
8723
9358
|
items,
|
|
8724
9359
|
categories
|
|
8725
9360
|
} = useCommandPalette();
|
|
8726
|
-
const inputRef =
|
|
8727
|
-
const containerRef =
|
|
8728
|
-
const listRef =
|
|
8729
|
-
|
|
9361
|
+
const inputRef = React49.useRef(null);
|
|
9362
|
+
const containerRef = React49.useRef(null);
|
|
9363
|
+
const listRef = React49.useRef(null);
|
|
9364
|
+
React49.useEffect(() => {
|
|
8730
9365
|
if (!isOpen) return;
|
|
8731
9366
|
onQueryChange?.(query);
|
|
8732
9367
|
}, [query, isOpen, onQueryChange]);
|
|
8733
9368
|
const PINNED_CATEGORY_ID = "__palette_pinned__";
|
|
8734
9369
|
const RECENT_CATEGORY_ID = "__palette_recent__";
|
|
8735
|
-
const filteredItems =
|
|
9370
|
+
const filteredItems = React49.useMemo(() => {
|
|
8736
9371
|
let result = items;
|
|
8737
9372
|
if (activeCategory) {
|
|
8738
9373
|
result = result.filter((item) => item.category === activeCategory);
|
|
@@ -8745,7 +9380,7 @@ function CommandPalette({
|
|
|
8745
9380
|
}
|
|
8746
9381
|
return result;
|
|
8747
9382
|
}, [items, query, activeCategory, serverFiltered]);
|
|
8748
|
-
const effectiveItems =
|
|
9383
|
+
const effectiveItems = React49.useMemo(() => {
|
|
8749
9384
|
const pinned = !activeCategory && pinnedItems?.length ? pinnedItems.map((it) => ({
|
|
8750
9385
|
...it,
|
|
8751
9386
|
category: it.category ?? PINNED_CATEGORY_ID
|
|
@@ -8757,7 +9392,7 @@ function CommandPalette({
|
|
|
8757
9392
|
})) : [];
|
|
8758
9393
|
return [...pinned, ...filteredItems, ...recents];
|
|
8759
9394
|
}, [pinnedItems, recentItems, filteredItems, activeCategory, query]);
|
|
8760
|
-
const groupedItems =
|
|
9395
|
+
const groupedItems = React49.useMemo(() => {
|
|
8761
9396
|
const groups = /* @__PURE__ */ new Map();
|
|
8762
9397
|
effectiveItems.forEach((item) => {
|
|
8763
9398
|
const category = item.category ?? "Other";
|
|
@@ -8769,15 +9404,15 @@ function CommandPalette({
|
|
|
8769
9404
|
}, [effectiveItems]);
|
|
8770
9405
|
chunkFHY3K6PL_cjs.useEscapeKey(close, isOpen);
|
|
8771
9406
|
chunkIKMR2ADM_cjs.useClickOutside(containerRef, close);
|
|
8772
|
-
|
|
9407
|
+
React49.useEffect(() => {
|
|
8773
9408
|
if (isOpen) {
|
|
8774
9409
|
setTimeout(() => inputRef.current?.focus(), 50);
|
|
8775
9410
|
}
|
|
8776
9411
|
}, [isOpen]);
|
|
8777
|
-
|
|
9412
|
+
React49.useEffect(() => {
|
|
8778
9413
|
setSelectedIndex(effectiveItems.length > 0 ? 0 : -1);
|
|
8779
9414
|
}, [effectiveItems.length, setSelectedIndex]);
|
|
8780
|
-
|
|
9415
|
+
React49.useEffect(() => {
|
|
8781
9416
|
if (selectedIndex >= 0 && listRef.current) {
|
|
8782
9417
|
const selectedElement = listRef.current.querySelector(
|
|
8783
9418
|
`[data-index="${selectedIndex}"]`
|
|
@@ -8785,7 +9420,7 @@ function CommandPalette({
|
|
|
8785
9420
|
selectedElement?.scrollIntoView({ block: "nearest" });
|
|
8786
9421
|
}
|
|
8787
9422
|
}, [selectedIndex]);
|
|
8788
|
-
const handleKeyDown =
|
|
9423
|
+
const handleKeyDown = React49.useCallback(
|
|
8789
9424
|
(e) => {
|
|
8790
9425
|
switch (e.key) {
|
|
8791
9426
|
case "ArrowDown":
|
|
@@ -8829,7 +9464,7 @@ function CommandPalette({
|
|
|
8829
9464
|
setActiveCategory
|
|
8830
9465
|
]
|
|
8831
9466
|
);
|
|
8832
|
-
const handleItemClick =
|
|
9467
|
+
const handleItemClick = React49.useCallback(
|
|
8833
9468
|
(item) => {
|
|
8834
9469
|
if (!item.disabled) {
|
|
8835
9470
|
onSelect?.(item);
|
|
@@ -8838,7 +9473,7 @@ function CommandPalette({
|
|
|
8838
9473
|
},
|
|
8839
9474
|
[onSelect, close]
|
|
8840
9475
|
);
|
|
8841
|
-
const getCategoryInfo =
|
|
9476
|
+
const getCategoryInfo = React49.useCallback(
|
|
8842
9477
|
(categoryId) => {
|
|
8843
9478
|
if (categoryId === PINNED_CATEGORY_ID) {
|
|
8844
9479
|
return { id: PINNED_CATEGORY_ID, label: pinnedCategoryLabel };
|
|
@@ -9492,11 +10127,11 @@ function formatRetryTime(time) {
|
|
|
9492
10127
|
}
|
|
9493
10128
|
function useConnectionStatus(options = {}) {
|
|
9494
10129
|
const { onDisconnect, onReconnect } = options;
|
|
9495
|
-
const [isOnline, setIsOnline] =
|
|
10130
|
+
const [isOnline, setIsOnline] = React49__namespace.useState(() => {
|
|
9496
10131
|
if (typeof window === "undefined") return true;
|
|
9497
10132
|
return navigator.onLine;
|
|
9498
10133
|
});
|
|
9499
|
-
|
|
10134
|
+
React49__namespace.useEffect(() => {
|
|
9500
10135
|
const handleOnline = () => {
|
|
9501
10136
|
setIsOnline(true);
|
|
9502
10137
|
onReconnect?.();
|
|
@@ -9615,10 +10250,10 @@ function RowActionMenu({
|
|
|
9615
10250
|
item,
|
|
9616
10251
|
actions
|
|
9617
10252
|
}) {
|
|
9618
|
-
const [open, setOpen] =
|
|
9619
|
-
const menuRef =
|
|
9620
|
-
const buttonRef =
|
|
9621
|
-
|
|
10253
|
+
const [open, setOpen] = React49__namespace.useState(false);
|
|
10254
|
+
const menuRef = React49__namespace.useRef(null);
|
|
10255
|
+
const buttonRef = React49__namespace.useRef(null);
|
|
10256
|
+
React49__namespace.useEffect(() => {
|
|
9622
10257
|
if (!open) return;
|
|
9623
10258
|
function handleClick(e) {
|
|
9624
10259
|
if (menuRef.current && !menuRef.current.contains(e.target) && buttonRef.current && !buttonRef.current.contains(e.target)) {
|
|
@@ -9628,7 +10263,7 @@ function RowActionMenu({
|
|
|
9628
10263
|
document.addEventListener("mousedown", handleClick);
|
|
9629
10264
|
return () => document.removeEventListener("mousedown", handleClick);
|
|
9630
10265
|
}, [open]);
|
|
9631
|
-
|
|
10266
|
+
React49__namespace.useEffect(() => {
|
|
9632
10267
|
if (!open) return;
|
|
9633
10268
|
function handleKey(e) {
|
|
9634
10269
|
if (e.key === "Escape") setOpen(false);
|
|
@@ -9636,8 +10271,8 @@ function RowActionMenu({
|
|
|
9636
10271
|
document.addEventListener("keydown", handleKey);
|
|
9637
10272
|
return () => document.removeEventListener("keydown", handleKey);
|
|
9638
10273
|
}, [open]);
|
|
9639
|
-
const [menuPos, setMenuPos] =
|
|
9640
|
-
|
|
10274
|
+
const [menuPos, setMenuPos] = React49__namespace.useState(null);
|
|
10275
|
+
React49__namespace.useLayoutEffect(() => {
|
|
9641
10276
|
if (!open || !buttonRef.current) return;
|
|
9642
10277
|
const rect = buttonRef.current.getBoundingClientRect();
|
|
9643
10278
|
setMenuPos({
|
|
@@ -9820,9 +10455,9 @@ function buildDefaultActions(onView, onEdit, onDelete) {
|
|
|
9820
10455
|
function ViewModalActions({
|
|
9821
10456
|
viewTarget
|
|
9822
10457
|
}) {
|
|
9823
|
-
const [shareOpen, setShareOpen] =
|
|
9824
|
-
const shareRef =
|
|
9825
|
-
|
|
10458
|
+
const [shareOpen, setShareOpen] = React49__namespace.useState(false);
|
|
10459
|
+
const shareRef = React49__namespace.useRef(null);
|
|
10460
|
+
React49__namespace.useEffect(() => {
|
|
9826
10461
|
if (!shareOpen) return;
|
|
9827
10462
|
const handleClick = (e) => {
|
|
9828
10463
|
if (shareRef.current && !shareRef.current.contains(e.target)) {
|
|
@@ -9959,7 +10594,7 @@ function ViewModalActions({
|
|
|
9959
10594
|
)
|
|
9960
10595
|
] });
|
|
9961
10596
|
}
|
|
9962
|
-
var CountBadge =
|
|
10597
|
+
var CountBadge = React49__namespace.forwardRef(
|
|
9963
10598
|
({
|
|
9964
10599
|
className,
|
|
9965
10600
|
variant,
|
|
@@ -9975,18 +10610,18 @@ var CountBadge = React48__namespace.forwardRef(
|
|
|
9975
10610
|
countVariant,
|
|
9976
10611
|
...props
|
|
9977
10612
|
}, ref) => {
|
|
9978
|
-
const [open, setOpen] =
|
|
9979
|
-
const containerRef =
|
|
9980
|
-
const [deleteTarget, setDeleteTarget] =
|
|
9981
|
-
const [editTarget, setEditTarget] =
|
|
10613
|
+
const [open, setOpen] = React49__namespace.useState(false);
|
|
10614
|
+
const containerRef = React49__namespace.useRef(null);
|
|
10615
|
+
const [deleteTarget, setDeleteTarget] = React49__namespace.useState(null);
|
|
10616
|
+
const [editTarget, setEditTarget] = React49__namespace.useState(
|
|
9982
10617
|
null
|
|
9983
10618
|
);
|
|
9984
|
-
const [editForm, setEditForm] =
|
|
9985
|
-
const [viewTarget, setViewTarget] =
|
|
10619
|
+
const [editForm, setEditForm] = React49__namespace.useState({});
|
|
10620
|
+
const [viewTarget, setViewTarget] = React49__namespace.useState(
|
|
9986
10621
|
null
|
|
9987
10622
|
);
|
|
9988
10623
|
const showMenu = items && items.length > 0;
|
|
9989
|
-
|
|
10624
|
+
React49__namespace.useEffect(() => {
|
|
9990
10625
|
if (!open) return;
|
|
9991
10626
|
const handleClickOutside = (e) => {
|
|
9992
10627
|
if (containerRef.current && !containerRef.current.contains(e.target)) {
|
|
@@ -9996,7 +10631,7 @@ var CountBadge = React48__namespace.forwardRef(
|
|
|
9996
10631
|
document.addEventListener("mousedown", handleClickOutside);
|
|
9997
10632
|
return () => document.removeEventListener("mousedown", handleClickOutside);
|
|
9998
10633
|
}, [open]);
|
|
9999
|
-
|
|
10634
|
+
React49__namespace.useEffect(() => {
|
|
10000
10635
|
if (!open) return;
|
|
10001
10636
|
const handleEscape = (e) => {
|
|
10002
10637
|
if (e.key === "Escape") setOpen(false);
|
|
@@ -10004,13 +10639,13 @@ var CountBadge = React48__namespace.forwardRef(
|
|
|
10004
10639
|
document.addEventListener("keydown", handleEscape);
|
|
10005
10640
|
return () => document.removeEventListener("keydown", handleEscape);
|
|
10006
10641
|
}, [open]);
|
|
10007
|
-
const handleDeleteRequest =
|
|
10642
|
+
const handleDeleteRequest = React49__namespace.useCallback((item) => {
|
|
10008
10643
|
setDeleteTarget(item);
|
|
10009
10644
|
}, []);
|
|
10010
|
-
const handleViewRequest =
|
|
10645
|
+
const handleViewRequest = React49__namespace.useCallback((item) => {
|
|
10011
10646
|
setViewTarget(item);
|
|
10012
10647
|
}, []);
|
|
10013
|
-
const handleEditRequest =
|
|
10648
|
+
const handleEditRequest = React49__namespace.useCallback((item) => {
|
|
10014
10649
|
setEditTarget(item);
|
|
10015
10650
|
setEditForm({
|
|
10016
10651
|
label: item.label,
|
|
@@ -10433,7 +11068,7 @@ function CookieConsentBanner({
|
|
|
10433
11068
|
isMobileApp = false,
|
|
10434
11069
|
className
|
|
10435
11070
|
}) {
|
|
10436
|
-
const [isAnimating, setIsAnimating] =
|
|
11071
|
+
const [isAnimating, setIsAnimating] = React49__namespace.useState(false);
|
|
10437
11072
|
const handleAccept = () => {
|
|
10438
11073
|
setIsAnimating(true);
|
|
10439
11074
|
setTimeout(() => {
|
|
@@ -10492,7 +11127,7 @@ function CookieConsentBanner({
|
|
|
10492
11127
|
appName,
|
|
10493
11128
|
" you are agreeing to our",
|
|
10494
11129
|
" ",
|
|
10495
|
-
legalLinks.map((link, index) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
11130
|
+
legalLinks.map((link, index) => /* @__PURE__ */ jsxRuntime.jsxs(React49__namespace.Fragment, { children: [
|
|
10496
11131
|
index > 0 && (index === legalLinks.length - 1 ? " and " : ", "),
|
|
10497
11132
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
10498
11133
|
"a",
|
|
@@ -10616,20 +11251,20 @@ function CompactCookieBanner({
|
|
|
10616
11251
|
var COOKIE_CONSENT_KEY = "cookie-consent-accepted";
|
|
10617
11252
|
function useCookieConsent(options = {}) {
|
|
10618
11253
|
const { storageKey = COOKIE_CONSENT_KEY, onConsent } = options;
|
|
10619
|
-
const [hasConsented, setHasConsented] =
|
|
11254
|
+
const [hasConsented, setHasConsented] = React49__namespace.useState(() => {
|
|
10620
11255
|
if (typeof window === "undefined") return false;
|
|
10621
11256
|
return localStorage.getItem(storageKey) === "true";
|
|
10622
11257
|
});
|
|
10623
|
-
const acceptCookies =
|
|
11258
|
+
const acceptCookies = React49__namespace.useCallback(() => {
|
|
10624
11259
|
localStorage.setItem(storageKey, "true");
|
|
10625
11260
|
setHasConsented(true);
|
|
10626
11261
|
onConsent?.();
|
|
10627
11262
|
}, [storageKey, onConsent]);
|
|
10628
|
-
const declineCookies =
|
|
11263
|
+
const declineCookies = React49__namespace.useCallback(() => {
|
|
10629
11264
|
localStorage.setItem(storageKey, "declined");
|
|
10630
11265
|
setHasConsented(true);
|
|
10631
11266
|
}, [storageKey]);
|
|
10632
|
-
const resetConsent =
|
|
11267
|
+
const resetConsent = React49__namespace.useCallback(() => {
|
|
10633
11268
|
localStorage.removeItem(storageKey);
|
|
10634
11269
|
setHasConsented(false);
|
|
10635
11270
|
}, [storageKey]);
|
|
@@ -11016,9 +11651,9 @@ function CSVFileUpload({
|
|
|
11016
11651
|
selectFile = "Select a file to upload or drag and drop",
|
|
11017
11652
|
selectButton = "Select File to Upload"
|
|
11018
11653
|
} = labels;
|
|
11019
|
-
const inputRef =
|
|
11020
|
-
const [isDragging, setIsDragging] =
|
|
11021
|
-
const handleDrop =
|
|
11654
|
+
const inputRef = React49__namespace.useRef(null);
|
|
11655
|
+
const [isDragging, setIsDragging] = React49__namespace.useState(false);
|
|
11656
|
+
const handleDrop = React49__namespace.useCallback(
|
|
11022
11657
|
(e) => {
|
|
11023
11658
|
e.preventDefault();
|
|
11024
11659
|
setIsDragging(false);
|
|
@@ -11029,14 +11664,14 @@ function CSVFileUpload({
|
|
|
11029
11664
|
},
|
|
11030
11665
|
[onFileSelect]
|
|
11031
11666
|
);
|
|
11032
|
-
const handleDragOver =
|
|
11667
|
+
const handleDragOver = React49__namespace.useCallback((e) => {
|
|
11033
11668
|
e.preventDefault();
|
|
11034
11669
|
setIsDragging(true);
|
|
11035
11670
|
}, []);
|
|
11036
|
-
const handleDragLeave =
|
|
11671
|
+
const handleDragLeave = React49__namespace.useCallback(() => {
|
|
11037
11672
|
setIsDragging(false);
|
|
11038
11673
|
}, []);
|
|
11039
|
-
const handleFileChange =
|
|
11674
|
+
const handleFileChange = React49__namespace.useCallback(
|
|
11040
11675
|
(e) => {
|
|
11041
11676
|
const file = e.target.files?.[0];
|
|
11042
11677
|
if (file) {
|
|
@@ -11101,7 +11736,7 @@ var widgetVariants = classVarianceAuthority.cva("", {
|
|
|
11101
11736
|
size: "md"
|
|
11102
11737
|
}
|
|
11103
11738
|
});
|
|
11104
|
-
var DashboardWidget =
|
|
11739
|
+
var DashboardWidget = React49__namespace.forwardRef(
|
|
11105
11740
|
({
|
|
11106
11741
|
className,
|
|
11107
11742
|
size,
|
|
@@ -11196,7 +11831,7 @@ var DashboardWidget = React48__namespace.forwardRef(
|
|
|
11196
11831
|
}
|
|
11197
11832
|
);
|
|
11198
11833
|
DashboardWidget.displayName = "DashboardWidget";
|
|
11199
|
-
var DashboardWidgetInfo =
|
|
11834
|
+
var DashboardWidgetInfo = React49__namespace.forwardRef(({ className, items, columns = 2, layout = "stacked", ...props }, ref) => {
|
|
11200
11835
|
const gridCols = {
|
|
11201
11836
|
1: "grid-cols-1",
|
|
11202
11837
|
2: "grid-cols-2",
|
|
@@ -11330,10 +11965,10 @@ function WidgetRowActionMenu({
|
|
|
11330
11965
|
rowIndex,
|
|
11331
11966
|
actions
|
|
11332
11967
|
}) {
|
|
11333
|
-
const [open, setOpen] =
|
|
11334
|
-
const menuRef =
|
|
11335
|
-
const buttonRef =
|
|
11336
|
-
|
|
11968
|
+
const [open, setOpen] = React49__namespace.useState(false);
|
|
11969
|
+
const menuRef = React49__namespace.useRef(null);
|
|
11970
|
+
const buttonRef = React49__namespace.useRef(null);
|
|
11971
|
+
React49__namespace.useEffect(() => {
|
|
11337
11972
|
if (!open) return;
|
|
11338
11973
|
function handleClick(e) {
|
|
11339
11974
|
if (menuRef.current && !menuRef.current.contains(e.target) && buttonRef.current && !buttonRef.current.contains(e.target)) {
|
|
@@ -11343,7 +11978,7 @@ function WidgetRowActionMenu({
|
|
|
11343
11978
|
document.addEventListener("mousedown", handleClick);
|
|
11344
11979
|
return () => document.removeEventListener("mousedown", handleClick);
|
|
11345
11980
|
}, [open]);
|
|
11346
|
-
|
|
11981
|
+
React49__namespace.useEffect(() => {
|
|
11347
11982
|
if (!open) return;
|
|
11348
11983
|
function handleKey(e) {
|
|
11349
11984
|
if (e.key === "Escape") setOpen(false);
|
|
@@ -11351,8 +11986,8 @@ function WidgetRowActionMenu({
|
|
|
11351
11986
|
document.addEventListener("keydown", handleKey);
|
|
11352
11987
|
return () => document.removeEventListener("keydown", handleKey);
|
|
11353
11988
|
}, [open]);
|
|
11354
|
-
const [menuPos, setMenuPos] =
|
|
11355
|
-
|
|
11989
|
+
const [menuPos, setMenuPos] = React49__namespace.useState(null);
|
|
11990
|
+
React49__namespace.useLayoutEffect(() => {
|
|
11356
11991
|
if (!open || !buttonRef.current) return;
|
|
11357
11992
|
const rect = buttonRef.current.getBoundingClientRect();
|
|
11358
11993
|
setMenuPos({
|
|
@@ -11433,7 +12068,7 @@ function WidgetRowActionMenu({
|
|
|
11433
12068
|
)
|
|
11434
12069
|
] });
|
|
11435
12070
|
}
|
|
11436
|
-
var DashboardWidgetTable =
|
|
12071
|
+
var DashboardWidgetTable = React49__namespace.forwardRef(DashboardWidgetTableInner);
|
|
11437
12072
|
var actionColorMap = {
|
|
11438
12073
|
primary: "bg-primary-100 text-primary-900 dark:bg-primary-900/40 dark:text-primary-300",
|
|
11439
12074
|
green: "bg-emerald-100 text-emerald-700 dark:bg-emerald-900/40 dark:text-emerald-300",
|
|
@@ -11444,7 +12079,7 @@ var actionColorMap = {
|
|
|
11444
12079
|
amber: "bg-amber-100 text-amber-700 dark:bg-amber-900/40 dark:text-amber-300",
|
|
11445
12080
|
neutral: "bg-neutral-100 text-neutral-700 dark:bg-neutral-800 dark:text-neutral-300"
|
|
11446
12081
|
};
|
|
11447
|
-
var DashboardWidgetActions =
|
|
12082
|
+
var DashboardWidgetActions = React49__namespace.forwardRef(({ className, actions, columns = 2, ...props }, ref) => {
|
|
11448
12083
|
const gridCols = {
|
|
11449
12084
|
1: "grid-cols-1",
|
|
11450
12085
|
2: "grid-cols-2",
|
|
@@ -11497,7 +12132,7 @@ var DashboardWidgetActions = React48__namespace.forwardRef(({ className, actions
|
|
|
11497
12132
|
);
|
|
11498
12133
|
});
|
|
11499
12134
|
DashboardWidgetActions.displayName = "DashboardWidgetActions";
|
|
11500
|
-
var DashboardWidgetDataCards =
|
|
12135
|
+
var DashboardWidgetDataCards = React49__namespace.forwardRef(({ className, items, columns = 2, footer, ...props }, ref) => {
|
|
11501
12136
|
const gridCols = {
|
|
11502
12137
|
2: "grid-cols-2",
|
|
11503
12138
|
3: "grid-cols-3",
|
|
@@ -11699,24 +12334,24 @@ function DateRangePicker({
|
|
|
11699
12334
|
labels = {}
|
|
11700
12335
|
}) {
|
|
11701
12336
|
const finalPresets = presets || getDefaultPresets(labels);
|
|
11702
|
-
const [isCalendarOpen, setIsCalendarOpen] =
|
|
11703
|
-
const [leftMonth, setLeftMonth] =
|
|
12337
|
+
const [isCalendarOpen, setIsCalendarOpen] = React49__namespace.useState(false);
|
|
12338
|
+
const [leftMonth, setLeftMonth] = React49__namespace.useState(
|
|
11704
12339
|
() => value?.start?.getMonth() ?? (/* @__PURE__ */ new Date()).getMonth()
|
|
11705
12340
|
);
|
|
11706
|
-
const [leftYear, setLeftYear] =
|
|
12341
|
+
const [leftYear, setLeftYear] = React49__namespace.useState(
|
|
11707
12342
|
() => value?.start?.getFullYear() ?? (/* @__PURE__ */ new Date()).getFullYear()
|
|
11708
12343
|
);
|
|
11709
|
-
const [rangeStart, setRangeStart] =
|
|
12344
|
+
const [rangeStart, setRangeStart] = React49__namespace.useState(
|
|
11710
12345
|
value?.start ?? null
|
|
11711
12346
|
);
|
|
11712
|
-
const [rangeEnd, setRangeEnd] =
|
|
12347
|
+
const [rangeEnd, setRangeEnd] = React49__namespace.useState(
|
|
11713
12348
|
value?.end ?? null
|
|
11714
12349
|
);
|
|
11715
|
-
const [selectingEnd, setSelectingEnd] =
|
|
11716
|
-
const [hoverDate, setHoverDate] =
|
|
11717
|
-
const calendarRef =
|
|
11718
|
-
const triggerRef =
|
|
11719
|
-
const [resolvedAlign, setResolvedAlign] =
|
|
12350
|
+
const [selectingEnd, setSelectingEnd] = React49__namespace.useState(false);
|
|
12351
|
+
const [hoverDate, setHoverDate] = React49__namespace.useState(null);
|
|
12352
|
+
const calendarRef = React49__namespace.useRef(null);
|
|
12353
|
+
const triggerRef = React49__namespace.useRef(null);
|
|
12354
|
+
const [resolvedAlign, setResolvedAlign] = React49__namespace.useState(
|
|
11720
12355
|
align === "end" ? "end" : "start"
|
|
11721
12356
|
);
|
|
11722
12357
|
const isMobileVariant = variant === "mobile";
|
|
@@ -11726,7 +12361,7 @@ function DateRangePicker({
|
|
|
11726
12361
|
);
|
|
11727
12362
|
const rightMonth = leftMonth === 11 ? 0 : leftMonth + 1;
|
|
11728
12363
|
const rightYear = leftMonth === 11 ? leftYear + 1 : leftYear;
|
|
11729
|
-
|
|
12364
|
+
React49__namespace.useEffect(() => {
|
|
11730
12365
|
if (!value) {
|
|
11731
12366
|
setRangeStart(null);
|
|
11732
12367
|
setRangeEnd(null);
|
|
@@ -11735,7 +12370,7 @@ function DateRangePicker({
|
|
|
11735
12370
|
setRangeStart(value.start ?? null);
|
|
11736
12371
|
setRangeEnd(value.end ?? null);
|
|
11737
12372
|
}, [value]);
|
|
11738
|
-
const wrapperRef =
|
|
12373
|
+
const wrapperRef = React49__namespace.useRef(null);
|
|
11739
12374
|
chunkIKMR2ADM_cjs.useClickOutside(wrapperRef, () => {
|
|
11740
12375
|
if (isCalendarOpen) {
|
|
11741
12376
|
setIsCalendarOpen(false);
|
|
@@ -11747,7 +12382,7 @@ function DateRangePicker({
|
|
|
11747
12382
|
setSelectingEnd(false);
|
|
11748
12383
|
triggerRef.current?.focus();
|
|
11749
12384
|
}, isCalendarOpen);
|
|
11750
|
-
|
|
12385
|
+
React49__namespace.useEffect(() => {
|
|
11751
12386
|
if (chunkSCV7C55E_cjs.isStorybookDocsMode()) return;
|
|
11752
12387
|
if (isMobileVariant && isCalendarOpen) {
|
|
11753
12388
|
const prev = document.body.style.overflow;
|
|
@@ -11757,7 +12392,7 @@ function DateRangePicker({
|
|
|
11757
12392
|
};
|
|
11758
12393
|
}
|
|
11759
12394
|
}, [isMobileVariant, isCalendarOpen]);
|
|
11760
|
-
|
|
12395
|
+
React49__namespace.useLayoutEffect(() => {
|
|
11761
12396
|
if (isMobileVariant || !isCalendarOpen) return;
|
|
11762
12397
|
if (align === "start" || align === "end") {
|
|
11763
12398
|
setResolvedAlign(align);
|
|
@@ -11862,7 +12497,7 @@ function DateRangePicker({
|
|
|
11862
12497
|
return isSameDay(date, today);
|
|
11863
12498
|
};
|
|
11864
12499
|
const displayValue = value ? formatDateRange(value) : "";
|
|
11865
|
-
const monthNames =
|
|
12500
|
+
const monthNames = React49__namespace.useMemo(
|
|
11866
12501
|
() => Array.from(
|
|
11867
12502
|
{ length: 12 },
|
|
11868
12503
|
(_, i) => new Intl.DateTimeFormat(void 0, { month: "long" }).format(
|
|
@@ -11871,7 +12506,7 @@ function DateRangePicker({
|
|
|
11871
12506
|
),
|
|
11872
12507
|
[]
|
|
11873
12508
|
);
|
|
11874
|
-
const weekdayNames =
|
|
12509
|
+
const weekdayNames = React49__namespace.useMemo(
|
|
11875
12510
|
() => Array.from(
|
|
11876
12511
|
{ length: 7 },
|
|
11877
12512
|
(_, i) => new Intl.DateTimeFormat(void 0, { weekday: "short" }).format(
|
|
@@ -12300,11 +12935,11 @@ function DropZone({
|
|
|
12300
12935
|
className,
|
|
12301
12936
|
children
|
|
12302
12937
|
}) {
|
|
12303
|
-
const [isDragging, setIsDragging] =
|
|
12304
|
-
const inputRef =
|
|
12305
|
-
const dropZoneRef =
|
|
12306
|
-
const dragCounter =
|
|
12307
|
-
const handleDragEnter =
|
|
12938
|
+
const [isDragging, setIsDragging] = React49__namespace.useState(false);
|
|
12939
|
+
const inputRef = React49__namespace.useRef(null);
|
|
12940
|
+
const dropZoneRef = React49__namespace.useRef(null);
|
|
12941
|
+
const dragCounter = React49__namespace.useRef(0);
|
|
12942
|
+
const handleDragEnter = React49__namespace.useCallback(
|
|
12308
12943
|
(e) => {
|
|
12309
12944
|
e.preventDefault();
|
|
12310
12945
|
e.stopPropagation();
|
|
@@ -12316,7 +12951,7 @@ function DropZone({
|
|
|
12316
12951
|
},
|
|
12317
12952
|
[disabled]
|
|
12318
12953
|
);
|
|
12319
|
-
const handleDragLeave =
|
|
12954
|
+
const handleDragLeave = React49__namespace.useCallback(
|
|
12320
12955
|
(e) => {
|
|
12321
12956
|
e.preventDefault();
|
|
12322
12957
|
e.stopPropagation();
|
|
@@ -12328,11 +12963,11 @@ function DropZone({
|
|
|
12328
12963
|
},
|
|
12329
12964
|
[disabled]
|
|
12330
12965
|
);
|
|
12331
|
-
const handleDragOver =
|
|
12966
|
+
const handleDragOver = React49__namespace.useCallback((e) => {
|
|
12332
12967
|
e.preventDefault();
|
|
12333
12968
|
e.stopPropagation();
|
|
12334
12969
|
}, []);
|
|
12335
|
-
const handleDrop =
|
|
12970
|
+
const handleDrop = React49__namespace.useCallback(
|
|
12336
12971
|
(e) => {
|
|
12337
12972
|
e.preventDefault();
|
|
12338
12973
|
e.stopPropagation();
|
|
@@ -12345,12 +12980,12 @@ function DropZone({
|
|
|
12345
12980
|
},
|
|
12346
12981
|
[disabled, onFilesSelected]
|
|
12347
12982
|
);
|
|
12348
|
-
const handleClick =
|
|
12983
|
+
const handleClick = React49__namespace.useCallback(() => {
|
|
12349
12984
|
if (!disabled) {
|
|
12350
12985
|
inputRef.current?.click();
|
|
12351
12986
|
}
|
|
12352
12987
|
}, [disabled]);
|
|
12353
|
-
const handleKeyDown =
|
|
12988
|
+
const handleKeyDown = React49__namespace.useCallback(
|
|
12354
12989
|
(e) => {
|
|
12355
12990
|
if ((e.key === "Enter" || e.key === " ") && !disabled) {
|
|
12356
12991
|
e.preventDefault();
|
|
@@ -12359,7 +12994,7 @@ function DropZone({
|
|
|
12359
12994
|
},
|
|
12360
12995
|
[disabled]
|
|
12361
12996
|
);
|
|
12362
|
-
const handleInputChange =
|
|
12997
|
+
const handleInputChange = React49__namespace.useCallback(
|
|
12363
12998
|
(e) => {
|
|
12364
12999
|
if (e.target.files && e.target.files.length > 0) {
|
|
12365
13000
|
onFilesSelected(e.target.files);
|
|
@@ -12450,7 +13085,7 @@ DropZone.displayName = "DropZone";
|
|
|
12450
13085
|
function FilePreviewItem({ file, onRemove, disabled }) {
|
|
12451
13086
|
const isPdf = file.file.type === "application/pdf";
|
|
12452
13087
|
const isImage = file.file.type.startsWith("image/");
|
|
12453
|
-
const handleRemove =
|
|
13088
|
+
const handleRemove = React49__namespace.useCallback(() => {
|
|
12454
13089
|
onRemove(file.id);
|
|
12455
13090
|
}, [file.id, onRemove]);
|
|
12456
13091
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
@@ -12596,24 +13231,24 @@ function useCamera({
|
|
|
12596
13231
|
width = 1920,
|
|
12597
13232
|
height = 1080
|
|
12598
13233
|
} = {}) {
|
|
12599
|
-
const [permission, setPermission] =
|
|
12600
|
-
const [stream, setStream] =
|
|
12601
|
-
const [isReady, setIsReady] =
|
|
12602
|
-
const [error, setError] =
|
|
12603
|
-
const [currentFacingMode, setCurrentFacingMode] =
|
|
12604
|
-
const videoRef =
|
|
12605
|
-
const canvasRef =
|
|
12606
|
-
|
|
13234
|
+
const [permission, setPermission] = React49__namespace.useState("prompt");
|
|
13235
|
+
const [stream, setStream] = React49__namespace.useState(null);
|
|
13236
|
+
const [isReady, setIsReady] = React49__namespace.useState(false);
|
|
13237
|
+
const [error, setError] = React49__namespace.useState(null);
|
|
13238
|
+
const [currentFacingMode, setCurrentFacingMode] = React49__namespace.useState(initialFacingMode);
|
|
13239
|
+
const videoRef = React49__namespace.useRef(null);
|
|
13240
|
+
const canvasRef = React49__namespace.useRef(null);
|
|
13241
|
+
React49__namespace.useEffect(() => {
|
|
12607
13242
|
checkCameraPermission().then(setPermission);
|
|
12608
13243
|
}, []);
|
|
12609
|
-
|
|
13244
|
+
React49__namespace.useEffect(() => {
|
|
12610
13245
|
return () => {
|
|
12611
13246
|
if (stream) {
|
|
12612
13247
|
stream.getTracks().forEach((track) => track.stop());
|
|
12613
13248
|
}
|
|
12614
13249
|
};
|
|
12615
13250
|
}, [stream]);
|
|
12616
|
-
const startCamera =
|
|
13251
|
+
const startCamera = React49__namespace.useCallback(async () => {
|
|
12617
13252
|
if (!hasCameraSupport()) {
|
|
12618
13253
|
setPermission("unavailable");
|
|
12619
13254
|
setError(new Error("Camera is not supported on this device"));
|
|
@@ -12647,7 +13282,7 @@ function useCamera({
|
|
|
12647
13282
|
}
|
|
12648
13283
|
}
|
|
12649
13284
|
}, [currentFacingMode, width, height]);
|
|
12650
|
-
const stopCamera =
|
|
13285
|
+
const stopCamera = React49__namespace.useCallback(() => {
|
|
12651
13286
|
if (stream) {
|
|
12652
13287
|
stream.getTracks().forEach((track) => track.stop());
|
|
12653
13288
|
setStream(null);
|
|
@@ -12657,8 +13292,8 @@ function useCamera({
|
|
|
12657
13292
|
videoRef.current.srcObject = null;
|
|
12658
13293
|
}
|
|
12659
13294
|
}, [stream]);
|
|
12660
|
-
const shouldRestartRef =
|
|
12661
|
-
const switchCamera =
|
|
13295
|
+
const shouldRestartRef = React49__namespace.useRef(false);
|
|
13296
|
+
const switchCamera = React49__namespace.useCallback(() => {
|
|
12662
13297
|
const newFacingMode = currentFacingMode === "user" ? "environment" : "user";
|
|
12663
13298
|
if (stream) {
|
|
12664
13299
|
stream.getTracks().forEach((track) => track.stop());
|
|
@@ -12671,13 +13306,13 @@ function useCamera({
|
|
|
12671
13306
|
}
|
|
12672
13307
|
setCurrentFacingMode(newFacingMode);
|
|
12673
13308
|
}, [currentFacingMode, stream]);
|
|
12674
|
-
|
|
13309
|
+
React49__namespace.useEffect(() => {
|
|
12675
13310
|
if (shouldRestartRef.current && !stream) {
|
|
12676
13311
|
shouldRestartRef.current = false;
|
|
12677
13312
|
startCamera();
|
|
12678
13313
|
}
|
|
12679
13314
|
}, [currentFacingMode, stream, startCamera]);
|
|
12680
|
-
const capturePhoto =
|
|
13315
|
+
const capturePhoto = React49__namespace.useCallback(() => {
|
|
12681
13316
|
if (!videoRef.current || !isReady) {
|
|
12682
13317
|
return null;
|
|
12683
13318
|
}
|
|
@@ -12819,7 +13454,7 @@ function compareFingerprints(fp1, fp2) {
|
|
|
12819
13454
|
return Math.max(0, Math.min(100, (1 - avgDiff * 5) * 100));
|
|
12820
13455
|
}
|
|
12821
13456
|
function useDocumentDetection(videoRef, config = {}, onAutoCapture) {
|
|
12822
|
-
const mergedConfig =
|
|
13457
|
+
const mergedConfig = React49.useMemo(
|
|
12823
13458
|
() => ({ ...DEFAULT_CONFIG, ...config }),
|
|
12824
13459
|
// Intentionally depend on individual properties to avoid unnecessary re-renders
|
|
12825
13460
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
@@ -12835,16 +13470,16 @@ function useDocumentDetection(videoRef, config = {}, onAutoCapture) {
|
|
|
12835
13470
|
config.enableAutoCapture
|
|
12836
13471
|
]
|
|
12837
13472
|
);
|
|
12838
|
-
const [state, setState] =
|
|
12839
|
-
const canvasRef =
|
|
12840
|
-
const ctxRef =
|
|
12841
|
-
const animationFrameRef =
|
|
12842
|
-
const lastFingerprintRef =
|
|
12843
|
-
const stabilityStartRef =
|
|
12844
|
-
const countdownIntervalRef =
|
|
12845
|
-
const isDetectingRef =
|
|
13473
|
+
const [state, setState] = React49.useState(INITIAL_STATE);
|
|
13474
|
+
const canvasRef = React49.useRef(null);
|
|
13475
|
+
const ctxRef = React49.useRef(null);
|
|
13476
|
+
const animationFrameRef = React49.useRef(null);
|
|
13477
|
+
const lastFingerprintRef = React49.useRef([]);
|
|
13478
|
+
const stabilityStartRef = React49.useRef(null);
|
|
13479
|
+
const countdownIntervalRef = React49.useRef(null);
|
|
13480
|
+
const isDetectingRef = React49.useRef(false);
|
|
12846
13481
|
const STABILITY_THRESHOLD = 85;
|
|
12847
|
-
|
|
13482
|
+
React49.useEffect(() => {
|
|
12848
13483
|
canvasRef.current = document.createElement("canvas");
|
|
12849
13484
|
ctxRef.current = canvasRef.current.getContext("2d", {
|
|
12850
13485
|
willReadFrequently: true
|
|
@@ -12854,7 +13489,7 @@ function useDocumentDetection(videoRef, config = {}, onAutoCapture) {
|
|
|
12854
13489
|
ctxRef.current = null;
|
|
12855
13490
|
};
|
|
12856
13491
|
}, []);
|
|
12857
|
-
const processFrame =
|
|
13492
|
+
const processFrame = React49.useCallback(() => {
|
|
12858
13493
|
const video = videoRef.current;
|
|
12859
13494
|
const canvas = canvasRef.current;
|
|
12860
13495
|
const ctx = ctxRef.current;
|
|
@@ -12924,7 +13559,7 @@ function useDocumentDetection(videoRef, config = {}, onAutoCapture) {
|
|
|
12924
13559
|
}
|
|
12925
13560
|
}, frameDelay);
|
|
12926
13561
|
}, [videoRef, mergedConfig]);
|
|
12927
|
-
|
|
13562
|
+
React49.useEffect(() => {
|
|
12928
13563
|
if (state.isReadyForCapture && mergedConfig.enableAutoCapture && state.captureCountdown === 0 && !countdownIntervalRef.current) {
|
|
12929
13564
|
let countdown = mergedConfig.captureCountdown;
|
|
12930
13565
|
setState((prev) => ({ ...prev, captureCountdown: countdown }));
|
|
@@ -12953,7 +13588,7 @@ function useDocumentDetection(videoRef, config = {}, onAutoCapture) {
|
|
|
12953
13588
|
onAutoCapture,
|
|
12954
13589
|
state.captureCountdown
|
|
12955
13590
|
]);
|
|
12956
|
-
|
|
13591
|
+
React49.useEffect(() => {
|
|
12957
13592
|
return () => {
|
|
12958
13593
|
if (animationFrameRef.current) {
|
|
12959
13594
|
cancelAnimationFrame(animationFrameRef.current);
|
|
@@ -12963,12 +13598,12 @@ function useDocumentDetection(videoRef, config = {}, onAutoCapture) {
|
|
|
12963
13598
|
}
|
|
12964
13599
|
};
|
|
12965
13600
|
}, []);
|
|
12966
|
-
const startDetection =
|
|
13601
|
+
const startDetection = React49.useCallback(() => {
|
|
12967
13602
|
isDetectingRef.current = true;
|
|
12968
13603
|
setState((prev) => ({ ...prev, isDetecting: true, error: null }));
|
|
12969
13604
|
processFrame();
|
|
12970
13605
|
}, [processFrame]);
|
|
12971
|
-
const stopDetection =
|
|
13606
|
+
const stopDetection = React49.useCallback(() => {
|
|
12972
13607
|
isDetectingRef.current = false;
|
|
12973
13608
|
if (animationFrameRef.current) {
|
|
12974
13609
|
cancelAnimationFrame(animationFrameRef.current);
|
|
@@ -12980,7 +13615,7 @@ function useDocumentDetection(videoRef, config = {}, onAutoCapture) {
|
|
|
12980
13615
|
}
|
|
12981
13616
|
setState((prev) => ({ ...prev, isDetecting: false }));
|
|
12982
13617
|
}, []);
|
|
12983
|
-
const resetDetection =
|
|
13618
|
+
const resetDetection = React49.useCallback(() => {
|
|
12984
13619
|
stopDetection();
|
|
12985
13620
|
lastFingerprintRef.current = [];
|
|
12986
13621
|
stabilityStartRef.current = null;
|
|
@@ -13224,14 +13859,14 @@ function WebcamModal({
|
|
|
13224
13859
|
width: 1920,
|
|
13225
13860
|
height: 1080
|
|
13226
13861
|
});
|
|
13227
|
-
const [capturedFile, setCapturedFile] =
|
|
13228
|
-
const [previewUrl, setPreviewUrl] =
|
|
13229
|
-
const [autoDetectEnabled, setAutoDetectEnabled] =
|
|
13230
|
-
const [videoDimensions, setVideoDimensions] =
|
|
13862
|
+
const [capturedFile, setCapturedFile] = React49__namespace.useState(null);
|
|
13863
|
+
const [previewUrl, setPreviewUrl] = React49__namespace.useState(null);
|
|
13864
|
+
const [autoDetectEnabled, setAutoDetectEnabled] = React49__namespace.useState(enableAutoCapture);
|
|
13865
|
+
const [videoDimensions, setVideoDimensions] = React49__namespace.useState({
|
|
13231
13866
|
width: 0,
|
|
13232
13867
|
height: 0
|
|
13233
13868
|
});
|
|
13234
|
-
const handleAutoCapture =
|
|
13869
|
+
const handleAutoCapture = React49__namespace.useCallback(() => {
|
|
13235
13870
|
const file = capturePhoto();
|
|
13236
13871
|
if (file) {
|
|
13237
13872
|
setCapturedFile(file);
|
|
@@ -13252,8 +13887,8 @@ function WebcamModal({
|
|
|
13252
13887
|
},
|
|
13253
13888
|
handleAutoCapture
|
|
13254
13889
|
);
|
|
13255
|
-
const hasStartedRef =
|
|
13256
|
-
|
|
13890
|
+
const hasStartedRef = React49__namespace.useRef(false);
|
|
13891
|
+
React49__namespace.useEffect(() => {
|
|
13257
13892
|
const video = videoRef.current;
|
|
13258
13893
|
if (video && isReady) {
|
|
13259
13894
|
const updateDimensions = () => {
|
|
@@ -13267,7 +13902,7 @@ function WebcamModal({
|
|
|
13267
13902
|
return () => video.removeEventListener("resize", updateDimensions);
|
|
13268
13903
|
}
|
|
13269
13904
|
}, [isReady, videoRef]);
|
|
13270
|
-
|
|
13905
|
+
React49__namespace.useEffect(() => {
|
|
13271
13906
|
if (open && permission !== "denied" && permission !== "unavailable") {
|
|
13272
13907
|
if (!hasStartedRef.current) {
|
|
13273
13908
|
hasStartedRef.current = true;
|
|
@@ -13286,7 +13921,7 @@ function WebcamModal({
|
|
|
13286
13921
|
});
|
|
13287
13922
|
}
|
|
13288
13923
|
}, [open, permission]);
|
|
13289
|
-
|
|
13924
|
+
React49__namespace.useEffect(() => {
|
|
13290
13925
|
if (isReady && autoDetectEnabled && !capturedFile) {
|
|
13291
13926
|
detection.startDetection();
|
|
13292
13927
|
}
|
|
@@ -13294,7 +13929,7 @@ function WebcamModal({
|
|
|
13294
13929
|
detection.stopDetection();
|
|
13295
13930
|
};
|
|
13296
13931
|
}, [isReady, autoDetectEnabled, capturedFile]);
|
|
13297
|
-
const handleCapture =
|
|
13932
|
+
const handleCapture = React49__namespace.useCallback(() => {
|
|
13298
13933
|
const file = capturePhoto();
|
|
13299
13934
|
if (file) {
|
|
13300
13935
|
setCapturedFile(file);
|
|
@@ -13302,7 +13937,7 @@ function WebcamModal({
|
|
|
13302
13937
|
stopCamera();
|
|
13303
13938
|
}
|
|
13304
13939
|
}, [capturePhoto, stopCamera]);
|
|
13305
|
-
const handleRetake =
|
|
13940
|
+
const handleRetake = React49__namespace.useCallback(() => {
|
|
13306
13941
|
if (previewUrl) {
|
|
13307
13942
|
URL.revokeObjectURL(previewUrl);
|
|
13308
13943
|
}
|
|
@@ -13311,13 +13946,13 @@ function WebcamModal({
|
|
|
13311
13946
|
detection.resetDetection();
|
|
13312
13947
|
startCamera();
|
|
13313
13948
|
}, [previewUrl, startCamera, detection]);
|
|
13314
|
-
const handleConfirm =
|
|
13949
|
+
const handleConfirm = React49__namespace.useCallback(() => {
|
|
13315
13950
|
if (capturedFile) {
|
|
13316
13951
|
onCapture(capturedFile);
|
|
13317
13952
|
onOpenChange(false);
|
|
13318
13953
|
}
|
|
13319
13954
|
}, [capturedFile, onCapture, onOpenChange]);
|
|
13320
|
-
const handleClose =
|
|
13955
|
+
const handleClose = React49__namespace.useCallback(() => {
|
|
13321
13956
|
stopCamera();
|
|
13322
13957
|
detection.stopDetection();
|
|
13323
13958
|
if (previewUrl) {
|
|
@@ -13469,13 +14104,13 @@ function useFileUpload({
|
|
|
13469
14104
|
multiple = false,
|
|
13470
14105
|
onValidationError
|
|
13471
14106
|
} = {}) {
|
|
13472
|
-
const [files, setFiles] =
|
|
13473
|
-
|
|
14107
|
+
const [files, setFiles] = React49__namespace.useState([]);
|
|
14108
|
+
React49__namespace.useEffect(() => {
|
|
13474
14109
|
return () => {
|
|
13475
14110
|
files.forEach((f) => URL.revokeObjectURL(f.previewUrl));
|
|
13476
14111
|
};
|
|
13477
14112
|
}, []);
|
|
13478
|
-
const addFiles =
|
|
14113
|
+
const addFiles = React49__namespace.useCallback(
|
|
13479
14114
|
(fileList, source = "upload") => {
|
|
13480
14115
|
const newFiles = [];
|
|
13481
14116
|
const errors = [];
|
|
@@ -13507,7 +14142,7 @@ function useFileUpload({
|
|
|
13507
14142
|
},
|
|
13508
14143
|
[acceptedFileTypes, maxFileSizeMb, multiple, onValidationError]
|
|
13509
14144
|
);
|
|
13510
|
-
const addFile =
|
|
14145
|
+
const addFile = React49__namespace.useCallback(
|
|
13511
14146
|
(file, source = "upload") => {
|
|
13512
14147
|
const dataTransfer = new DataTransfer();
|
|
13513
14148
|
dataTransfer.items.add(file);
|
|
@@ -13515,7 +14150,7 @@ function useFileUpload({
|
|
|
13515
14150
|
},
|
|
13516
14151
|
[addFiles]
|
|
13517
14152
|
);
|
|
13518
|
-
const removeFile =
|
|
14153
|
+
const removeFile = React49__namespace.useCallback((id) => {
|
|
13519
14154
|
setFiles((prev) => {
|
|
13520
14155
|
const fileToRemove = prev.find((f) => f.id === id);
|
|
13521
14156
|
if (fileToRemove) {
|
|
@@ -13524,13 +14159,13 @@ function useFileUpload({
|
|
|
13524
14159
|
return prev.filter((f) => f.id !== id);
|
|
13525
14160
|
});
|
|
13526
14161
|
}, []);
|
|
13527
|
-
const clearFiles =
|
|
14162
|
+
const clearFiles = React49__namespace.useCallback(() => {
|
|
13528
14163
|
setFiles((prev) => {
|
|
13529
14164
|
prev.forEach((f) => URL.revokeObjectURL(f.previewUrl));
|
|
13530
14165
|
return [];
|
|
13531
14166
|
});
|
|
13532
14167
|
}, []);
|
|
13533
|
-
const getFiles =
|
|
14168
|
+
const getFiles = React49__namespace.useCallback(() => {
|
|
13534
14169
|
return files.map((f) => f.file);
|
|
13535
14170
|
}, [files]);
|
|
13536
14171
|
return {
|
|
@@ -13558,12 +14193,12 @@ function DocumentScanner({
|
|
|
13558
14193
|
onValidationError,
|
|
13559
14194
|
onStateChange
|
|
13560
14195
|
}) {
|
|
13561
|
-
const [state, setState] =
|
|
13562
|
-
const [error, setError] =
|
|
13563
|
-
const [isWebcamOpen, setIsWebcamOpen] =
|
|
13564
|
-
const [validationErrors, setValidationErrors] =
|
|
14196
|
+
const [state, setState] = React49__namespace.useState("idle");
|
|
14197
|
+
const [error, setError] = React49__namespace.useState(null);
|
|
14198
|
+
const [isWebcamOpen, setIsWebcamOpen] = React49__namespace.useState(false);
|
|
14199
|
+
const [validationErrors, setValidationErrors] = React49__namespace.useState([]);
|
|
13565
14200
|
const isMobile = chunkFSBFQBNE_cjs.useIsMobile();
|
|
13566
|
-
const cameraInputRef =
|
|
14201
|
+
const cameraInputRef = React49__namespace.useRef(null);
|
|
13567
14202
|
const {
|
|
13568
14203
|
files,
|
|
13569
14204
|
addFiles,
|
|
@@ -13581,17 +14216,17 @@ function DocumentScanner({
|
|
|
13581
14216
|
onValidationError?.(errors);
|
|
13582
14217
|
}
|
|
13583
14218
|
});
|
|
13584
|
-
|
|
14219
|
+
React49__namespace.useEffect(() => {
|
|
13585
14220
|
onStateChange?.(state);
|
|
13586
14221
|
}, [state, onStateChange]);
|
|
13587
|
-
|
|
14222
|
+
React49__namespace.useEffect(() => {
|
|
13588
14223
|
if (hasFiles && state === "idle") {
|
|
13589
14224
|
setState("preview");
|
|
13590
14225
|
} else if (!hasFiles && state === "preview") {
|
|
13591
14226
|
setState("idle");
|
|
13592
14227
|
}
|
|
13593
14228
|
}, [hasFiles, state]);
|
|
13594
|
-
const handleFilesSelected =
|
|
14229
|
+
const handleFilesSelected = React49__namespace.useCallback(
|
|
13595
14230
|
(fileList) => {
|
|
13596
14231
|
setError(null);
|
|
13597
14232
|
setValidationErrors([]);
|
|
@@ -13599,10 +14234,10 @@ function DocumentScanner({
|
|
|
13599
14234
|
},
|
|
13600
14235
|
[addFiles]
|
|
13601
14236
|
);
|
|
13602
|
-
const handleCameraCapture =
|
|
14237
|
+
const handleCameraCapture = React49__namespace.useCallback(() => {
|
|
13603
14238
|
cameraInputRef.current?.click();
|
|
13604
14239
|
}, []);
|
|
13605
|
-
const handleCameraInputChange =
|
|
14240
|
+
const handleCameraInputChange = React49__namespace.useCallback(
|
|
13606
14241
|
(e) => {
|
|
13607
14242
|
if (e.target.files && e.target.files.length > 0) {
|
|
13608
14243
|
setError(null);
|
|
@@ -13613,7 +14248,7 @@ function DocumentScanner({
|
|
|
13613
14248
|
},
|
|
13614
14249
|
[addFiles]
|
|
13615
14250
|
);
|
|
13616
|
-
const handleWebcamCapture =
|
|
14251
|
+
const handleWebcamCapture = React49__namespace.useCallback(
|
|
13617
14252
|
(file) => {
|
|
13618
14253
|
setError(null);
|
|
13619
14254
|
setValidationErrors([]);
|
|
@@ -13621,7 +14256,7 @@ function DocumentScanner({
|
|
|
13621
14256
|
},
|
|
13622
14257
|
[addFile]
|
|
13623
14258
|
);
|
|
13624
|
-
const handleScan =
|
|
14259
|
+
const handleScan = React49__namespace.useCallback(async () => {
|
|
13625
14260
|
if (!hasFiles) return;
|
|
13626
14261
|
try {
|
|
13627
14262
|
setState("processing");
|
|
@@ -13640,11 +14275,11 @@ function DocumentScanner({
|
|
|
13640
14275
|
setError(errorMessage);
|
|
13641
14276
|
}
|
|
13642
14277
|
}, [hasFiles, getFiles, onScan, onResult, clearFiles]);
|
|
13643
|
-
const handleRetry =
|
|
14278
|
+
const handleRetry = React49__namespace.useCallback(() => {
|
|
13644
14279
|
setState("preview");
|
|
13645
14280
|
setError(null);
|
|
13646
14281
|
}, []);
|
|
13647
|
-
const handleClearAll =
|
|
14282
|
+
const handleClearAll = React49__namespace.useCallback(() => {
|
|
13648
14283
|
clearFiles();
|
|
13649
14284
|
setError(null);
|
|
13650
14285
|
setValidationErrors([]);
|
|
@@ -13957,10 +14592,10 @@ function useDropzone({
|
|
|
13957
14592
|
multiple = false,
|
|
13958
14593
|
disabled = false
|
|
13959
14594
|
}) {
|
|
13960
|
-
const [isDragging, setIsDragging] =
|
|
13961
|
-
const inputRef =
|
|
13962
|
-
const dragCounter =
|
|
13963
|
-
const handleDragEnter =
|
|
14595
|
+
const [isDragging, setIsDragging] = React49__namespace.useState(false);
|
|
14596
|
+
const inputRef = React49__namespace.useRef(null);
|
|
14597
|
+
const dragCounter = React49__namespace.useRef(0);
|
|
14598
|
+
const handleDragEnter = React49__namespace.useCallback(
|
|
13964
14599
|
(e) => {
|
|
13965
14600
|
e.preventDefault();
|
|
13966
14601
|
e.stopPropagation();
|
|
@@ -13972,11 +14607,11 @@ function useDropzone({
|
|
|
13972
14607
|
},
|
|
13973
14608
|
[disabled]
|
|
13974
14609
|
);
|
|
13975
|
-
const handleDragOver =
|
|
14610
|
+
const handleDragOver = React49__namespace.useCallback((e) => {
|
|
13976
14611
|
e.preventDefault();
|
|
13977
14612
|
e.stopPropagation();
|
|
13978
14613
|
}, []);
|
|
13979
|
-
const handleDragLeave =
|
|
14614
|
+
const handleDragLeave = React49__namespace.useCallback((e) => {
|
|
13980
14615
|
e.preventDefault();
|
|
13981
14616
|
e.stopPropagation();
|
|
13982
14617
|
dragCounter.current--;
|
|
@@ -13984,7 +14619,7 @@ function useDropzone({
|
|
|
13984
14619
|
setIsDragging(false);
|
|
13985
14620
|
}
|
|
13986
14621
|
}, []);
|
|
13987
|
-
const handleDrop =
|
|
14622
|
+
const handleDrop = React49__namespace.useCallback(
|
|
13988
14623
|
(e) => {
|
|
13989
14624
|
e.preventDefault();
|
|
13990
14625
|
e.stopPropagation();
|
|
@@ -13998,7 +14633,7 @@ function useDropzone({
|
|
|
13998
14633
|
},
|
|
13999
14634
|
[disabled, multiple, onDrop]
|
|
14000
14635
|
);
|
|
14001
|
-
const handleInputChange =
|
|
14636
|
+
const handleInputChange = React49__namespace.useCallback(
|
|
14002
14637
|
(e) => {
|
|
14003
14638
|
const files = e.target.files ? Array.from(e.target.files) : [];
|
|
14004
14639
|
if (files.length > 0) {
|
|
@@ -14008,7 +14643,7 @@ function useDropzone({
|
|
|
14008
14643
|
},
|
|
14009
14644
|
[onDrop]
|
|
14010
14645
|
);
|
|
14011
|
-
const open =
|
|
14646
|
+
const open = React49__namespace.useCallback(() => {
|
|
14012
14647
|
if (!disabled) {
|
|
14013
14648
|
inputRef.current?.click();
|
|
14014
14649
|
}
|
|
@@ -14058,7 +14693,7 @@ function ClaimProviderForm({
|
|
|
14058
14693
|
termsUrl = "/terms",
|
|
14059
14694
|
className = ""
|
|
14060
14695
|
}) {
|
|
14061
|
-
const [formData, setFormData] =
|
|
14696
|
+
const [formData, setFormData] = React49__namespace.useState({
|
|
14062
14697
|
firstName: "",
|
|
14063
14698
|
lastName: "",
|
|
14064
14699
|
email: "",
|
|
@@ -14361,14 +14996,14 @@ function CreateInvoiceModal({
|
|
|
14361
14996
|
initialStep = 1,
|
|
14362
14997
|
initialEmployerId = ""
|
|
14363
14998
|
}) {
|
|
14364
|
-
const [step, setStep] =
|
|
14365
|
-
const [employerId, setEmployerId] =
|
|
14366
|
-
const [selectedOrders, setSelectedOrders] =
|
|
14999
|
+
const [step, setStep] = React49__namespace.useState(initialStep);
|
|
15000
|
+
const [employerId, setEmployerId] = React49__namespace.useState(initialEmployerId);
|
|
15001
|
+
const [selectedOrders, setSelectedOrders] = React49__namespace.useState(
|
|
14367
15002
|
/* @__PURE__ */ new Set()
|
|
14368
15003
|
);
|
|
14369
|
-
const [dueDate, setDueDate] =
|
|
14370
|
-
const [notes, setNotes] =
|
|
14371
|
-
|
|
15004
|
+
const [dueDate, setDueDate] = React49__namespace.useState("");
|
|
15005
|
+
const [notes, setNotes] = React49__namespace.useState("");
|
|
15006
|
+
React49__namespace.useEffect(() => {
|
|
14372
15007
|
if (!open) {
|
|
14373
15008
|
setStep(initialStep);
|
|
14374
15009
|
setEmployerId(initialEmployerId);
|
|
@@ -14377,7 +15012,7 @@ function CreateInvoiceModal({
|
|
|
14377
15012
|
setNotes("");
|
|
14378
15013
|
}
|
|
14379
15014
|
}, [open, initialStep, initialEmployerId]);
|
|
14380
|
-
|
|
15015
|
+
React49__namespace.useEffect(() => {
|
|
14381
15016
|
if (!dueDate && open) {
|
|
14382
15017
|
const date = /* @__PURE__ */ new Date();
|
|
14383
15018
|
date.setDate(date.getDate() + defaultDueDays);
|
|
@@ -14800,14 +15435,14 @@ function CreateReferralModal({
|
|
|
14800
15435
|
errorMessage,
|
|
14801
15436
|
currency = "$"
|
|
14802
15437
|
}) {
|
|
14803
|
-
const [selectedServices, setSelectedServices] =
|
|
15438
|
+
const [selectedServices, setSelectedServices] = React49__namespace.useState(
|
|
14804
15439
|
/* @__PURE__ */ new Set()
|
|
14805
15440
|
);
|
|
14806
|
-
const [notes, setNotes] =
|
|
14807
|
-
const [priority, setPriority] =
|
|
15441
|
+
const [notes, setNotes] = React49__namespace.useState("");
|
|
15442
|
+
const [priority, setPriority] = React49__namespace.useState(
|
|
14808
15443
|
"normal"
|
|
14809
15444
|
);
|
|
14810
|
-
|
|
15445
|
+
React49__namespace.useEffect(() => {
|
|
14811
15446
|
if (!open) {
|
|
14812
15447
|
setSelectedServices(/* @__PURE__ */ new Set());
|
|
14813
15448
|
setNotes("");
|
|
@@ -15108,15 +15743,15 @@ function EditUserRoleModal({
|
|
|
15108
15743
|
isSubmitting = false,
|
|
15109
15744
|
errorMessage
|
|
15110
15745
|
}) {
|
|
15111
|
-
const [selectedRoleId, setSelectedRoleId] =
|
|
15746
|
+
const [selectedRoleId, setSelectedRoleId] = React49__namespace.useState(
|
|
15112
15747
|
user?.currentRoleId || ""
|
|
15113
15748
|
);
|
|
15114
|
-
|
|
15749
|
+
React49__namespace.useEffect(() => {
|
|
15115
15750
|
if (user?.currentRoleId) {
|
|
15116
15751
|
setSelectedRoleId(user.currentRoleId);
|
|
15117
15752
|
}
|
|
15118
15753
|
}, [user?.currentRoleId]);
|
|
15119
|
-
|
|
15754
|
+
React49__namespace.useEffect(() => {
|
|
15120
15755
|
if (!open && user?.currentRoleId) {
|
|
15121
15756
|
setSelectedRoleId(user.currentRoleId);
|
|
15122
15757
|
}
|
|
@@ -15287,24 +15922,24 @@ function EmployeeForm({
|
|
|
15287
15922
|
emailRequired = "Email is required",
|
|
15288
15923
|
dobRequired = "Date of birth is required"
|
|
15289
15924
|
} = labels;
|
|
15290
|
-
const [firstName, setFirstName] =
|
|
15291
|
-
const [lastName, setLastName] =
|
|
15292
|
-
const [email, setEmail] =
|
|
15293
|
-
const [dob, setDob] =
|
|
15294
|
-
const [selectedDepartments, setSelectedDepartments] =
|
|
15295
|
-
const [title, setTitle] =
|
|
15296
|
-
const [address, setAddress] =
|
|
15925
|
+
const [firstName, setFirstName] = React49__namespace.useState(initialData.firstName ?? "");
|
|
15926
|
+
const [lastName, setLastName] = React49__namespace.useState(initialData.lastName ?? "");
|
|
15927
|
+
const [email, setEmail] = React49__namespace.useState(initialData.email ?? "");
|
|
15928
|
+
const [dob, setDob] = React49__namespace.useState(initialData.dob ?? "");
|
|
15929
|
+
const [selectedDepartments, setSelectedDepartments] = React49__namespace.useState(initialData.departments ?? []);
|
|
15930
|
+
const [title, setTitle] = React49__namespace.useState(initialData.title ?? "");
|
|
15931
|
+
const [address, setAddress] = React49__namespace.useState(
|
|
15297
15932
|
initialData.address ?? {}
|
|
15298
15933
|
);
|
|
15299
|
-
const [phones, setPhones] =
|
|
15934
|
+
const [phones, setPhones] = React49__namespace.useState(
|
|
15300
15935
|
initialData.phones ?? [{ number: "", type: "cell" }]
|
|
15301
15936
|
);
|
|
15302
|
-
const [isActive, setIsActive] =
|
|
15303
|
-
const [additionalInfo, setAdditionalInfo] =
|
|
15937
|
+
const [isActive, setIsActive] = React49__namespace.useState(initialData.isActive ?? true);
|
|
15938
|
+
const [additionalInfo, setAdditionalInfo] = React49__namespace.useState(
|
|
15304
15939
|
initialData.additionalInfo ?? ""
|
|
15305
15940
|
);
|
|
15306
|
-
const [sendInvite, setSendInvite] =
|
|
15307
|
-
const [errors, setErrors] =
|
|
15941
|
+
const [sendInvite, setSendInvite] = React49__namespace.useState(false);
|
|
15942
|
+
const [errors, setErrors] = React49__namespace.useState({});
|
|
15308
15943
|
const validate = () => {
|
|
15309
15944
|
const newErrors = {};
|
|
15310
15945
|
if (!firstName.trim()) newErrors.firstName = firstNameRequired;
|
|
@@ -15723,8 +16358,8 @@ function EmployeeProfileCard({
|
|
|
15723
16358
|
className,
|
|
15724
16359
|
labels = {}
|
|
15725
16360
|
}) {
|
|
15726
|
-
const [isExpanded, setIsExpanded] =
|
|
15727
|
-
const fileInputRef =
|
|
16361
|
+
const [isExpanded, setIsExpanded] = React49__namespace.useState(defaultExpanded);
|
|
16362
|
+
const fileInputRef = React49__namespace.useRef(null);
|
|
15728
16363
|
const {
|
|
15729
16364
|
moreDetails = "more details",
|
|
15730
16365
|
lessDetails = "less details",
|
|
@@ -16257,13 +16892,13 @@ function EmployerList({
|
|
|
16257
16892
|
emptyMessage = "No employers linked yet",
|
|
16258
16893
|
className = ""
|
|
16259
16894
|
}) {
|
|
16260
|
-
const [searchQuery, setSearchQuery] =
|
|
16895
|
+
const [searchQuery, setSearchQuery] = React49__namespace.useState("");
|
|
16261
16896
|
const handleSearch = (e) => {
|
|
16262
16897
|
const query = e.target.value;
|
|
16263
16898
|
setSearchQuery(query);
|
|
16264
16899
|
onSearch?.(query);
|
|
16265
16900
|
};
|
|
16266
|
-
const filteredEmployers =
|
|
16901
|
+
const filteredEmployers = React49__namespace.useMemo(() => {
|
|
16267
16902
|
if (!searchQuery.trim()) return employers;
|
|
16268
16903
|
const q = searchQuery.toLowerCase();
|
|
16269
16904
|
return employers.filter(
|
|
@@ -16912,7 +17547,7 @@ function EmployerServiceModal({
|
|
|
16912
17547
|
isSubmitting = false,
|
|
16913
17548
|
errorMessage
|
|
16914
17549
|
}) {
|
|
16915
|
-
const [config, setConfig] =
|
|
17550
|
+
const [config, setConfig] = React49__namespace.useState({
|
|
16916
17551
|
serviceId: service?.id || "",
|
|
16917
17552
|
employerId: employer?.id || "",
|
|
16918
17553
|
customPrice: existingConfig?.customPrice,
|
|
@@ -16924,7 +17559,7 @@ function EmployerServiceModal({
|
|
|
16924
17559
|
notes: existingConfig?.notes,
|
|
16925
17560
|
billingCode: existingConfig?.billingCode
|
|
16926
17561
|
});
|
|
16927
|
-
|
|
17562
|
+
React49__namespace.useEffect(() => {
|
|
16928
17563
|
setConfig({
|
|
16929
17564
|
serviceId: service?.id || "",
|
|
16930
17565
|
employerId: employer?.id || "",
|
|
@@ -17801,8 +18436,8 @@ function FileManager({
|
|
|
17801
18436
|
errorMessage,
|
|
17802
18437
|
className = ""
|
|
17803
18438
|
}) {
|
|
17804
|
-
const [isDragging, setIsDragging] =
|
|
17805
|
-
const fileInputRef =
|
|
18439
|
+
const [isDragging, setIsDragging] = React49__namespace.useState(false);
|
|
18440
|
+
const fileInputRef = React49__namespace.useRef(null);
|
|
17806
18441
|
const hasActions = !!(onPreview || onDownload || onDelete);
|
|
17807
18442
|
const handleDragOver = (e) => {
|
|
17808
18443
|
e.preventDefault();
|
|
@@ -17987,10 +18622,10 @@ function FileRowActionMenu({
|
|
|
17987
18622
|
onDownload,
|
|
17988
18623
|
onDelete
|
|
17989
18624
|
}) {
|
|
17990
|
-
const [open, setOpen] =
|
|
17991
|
-
const menuRef =
|
|
17992
|
-
const buttonRef =
|
|
17993
|
-
|
|
18625
|
+
const [open, setOpen] = React49__namespace.useState(false);
|
|
18626
|
+
const menuRef = React49__namespace.useRef(null);
|
|
18627
|
+
const buttonRef = React49__namespace.useRef(null);
|
|
18628
|
+
React49__namespace.useEffect(() => {
|
|
17994
18629
|
if (!open) return;
|
|
17995
18630
|
function handleClick(e) {
|
|
17996
18631
|
if (menuRef.current && !menuRef.current.contains(e.target) && buttonRef.current && !buttonRef.current.contains(e.target)) {
|
|
@@ -18000,7 +18635,7 @@ function FileRowActionMenu({
|
|
|
18000
18635
|
document.addEventListener("mousedown", handleClick);
|
|
18001
18636
|
return () => document.removeEventListener("mousedown", handleClick);
|
|
18002
18637
|
}, [open]);
|
|
18003
|
-
|
|
18638
|
+
React49__namespace.useEffect(() => {
|
|
18004
18639
|
if (!open) return;
|
|
18005
18640
|
function handleKey(e) {
|
|
18006
18641
|
if (e.key === "Escape") setOpen(false);
|
|
@@ -18008,8 +18643,8 @@ function FileRowActionMenu({
|
|
|
18008
18643
|
document.addEventListener("keydown", handleKey);
|
|
18009
18644
|
return () => document.removeEventListener("keydown", handleKey);
|
|
18010
18645
|
}, [open]);
|
|
18011
|
-
const [menuPos, setMenuPos] =
|
|
18012
|
-
|
|
18646
|
+
const [menuPos, setMenuPos] = React49__namespace.useState(null);
|
|
18647
|
+
React49__namespace.useLayoutEffect(() => {
|
|
18013
18648
|
if (!open || !buttonRef.current) return;
|
|
18014
18649
|
function updatePosition() {
|
|
18015
18650
|
if (!buttonRef.current) return;
|
|
@@ -18129,14 +18764,14 @@ function HelpSupportPanel({
|
|
|
18129
18764
|
successMessage,
|
|
18130
18765
|
className = ""
|
|
18131
18766
|
}) {
|
|
18132
|
-
const [searchTerm, setSearchTerm] =
|
|
18133
|
-
const [expandedFaq, setExpandedFaq] =
|
|
18134
|
-
const [formData, setFormData] =
|
|
18767
|
+
const [searchTerm, setSearchTerm] = React49__namespace.useState("");
|
|
18768
|
+
const [expandedFaq, setExpandedFaq] = React49__namespace.useState(null);
|
|
18769
|
+
const [formData, setFormData] = React49__namespace.useState({
|
|
18135
18770
|
subject: "",
|
|
18136
18771
|
message: "",
|
|
18137
18772
|
email: ""
|
|
18138
18773
|
});
|
|
18139
|
-
const [showSuccess, setShowSuccess] =
|
|
18774
|
+
const [showSuccess, setShowSuccess] = React49__namespace.useState(false);
|
|
18140
18775
|
const filteredFaqs = faqs.filter(
|
|
18141
18776
|
(faq) => faq.question.toLowerCase().includes(searchTerm.toLowerCase()) || faq.answer.toLowerCase().includes(searchTerm.toLowerCase())
|
|
18142
18777
|
);
|
|
@@ -18608,7 +19243,7 @@ function HRISProviderSelector({
|
|
|
18608
19243
|
syncPending = "We are still waiting on data from your HRIS Provider. Please check back later.",
|
|
18609
19244
|
supportEmail = "support@bluehive.com"
|
|
18610
19245
|
} = labels;
|
|
18611
|
-
const filteredProviders =
|
|
19246
|
+
const filteredProviders = React49__namespace.useMemo(() => {
|
|
18612
19247
|
if (!searchQuery.trim()) return providers;
|
|
18613
19248
|
const query = searchQuery.toLowerCase();
|
|
18614
19249
|
return providers.filter((p) => p.displayName.toLowerCase().includes(query));
|
|
@@ -18895,11 +19530,11 @@ function InventoryManager({
|
|
|
18895
19530
|
isLoading = false,
|
|
18896
19531
|
className = ""
|
|
18897
19532
|
}) {
|
|
18898
|
-
const [updateType, setUpdateType] =
|
|
19533
|
+
const [updateType, setUpdateType] = React49__namespace.useState(
|
|
18899
19534
|
"credit"
|
|
18900
19535
|
);
|
|
18901
|
-
const [updateAmount, setUpdateAmount] =
|
|
18902
|
-
const [updateMemo, setUpdateMemo] =
|
|
19536
|
+
const [updateAmount, setUpdateAmount] = React49__namespace.useState("");
|
|
19537
|
+
const [updateMemo, setUpdateMemo] = React49__namespace.useState("");
|
|
18903
19538
|
const handleSubmit = () => {
|
|
18904
19539
|
if (!updateAmount || !onUpdateSubmit) return;
|
|
18905
19540
|
const amount = parseInt(updateAmount, 10);
|
|
@@ -18965,7 +19600,7 @@ function InventoryManager({
|
|
|
18965
19600
|
/* @__PURE__ */ jsxRuntime.jsx("th", { className: "text-muted-foreground py-2 text-left text-xs font-medium tracking-wider uppercase", children: "Change" }),
|
|
18966
19601
|
/* @__PURE__ */ jsxRuntime.jsx("th", { className: "text-muted-foreground py-2 text-right text-xs font-medium tracking-wider uppercase", children: "Quantity" })
|
|
18967
19602
|
] }) }),
|
|
18968
|
-
/* @__PURE__ */ jsxRuntime.jsx("tbody", { className: "divide-border/50 divide-y", children: logEntries.map((entry) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
19603
|
+
/* @__PURE__ */ jsxRuntime.jsx("tbody", { className: "divide-border/50 divide-y", children: logEntries.map((entry) => /* @__PURE__ */ jsxRuntime.jsxs(React49__namespace.Fragment, { children: [
|
|
18969
19604
|
/* @__PURE__ */ jsxRuntime.jsxs("tr", { children: [
|
|
18970
19605
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
18971
19606
|
"td",
|
|
@@ -19199,12 +19834,12 @@ function InviteUserModal({
|
|
|
19199
19834
|
errorMessage,
|
|
19200
19835
|
successMessage
|
|
19201
19836
|
}) {
|
|
19202
|
-
const [email, setEmail] =
|
|
19203
|
-
const [firstName, setFirstName] =
|
|
19204
|
-
const [lastName, setLastName] =
|
|
19205
|
-
const [roleId, setRoleId] =
|
|
19206
|
-
const [message, setMessage] =
|
|
19207
|
-
|
|
19837
|
+
const [email, setEmail] = React49__namespace.useState("");
|
|
19838
|
+
const [firstName, setFirstName] = React49__namespace.useState("");
|
|
19839
|
+
const [lastName, setLastName] = React49__namespace.useState("");
|
|
19840
|
+
const [roleId, setRoleId] = React49__namespace.useState(defaultRoleId || "");
|
|
19841
|
+
const [message, setMessage] = React49__namespace.useState("");
|
|
19842
|
+
React49__namespace.useEffect(() => {
|
|
19208
19843
|
if (!open) {
|
|
19209
19844
|
setEmail("");
|
|
19210
19845
|
setFirstName("");
|
|
@@ -19444,7 +20079,7 @@ function InvoiceList({
|
|
|
19444
20079
|
currency = "$",
|
|
19445
20080
|
className = ""
|
|
19446
20081
|
}) {
|
|
19447
|
-
const [searchQuery, setSearchQuery] =
|
|
20082
|
+
const [searchQuery, setSearchQuery] = React49__namespace.useState("");
|
|
19448
20083
|
const handleSearch = (e) => {
|
|
19449
20084
|
const query = e.target.value;
|
|
19450
20085
|
setSearchQuery(query);
|
|
@@ -19481,7 +20116,7 @@ function InvoiceList({
|
|
|
19481
20116
|
{ value: "overdue", label: "Overdue" },
|
|
19482
20117
|
{ value: "cancelled", label: "Cancelled" }
|
|
19483
20118
|
];
|
|
19484
|
-
const filteredInvoices =
|
|
20119
|
+
const filteredInvoices = React49__namespace.useMemo(() => {
|
|
19485
20120
|
let result = invoices;
|
|
19486
20121
|
if (statusFilter !== "all") {
|
|
19487
20122
|
result = result.filter((inv) => inv.status === statusFilter);
|
|
@@ -19494,7 +20129,7 @@ function InvoiceList({
|
|
|
19494
20129
|
}
|
|
19495
20130
|
return result;
|
|
19496
20131
|
}, [invoices, statusFilter, searchQuery]);
|
|
19497
|
-
const totals =
|
|
20132
|
+
const totals = React49__namespace.useMemo(() => {
|
|
19498
20133
|
return {
|
|
19499
20134
|
total: filteredInvoices.reduce((sum, inv) => sum + inv.amount, 0),
|
|
19500
20135
|
paid: filteredInvoices.filter((inv) => inv.status === "paid").reduce((sum, inv) => sum + inv.amount, 0),
|
|
@@ -19718,16 +20353,16 @@ function InvoicePaymentPage({
|
|
|
19718
20353
|
showStripeBranding = true,
|
|
19719
20354
|
className = ""
|
|
19720
20355
|
}) {
|
|
19721
|
-
const [paymentMethod, setPaymentMethod] =
|
|
20356
|
+
const [paymentMethod, setPaymentMethod] = React49__namespace.useState(
|
|
19722
20357
|
acceptedMethods[0] || "card"
|
|
19723
20358
|
);
|
|
19724
|
-
const [name, setName] =
|
|
19725
|
-
const [email, setEmail] =
|
|
19726
|
-
const [cardNumber, setCardNumber] =
|
|
19727
|
-
const [expiry, setExpiry] =
|
|
19728
|
-
const [cvc, setCvc] =
|
|
19729
|
-
const [routingNumber, setRoutingNumber] =
|
|
19730
|
-
const [accountNumber, setAccountNumber] =
|
|
20359
|
+
const [name, setName] = React49__namespace.useState("");
|
|
20360
|
+
const [email, setEmail] = React49__namespace.useState("");
|
|
20361
|
+
const [cardNumber, setCardNumber] = React49__namespace.useState("");
|
|
20362
|
+
const [expiry, setExpiry] = React49__namespace.useState("");
|
|
20363
|
+
const [cvc, setCvc] = React49__namespace.useState("");
|
|
20364
|
+
const [routingNumber, setRoutingNumber] = React49__namespace.useState("");
|
|
20365
|
+
const [accountNumber, setAccountNumber] = React49__namespace.useState("");
|
|
19731
20366
|
const formatCurrency3 = (amount) => {
|
|
19732
20367
|
return `${currency}${amount.toLocaleString(void 0, { minimumFractionDigits: 2, maximumFractionDigits: 2 })}`;
|
|
19733
20368
|
};
|
|
@@ -20532,10 +21167,10 @@ function LanguageSelector({
|
|
|
20532
21167
|
disabled = false,
|
|
20533
21168
|
className
|
|
20534
21169
|
}) {
|
|
20535
|
-
const [isOpen, setIsOpen] =
|
|
20536
|
-
const containerRef =
|
|
21170
|
+
const [isOpen, setIsOpen] = React49__namespace.useState(false);
|
|
21171
|
+
const containerRef = React49__namespace.useRef(null);
|
|
20537
21172
|
const selectedLanguage = languages.find((l) => l.code === value);
|
|
20538
|
-
|
|
21173
|
+
React49__namespace.useEffect(() => {
|
|
20539
21174
|
const handleClickOutside = (e) => {
|
|
20540
21175
|
if (containerRef.current && !containerRef.current.contains(e.target)) {
|
|
20541
21176
|
setIsOpen(false);
|
|
@@ -20544,7 +21179,7 @@ function LanguageSelector({
|
|
|
20544
21179
|
document.addEventListener("mousedown", handleClickOutside);
|
|
20545
21180
|
return () => document.removeEventListener("mousedown", handleClickOutside);
|
|
20546
21181
|
}, []);
|
|
20547
|
-
|
|
21182
|
+
React49__namespace.useEffect(() => {
|
|
20548
21183
|
const handleEscape = (e) => {
|
|
20549
21184
|
if (e.key === "Escape") setIsOpen(false);
|
|
20550
21185
|
};
|
|
@@ -21076,7 +21711,7 @@ function formatLastSeen(date) {
|
|
|
21076
21711
|
if (diffDays < 7) return `${diffDays}d ago`;
|
|
21077
21712
|
return date.toLocaleDateString();
|
|
21078
21713
|
}
|
|
21079
|
-
var ConversationHeader =
|
|
21714
|
+
var ConversationHeader = React49__namespace.forwardRef(
|
|
21080
21715
|
({
|
|
21081
21716
|
className,
|
|
21082
21717
|
size,
|
|
@@ -21198,7 +21833,7 @@ var ConversationHeader = React48__namespace.forwardRef(
|
|
|
21198
21833
|
}
|
|
21199
21834
|
);
|
|
21200
21835
|
ConversationHeader.displayName = "ConversationHeader";
|
|
21201
|
-
var ConversationListItem =
|
|
21836
|
+
var ConversationListItem = React49__namespace.forwardRef(({ className, conversation, isSelected, onSelect, ...props }, ref) => {
|
|
21202
21837
|
const participant = conversation.participants.find((p) => !p.isCurrentUser);
|
|
21203
21838
|
const title = getConversationTitle(conversation, participant);
|
|
21204
21839
|
const avatarUrl = conversation.avatarUrl || participant?.avatarUrl;
|
|
@@ -21406,7 +22041,7 @@ function ConversationListSkeleton({
|
|
|
21406
22041
|
}
|
|
21407
22042
|
ConversationListSkeleton.displayName = "ConversationListSkeleton";
|
|
21408
22043
|
function LightboxModal({ attachment, onClose }) {
|
|
21409
|
-
|
|
22044
|
+
React49__namespace.useEffect(() => {
|
|
21410
22045
|
const handleKeyDown = (event) => {
|
|
21411
22046
|
if (event.key === "Escape") {
|
|
21412
22047
|
onClose();
|
|
@@ -21503,7 +22138,7 @@ function LightboxModal({ attachment, onClose }) {
|
|
|
21503
22138
|
);
|
|
21504
22139
|
}
|
|
21505
22140
|
LightboxModal.displayName = "LightboxModal";
|
|
21506
|
-
var MessageThread =
|
|
22141
|
+
var MessageThread = React49__namespace.forwardRef(
|
|
21507
22142
|
({
|
|
21508
22143
|
conversation,
|
|
21509
22144
|
messages,
|
|
@@ -21534,8 +22169,8 @@ var MessageThread = React48__namespace.forwardRef(
|
|
|
21534
22169
|
onError,
|
|
21535
22170
|
className
|
|
21536
22171
|
}, ref) => {
|
|
21537
|
-
const [lightboxAttachment, setLightboxAttachment] =
|
|
21538
|
-
const [replyTo, setReplyTo] =
|
|
22172
|
+
const [lightboxAttachment, setLightboxAttachment] = React49__namespace.useState(null);
|
|
22173
|
+
const [replyTo, setReplyTo] = React49__namespace.useState(null);
|
|
21539
22174
|
const participant = conversation?.type === "direct" ? conversation.participants.find((p) => p.id !== currentUser.id) : void 0;
|
|
21540
22175
|
const handleAttachmentClick = (attachment, message) => {
|
|
21541
22176
|
if (attachment.type === "image" || attachment.type === "video") {
|
|
@@ -21707,13 +22342,13 @@ function useMessages(options) {
|
|
|
21707
22342
|
onRetry,
|
|
21708
22343
|
onLoadMore
|
|
21709
22344
|
} = options;
|
|
21710
|
-
const [messages, setMessages] =
|
|
21711
|
-
const [isSending, setIsSending] =
|
|
21712
|
-
const [isLoadingMore, setIsLoadingMore] =
|
|
21713
|
-
|
|
22345
|
+
const [messages, setMessages] = React49__namespace.useState(initialMessages);
|
|
22346
|
+
const [isSending, setIsSending] = React49__namespace.useState(false);
|
|
22347
|
+
const [isLoadingMore, setIsLoadingMore] = React49__namespace.useState(false);
|
|
22348
|
+
React49__namespace.useEffect(() => {
|
|
21714
22349
|
setMessages(initialMessages);
|
|
21715
22350
|
}, [initialMessages]);
|
|
21716
|
-
const addMessage =
|
|
22351
|
+
const addMessage = React49__namespace.useCallback((message) => {
|
|
21717
22352
|
setMessages((prev) => {
|
|
21718
22353
|
if (prev.some((m) => m.id === message.id)) {
|
|
21719
22354
|
return prev;
|
|
@@ -21721,7 +22356,7 @@ function useMessages(options) {
|
|
|
21721
22356
|
return [...prev, message];
|
|
21722
22357
|
});
|
|
21723
22358
|
}, []);
|
|
21724
|
-
const updateMessage =
|
|
22359
|
+
const updateMessage = React49__namespace.useCallback(
|
|
21725
22360
|
(messageId, updates) => {
|
|
21726
22361
|
setMessages(
|
|
21727
22362
|
(prev) => prev.map((m) => m.id === messageId ? { ...m, ...updates } : m)
|
|
@@ -21729,22 +22364,22 @@ function useMessages(options) {
|
|
|
21729
22364
|
},
|
|
21730
22365
|
[]
|
|
21731
22366
|
);
|
|
21732
|
-
const removeMessage =
|
|
22367
|
+
const removeMessage = React49__namespace.useCallback((messageId) => {
|
|
21733
22368
|
setMessages((prev) => prev.filter((m) => m.id !== messageId));
|
|
21734
22369
|
}, []);
|
|
21735
|
-
const updateStatus =
|
|
22370
|
+
const updateStatus = React49__namespace.useCallback(
|
|
21736
22371
|
(messageId, status) => {
|
|
21737
22372
|
updateMessage(messageId, { status });
|
|
21738
22373
|
},
|
|
21739
22374
|
[updateMessage]
|
|
21740
22375
|
);
|
|
21741
|
-
const markAsRead =
|
|
22376
|
+
const markAsRead = React49__namespace.useCallback(
|
|
21742
22377
|
(messageId) => {
|
|
21743
22378
|
updateStatus(messageId, "read");
|
|
21744
22379
|
},
|
|
21745
22380
|
[updateStatus]
|
|
21746
22381
|
);
|
|
21747
|
-
const sendMessage =
|
|
22382
|
+
const sendMessage = React49__namespace.useCallback(
|
|
21748
22383
|
async (newMessage) => {
|
|
21749
22384
|
const optimisticId = `optimistic-${Date.now()}`;
|
|
21750
22385
|
const optimisticMessage = {
|
|
@@ -21776,7 +22411,7 @@ function useMessages(options) {
|
|
|
21776
22411
|
},
|
|
21777
22412
|
[currentUser, onSend, addMessage, updateStatus]
|
|
21778
22413
|
);
|
|
21779
|
-
const retryMessage =
|
|
22414
|
+
const retryMessage = React49__namespace.useCallback(
|
|
21780
22415
|
async (messageId) => {
|
|
21781
22416
|
updateStatus(messageId, "sending");
|
|
21782
22417
|
try {
|
|
@@ -21790,7 +22425,7 @@ function useMessages(options) {
|
|
|
21790
22425
|
},
|
|
21791
22426
|
[onRetry, updateStatus]
|
|
21792
22427
|
);
|
|
21793
|
-
const loadMore =
|
|
22428
|
+
const loadMore = React49__namespace.useCallback(async () => {
|
|
21794
22429
|
if (isLoadingMore || !onLoadMore) return;
|
|
21795
22430
|
setIsLoadingMore(true);
|
|
21796
22431
|
try {
|
|
@@ -21821,13 +22456,13 @@ function useTypingIndicator(options = {}) {
|
|
|
21821
22456
|
onTypingStart,
|
|
21822
22457
|
onTypingStop
|
|
21823
22458
|
} = options;
|
|
21824
|
-
const [participants, setParticipants] =
|
|
21825
|
-
const [isLocalTyping, setIsLocalTyping] =
|
|
21826
|
-
const typingTimeoutRef =
|
|
21827
|
-
|
|
22459
|
+
const [participants, setParticipants] = React49__namespace.useState(initialParticipants);
|
|
22460
|
+
const [isLocalTyping, setIsLocalTyping] = React49__namespace.useState(false);
|
|
22461
|
+
const typingTimeoutRef = React49__namespace.useRef(null);
|
|
22462
|
+
React49__namespace.useEffect(() => {
|
|
21828
22463
|
setParticipants(initialParticipants);
|
|
21829
22464
|
}, [initialParticipants]);
|
|
21830
|
-
const startTyping =
|
|
22465
|
+
const startTyping = React49__namespace.useCallback(() => {
|
|
21831
22466
|
if (!isLocalTyping) {
|
|
21832
22467
|
setIsLocalTyping(true);
|
|
21833
22468
|
onTypingStart?.();
|
|
@@ -21840,21 +22475,21 @@ function useTypingIndicator(options = {}) {
|
|
|
21840
22475
|
onTypingStop?.();
|
|
21841
22476
|
}, debounceTime);
|
|
21842
22477
|
}, [isLocalTyping, debounceTime, onTypingStart, onTypingStop]);
|
|
21843
|
-
const stopTyping =
|
|
22478
|
+
const stopTyping = React49__namespace.useCallback(() => {
|
|
21844
22479
|
if (typingTimeoutRef.current) {
|
|
21845
22480
|
clearTimeout(typingTimeoutRef.current);
|
|
21846
22481
|
}
|
|
21847
22482
|
setIsLocalTyping(false);
|
|
21848
22483
|
onTypingStop?.();
|
|
21849
22484
|
}, [onTypingStop]);
|
|
21850
|
-
|
|
22485
|
+
React49__namespace.useEffect(() => {
|
|
21851
22486
|
return () => {
|
|
21852
22487
|
if (typingTimeoutRef.current) {
|
|
21853
22488
|
clearTimeout(typingTimeoutRef.current);
|
|
21854
22489
|
}
|
|
21855
22490
|
};
|
|
21856
22491
|
}, []);
|
|
21857
|
-
const typingState =
|
|
22492
|
+
const typingState = React49__namespace.useMemo(
|
|
21858
22493
|
() => ({
|
|
21859
22494
|
participants,
|
|
21860
22495
|
lastUpdated: /* @__PURE__ */ new Date()
|
|
@@ -21870,11 +22505,11 @@ function useTypingIndicator(options = {}) {
|
|
|
21870
22505
|
}
|
|
21871
22506
|
function useMessageScroll(options) {
|
|
21872
22507
|
const { messages, currentUserId, threshold = 100 } = options;
|
|
21873
|
-
const scrollContainerRef =
|
|
21874
|
-
const bottomRef =
|
|
21875
|
-
const [isScrolledUp, setIsScrolledUp] =
|
|
21876
|
-
const prevMessageCountRef =
|
|
21877
|
-
|
|
22508
|
+
const scrollContainerRef = React49__namespace.useRef(null);
|
|
22509
|
+
const bottomRef = React49__namespace.useRef(null);
|
|
22510
|
+
const [isScrolledUp, setIsScrolledUp] = React49__namespace.useState(false);
|
|
22511
|
+
const prevMessageCountRef = React49__namespace.useRef(messages.length);
|
|
22512
|
+
React49__namespace.useEffect(() => {
|
|
21878
22513
|
const container = scrollContainerRef.current;
|
|
21879
22514
|
if (!container) return;
|
|
21880
22515
|
const handleScroll = () => {
|
|
@@ -21885,12 +22520,12 @@ function useMessageScroll(options) {
|
|
|
21885
22520
|
container.addEventListener("scroll", handleScroll);
|
|
21886
22521
|
return () => container.removeEventListener("scroll", handleScroll);
|
|
21887
22522
|
}, [threshold]);
|
|
21888
|
-
const scrollToBottom =
|
|
22523
|
+
const scrollToBottom = React49__namespace.useCallback((smooth = true) => {
|
|
21889
22524
|
bottomRef.current?.scrollIntoView({
|
|
21890
22525
|
behavior: smooth ? "smooth" : "auto"
|
|
21891
22526
|
});
|
|
21892
22527
|
}, []);
|
|
21893
|
-
|
|
22528
|
+
React49__namespace.useEffect(() => {
|
|
21894
22529
|
const messageCountChanged = messages.length !== prevMessageCountRef.current;
|
|
21895
22530
|
prevMessageCountRef.current = messages.length;
|
|
21896
22531
|
if (!messageCountChanged) return;
|
|
@@ -21909,9 +22544,9 @@ function useMessageScroll(options) {
|
|
|
21909
22544
|
}
|
|
21910
22545
|
function useReadReceipts(options) {
|
|
21911
22546
|
const { currentUserId, onMarkRead, threshold = 0.5 } = options;
|
|
21912
|
-
const observerRef =
|
|
21913
|
-
const observedMessagesRef =
|
|
21914
|
-
|
|
22547
|
+
const observerRef = React49__namespace.useRef(null);
|
|
22548
|
+
const observedMessagesRef = React49__namespace.useRef(/* @__PURE__ */ new Set());
|
|
22549
|
+
React49__namespace.useEffect(() => {
|
|
21915
22550
|
observerRef.current = new IntersectionObserver(
|
|
21916
22551
|
(entries) => {
|
|
21917
22552
|
entries.forEach((entry) => {
|
|
@@ -21930,7 +22565,7 @@ function useReadReceipts(options) {
|
|
|
21930
22565
|
observerRef.current?.disconnect();
|
|
21931
22566
|
};
|
|
21932
22567
|
}, [onMarkRead, threshold]);
|
|
21933
|
-
const observeMessage =
|
|
22568
|
+
const observeMessage = React49__namespace.useCallback(
|
|
21934
22569
|
(element, message) => {
|
|
21935
22570
|
if (!element || !observerRef.current) return;
|
|
21936
22571
|
if (message.sender.id !== currentUserId && message.status !== "read" && !observedMessagesRef.current.has(message.id)) {
|
|
@@ -22885,13 +23520,13 @@ function OrderConfirmationWizard({
|
|
|
22885
23520
|
stepTitles = ["Verify Employee", "Consent & ID", "Confirmation"],
|
|
22886
23521
|
className = ""
|
|
22887
23522
|
}) {
|
|
22888
|
-
const [step, setStep] =
|
|
22889
|
-
const [employeeVerified, setEmployeeVerified] =
|
|
22890
|
-
const [verificationNotes, setVerificationNotes] =
|
|
22891
|
-
const [consentObtained, setConsentObtained] =
|
|
22892
|
-
const [idVerified, setIdVerified] =
|
|
22893
|
-
const [idType, setIdType] =
|
|
22894
|
-
const [confirmationNotes, setConfirmationNotes] =
|
|
23523
|
+
const [step, setStep] = React49__namespace.useState(initialStep);
|
|
23524
|
+
const [employeeVerified, setEmployeeVerified] = React49__namespace.useState(false);
|
|
23525
|
+
const [verificationNotes, setVerificationNotes] = React49__namespace.useState("");
|
|
23526
|
+
const [consentObtained, setConsentObtained] = React49__namespace.useState(false);
|
|
23527
|
+
const [idVerified, setIdVerified] = React49__namespace.useState(false);
|
|
23528
|
+
const [idType, setIdType] = React49__namespace.useState("");
|
|
23529
|
+
const [confirmationNotes, setConfirmationNotes] = React49__namespace.useState("");
|
|
22895
23530
|
const handleStepChange = (newStep) => {
|
|
22896
23531
|
setStep(newStep);
|
|
22897
23532
|
onStepChange?.(newStep);
|
|
@@ -22919,7 +23554,7 @@ function OrderConfirmationWizard({
|
|
|
22919
23554
|
const stepNum = index + 1;
|
|
22920
23555
|
const isActive = step === stepNum;
|
|
22921
23556
|
const isComplete = step > stepNum;
|
|
22922
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
23557
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(React49__namespace.Fragment, { children: [
|
|
22923
23558
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col items-center", children: [
|
|
22924
23559
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
22925
23560
|
"div",
|
|
@@ -23504,7 +24139,7 @@ function OrderList({
|
|
|
23504
24139
|
actions,
|
|
23505
24140
|
className
|
|
23506
24141
|
}) {
|
|
23507
|
-
const filteredOrders =
|
|
24142
|
+
const filteredOrders = React49__namespace.useMemo(() => {
|
|
23508
24143
|
const activeTabConfig = tabs.find((t) => t.id === activeTab);
|
|
23509
24144
|
if (!activeTabConfig?.statuses || !getOrderStatus) {
|
|
23510
24145
|
return orders;
|
|
@@ -23513,7 +24148,7 @@ function OrderList({
|
|
|
23513
24148
|
(order) => activeTabConfig.statuses.includes(getOrderStatus(order))
|
|
23514
24149
|
);
|
|
23515
24150
|
}, [orders, activeTab, tabs, getOrderStatus]);
|
|
23516
|
-
const tabCounts =
|
|
24151
|
+
const tabCounts = React49__namespace.useMemo(() => {
|
|
23517
24152
|
if (!getOrderStatus) return {};
|
|
23518
24153
|
const counts = {};
|
|
23519
24154
|
tabs.forEach((tab) => {
|
|
@@ -23737,7 +24372,7 @@ function OrderLookupForm({
|
|
|
23737
24372
|
welcomeMessage = "Look up your order by entering the information below.",
|
|
23738
24373
|
className = ""
|
|
23739
24374
|
}) {
|
|
23740
|
-
const [formData, setFormData] =
|
|
24375
|
+
const [formData, setFormData] = React49__namespace.useState({
|
|
23741
24376
|
orderNumber: "",
|
|
23742
24377
|
dateOfBirth: "",
|
|
23743
24378
|
lastName: ""
|
|
@@ -24271,14 +24906,14 @@ function OverflowMenuItem({
|
|
|
24271
24906
|
function PatientOverflowMenu({
|
|
24272
24907
|
onAction
|
|
24273
24908
|
}) {
|
|
24274
|
-
const [open, setOpen] =
|
|
24275
|
-
const menuRef =
|
|
24909
|
+
const [open, setOpen] = React49__namespace.useState(false);
|
|
24910
|
+
const menuRef = React49__namespace.useRef(null);
|
|
24276
24911
|
chunkIKMR2ADM_cjs.useClickOutside(
|
|
24277
24912
|
menuRef,
|
|
24278
|
-
|
|
24913
|
+
React49__namespace.useCallback(() => setOpen(false), [])
|
|
24279
24914
|
);
|
|
24280
24915
|
chunkFHY3K6PL_cjs.useEscapeKey(
|
|
24281
|
-
|
|
24916
|
+
React49__namespace.useCallback(() => setOpen(false), []),
|
|
24282
24917
|
open
|
|
24283
24918
|
);
|
|
24284
24919
|
const handleAction = (action) => {
|
|
@@ -24463,7 +25098,7 @@ function AlertRow({ comments }) {
|
|
|
24463
25098
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-foreground text-sm", children: comments.join("; ") })
|
|
24464
25099
|
] });
|
|
24465
25100
|
}
|
|
24466
|
-
var PatientHeader =
|
|
25101
|
+
var PatientHeader = React49__namespace.forwardRef(
|
|
24467
25102
|
({
|
|
24468
25103
|
patient,
|
|
24469
25104
|
allergies = [],
|
|
@@ -24492,13 +25127,13 @@ var PatientHeader = React48__namespace.forwardRef(
|
|
|
24492
25127
|
const hasComments = showCommentsBanner && comments.length > 0;
|
|
24493
25128
|
const hasProviders = showProviderBanner && !!(patient.attendingProvider || patient.familyProvider);
|
|
24494
25129
|
const hasInfoRows = hasAllergies || hasMedications || hasComments || hasProviders;
|
|
24495
|
-
const [addModalType, setAddModalType] =
|
|
24496
|
-
const [addForm, setAddForm] =
|
|
25130
|
+
const [addModalType, setAddModalType] = React49__namespace.useState(null);
|
|
25131
|
+
const [addForm, setAddForm] = React49__namespace.useState({});
|
|
24497
25132
|
const addEntityLabel = addModalType ? ADD_ENTITY_LABELS[addModalType] ?? "" : "";
|
|
24498
|
-
const [contactModalOpen, setContactModalOpen] =
|
|
24499
|
-
const [editPatientOpen, setEditPatientOpen] =
|
|
24500
|
-
const [editPatientForm, setEditPatientForm] =
|
|
24501
|
-
const handleOverflowAction =
|
|
25133
|
+
const [contactModalOpen, setContactModalOpen] = React49__namespace.useState(false);
|
|
25134
|
+
const [editPatientOpen, setEditPatientOpen] = React49__namespace.useState(false);
|
|
25135
|
+
const [editPatientForm, setEditPatientForm] = React49__namespace.useState({});
|
|
25136
|
+
const handleOverflowAction = React49__namespace.useCallback(
|
|
24502
25137
|
(action) => {
|
|
24503
25138
|
if (action === "contact") {
|
|
24504
25139
|
setContactModalOpen(true);
|
|
@@ -25979,7 +26614,7 @@ function PermissionItem({
|
|
|
25979
26614
|
parentChecked
|
|
25980
26615
|
}) {
|
|
25981
26616
|
const hasChildren = permission.children && permission.children.length > 0;
|
|
25982
|
-
const [isExpanded, setIsExpanded] =
|
|
26617
|
+
const [isExpanded, setIsExpanded] = React49__namespace.useState(true);
|
|
25983
26618
|
const handleChange = (checked) => {
|
|
25984
26619
|
onToggle(permission.id, checked);
|
|
25985
26620
|
if (!checked && hasChildren) {
|
|
@@ -26061,12 +26696,12 @@ function PermissionsEditor({
|
|
|
26061
26696
|
summary = "Summary",
|
|
26062
26697
|
all = "All"
|
|
26063
26698
|
} = labels;
|
|
26064
|
-
const [expandedGroups, setExpandedGroups] =
|
|
26699
|
+
const [expandedGroups, setExpandedGroups] = React49__namespace.useState(
|
|
26065
26700
|
() => new Set(
|
|
26066
26701
|
groups.filter((g) => g.defaultExpanded !== false).map((g) => g.id)
|
|
26067
26702
|
)
|
|
26068
26703
|
);
|
|
26069
|
-
const permissionMap =
|
|
26704
|
+
const permissionMap = React49__namespace.useMemo(() => {
|
|
26070
26705
|
const map = /* @__PURE__ */ new Map();
|
|
26071
26706
|
const processPermissions = (permissions) => {
|
|
26072
26707
|
permissions.forEach((perm) => {
|
|
@@ -26110,7 +26745,7 @@ function PermissionsEditor({
|
|
|
26110
26745
|
onEmployersChange([...selectedEmployers, employerId]);
|
|
26111
26746
|
}
|
|
26112
26747
|
};
|
|
26113
|
-
const assignedPermissionNames =
|
|
26748
|
+
const assignedPermissionNames = React49__namespace.useMemo(() => {
|
|
26114
26749
|
return assignedPermissions.map((id) => permissionMap.get(id)?.name).filter(Boolean);
|
|
26115
26750
|
}, [assignedPermissions, permissionMap]);
|
|
26116
26751
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: chunkOR5DRJCW_cjs.cn("space-y-6", className), "data-slot": "perm-editor", children: [
|
|
@@ -26527,7 +27162,7 @@ var logoContainerVariants = classVarianceAuthority.cva(
|
|
|
26527
27162
|
}
|
|
26528
27163
|
);
|
|
26529
27164
|
var ProviderLogo = ({ logoURL, name, variant }) => {
|
|
26530
|
-
const [hasError, setHasError] =
|
|
27165
|
+
const [hasError, setHasError] = React49__namespace.useState(false);
|
|
26531
27166
|
if (!logoURL || hasError) {
|
|
26532
27167
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
26533
27168
|
"div",
|
|
@@ -26662,7 +27297,7 @@ function formatAddressSingleLine2(address) {
|
|
|
26662
27297
|
parts.push(`${address.city}, ${address.state} ${address.postalCode}`);
|
|
26663
27298
|
return parts.join(", ");
|
|
26664
27299
|
}
|
|
26665
|
-
var ProviderCard =
|
|
27300
|
+
var ProviderCard = React49__namespace.forwardRef(
|
|
26666
27301
|
({
|
|
26667
27302
|
provider,
|
|
26668
27303
|
variant = "compact",
|
|
@@ -27147,7 +27782,7 @@ function ProviderLogo2({
|
|
|
27147
27782
|
size = "md",
|
|
27148
27783
|
className
|
|
27149
27784
|
}) {
|
|
27150
|
-
const [hasError, setHasError] =
|
|
27785
|
+
const [hasError, setHasError] = React49__namespace.useState(false);
|
|
27151
27786
|
const initials = name.split(" ").map((word) => word[0]).join("").toUpperCase().slice(0, 2);
|
|
27152
27787
|
if (!src || hasError) {
|
|
27153
27788
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -27585,7 +28220,7 @@ function ProviderDetailHeaderSkeleton({
|
|
|
27585
28220
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "h-3 w-12 rounded bg-gray-200 dark:bg-gray-700" })
|
|
27586
28221
|
] }, i)) }),
|
|
27587
28222
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "container mx-auto px-4 py-6", children: [
|
|
27588
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "mb-4 hidden items-center gap-2 sm:flex", children: [1, 2, 3, 4].map((i) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
28223
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "mb-4 hidden items-center gap-2 sm:flex", children: [1, 2, 3, 4].map((i) => /* @__PURE__ */ jsxRuntime.jsxs(React49__namespace.Fragment, { children: [
|
|
27589
28224
|
i > 1 && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "h-4 w-4 rounded-full bg-gray-200 dark:bg-gray-700" }),
|
|
27590
28225
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "h-4 w-16 rounded bg-gray-200 dark:bg-gray-700" })
|
|
27591
28226
|
] }, i)) }),
|
|
@@ -28511,7 +29146,7 @@ var SearchResultsMessage = ({
|
|
|
28511
29146
|
}
|
|
28512
29147
|
);
|
|
28513
29148
|
};
|
|
28514
|
-
var ProviderSearchBar =
|
|
29149
|
+
var ProviderSearchBar = React49__namespace.forwardRef(
|
|
28515
29150
|
({
|
|
28516
29151
|
onSearch,
|
|
28517
29152
|
onGeolocate,
|
|
@@ -28532,10 +29167,10 @@ var ProviderSearchBar = React48__namespace.forwardRef(
|
|
|
28532
29167
|
className,
|
|
28533
29168
|
...props
|
|
28534
29169
|
}, ref) => {
|
|
28535
|
-
const [internalValue, setInternalValue] =
|
|
29170
|
+
const [internalValue, setInternalValue] = React49__namespace.useState(
|
|
28536
29171
|
defaultValue || ""
|
|
28537
29172
|
);
|
|
28538
|
-
const [validationError, setValidationError] =
|
|
29173
|
+
const [validationError, setValidationError] = React49__namespace.useState(
|
|
28539
29174
|
null
|
|
28540
29175
|
);
|
|
28541
29176
|
const zipValue = value ?? internalValue;
|
|
@@ -28816,7 +29451,7 @@ function XMarkIcon({ className }) {
|
|
|
28816
29451
|
);
|
|
28817
29452
|
}
|
|
28818
29453
|
function InputField({ label, icon, className, id, ...props }) {
|
|
28819
|
-
const generatedId =
|
|
29454
|
+
const generatedId = React49__namespace.useId();
|
|
28820
29455
|
const inputId = id || generatedId;
|
|
28821
29456
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "relative", children: [
|
|
28822
29457
|
label && /* @__PURE__ */ jsxRuntime.jsx("label", { htmlFor: inputId, className: labelVariants2(), children: label }),
|
|
@@ -28840,7 +29475,7 @@ function SelectField({
|
|
|
28840
29475
|
id,
|
|
28841
29476
|
...props
|
|
28842
29477
|
}) {
|
|
28843
|
-
const generatedId =
|
|
29478
|
+
const generatedId = React49__namespace.useId();
|
|
28844
29479
|
const selectId = id || generatedId;
|
|
28845
29480
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
|
|
28846
29481
|
label && /* @__PURE__ */ jsxRuntime.jsx("label", { htmlFor: selectId, className: labelVariants2(), children: label }),
|
|
@@ -28893,12 +29528,12 @@ function ServiceMultiSelect({
|
|
|
28893
29528
|
disabled = false,
|
|
28894
29529
|
showCounts = false
|
|
28895
29530
|
}) {
|
|
28896
|
-
const [isOpen, setIsOpen] =
|
|
28897
|
-
const [searchTerm, setSearchTerm] =
|
|
28898
|
-
const containerRef =
|
|
28899
|
-
const inputRef =
|
|
28900
|
-
const listboxId =
|
|
28901
|
-
|
|
29531
|
+
const [isOpen, setIsOpen] = React49__namespace.useState(false);
|
|
29532
|
+
const [searchTerm, setSearchTerm] = React49__namespace.useState("");
|
|
29533
|
+
const containerRef = React49__namespace.useRef(null);
|
|
29534
|
+
const inputRef = React49__namespace.useRef(null);
|
|
29535
|
+
const listboxId = React49__namespace.useId();
|
|
29536
|
+
React49__namespace.useEffect(() => {
|
|
28902
29537
|
function handleClickOutside(event) {
|
|
28903
29538
|
if (containerRef.current && !containerRef.current.contains(event.target)) {
|
|
28904
29539
|
setIsOpen(false);
|
|
@@ -28907,14 +29542,14 @@ function ServiceMultiSelect({
|
|
|
28907
29542
|
document.addEventListener("mousedown", handleClickOutside);
|
|
28908
29543
|
return () => document.removeEventListener("mousedown", handleClickOutside);
|
|
28909
29544
|
}, []);
|
|
28910
|
-
const filteredServices =
|
|
29545
|
+
const filteredServices = React49__namespace.useMemo(() => {
|
|
28911
29546
|
if (!searchTerm) return services;
|
|
28912
29547
|
const lowerSearch = searchTerm.toLowerCase();
|
|
28913
29548
|
return services.filter(
|
|
28914
29549
|
(service) => service.label.toLowerCase().includes(lowerSearch) || service.category?.toLowerCase().includes(lowerSearch)
|
|
28915
29550
|
);
|
|
28916
29551
|
}, [services, searchTerm]);
|
|
28917
|
-
const groupedServices =
|
|
29552
|
+
const groupedServices = React49__namespace.useMemo(() => {
|
|
28918
29553
|
const groups = {};
|
|
28919
29554
|
filteredServices.forEach((service) => {
|
|
28920
29555
|
const category = service.category || "Other";
|
|
@@ -28923,7 +29558,7 @@ function ServiceMultiSelect({
|
|
|
28923
29558
|
});
|
|
28924
29559
|
return groups;
|
|
28925
29560
|
}, [filteredServices]);
|
|
28926
|
-
const selectedServiceObjects =
|
|
29561
|
+
const selectedServiceObjects = React49__namespace.useMemo(
|
|
28927
29562
|
() => services.filter((s) => selectedServices.includes(s.value)),
|
|
28928
29563
|
[services, selectedServices]
|
|
28929
29564
|
);
|
|
@@ -29429,10 +30064,10 @@ function ProviderSelector({
|
|
|
29429
30064
|
size = "md",
|
|
29430
30065
|
className
|
|
29431
30066
|
}) {
|
|
29432
|
-
const [isOpen, setIsOpen] =
|
|
29433
|
-
const [searchQuery, setSearchQuery] =
|
|
29434
|
-
const containerRef =
|
|
29435
|
-
|
|
30067
|
+
const [isOpen, setIsOpen] = React49__namespace.useState(false);
|
|
30068
|
+
const [searchQuery, setSearchQuery] = React49__namespace.useState("");
|
|
30069
|
+
const containerRef = React49__namespace.useRef(null);
|
|
30070
|
+
React49__namespace.useEffect(() => {
|
|
29436
30071
|
function handleClickOutside(event) {
|
|
29437
30072
|
if (containerRef.current && !containerRef.current.contains(event.target)) {
|
|
29438
30073
|
setIsOpen(false);
|
|
@@ -29441,7 +30076,7 @@ function ProviderSelector({
|
|
|
29441
30076
|
document.addEventListener("mousedown", handleClickOutside);
|
|
29442
30077
|
return () => document.removeEventListener("mousedown", handleClickOutside);
|
|
29443
30078
|
}, []);
|
|
29444
|
-
|
|
30079
|
+
React49__namespace.useEffect(() => {
|
|
29445
30080
|
function handleEscape(event) {
|
|
29446
30081
|
if (event.key === "Escape") {
|
|
29447
30082
|
setIsOpen(false);
|
|
@@ -29450,12 +30085,12 @@ function ProviderSelector({
|
|
|
29450
30085
|
document.addEventListener("keydown", handleEscape);
|
|
29451
30086
|
return () => document.removeEventListener("keydown", handleEscape);
|
|
29452
30087
|
}, []);
|
|
29453
|
-
|
|
30088
|
+
React49__namespace.useEffect(() => {
|
|
29454
30089
|
if (!isOpen) {
|
|
29455
30090
|
setSearchQuery("");
|
|
29456
30091
|
}
|
|
29457
30092
|
}, [isOpen]);
|
|
29458
|
-
const filteredProviders =
|
|
30093
|
+
const filteredProviders = React49__namespace.useMemo(() => {
|
|
29459
30094
|
if (!searchQuery) return providers;
|
|
29460
30095
|
const query = searchQuery.toLowerCase();
|
|
29461
30096
|
return providers.filter(
|
|
@@ -29745,9 +30380,9 @@ function ProviderSettings({
|
|
|
29745
30380
|
defaultTab = "general",
|
|
29746
30381
|
className = ""
|
|
29747
30382
|
}) {
|
|
29748
|
-
const [settings, setSettings] =
|
|
29749
|
-
const [hasChanges, setHasChanges] =
|
|
29750
|
-
|
|
30383
|
+
const [settings, setSettings] = React49__namespace.useState(initialSettings);
|
|
30384
|
+
const [hasChanges, setHasChanges] = React49__namespace.useState(false);
|
|
30385
|
+
React49__namespace.useEffect(() => {
|
|
29751
30386
|
setSettings(initialSettings);
|
|
29752
30387
|
setHasChanges(false);
|
|
29753
30388
|
}, [initialSettings]);
|
|
@@ -30979,11 +31614,11 @@ function RecurringServiceSetupModal({
|
|
|
30979
31614
|
cancel = "Cancel",
|
|
30980
31615
|
save = "Save"
|
|
30981
31616
|
} = labels;
|
|
30982
|
-
const instanceId =
|
|
31617
|
+
const instanceId = React49__namespace.useId();
|
|
30983
31618
|
const providerSelectId = `${instanceId}-provider`;
|
|
30984
31619
|
const serviceSelectId = `${instanceId}-service`;
|
|
30985
31620
|
const occurrenceSelectId = `${instanceId}-occurrence`;
|
|
30986
|
-
const [formData, setFormData] =
|
|
31621
|
+
const [formData, setFormData] = React49__namespace.useState(
|
|
30987
31622
|
initialData || {
|
|
30988
31623
|
providerId: "",
|
|
30989
31624
|
serviceId: "",
|
|
@@ -30991,7 +31626,7 @@ function RecurringServiceSetupModal({
|
|
|
30991
31626
|
overrideConsent: false
|
|
30992
31627
|
}
|
|
30993
31628
|
);
|
|
30994
|
-
|
|
31629
|
+
React49__namespace.useEffect(() => {
|
|
30995
31630
|
if (initialData) {
|
|
30996
31631
|
setFormData(initialData);
|
|
30997
31632
|
} else {
|
|
@@ -31204,9 +31839,9 @@ function RejectionModal({
|
|
|
31204
31839
|
isSubmitting = false,
|
|
31205
31840
|
variant = "danger"
|
|
31206
31841
|
}) {
|
|
31207
|
-
const [selectedReasonId, setSelectedReasonId] =
|
|
31208
|
-
const [details, setDetails] =
|
|
31209
|
-
|
|
31842
|
+
const [selectedReasonId, setSelectedReasonId] = React49__namespace.useState("");
|
|
31843
|
+
const [details, setDetails] = React49__namespace.useState("");
|
|
31844
|
+
React49__namespace.useEffect(() => {
|
|
31210
31845
|
if (!open) {
|
|
31211
31846
|
setSelectedReasonId("");
|
|
31212
31847
|
setDetails("");
|
|
@@ -31663,7 +32298,7 @@ function ReportDashboard({
|
|
|
31663
32298
|
)
|
|
31664
32299
|
] });
|
|
31665
32300
|
}
|
|
31666
|
-
var ResultsEntryForm =
|
|
32301
|
+
var ResultsEntryForm = React49__namespace.forwardRef(function ResultsEntryForm2({
|
|
31667
32302
|
employeeFirstName,
|
|
31668
32303
|
employeeLastName,
|
|
31669
32304
|
initialData = {},
|
|
@@ -31691,30 +32326,30 @@ var ResultsEntryForm = React48__namespace.forwardRef(function ResultsEntryForm2(
|
|
|
31691
32326
|
addProviderContact = "Click here to add a provider contact",
|
|
31692
32327
|
pleaseSelectResult = "Please select a result"
|
|
31693
32328
|
} = labels;
|
|
31694
|
-
const [result, setResult] =
|
|
32329
|
+
const [result, setResult] = React49__namespace.useState(
|
|
31695
32330
|
initialData.result ?? null
|
|
31696
32331
|
);
|
|
31697
|
-
const [alternateText, setAlternateText] =
|
|
32332
|
+
const [alternateText, setAlternateText] = React49__namespace.useState(
|
|
31698
32333
|
initialData.alternateText ?? ""
|
|
31699
32334
|
);
|
|
31700
|
-
const [dateDrawnValue, setDateDrawnValue] =
|
|
32335
|
+
const [dateDrawnValue, setDateDrawnValue] = React49__namespace.useState(
|
|
31701
32336
|
initialData.dateDrawn ?? ""
|
|
31702
32337
|
);
|
|
31703
|
-
const [dateCompletedValue, setDateCompletedValue] =
|
|
32338
|
+
const [dateCompletedValue, setDateCompletedValue] = React49__namespace.useState(
|
|
31704
32339
|
initialData.dateCompleted ?? ""
|
|
31705
32340
|
);
|
|
31706
|
-
const [recommendations, setRecommendations] =
|
|
32341
|
+
const [recommendations, setRecommendations] = React49__namespace.useState(
|
|
31707
32342
|
initialData.recommendations ?? ""
|
|
31708
32343
|
);
|
|
31709
|
-
const [files, setFiles] =
|
|
31710
|
-
const [selectedContacts, setSelectedContacts] =
|
|
32344
|
+
const [files, setFiles] = React49__namespace.useState(initialData.files ?? []);
|
|
32345
|
+
const [selectedContacts, setSelectedContacts] = React49__namespace.useState(
|
|
31711
32346
|
initialData.providerContacts ?? []
|
|
31712
32347
|
);
|
|
31713
|
-
const [applyToAll, setApplyToAll] =
|
|
32348
|
+
const [applyToAll, setApplyToAll] = React49__namespace.useState(
|
|
31714
32349
|
initialData.applyToAllServices ?? false
|
|
31715
32350
|
);
|
|
31716
|
-
const [showError, setShowError] =
|
|
31717
|
-
const fileInputRef =
|
|
32351
|
+
const [showError, setShowError] = React49__namespace.useState(false);
|
|
32352
|
+
const fileInputRef = React49__namespace.useRef(null);
|
|
31718
32353
|
const handleFileSelect = (e) => {
|
|
31719
32354
|
const selectedFiles = Array.from(e.target.files || []);
|
|
31720
32355
|
setFiles((prev) => [...prev, ...selectedFiles]);
|
|
@@ -31730,7 +32365,7 @@ var ResultsEntryForm = React48__namespace.forwardRef(function ResultsEntryForm2(
|
|
|
31730
32365
|
(prev) => prev.includes(contactId) ? prev.filter((id) => id !== contactId) : [...prev, contactId]
|
|
31731
32366
|
);
|
|
31732
32367
|
};
|
|
31733
|
-
const validateAndSubmit =
|
|
32368
|
+
const validateAndSubmit = React49__namespace.useCallback(() => {
|
|
31734
32369
|
if (!result) {
|
|
31735
32370
|
setShowError(true);
|
|
31736
32371
|
return;
|
|
@@ -31757,7 +32392,7 @@ var ResultsEntryForm = React48__namespace.forwardRef(function ResultsEntryForm2(
|
|
|
31757
32392
|
applyToAll,
|
|
31758
32393
|
onSubmit
|
|
31759
32394
|
]);
|
|
31760
|
-
|
|
32395
|
+
React49__namespace.useImperativeHandle(
|
|
31761
32396
|
ref,
|
|
31762
32397
|
() => ({
|
|
31763
32398
|
submit: validateAndSubmit
|
|
@@ -32033,7 +32668,7 @@ function ResultsEntryModal({
|
|
|
32033
32668
|
...props
|
|
32034
32669
|
}) {
|
|
32035
32670
|
const { submit = "Submit", close = "Close" } = labels;
|
|
32036
|
-
const formRef =
|
|
32671
|
+
const formRef = React49__namespace.useRef(null);
|
|
32037
32672
|
const employeeName = employeeFirstName || employeeLastName ? `${employeeFirstName ?? ""} ${employeeLastName ?? ""}`.trim() : void 0;
|
|
32038
32673
|
const handleSubmitClick = () => {
|
|
32039
32674
|
formRef.current?.submit();
|
|
@@ -32163,7 +32798,7 @@ function ScheduleCalendar({
|
|
|
32163
32798
|
isLoading = false,
|
|
32164
32799
|
className = ""
|
|
32165
32800
|
}) {
|
|
32166
|
-
const [currentDate, setCurrentDate] =
|
|
32801
|
+
const [currentDate, setCurrentDate] = React49__namespace.useState(selectedDate);
|
|
32167
32802
|
const formatTime4 = (date) => {
|
|
32168
32803
|
const d = typeof date === "string" ? new Date(date) : date;
|
|
32169
32804
|
return d.toLocaleTimeString("en-US", {
|
|
@@ -32635,7 +33270,7 @@ function SubCategoryAccordion({
|
|
|
32635
33270
|
onServiceClick,
|
|
32636
33271
|
index
|
|
32637
33272
|
}) {
|
|
32638
|
-
const [isExpanded, setIsExpanded] =
|
|
33273
|
+
const [isExpanded, setIsExpanded] = React49__namespace.useState(
|
|
32639
33274
|
subCategory.defaultExpanded ?? false
|
|
32640
33275
|
);
|
|
32641
33276
|
const contentId = `sub-content-${index}`;
|
|
@@ -32702,7 +33337,7 @@ function CategoryAccordionItem({
|
|
|
32702
33337
|
onExpandChange
|
|
32703
33338
|
}) {
|
|
32704
33339
|
const isControlled = expandedCategories !== void 0;
|
|
32705
|
-
const [internalExpanded, setInternalExpanded] =
|
|
33340
|
+
const [internalExpanded, setInternalExpanded] = React49__namespace.useState(
|
|
32706
33341
|
category.defaultExpanded ?? false
|
|
32707
33342
|
);
|
|
32708
33343
|
const isExpanded = isControlled ? expandedCategories.includes(category.name) : internalExpanded;
|
|
@@ -32800,7 +33435,7 @@ function ServiceAccordion({
|
|
|
32800
33435
|
className,
|
|
32801
33436
|
"aria-label": ariaLabel = "Service categories"
|
|
32802
33437
|
}) {
|
|
32803
|
-
const [internalExpanded, setInternalExpanded] =
|
|
33438
|
+
const [internalExpanded, setInternalExpanded] = React49__namespace.useState([]);
|
|
32804
33439
|
const isControlled = controlledExpanded !== void 0;
|
|
32805
33440
|
const expanded = isControlled ? controlledExpanded : internalExpanded;
|
|
32806
33441
|
const handleExpandChange = (categoryName, isExpanded) => {
|
|
@@ -33092,7 +33727,7 @@ function ServiceBadgeGroup({
|
|
|
33092
33727
|
size = "md",
|
|
33093
33728
|
onShowMore
|
|
33094
33729
|
}) {
|
|
33095
|
-
const badges =
|
|
33730
|
+
const badges = React49__namespace.Children.toArray(children);
|
|
33096
33731
|
const visibleBadges = maxVisible ? badges.slice(0, maxVisible) : badges;
|
|
33097
33732
|
const hiddenCount = maxVisible ? badges.length - maxVisible : 0;
|
|
33098
33733
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
@@ -33945,15 +34580,15 @@ function ServicePicker({
|
|
|
33945
34580
|
fullWidth = false,
|
|
33946
34581
|
className
|
|
33947
34582
|
}) {
|
|
33948
|
-
const [searchQuery, setSearchQuery] =
|
|
33949
|
-
const [expandedGroups, setExpandedGroups] =
|
|
34583
|
+
const [searchQuery, setSearchQuery] = React49__namespace.useState("");
|
|
34584
|
+
const [expandedGroups, setExpandedGroups] = React49__namespace.useState(
|
|
33950
34585
|
/* @__PURE__ */ new Set()
|
|
33951
34586
|
);
|
|
33952
|
-
const filteredGroups =
|
|
34587
|
+
const filteredGroups = React49__namespace.useMemo(
|
|
33953
34588
|
() => filterServices(groups, searchQuery),
|
|
33954
34589
|
[groups, searchQuery]
|
|
33955
34590
|
);
|
|
33956
|
-
const searchResults =
|
|
34591
|
+
const searchResults = React49__namespace.useMemo(
|
|
33957
34592
|
() => searchQuery ? flattenServices(filteredGroups) : [],
|
|
33958
34593
|
[filteredGroups, searchQuery]
|
|
33959
34594
|
);
|
|
@@ -34402,16 +35037,16 @@ function ServicePricingManager({
|
|
|
34402
35037
|
categories: _categories = [],
|
|
34403
35038
|
className = ""
|
|
34404
35039
|
}) {
|
|
34405
|
-
const [searchTerm, setSearchTerm] =
|
|
34406
|
-
const [selectedCategory, setSelectedCategory] =
|
|
35040
|
+
const [searchTerm, setSearchTerm] = React49__namespace.useState("");
|
|
35041
|
+
const [selectedCategory, setSelectedCategory] = React49__namespace.useState(
|
|
34407
35042
|
null
|
|
34408
35043
|
);
|
|
34409
|
-
const [editingService, setEditingService] =
|
|
34410
|
-
const [editPrice, setEditPrice] =
|
|
34411
|
-
const [editEmployerPrice, setEditEmployerPrice] =
|
|
34412
|
-
const [showBulkModal, setShowBulkModal] =
|
|
34413
|
-
const [bulkAdjustment, setBulkAdjustment] =
|
|
34414
|
-
const [bulkAdjustmentType, setBulkAdjustmentType] =
|
|
35044
|
+
const [editingService, setEditingService] = React49__namespace.useState(null);
|
|
35045
|
+
const [editPrice, setEditPrice] = React49__namespace.useState("");
|
|
35046
|
+
const [editEmployerPrice, setEditEmployerPrice] = React49__namespace.useState("");
|
|
35047
|
+
const [showBulkModal, setShowBulkModal] = React49__namespace.useState(false);
|
|
35048
|
+
const [bulkAdjustment, setBulkAdjustment] = React49__namespace.useState("");
|
|
35049
|
+
const [bulkAdjustmentType, setBulkAdjustmentType] = React49__namespace.useState("percent");
|
|
34415
35050
|
const formatCurrency3 = (amount) => {
|
|
34416
35051
|
return new Intl.NumberFormat("en-US", {
|
|
34417
35052
|
style: "currency",
|
|
@@ -34802,7 +35437,7 @@ function ServiceShippingSettings({
|
|
|
34802
35437
|
isSaving = false,
|
|
34803
35438
|
className = ""
|
|
34804
35439
|
}) {
|
|
34805
|
-
const [address, setAddress] =
|
|
35440
|
+
const [address, setAddress] = React49__namespace.useState(
|
|
34806
35441
|
defaultAddress || {
|
|
34807
35442
|
name: "",
|
|
34808
35443
|
street1: "",
|
|
@@ -35004,7 +35639,7 @@ function SetupServiceModal({
|
|
|
35004
35639
|
errorMessage,
|
|
35005
35640
|
title = "Add New Service"
|
|
35006
35641
|
}) {
|
|
35007
|
-
const [formData, setFormData] =
|
|
35642
|
+
const [formData, setFormData] = React49__namespace.useState({
|
|
35008
35643
|
name: "",
|
|
35009
35644
|
description: "",
|
|
35010
35645
|
price: 0,
|
|
@@ -35014,7 +35649,7 @@ function SetupServiceModal({
|
|
|
35014
35649
|
initialInventory: void 0,
|
|
35015
35650
|
autoAcceptReferrals: false
|
|
35016
35651
|
});
|
|
35017
|
-
|
|
35652
|
+
React49__namespace.useEffect(() => {
|
|
35018
35653
|
if (!open) {
|
|
35019
35654
|
setFormData({
|
|
35020
35655
|
name: "",
|
|
@@ -35293,7 +35928,7 @@ function SetupServiceModal({
|
|
|
35293
35928
|
] })
|
|
35294
35929
|
] }) });
|
|
35295
35930
|
}
|
|
35296
|
-
var SidebarContext =
|
|
35931
|
+
var SidebarContext = React49.createContext(null);
|
|
35297
35932
|
function SidebarProvider({
|
|
35298
35933
|
children,
|
|
35299
35934
|
defaultCollapsed = false,
|
|
@@ -35303,7 +35938,7 @@ function SidebarProvider({
|
|
|
35303
35938
|
mobileBreakpoint = "(max-width: 1023px)"
|
|
35304
35939
|
}) {
|
|
35305
35940
|
const isMobileViewport = chunkFSBFQBNE_cjs.useMediaQuery(mobileBreakpoint);
|
|
35306
|
-
const [isCollapsed, setIsCollapsed] =
|
|
35941
|
+
const [isCollapsed, setIsCollapsed] = React49.useState(() => {
|
|
35307
35942
|
if (typeof window !== "undefined" && persistCollapsed) {
|
|
35308
35943
|
const stored = localStorage.getItem(storageKey);
|
|
35309
35944
|
if (stored !== null) {
|
|
@@ -35312,39 +35947,39 @@ function SidebarProvider({
|
|
|
35312
35947
|
}
|
|
35313
35948
|
return defaultCollapsed;
|
|
35314
35949
|
});
|
|
35315
|
-
const [isMobileOpen, setIsMobileOpen] =
|
|
35316
|
-
const [expandedGroup, setExpandedGroup] =
|
|
35950
|
+
const [isMobileOpen, setIsMobileOpen] = React49.useState(false);
|
|
35951
|
+
const [expandedGroup, setExpandedGroup] = React49.useState(
|
|
35317
35952
|
defaultExpandedGroup
|
|
35318
35953
|
);
|
|
35319
|
-
|
|
35954
|
+
React49.useEffect(() => {
|
|
35320
35955
|
if (persistCollapsed && typeof window !== "undefined") {
|
|
35321
35956
|
localStorage.setItem(storageKey, String(isCollapsed));
|
|
35322
35957
|
}
|
|
35323
35958
|
}, [isCollapsed, persistCollapsed, storageKey]);
|
|
35324
|
-
|
|
35959
|
+
React49.useEffect(() => {
|
|
35325
35960
|
if (!isMobileViewport && isMobileOpen) {
|
|
35326
35961
|
setIsMobileOpen(false);
|
|
35327
35962
|
}
|
|
35328
35963
|
}, [isMobileViewport, isMobileOpen]);
|
|
35329
|
-
const toggleCollapsed =
|
|
35964
|
+
const toggleCollapsed = React49.useCallback(() => {
|
|
35330
35965
|
setIsCollapsed((prev) => !prev);
|
|
35331
35966
|
}, []);
|
|
35332
|
-
const setCollapsed =
|
|
35967
|
+
const setCollapsed = React49.useCallback((collapsed) => {
|
|
35333
35968
|
setIsCollapsed(collapsed);
|
|
35334
35969
|
}, []);
|
|
35335
|
-
const openMobile =
|
|
35970
|
+
const openMobile = React49.useCallback(() => {
|
|
35336
35971
|
setIsMobileOpen(true);
|
|
35337
35972
|
}, []);
|
|
35338
|
-
const closeMobile =
|
|
35973
|
+
const closeMobile = React49.useCallback(() => {
|
|
35339
35974
|
setIsMobileOpen(false);
|
|
35340
35975
|
}, []);
|
|
35341
|
-
const toggleMobile =
|
|
35976
|
+
const toggleMobile = React49.useCallback(() => {
|
|
35342
35977
|
setIsMobileOpen((prev) => !prev);
|
|
35343
35978
|
}, []);
|
|
35344
|
-
const toggleGroup =
|
|
35979
|
+
const toggleGroup = React49.useCallback((group) => {
|
|
35345
35980
|
setExpandedGroup((prev) => prev === group ? null : group);
|
|
35346
35981
|
}, []);
|
|
35347
|
-
const contextValue =
|
|
35982
|
+
const contextValue = React49.useMemo(
|
|
35348
35983
|
() => ({
|
|
35349
35984
|
isCollapsed,
|
|
35350
35985
|
toggleCollapsed,
|
|
@@ -35374,7 +36009,7 @@ function SidebarProvider({
|
|
|
35374
36009
|
return /* @__PURE__ */ jsxRuntime.jsx(SidebarContext.Provider, { value: contextValue, children });
|
|
35375
36010
|
}
|
|
35376
36011
|
function useSidebar() {
|
|
35377
|
-
const context =
|
|
36012
|
+
const context = React49.useContext(SidebarContext);
|
|
35378
36013
|
if (!context) {
|
|
35379
36014
|
throw new Error("useSidebar must be used within a SidebarProvider");
|
|
35380
36015
|
}
|
|
@@ -35609,9 +36244,9 @@ function SidebarNavGroup({
|
|
|
35609
36244
|
const { isCollapsed, isMobileViewport, expandedGroup, toggleGroup } = useSidebar();
|
|
35610
36245
|
const showCollapsed = !isMobileViewport && isCollapsed;
|
|
35611
36246
|
const isExpanded = groupId ? expandedGroup === groupId : defaultExpanded;
|
|
35612
|
-
const [localExpanded, setLocalExpanded] =
|
|
36247
|
+
const [localExpanded, setLocalExpanded] = React49.useState(defaultExpanded);
|
|
35613
36248
|
const effectiveExpanded = groupId ? isExpanded : localExpanded;
|
|
35614
|
-
const handleToggle =
|
|
36249
|
+
const handleToggle = React49.useCallback(() => {
|
|
35615
36250
|
if (groupId) {
|
|
35616
36251
|
toggleGroup(groupId);
|
|
35617
36252
|
} else {
|
|
@@ -35684,7 +36319,7 @@ function SidebarNavItem({
|
|
|
35684
36319
|
}) {
|
|
35685
36320
|
const { isCollapsed, isMobileViewport, closeMobile } = useSidebar();
|
|
35686
36321
|
const showCollapsed = !isMobileViewport && isCollapsed;
|
|
35687
|
-
const handleClick =
|
|
36322
|
+
const handleClick = React49.useCallback(() => {
|
|
35688
36323
|
if (disabled) return;
|
|
35689
36324
|
onClick?.();
|
|
35690
36325
|
if (isMobileViewport) {
|
|
@@ -35808,9 +36443,9 @@ function SidebarSearch({
|
|
|
35808
36443
|
"data-testid": testId = "sidebar-search"
|
|
35809
36444
|
}) {
|
|
35810
36445
|
const { isCollapsed, isMobileViewport, setCollapsed } = useSidebar();
|
|
35811
|
-
const inputRef =
|
|
36446
|
+
const inputRef = React49.useRef(null);
|
|
35812
36447
|
const showCollapsed = !isMobileViewport && isCollapsed;
|
|
35813
|
-
|
|
36448
|
+
React49.useEffect(() => {
|
|
35814
36449
|
const handleKeyDown = (e) => {
|
|
35815
36450
|
const target = e.target;
|
|
35816
36451
|
if (target.tagName === "INPUT" || target.tagName === "TEXTAREA" || target.isContentEditable) {
|
|
@@ -36006,7 +36641,7 @@ function NewsletterForm({
|
|
|
36006
36641
|
isLoading = false,
|
|
36007
36642
|
className
|
|
36008
36643
|
}) {
|
|
36009
|
-
const [email, setEmail] =
|
|
36644
|
+
const [email, setEmail] = React49__namespace.useState("");
|
|
36010
36645
|
function handleSubmit(e) {
|
|
36011
36646
|
e.preventDefault();
|
|
36012
36647
|
if (email.trim()) {
|
|
@@ -36131,7 +36766,7 @@ function LegalLinks({
|
|
|
36131
36766
|
{
|
|
36132
36767
|
"data-slot": "site-footer-legal",
|
|
36133
36768
|
className: chunkOR5DRJCW_cjs.cn("flex flex-wrap items-center gap-x-4 gap-y-1", className),
|
|
36134
|
-
children: links.map((link, index) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
36769
|
+
children: links.map((link, index) => /* @__PURE__ */ jsxRuntime.jsxs(React49__namespace.Fragment, { children: [
|
|
36135
36770
|
index > 0 && /* @__PURE__ */ jsxRuntime.jsx(
|
|
36136
36771
|
"span",
|
|
36137
36772
|
{
|
|
@@ -36622,9 +37257,9 @@ function UserMenu({
|
|
|
36622
37257
|
menuItems = [],
|
|
36623
37258
|
className
|
|
36624
37259
|
}) {
|
|
36625
|
-
const [isOpen, setIsOpen] =
|
|
36626
|
-
const menuRef =
|
|
36627
|
-
|
|
37260
|
+
const [isOpen, setIsOpen] = React49__namespace.useState(false);
|
|
37261
|
+
const menuRef = React49__namespace.useRef(null);
|
|
37262
|
+
React49__namespace.useEffect(() => {
|
|
36628
37263
|
function handleClickOutside(event) {
|
|
36629
37264
|
if (menuRef.current && !menuRef.current.contains(event.target)) {
|
|
36630
37265
|
setIsOpen(false);
|
|
@@ -36920,7 +37555,7 @@ function SiteHeader({
|
|
|
36920
37555
|
userMenuItems,
|
|
36921
37556
|
className
|
|
36922
37557
|
}) {
|
|
36923
|
-
const [mobileMenuOpen, setMobileMenuOpen] =
|
|
37558
|
+
const [mobileMenuOpen, setMobileMenuOpen] = React49__namespace.useState(false);
|
|
36924
37559
|
const colorVariant = variant === "primary" || variant === "transparent" ? "light" : "dark";
|
|
36925
37560
|
return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
36926
37561
|
/* @__PURE__ */ jsxRuntime.jsx("div", { "data-slot": "site-header-spacer", className: "h-16", "aria-hidden": "true" }),
|
|
@@ -37292,29 +37927,29 @@ function SSOConfigForm({
|
|
|
37292
37927
|
delete: deleteLabel = "Delete SSO",
|
|
37293
37928
|
cancel = "Cancel"
|
|
37294
37929
|
} = labels;
|
|
37295
|
-
const [clientDomain, setClientDomain] =
|
|
37930
|
+
const [clientDomain, setClientDomain] = React49__namespace.useState(
|
|
37296
37931
|
initialData.clientDomain ?? ""
|
|
37297
37932
|
);
|
|
37298
|
-
const [ssoLoginUrl, setSsoLoginUrl] =
|
|
37933
|
+
const [ssoLoginUrl, setSsoLoginUrl] = React49__namespace.useState(
|
|
37299
37934
|
initialData.ssoLoginUrl ?? ""
|
|
37300
37935
|
);
|
|
37301
|
-
const [ssoLogoutUrl, setSsoLogoutUrl] =
|
|
37936
|
+
const [ssoLogoutUrl, setSsoLogoutUrl] = React49__namespace.useState(
|
|
37302
37937
|
initialData.ssoLogoutUrl ?? ""
|
|
37303
37938
|
);
|
|
37304
|
-
const [forceReauth, setForceReauth] =
|
|
37939
|
+
const [forceReauth, setForceReauth] = React49__namespace.useState(
|
|
37305
37940
|
initialData.forceReauthentication ?? false
|
|
37306
37941
|
);
|
|
37307
|
-
const [idpSigns, setIdpSigns] =
|
|
37942
|
+
const [idpSigns, setIdpSigns] = React49__namespace.useState(
|
|
37308
37943
|
initialData.idpSignsRequest ?? false
|
|
37309
37944
|
);
|
|
37310
|
-
const [allowUnencrypted, setAllowUnencrypted] =
|
|
37945
|
+
const [allowUnencrypted, setAllowUnencrypted] = React49__namespace.useState(
|
|
37311
37946
|
initialData.allowUnencryptedAssertion ?? false
|
|
37312
37947
|
);
|
|
37313
|
-
const [certificateFile, setCertificateFile] =
|
|
37948
|
+
const [certificateFile, setCertificateFile] = React49__namespace.useState(
|
|
37314
37949
|
null
|
|
37315
37950
|
);
|
|
37316
|
-
const fileInputRef =
|
|
37317
|
-
const [errors, setErrors] =
|
|
37951
|
+
const fileInputRef = React49__namespace.useRef(null);
|
|
37952
|
+
const [errors, setErrors] = React49__namespace.useState({});
|
|
37318
37953
|
const validate = () => {
|
|
37319
37954
|
const newErrors = {};
|
|
37320
37955
|
if (!clientDomain.trim()) {
|
|
@@ -37672,7 +38307,7 @@ function StepIndicator({
|
|
|
37672
38307
|
const status = getStepStatus(index);
|
|
37673
38308
|
const isLast = index === steps.length - 1;
|
|
37674
38309
|
const clickable = isClickable(index);
|
|
37675
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
38310
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(React49__namespace.Fragment, { children: [
|
|
37676
38311
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: `flex flex-row items-center ${sizes.gap}`, children: [
|
|
37677
38312
|
circleButton(step, index, status, clickable),
|
|
37678
38313
|
stepLabel(step, status, false)
|
|
@@ -37889,10 +38524,10 @@ function TableOfContents({
|
|
|
37889
38524
|
scrollSpyOptions,
|
|
37890
38525
|
className
|
|
37891
38526
|
}) {
|
|
37892
|
-
const [discoveredItems, setDiscoveredItems] =
|
|
38527
|
+
const [discoveredItems, setDiscoveredItems] = React49__namespace.useState([]);
|
|
37893
38528
|
const flatItems = manualItems ?? discoveredItems;
|
|
37894
38529
|
const contentEl = contentRef?.current ?? null;
|
|
37895
|
-
|
|
38530
|
+
React49__namespace.useEffect(() => {
|
|
37896
38531
|
if (manualItems) return;
|
|
37897
38532
|
const container = contentEl ?? document;
|
|
37898
38533
|
let frameId = null;
|
|
@@ -37923,7 +38558,7 @@ function TableOfContents({
|
|
|
37923
38558
|
if (frameId !== null) cancelAnimationFrame(frameId);
|
|
37924
38559
|
};
|
|
37925
38560
|
}, [manualItems, selector, maxDepth, contentEl]);
|
|
37926
|
-
const ids =
|
|
38561
|
+
const ids = React49__namespace.useMemo(() => flatItems.map((i) => i.id), [flatItems]);
|
|
37927
38562
|
const isControlled = controlledActiveId !== void 0;
|
|
37928
38563
|
const { activeId: spyActiveId } = chunkFSBFQBNE_cjs.useScrollSpy({
|
|
37929
38564
|
ids,
|
|
@@ -37932,12 +38567,12 @@ function TableOfContents({
|
|
|
37932
38567
|
...scrollSpyOptions
|
|
37933
38568
|
});
|
|
37934
38569
|
const activeId = isControlled ? controlledActiveId : spyActiveId;
|
|
37935
|
-
|
|
38570
|
+
React49__namespace.useEffect(() => {
|
|
37936
38571
|
if (!isControlled && onActiveChange) {
|
|
37937
38572
|
onActiveChange(spyActiveId);
|
|
37938
38573
|
}
|
|
37939
38574
|
}, [spyActiveId, isControlled, onActiveChange]);
|
|
37940
|
-
const handleClick =
|
|
38575
|
+
const handleClick = React49__namespace.useCallback(
|
|
37941
38576
|
(e, id) => {
|
|
37942
38577
|
if (e.button !== 0 || e.metaKey || e.ctrlKey || e.shiftKey || e.altKey) {
|
|
37943
38578
|
return;
|
|
@@ -37958,7 +38593,7 @@ function TableOfContents({
|
|
|
37958
38593
|
},
|
|
37959
38594
|
[contentEl, scrollOffset, smooth]
|
|
37960
38595
|
);
|
|
37961
|
-
const tree =
|
|
38596
|
+
const tree = React49__namespace.useMemo(() => nestItems(flatItems), [flatItems]);
|
|
37962
38597
|
if (hideWhenEmpty && tree.length === 0) return null;
|
|
37963
38598
|
return /* @__PURE__ */ jsxRuntime.jsxs("nav", { "aria-label": "Table of contents", className: chunkOR5DRJCW_cjs.cn("text-sm", className), children: [
|
|
37964
38599
|
title && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-foreground mb-3 font-semibold", children: title }),
|
|
@@ -38726,7 +39361,7 @@ function ToastContainer({
|
|
|
38726
39361
|
}
|
|
38727
39362
|
);
|
|
38728
39363
|
}
|
|
38729
|
-
var ToastContext =
|
|
39364
|
+
var ToastContext = React49.createContext(null);
|
|
38730
39365
|
var toastIdCounter = 0;
|
|
38731
39366
|
function generateToastId() {
|
|
38732
39367
|
return `toast-${++toastIdCounter}-${Date.now()}`;
|
|
@@ -38736,8 +39371,8 @@ function ToastProvider({
|
|
|
38736
39371
|
maxToasts = 5,
|
|
38737
39372
|
defaultDuration = 5e3
|
|
38738
39373
|
}) {
|
|
38739
|
-
const [toasts, setToasts] =
|
|
38740
|
-
const dismiss =
|
|
39374
|
+
const [toasts, setToasts] = React49.useState([]);
|
|
39375
|
+
const dismiss = React49.useCallback((id) => {
|
|
38741
39376
|
setToasts((prev) => {
|
|
38742
39377
|
const toast2 = prev.find((t) => t.id === id);
|
|
38743
39378
|
if (toast2?.onDismiss) {
|
|
@@ -38746,13 +39381,13 @@ function ToastProvider({
|
|
|
38746
39381
|
return prev.filter((t) => t.id !== id);
|
|
38747
39382
|
});
|
|
38748
39383
|
}, []);
|
|
38749
|
-
const dismissAll =
|
|
39384
|
+
const dismissAll = React49.useCallback(() => {
|
|
38750
39385
|
setToasts((prev) => {
|
|
38751
39386
|
prev.forEach((t) => t.onDismiss?.());
|
|
38752
39387
|
return [];
|
|
38753
39388
|
});
|
|
38754
39389
|
}, []);
|
|
38755
|
-
const toast =
|
|
39390
|
+
const toast = React49.useCallback(
|
|
38756
39391
|
(options) => {
|
|
38757
39392
|
const id = generateToastId();
|
|
38758
39393
|
const duration = options.duration ?? defaultDuration;
|
|
@@ -38779,13 +39414,13 @@ function ToastProvider({
|
|
|
38779
39414
|
},
|
|
38780
39415
|
[maxToasts, defaultDuration, dismiss]
|
|
38781
39416
|
);
|
|
38782
|
-
const success =
|
|
39417
|
+
const success = React49.useCallback(
|
|
38783
39418
|
(message, options) => {
|
|
38784
39419
|
return toast({ ...options, message, variant: "success" });
|
|
38785
39420
|
},
|
|
38786
39421
|
[toast]
|
|
38787
39422
|
);
|
|
38788
|
-
const error =
|
|
39423
|
+
const error = React49.useCallback(
|
|
38789
39424
|
(message, options) => {
|
|
38790
39425
|
return toast({
|
|
38791
39426
|
...options,
|
|
@@ -38797,19 +39432,19 @@ function ToastProvider({
|
|
|
38797
39432
|
},
|
|
38798
39433
|
[toast]
|
|
38799
39434
|
);
|
|
38800
|
-
const warning =
|
|
39435
|
+
const warning = React49.useCallback(
|
|
38801
39436
|
(message, options) => {
|
|
38802
39437
|
return toast({ ...options, message, variant: "warning" });
|
|
38803
39438
|
},
|
|
38804
39439
|
[toast]
|
|
38805
39440
|
);
|
|
38806
|
-
const info =
|
|
39441
|
+
const info = React49.useCallback(
|
|
38807
39442
|
(message, options) => {
|
|
38808
39443
|
return toast({ ...options, message, variant: "info" });
|
|
38809
39444
|
},
|
|
38810
39445
|
[toast]
|
|
38811
39446
|
);
|
|
38812
|
-
const contextValue =
|
|
39447
|
+
const contextValue = React49.useMemo(
|
|
38813
39448
|
() => ({
|
|
38814
39449
|
toasts,
|
|
38815
39450
|
toast,
|
|
@@ -38825,7 +39460,7 @@ function ToastProvider({
|
|
|
38825
39460
|
return /* @__PURE__ */ jsxRuntime.jsx(ToastContext.Provider, { value: contextValue, children });
|
|
38826
39461
|
}
|
|
38827
39462
|
function useToast() {
|
|
38828
|
-
const context =
|
|
39463
|
+
const context = React49.useContext(ToastContext);
|
|
38829
39464
|
if (!context) {
|
|
38830
39465
|
throw new Error("useToast must be used within a ToastProvider");
|
|
38831
39466
|
}
|
|
@@ -38859,7 +39494,7 @@ function WebChartReportViewer({
|
|
|
38859
39494
|
dateFrom = "From",
|
|
38860
39495
|
dateTo = "To"
|
|
38861
39496
|
} = labels;
|
|
38862
|
-
const [modalOpen, setModalOpen] =
|
|
39497
|
+
const [modalOpen, setModalOpen] = React49__namespace.useState(false);
|
|
38863
39498
|
const handleReportClick = (report) => {
|
|
38864
39499
|
onReportSelect?.(report);
|
|
38865
39500
|
setModalOpen(true);
|
|
@@ -39097,7 +39732,7 @@ function ReportTimeRange({
|
|
|
39097
39732
|
],
|
|
39098
39733
|
className
|
|
39099
39734
|
}) {
|
|
39100
|
-
const [preset, setPreset] =
|
|
39735
|
+
const [preset, setPreset] = React49__namespace.useState("this-month");
|
|
39101
39736
|
const handlePresetChange = (value) => {
|
|
39102
39737
|
setPreset(value);
|
|
39103
39738
|
const now = /* @__PURE__ */ new Date();
|
|
@@ -39199,7 +39834,7 @@ function isValidUrl(url) {
|
|
|
39199
39834
|
}
|
|
39200
39835
|
}
|
|
39201
39836
|
}
|
|
39202
|
-
var WebsiteInput =
|
|
39837
|
+
var WebsiteInput = React49__namespace.forwardRef(
|
|
39203
39838
|
({
|
|
39204
39839
|
value = "",
|
|
39205
39840
|
onChange,
|
|
@@ -39210,7 +39845,7 @@ var WebsiteInput = React48__namespace.forwardRef(
|
|
|
39210
39845
|
error,
|
|
39211
39846
|
...props
|
|
39212
39847
|
}, ref) => {
|
|
39213
|
-
const [localError, setLocalError] =
|
|
39848
|
+
const [localError, setLocalError] = React49__namespace.useState();
|
|
39214
39849
|
const handleChange = (e) => {
|
|
39215
39850
|
onChange?.(e.target.value);
|
|
39216
39851
|
if (localError) {
|
|
@@ -39292,7 +39927,7 @@ function WebsiteInputGroup({
|
|
|
39292
39927
|
typeLabels,
|
|
39293
39928
|
className
|
|
39294
39929
|
}) {
|
|
39295
|
-
const websites =
|
|
39930
|
+
const websites = React49__namespace.useMemo(() => {
|
|
39296
39931
|
if (value.length >= minEntries) return value;
|
|
39297
39932
|
const padding = Array(minEntries - value.length).fill(null).map(() => ({ url: "", type: "website" }));
|
|
39298
39933
|
return [...value, ...padding];
|
|
@@ -39440,13 +40075,29 @@ function WebsiteInputGroup({
|
|
|
39440
40075
|
}
|
|
39441
40076
|
WebsiteInputGroup.displayName = "WebsiteInputGroup";
|
|
39442
40077
|
|
|
40078
|
+
Object.defineProperty(exports, "Toggle", {
|
|
40079
|
+
enumerable: true,
|
|
40080
|
+
get: function () { return chunkDLNJLCNO_cjs.Toggle; }
|
|
40081
|
+
});
|
|
40082
|
+
Object.defineProperty(exports, "toggleVariants", {
|
|
40083
|
+
enumerable: true,
|
|
40084
|
+
get: function () { return chunkDLNJLCNO_cjs.toggleVariants; }
|
|
40085
|
+
});
|
|
39443
40086
|
Object.defineProperty(exports, "VisuallyHidden", {
|
|
39444
40087
|
enumerable: true,
|
|
39445
40088
|
get: function () { return chunkZJCPW6MS_cjs.VisuallyHidden; }
|
|
39446
40089
|
});
|
|
39447
40090
|
Object.defineProperty(exports, "brands", {
|
|
39448
40091
|
enumerable: true,
|
|
39449
|
-
get: function () { return
|
|
40092
|
+
get: function () { return chunkSNEQXSC5_cjs.brands; }
|
|
40093
|
+
});
|
|
40094
|
+
Object.defineProperty(exports, "webchartBrand", {
|
|
40095
|
+
enumerable: true,
|
|
40096
|
+
get: function () { return chunkU7VQUOLS_cjs.webchartBrand; }
|
|
40097
|
+
});
|
|
40098
|
+
Object.defineProperty(exports, "defaultBrand", {
|
|
40099
|
+
enumerable: true,
|
|
40100
|
+
get: function () { return chunkX7S76WB7_cjs.defaultBrand; }
|
|
39450
40101
|
});
|
|
39451
40102
|
Object.defineProperty(exports, "enterpriseHealthBrand", {
|
|
39452
40103
|
enumerable: true,
|
|
@@ -39460,10 +40111,6 @@ Object.defineProperty(exports, "wagglelineBrand", {
|
|
|
39460
40111
|
enumerable: true,
|
|
39461
40112
|
get: function () { return chunkZ5J4NTPL_cjs.wagglelineBrand; }
|
|
39462
40113
|
});
|
|
39463
|
-
Object.defineProperty(exports, "webchartBrand", {
|
|
39464
|
-
enumerable: true,
|
|
39465
|
-
get: function () { return chunkU7VQUOLS_cjs.webchartBrand; }
|
|
39466
|
-
});
|
|
39467
40114
|
Object.defineProperty(exports, "createBrandPreset", {
|
|
39468
40115
|
enumerable: true,
|
|
39469
40116
|
get: function () { return chunkJ644FU54_cjs.createBrandPreset; }
|
|
@@ -39488,9 +40135,21 @@ Object.defineProperty(exports, "ozwellBrand", {
|
|
|
39488
40135
|
enumerable: true,
|
|
39489
40136
|
get: function () { return chunkRR2MJBGV_cjs.ozwellBrand; }
|
|
39490
40137
|
});
|
|
39491
|
-
Object.defineProperty(exports, "
|
|
40138
|
+
Object.defineProperty(exports, "Slider", {
|
|
39492
40139
|
enumerable: true,
|
|
39493
|
-
get: function () { return
|
|
40140
|
+
get: function () { return chunkGOKC4CCZ_cjs.Slider; }
|
|
40141
|
+
});
|
|
40142
|
+
Object.defineProperty(exports, "sliderRangeVariants", {
|
|
40143
|
+
enumerable: true,
|
|
40144
|
+
get: function () { return chunkGOKC4CCZ_cjs.sliderRangeVariants; }
|
|
40145
|
+
});
|
|
40146
|
+
Object.defineProperty(exports, "sliderThumbVariants", {
|
|
40147
|
+
enumerable: true,
|
|
40148
|
+
get: function () { return chunkGOKC4CCZ_cjs.sliderThumbVariants; }
|
|
40149
|
+
});
|
|
40150
|
+
Object.defineProperty(exports, "sliderTrackVariants", {
|
|
40151
|
+
enumerable: true,
|
|
40152
|
+
get: function () { return chunkGOKC4CCZ_cjs.sliderTrackVariants; }
|
|
39494
40153
|
});
|
|
39495
40154
|
Object.defineProperty(exports, "FullPageSpinner", {
|
|
39496
40155
|
enumerable: true,
|
|
@@ -39624,13 +40283,17 @@ Object.defineProperty(exports, "Tooltip", {
|
|
|
39624
40283
|
enumerable: true,
|
|
39625
40284
|
get: function () { return chunkRH43XBNV_cjs.Tooltip; }
|
|
39626
40285
|
});
|
|
39627
|
-
Object.defineProperty(exports, "
|
|
40286
|
+
Object.defineProperty(exports, "RecordButton", {
|
|
39628
40287
|
enumerable: true,
|
|
39629
|
-
get: function () { return
|
|
40288
|
+
get: function () { return chunkK7IGBNZA_cjs.RecordButton; }
|
|
39630
40289
|
});
|
|
39631
|
-
Object.defineProperty(exports, "
|
|
40290
|
+
Object.defineProperty(exports, "formatDuration", {
|
|
39632
40291
|
enumerable: true,
|
|
39633
|
-
get: function () { return
|
|
40292
|
+
get: function () { return chunkK7IGBNZA_cjs.formatDuration; }
|
|
40293
|
+
});
|
|
40294
|
+
Object.defineProperty(exports, "recordButtonVariants", {
|
|
40295
|
+
enumerable: true,
|
|
40296
|
+
get: function () { return chunkK7IGBNZA_cjs.recordButtonVariants; }
|
|
39634
40297
|
});
|
|
39635
40298
|
Object.defineProperty(exports, "RichTextEditor", {
|
|
39636
40299
|
enumerable: true,
|
|
@@ -39760,29 +40423,49 @@ Object.defineProperty(exports, "skeletonVariants", {
|
|
|
39760
40423
|
enumerable: true,
|
|
39761
40424
|
get: function () { return chunk3GGET5LK_cjs.skeletonVariants; }
|
|
39762
40425
|
});
|
|
39763
|
-
Object.defineProperty(exports, "
|
|
40426
|
+
Object.defineProperty(exports, "Label", {
|
|
39764
40427
|
enumerable: true,
|
|
39765
|
-
get: function () { return
|
|
40428
|
+
get: function () { return chunkUOOH356R_cjs.Label; }
|
|
39766
40429
|
});
|
|
39767
|
-
Object.defineProperty(exports, "
|
|
40430
|
+
Object.defineProperty(exports, "labelVariants", {
|
|
39768
40431
|
enumerable: true,
|
|
39769
|
-
get: function () { return
|
|
40432
|
+
get: function () { return chunkUOOH356R_cjs.labelVariants; }
|
|
39770
40433
|
});
|
|
39771
|
-
Object.defineProperty(exports, "
|
|
40434
|
+
Object.defineProperty(exports, "CodeBlock", {
|
|
39772
40435
|
enumerable: true,
|
|
39773
|
-
get: function () { return
|
|
40436
|
+
get: function () { return chunkY65SK5Y2_cjs.CodeBlock; }
|
|
39774
40437
|
});
|
|
39775
|
-
Object.defineProperty(exports, "
|
|
40438
|
+
Object.defineProperty(exports, "MarkdownRenderer", {
|
|
39776
40439
|
enumerable: true,
|
|
39777
|
-
get: function () { return
|
|
40440
|
+
get: function () { return chunkY65SK5Y2_cjs.MarkdownRenderer; }
|
|
39778
40441
|
});
|
|
39779
|
-
Object.defineProperty(exports, "
|
|
40442
|
+
Object.defineProperty(exports, "highlightCode", {
|
|
39780
40443
|
enumerable: true,
|
|
39781
|
-
get: function () { return
|
|
40444
|
+
get: function () { return chunkY65SK5Y2_cjs.highlightCode; }
|
|
39782
40445
|
});
|
|
39783
|
-
Object.defineProperty(exports, "
|
|
40446
|
+
Object.defineProperty(exports, "useMarkdown", {
|
|
39784
40447
|
enumerable: true,
|
|
39785
|
-
get: function () { return
|
|
40448
|
+
get: function () { return chunkY65SK5Y2_cjs.useMarkdown; }
|
|
40449
|
+
});
|
|
40450
|
+
Object.defineProperty(exports, "CsvBlock", {
|
|
40451
|
+
enumerable: true,
|
|
40452
|
+
get: function () { return chunkVO3NWSCQ_cjs.CsvBlock; }
|
|
40453
|
+
});
|
|
40454
|
+
Object.defineProperty(exports, "HtmlPreviewBlock", {
|
|
40455
|
+
enumerable: true,
|
|
40456
|
+
get: function () { return chunk74NOFB34_cjs.HtmlPreviewBlock; }
|
|
40457
|
+
});
|
|
40458
|
+
Object.defineProperty(exports, "MermaidBlock", {
|
|
40459
|
+
enumerable: true,
|
|
40460
|
+
get: function () { return chunkFZQAF3WA_cjs.MermaidBlock; }
|
|
40461
|
+
});
|
|
40462
|
+
Object.defineProperty(exports, "SurveyBlock", {
|
|
40463
|
+
enumerable: true,
|
|
40464
|
+
get: function () { return chunk6RV7HQ4U_cjs.SurveyBlock; }
|
|
40465
|
+
});
|
|
40466
|
+
Object.defineProperty(exports, "FenceBlock", {
|
|
40467
|
+
enumerable: true,
|
|
40468
|
+
get: function () { return chunkUL3PQ7HL_cjs.FenceBlock; }
|
|
39786
40469
|
});
|
|
39787
40470
|
Object.defineProperty(exports, "Pagination", {
|
|
39788
40471
|
enumerable: true,
|
|
@@ -39856,18 +40539,6 @@ Object.defineProperty(exports, "radioVariants", {
|
|
|
39856
40539
|
enumerable: true,
|
|
39857
40540
|
get: function () { return chunkXP6HELVG_cjs.radioVariants; }
|
|
39858
40541
|
});
|
|
39859
|
-
Object.defineProperty(exports, "RecordButton", {
|
|
39860
|
-
enumerable: true,
|
|
39861
|
-
get: function () { return chunkK7IGBNZA_cjs.RecordButton; }
|
|
39862
|
-
});
|
|
39863
|
-
Object.defineProperty(exports, "formatDuration", {
|
|
39864
|
-
enumerable: true,
|
|
39865
|
-
get: function () { return chunkK7IGBNZA_cjs.formatDuration; }
|
|
39866
|
-
});
|
|
39867
|
-
Object.defineProperty(exports, "recordButtonVariants", {
|
|
39868
|
-
enumerable: true,
|
|
39869
|
-
get: function () { return chunkK7IGBNZA_cjs.recordButtonVariants; }
|
|
39870
|
-
});
|
|
39871
40542
|
Object.defineProperty(exports, "Card", {
|
|
39872
40543
|
enumerable: true,
|
|
39873
40544
|
get: function () { return chunk3M4P2KMG_cjs.Card; }
|
|
@@ -40254,11 +40925,11 @@ Object.defineProperty(exports, "isStorybookDocsMode", {
|
|
|
40254
40925
|
});
|
|
40255
40926
|
Object.defineProperty(exports, "miewebUIPreset", {
|
|
40256
40927
|
enumerable: true,
|
|
40257
|
-
get: function () { return
|
|
40928
|
+
get: function () { return chunkWHUD3XHR_cjs.miewebUIPreset; }
|
|
40258
40929
|
});
|
|
40259
40930
|
Object.defineProperty(exports, "miewebUISafelist", {
|
|
40260
40931
|
enumerable: true,
|
|
40261
|
-
get: function () { return
|
|
40932
|
+
get: function () { return chunkWHUD3XHR_cjs.miewebUISafelist; }
|
|
40262
40933
|
});
|
|
40263
40934
|
Object.defineProperty(exports, "Alert", {
|
|
40264
40935
|
enumerable: true,
|
|
@@ -40285,6 +40956,7 @@ exports.AIChatModal = AIChatModal;
|
|
|
40285
40956
|
exports.AIChatTrigger = AIChatTrigger;
|
|
40286
40957
|
exports.AILogoIcon = AILogoIcon;
|
|
40287
40958
|
exports.AIMessageDisplay = AIMessageDisplay;
|
|
40959
|
+
exports.AIReconciliationPanel = AIReconciliationPanel;
|
|
40288
40960
|
exports.AITypingIndicator = AITypingIndicator;
|
|
40289
40961
|
exports.AccessDeniedPage = AccessDeniedPage;
|
|
40290
40962
|
exports.ActionButton = ActionButton2;
|
|
@@ -40544,6 +41216,7 @@ exports.create24HourSchedule = create24HourSchedule;
|
|
|
40544
41216
|
exports.createDefaultSchedule = createDefaultSchedule;
|
|
40545
41217
|
exports.createWeekdaySchedule = createWeekdaySchedule;
|
|
40546
41218
|
exports.defaultOrderTabs = defaultOrderTabs;
|
|
41219
|
+
exports.defaultReconciliationIsEqual = defaultReconciliationIsEqual;
|
|
40547
41220
|
exports.formatAddressLines = formatAddressLines;
|
|
40548
41221
|
exports.formatAddressSingleLine = formatAddressSingleLine;
|
|
40549
41222
|
exports.formatCityState = formatCityState;
|
|
@@ -40565,6 +41238,7 @@ exports.groupMessagesByDate = groupMessagesByDate;
|
|
|
40565
41238
|
exports.headerVariants = headerVariants;
|
|
40566
41239
|
exports.isSameSenderGroup = isSameSenderGroup;
|
|
40567
41240
|
exports.isValidUrl = isValidUrl;
|
|
41241
|
+
exports.reconciliationPanelVariants = panelVariants;
|
|
40568
41242
|
exports.sendButtonVariants = sendButtonVariants;
|
|
40569
41243
|
exports.useCamera = useCamera;
|
|
40570
41244
|
exports.useCommandPalette = useCommandPalette;
|