@mediansh/widget 0.9.0 → 0.10.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +5 -7
- package/dist/index.js +1140 -689
- package/dist/index.js.map +1 -1
- package/dist/widget.css +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -63,16 +63,16 @@ function useMarkdownReady() {
|
|
|
63
63
|
}
|
|
64
64
|
|
|
65
65
|
// ../../apps/web/src/components/support-widget/widget-launcher.tsx
|
|
66
|
-
import { useCallback as useCallback7, useEffect as useEffect10, useRef as useRef14, useState as
|
|
66
|
+
import { useCallback as useCallback7, useEffect as useEffect10, useRef as useRef14, useState as useState16 } from "react";
|
|
67
67
|
|
|
68
68
|
// ../../node_modules/.bun/@phosphor-icons+react@2.1.10+005eabf3d8b6ef06/node_modules/@phosphor-icons/react/dist/lib/SSRBase.es.js
|
|
69
69
|
import * as e from "react";
|
|
70
|
-
var w = e.forwardRef((l5,
|
|
70
|
+
var w = e.forwardRef((l5, s5) => {
|
|
71
71
|
const {
|
|
72
72
|
alt: r42,
|
|
73
|
-
color:
|
|
74
|
-
size:
|
|
75
|
-
weight:
|
|
73
|
+
color: a31 = "currentColor",
|
|
74
|
+
size: t15 = "1em",
|
|
75
|
+
weight: o55 = "regular",
|
|
76
76
|
mirrored: i3 = false,
|
|
77
77
|
children: n2,
|
|
78
78
|
weights: c8,
|
|
@@ -81,18 +81,18 @@ var w = e.forwardRef((l5, s4) => {
|
|
|
81
81
|
return /* @__PURE__ */ e.createElement(
|
|
82
82
|
"svg",
|
|
83
83
|
{
|
|
84
|
-
ref:
|
|
84
|
+
ref: s5,
|
|
85
85
|
xmlns: "http://www.w3.org/2000/svg",
|
|
86
|
-
width:
|
|
87
|
-
height:
|
|
88
|
-
fill:
|
|
86
|
+
width: t15,
|
|
87
|
+
height: t15,
|
|
88
|
+
fill: a31,
|
|
89
89
|
viewBox: "0 0 256 256",
|
|
90
90
|
transform: i3 ? "scale(-1, 1)" : void 0,
|
|
91
91
|
...m5
|
|
92
92
|
},
|
|
93
93
|
!!r42 && /* @__PURE__ */ e.createElement("title", null, r42),
|
|
94
94
|
n2,
|
|
95
|
-
c8.get(
|
|
95
|
+
c8.get(o55)
|
|
96
96
|
);
|
|
97
97
|
});
|
|
98
98
|
w.displayName = "SSRBase";
|
|
@@ -130,7 +130,7 @@ var a = /* @__PURE__ */ new Map([
|
|
|
130
130
|
]);
|
|
131
131
|
|
|
132
132
|
// ../../node_modules/.bun/@phosphor-icons+react@2.1.10+005eabf3d8b6ef06/node_modules/@phosphor-icons/react/dist/ssr/ArrowDown.es.js
|
|
133
|
-
var r = o.forwardRef((
|
|
133
|
+
var r = o.forwardRef((e65, t15) => /* @__PURE__ */ o.createElement(w, { ref: t15, ...e65, weights: a }));
|
|
134
134
|
r.displayName = "ArrowDownIcon";
|
|
135
135
|
|
|
136
136
|
// ../../node_modules/.bun/@phosphor-icons+react@2.1.10+005eabf3d8b6ef06/node_modules/@phosphor-icons/react/dist/ssr/ArrowRight.es.js
|
|
@@ -166,7 +166,7 @@ var a2 = /* @__PURE__ */ new Map([
|
|
|
166
166
|
]);
|
|
167
167
|
|
|
168
168
|
// ../../node_modules/.bun/@phosphor-icons+react@2.1.10+005eabf3d8b6ef06/node_modules/@phosphor-icons/react/dist/ssr/ArrowRight.es.js
|
|
169
|
-
var o2 = r2.forwardRef((
|
|
169
|
+
var o2 = r2.forwardRef((t15, e65) => /* @__PURE__ */ r2.createElement(w, { ref: e65, ...t15, weights: a2 }));
|
|
170
170
|
o2.displayName = "ArrowRightIcon";
|
|
171
171
|
|
|
172
172
|
// ../../node_modules/.bun/@phosphor-icons+react@2.1.10+005eabf3d8b6ef06/node_modules/@phosphor-icons/react/dist/ssr/ArrowUp.es.js
|
|
@@ -202,7 +202,7 @@ var a3 = /* @__PURE__ */ new Map([
|
|
|
202
202
|
]);
|
|
203
203
|
|
|
204
204
|
// ../../node_modules/.bun/@phosphor-icons+react@2.1.10+005eabf3d8b6ef06/node_modules/@phosphor-icons/react/dist/ssr/ArrowUp.es.js
|
|
205
|
-
var o3 = r3.forwardRef((
|
|
205
|
+
var o3 = r3.forwardRef((e65, t15) => /* @__PURE__ */ r3.createElement(w, { ref: t15, ...e65, weights: a3 }));
|
|
206
206
|
o3.displayName = "ArrowUpIcon";
|
|
207
207
|
|
|
208
208
|
// ../../node_modules/.bun/@phosphor-icons+react@2.1.10+005eabf3d8b6ef06/node_modules/@phosphor-icons/react/dist/ssr/ArrowsClockwise.es.js
|
|
@@ -238,7 +238,7 @@ var e5 = /* @__PURE__ */ new Map([
|
|
|
238
238
|
]);
|
|
239
239
|
|
|
240
240
|
// ../../node_modules/.bun/@phosphor-icons+react@2.1.10+005eabf3d8b6ef06/node_modules/@phosphor-icons/react/dist/ssr/ArrowsClockwise.es.js
|
|
241
|
-
var r4 = o4.forwardRef((
|
|
241
|
+
var r4 = o4.forwardRef((e65, s5) => /* @__PURE__ */ o4.createElement(w, { ref: s5, ...e65, weights: e5 }));
|
|
242
242
|
r4.displayName = "ArrowsClockwiseIcon";
|
|
243
243
|
|
|
244
244
|
// ../../node_modules/.bun/@phosphor-icons+react@2.1.10+005eabf3d8b6ef06/node_modules/@phosphor-icons/react/dist/ssr/ArrowsIn.es.js
|
|
@@ -280,7 +280,7 @@ var e6 = /* @__PURE__ */ new Map([
|
|
|
280
280
|
]);
|
|
281
281
|
|
|
282
282
|
// ../../node_modules/.bun/@phosphor-icons+react@2.1.10+005eabf3d8b6ef06/node_modules/@phosphor-icons/react/dist/ssr/ArrowsIn.es.js
|
|
283
|
-
var o5 = r5.forwardRef((
|
|
283
|
+
var o5 = r5.forwardRef((e65, s5) => /* @__PURE__ */ r5.createElement(w, { ref: s5, ...e65, weights: e6 }));
|
|
284
284
|
o5.displayName = "ArrowsInIcon";
|
|
285
285
|
|
|
286
286
|
// ../../node_modules/.bun/@phosphor-icons+react@2.1.10+005eabf3d8b6ef06/node_modules/@phosphor-icons/react/dist/ssr/ArrowsOut.es.js
|
|
@@ -316,7 +316,7 @@ var e7 = /* @__PURE__ */ new Map([
|
|
|
316
316
|
]);
|
|
317
317
|
|
|
318
318
|
// ../../node_modules/.bun/@phosphor-icons+react@2.1.10+005eabf3d8b6ef06/node_modules/@phosphor-icons/react/dist/ssr/ArrowsOut.es.js
|
|
319
|
-
var o6 = r6.forwardRef((
|
|
319
|
+
var o6 = r6.forwardRef((t15, e65) => /* @__PURE__ */ r6.createElement(w, { ref: e65, ...t15, weights: e7 }));
|
|
320
320
|
o6.displayName = "ArrowsOutIcon";
|
|
321
321
|
|
|
322
322
|
// ../../node_modules/.bun/@phosphor-icons+react@2.1.10+005eabf3d8b6ef06/node_modules/@phosphor-icons/react/dist/ssr/Bug.es.js
|
|
@@ -352,7 +352,7 @@ var e8 = /* @__PURE__ */ new Map([
|
|
|
352
352
|
]);
|
|
353
353
|
|
|
354
354
|
// ../../node_modules/.bun/@phosphor-icons+react@2.1.10+005eabf3d8b6ef06/node_modules/@phosphor-icons/react/dist/ssr/Bug.es.js
|
|
355
|
-
var e9 = o7.forwardRef((r42,
|
|
355
|
+
var e9 = o7.forwardRef((r42, t15) => /* @__PURE__ */ o7.createElement(w, { ref: t15, ...r42, weights: e8 }));
|
|
356
356
|
e9.displayName = "BugIcon";
|
|
357
357
|
|
|
358
358
|
// ../../node_modules/.bun/@phosphor-icons+react@2.1.10+005eabf3d8b6ef06/node_modules/@phosphor-icons/react/dist/ssr/CaretDown.es.js
|
|
@@ -388,7 +388,7 @@ var t = /* @__PURE__ */ new Map([
|
|
|
388
388
|
]);
|
|
389
389
|
|
|
390
390
|
// ../../node_modules/.bun/@phosphor-icons+react@2.1.10+005eabf3d8b6ef06/node_modules/@phosphor-icons/react/dist/ssr/CaretDown.es.js
|
|
391
|
-
var e11 = o8.forwardRef((r42,
|
|
391
|
+
var e11 = o8.forwardRef((r42, t15) => /* @__PURE__ */ o8.createElement(w, { ref: t15, ...r42, weights: t }));
|
|
392
392
|
e11.displayName = "CaretDownIcon";
|
|
393
393
|
|
|
394
394
|
// ../../node_modules/.bun/@phosphor-icons+react@2.1.10+005eabf3d8b6ef06/node_modules/@phosphor-icons/react/dist/ssr/CaretRight.es.js
|
|
@@ -424,7 +424,7 @@ var t2 = /* @__PURE__ */ new Map([
|
|
|
424
424
|
]);
|
|
425
425
|
|
|
426
426
|
// ../../node_modules/.bun/@phosphor-icons+react@2.1.10+005eabf3d8b6ef06/node_modules/@phosphor-icons/react/dist/ssr/CaretRight.es.js
|
|
427
|
-
var e13 = t3.forwardRef((r42,
|
|
427
|
+
var e13 = t3.forwardRef((r42, o55) => /* @__PURE__ */ t3.createElement(w, { ref: o55, ...r42, weights: t2 }));
|
|
428
428
|
e13.displayName = "CaretRightIcon";
|
|
429
429
|
|
|
430
430
|
// ../../node_modules/.bun/@phosphor-icons+react@2.1.10+005eabf3d8b6ef06/node_modules/@phosphor-icons/react/dist/ssr/ChatCircleDots.es.js
|
|
@@ -466,7 +466,7 @@ var e14 = /* @__PURE__ */ new Map([
|
|
|
466
466
|
]);
|
|
467
467
|
|
|
468
468
|
// ../../node_modules/.bun/@phosphor-icons+react@2.1.10+005eabf3d8b6ef06/node_modules/@phosphor-icons/react/dist/ssr/ChatCircleDots.es.js
|
|
469
|
-
var o9 = t4.forwardRef((
|
|
469
|
+
var o9 = t4.forwardRef((e65, r42) => /* @__PURE__ */ t4.createElement(w, { ref: r42, ...e65, weights: e14 }));
|
|
470
470
|
o9.displayName = "ChatCircleDotsIcon";
|
|
471
471
|
|
|
472
472
|
// ../../node_modules/.bun/@phosphor-icons+react@2.1.10+005eabf3d8b6ef06/node_modules/@phosphor-icons/react/dist/ssr/Check.es.js
|
|
@@ -508,7 +508,7 @@ var a9 = /* @__PURE__ */ new Map([
|
|
|
508
508
|
]);
|
|
509
509
|
|
|
510
510
|
// ../../node_modules/.bun/@phosphor-icons+react@2.1.10+005eabf3d8b6ef06/node_modules/@phosphor-icons/react/dist/ssr/Check.es.js
|
|
511
|
-
var o10 = e16.forwardRef((r42,
|
|
511
|
+
var o10 = e16.forwardRef((r42, t15) => /* @__PURE__ */ e16.createElement(w, { ref: t15, ...r42, weights: a9 }));
|
|
512
512
|
o10.displayName = "CheckIcon";
|
|
513
513
|
|
|
514
514
|
// ../../node_modules/.bun/@phosphor-icons+react@2.1.10+005eabf3d8b6ef06/node_modules/@phosphor-icons/react/dist/ssr/EnvelopeSimple.es.js
|
|
@@ -544,7 +544,7 @@ var a10 = /* @__PURE__ */ new Map([
|
|
|
544
544
|
]);
|
|
545
545
|
|
|
546
546
|
// ../../node_modules/.bun/@phosphor-icons+react@2.1.10+005eabf3d8b6ef06/node_modules/@phosphor-icons/react/dist/ssr/EnvelopeSimple.es.js
|
|
547
|
-
var o11 = e18.forwardRef((m5,
|
|
547
|
+
var o11 = e18.forwardRef((m5, p4) => /* @__PURE__ */ e18.createElement(w, { ref: p4, ...m5, weights: a10 }));
|
|
548
548
|
o11.displayName = "EnvelopeSimpleIcon";
|
|
549
549
|
|
|
550
550
|
// ../../node_modules/.bun/@phosphor-icons+react@2.1.10+005eabf3d8b6ef06/node_modules/@phosphor-icons/react/dist/ssr/File.es.js
|
|
@@ -580,15 +580,51 @@ var a11 = /* @__PURE__ */ new Map([
|
|
|
580
580
|
]);
|
|
581
581
|
|
|
582
582
|
// ../../node_modules/.bun/@phosphor-icons+react@2.1.10+005eabf3d8b6ef06/node_modules/@phosphor-icons/react/dist/ssr/File.es.js
|
|
583
|
-
var o12 = e20.forwardRef((r42,
|
|
583
|
+
var o12 = e20.forwardRef((r42, t15) => /* @__PURE__ */ e20.createElement(w, { ref: t15, ...r42, weights: a11 }));
|
|
584
584
|
o12.displayName = "FileIcon";
|
|
585
585
|
|
|
586
|
-
// ../../node_modules/.bun/@phosphor-icons+react@2.1.10+005eabf3d8b6ef06/node_modules/@phosphor-icons/react/dist/ssr/
|
|
586
|
+
// ../../node_modules/.bun/@phosphor-icons+react@2.1.10+005eabf3d8b6ef06/node_modules/@phosphor-icons/react/dist/ssr/GlobeSimple.es.js
|
|
587
587
|
import * as e22 from "react";
|
|
588
588
|
|
|
589
|
+
// ../../node_modules/.bun/@phosphor-icons+react@2.1.10+005eabf3d8b6ef06/node_modules/@phosphor-icons/react/dist/defs/GlobeSimple.es.js
|
|
590
|
+
import * as e21 from "react";
|
|
591
|
+
var t5 = /* @__PURE__ */ new Map([
|
|
592
|
+
[
|
|
593
|
+
"bold",
|
|
594
|
+
/* @__PURE__ */ e21.createElement(e21.Fragment, null, /* @__PURE__ */ e21.createElement("path", { d: "M128,20A108,108,0,1,0,236,128,108.12,108.12,0,0,0,128,20Zm83.13,96H179.56a144.3,144.3,0,0,0-21.35-66.36A84.22,84.22,0,0,1,211.13,116ZM128,207c-9.36-10.81-24.46-33.13-27.45-67h54.94a119.74,119.74,0,0,1-17.11,52.77A108.61,108.61,0,0,1,128,207Zm-27.45-91a119.74,119.74,0,0,1,17.11-52.77A108.61,108.61,0,0,1,128,49c9.36,10.81,24.46,33.13,27.45,67ZM97.79,49.64A144.3,144.3,0,0,0,76.44,116H44.87A84.22,84.22,0,0,1,97.79,49.64ZM44.87,140H76.44a144.3,144.3,0,0,0,21.35,66.36A84.22,84.22,0,0,1,44.87,140Zm113.34,66.36A144.3,144.3,0,0,0,179.56,140h31.57A84.22,84.22,0,0,1,158.21,206.36Z" }))
|
|
595
|
+
],
|
|
596
|
+
[
|
|
597
|
+
"duotone",
|
|
598
|
+
/* @__PURE__ */ e21.createElement(e21.Fragment, null, /* @__PURE__ */ e21.createElement("path", { d: "M224,128a96,96,0,1,1-96-96A96,96,0,0,1,224,128Z", opacity: "0.2" }), /* @__PURE__ */ e21.createElement("path", { d: "M128,24h0A104,104,0,1,0,232,128,104.12,104.12,0,0,0,128,24Zm87.62,96H175.79C174,83.49,159.94,57.67,148.41,42.4A88.19,88.19,0,0,1,215.63,120ZM96.23,136h63.54c-2.31,41.61-22.23,67.11-31.77,77C118.45,203.1,98.54,177.6,96.23,136Zm0-16C98.54,78.39,118.46,52.89,128,43c9.55,9.93,29.46,35.43,31.77,77Zm11.36-77.6C96.06,57.67,82,83.49,80.21,120H40.37A88.19,88.19,0,0,1,107.59,42.4ZM40.37,136H80.21c1.82,36.51,15.85,62.33,27.38,77.6A88.19,88.19,0,0,1,40.37,136Zm108,77.6c11.53-15.27,25.56-41.09,27.38-77.6h39.84A88.19,88.19,0,0,1,148.41,213.6Z" }))
|
|
599
|
+
],
|
|
600
|
+
[
|
|
601
|
+
"fill",
|
|
602
|
+
/* @__PURE__ */ e21.createElement(e21.Fragment, null, /* @__PURE__ */ e21.createElement("path", { d: "M128,24h0A104,104,0,1,0,232,128,104.12,104.12,0,0,0,128,24Zm87.62,96H175.79C174,83.49,159.94,57.67,148.41,42.4A88.19,88.19,0,0,1,215.63,120ZM96.23,136h63.54c-2.31,41.61-22.23,67.11-31.77,77C118.45,203.1,98.54,177.6,96.23,136Zm0-16C98.54,78.39,118.46,52.89,128,43c9.55,9.93,29.46,35.43,31.77,77Zm52.18,93.6c11.53-15.27,25.56-41.09,27.38-77.6h39.84A88.19,88.19,0,0,1,148.41,213.6Z" }))
|
|
603
|
+
],
|
|
604
|
+
[
|
|
605
|
+
"light",
|
|
606
|
+
/* @__PURE__ */ e21.createElement(e21.Fragment, null, /* @__PURE__ */ e21.createElement("path", { d: "M128,26A102,102,0,1,0,230,128,102.12,102.12,0,0,0,128,26Zm89.8,96H173.89c-1.54-40.77-18.48-68.23-30.43-82.67A90.19,90.19,0,0,1,217.8,122ZM128,215.83a110,110,0,0,1-15.19-19.45A128.37,128.37,0,0,1,94.13,134h67.74a128.37,128.37,0,0,1-18.68,62.38A110,110,0,0,1,128,215.83ZM94.13,122a128.37,128.37,0,0,1,18.68-62.38A110,110,0,0,1,128,40.17a110,110,0,0,1,15.19,19.45A128.37,128.37,0,0,1,161.87,122Zm18.41-82.67c-12,14.44-28.89,41.9-30.43,82.67H38.2A90.19,90.19,0,0,1,112.54,39.33ZM38.2,134H82.11c1.54,40.77,18.48,68.23,30.43,82.67A90.19,90.19,0,0,1,38.2,134Zm105.26,82.67c11.95-14.44,28.89-41.9,30.43-82.67H217.8A90.19,90.19,0,0,1,143.46,216.67Z" }))
|
|
607
|
+
],
|
|
608
|
+
[
|
|
609
|
+
"regular",
|
|
610
|
+
/* @__PURE__ */ e21.createElement(e21.Fragment, null, /* @__PURE__ */ e21.createElement("path", { d: "M128,24h0A104,104,0,1,0,232,128,104.12,104.12,0,0,0,128,24Zm87.62,96H175.79C174,83.49,159.94,57.67,148.41,42.4A88.19,88.19,0,0,1,215.63,120ZM96.23,136h63.54c-2.31,41.61-22.23,67.11-31.77,77C118.45,203.1,98.54,177.6,96.23,136Zm0-16C98.54,78.39,118.46,52.89,128,43c9.55,9.93,29.46,35.43,31.77,77Zm11.36-77.6C96.06,57.67,82,83.49,80.21,120H40.37A88.19,88.19,0,0,1,107.59,42.4ZM40.37,136H80.21c1.82,36.51,15.85,62.33,27.38,77.6A88.19,88.19,0,0,1,40.37,136Zm108,77.6c11.53-15.27,25.56-41.09,27.38-77.6h39.84A88.19,88.19,0,0,1,148.41,213.6Z" }))
|
|
611
|
+
],
|
|
612
|
+
[
|
|
613
|
+
"thin",
|
|
614
|
+
/* @__PURE__ */ e21.createElement(e21.Fragment, null, /* @__PURE__ */ e21.createElement("path", { d: "M128,28h0A100,100,0,1,0,228,128,100.11,100.11,0,0,0,128,28Zm91.9,96h-48c-1.15-45.55-21.74-74.52-33.48-87.4A92.14,92.14,0,0,1,219.91,124ZM128,218.61c-8.32-8-34.57-37.13-35.93-86.61h71.86C162.57,181.48,136.32,210.61,128,218.61ZM92.07,124C93.43,74.52,119.68,45.39,128,37.39c8.32,8,34.57,37.13,35.93,86.61Zm25.47-87.4C105.8,49.48,85.21,78.45,84.06,124h-48A92.14,92.14,0,0,1,117.54,36.6ZM36.09,132h48c1.15,45.55,21.74,74.52,33.48,87.4A92.14,92.14,0,0,1,36.09,132Zm102.37,87.4c11.74-12.88,32.33-41.85,33.48-87.4h48A92.14,92.14,0,0,1,138.46,219.4Z" }))
|
|
615
|
+
]
|
|
616
|
+
]);
|
|
617
|
+
|
|
618
|
+
// ../../node_modules/.bun/@phosphor-icons+react@2.1.10+005eabf3d8b6ef06/node_modules/@phosphor-icons/react/dist/ssr/GlobeSimple.es.js
|
|
619
|
+
var o13 = e22.forwardRef((m5, r42) => /* @__PURE__ */ e22.createElement(w, { ref: r42, ...m5, weights: t5 }));
|
|
620
|
+
o13.displayName = "GlobeSimpleIcon";
|
|
621
|
+
|
|
622
|
+
// ../../node_modules/.bun/@phosphor-icons+react@2.1.10+005eabf3d8b6ef06/node_modules/@phosphor-icons/react/dist/ssr/ImageSquare.es.js
|
|
623
|
+
import * as e24 from "react";
|
|
624
|
+
|
|
589
625
|
// ../../node_modules/.bun/@phosphor-icons+react@2.1.10+005eabf3d8b6ef06/node_modules/@phosphor-icons/react/dist/defs/ImageSquare.es.js
|
|
590
626
|
import * as a12 from "react";
|
|
591
|
-
var
|
|
627
|
+
var e23 = /* @__PURE__ */ new Map([
|
|
592
628
|
[
|
|
593
629
|
"bold",
|
|
594
630
|
/* @__PURE__ */ a12.createElement(a12.Fragment, null, /* @__PURE__ */ a12.createElement("path", { d: "M208,28H48A20,20,0,0,0,28,48V208a20,20,0,0,0,20,20H208a20,20,0,0,0,20-20V48A20,20,0,0,0,208,28Zm-4,24v63.72L186.14,97.86a20,20,0,0,0-28.28,0L52,203.72V52ZM85.66,204,172,117.66l32,32V204ZM76,96a20,20,0,1,1,20,20A20,20,0,0,1,76,96Z" }))
|
|
@@ -622,15 +658,15 @@ var e21 = /* @__PURE__ */ new Map([
|
|
|
622
658
|
]);
|
|
623
659
|
|
|
624
660
|
// ../../node_modules/.bun/@phosphor-icons+react@2.1.10+005eabf3d8b6ef06/node_modules/@phosphor-icons/react/dist/ssr/ImageSquare.es.js
|
|
625
|
-
var a13 =
|
|
661
|
+
var a13 = e24.forwardRef((r42, o55) => /* @__PURE__ */ e24.createElement(w, { ref: o55, ...r42, weights: e23 }));
|
|
626
662
|
a13.displayName = "ImageSquareIcon";
|
|
627
663
|
|
|
628
664
|
// ../../node_modules/.bun/@phosphor-icons+react@2.1.10+005eabf3d8b6ef06/node_modules/@phosphor-icons/react/dist/ssr/Lightbulb.es.js
|
|
629
|
-
import * as
|
|
665
|
+
import * as t6 from "react";
|
|
630
666
|
|
|
631
667
|
// ../../node_modules/.bun/@phosphor-icons+react@2.1.10+005eabf3d8b6ef06/node_modules/@phosphor-icons/react/dist/defs/Lightbulb.es.js
|
|
632
668
|
import * as a14 from "react";
|
|
633
|
-
var
|
|
669
|
+
var e25 = /* @__PURE__ */ new Map([
|
|
634
670
|
[
|
|
635
671
|
"bold",
|
|
636
672
|
/* @__PURE__ */ a14.createElement(a14.Fragment, null, /* @__PURE__ */ a14.createElement("path", { d: "M180,232a12,12,0,0,1-12,12H88a12,12,0,0,1,0-24h80A12,12,0,0,1,180,232Zm40-128a91.51,91.51,0,0,1-35.17,72.35A12.26,12.26,0,0,0,180,186v2a20,20,0,0,1-20,20H96a20,20,0,0,1-20-20v-2a12,12,0,0,0-4.7-9.51A91.57,91.57,0,0,1,36,104.52C35.73,54.69,76,13.2,125.79,12A92,92,0,0,1,220,104Zm-24,0a68,68,0,0,0-69.65-68C89.56,36.88,59.8,67.55,60,104.38a67.71,67.71,0,0,0,26.1,53.19A35.87,35.87,0,0,1,100,184h56.1A36.13,36.13,0,0,1,170,157.49,67.68,67.68,0,0,0,196,104Zm-20.07-5.32a48.5,48.5,0,0,0-31.91-40,12,12,0,0,0-8,22.62,24.31,24.31,0,0,1,16.09,20,12,12,0,0,0,23.86-2.64Z" }))
|
|
@@ -664,15 +700,15 @@ var e23 = /* @__PURE__ */ new Map([
|
|
|
664
700
|
]);
|
|
665
701
|
|
|
666
702
|
// ../../node_modules/.bun/@phosphor-icons+react@2.1.10+005eabf3d8b6ef06/node_modules/@phosphor-icons/react/dist/ssr/Lightbulb.es.js
|
|
667
|
-
var
|
|
668
|
-
|
|
703
|
+
var o14 = t6.forwardRef((e65, r42) => /* @__PURE__ */ t6.createElement(w, { ref: r42, ...e65, weights: e25 }));
|
|
704
|
+
o14.displayName = "LightbulbIcon";
|
|
669
705
|
|
|
670
706
|
// ../../node_modules/.bun/@phosphor-icons+react@2.1.10+005eabf3d8b6ef06/node_modules/@phosphor-icons/react/dist/ssr/LockSimple.es.js
|
|
671
|
-
import * as
|
|
707
|
+
import * as o15 from "react";
|
|
672
708
|
|
|
673
709
|
// ../../node_modules/.bun/@phosphor-icons+react@2.1.10+005eabf3d8b6ef06/node_modules/@phosphor-icons/react/dist/defs/LockSimple.es.js
|
|
674
710
|
import * as a15 from "react";
|
|
675
|
-
var
|
|
711
|
+
var e26 = /* @__PURE__ */ new Map([
|
|
676
712
|
[
|
|
677
713
|
"bold",
|
|
678
714
|
/* @__PURE__ */ a15.createElement(a15.Fragment, null, /* @__PURE__ */ a15.createElement("path", { d: "M208,76H180V56A52,52,0,0,0,76,56V76H48A20,20,0,0,0,28,96V208a20,20,0,0,0,20,20H208a20,20,0,0,0,20-20V96A20,20,0,0,0,208,76ZM100,56a28,28,0,0,1,56,0V76H100ZM204,204H52V100H204Z" }))
|
|
@@ -706,296 +742,338 @@ var e24 = /* @__PURE__ */ new Map([
|
|
|
706
742
|
]);
|
|
707
743
|
|
|
708
744
|
// ../../node_modules/.bun/@phosphor-icons+react@2.1.10+005eabf3d8b6ef06/node_modules/@phosphor-icons/react/dist/ssr/LockSimple.es.js
|
|
709
|
-
var
|
|
710
|
-
|
|
745
|
+
var e27 = o15.forwardRef((m5, r42) => /* @__PURE__ */ o15.createElement(w, { ref: r42, ...m5, weights: e26 }));
|
|
746
|
+
e27.displayName = "LockSimpleIcon";
|
|
747
|
+
|
|
748
|
+
// ../../node_modules/.bun/@phosphor-icons+react@2.1.10+005eabf3d8b6ef06/node_modules/@phosphor-icons/react/dist/ssr/Monitor.es.js
|
|
749
|
+
import * as o16 from "react";
|
|
750
|
+
|
|
751
|
+
// ../../node_modules/.bun/@phosphor-icons+react@2.1.10+005eabf3d8b6ef06/node_modules/@phosphor-icons/react/dist/defs/Monitor.es.js
|
|
752
|
+
import * as a16 from "react";
|
|
753
|
+
var e28 = /* @__PURE__ */ new Map([
|
|
754
|
+
[
|
|
755
|
+
"bold",
|
|
756
|
+
/* @__PURE__ */ a16.createElement(a16.Fragment, null, /* @__PURE__ */ a16.createElement("path", { d: "M208,36H48A28,28,0,0,0,20,64V176a28,28,0,0,0,28,28H208a28,28,0,0,0,28-28V64A28,28,0,0,0,208,36Zm4,140a4,4,0,0,1-4,4H48a4,4,0,0,1-4-4V64a4,4,0,0,1,4-4H208a4,4,0,0,1,4,4Zm-40,52a12,12,0,0,1-12,12H96a12,12,0,0,1,0-24h64A12,12,0,0,1,172,228Z" }))
|
|
757
|
+
],
|
|
758
|
+
[
|
|
759
|
+
"duotone",
|
|
760
|
+
/* @__PURE__ */ a16.createElement(a16.Fragment, null, /* @__PURE__ */ a16.createElement(
|
|
761
|
+
"path",
|
|
762
|
+
{
|
|
763
|
+
d: "M224,64V176a16,16,0,0,1-16,16H48a16,16,0,0,1-16-16V64A16,16,0,0,1,48,48H208A16,16,0,0,1,224,64Z",
|
|
764
|
+
opacity: "0.2"
|
|
765
|
+
}
|
|
766
|
+
), /* @__PURE__ */ a16.createElement("path", { d: "M208,40H48A24,24,0,0,0,24,64V176a24,24,0,0,0,24,24H208a24,24,0,0,0,24-24V64A24,24,0,0,0,208,40Zm8,136a8,8,0,0,1-8,8H48a8,8,0,0,1-8-8V64a8,8,0,0,1,8-8H208a8,8,0,0,1,8,8Zm-48,48a8,8,0,0,1-8,8H96a8,8,0,0,1,0-16h64A8,8,0,0,1,168,224Z" }))
|
|
767
|
+
],
|
|
768
|
+
[
|
|
769
|
+
"fill",
|
|
770
|
+
/* @__PURE__ */ a16.createElement(a16.Fragment, null, /* @__PURE__ */ a16.createElement("path", { d: "M232,64V176a24,24,0,0,1-24,24H48a24,24,0,0,1-24-24V64A24,24,0,0,1,48,40H208A24,24,0,0,1,232,64ZM160,216H96a8,8,0,0,0,0,16h64a8,8,0,0,0,0-16Z" }))
|
|
771
|
+
],
|
|
772
|
+
[
|
|
773
|
+
"light",
|
|
774
|
+
/* @__PURE__ */ a16.createElement(a16.Fragment, null, /* @__PURE__ */ a16.createElement("path", { d: "M208,42H48A22,22,0,0,0,26,64V176a22,22,0,0,0,22,22H208a22,22,0,0,0,22-22V64A22,22,0,0,0,208,42Zm10,134a10,10,0,0,1-10,10H48a10,10,0,0,1-10-10V64A10,10,0,0,1,48,54H208a10,10,0,0,1,10,10Zm-52,48a6,6,0,0,1-6,6H96a6,6,0,0,1,0-12h64A6,6,0,0,1,166,224Z" }))
|
|
775
|
+
],
|
|
776
|
+
[
|
|
777
|
+
"regular",
|
|
778
|
+
/* @__PURE__ */ a16.createElement(a16.Fragment, null, /* @__PURE__ */ a16.createElement("path", { d: "M208,40H48A24,24,0,0,0,24,64V176a24,24,0,0,0,24,24H208a24,24,0,0,0,24-24V64A24,24,0,0,0,208,40Zm8,136a8,8,0,0,1-8,8H48a8,8,0,0,1-8-8V64a8,8,0,0,1,8-8H208a8,8,0,0,1,8,8Zm-48,48a8,8,0,0,1-8,8H96a8,8,0,0,1,0-16h64A8,8,0,0,1,168,224Z" }))
|
|
779
|
+
],
|
|
780
|
+
[
|
|
781
|
+
"thin",
|
|
782
|
+
/* @__PURE__ */ a16.createElement(a16.Fragment, null, /* @__PURE__ */ a16.createElement("path", { d: "M208,44H48A20,20,0,0,0,28,64V176a20,20,0,0,0,20,20H208a20,20,0,0,0,20-20V64A20,20,0,0,0,208,44Zm12,132a12,12,0,0,1-12,12H48a12,12,0,0,1-12-12V64A12,12,0,0,1,48,52H208a12,12,0,0,1,12,12Zm-56,48a4,4,0,0,1-4,4H96a4,4,0,0,1,0-8h64A4,4,0,0,1,164,224Z" }))
|
|
783
|
+
]
|
|
784
|
+
]);
|
|
785
|
+
|
|
786
|
+
// ../../node_modules/.bun/@phosphor-icons+react@2.1.10+005eabf3d8b6ef06/node_modules/@phosphor-icons/react/dist/ssr/Monitor.es.js
|
|
787
|
+
var r7 = o16.forwardRef((t15, e65) => /* @__PURE__ */ o16.createElement(w, { ref: e65, ...t15, weights: e28 }));
|
|
788
|
+
r7.displayName = "MonitorIcon";
|
|
711
789
|
|
|
712
790
|
// ../../node_modules/.bun/@phosphor-icons+react@2.1.10+005eabf3d8b6ef06/node_modules/@phosphor-icons/react/dist/ssr/Play.es.js
|
|
713
|
-
import * as
|
|
791
|
+
import * as o17 from "react";
|
|
714
792
|
|
|
715
793
|
// ../../node_modules/.bun/@phosphor-icons+react@2.1.10+005eabf3d8b6ef06/node_modules/@phosphor-icons/react/dist/defs/Play.es.js
|
|
716
|
-
import * as
|
|
717
|
-
var
|
|
794
|
+
import * as e29 from "react";
|
|
795
|
+
var a17 = /* @__PURE__ */ new Map([
|
|
718
796
|
[
|
|
719
797
|
"bold",
|
|
720
|
-
/* @__PURE__ */
|
|
798
|
+
/* @__PURE__ */ e29.createElement(e29.Fragment, null, /* @__PURE__ */ e29.createElement("path", { d: "M234.49,111.07,90.41,22.94A20,20,0,0,0,60,39.87V216.13a20,20,0,0,0,30.41,16.93l144.08-88.13a19.82,19.82,0,0,0,0-33.86ZM84,208.85V47.15L216.16,128Z" }))
|
|
721
799
|
],
|
|
722
800
|
[
|
|
723
801
|
"duotone",
|
|
724
|
-
/* @__PURE__ */
|
|
802
|
+
/* @__PURE__ */ e29.createElement(e29.Fragment, null, /* @__PURE__ */ e29.createElement(
|
|
725
803
|
"path",
|
|
726
804
|
{
|
|
727
805
|
d: "M228.23,134.69,84.15,222.81A8,8,0,0,1,72,216.12V39.88a8,8,0,0,1,12.15-6.69l144.08,88.12A7.82,7.82,0,0,1,228.23,134.69Z",
|
|
728
806
|
opacity: "0.2"
|
|
729
807
|
}
|
|
730
|
-
), /* @__PURE__ */
|
|
808
|
+
), /* @__PURE__ */ e29.createElement("path", { d: "M232.4,114.49,88.32,26.35a16,16,0,0,0-16.2-.3A15.86,15.86,0,0,0,64,39.87V216.13A15.94,15.94,0,0,0,80,232a16.07,16.07,0,0,0,8.36-2.35L232.4,141.51a15.81,15.81,0,0,0,0-27ZM80,215.94V40l143.83,88Z" }))
|
|
731
809
|
],
|
|
732
810
|
[
|
|
733
811
|
"fill",
|
|
734
|
-
/* @__PURE__ */
|
|
812
|
+
/* @__PURE__ */ e29.createElement(e29.Fragment, null, /* @__PURE__ */ e29.createElement("path", { d: "M240,128a15.74,15.74,0,0,1-7.6,13.51L88.32,229.65a16,16,0,0,1-16.2.3A15.86,15.86,0,0,1,64,216.13V39.87a15.86,15.86,0,0,1,8.12-13.82,16,16,0,0,1,16.2.3L232.4,114.49A15.74,15.74,0,0,1,240,128Z" }))
|
|
735
813
|
],
|
|
736
814
|
[
|
|
737
815
|
"light",
|
|
738
|
-
/* @__PURE__ */
|
|
816
|
+
/* @__PURE__ */ e29.createElement(e29.Fragment, null, /* @__PURE__ */ e29.createElement("path", { d: "M231.36,116.19,87.28,28.06a14,14,0,0,0-14.18-.27A13.69,13.69,0,0,0,66,39.87V216.13a13.69,13.69,0,0,0,7.1,12.08,14,14,0,0,0,14.18-.27l144.08-88.13a13.82,13.82,0,0,0,0-23.62Zm-6.26,13.38L81,217.7a2,2,0,0,1-2.06,0,1.78,1.78,0,0,1-1-1.61V39.87a1.78,1.78,0,0,1,1-1.61A2.06,2.06,0,0,1,80,38a2,2,0,0,1,1,.31L225.1,126.43a1.82,1.82,0,0,1,0,3.14Z" }))
|
|
739
817
|
],
|
|
740
818
|
[
|
|
741
819
|
"regular",
|
|
742
|
-
/* @__PURE__ */
|
|
820
|
+
/* @__PURE__ */ e29.createElement(e29.Fragment, null, /* @__PURE__ */ e29.createElement("path", { d: "M232.4,114.49,88.32,26.35a16,16,0,0,0-16.2-.3A15.86,15.86,0,0,0,64,39.87V216.13A15.94,15.94,0,0,0,80,232a16.07,16.07,0,0,0,8.36-2.35L232.4,141.51a15.81,15.81,0,0,0,0-27ZM80,215.94V40l143.83,88Z" }))
|
|
743
821
|
],
|
|
744
822
|
[
|
|
745
823
|
"thin",
|
|
746
|
-
/* @__PURE__ */
|
|
824
|
+
/* @__PURE__ */ e29.createElement(e29.Fragment, null, /* @__PURE__ */ e29.createElement("path", { d: "M230.32,117.9,86.24,29.79a11.91,11.91,0,0,0-12.17-.23A11.71,11.71,0,0,0,68,39.89V216.11a11.71,11.71,0,0,0,6.07,10.33,11.91,11.91,0,0,0,12.17-.23L230.32,138.1a11.82,11.82,0,0,0,0-20.2Zm-4.18,13.37L82.06,219.39a4,4,0,0,1-4.07.07,3.77,3.77,0,0,1-2-3.35V39.89a3.77,3.77,0,0,1,2-3.35,4,4,0,0,1,4.07.07l144.08,88.12a3.8,3.8,0,0,1,0,6.54Z" }))
|
|
747
825
|
]
|
|
748
826
|
]);
|
|
749
827
|
|
|
750
828
|
// ../../node_modules/.bun/@phosphor-icons+react@2.1.10+005eabf3d8b6ef06/node_modules/@phosphor-icons/react/dist/ssr/Play.es.js
|
|
751
|
-
var
|
|
752
|
-
|
|
829
|
+
var a18 = o17.forwardRef((e65, r42) => /* @__PURE__ */ o17.createElement(w, { ref: r42, ...e65, weights: a17 }));
|
|
830
|
+
a18.displayName = "PlayIcon";
|
|
753
831
|
|
|
754
832
|
// ../../node_modules/.bun/@phosphor-icons+react@2.1.10+005eabf3d8b6ef06/node_modules/@phosphor-icons/react/dist/ssr/Plus.es.js
|
|
755
|
-
import * as
|
|
833
|
+
import * as o18 from "react";
|
|
756
834
|
|
|
757
835
|
// ../../node_modules/.bun/@phosphor-icons+react@2.1.10+005eabf3d8b6ef06/node_modules/@phosphor-icons/react/dist/defs/Plus.es.js
|
|
758
|
-
import * as
|
|
759
|
-
var
|
|
836
|
+
import * as e30 from "react";
|
|
837
|
+
var a19 = /* @__PURE__ */ new Map([
|
|
760
838
|
[
|
|
761
839
|
"bold",
|
|
762
|
-
/* @__PURE__ */
|
|
840
|
+
/* @__PURE__ */ e30.createElement(e30.Fragment, null, /* @__PURE__ */ e30.createElement("path", { d: "M228,128a12,12,0,0,1-12,12H140v76a12,12,0,0,1-24,0V140H40a12,12,0,0,1,0-24h76V40a12,12,0,0,1,24,0v76h76A12,12,0,0,1,228,128Z" }))
|
|
763
841
|
],
|
|
764
842
|
[
|
|
765
843
|
"duotone",
|
|
766
|
-
/* @__PURE__ */
|
|
844
|
+
/* @__PURE__ */ e30.createElement(e30.Fragment, null, /* @__PURE__ */ e30.createElement(
|
|
767
845
|
"path",
|
|
768
846
|
{
|
|
769
847
|
d: "M216,56V200a16,16,0,0,1-16,16H56a16,16,0,0,1-16-16V56A16,16,0,0,1,56,40H200A16,16,0,0,1,216,56Z",
|
|
770
848
|
opacity: "0.2"
|
|
771
849
|
}
|
|
772
|
-
), /* @__PURE__ */
|
|
850
|
+
), /* @__PURE__ */ e30.createElement("path", { d: "M224,128a8,8,0,0,1-8,8H136v80a8,8,0,0,1-16,0V136H40a8,8,0,0,1,0-16h80V40a8,8,0,0,1,16,0v80h80A8,8,0,0,1,224,128Z" }))
|
|
773
851
|
],
|
|
774
852
|
[
|
|
775
853
|
"fill",
|
|
776
|
-
/* @__PURE__ */
|
|
854
|
+
/* @__PURE__ */ e30.createElement(e30.Fragment, null, /* @__PURE__ */ e30.createElement("path", { d: "M208,32H48A16,16,0,0,0,32,48V208a16,16,0,0,0,16,16H208a16,16,0,0,0,16-16V48A16,16,0,0,0,208,32ZM184,136H136v48a8,8,0,0,1-16,0V136H72a8,8,0,0,1,0-16h48V72a8,8,0,0,1,16,0v48h48a8,8,0,0,1,0,16Z" }))
|
|
777
855
|
],
|
|
778
856
|
[
|
|
779
857
|
"light",
|
|
780
|
-
/* @__PURE__ */
|
|
858
|
+
/* @__PURE__ */ e30.createElement(e30.Fragment, null, /* @__PURE__ */ e30.createElement("path", { d: "M222,128a6,6,0,0,1-6,6H134v82a6,6,0,0,1-12,0V134H40a6,6,0,0,1,0-12h82V40a6,6,0,0,1,12,0v82h82A6,6,0,0,1,222,128Z" }))
|
|
781
859
|
],
|
|
782
860
|
[
|
|
783
861
|
"regular",
|
|
784
|
-
/* @__PURE__ */
|
|
862
|
+
/* @__PURE__ */ e30.createElement(e30.Fragment, null, /* @__PURE__ */ e30.createElement("path", { d: "M224,128a8,8,0,0,1-8,8H136v80a8,8,0,0,1-16,0V136H40a8,8,0,0,1,0-16h80V40a8,8,0,0,1,16,0v80h80A8,8,0,0,1,224,128Z" }))
|
|
785
863
|
],
|
|
786
864
|
[
|
|
787
865
|
"thin",
|
|
788
|
-
/* @__PURE__ */
|
|
866
|
+
/* @__PURE__ */ e30.createElement(e30.Fragment, null, /* @__PURE__ */ e30.createElement("path", { d: "M220,128a4,4,0,0,1-4,4H132v84a4,4,0,0,1-8,0V132H40a4,4,0,0,1,0-8h84V40a4,4,0,0,1,8,0v84h84A4,4,0,0,1,220,128Z" }))
|
|
789
867
|
]
|
|
790
868
|
]);
|
|
791
869
|
|
|
792
870
|
// ../../node_modules/.bun/@phosphor-icons+react@2.1.10+005eabf3d8b6ef06/node_modules/@phosphor-icons/react/dist/ssr/Plus.es.js
|
|
793
|
-
var
|
|
794
|
-
|
|
871
|
+
var e31 = o18.forwardRef((r42, s5) => /* @__PURE__ */ o18.createElement(w, { ref: s5, ...r42, weights: a19 }));
|
|
872
|
+
e31.displayName = "PlusIcon";
|
|
795
873
|
|
|
796
874
|
// ../../node_modules/.bun/@phosphor-icons+react@2.1.10+005eabf3d8b6ef06/node_modules/@phosphor-icons/react/dist/ssr/Sparkle.es.js
|
|
797
|
-
import * as
|
|
875
|
+
import * as e32 from "react";
|
|
798
876
|
|
|
799
877
|
// ../../node_modules/.bun/@phosphor-icons+react@2.1.10+005eabf3d8b6ef06/node_modules/@phosphor-icons/react/dist/defs/Sparkle.es.js
|
|
800
|
-
import * as
|
|
878
|
+
import * as a20 from "react";
|
|
801
879
|
var l = /* @__PURE__ */ new Map([
|
|
802
880
|
[
|
|
803
881
|
"bold",
|
|
804
|
-
/* @__PURE__ */
|
|
882
|
+
/* @__PURE__ */ a20.createElement(a20.Fragment, null, /* @__PURE__ */ a20.createElement("path", { d: "M199,125.31l-49.88-18.39L130.69,57a19.92,19.92,0,0,0-37.38,0L74.92,106.92,25,125.31a19.92,19.92,0,0,0,0,37.38l49.88,18.39L93.31,231a19.92,19.92,0,0,0,37.38,0l18.39-49.88L199,162.69a19.92,19.92,0,0,0,0-37.38Zm-63.38,35.16a12,12,0,0,0-7.11,7.11L112,212.28l-16.47-44.7a12,12,0,0,0-7.11-7.11L43.72,144l44.7-16.47a12,12,0,0,0,7.11-7.11L112,75.72l16.47,44.7a12,12,0,0,0,7.11,7.11L180.28,144ZM140,40a12,12,0,0,1,12-12h12V16a12,12,0,0,1,24,0V28h12a12,12,0,0,1,0,24H188V64a12,12,0,0,1-24,0V52H152A12,12,0,0,1,140,40ZM252,88a12,12,0,0,1-12,12h-4v4a12,12,0,0,1-24,0v-4h-4a12,12,0,0,1,0-24h4V72a12,12,0,0,1,24,0v4h4A12,12,0,0,1,252,88Z" }))
|
|
805
883
|
],
|
|
806
884
|
[
|
|
807
885
|
"duotone",
|
|
808
|
-
/* @__PURE__ */
|
|
886
|
+
/* @__PURE__ */ a20.createElement(a20.Fragment, null, /* @__PURE__ */ a20.createElement(
|
|
809
887
|
"path",
|
|
810
888
|
{
|
|
811
889
|
d: "M194.82,151.43l-55.09,20.3-20.3,55.09a7.92,7.92,0,0,1-14.86,0l-20.3-55.09-55.09-20.3a7.92,7.92,0,0,1,0-14.86l55.09-20.3,20.3-55.09a7.92,7.92,0,0,1,14.86,0l20.3,55.09,55.09,20.3A7.92,7.92,0,0,1,194.82,151.43Z",
|
|
812
890
|
opacity: "0.2"
|
|
813
891
|
}
|
|
814
|
-
), /* @__PURE__ */
|
|
892
|
+
), /* @__PURE__ */ a20.createElement("path", { d: "M197.58,129.06,146,110l-19-51.62a15.92,15.92,0,0,0-29.88,0L78,110l-51.62,19a15.92,15.92,0,0,0,0,29.88L78,178l19,51.62a15.92,15.92,0,0,0,29.88,0L146,178l51.62-19a15.92,15.92,0,0,0,0-29.88ZM137,164.22a8,8,0,0,0-4.74,4.74L112,223.85,91.78,169A8,8,0,0,0,87,164.22L32.15,144,87,123.78A8,8,0,0,0,91.78,119L112,64.15,132.22,119a8,8,0,0,0,4.74,4.74L191.85,144ZM144,40a8,8,0,0,1,8-8h16V16a8,8,0,0,1,16,0V32h16a8,8,0,0,1,0,16H184V64a8,8,0,0,1-16,0V48H152A8,8,0,0,1,144,40ZM248,88a8,8,0,0,1-8,8h-8v8a8,8,0,0,1-16,0V96h-8a8,8,0,0,1,0-16h8V72a8,8,0,0,1,16,0v8h8A8,8,0,0,1,248,88Z" }))
|
|
815
893
|
],
|
|
816
894
|
[
|
|
817
895
|
"fill",
|
|
818
|
-
/* @__PURE__ */
|
|
896
|
+
/* @__PURE__ */ a20.createElement(a20.Fragment, null, /* @__PURE__ */ a20.createElement("path", { d: "M208,144a15.78,15.78,0,0,1-10.42,14.94L146,178l-19,51.62a15.92,15.92,0,0,1-29.88,0L78,178l-51.62-19a15.92,15.92,0,0,1,0-29.88L78,110l19-51.62a15.92,15.92,0,0,1,29.88,0L146,110l51.62,19A15.78,15.78,0,0,1,208,144ZM152,48h16V64a8,8,0,0,0,16,0V48h16a8,8,0,0,0,0-16H184V16a8,8,0,0,0-16,0V32H152a8,8,0,0,0,0,16Zm88,32h-8V72a8,8,0,0,0-16,0v8h-8a8,8,0,0,0,0,16h8v8a8,8,0,0,0,16,0V96h8a8,8,0,0,0,0-16Z" }))
|
|
819
897
|
],
|
|
820
898
|
[
|
|
821
899
|
"light",
|
|
822
|
-
/* @__PURE__ */
|
|
900
|
+
/* @__PURE__ */ a20.createElement(a20.Fragment, null, /* @__PURE__ */ a20.createElement("path", { d: "M196.89,130.94,144.4,111.6,125.06,59.11a13.92,13.92,0,0,0-26.12,0L79.6,111.6,27.11,130.94a13.92,13.92,0,0,0,0,26.12L79.6,176.4l19.34,52.49a13.92,13.92,0,0,0,26.12,0L144.4,176.4l52.49-19.34a13.92,13.92,0,0,0,0-26.12Zm-4.15,14.86-55.08,20.3a6,6,0,0,0-3.56,3.56l-20.3,55.08a1.92,1.92,0,0,1-3.6,0L89.9,169.66a6,6,0,0,0-3.56-3.56L31.26,145.8a1.92,1.92,0,0,1,0-3.6l55.08-20.3a6,6,0,0,0,3.56-3.56l20.3-55.08a1.92,1.92,0,0,1,3.6,0l20.3,55.08a6,6,0,0,0,3.56,3.56l55.08,20.3a1.92,1.92,0,0,1,0,3.6ZM146,40a6,6,0,0,1,6-6h18V16a6,6,0,0,1,12,0V34h18a6,6,0,0,1,0,12H182V64a6,6,0,0,1-12,0V46H152A6,6,0,0,1,146,40ZM246,88a6,6,0,0,1-6,6H230v10a6,6,0,0,1-12,0V94H208a6,6,0,0,1,0-12h10V72a6,6,0,0,1,12,0V82h10A6,6,0,0,1,246,88Z" }))
|
|
823
901
|
],
|
|
824
902
|
[
|
|
825
903
|
"regular",
|
|
826
|
-
/* @__PURE__ */
|
|
904
|
+
/* @__PURE__ */ a20.createElement(a20.Fragment, null, /* @__PURE__ */ a20.createElement("path", { d: "M197.58,129.06,146,110l-19-51.62a15.92,15.92,0,0,0-29.88,0L78,110l-51.62,19a15.92,15.92,0,0,0,0,29.88L78,178l19,51.62a15.92,15.92,0,0,0,29.88,0L146,178l51.62-19a15.92,15.92,0,0,0,0-29.88ZM137,164.22a8,8,0,0,0-4.74,4.74L112,223.85,91.78,169A8,8,0,0,0,87,164.22L32.15,144,87,123.78A8,8,0,0,0,91.78,119L112,64.15,132.22,119a8,8,0,0,0,4.74,4.74L191.85,144ZM144,40a8,8,0,0,1,8-8h16V16a8,8,0,0,1,16,0V32h16a8,8,0,0,1,0,16H184V64a8,8,0,0,1-16,0V48H152A8,8,0,0,1,144,40ZM248,88a8,8,0,0,1-8,8h-8v8a8,8,0,0,1-16,0V96h-8a8,8,0,0,1,0-16h8V72a8,8,0,0,1,16,0v8h8A8,8,0,0,1,248,88Z" }))
|
|
827
905
|
],
|
|
828
906
|
[
|
|
829
907
|
"thin",
|
|
830
|
-
/* @__PURE__ */
|
|
908
|
+
/* @__PURE__ */ a20.createElement(a20.Fragment, null, /* @__PURE__ */ a20.createElement("path", { d: "M196.2,132.81l-53.36-19.65L123.19,59.8a11.93,11.93,0,0,0-22.38,0L81.16,113.16,27.8,132.81a11.93,11.93,0,0,0,0,22.38l53.36,19.65,19.65,53.36a11.93,11.93,0,0,0,22.38,0l19.65-53.36,53.36-19.65a11.93,11.93,0,0,0,0-22.38Zm-2.77,14.87L138.35,168a4,4,0,0,0-2.37,2.37l-20.3,55.08a3.92,3.92,0,0,1-7.36,0L88,170.35A4,4,0,0,0,85.65,168l-55.08-20.3a3.92,3.92,0,0,1,0-7.36L85.65,120A4,4,0,0,0,88,117.65l20.3-55.08a3.92,3.92,0,0,1,7.36,0L136,117.65a4,4,0,0,0,2.37,2.37l55.08,20.3a3.92,3.92,0,0,1,0,7.36ZM148,40a4,4,0,0,1,4-4h20V16a4,4,0,0,1,8,0V36h20a4,4,0,0,1,0,8H180V64a4,4,0,0,1-8,0V44H152A4,4,0,0,1,148,40Zm96,48a4,4,0,0,1-4,4H228v12a4,4,0,0,1-8,0V92H208a4,4,0,0,1,0-8h12V72a4,4,0,0,1,8,0V84h12A4,4,0,0,1,244,88Z" }))
|
|
831
909
|
]
|
|
832
910
|
]);
|
|
833
911
|
|
|
834
912
|
// ../../node_modules/.bun/@phosphor-icons+react@2.1.10+005eabf3d8b6ef06/node_modules/@phosphor-icons/react/dist/ssr/Sparkle.es.js
|
|
835
|
-
var
|
|
836
|
-
|
|
913
|
+
var r8 = e32.forwardRef((o55, a31) => /* @__PURE__ */ e32.createElement(w, { ref: a31, ...o55, weights: l }));
|
|
914
|
+
r8.displayName = "SparkleIcon";
|
|
837
915
|
|
|
838
916
|
// ../../node_modules/.bun/@phosphor-icons+react@2.1.10+005eabf3d8b6ef06/node_modules/@phosphor-icons/react/dist/ssr/Star.es.js
|
|
839
|
-
import * as
|
|
917
|
+
import * as r9 from "react";
|
|
840
918
|
|
|
841
919
|
// ../../node_modules/.bun/@phosphor-icons+react@2.1.10+005eabf3d8b6ef06/node_modules/@phosphor-icons/react/dist/defs/Star.es.js
|
|
842
|
-
import * as
|
|
920
|
+
import * as a21 from "react";
|
|
843
921
|
var l2 = /* @__PURE__ */ new Map([
|
|
844
922
|
[
|
|
845
923
|
"bold",
|
|
846
|
-
/* @__PURE__ */
|
|
924
|
+
/* @__PURE__ */ a21.createElement(a21.Fragment, null, /* @__PURE__ */ a21.createElement("path", { d: "M243,96a20.33,20.33,0,0,0-17.74-14l-56.59-4.57L146.83,24.62a20.36,20.36,0,0,0-37.66,0L87.35,77.44,30.76,82A20.45,20.45,0,0,0,19.1,117.88l43.18,37.24-13.2,55.7A20.37,20.37,0,0,0,79.57,233L128,203.19,176.43,233a20.39,20.39,0,0,0,30.49-22.15l-13.2-55.7,43.18-37.24A20.43,20.43,0,0,0,243,96ZM172.53,141.7a12,12,0,0,0-3.84,11.86L181.58,208l-47.29-29.08a12,12,0,0,0-12.58,0L74.42,208l12.89-54.4a12,12,0,0,0-3.84-11.86L41.2,105.24l55.4-4.47a12,12,0,0,0,10.13-7.38L128,41.89l21.27,51.5a12,12,0,0,0,10.13,7.38l55.4,4.47Z" }))
|
|
847
925
|
],
|
|
848
926
|
[
|
|
849
927
|
"duotone",
|
|
850
|
-
/* @__PURE__ */
|
|
928
|
+
/* @__PURE__ */ a21.createElement(a21.Fragment, null, /* @__PURE__ */ a21.createElement(
|
|
851
929
|
"path",
|
|
852
930
|
{
|
|
853
931
|
d: "M229.06,108.79l-48.7,42,14.88,62.79a8.4,8.4,0,0,1-12.52,9.17L128,189.09,73.28,222.74a8.4,8.4,0,0,1-12.52-9.17l14.88-62.79-48.7-42A8.46,8.46,0,0,1,31.73,94L95.64,88.8l24.62-59.6a8.36,8.36,0,0,1,15.48,0l24.62,59.6L224.27,94A8.46,8.46,0,0,1,229.06,108.79Z",
|
|
854
932
|
opacity: "0.2"
|
|
855
933
|
}
|
|
856
|
-
), /* @__PURE__ */
|
|
934
|
+
), /* @__PURE__ */ a21.createElement("path", { d: "M239.18,97.26A16.38,16.38,0,0,0,224.92,86l-59-4.76L143.14,26.15a16.36,16.36,0,0,0-30.27,0L90.11,81.23,31.08,86a16.46,16.46,0,0,0-9.37,28.86l45,38.83L53,211.75a16.38,16.38,0,0,0,24.5,17.82L128,198.49l50.53,31.08A16.4,16.4,0,0,0,203,211.75l-13.76-58.07,45-38.83A16.43,16.43,0,0,0,239.18,97.26Zm-15.34,5.47-48.7,42a8,8,0,0,0-2.56,7.91l14.88,62.8a.37.37,0,0,1-.17.48c-.18.14-.23.11-.38,0l-54.72-33.65a8,8,0,0,0-8.38,0L69.09,215.94c-.15.09-.19.12-.38,0a.37.37,0,0,1-.17-.48l14.88-62.8a8,8,0,0,0-2.56-7.91l-48.7-42c-.12-.1-.23-.19-.13-.5s.18-.27.33-.29l63.92-5.16A8,8,0,0,0,103,91.86l24.62-59.61c.08-.17.11-.25.35-.25s.27.08.35.25L153,91.86a8,8,0,0,0,6.75,4.92l63.92,5.16c.15,0,.24,0,.33.29S224,102.63,223.84,102.73Z" }))
|
|
857
935
|
],
|
|
858
936
|
[
|
|
859
937
|
"fill",
|
|
860
|
-
/* @__PURE__ */
|
|
938
|
+
/* @__PURE__ */ a21.createElement(a21.Fragment, null, /* @__PURE__ */ a21.createElement("path", { d: "M234.29,114.85l-45,38.83L203,211.75a16.4,16.4,0,0,1-24.5,17.82L128,198.49,77.47,229.57A16.4,16.4,0,0,1,53,211.75l13.76-58.07-45-38.83A16.46,16.46,0,0,1,31.08,86l59-4.76,22.76-55.08a16.36,16.36,0,0,1,30.27,0l22.75,55.08,59,4.76a16.46,16.46,0,0,1,9.37,28.86Z" }))
|
|
861
939
|
],
|
|
862
940
|
[
|
|
863
941
|
"light",
|
|
864
|
-
/* @__PURE__ */
|
|
942
|
+
/* @__PURE__ */ a21.createElement(a21.Fragment, null, /* @__PURE__ */ a21.createElement("path", { d: "M237.28,97.87A14.18,14.18,0,0,0,224.76,88l-60.25-4.87-23.22-56.2a14.37,14.37,0,0,0-26.58,0L91.49,83.11,31.24,88a14.18,14.18,0,0,0-12.52,9.89A14.43,14.43,0,0,0,23,113.32L69,152.93l-14,59.25a14.4,14.4,0,0,0,5.59,15,14.1,14.1,0,0,0,15.91.6L128,196.12l51.58,31.71a14.1,14.1,0,0,0,15.91-.6,14.4,14.4,0,0,0,5.59-15l-14-59.25L233,113.32A14.43,14.43,0,0,0,237.28,97.87Zm-12.14,6.37-48.69,42a6,6,0,0,0-1.92,5.92l14.88,62.79a2.35,2.35,0,0,1-.95,2.57,2.24,2.24,0,0,1-2.6.1L131.14,184a6,6,0,0,0-6.28,0L70.14,217.61a2.24,2.24,0,0,1-2.6-.1,2.35,2.35,0,0,1-1-2.57l14.88-62.79a6,6,0,0,0-1.92-5.92l-48.69-42a2.37,2.37,0,0,1-.73-2.65,2.28,2.28,0,0,1,2.07-1.65l63.92-5.16a6,6,0,0,0,5.06-3.69l24.63-59.6a2.35,2.35,0,0,1,4.38,0l24.63,59.6a6,6,0,0,0,5.06,3.69l63.92,5.16a2.28,2.28,0,0,1,2.07,1.65A2.37,2.37,0,0,1,225.14,104.24Z" }))
|
|
865
943
|
],
|
|
866
944
|
[
|
|
867
945
|
"regular",
|
|
868
|
-
/* @__PURE__ */
|
|
946
|
+
/* @__PURE__ */ a21.createElement(a21.Fragment, null, /* @__PURE__ */ a21.createElement("path", { d: "M239.18,97.26A16.38,16.38,0,0,0,224.92,86l-59-4.76L143.14,26.15a16.36,16.36,0,0,0-30.27,0L90.11,81.23,31.08,86a16.46,16.46,0,0,0-9.37,28.86l45,38.83L53,211.75a16.38,16.38,0,0,0,24.5,17.82L128,198.49l50.53,31.08A16.4,16.4,0,0,0,203,211.75l-13.76-58.07,45-38.83A16.43,16.43,0,0,0,239.18,97.26Zm-15.34,5.47-48.7,42a8,8,0,0,0-2.56,7.91l14.88,62.8a.37.37,0,0,1-.17.48c-.18.14-.23.11-.38,0l-54.72-33.65a8,8,0,0,0-8.38,0L69.09,215.94c-.15.09-.19.12-.38,0a.37.37,0,0,1-.17-.48l14.88-62.8a8,8,0,0,0-2.56-7.91l-48.7-42c-.12-.1-.23-.19-.13-.5s.18-.27.33-.29l63.92-5.16A8,8,0,0,0,103,91.86l24.62-59.61c.08-.17.11-.25.35-.25s.27.08.35.25L153,91.86a8,8,0,0,0,6.75,4.92l63.92,5.16c.15,0,.24,0,.33.29S224,102.63,223.84,102.73Z" }))
|
|
869
947
|
],
|
|
870
948
|
[
|
|
871
949
|
"thin",
|
|
872
|
-
/* @__PURE__ */
|
|
950
|
+
/* @__PURE__ */ a21.createElement(a21.Fragment, null, /* @__PURE__ */ a21.createElement("path", { d: "M235.36,98.49A12.21,12.21,0,0,0,224.59,90l-61.47-5L139.44,27.67a12.37,12.37,0,0,0-22.88,0L92.88,85,31.41,90a12.45,12.45,0,0,0-7.07,21.84l46.85,40.41L56.87,212.64a12.35,12.35,0,0,0,18.51,13.49L128,193.77l52.62,32.36a12.12,12.12,0,0,0,13.69-.51,12.28,12.28,0,0,0,4.82-13l-14.32-60.42,46.85-40.41A12.29,12.29,0,0,0,235.36,98.49Zm-8.93,7.26-48.68,42a4,4,0,0,0-1.28,3.95l14.87,62.79a4.37,4.37,0,0,1-1.72,4.65,4.24,4.24,0,0,1-4.81.18L130.1,185.67a4,4,0,0,0-4.2,0L71.19,219.32a4.24,4.24,0,0,1-4.81-.18,4.37,4.37,0,0,1-1.72-4.65L79.53,151.7a4,4,0,0,0-1.28-3.95l-48.68-42A4.37,4.37,0,0,1,28.25,101a4.31,4.31,0,0,1,3.81-3L96,92.79a4,4,0,0,0,3.38-2.46L124,30.73a4.35,4.35,0,0,1,8.08,0l24.62,59.6A4,4,0,0,0,160,92.79l63.9,5.15a4.31,4.31,0,0,1,3.81,3A4.37,4.37,0,0,1,226.43,105.75Z" }))
|
|
873
951
|
]
|
|
874
952
|
]);
|
|
875
953
|
|
|
876
954
|
// ../../node_modules/.bun/@phosphor-icons+react@2.1.10+005eabf3d8b6ef06/node_modules/@phosphor-icons/react/dist/ssr/Star.es.js
|
|
877
|
-
var
|
|
878
|
-
|
|
955
|
+
var t7 = r9.forwardRef((o55, a31) => /* @__PURE__ */ r9.createElement(w, { ref: a31, ...o55, weights: l2 }));
|
|
956
|
+
t7.displayName = "StarIcon";
|
|
879
957
|
|
|
880
958
|
// ../../node_modules/.bun/@phosphor-icons+react@2.1.10+005eabf3d8b6ef06/node_modules/@phosphor-icons/react/dist/ssr/UserCircle.es.js
|
|
881
|
-
import * as
|
|
959
|
+
import * as e34 from "react";
|
|
882
960
|
|
|
883
961
|
// ../../node_modules/.bun/@phosphor-icons+react@2.1.10+005eabf3d8b6ef06/node_modules/@phosphor-icons/react/dist/defs/UserCircle.es.js
|
|
884
|
-
import * as
|
|
885
|
-
var
|
|
962
|
+
import * as e33 from "react";
|
|
963
|
+
var a22 = /* @__PURE__ */ new Map([
|
|
886
964
|
[
|
|
887
965
|
"bold",
|
|
888
|
-
/* @__PURE__ */
|
|
966
|
+
/* @__PURE__ */ e33.createElement(e33.Fragment, null, /* @__PURE__ */ e33.createElement("path", { d: "M128,20A108,108,0,1,0,236,128,108.12,108.12,0,0,0,128,20ZM79.57,196.57a60,60,0,0,1,96.86,0,83.72,83.72,0,0,1-96.86,0ZM100,120a28,28,0,1,1,28,28A28,28,0,0,1,100,120ZM194,179.94a83.48,83.48,0,0,0-29-23.42,52,52,0,1,0-74,0,83.48,83.48,0,0,0-29,23.42,84,84,0,1,1,131.9,0Z" }))
|
|
889
967
|
],
|
|
890
968
|
[
|
|
891
969
|
"duotone",
|
|
892
|
-
/* @__PURE__ */
|
|
970
|
+
/* @__PURE__ */ e33.createElement(e33.Fragment, null, /* @__PURE__ */ e33.createElement(
|
|
893
971
|
"path",
|
|
894
972
|
{
|
|
895
973
|
d: "M224,128a95.76,95.76,0,0,1-31.8,71.37A72,72,0,0,0,128,160a40,40,0,1,0-40-40,40,40,0,0,0,40,40,72,72,0,0,0-64.2,39.37h0A96,96,0,1,1,224,128Z",
|
|
896
974
|
opacity: "0.2"
|
|
897
975
|
}
|
|
898
|
-
), /* @__PURE__ */
|
|
976
|
+
), /* @__PURE__ */ e33.createElement("path", { d: "M128,24A104,104,0,1,0,232,128,104.11,104.11,0,0,0,128,24ZM74.08,197.5a64,64,0,0,1,107.84,0,87.83,87.83,0,0,1-107.84,0ZM96,120a32,32,0,1,1,32,32A32,32,0,0,1,96,120Zm97.76,66.41a79.66,79.66,0,0,0-36.06-28.75,48,48,0,1,0-59.4,0,79.66,79.66,0,0,0-36.06,28.75,88,88,0,1,1,131.52,0Z" }))
|
|
899
977
|
],
|
|
900
978
|
[
|
|
901
979
|
"fill",
|
|
902
|
-
/* @__PURE__ */
|
|
980
|
+
/* @__PURE__ */ e33.createElement(e33.Fragment, null, /* @__PURE__ */ e33.createElement("path", { d: "M172,120a44,44,0,1,1-44-44A44.05,44.05,0,0,1,172,120Zm60,8A104,104,0,1,1,128,24,104.11,104.11,0,0,1,232,128Zm-16,0a88.09,88.09,0,0,0-91.47-87.93C77.43,41.89,39.87,81.12,40,128.25a87.65,87.65,0,0,0,22.24,58.16A79.71,79.71,0,0,1,84,165.1a4,4,0,0,1,4.83.32,59.83,59.83,0,0,0,78.28,0,4,4,0,0,1,4.83-.32,79.71,79.71,0,0,1,21.79,21.31A87.62,87.62,0,0,0,216,128Z" }))
|
|
903
981
|
],
|
|
904
982
|
[
|
|
905
983
|
"light",
|
|
906
|
-
/* @__PURE__ */
|
|
984
|
+
/* @__PURE__ */ e33.createElement(e33.Fragment, null, /* @__PURE__ */ e33.createElement("path", { d: "M128,26A102,102,0,1,0,230,128,102.12,102.12,0,0,0,128,26ZM71.44,198a66,66,0,0,1,113.12,0,89.8,89.8,0,0,1-113.12,0ZM94,120a34,34,0,1,1,34,34A34,34,0,0,1,94,120Zm99.51,69.64a77.53,77.53,0,0,0-40-31.38,46,46,0,1,0-51,0,77.53,77.53,0,0,0-40,31.38,90,90,0,1,1,131,0Z" }))
|
|
907
985
|
],
|
|
908
986
|
[
|
|
909
987
|
"regular",
|
|
910
|
-
/* @__PURE__ */
|
|
988
|
+
/* @__PURE__ */ e33.createElement(e33.Fragment, null, /* @__PURE__ */ e33.createElement("path", { d: "M128,24A104,104,0,1,0,232,128,104.11,104.11,0,0,0,128,24ZM74.08,197.5a64,64,0,0,1,107.84,0,87.83,87.83,0,0,1-107.84,0ZM96,120a32,32,0,1,1,32,32A32,32,0,0,1,96,120Zm97.76,66.41a79.66,79.66,0,0,0-36.06-28.75,48,48,0,1,0-59.4,0,79.66,79.66,0,0,0-36.06,28.75,88,88,0,1,1,131.52,0Z" }))
|
|
911
989
|
],
|
|
912
990
|
[
|
|
913
991
|
"thin",
|
|
914
|
-
/* @__PURE__ */
|
|
992
|
+
/* @__PURE__ */ e33.createElement(e33.Fragment, null, /* @__PURE__ */ e33.createElement("path", { d: "M128,28A100,100,0,1,0,228,128,100.11,100.11,0,0,0,128,28ZM68.87,198.42a68,68,0,0,1,118.26,0,91.8,91.8,0,0,1-118.26,0Zm124.3-5.55a75.61,75.61,0,0,0-44.51-34,44,44,0,1,0-41.32,0,75.61,75.61,0,0,0-44.51,34,92,92,0,1,1,130.34,0ZM128,156a36,36,0,1,1,36-36A36,36,0,0,1,128,156Z" }))
|
|
915
993
|
]
|
|
916
994
|
]);
|
|
917
995
|
|
|
918
996
|
// ../../node_modules/.bun/@phosphor-icons+react@2.1.10+005eabf3d8b6ef06/node_modules/@phosphor-icons/react/dist/ssr/UserCircle.es.js
|
|
919
|
-
var
|
|
920
|
-
|
|
997
|
+
var r10 = e34.forwardRef((o55, s5) => /* @__PURE__ */ e34.createElement(w, { ref: s5, ...o55, weights: a22 }));
|
|
998
|
+
r10.displayName = "UserCircleIcon";
|
|
921
999
|
|
|
922
1000
|
// ../../node_modules/.bun/@phosphor-icons+react@2.1.10+005eabf3d8b6ef06/node_modules/@phosphor-icons/react/dist/ssr/WarningCircle.es.js
|
|
923
|
-
import * as
|
|
1001
|
+
import * as r11 from "react";
|
|
924
1002
|
|
|
925
1003
|
// ../../node_modules/.bun/@phosphor-icons+react@2.1.10+005eabf3d8b6ef06/node_modules/@phosphor-icons/react/dist/defs/WarningCircle.es.js
|
|
926
|
-
import * as
|
|
927
|
-
var
|
|
1004
|
+
import * as e35 from "react";
|
|
1005
|
+
var a23 = /* @__PURE__ */ new Map([
|
|
928
1006
|
[
|
|
929
1007
|
"bold",
|
|
930
|
-
/* @__PURE__ */
|
|
1008
|
+
/* @__PURE__ */ e35.createElement(e35.Fragment, null, /* @__PURE__ */ e35.createElement("path", { d: "M128,20A108,108,0,1,0,236,128,108.12,108.12,0,0,0,128,20Zm0,192a84,84,0,1,1,84-84A84.09,84.09,0,0,1,128,212Zm-12-80V80a12,12,0,0,1,24,0v52a12,12,0,0,1-24,0Zm28,40a16,16,0,1,1-16-16A16,16,0,0,1,144,172Z" }))
|
|
931
1009
|
],
|
|
932
1010
|
[
|
|
933
1011
|
"duotone",
|
|
934
|
-
/* @__PURE__ */
|
|
1012
|
+
/* @__PURE__ */ e35.createElement(e35.Fragment, null, /* @__PURE__ */ e35.createElement("path", { d: "M224,128a96,96,0,1,1-96-96A96,96,0,0,1,224,128Z", opacity: "0.2" }), /* @__PURE__ */ e35.createElement("path", { d: "M128,24A104,104,0,1,0,232,128,104.11,104.11,0,0,0,128,24Zm0,192a88,88,0,1,1,88-88A88.1,88.1,0,0,1,128,216Zm-8-80V80a8,8,0,0,1,16,0v56a8,8,0,0,1-16,0Zm20,36a12,12,0,1,1-12-12A12,12,0,0,1,140,172Z" }))
|
|
935
1013
|
],
|
|
936
1014
|
[
|
|
937
1015
|
"fill",
|
|
938
|
-
/* @__PURE__ */
|
|
1016
|
+
/* @__PURE__ */ e35.createElement(e35.Fragment, null, /* @__PURE__ */ e35.createElement("path", { d: "M128,24A104,104,0,1,0,232,128,104.11,104.11,0,0,0,128,24Zm-8,56a8,8,0,0,1,16,0v56a8,8,0,0,1-16,0Zm8,104a12,12,0,1,1,12-12A12,12,0,0,1,128,184Z" }))
|
|
939
1017
|
],
|
|
940
1018
|
[
|
|
941
1019
|
"light",
|
|
942
|
-
/* @__PURE__ */
|
|
1020
|
+
/* @__PURE__ */ e35.createElement(e35.Fragment, null, /* @__PURE__ */ e35.createElement("path", { d: "M128,26A102,102,0,1,0,230,128,102.12,102.12,0,0,0,128,26Zm0,192a90,90,0,1,1,90-90A90.1,90.1,0,0,1,128,218Zm-6-82V80a6,6,0,0,1,12,0v56a6,6,0,0,1-12,0Zm16,36a10,10,0,1,1-10-10A10,10,0,0,1,138,172Z" }))
|
|
943
1021
|
],
|
|
944
1022
|
[
|
|
945
1023
|
"regular",
|
|
946
|
-
/* @__PURE__ */
|
|
1024
|
+
/* @__PURE__ */ e35.createElement(e35.Fragment, null, /* @__PURE__ */ e35.createElement("path", { d: "M128,24A104,104,0,1,0,232,128,104.11,104.11,0,0,0,128,24Zm0,192a88,88,0,1,1,88-88A88.1,88.1,0,0,1,128,216Zm-8-80V80a8,8,0,0,1,16,0v56a8,8,0,0,1-16,0Zm20,36a12,12,0,1,1-12-12A12,12,0,0,1,140,172Z" }))
|
|
947
1025
|
],
|
|
948
1026
|
[
|
|
949
1027
|
"thin",
|
|
950
|
-
/* @__PURE__ */
|
|
1028
|
+
/* @__PURE__ */ e35.createElement(e35.Fragment, null, /* @__PURE__ */ e35.createElement("path", { d: "M128,28A100,100,0,1,0,228,128,100.11,100.11,0,0,0,128,28Zm0,192a92,92,0,1,1,92-92A92.1,92.1,0,0,1,128,220Zm-4-84V80a4,4,0,0,1,8,0v56a4,4,0,0,1-8,0Zm12,36a8,8,0,1,1-8-8A8,8,0,0,1,136,172Z" }))
|
|
951
1029
|
]
|
|
952
1030
|
]);
|
|
953
1031
|
|
|
954
1032
|
// ../../node_modules/.bun/@phosphor-icons+react@2.1.10+005eabf3d8b6ef06/node_modules/@phosphor-icons/react/dist/ssr/WarningCircle.es.js
|
|
955
|
-
var
|
|
956
|
-
|
|
1033
|
+
var e36 = r11.forwardRef((o55, a31) => /* @__PURE__ */ r11.createElement(w, { ref: a31, ...o55, weights: a23 }));
|
|
1034
|
+
e36.displayName = "WarningCircleIcon";
|
|
957
1035
|
|
|
958
1036
|
// ../../node_modules/.bun/@phosphor-icons+react@2.1.10+005eabf3d8b6ef06/node_modules/@phosphor-icons/react/dist/ssr/X.es.js
|
|
959
|
-
import * as
|
|
1037
|
+
import * as o19 from "react";
|
|
960
1038
|
|
|
961
1039
|
// ../../node_modules/.bun/@phosphor-icons+react@2.1.10+005eabf3d8b6ef06/node_modules/@phosphor-icons/react/dist/defs/X.es.js
|
|
962
|
-
import * as
|
|
963
|
-
var
|
|
1040
|
+
import * as e37 from "react";
|
|
1041
|
+
var a24 = /* @__PURE__ */ new Map([
|
|
964
1042
|
[
|
|
965
1043
|
"bold",
|
|
966
|
-
/* @__PURE__ */
|
|
1044
|
+
/* @__PURE__ */ e37.createElement(e37.Fragment, null, /* @__PURE__ */ e37.createElement("path", { d: "M208.49,191.51a12,12,0,0,1-17,17L128,145,64.49,208.49a12,12,0,0,1-17-17L111,128,47.51,64.49a12,12,0,0,1,17-17L128,111l63.51-63.52a12,12,0,0,1,17,17L145,128Z" }))
|
|
967
1045
|
],
|
|
968
1046
|
[
|
|
969
1047
|
"duotone",
|
|
970
|
-
/* @__PURE__ */
|
|
1048
|
+
/* @__PURE__ */ e37.createElement(e37.Fragment, null, /* @__PURE__ */ e37.createElement(
|
|
971
1049
|
"path",
|
|
972
1050
|
{
|
|
973
1051
|
d: "M216,56V200a16,16,0,0,1-16,16H56a16,16,0,0,1-16-16V56A16,16,0,0,1,56,40H200A16,16,0,0,1,216,56Z",
|
|
974
1052
|
opacity: "0.2"
|
|
975
1053
|
}
|
|
976
|
-
), /* @__PURE__ */
|
|
1054
|
+
), /* @__PURE__ */ e37.createElement("path", { d: "M205.66,194.34a8,8,0,0,1-11.32,11.32L128,139.31,61.66,205.66a8,8,0,0,1-11.32-11.32L116.69,128,50.34,61.66A8,8,0,0,1,61.66,50.34L128,116.69l66.34-66.35a8,8,0,0,1,11.32,11.32L139.31,128Z" }))
|
|
977
1055
|
],
|
|
978
1056
|
[
|
|
979
1057
|
"fill",
|
|
980
|
-
/* @__PURE__ */
|
|
1058
|
+
/* @__PURE__ */ e37.createElement(e37.Fragment, null, /* @__PURE__ */ e37.createElement("path", { d: "M208,32H48A16,16,0,0,0,32,48V208a16,16,0,0,0,16,16H208a16,16,0,0,0,16-16V48A16,16,0,0,0,208,32ZM181.66,170.34a8,8,0,0,1-11.32,11.32L128,139.31,85.66,181.66a8,8,0,0,1-11.32-11.32L116.69,128,74.34,85.66A8,8,0,0,1,85.66,74.34L128,116.69l42.34-42.35a8,8,0,0,1,11.32,11.32L139.31,128Z" }))
|
|
981
1059
|
],
|
|
982
1060
|
[
|
|
983
1061
|
"light",
|
|
984
|
-
/* @__PURE__ */
|
|
1062
|
+
/* @__PURE__ */ e37.createElement(e37.Fragment, null, /* @__PURE__ */ e37.createElement("path", { d: "M204.24,195.76a6,6,0,1,1-8.48,8.48L128,136.49,60.24,204.24a6,6,0,0,1-8.48-8.48L119.51,128,51.76,60.24a6,6,0,0,1,8.48-8.48L128,119.51l67.76-67.75a6,6,0,0,1,8.48,8.48L136.49,128Z" }))
|
|
985
1063
|
],
|
|
986
1064
|
[
|
|
987
1065
|
"regular",
|
|
988
|
-
/* @__PURE__ */
|
|
1066
|
+
/* @__PURE__ */ e37.createElement(e37.Fragment, null, /* @__PURE__ */ e37.createElement("path", { d: "M205.66,194.34a8,8,0,0,1-11.32,11.32L128,139.31,61.66,205.66a8,8,0,0,1-11.32-11.32L116.69,128,50.34,61.66A8,8,0,0,1,61.66,50.34L128,116.69l66.34-66.35a8,8,0,0,1,11.32,11.32L139.31,128Z" }))
|
|
989
1067
|
],
|
|
990
1068
|
[
|
|
991
1069
|
"thin",
|
|
992
|
-
/* @__PURE__ */
|
|
1070
|
+
/* @__PURE__ */ e37.createElement(e37.Fragment, null, /* @__PURE__ */ e37.createElement("path", { d: "M202.83,197.17a4,4,0,0,1-5.66,5.66L128,133.66,58.83,202.83a4,4,0,0,1-5.66-5.66L122.34,128,53.17,58.83a4,4,0,0,1,5.66-5.66L128,122.34l69.17-69.17a4,4,0,1,1,5.66,5.66L133.66,128Z" }))
|
|
993
1071
|
]
|
|
994
1072
|
]);
|
|
995
1073
|
|
|
996
1074
|
// ../../node_modules/.bun/@phosphor-icons+react@2.1.10+005eabf3d8b6ef06/node_modules/@phosphor-icons/react/dist/ssr/X.es.js
|
|
997
|
-
var
|
|
998
|
-
|
|
1075
|
+
var e38 = o19.forwardRef((r42, t15) => /* @__PURE__ */ o19.createElement(w, { ref: t15, ...r42, weights: a24 }));
|
|
1076
|
+
e38.displayName = "XIcon";
|
|
999
1077
|
|
|
1000
1078
|
// ../../apps/web/src/components/icons.tsx
|
|
1001
1079
|
import { jsx } from "react/jsx-runtime";
|
|
@@ -1010,6 +1088,7 @@ var Bug = /* @__PURE__ */ icon(e9, "Bug");
|
|
|
1010
1088
|
var ChatCircleDots = /* @__PURE__ */ icon(o9, "ChatCircleDots");
|
|
1011
1089
|
var EnvelopeSimple = /* @__PURE__ */ icon(o11, "EnvelopeSimple");
|
|
1012
1090
|
var File2 = /* @__PURE__ */ icon(o12, "File");
|
|
1091
|
+
var GlobeSimple = /* @__PURE__ */ icon(o13, "GlobeSimple");
|
|
1013
1092
|
var ImageSquare = /* @__PURE__ */ icon(a13, "ImageSquare");
|
|
1014
1093
|
var LIFEBUOY = [
|
|
1015
1094
|
"M128,24A104,104,0,1,0,232,128,104,104,0,0,0,128,24Z",
|
|
@@ -1018,13 +1097,14 @@ var LIFEBUOY = [
|
|
|
1018
1097
|
"M89.4,186.4L106.92,168.88A46,46,0,0,0,149.08,168.88L166.6,186.4A70,70,0,0,1,89.4,186.4Z",
|
|
1019
1098
|
"M69.6,89.4L87.12,106.92A46,46,0,0,0,87.12,149.08L69.6,166.6A70,70,0,0,1,69.6,89.4Z"
|
|
1020
1099
|
].join("");
|
|
1021
|
-
var Lightbulb = /* @__PURE__ */ icon(
|
|
1022
|
-
var LockSimple = /* @__PURE__ */ icon(
|
|
1023
|
-
var
|
|
1024
|
-
var
|
|
1025
|
-
var
|
|
1026
|
-
var
|
|
1027
|
-
var
|
|
1100
|
+
var Lightbulb = /* @__PURE__ */ icon(o14, "Lightbulb");
|
|
1101
|
+
var LockSimple = /* @__PURE__ */ icon(e27, "LockSimple");
|
|
1102
|
+
var Monitor = /* @__PURE__ */ icon(r7, "Monitor");
|
|
1103
|
+
var Play = /* @__PURE__ */ icon(a18, "Play");
|
|
1104
|
+
var Sparkle = /* @__PURE__ */ icon(r8, "Sparkle");
|
|
1105
|
+
var Star = /* @__PURE__ */ icon(t7, "Star");
|
|
1106
|
+
var UserCircle = /* @__PURE__ */ icon(r10, "UserCircle");
|
|
1107
|
+
var WarningCircle = /* @__PURE__ */ icon(e36, "WarningCircle");
|
|
1028
1108
|
var ArrowDown = /* @__PURE__ */ icon(r, "ArrowDown", "bold");
|
|
1029
1109
|
var ArrowRight = /* @__PURE__ */ icon(o2, "ArrowRight", "bold");
|
|
1030
1110
|
var ArrowUp = /* @__PURE__ */ icon(o3, "ArrowUp", "bold");
|
|
@@ -1038,8 +1118,8 @@ var ArrowsOut = /* @__PURE__ */ icon(o6, "ArrowsOut", "bold");
|
|
|
1038
1118
|
var CaretDown = /* @__PURE__ */ icon(e11, "CaretDown", "bold");
|
|
1039
1119
|
var CaretRight = /* @__PURE__ */ icon(e13, "CaretRight", "bold");
|
|
1040
1120
|
var Check = /* @__PURE__ */ icon(o10, "Check", "bold");
|
|
1041
|
-
var X = /* @__PURE__ */ icon(
|
|
1042
|
-
var Plus = /* @__PURE__ */ icon(
|
|
1121
|
+
var X = /* @__PURE__ */ icon(e38, "X", "bold");
|
|
1122
|
+
var Plus = /* @__PURE__ */ icon(e31, "Plus", "bold");
|
|
1043
1123
|
|
|
1044
1124
|
// ../../apps/web/src/components/support-widget/launcher-position.ts
|
|
1045
1125
|
var DEFAULT_SPOT = { side: "right", y: 1 };
|
|
@@ -1122,7 +1202,7 @@ function setSpot(spot) {
|
|
|
1122
1202
|
}
|
|
1123
1203
|
|
|
1124
1204
|
// ../../apps/web/src/components/support-widget/support-widget.tsx
|
|
1125
|
-
import { useState as
|
|
1205
|
+
import { useState as useState11 } from "react";
|
|
1126
1206
|
|
|
1127
1207
|
// ../../apps/web/src/components/ui/collapse.tsx
|
|
1128
1208
|
import { jsx as jsx2 } from "react/jsx-runtime";
|
|
@@ -1157,57 +1237,57 @@ import * as React3 from "react";
|
|
|
1157
1237
|
|
|
1158
1238
|
// ../../node_modules/.bun/@shadcn+react@0.3.0+03aa47d54245a271/node_modules/@shadcn/react/dist/chunk-HBS6WEDP.js
|
|
1159
1239
|
import * as i2 from "react";
|
|
1160
|
-
function S({ defaultTagName:
|
|
1161
|
-
let
|
|
1162
|
-
if (!
|
|
1163
|
-
if (typeof
|
|
1164
|
-
if (!i2.isValidElement(
|
|
1165
|
-
let
|
|
1166
|
-
return i2.cloneElement(
|
|
1167
|
-
}
|
|
1168
|
-
function d(...
|
|
1240
|
+
function S({ defaultTagName: a31, props: r42, render: t15, state: n2 = {}, stateAttributesMapping: e65 }) {
|
|
1241
|
+
let o55 = d(R(n2, e65), r42);
|
|
1242
|
+
if (!t15) return i2.createElement(a31, o55);
|
|
1243
|
+
if (typeof t15 == "function") return t15(o55, n2);
|
|
1244
|
+
if (!i2.isValidElement(t15)) return null;
|
|
1245
|
+
let s5 = t15.props, u = { ...d(o55, s5), ref: f8(o55.ref, s5.ref) };
|
|
1246
|
+
return i2.cloneElement(t15, u);
|
|
1247
|
+
}
|
|
1248
|
+
function d(...a31) {
|
|
1169
1249
|
let r42 = {};
|
|
1170
|
-
for (let
|
|
1171
|
-
if (!
|
|
1172
|
-
let n2 =
|
|
1173
|
-
for (let
|
|
1174
|
-
let
|
|
1175
|
-
if (
|
|
1176
|
-
let
|
|
1177
|
-
|
|
1250
|
+
for (let t15 of a31) {
|
|
1251
|
+
if (!t15) continue;
|
|
1252
|
+
let n2 = t15;
|
|
1253
|
+
for (let e65 of Object.keys(n2)) {
|
|
1254
|
+
let o55 = n2[e65];
|
|
1255
|
+
if (o55 === void 0) continue;
|
|
1256
|
+
let s5 = r42[e65];
|
|
1257
|
+
e65 === "className" ? r42[e65] = [s5, o55].filter(Boolean).join(" ") : e65 === "style" ? r42[e65] = { ...s5, ...o55 } : e65 === "ref" ? r42[e65] = f8(s5, o55) : l4(e65) && typeof s5 == "function" && typeof o55 == "function" ? r42[e65] = p3(o55, s5) : r42[e65] = o55;
|
|
1178
1258
|
}
|
|
1179
1259
|
}
|
|
1180
1260
|
return r42;
|
|
1181
1261
|
}
|
|
1182
|
-
function R(
|
|
1183
|
-
let
|
|
1184
|
-
for (let n2 of Object.keys(
|
|
1185
|
-
let
|
|
1186
|
-
if (
|
|
1187
|
-
Object.assign(
|
|
1262
|
+
function R(a31, r42) {
|
|
1263
|
+
let t15 = {};
|
|
1264
|
+
for (let n2 of Object.keys(a31)) {
|
|
1265
|
+
let e65 = a31[n2], o55 = r42?.[n2]?.(e65);
|
|
1266
|
+
if (o55) {
|
|
1267
|
+
Object.assign(t15, o55);
|
|
1188
1268
|
continue;
|
|
1189
1269
|
}
|
|
1190
1270
|
if (n2 === "slot") {
|
|
1191
|
-
|
|
1271
|
+
t15["data-slot"] = e65;
|
|
1192
1272
|
continue;
|
|
1193
1273
|
}
|
|
1194
|
-
let
|
|
1195
|
-
typeof
|
|
1274
|
+
let s5 = `data-${String(n2).replace(/[A-Z]/g, (c8) => `-${c8.toLowerCase()}`)}`;
|
|
1275
|
+
typeof e65 == "boolean" ? t15[s5] = e65 ? "" : void 0 : e65 != null && (t15[s5] = String(e65));
|
|
1196
1276
|
}
|
|
1197
|
-
return
|
|
1277
|
+
return t15;
|
|
1198
1278
|
}
|
|
1199
|
-
function
|
|
1279
|
+
function p3(a31, r42) {
|
|
1200
1280
|
return function(n2) {
|
|
1201
|
-
|
|
1281
|
+
a31(n2), n2.defaultPrevented || r42(n2);
|
|
1202
1282
|
};
|
|
1203
1283
|
}
|
|
1204
|
-
function l4(
|
|
1205
|
-
return /^on[A-Z]/.test(
|
|
1284
|
+
function l4(a31) {
|
|
1285
|
+
return /^on[A-Z]/.test(a31);
|
|
1206
1286
|
}
|
|
1207
|
-
function f8(...
|
|
1208
|
-
let r42 =
|
|
1209
|
-
if (r42.length !== 0) return (
|
|
1210
|
-
for (let n2 of r42) typeof n2 == "function" ? n2(
|
|
1287
|
+
function f8(...a31) {
|
|
1288
|
+
let r42 = a31.filter(Boolean);
|
|
1289
|
+
if (r42.length !== 0) return (t15) => {
|
|
1290
|
+
for (let n2 of r42) typeof n2 == "function" ? n2(t15) : n2 && (n2.current = t15);
|
|
1211
1291
|
};
|
|
1212
1292
|
}
|
|
1213
1293
|
|
|
@@ -1223,116 +1303,116 @@ var Be = /* @__PURE__ */ new Set(["ArrowDown", "ArrowUp", "End", "Home", "PageDo
|
|
|
1223
1303
|
var ge = { start: false, end: false };
|
|
1224
1304
|
var dt = [];
|
|
1225
1305
|
var Q = { currentAnchorId: null, visibleMessageIds: dt };
|
|
1226
|
-
function De({ content:
|
|
1227
|
-
if (!n2 || !
|
|
1228
|
-
let
|
|
1229
|
-
return { start: n2.scrollTop >
|
|
1230
|
-
}
|
|
1231
|
-
function Fe({ content:
|
|
1232
|
-
if (!
|
|
1233
|
-
let S2 =
|
|
1234
|
-
for (let C of ee(
|
|
1235
|
-
let
|
|
1236
|
-
if (!
|
|
1306
|
+
function De({ content: e65, scrollEdgeThreshold: t15, spacer: r42, viewport: n2 }) {
|
|
1307
|
+
if (!n2 || !e65) return ge;
|
|
1308
|
+
let o55 = Se({ content: e65, spacer: r42, viewport: n2 });
|
|
1309
|
+
return { start: n2.scrollTop > t15, end: o55 - n2.scrollTop - n2.clientHeight > t15 };
|
|
1310
|
+
}
|
|
1311
|
+
function Fe({ content: e65, scrollMargin: t15, scrollPreviousItemPeek: r42, spacer: n2, viewport: o55, visibleMessageIds: i3 }) {
|
|
1312
|
+
if (!e65 || !o55) return Q;
|
|
1313
|
+
let S2 = o55.getBoundingClientRect(), l5 = S2.top + t15 + r42, d2 = typeof IntersectionObserver > "u", E = [], b2 = null;
|
|
1314
|
+
for (let C of ee(e65, n2)) {
|
|
1315
|
+
let p4 = C.dataset.messageId;
|
|
1316
|
+
if (!p4) continue;
|
|
1237
1317
|
let m5 = C.dataset.scrollAnchor === "true", L = m5 || d2 ? C.getBoundingClientRect() : null;
|
|
1238
|
-
(d2 && L ? L.bottom > l5 && L.top < S2.bottom : i3.has(
|
|
1318
|
+
(d2 && L ? L.bottom > l5 && L.top < S2.bottom : i3.has(p4)) && E.push(p4), m5 && L && L.top <= l5 + J && (b2 = p4);
|
|
1239
1319
|
}
|
|
1240
1320
|
return E.length === 0 && b2 === null ? Q : { currentAnchorId: b2, visibleMessageIds: E };
|
|
1241
1321
|
}
|
|
1242
|
-
function ee(
|
|
1243
|
-
return Array.from(
|
|
1322
|
+
function ee(e65, t15) {
|
|
1323
|
+
return Array.from(e65.children).filter((r42) => r42 instanceof HTMLElement && r42 !== t15);
|
|
1244
1324
|
}
|
|
1245
|
-
function je(
|
|
1246
|
-
for (let r42 =
|
|
1247
|
-
let n2 =
|
|
1325
|
+
function je(e65, t15) {
|
|
1326
|
+
for (let r42 = t15; r42 < e65.length; r42++) {
|
|
1327
|
+
let n2 = e65[r42];
|
|
1248
1328
|
if (n2?.dataset.scrollAnchor === "true") return n2;
|
|
1249
1329
|
}
|
|
1250
1330
|
return null;
|
|
1251
1331
|
}
|
|
1252
|
-
function Ge(
|
|
1253
|
-
for (let r42 of
|
|
1332
|
+
function Ge(e65, t15) {
|
|
1333
|
+
for (let r42 of e65) if (r42.dataset.scrollAnchor === "true" && !t15.has(r42)) return r42;
|
|
1254
1334
|
return null;
|
|
1255
1335
|
}
|
|
1256
|
-
function Ne(
|
|
1336
|
+
function Ne(e65, t15) {
|
|
1257
1337
|
let r42 = 0;
|
|
1258
|
-
for (let n2 =
|
|
1338
|
+
for (let n2 = t15; n2 < e65.length; n2++) if (e65[n2]?.dataset.scrollAnchor === "true" && (r42 += 1, r42 > 1)) return true;
|
|
1259
1339
|
return false;
|
|
1260
1340
|
}
|
|
1261
|
-
function Ue(
|
|
1262
|
-
for (let
|
|
1263
|
-
let r42 =
|
|
1341
|
+
function Ue(e65) {
|
|
1342
|
+
for (let t15 = e65.length - 1; t15 >= 0; t15--) {
|
|
1343
|
+
let r42 = e65[t15];
|
|
1264
1344
|
if (r42?.dataset.scrollAnchor === "true") return r42;
|
|
1265
1345
|
}
|
|
1266
1346
|
return null;
|
|
1267
1347
|
}
|
|
1268
|
-
function Ye({ content:
|
|
1348
|
+
function Ye({ content: e65, spacer: t15, viewport: r42 }) {
|
|
1269
1349
|
let n2 = r42.getBoundingClientRect();
|
|
1270
|
-
for (let
|
|
1271
|
-
if (!
|
|
1272
|
-
let i3 =
|
|
1273
|
-
if (i3.bottom > n2.top && i3.top < n2.bottom) return
|
|
1350
|
+
for (let o55 of ee(e65, t15)) {
|
|
1351
|
+
if (!o55.dataset.messageId) continue;
|
|
1352
|
+
let i3 = o55.getBoundingClientRect();
|
|
1353
|
+
if (i3.bottom > n2.top && i3.top < n2.bottom) return o55;
|
|
1274
1354
|
}
|
|
1275
1355
|
return null;
|
|
1276
1356
|
}
|
|
1277
|
-
function ze({ align:
|
|
1278
|
-
let i3 = pe(
|
|
1279
|
-
if (
|
|
1280
|
-
let d2 = Math.max(0,
|
|
1357
|
+
function ze({ align: e65, element: t15, scrollMargin: r42, spacer: n2, viewport: o55 }) {
|
|
1358
|
+
let i3 = pe(t15, o55), S2 = t15.getBoundingClientRect().height, l5 = bt(n2);
|
|
1359
|
+
if (e65 === "center") {
|
|
1360
|
+
let d2 = Math.max(0, o55.clientHeight - l5.start - l5.end);
|
|
1281
1361
|
return i3 - l5.start - (d2 - S2) / 2 - r42;
|
|
1282
1362
|
}
|
|
1283
|
-
if (
|
|
1284
|
-
if (
|
|
1285
|
-
let d2 = i3 + S2, E =
|
|
1286
|
-
return i3 >= E && d2 <= b2 ?
|
|
1363
|
+
if (e65 === "end") return i3 - o55.clientHeight + S2 + l5.end + r42;
|
|
1364
|
+
if (e65 === "nearest") {
|
|
1365
|
+
let d2 = i3 + S2, E = o55.scrollTop + l5.start, b2 = o55.scrollTop + o55.clientHeight - l5.end;
|
|
1366
|
+
return i3 >= E && d2 <= b2 ? o55.scrollTop : i3 < E ? i3 - l5.start - r42 : d2 - o55.clientHeight + l5.end + r42;
|
|
1287
1367
|
}
|
|
1288
1368
|
return i3 - l5.start - r42;
|
|
1289
1369
|
}
|
|
1290
|
-
function pe(
|
|
1291
|
-
let r42 =
|
|
1292
|
-
return r42.top - n2.top +
|
|
1370
|
+
function pe(e65, t15) {
|
|
1371
|
+
let r42 = e65.getBoundingClientRect(), n2 = t15.getBoundingClientRect();
|
|
1372
|
+
return r42.top - n2.top + t15.scrollTop;
|
|
1293
1373
|
}
|
|
1294
|
-
function te(
|
|
1295
|
-
return
|
|
1374
|
+
function te(e65, t15) {
|
|
1375
|
+
return e65.getBoundingClientRect().top - t15.getBoundingClientRect().top;
|
|
1296
1376
|
}
|
|
1297
|
-
function qe({ content:
|
|
1298
|
-
let
|
|
1299
|
-
return
|
|
1377
|
+
function qe({ content: e65, scrollTop: t15, spacer: r42, viewport: n2 }) {
|
|
1378
|
+
let o55 = Se({ content: e65, spacer: r42, viewport: n2 });
|
|
1379
|
+
return t15 + n2.clientHeight - o55;
|
|
1300
1380
|
}
|
|
1301
|
-
function Se({ content:
|
|
1302
|
-
let n2 = ee(
|
|
1381
|
+
function Se({ content: e65, spacer: t15, viewport: r42 }) {
|
|
1382
|
+
let n2 = ee(e65, t15), o55 = We(e65), i3 = r42.getBoundingClientRect(), S2 = r42.scrollTop, l5 = o55.start + o55.end;
|
|
1303
1383
|
for (let d2 of n2) {
|
|
1304
1384
|
let E = d2.getBoundingClientRect();
|
|
1305
|
-
l5 = Math.max(l5, E.bottom - i3.top + S2 +
|
|
1385
|
+
l5 = Math.max(l5, E.bottom - i3.top + S2 + o55.end);
|
|
1306
1386
|
}
|
|
1307
1387
|
return l5;
|
|
1308
1388
|
}
|
|
1309
|
-
function Ke(
|
|
1310
|
-
return Math.max(0,
|
|
1389
|
+
function Ke(e65) {
|
|
1390
|
+
return Math.max(0, e65.scrollHeight - e65.clientHeight);
|
|
1311
1391
|
}
|
|
1312
|
-
function We(
|
|
1313
|
-
let
|
|
1314
|
-
return { end: Re(
|
|
1392
|
+
function We(e65) {
|
|
1393
|
+
let t15 = window.getComputedStyle(e65);
|
|
1394
|
+
return { end: Re(t15.paddingBlockEnd || t15.paddingBottom), start: Re(t15.paddingBlockStart || t15.paddingTop) };
|
|
1315
1395
|
}
|
|
1316
|
-
function bt(
|
|
1317
|
-
let
|
|
1318
|
-
return
|
|
1396
|
+
function bt(e65) {
|
|
1397
|
+
let t15 = e65?.parentElement;
|
|
1398
|
+
return t15 ? We(t15) : { end: 0, start: 0 };
|
|
1319
1399
|
}
|
|
1320
|
-
function $e(
|
|
1321
|
-
if (!
|
|
1322
|
-
let
|
|
1400
|
+
function $e(e65) {
|
|
1401
|
+
if (!e65) return 0;
|
|
1402
|
+
let t15 = window.getComputedStyle(e65), r42 = t15.rowGap === "normal" ? t15.gap : t15.rowGap;
|
|
1323
1403
|
return Re(r42);
|
|
1324
1404
|
}
|
|
1325
|
-
function Re(
|
|
1326
|
-
if (!
|
|
1327
|
-
let
|
|
1328
|
-
return Number.isFinite(
|
|
1405
|
+
function Re(e65) {
|
|
1406
|
+
if (!e65) return 0;
|
|
1407
|
+
let t15 = Number.parseFloat(e65);
|
|
1408
|
+
return Number.isFinite(t15) ? t15 : 0;
|
|
1329
1409
|
}
|
|
1330
|
-
function Je({ refs:
|
|
1331
|
-
let { streamingTurnRef:
|
|
1332
|
-
l5.current !== null && (window.clearTimeout(l5.current), l5.current = null), S2.current !== c8 && (S2.current = c8,
|
|
1333
|
-
l5.current = null, S2.current = false,
|
|
1410
|
+
function Je({ refs: e65, commitScrollState: t15, scheduleStateCommit: r42, scheduleVisibilitySync: n2 }) {
|
|
1411
|
+
let { streamingTurnRef: o55, autoScrollRef: i3, autoscrollingRef: S2, autoscrollingTimeoutRef: l5, contentRef: d2, defaultScrollPositionAppliedRef: E, itemCountRef: b2, messageElementsRef: C, modeRef: p4, pendingScrollToMessageRef: m5, prependRestoreRef: L, scrollMarginRef: y, scrollPreviousItemPeekRef: u, spacerGapRef: x, spacerHeightRef: Y, spacerRef: k, viewportRef: _ } = e65, G = g.useCallback((c8) => {
|
|
1412
|
+
l5.current !== null && (window.clearTimeout(l5.current), l5.current = null), S2.current !== c8 && (S2.current = c8, t15()), c8 && (l5.current = window.setTimeout(() => {
|
|
1413
|
+
l5.current = null, S2.current = false, t15();
|
|
1334
1414
|
}, ke));
|
|
1335
|
-
}, [
|
|
1415
|
+
}, [t15]), v = g.useCallback((c8) => {
|
|
1336
1416
|
let f9 = k.current;
|
|
1337
1417
|
if (!f9) return;
|
|
1338
1418
|
let h = Math.max(0, Math.ceil(c8));
|
|
@@ -1342,21 +1422,21 @@ function Je({ refs: e62, commitScrollState: t14, scheduleStateCommit: r42, sched
|
|
|
1342
1422
|
if (!P) return;
|
|
1343
1423
|
let V = Math.max(0, c8);
|
|
1344
1424
|
if (Math.abs(P.scrollTop - V) <= J) {
|
|
1345
|
-
P.scrollTop = V,
|
|
1425
|
+
P.scrollTop = V, t15();
|
|
1346
1426
|
return;
|
|
1347
1427
|
}
|
|
1348
1428
|
h && G(true), P.scrollTo({ top: V, behavior: f9 }), r42();
|
|
1349
|
-
}, [
|
|
1429
|
+
}, [t15, r42, G]), N = g.useCallback(({ behavior: c8 = "auto" } = {}) => _.current ? (v(0), o55.current = null, p4.current = "free-scrolling", H(0, { behavior: c8 }), n2(), true) : false, [n2, H, v]), ne = g.useCallback(({ behavior: c8 = "auto" } = {}) => {
|
|
1350
1430
|
let f9 = _.current;
|
|
1351
|
-
return f9 ? (v(0),
|
|
1431
|
+
return f9 ? (v(0), o55.current = null, p4.current = i3.current ? "following-bottom" : "free-scrolling", H(Ke(f9), { autoscrolling: true, behavior: c8 }), n2(), true) : false;
|
|
1352
1432
|
}, [n2, H, v]), A = g.useCallback((c8, { align: f9 = "start", behavior: h = "auto", scrollMargin: P = y.current } = {}, { keepPreviousPeek: V = false } = {}) => {
|
|
1353
1433
|
let z = d2.current, q = _.current;
|
|
1354
1434
|
if (!z || !q || !z.contains(c8)) return false;
|
|
1355
1435
|
let K = ze({ align: f9, element: c8, scrollMargin: V ? P + u.current : P, spacer: k.current, viewport: q }), se = qe({ content: z, scrollTop: K, spacer: k.current, viewport: q });
|
|
1356
|
-
return v(se), L.current = { element: c8, viewportTop: te(c8, q) },
|
|
1436
|
+
return v(se), L.current = { element: c8, viewportTop: te(c8, q) }, p4.current = V ? "anchored-to-message" : "settling-jump", o55.current = V ? c8 : null, H(K, { behavior: h }), n2(), true;
|
|
1357
1437
|
}, [n2, H, v]), B = g.useCallback(() => {
|
|
1358
|
-
let c8 =
|
|
1359
|
-
return !c8 || !c8.isConnected ||
|
|
1438
|
+
let c8 = o55.current;
|
|
1439
|
+
return !c8 || !c8.isConnected || p4.current !== "anchored-to-message" ? false : A(c8, { align: "start" }, { keepPreviousPeek: true });
|
|
1360
1440
|
}, [A]), D = g.useCallback((c8, f9) => {
|
|
1361
1441
|
let h = C.current.get(c8);
|
|
1362
1442
|
return h ? (E.current = true, A(h, f9) ? (m5.current = null, true) : (m5.current = { messageId: c8, options: f9 }, true)) : b2.current === 0 ? (m5.current = { messageId: c8, options: f9 }, E.current = true, true) : false;
|
|
@@ -1368,52 +1448,52 @@ function Je({ refs: e62, commitScrollState: t14, scheduleStateCommit: r42, sched
|
|
|
1368
1448
|
return !f9 || !A(f9, c8.options) ? false : (m5.current = null, E.current = true, true);
|
|
1369
1449
|
}, [A]), reanchorToAnchoredMessage: B, scrollToElement: A, scrollToEnd: ne, scrollToMessage: D, scrollToStart: N };
|
|
1370
1450
|
}
|
|
1371
|
-
function Qe(
|
|
1372
|
-
let r42 =
|
|
1373
|
-
return { getSnapshot: () => r42, hasListeners: () => n2.size > 0, setSnapshot: (
|
|
1374
|
-
|
|
1375
|
-
}, subscribe: (
|
|
1451
|
+
function Qe(e65, t15) {
|
|
1452
|
+
let r42 = e65, n2 = /* @__PURE__ */ new Set();
|
|
1453
|
+
return { getSnapshot: () => r42, hasListeners: () => n2.size > 0, setSnapshot: (o55) => {
|
|
1454
|
+
t15(r42, o55) || (r42 = o55, n2.forEach((i3) => i3()));
|
|
1455
|
+
}, subscribe: (o55, i3, S2) => {
|
|
1376
1456
|
let l5 = n2.size === 0;
|
|
1377
|
-
return n2.add(
|
|
1378
|
-
n2.delete(
|
|
1457
|
+
return n2.add(o55), l5 && i3?.(), () => {
|
|
1458
|
+
n2.delete(o55), n2.size === 0 && S2?.();
|
|
1379
1459
|
};
|
|
1380
1460
|
} };
|
|
1381
1461
|
}
|
|
1382
|
-
function Xe(
|
|
1383
|
-
return Qe(
|
|
1462
|
+
function Xe(e65, t15) {
|
|
1463
|
+
return Qe(e65, t15);
|
|
1384
1464
|
}
|
|
1385
1465
|
function Ze() {
|
|
1386
1466
|
return Qe(Q, Tt);
|
|
1387
1467
|
}
|
|
1388
|
-
function et(
|
|
1389
|
-
return
|
|
1468
|
+
function et(e65, t15) {
|
|
1469
|
+
return e65.start === t15.start && e65.end === t15.end;
|
|
1390
1470
|
}
|
|
1391
|
-
function Tt(
|
|
1392
|
-
return
|
|
1471
|
+
function Tt(e65, t15) {
|
|
1472
|
+
return e65.currentAnchorId !== t15.currentAnchorId || e65.visibleMessageIds.length !== t15.visibleMessageIds.length ? false : e65.visibleMessageIds.every((r42, n2) => r42 === t15.visibleMessageIds[n2]);
|
|
1393
1473
|
}
|
|
1394
|
-
function tt({ autoScroll:
|
|
1395
|
-
let
|
|
1396
|
-
return A.current === null && (A.current = Xe(ge, et)), f9.current === null && (f9.current = Ze()),
|
|
1474
|
+
function tt({ autoScroll: e65, scrollEdgeThreshold: t15, scrollMargin: r42, scrollPreviousItemPeek: n2 }) {
|
|
1475
|
+
let o55 = g.useRef(e65), i3 = g.useRef(false), S2 = g.useRef(null), l5 = g.useRef(false), d2 = g.useRef(t15), E = g.useRef(0), b2 = g.useRef(null), C = g.useRef(0), p4 = g.useRef(e65 ? "following-bottom" : "free-scrolling"), m5 = g.useRef(/* @__PURE__ */ new Map()), L = g.useRef(null), y = g.useRef(null), u = g.useRef(null), x = g.useRef(n2), Y = g.useRef(true), k = g.useRef(null), _ = g.useRef(r42), G = g.useRef(null), v = g.useRef(0), H = g.useRef(0), N = g.useRef(null), ne = g.useRef(null), A = g.useRef(null), B = g.useRef(null), D = g.useRef(null), U = g.useRef(null), c8 = g.useRef(null), f9 = g.useRef(null), h = g.useRef(/* @__PURE__ */ new Set()), P = g.useRef(/* @__PURE__ */ new WeakSet());
|
|
1476
|
+
return A.current === null && (A.current = Xe(ge, et)), f9.current === null && (f9.current = Ze()), o55.current = e65, d2.current = t15, _.current = r42, x.current = n2, { autoScrollRef: o55, autoscrollingRef: i3, autoscrollingTimeoutRef: B, streamingTurnRef: u, contentRef: S2, defaultScrollPositionAppliedRef: l5, firstItemRef: b2, itemCountRef: E, lastScrollTopRef: C, messageElementsRef: m5, modeRef: p4, pendingScrollFrameRef: G, pendingScrollToMessageRef: L, prependRestoreRef: y, preserveScrollOnPrependRef: Y, rootRef: k, scrollEdgeThresholdRef: d2, scrollMarginRef: _, scrollPreviousItemPeekRef: x, spacerGapRef: v, spacerHeightRef: H, spacerRef: N, stateFrameRef: ne, stateStore: A.current, viewportRef: D, visibilityFrameRef: U, visibilityObserverRef: c8, visibilityStore: f9.current, visibleMessageIdsRef: h, handledScrollAnchorsRef: P };
|
|
1397
1477
|
}
|
|
1398
|
-
function rt(
|
|
1478
|
+
function rt(e65, t15) {
|
|
1399
1479
|
return g.useCallback((r42) => {
|
|
1400
|
-
|
|
1401
|
-
}, [
|
|
1402
|
-
}
|
|
1403
|
-
function nt({ autoScroll:
|
|
1404
|
-
let i3 = tt({ autoScroll:
|
|
1405
|
-
q.current !==
|
|
1406
|
-
let K = g.useCallback((
|
|
1407
|
-
let
|
|
1408
|
-
for (let W of [
|
|
1409
|
-
}, []), se = g.useCallback((
|
|
1410
|
-
let
|
|
1411
|
-
L.current =
|
|
1480
|
+
e65.current = r42, r42 && t15();
|
|
1481
|
+
}, [e65, t15]);
|
|
1482
|
+
}
|
|
1483
|
+
function nt({ autoScroll: e65 = false, defaultScrollPosition: t15 = "end", scrollEdgeThreshold: r42 = xe, scrollPreviousItemPeek: n2 = Ve, scrollMargin: o55 = _e }) {
|
|
1484
|
+
let i3 = tt({ autoScroll: e65, scrollEdgeThreshold: r42, scrollMargin: o55, scrollPreviousItemPeek: n2 }), { streamingTurnRef: S2, autoScrollRef: l5, autoscrollingRef: d2, autoscrollingTimeoutRef: E, contentRef: b2, defaultScrollPositionAppliedRef: C, firstItemRef: p4, itemCountRef: m5, lastScrollTopRef: L, messageElementsRef: y, modeRef: u, pendingScrollFrameRef: x, pendingScrollToMessageRef: Y, prependRestoreRef: k, preserveScrollOnPrependRef: _, rootRef: G, scrollEdgeThresholdRef: v, scrollMarginRef: H, scrollPreviousItemPeekRef: N, spacerGapRef: ne, spacerHeightRef: A, spacerRef: B, stateFrameRef: D, stateStore: U, viewportRef: c8, visibilityFrameRef: f9, visibilityObserverRef: h, visibilityStore: P, visibleMessageIdsRef: V, handledScrollAnchorsRef: z } = i3, q = g.useRef(t15);
|
|
1485
|
+
q.current !== t15 && (q.current = t15, C.current = false);
|
|
1486
|
+
let K = g.useCallback((s5) => {
|
|
1487
|
+
let a31 = G.current, T = c8.current, O = [s5.start && "start", s5.end && "end"].filter(Boolean).join(" "), ue = d2.current;
|
|
1488
|
+
for (let W of [a31, T]) W && (O ? W.setAttribute("data-scrollable", O) : W.removeAttribute("data-scrollable"), W.toggleAttribute("data-autoscrolling", ue));
|
|
1489
|
+
}, []), se = g.useCallback((s5) => {
|
|
1490
|
+
let a31 = c8.current?.scrollTop ?? 0, T = a31 < L.current - J;
|
|
1491
|
+
L.current = a31, l5.current && !s5.end && u.current !== "settling-jump" && u.current !== "anchored-to-message" ? u.current = "following-bottom" : u.current === "following-bottom" && s5.end && T && !d2.current && (u.current = "free-scrolling");
|
|
1412
1492
|
}, []), F = g.useCallback(() => {
|
|
1413
|
-
let
|
|
1414
|
-
se(
|
|
1415
|
-
let
|
|
1416
|
-
K(
|
|
1493
|
+
let s5 = De({ content: b2.current, scrollEdgeThreshold: v.current, spacer: B.current, viewport: c8.current });
|
|
1494
|
+
se(s5);
|
|
1495
|
+
let a31 = u.current === "following-bottom" ? { ...s5, end: false } : s5;
|
|
1496
|
+
K(a31), U.setSnapshot(a31);
|
|
1417
1497
|
}, [se, U, K]), oe = g.useCallback(() => {
|
|
1418
1498
|
D.current === null && (D.current = window.requestAnimationFrame(() => {
|
|
1419
1499
|
D.current = null, F();
|
|
@@ -1423,54 +1503,54 @@ function nt({ autoScroll: e62 = false, defaultScrollPosition: t14 = "end", scrol
|
|
|
1423
1503
|
f9.current = null, P.hasListeners() && P.setSnapshot(Fe({ content: b2.current, scrollMargin: H.current, scrollPreviousItemPeek: N.current, spacer: B.current, viewport: c8.current, visibleMessageIds: V.current }));
|
|
1424
1504
|
}));
|
|
1425
1505
|
}, [P]), { flushPendingScrollToMessage: ce, reanchorToAnchoredMessage: me, scrollToElement: le, scrollToEnd: I2, scrollToMessage: Me, scrollToStart: ae } = Je({ refs: i3, commitScrollState: F, scheduleStateCommit: oe, scheduleVisibilitySync: w2 }), de = g.useCallback(() => {
|
|
1426
|
-
let
|
|
1427
|
-
if (!
|
|
1428
|
-
let O = te(
|
|
1429
|
-
return Math.abs(O) <= J ? false : (
|
|
1506
|
+
let s5 = k.current, a31 = c8.current;
|
|
1507
|
+
if (!s5 || !a31 || !s5.element.isConnected) return false;
|
|
1508
|
+
let O = te(s5.element, a31) - s5.viewportTop;
|
|
1509
|
+
return Math.abs(O) <= J ? false : (a31.scrollTop += O, s5.viewportTop = te(s5.element, a31), oe(), w2(), true);
|
|
1430
1510
|
}, [oe, w2]), Z = g.useCallback(() => {
|
|
1431
|
-
let
|
|
1432
|
-
if (!
|
|
1511
|
+
let s5 = b2.current, a31 = c8.current;
|
|
1512
|
+
if (!s5 || !a31) {
|
|
1433
1513
|
k.current = null;
|
|
1434
1514
|
return;
|
|
1435
1515
|
}
|
|
1436
|
-
let T = Ye({ content:
|
|
1437
|
-
k.current = T ? { element: T, viewportTop: te(T,
|
|
1516
|
+
let T = Ye({ content: s5, spacer: B.current, viewport: a31 });
|
|
1517
|
+
k.current = T ? { element: T, viewportTop: te(T, a31) } : null;
|
|
1438
1518
|
}, []), be = g.useCallback(() => {
|
|
1439
1519
|
x.current === null && (x.current = window.requestAnimationFrame(() => {
|
|
1440
1520
|
x.current = null, ce() && Z();
|
|
1441
1521
|
}));
|
|
1442
1522
|
}, [Z, ce]), ie = g.useCallback(() => {
|
|
1443
|
-
if (!
|
|
1444
|
-
let
|
|
1445
|
-
if (
|
|
1446
|
-
let
|
|
1447
|
-
if (!
|
|
1523
|
+
if (!t15 || C.current || m5.current === 0) return false;
|
|
1524
|
+
let s5 = false;
|
|
1525
|
+
if (t15 === "last-anchor") {
|
|
1526
|
+
let a31 = b2.current, T = c8.current, O = a31 && T ? Ue(ee(a31, B.current)) : null;
|
|
1527
|
+
if (!a31 || !T || !O) s5 = I2({ behavior: "auto" });
|
|
1448
1528
|
else {
|
|
1449
1529
|
let ue = pe(O, T);
|
|
1450
|
-
|
|
1530
|
+
s5 = Se({ content: a31, spacer: B.current, viewport: T }) - ue <= T.clientHeight ? I2({ behavior: "auto" }) : le(O, { align: "start" }, { keepPreviousPeek: true });
|
|
1451
1531
|
}
|
|
1452
|
-
} else
|
|
1453
|
-
return
|
|
1454
|
-
}, [
|
|
1455
|
-
let
|
|
1456
|
-
if (!
|
|
1457
|
-
let
|
|
1458
|
-
m5.current =
|
|
1532
|
+
} else s5 = t15 === "end" ? I2({ behavior: "auto" }) : ae({ behavior: "auto" });
|
|
1533
|
+
return s5 ? (C.current = true, true) : false;
|
|
1534
|
+
}, [t15, le, I2, ae]), Te = g.useCallback(() => {
|
|
1535
|
+
let s5 = b2.current;
|
|
1536
|
+
if (!s5) return;
|
|
1537
|
+
let a31 = ee(s5, B.current), T = m5.current, O = p4.current;
|
|
1538
|
+
m5.current = a31.length, p4.current = a31[0] ?? null, (() => {
|
|
1459
1539
|
if (ce()) return;
|
|
1460
1540
|
if (T === 0) {
|
|
1461
|
-
if (ie() ||
|
|
1541
|
+
if (ie() || a31.length > 0 && l5.current && I2({ behavior: "auto" })) return;
|
|
1462
1542
|
F(), w2();
|
|
1463
1543
|
return;
|
|
1464
1544
|
}
|
|
1465
|
-
let W = O ?
|
|
1545
|
+
let W = O ? a31.indexOf(O) : -1;
|
|
1466
1546
|
if (_.current && W > 0) {
|
|
1467
1547
|
de();
|
|
1468
1548
|
return;
|
|
1469
1549
|
}
|
|
1470
|
-
if (
|
|
1471
|
-
let $ = je(
|
|
1550
|
+
if (a31.length > T) {
|
|
1551
|
+
let $ = je(a31, T);
|
|
1472
1552
|
if ($) {
|
|
1473
|
-
if (l5.current && u.current === "following-bottom" && Ne(
|
|
1553
|
+
if (l5.current && u.current === "following-bottom" && Ne(a31, T)) {
|
|
1474
1554
|
I2({ behavior: "auto" });
|
|
1475
1555
|
return;
|
|
1476
1556
|
}
|
|
@@ -1478,8 +1558,8 @@ function nt({ autoScroll: e62 = false, defaultScrollPosition: t14 = "end", scrol
|
|
|
1478
1558
|
return;
|
|
1479
1559
|
}
|
|
1480
1560
|
}
|
|
1481
|
-
if (
|
|
1482
|
-
let $ = Ge(
|
|
1561
|
+
if (a31.length === T) {
|
|
1562
|
+
let $ = Ge(a31, z.current);
|
|
1483
1563
|
if ($) {
|
|
1484
1564
|
le($, { align: "start" }, { keepPreviousPeek: true }), z.current.add($);
|
|
1485
1565
|
return;
|
|
@@ -1492,43 +1572,43 @@ function nt({ autoScroll: e62 = false, defaultScrollPosition: t14 = "end", scrol
|
|
|
1492
1572
|
I2({ behavior: "auto" });
|
|
1493
1573
|
return;
|
|
1494
1574
|
}
|
|
1495
|
-
let
|
|
1575
|
+
let s5 = A.current;
|
|
1496
1576
|
if (me()) {
|
|
1497
|
-
l5.current &&
|
|
1577
|
+
l5.current && s5 > 0 && A.current === 0 && I2({ behavior: "auto" });
|
|
1498
1578
|
return;
|
|
1499
1579
|
}
|
|
1500
1580
|
oe(), w2();
|
|
1501
1581
|
}, [me, oe, w2, I2]), ve = g.useCallback(() => {
|
|
1502
|
-
let
|
|
1503
|
-
if (!(!
|
|
1582
|
+
let s5 = c8.current;
|
|
1583
|
+
if (!(!s5 || !P.hasListeners())) {
|
|
1504
1584
|
if (typeof IntersectionObserver > "u") {
|
|
1505
1585
|
w2();
|
|
1506
1586
|
return;
|
|
1507
1587
|
}
|
|
1508
|
-
h.current || (h.current = new IntersectionObserver((
|
|
1509
|
-
for (let T of
|
|
1588
|
+
h.current || (h.current = new IntersectionObserver((a31) => {
|
|
1589
|
+
for (let T of a31) {
|
|
1510
1590
|
let O = T.target.dataset.messageId;
|
|
1511
1591
|
O && (T.isIntersecting ? V.current.add(O) : V.current.delete(O));
|
|
1512
1592
|
}
|
|
1513
1593
|
w2();
|
|
1514
|
-
}, { root:
|
|
1515
|
-
h.current?.observe(
|
|
1594
|
+
}, { root: s5, rootMargin: `${-(H.current + N.current)}px 0px 0px 0px`, threshold: [0, 0.01, 0.5, 1] })), y.current.forEach((a31) => {
|
|
1595
|
+
h.current?.observe(a31);
|
|
1516
1596
|
}), w2();
|
|
1517
1597
|
}
|
|
1518
1598
|
}, [w2, P]), he = g.useCallback(() => {
|
|
1519
1599
|
f9.current !== null && (window.cancelAnimationFrame(f9.current), f9.current = null), h.current?.disconnect(), h.current = null, V.current.clear(), P.setSnapshot(Q);
|
|
1520
|
-
}, [P]), pt = g.useCallback((
|
|
1521
|
-
if (
|
|
1522
|
-
y.current.set(
|
|
1600
|
+
}, [P]), pt = g.useCallback((s5, a31, T) => {
|
|
1601
|
+
if (a31) {
|
|
1602
|
+
y.current.set(s5, a31), h.current?.observe(a31), w2(), Y.current?.messageId === s5 && be();
|
|
1523
1603
|
return;
|
|
1524
1604
|
}
|
|
1525
|
-
T && y.current.get(
|
|
1605
|
+
T && y.current.get(s5) === T && (y.current.delete(s5), V.current.delete(s5), h.current?.unobserve(T), w2());
|
|
1526
1606
|
}, [be, w2]), Le = g.useCallback(() => {
|
|
1527
1607
|
(u.current === "following-bottom" || u.current === "anchored-to-message" || u.current === "settling-jump") && (S2.current = null, u.current = "free-scrolling");
|
|
1528
|
-
}, []), Ce = g.useCallback(() => K(U.getSnapshot()), [U, K]), Pe = rt(G, Ce), we = rt(c8, Ce), Oe = g.useCallback((
|
|
1529
|
-
b2.current =
|
|
1530
|
-
}, []), ye = g.useCallback((
|
|
1531
|
-
B.current =
|
|
1608
|
+
}, []), Ce = g.useCallback(() => K(U.getSnapshot()), [U, K]), Pe = rt(G, Ce), we = rt(c8, Ce), Oe = g.useCallback((s5) => {
|
|
1609
|
+
b2.current = s5;
|
|
1610
|
+
}, []), ye = g.useCallback((s5) => {
|
|
1611
|
+
B.current = s5, ne.current = $e(s5?.parentElement ?? null);
|
|
1532
1612
|
}, []), He = g.useCallback(() => {
|
|
1533
1613
|
F(), w2(), Z();
|
|
1534
1614
|
}, [Z, F, w2]), mt = g.useMemo(() => ({ handleContentChange: Te, handleResize: Ee, observeVisibility: ve, preserveScrollOnPrependRef: _, scrollToEnd: I2, scrollToMessage: Me, scrollToStart: ae, setContentElement: Oe, setRootElement: Pe, setSpacerElement: ye, setViewportElement: we, stateStore: U, syncAfterScroll: He, unobserveVisibility: he, userScrollIntent: Le, viewportRef: c8, visibilityStore: P }), [Te, Ee, ve, I2, Me, ae, Oe, Pe, ye, we, U, He, he, Le, P]);
|
|
@@ -1537,40 +1617,40 @@ function nt({ autoScroll: e62 = false, defaultScrollPosition: t14 = "end", scrol
|
|
|
1537
1617
|
}, [ie]), g.useEffect(() => () => {
|
|
1538
1618
|
D.current !== null && (window.cancelAnimationFrame(D.current), D.current = null), f9.current !== null && (window.cancelAnimationFrame(f9.current), f9.current = null), E.current !== null && (window.clearTimeout(E.current), E.current = null), x.current !== null && (window.cancelAnimationFrame(x.current), x.current = null), h.current?.disconnect(), h.current = null;
|
|
1539
1619
|
}, []), g.useLayoutEffect(() => {
|
|
1540
|
-
if (
|
|
1620
|
+
if (e65 && u.current === "following-bottom" && m5.current > 0) {
|
|
1541
1621
|
I2({ behavior: "auto" });
|
|
1542
1622
|
return;
|
|
1543
1623
|
}
|
|
1544
1624
|
F();
|
|
1545
|
-
}, [
|
|
1625
|
+
}, [e65, F, I2]), { context: mt, registerMessage: pt };
|
|
1546
1626
|
}
|
|
1547
|
-
function lt(
|
|
1548
|
-
let
|
|
1549
|
-
return
|
|
1627
|
+
function lt(e65) {
|
|
1628
|
+
let t15 = g.useRef(e65);
|
|
1629
|
+
return t15.current = e65, t15;
|
|
1550
1630
|
}
|
|
1551
1631
|
var st = g.createContext(null);
|
|
1552
1632
|
var ct = g.createContext(null);
|
|
1553
1633
|
function X2() {
|
|
1554
|
-
let
|
|
1555
|
-
if (!
|
|
1556
|
-
return
|
|
1634
|
+
let e65 = g.useContext(st);
|
|
1635
|
+
if (!e65) throw new Error("useMessageScroller must be used within a MessageScroller.");
|
|
1636
|
+
return e65;
|
|
1557
1637
|
}
|
|
1558
1638
|
function Et() {
|
|
1559
|
-
let
|
|
1560
|
-
if (!
|
|
1561
|
-
return
|
|
1639
|
+
let e65 = g.useContext(ct);
|
|
1640
|
+
if (!e65) throw new Error("MessageScrollerItem must be used within a MessageScroller.");
|
|
1641
|
+
return e65;
|
|
1562
1642
|
}
|
|
1563
|
-
function at({ autoScroll:
|
|
1564
|
-
let { context: S2, registerMessage: l5 } = nt({ autoScroll:
|
|
1565
|
-
return jsx3(st.Provider, { value: S2, children: jsx3(ct.Provider, { value: l5, children:
|
|
1643
|
+
function at({ autoScroll: e65 = false, children: t15, defaultScrollPosition: r42 = "end", scrollEdgeThreshold: n2, scrollPreviousItemPeek: o55, scrollMargin: i3 }) {
|
|
1644
|
+
let { context: S2, registerMessage: l5 } = nt({ autoScroll: e65, defaultScrollPosition: r42, scrollEdgeThreshold: n2, scrollPreviousItemPeek: o55, scrollMargin: i3 });
|
|
1645
|
+
return jsx3(st.Provider, { value: S2, children: jsx3(ct.Provider, { value: l5, children: t15 }) });
|
|
1566
1646
|
}
|
|
1567
|
-
function it({ children:
|
|
1647
|
+
function it({ children: e65, ...t15 }) {
|
|
1568
1648
|
let { setRootElement: r42 } = X2();
|
|
1569
|
-
return jsx3("div", { ref: r42, ...
|
|
1649
|
+
return jsx3("div", { ref: r42, ...t15, children: e65 });
|
|
1570
1650
|
}
|
|
1571
|
-
function ut({ "aria-label":
|
|
1572
|
-
let { handleResize: C, preserveScrollOnPrependRef:
|
|
1573
|
-
|
|
1651
|
+
function ut({ "aria-label": e65, children: t15, onKeyDown: r42, onScroll: n2, onTouchMove: o55, onWheel: i3, preserveScrollOnPrepend: S2 = true, ref: l5, role: d2, tabIndex: E, ...b2 }) {
|
|
1652
|
+
let { handleResize: C, preserveScrollOnPrependRef: p4, setViewportElement: m5, syncAfterScroll: L, userScrollIntent: y, viewportRef: u } = X2();
|
|
1653
|
+
p4.current = S2;
|
|
1574
1654
|
let x = g.useCallback((v) => {
|
|
1575
1655
|
m5(v), f8(l5)?.(v);
|
|
1576
1656
|
}, [l5, m5]);
|
|
@@ -1581,7 +1661,7 @@ function ut({ "aria-label": e62, children: t14, onKeyDown: r42, onScroll: n2, on
|
|
|
1581
1661
|
y(), i3?.(v);
|
|
1582
1662
|
}
|
|
1583
1663
|
function _(v) {
|
|
1584
|
-
y(),
|
|
1664
|
+
y(), o55?.(v);
|
|
1585
1665
|
}
|
|
1586
1666
|
function G(v) {
|
|
1587
1667
|
Be.has(v.key) && y(), r42?.(v);
|
|
@@ -1595,45 +1675,45 @@ function ut({ "aria-label": e62, children: t14, onKeyDown: r42, onScroll: n2, on
|
|
|
1595
1675
|
return N.observe(v), () => {
|
|
1596
1676
|
window.cancelAnimationFrame(H), N.disconnect();
|
|
1597
1677
|
};
|
|
1598
|
-
}, [C, u]), jsx3("div", { ref: x, role: d2 ?? "region", "aria-label":
|
|
1678
|
+
}, [C, u]), jsx3("div", { ref: x, role: d2 ?? "region", "aria-label": e65 ?? "Messages", tabIndex: E ?? 0, onKeyDown: G, onScroll: Y, onTouchMove: _, onWheel: k, ...b2, children: t15 });
|
|
1599
1679
|
}
|
|
1600
|
-
function ft({ "aria-relevant":
|
|
1601
|
-
let { handleContentChange: S2, handleResize: l5, setContentElement: d2, setSpacerElement: E } = X2(), b2 = g.useRef(null), C = g.useCallback((
|
|
1602
|
-
b2.current =
|
|
1680
|
+
function ft({ "aria-relevant": e65, children: t15, ref: r42, role: n2, spacerClassName: o55, ...i3 }) {
|
|
1681
|
+
let { handleContentChange: S2, handleResize: l5, setContentElement: d2, setSpacerElement: E } = X2(), b2 = g.useRef(null), C = g.useCallback((p4) => {
|
|
1682
|
+
b2.current = p4, d2(p4), f8(r42)?.(p4);
|
|
1603
1683
|
}, [r42, d2]);
|
|
1604
1684
|
return g.useLayoutEffect(() => {
|
|
1605
|
-
let
|
|
1606
|
-
if (!
|
|
1685
|
+
let p4 = b2.current;
|
|
1686
|
+
if (!p4 || (S2(), typeof MutationObserver > "u")) return;
|
|
1607
1687
|
let m5 = new MutationObserver(() => {
|
|
1608
1688
|
S2();
|
|
1609
1689
|
});
|
|
1610
|
-
return m5.observe(
|
|
1690
|
+
return m5.observe(p4, { childList: true }), () => m5.disconnect();
|
|
1611
1691
|
}, [S2]), g.useEffect(() => {
|
|
1612
|
-
let
|
|
1613
|
-
if (!
|
|
1692
|
+
let p4 = b2.current;
|
|
1693
|
+
if (!p4 || typeof ResizeObserver > "u") return;
|
|
1614
1694
|
let m5 = 0, L = new ResizeObserver(() => {
|
|
1615
1695
|
window.cancelAnimationFrame(m5), m5 = window.requestAnimationFrame(l5);
|
|
1616
1696
|
});
|
|
1617
|
-
return L.observe(
|
|
1697
|
+
return L.observe(p4), () => {
|
|
1618
1698
|
window.cancelAnimationFrame(m5), L.disconnect();
|
|
1619
1699
|
};
|
|
1620
|
-
}, [l5]), jsxs("div", { ref: C, role: n2 ?? "log", "aria-relevant":
|
|
1700
|
+
}, [l5]), jsxs("div", { ref: C, role: n2 ?? "log", "aria-relevant": e65 ?? "additions", ...i3, children: [t15, jsx3("div", { ref: E, "aria-hidden": "true", "data-message-scroller-spacer": "", hidden: true, className: o55 })] });
|
|
1621
1701
|
}
|
|
1622
|
-
function gt({ messageId:
|
|
1623
|
-
let
|
|
1702
|
+
function gt({ messageId: e65, ref: t15, scrollAnchor: r42 = false, ...n2 }) {
|
|
1703
|
+
let o55 = Et(), i3 = g.useRef(null), S2 = g.useCallback((l5) => {
|
|
1624
1704
|
let d2 = i3.current;
|
|
1625
|
-
i3.current = l5,
|
|
1626
|
-
}, [
|
|
1627
|
-
return jsx3("div", { ref: S2, "data-message-id":
|
|
1705
|
+
i3.current = l5, e65 && o55(e65, l5, d2), f8(t15)?.(l5);
|
|
1706
|
+
}, [e65, t15, o55]);
|
|
1707
|
+
return jsx3("div", { ref: S2, "data-message-id": e65, "data-scroll-anchor": r42 ? "true" : "false", ...n2 });
|
|
1628
1708
|
}
|
|
1629
|
-
function St({ behavior:
|
|
1630
|
-
let { scrollToEnd: d2, scrollToStart: E, stateStore: b$1 } = X2(), C = lt(n2),
|
|
1709
|
+
function St({ behavior: e65 = "smooth", children: t15, direction: r42 = "end", onClick: n2, render: o55, tabIndex: i3, type: S2 = "button", ...l5 }) {
|
|
1710
|
+
let { scrollToEnd: d2, scrollToStart: E, stateStore: b$1 } = X2(), C = lt(n2), p4 = g.useCallback((u) => b$1.subscribe(u), [b$1]), m5 = g.useCallback(() => {
|
|
1631
1711
|
let u = b$1.getSnapshot();
|
|
1632
1712
|
return r42 === "start" ? u.start : u.end;
|
|
1633
|
-
}, [r42, b$1]), L = g.useSyncExternalStore(
|
|
1634
|
-
L && (C.current?.(u), u.defaultPrevented || (u.currentTarget.blur(), r42 === "start" ? E({ behavior:
|
|
1635
|
-
}, [
|
|
1636
|
-
return S({ defaultTagName: "button", props: d({ type: S2, inert: !L, tabIndex: L ? i3 : -1, children:
|
|
1713
|
+
}, [r42, b$1]), L = g.useSyncExternalStore(p4, m5, m5), y = g.useCallback((u) => {
|
|
1714
|
+
L && (C.current?.(u), u.defaultPrevented || (u.currentTarget.blur(), r42 === "start" ? E({ behavior: e65 }) : d2({ behavior: e65 })));
|
|
1715
|
+
}, [e65, r42, L, C, d2, E]);
|
|
1716
|
+
return S({ defaultTagName: "button", props: d({ type: S2, inert: !L, tabIndex: L ? i3 : -1, children: t15 ?? jsxs("span", { children: ["Scroll to ", r42] }), onClick: y }, l5), render: o55, state: { active: L, direction: r42 }, stateAttributesMapping: { active: (u) => ({ "data-active": u ? "true" : "false" }) } });
|
|
1637
1717
|
}
|
|
1638
1718
|
var $t = { Provider: at, Root: it, Viewport: ut, Content: ft, Item: gt, Button: St };
|
|
1639
1719
|
|
|
@@ -1921,7 +2001,7 @@ function Button({
|
|
|
1921
2001
|
}
|
|
1922
2002
|
|
|
1923
2003
|
// ../../apps/web/src/components/ui/message-scroller.tsx
|
|
1924
|
-
import { Fragment as
|
|
2004
|
+
import { Fragment as Fragment27, jsx as jsx5, jsxs as jsxs2 } from "react/jsx-runtime";
|
|
1925
2005
|
function MessageScrollerProvider({
|
|
1926
2006
|
autoScroll = true,
|
|
1927
2007
|
...props
|
|
@@ -2158,7 +2238,7 @@ function MessageScrollerButton({
|
|
|
2158
2238
|
),
|
|
2159
2239
|
render: render ?? /* @__PURE__ */ jsx5(Button, { variant, size }),
|
|
2160
2240
|
...props,
|
|
2161
|
-
children: children ?? /* @__PURE__ */ jsxs2(
|
|
2241
|
+
children: children ?? /* @__PURE__ */ jsxs2(Fragment27, { children: [
|
|
2162
2242
|
/* @__PURE__ */ jsx5(ArrowDown, {}),
|
|
2163
2243
|
/* @__PURE__ */ jsx5("span", { className: "sr-only", children: direction === "end" ? "Scroll to end" : "Scroll to start" })
|
|
2164
2244
|
] })
|
|
@@ -2262,9 +2342,9 @@ import {
|
|
|
2262
2342
|
} from "react";
|
|
2263
2343
|
|
|
2264
2344
|
// src/next-image-shim.tsx
|
|
2265
|
-
import { forwardRef as
|
|
2345
|
+
import { forwardRef as forwardRef28 } from "react";
|
|
2266
2346
|
import { jsx as jsx6 } from "react/jsx-runtime";
|
|
2267
|
-
var Image =
|
|
2347
|
+
var Image = forwardRef28(function Image2({
|
|
2268
2348
|
unoptimized: _unoptimized,
|
|
2269
2349
|
priority: _priority,
|
|
2270
2350
|
quality: _quality,
|
|
@@ -2769,7 +2849,7 @@ function PoweredByMedian({ className }) {
|
|
|
2769
2849
|
}
|
|
2770
2850
|
|
|
2771
2851
|
// ../../apps/web/src/components/support-widget/widget-composer.tsx
|
|
2772
|
-
import { Fragment as
|
|
2852
|
+
import { Fragment as Fragment28, jsx as jsx13, jsxs as jsxs6 } from "react/jsx-runtime";
|
|
2773
2853
|
var EMAIL_PATTERN = /^[^\s@]+@[^\s@]+\.[^\s@]+$/;
|
|
2774
2854
|
var SWAP = "transition-[opacity,translate] duration-300 ease-out motion-reduce:transition-none";
|
|
2775
2855
|
var RISE = "transition-transform duration-450 ease-spring motion-reduce:transition-none";
|
|
@@ -3055,7 +3135,7 @@ function WidgetComposer({
|
|
|
3055
3135
|
SWAP,
|
|
3056
3136
|
isAsking && "-translate-y-1 opacity-0 pointer-events-none"
|
|
3057
3137
|
),
|
|
3058
|
-
children: isStacked ? /* @__PURE__ */ jsxs6(
|
|
3138
|
+
children: isStacked ? /* @__PURE__ */ jsxs6(Fragment28, { children: [
|
|
3059
3139
|
draftBox,
|
|
3060
3140
|
/* @__PURE__ */ jsxs6("div", { className: "flex items-center gap-1.5", children: [
|
|
3061
3141
|
fileInput,
|
|
@@ -3065,7 +3145,7 @@ function WidgetComposer({
|
|
|
3065
3145
|
sendButton
|
|
3066
3146
|
] })
|
|
3067
3147
|
] })
|
|
3068
|
-
] }) : /* @__PURE__ */ jsxs6(
|
|
3148
|
+
] }) : /* @__PURE__ */ jsxs6(Fragment28, { children: [
|
|
3069
3149
|
fileInput,
|
|
3070
3150
|
addButton,
|
|
3071
3151
|
draftBox,
|
|
@@ -3084,13 +3164,13 @@ function WidgetComposer({
|
|
|
3084
3164
|
SWAP,
|
|
3085
3165
|
!isAsking && "pointer-events-none translate-y-1 opacity-0"
|
|
3086
3166
|
),
|
|
3087
|
-
children: isStacked ? /* @__PURE__ */ jsxs6(
|
|
3167
|
+
children: isStacked ? /* @__PURE__ */ jsxs6(Fragment28, { children: [
|
|
3088
3168
|
emailBox,
|
|
3089
3169
|
/* @__PURE__ */ jsxs6("div", { className: "flex items-center justify-end gap-2", children: [
|
|
3090
3170
|
badge,
|
|
3091
3171
|
emailButton
|
|
3092
3172
|
] })
|
|
3093
|
-
] }) : /* @__PURE__ */ jsxs6(
|
|
3173
|
+
] }) : /* @__PURE__ */ jsxs6(Fragment28, { children: [
|
|
3094
3174
|
emailBox,
|
|
3095
3175
|
emailButton
|
|
3096
3176
|
] })
|
|
@@ -3494,7 +3574,7 @@ function WidgetLocked({
|
|
|
3494
3574
|
}
|
|
3495
3575
|
|
|
3496
3576
|
// ../../apps/web/src/components/support-widget/widget-message.tsx
|
|
3497
|
-
import { useState as
|
|
3577
|
+
import { useState as useState9 } from "react";
|
|
3498
3578
|
|
|
3499
3579
|
// ../../apps/web/src/components/ui/badge.tsx
|
|
3500
3580
|
import { jsx as jsx22 } from "react/jsx-runtime";
|
|
@@ -3619,14 +3699,14 @@ function MorphBubble({
|
|
|
3619
3699
|
|
|
3620
3700
|
// ../../apps/web/src/components/support-widget/widget-attachments.tsx
|
|
3621
3701
|
import { useState as useState6 } from "react";
|
|
3622
|
-
import { Fragment as
|
|
3702
|
+
import { Fragment as Fragment29, jsx as jsx24, jsxs as jsxs11 } from "react/jsx-runtime";
|
|
3623
3703
|
var SURFACE = "rounded-xl border border-foreground/10 bg-card/70";
|
|
3624
3704
|
function OpenAttachment({
|
|
3625
3705
|
attachment,
|
|
3626
3706
|
className,
|
|
3627
3707
|
children
|
|
3628
3708
|
}) {
|
|
3629
|
-
if (!attachment.url) return /* @__PURE__ */ jsx24(
|
|
3709
|
+
if (!attachment.url) return /* @__PURE__ */ jsx24(Fragment29, { children });
|
|
3630
3710
|
return /* @__PURE__ */ jsx24(
|
|
3631
3711
|
"a",
|
|
3632
3712
|
{
|
|
@@ -3802,7 +3882,7 @@ function lineSlices(root) {
|
|
|
3802
3882
|
return [{ top: 0, height: host.height }];
|
|
3803
3883
|
}
|
|
3804
3884
|
const unique = [...new Set(tops.map((top) => Math.round(top)))].sort(
|
|
3805
|
-
(
|
|
3885
|
+
(a31, b2) => a31 - b2
|
|
3806
3886
|
);
|
|
3807
3887
|
return unique.map((top, index) => {
|
|
3808
3888
|
const next = unique[index + 1] ?? Math.ceil(host.height);
|
|
@@ -3818,16 +3898,16 @@ function beats(slices) {
|
|
|
3818
3898
|
{ top: rest[0].top, height: last.top + last.height - rest[0].top }
|
|
3819
3899
|
];
|
|
3820
3900
|
}
|
|
3821
|
-
function playMs(stage,
|
|
3901
|
+
function playMs(stage, delay2) {
|
|
3822
3902
|
const rise = durationMs(
|
|
3823
3903
|
"--duration-line-rise",
|
|
3824
3904
|
durationMs("--duration-very-slow", 500, stage),
|
|
3825
3905
|
stage
|
|
3826
3906
|
);
|
|
3827
3907
|
const beat = durationMs("--duration-line-beat", 70, stage);
|
|
3828
|
-
return
|
|
3908
|
+
return delay2 + rise + LAST_BEAT * beat + 32;
|
|
3829
3909
|
}
|
|
3830
|
-
function paintSlices(source, stage,
|
|
3910
|
+
function paintSlices(source, stage, delay2) {
|
|
3831
3911
|
const slices = beats(lineSlices(source));
|
|
3832
3912
|
if (slices.length === 0) return false;
|
|
3833
3913
|
const batch = document.createDocumentFragment();
|
|
@@ -3842,13 +3922,13 @@ function paintSlices(source, stage, delay) {
|
|
|
3842
3922
|
frame.appendChild(clone);
|
|
3843
3923
|
batch.appendChild(frame);
|
|
3844
3924
|
}
|
|
3845
|
-
stage.style.setProperty("--t-line-delay", `${
|
|
3925
|
+
stage.style.setProperty("--t-line-delay", `${delay2}ms`);
|
|
3846
3926
|
stage.replaceChildren(batch);
|
|
3847
3927
|
return true;
|
|
3848
3928
|
}
|
|
3849
3929
|
function LineReveal({
|
|
3850
3930
|
contentKey,
|
|
3851
|
-
delay = 0,
|
|
3931
|
+
delay: delay2 = 0,
|
|
3852
3932
|
children,
|
|
3853
3933
|
className
|
|
3854
3934
|
}) {
|
|
@@ -3857,11 +3937,11 @@ function LineReveal({
|
|
|
3857
3937
|
const reduce = useMediaQuery("(prefers-reduced-motion: reduce)");
|
|
3858
3938
|
const [play2, setPlay] = useState7({
|
|
3859
3939
|
key: contentKey,
|
|
3860
|
-
delay,
|
|
3940
|
+
delay: delay2,
|
|
3861
3941
|
isPlaying: !reduce
|
|
3862
3942
|
});
|
|
3863
3943
|
if (play2.key !== contentKey) {
|
|
3864
|
-
setPlay({ key: contentKey, delay, isPlaying: !reduce });
|
|
3944
|
+
setPlay({ key: contentKey, delay: delay2, isPlaying: !reduce });
|
|
3865
3945
|
}
|
|
3866
3946
|
const { key: playKey, delay: hold, isPlaying } = play2;
|
|
3867
3947
|
useLayoutEffect6(() => {
|
|
@@ -3922,26 +4002,137 @@ function WidgetMessageBody({
|
|
|
3922
4002
|
return /* @__PURE__ */ jsx27(LineReveal, { contentKey: arrival.key, delay: arrival.delay, children: words });
|
|
3923
4003
|
}
|
|
3924
4004
|
|
|
3925
|
-
// ../../apps/web/src/components/
|
|
4005
|
+
// ../../apps/web/src/components/site-icon.tsx
|
|
4006
|
+
import { useState as useState8 } from "react";
|
|
3926
4007
|
import { jsx as jsx28, jsxs as jsxs13 } from "react/jsx-runtime";
|
|
4008
|
+
function SiteIcon({
|
|
4009
|
+
src,
|
|
4010
|
+
className
|
|
4011
|
+
}) {
|
|
4012
|
+
const [loadedSrc, setLoadedSrc] = useState8(null);
|
|
4013
|
+
const [failedSrc, setFailedSrc] = useState8(null);
|
|
4014
|
+
const isShown = src !== null && loadedSrc === src;
|
|
4015
|
+
return /* @__PURE__ */ jsxs13(
|
|
4016
|
+
"span",
|
|
4017
|
+
{
|
|
4018
|
+
"aria-hidden": true,
|
|
4019
|
+
className: cn(
|
|
4020
|
+
"relative inline-grid size-4 shrink-0 place-items-center overflow-hidden rounded-full",
|
|
4021
|
+
className
|
|
4022
|
+
),
|
|
4023
|
+
children: [
|
|
4024
|
+
/* @__PURE__ */ jsx28(
|
|
4025
|
+
GlobeSimple,
|
|
4026
|
+
{
|
|
4027
|
+
className: cn(
|
|
4028
|
+
"size-full text-muted-foreground transition-opacity duration-150 motion-reduce:transition-none",
|
|
4029
|
+
isShown && "opacity-0"
|
|
4030
|
+
)
|
|
4031
|
+
}
|
|
4032
|
+
),
|
|
4033
|
+
src !== null && failedSrc !== src && /* @__PURE__ */ jsx28(
|
|
4034
|
+
next_image_shim_default,
|
|
4035
|
+
{
|
|
4036
|
+
src,
|
|
4037
|
+
alt: "",
|
|
4038
|
+
width: 32,
|
|
4039
|
+
height: 32,
|
|
4040
|
+
unoptimized: true,
|
|
4041
|
+
referrerPolicy: "no-referrer",
|
|
4042
|
+
draggable: false,
|
|
4043
|
+
ref: (image) => {
|
|
4044
|
+
if (image?.complete && image.naturalWidth > 0) setLoadedSrc(src);
|
|
4045
|
+
},
|
|
4046
|
+
onLoad: () => setLoadedSrc(src),
|
|
4047
|
+
onError: () => setFailedSrc(src),
|
|
4048
|
+
className: cn(
|
|
4049
|
+
"absolute inset-0 size-full object-cover opacity-0 transition-opacity duration-150 motion-reduce:transition-none",
|
|
4050
|
+
isShown && "opacity-100"
|
|
4051
|
+
)
|
|
4052
|
+
}
|
|
4053
|
+
)
|
|
4054
|
+
]
|
|
4055
|
+
}
|
|
4056
|
+
);
|
|
4057
|
+
}
|
|
4058
|
+
|
|
4059
|
+
// ../../apps/web/src/components/support-widget/widget-sources.tsx
|
|
4060
|
+
import { jsx as jsx29, jsxs as jsxs14 } from "react/jsx-runtime";
|
|
4061
|
+
var LADDER_BEATS = 12;
|
|
4062
|
+
var CHARACTERS_PER_LINE = 30;
|
|
4063
|
+
function beatAfter(body) {
|
|
4064
|
+
const lines = body.split("\n").reduce(
|
|
4065
|
+
(sum, line) => sum + Math.max(1, Math.ceil(line.length / CHARACTERS_PER_LINE)),
|
|
4066
|
+
0
|
|
4067
|
+
);
|
|
4068
|
+
return Math.min(lines, LADDER_BEATS);
|
|
4069
|
+
}
|
|
4070
|
+
function WidgetSources({
|
|
4071
|
+
sources,
|
|
4072
|
+
body,
|
|
4073
|
+
arrival = null,
|
|
4074
|
+
compact = false
|
|
4075
|
+
}) {
|
|
4076
|
+
const ladder = arrival === null ? void 0 : {
|
|
4077
|
+
"--t-line-delay": `${arrival.delay}ms`,
|
|
4078
|
+
"--t-line": beatAfter(body)
|
|
4079
|
+
};
|
|
4080
|
+
return /* @__PURE__ */ jsx29(
|
|
4081
|
+
"ul",
|
|
4082
|
+
{
|
|
4083
|
+
"aria-label": "Sources",
|
|
4084
|
+
className: cn(
|
|
4085
|
+
"flex max-w-full flex-wrap gap-1.5",
|
|
4086
|
+
ladder !== void 0 && "t-line-after"
|
|
4087
|
+
),
|
|
4088
|
+
style: ladder,
|
|
4089
|
+
children: sources.map((source) => /* @__PURE__ */ jsx29("li", { className: "flex min-w-0 max-w-full", children: /* @__PURE__ */ jsx29(SourceChip, { source, compact }) }, source.url))
|
|
4090
|
+
}
|
|
4091
|
+
);
|
|
4092
|
+
}
|
|
4093
|
+
function SourceChip({
|
|
4094
|
+
source,
|
|
4095
|
+
compact
|
|
4096
|
+
}) {
|
|
4097
|
+
return /* @__PURE__ */ jsxs14(
|
|
4098
|
+
"a",
|
|
4099
|
+
{
|
|
4100
|
+
href: source.url,
|
|
4101
|
+
target: "_blank",
|
|
4102
|
+
rel: "noopener noreferrer",
|
|
4103
|
+
className: cn(
|
|
4104
|
+
"flex max-w-[min(100%,16rem)] items-center rounded-full bg-muted text-foreground transition-colors duration-150 outline-none hover:bg-[color-mix(in_oklch,var(--muted),var(--foreground)_7%)] focus-visible:ring-3 focus-visible:ring-ring/50 motion-reduce:transition-none",
|
|
4105
|
+
compact ? "h-6 gap-1.5 pr-2.5 pl-1.5 text-xs" : "h-7 gap-1.5 pr-3 pl-1.5 text-sm"
|
|
4106
|
+
),
|
|
4107
|
+
children: [
|
|
4108
|
+
/* @__PURE__ */ jsx29(SiteIcon, { src: source.iconUrl, className: compact ? "size-3.5" : "size-4" }),
|
|
4109
|
+
/* @__PURE__ */ jsx29("span", { className: "min-w-0 truncate", children: source.title }),
|
|
4110
|
+
/* @__PURE__ */ jsx29("span", { className: "sr-only", children: " (opens in a new tab)" })
|
|
4111
|
+
]
|
|
4112
|
+
}
|
|
4113
|
+
);
|
|
4114
|
+
}
|
|
4115
|
+
|
|
4116
|
+
// ../../apps/web/src/components/support-widget/widget-typing.tsx
|
|
4117
|
+
import { jsx as jsx30, jsxs as jsxs15 } from "react/jsx-runtime";
|
|
3927
4118
|
var DOTS = [0, 160, 320];
|
|
3928
4119
|
function WidgetTyping({ label }) {
|
|
3929
|
-
return /* @__PURE__ */
|
|
3930
|
-
/* @__PURE__ */
|
|
3931
|
-
DOTS.map((
|
|
4120
|
+
return /* @__PURE__ */ jsxs15("span", { className: "flex items-center gap-1.5 py-2", children: [
|
|
4121
|
+
/* @__PURE__ */ jsx30("span", { className: "sr-only", children: label }),
|
|
4122
|
+
DOTS.map((delay2) => /* @__PURE__ */ jsx30(
|
|
3932
4123
|
"span",
|
|
3933
4124
|
{
|
|
3934
4125
|
"aria-hidden": true,
|
|
3935
|
-
style: { animationDelay: `${
|
|
4126
|
+
style: { animationDelay: `${delay2}ms` },
|
|
3936
4127
|
className: "size-2 animate-typing-dot rounded-full bg-foreground/45 motion-reduce:animate-none"
|
|
3937
4128
|
},
|
|
3938
|
-
|
|
4129
|
+
delay2
|
|
3939
4130
|
))
|
|
3940
4131
|
] });
|
|
3941
4132
|
}
|
|
3942
4133
|
|
|
3943
4134
|
// ../../apps/web/src/components/support-widget/widget-message.tsx
|
|
3944
|
-
import { Fragment as
|
|
4135
|
+
import { Fragment as Fragment30, jsx as jsx31, jsxs as jsxs16 } from "react/jsx-runtime";
|
|
3945
4136
|
var BUBBLE = "max-w-[min(80%,36rem)] rounded-2xl px-4 py-2.5 text-base";
|
|
3946
4137
|
var COMPACT_BUBBLE = "max-w-[min(80%,36rem)] rounded-2xl px-3.5 py-2 text-sm";
|
|
3947
4138
|
var VISITOR_BUBBLE = "bg-[color-mix(in_oklch,var(--muted,oklch(0.955_0_0)),var(--foreground,oklch(0.145_0_0))_12%)]";
|
|
@@ -3951,10 +4142,10 @@ var LADDER_DELAY_MS = Math.round(MORPH_MS * 0.7);
|
|
|
3951
4142
|
function WidgetDivider({ message }) {
|
|
3952
4143
|
const label = message.startsConversation ? "New conversation" : message.dayLabel;
|
|
3953
4144
|
if (!label) return null;
|
|
3954
|
-
return /* @__PURE__ */
|
|
3955
|
-
/* @__PURE__ */
|
|
3956
|
-
/* @__PURE__ */
|
|
3957
|
-
/* @__PURE__ */
|
|
4145
|
+
return /* @__PURE__ */ jsxs16("div", { className: "flex items-center gap-3 py-1", children: [
|
|
4146
|
+
/* @__PURE__ */ jsx31("span", { className: "h-px flex-1 bg-border" }),
|
|
4147
|
+
/* @__PURE__ */ jsx31("span", { className: "text-sm text-muted-foreground", children: label }),
|
|
4148
|
+
/* @__PURE__ */ jsx31("span", { className: "h-px flex-1 bg-border" })
|
|
3958
4149
|
] });
|
|
3959
4150
|
}
|
|
3960
4151
|
function WidgetMessage({
|
|
@@ -3964,7 +4155,7 @@ function WidgetMessage({
|
|
|
3964
4155
|
compact = false,
|
|
3965
4156
|
isLive = false
|
|
3966
4157
|
}) {
|
|
3967
|
-
return message.sender === "visitor" ? /* @__PURE__ */
|
|
4158
|
+
return message.sender === "visitor" ? /* @__PURE__ */ jsx31(VisitorMessage, { message, compact, isLive }) : /* @__PURE__ */ jsx31(
|
|
3968
4159
|
AgentMessage,
|
|
3969
4160
|
{
|
|
3970
4161
|
message,
|
|
@@ -3981,16 +4172,16 @@ function BubbleContent({
|
|
|
3981
4172
|
}) {
|
|
3982
4173
|
const hasAttachments = (message.attachments?.length ?? 0) > 0;
|
|
3983
4174
|
if (message.pending) {
|
|
3984
|
-
return /* @__PURE__ */
|
|
4175
|
+
return /* @__PURE__ */ jsx31(
|
|
3985
4176
|
WidgetTyping,
|
|
3986
4177
|
{
|
|
3987
4178
|
label: `${message.agent?.name ?? "Support"} is writing a reply`
|
|
3988
4179
|
}
|
|
3989
4180
|
);
|
|
3990
4181
|
}
|
|
3991
|
-
return /* @__PURE__ */
|
|
3992
|
-
hasAttachments && /* @__PURE__ */
|
|
3993
|
-
message.body && /* @__PURE__ */
|
|
4182
|
+
return /* @__PURE__ */ jsxs16(Fragment30, { children: [
|
|
4183
|
+
hasAttachments && /* @__PURE__ */ jsx31(WidgetAttachments, { attachments: message.attachments ?? [] }),
|
|
4184
|
+
message.body && /* @__PURE__ */ jsx31(
|
|
3994
4185
|
WidgetMessageBody,
|
|
3995
4186
|
{
|
|
3996
4187
|
body: message.body,
|
|
@@ -4005,12 +4196,12 @@ function VisitorMessage({
|
|
|
4005
4196
|
compact,
|
|
4006
4197
|
isLive
|
|
4007
4198
|
}) {
|
|
4008
|
-
return /* @__PURE__ */
|
|
4199
|
+
return /* @__PURE__ */ jsx31("div", { className: cn("flex justify-end", isLive ? SENT : ARRIVES), children: /* @__PURE__ */ jsx31(
|
|
4009
4200
|
WidgetBubble,
|
|
4010
4201
|
{
|
|
4011
4202
|
morphKey: "settled",
|
|
4012
4203
|
className: cn(compact ? COMPACT_BUBBLE : BUBBLE, VISITOR_BUBBLE),
|
|
4013
|
-
children: /* @__PURE__ */
|
|
4204
|
+
children: /* @__PURE__ */ jsx31(BubbleContent, { message })
|
|
4014
4205
|
}
|
|
4015
4206
|
) });
|
|
4016
4207
|
}
|
|
@@ -4022,7 +4213,7 @@ function AgentMessage({
|
|
|
4022
4213
|
isLive
|
|
4023
4214
|
}) {
|
|
4024
4215
|
const { agent } = message;
|
|
4025
|
-
const [sawDots, setSawDots] =
|
|
4216
|
+
const [sawDots, setSawDots] = useState9(message.pending === true);
|
|
4026
4217
|
if (message.pending && !sawDots) setSawDots(true);
|
|
4027
4218
|
const arrival = isLive && !message.pending && message.body.length > 0 ? { key: message.id, delay: sawDots ? LADDER_DELAY_MS : 0 } : null;
|
|
4028
4219
|
const destination = message.navigateTo === void 0 ? null : {
|
|
@@ -4030,14 +4221,15 @@ function AgentMessage({
|
|
|
4030
4221
|
path: message.navigateTo,
|
|
4031
4222
|
highlight: message.highlight ?? null
|
|
4032
4223
|
};
|
|
4224
|
+
const sources = message.pending ? [] : message.sources ?? [];
|
|
4033
4225
|
return (
|
|
4034
4226
|
// One line saying who and when, then the thing they said. The face used to
|
|
4035
4227
|
// sit in a gutter beside the bubble with the name above it and the time
|
|
4036
4228
|
// below, which spread four small things across three rows and pushed every
|
|
4037
4229
|
// bubble in off the edge. All of it is one line now, and the bubble gets
|
|
4038
4230
|
// the full width back.
|
|
4039
|
-
/* @__PURE__ */
|
|
4040
|
-
group.isFirst && /* @__PURE__ */
|
|
4231
|
+
/* @__PURE__ */ jsxs16("div", { className: cn("flex flex-col items-start gap-1", ARRIVES), children: [
|
|
4232
|
+
group.isFirst && /* @__PURE__ */ jsxs16(
|
|
4041
4233
|
"div",
|
|
4042
4234
|
{
|
|
4043
4235
|
className: cn(
|
|
@@ -4045,31 +4237,40 @@ function AgentMessage({
|
|
|
4045
4237
|
compact ? "text-xs" : "text-sm"
|
|
4046
4238
|
),
|
|
4047
4239
|
children: [
|
|
4048
|
-
agent && /* @__PURE__ */
|
|
4049
|
-
/* @__PURE__ */
|
|
4240
|
+
agent && /* @__PURE__ */ jsxs16(Fragment30, { children: [
|
|
4241
|
+
/* @__PURE__ */ jsx31(
|
|
4050
4242
|
WidgetAvatar,
|
|
4051
4243
|
{
|
|
4052
4244
|
agent,
|
|
4053
4245
|
className: cn("rounded-md", compact ? "size-5" : "size-6")
|
|
4054
4246
|
}
|
|
4055
4247
|
),
|
|
4056
|
-
/* @__PURE__ */
|
|
4057
|
-
agent.kind === "ai" && /* @__PURE__ */
|
|
4248
|
+
/* @__PURE__ */ jsx31("span", { className: "truncate font-medium", children: agent.name }),
|
|
4249
|
+
agent.kind === "ai" && /* @__PURE__ */ jsx31(Badge, { variant: "muted", className: "shrink-0 rounded-md bg-muted px-1 inset-ring-0", children: "AI" })
|
|
4058
4250
|
] }),
|
|
4059
|
-
!message.pending && /* @__PURE__ */
|
|
4251
|
+
!message.pending && /* @__PURE__ */ jsx31("span", { className: "shrink-0 text-muted-foreground tabular-nums", children: message.time })
|
|
4060
4252
|
]
|
|
4061
4253
|
}
|
|
4062
4254
|
),
|
|
4063
|
-
/* @__PURE__ */
|
|
4255
|
+
/* @__PURE__ */ jsx31(
|
|
4064
4256
|
WidgetBubble,
|
|
4065
4257
|
{
|
|
4066
4258
|
morphKey: message.pending ? "pending" : `${message.body.length}:${message.attachments?.length ?? 0}`,
|
|
4067
4259
|
className: cn(compact ? COMPACT_BUBBLE : BUBBLE, "bg-muted"),
|
|
4068
4260
|
holdContent: arrival === null,
|
|
4069
|
-
children: /* @__PURE__ */
|
|
4261
|
+
children: /* @__PURE__ */ jsx31(BubbleContent, { message, arrival })
|
|
4070
4262
|
}
|
|
4071
4263
|
),
|
|
4072
|
-
|
|
4264
|
+
sources.length > 0 && /* @__PURE__ */ jsx31("div", { className: "max-w-full pt-1", children: /* @__PURE__ */ jsx31(
|
|
4265
|
+
WidgetSources,
|
|
4266
|
+
{
|
|
4267
|
+
sources,
|
|
4268
|
+
body: message.body,
|
|
4269
|
+
arrival,
|
|
4270
|
+
compact
|
|
4271
|
+
}
|
|
4272
|
+
) }),
|
|
4273
|
+
destination !== null && onFollow !== void 0 && /* @__PURE__ */ jsx31("div", { className: "pt-1.5", children: /* @__PURE__ */ jsx31(WidgetDestination, { destination, onFollow }) })
|
|
4073
4274
|
] })
|
|
4074
4275
|
);
|
|
4075
4276
|
}
|
|
@@ -4092,19 +4293,19 @@ var TYPING_TTL_MS = 12e3;
|
|
|
4092
4293
|
var SNOOZE_MAX_MS = 365 * 24 * 60 * 6e4;
|
|
4093
4294
|
|
|
4094
4295
|
// ../../apps/web/src/components/support-widget/widget-rating.tsx
|
|
4095
|
-
import { useEffect as useEffect6, useRef as useRef11, useState as
|
|
4096
|
-
import { jsx as
|
|
4296
|
+
import { useEffect as useEffect6, useRef as useRef11, useState as useState10 } from "react";
|
|
4297
|
+
import { jsx as jsx32, jsxs as jsxs17 } from "react/jsx-runtime";
|
|
4097
4298
|
var STARS = Array.from({ length: RATING_MAX_STARS }, (_, index) => index + 1);
|
|
4098
4299
|
var THANKS_MS = 1400;
|
|
4099
4300
|
var STAR_STAGGER_MS = 40;
|
|
4100
4301
|
function WidgetRating({ rating }) {
|
|
4101
|
-
const [isOpen, setIsOpen] =
|
|
4102
|
-
const [picked, setPicked] =
|
|
4103
|
-
const [hovered, setHovered] =
|
|
4104
|
-
const [feedback, setFeedback] =
|
|
4105
|
-
const [isSending, setIsSending] =
|
|
4106
|
-
const [error, setError] =
|
|
4107
|
-
const [isDone, setIsDone] =
|
|
4302
|
+
const [isOpen, setIsOpen] = useState10(false);
|
|
4303
|
+
const [picked, setPicked] = useState10(rating.stars);
|
|
4304
|
+
const [hovered, setHovered] = useState10(null);
|
|
4305
|
+
const [feedback, setFeedback] = useState10("");
|
|
4306
|
+
const [isSending, setIsSending] = useState10(false);
|
|
4307
|
+
const [error, setError] = useState10(null);
|
|
4308
|
+
const [isDone, setIsDone] = useState10(false);
|
|
4108
4309
|
const timers = useRef11([]);
|
|
4109
4310
|
useEffect6(() => {
|
|
4110
4311
|
const frame = requestAnimationFrame(() => setIsOpen(true));
|
|
@@ -4147,11 +4348,11 @@ function WidgetRating({ rating }) {
|
|
|
4147
4348
|
setIsDone(true);
|
|
4148
4349
|
later(THANKS_MS, leave);
|
|
4149
4350
|
}
|
|
4150
|
-
return /* @__PURE__ */
|
|
4151
|
-
/* @__PURE__ */
|
|
4152
|
-
/* @__PURE__ */
|
|
4153
|
-
/* @__PURE__ */
|
|
4154
|
-
/* @__PURE__ */
|
|
4351
|
+
return /* @__PURE__ */ jsx32(Collapse, { isOpen, className: "shrink-0", children: /* @__PURE__ */ jsxs17("div", { className: "mx-4 mb-3 rounded-xl border bg-muted/40 px-4 dark:bg-muted/20", children: [
|
|
4352
|
+
/* @__PURE__ */ jsx32(Collapse, { isOpen: !isDone, children: /* @__PURE__ */ jsxs17("div", { className: "py-3", children: [
|
|
4353
|
+
/* @__PURE__ */ jsxs17("div", { className: "flex items-start justify-between gap-2", children: [
|
|
4354
|
+
/* @__PURE__ */ jsx32("p", { className: "text-base font-medium", children: picked === null ? "How did we do?" : "Anything we could improve?" }),
|
|
4355
|
+
/* @__PURE__ */ jsx32(
|
|
4155
4356
|
WidgetButton,
|
|
4156
4357
|
{
|
|
4157
4358
|
type: "button",
|
|
@@ -4164,14 +4365,14 @@ function WidgetRating({ rating }) {
|
|
|
4164
4365
|
}
|
|
4165
4366
|
)
|
|
4166
4367
|
] }),
|
|
4167
|
-
/* @__PURE__ */
|
|
4368
|
+
/* @__PURE__ */ jsx32(
|
|
4168
4369
|
"div",
|
|
4169
4370
|
{
|
|
4170
4371
|
role: "radiogroup",
|
|
4171
4372
|
"aria-label": "How did we do?",
|
|
4172
4373
|
className: "flex items-center justify-center gap-1.5 pt-2",
|
|
4173
4374
|
onMouseLeave: () => setHovered(null),
|
|
4174
|
-
children: STARS.map((value) => /* @__PURE__ */
|
|
4375
|
+
children: STARS.map((value) => /* @__PURE__ */ jsx32(
|
|
4175
4376
|
"button",
|
|
4176
4377
|
{
|
|
4177
4378
|
type: "button",
|
|
@@ -4189,7 +4390,7 @@ function WidgetRating({ rating }) {
|
|
|
4189
4390
|
"active:scale-95 disabled:pointer-events-none",
|
|
4190
4391
|
"motion-reduce:transition-none"
|
|
4191
4392
|
),
|
|
4192
|
-
children: /* @__PURE__ */
|
|
4393
|
+
children: /* @__PURE__ */ jsx32(
|
|
4193
4394
|
Star,
|
|
4194
4395
|
{
|
|
4195
4396
|
style: {
|
|
@@ -4206,8 +4407,8 @@ function WidgetRating({ rating }) {
|
|
|
4206
4407
|
))
|
|
4207
4408
|
}
|
|
4208
4409
|
),
|
|
4209
|
-
/* @__PURE__ */
|
|
4210
|
-
/* @__PURE__ */
|
|
4410
|
+
/* @__PURE__ */ jsx32(Collapse, { isOpen: picked !== null, children: /* @__PURE__ */ jsxs17("div", { className: "flex flex-col gap-2 pt-2", children: [
|
|
4411
|
+
/* @__PURE__ */ jsx32(
|
|
4211
4412
|
Textarea,
|
|
4212
4413
|
{
|
|
4213
4414
|
value: feedback,
|
|
@@ -4223,7 +4424,7 @@ function WidgetRating({ rating }) {
|
|
|
4223
4424
|
)
|
|
4224
4425
|
}
|
|
4225
4426
|
),
|
|
4226
|
-
/* @__PURE__ */
|
|
4427
|
+
/* @__PURE__ */ jsx32(
|
|
4227
4428
|
WidgetButton,
|
|
4228
4429
|
{
|
|
4229
4430
|
type: "button",
|
|
@@ -4234,23 +4435,56 @@ function WidgetRating({ rating }) {
|
|
|
4234
4435
|
}
|
|
4235
4436
|
)
|
|
4236
4437
|
] }) }),
|
|
4237
|
-
/* @__PURE__ */
|
|
4438
|
+
/* @__PURE__ */ jsx32(Collapse, { isOpen: error !== null, children: /* @__PURE__ */ jsx32("p", { className: "pt-2 text-center text-sm text-destructive", children: error }) })
|
|
4238
4439
|
] }) }),
|
|
4239
|
-
/* @__PURE__ */
|
|
4440
|
+
/* @__PURE__ */ jsx32(Collapse, { isOpen: isDone, children: /* @__PURE__ */ jsx32("p", { className: "py-3.5 text-center text-base font-medium", children: "Thanks for the feedback." }) })
|
|
4240
4441
|
] }) });
|
|
4241
4442
|
}
|
|
4242
4443
|
|
|
4444
|
+
// ../../apps/web/src/components/support-widget/widget-screen-request.tsx
|
|
4445
|
+
import { jsx as jsx33, jsxs as jsxs18 } from "react/jsx-runtime";
|
|
4446
|
+
function WidgetScreenRequest({
|
|
4447
|
+
request
|
|
4448
|
+
}) {
|
|
4449
|
+
return /* @__PURE__ */ jsxs18("div", { className: "flex items-center gap-1", children: [
|
|
4450
|
+
/* @__PURE__ */ jsxs18(
|
|
4451
|
+
WidgetButton,
|
|
4452
|
+
{
|
|
4453
|
+
type: "button",
|
|
4454
|
+
onClick: request.share,
|
|
4455
|
+
disabled: request.isSharing,
|
|
4456
|
+
className: "h-auto gap-2.5 rounded-full px-4 py-2.5 text-base",
|
|
4457
|
+
children: [
|
|
4458
|
+
/* @__PURE__ */ jsx33(Monitor, { "aria-hidden": true, className: "size-4" }),
|
|
4459
|
+
"Share my screen"
|
|
4460
|
+
]
|
|
4461
|
+
}
|
|
4462
|
+
),
|
|
4463
|
+
/* @__PURE__ */ jsx33(
|
|
4464
|
+
WidgetButton,
|
|
4465
|
+
{
|
|
4466
|
+
type: "button",
|
|
4467
|
+
variant: "ghost",
|
|
4468
|
+
onClick: request.decline,
|
|
4469
|
+
disabled: request.isSharing,
|
|
4470
|
+
className: "h-auto rounded-full px-4 py-2.5 text-base text-muted-foreground",
|
|
4471
|
+
children: "Not now"
|
|
4472
|
+
}
|
|
4473
|
+
)
|
|
4474
|
+
] });
|
|
4475
|
+
}
|
|
4476
|
+
|
|
4243
4477
|
// ../../apps/web/src/components/support-widget/widget-status.tsx
|
|
4244
|
-
import { jsx as
|
|
4478
|
+
import { jsx as jsx34, jsxs as jsxs19 } from "react/jsx-runtime";
|
|
4245
4479
|
function WidgetAwaitingHuman() {
|
|
4246
|
-
return /* @__PURE__ */
|
|
4247
|
-
/* @__PURE__ */
|
|
4480
|
+
return /* @__PURE__ */ jsxs19("p", { className: "flex items-center justify-center gap-1.5 px-4 pb-1.5 text-sm text-muted-foreground", children: [
|
|
4481
|
+
/* @__PURE__ */ jsx34(UserCircle, { "aria-hidden": true, className: "size-4" }),
|
|
4248
4482
|
"Waiting for the support team"
|
|
4249
4483
|
] });
|
|
4250
4484
|
}
|
|
4251
4485
|
|
|
4252
4486
|
// ../../apps/web/src/components/support-widget/support-widget.tsx
|
|
4253
|
-
import { jsx as
|
|
4487
|
+
import { jsx as jsx35, jsxs as jsxs20 } from "react/jsx-runtime";
|
|
4254
4488
|
function joinsPreviousTurn(message, previous) {
|
|
4255
4489
|
return !message.dayLabel && !message.startsConversation && message.sender === previous.sender && message.agent?.id === previous.agent?.id && withinRun(previous.sentAt, message.sentAt);
|
|
4256
4490
|
}
|
|
@@ -4272,6 +4506,7 @@ function SupportWidget({
|
|
|
4272
4506
|
rating,
|
|
4273
4507
|
offer = null,
|
|
4274
4508
|
onFollow,
|
|
4509
|
+
screenRequest = null,
|
|
4275
4510
|
notice,
|
|
4276
4511
|
showBadge = true,
|
|
4277
4512
|
grabHandlers,
|
|
@@ -4280,7 +4515,7 @@ function SupportWidget({
|
|
|
4280
4515
|
className
|
|
4281
4516
|
}) {
|
|
4282
4517
|
const stack = useStackShift(messages.length);
|
|
4283
|
-
return /* @__PURE__ */
|
|
4518
|
+
return /* @__PURE__ */ jsxs20(
|
|
4284
4519
|
"section",
|
|
4285
4520
|
{
|
|
4286
4521
|
"aria-label": `${presence.name} support`,
|
|
@@ -4296,7 +4531,7 @@ function SupportWidget({
|
|
|
4296
4531
|
className
|
|
4297
4532
|
),
|
|
4298
4533
|
children: [
|
|
4299
|
-
/* @__PURE__ */
|
|
4534
|
+
/* @__PURE__ */ jsx35(
|
|
4300
4535
|
WidgetHeader,
|
|
4301
4536
|
{
|
|
4302
4537
|
presence,
|
|
@@ -4309,10 +4544,10 @@ function SupportWidget({
|
|
|
4309
4544
|
className: SETTLE_HEADER
|
|
4310
4545
|
}
|
|
4311
4546
|
),
|
|
4312
|
-
isLoading ? /* @__PURE__ */
|
|
4547
|
+
isLoading ? /* @__PURE__ */ jsx35(WidgetLoading, {}) : isLocked ? (
|
|
4313
4548
|
/* After the loading rather than before it: the line names the host,
|
|
4314
4549
|
so it waits for the name the same as everything else does. */
|
|
4315
|
-
/* @__PURE__ */
|
|
4550
|
+
/* @__PURE__ */ jsx35(
|
|
4316
4551
|
WidgetLocked,
|
|
4317
4552
|
{
|
|
4318
4553
|
orgName: presence.name,
|
|
@@ -4320,7 +4555,7 @@ function SupportWidget({
|
|
|
4320
4555
|
showBadge
|
|
4321
4556
|
}
|
|
4322
4557
|
)
|
|
4323
|
-
) : /* @__PURE__ */
|
|
4558
|
+
) : /* @__PURE__ */ jsx35(
|
|
4324
4559
|
Conversation,
|
|
4325
4560
|
{
|
|
4326
4561
|
presence,
|
|
@@ -4334,6 +4569,7 @@ function SupportWidget({
|
|
|
4334
4569
|
rating,
|
|
4335
4570
|
offer,
|
|
4336
4571
|
onFollow,
|
|
4572
|
+
screenRequest,
|
|
4337
4573
|
notice,
|
|
4338
4574
|
showBadge,
|
|
4339
4575
|
compact,
|
|
@@ -4356,20 +4592,25 @@ function Conversation({
|
|
|
4356
4592
|
rating,
|
|
4357
4593
|
offer = null,
|
|
4358
4594
|
onFollow,
|
|
4595
|
+
screenRequest = null,
|
|
4359
4596
|
notice,
|
|
4360
4597
|
showBadge,
|
|
4361
4598
|
compact,
|
|
4362
4599
|
stackRef
|
|
4363
4600
|
}) {
|
|
4364
4601
|
const groups = groupMessages(messages, joinsPreviousTurn);
|
|
4365
|
-
const [openedWith] =
|
|
4602
|
+
const [openedWith] = useState11(
|
|
4366
4603
|
() => new Set(messages.map((message) => message.id))
|
|
4367
4604
|
);
|
|
4368
|
-
const [heldOffer, setHeldOffer] =
|
|
4605
|
+
const [heldOffer, setHeldOffer] = useState11(offer);
|
|
4369
4606
|
if (offer !== null && offer.key !== heldOffer?.key) setHeldOffer(offer);
|
|
4370
|
-
const [
|
|
4607
|
+
const [heldRequest, setHeldRequest] = useState11(screenRequest);
|
|
4608
|
+
if (screenRequest !== null && screenRequest !== heldRequest) {
|
|
4609
|
+
setHeldRequest(screenRequest);
|
|
4610
|
+
}
|
|
4611
|
+
const [heldNotice, setHeldNotice] = useState11(notice ?? null);
|
|
4371
4612
|
if (notice && notice !== heldNotice) setHeldNotice(notice);
|
|
4372
|
-
return /* @__PURE__ */
|
|
4613
|
+
return /* @__PURE__ */ jsxs20(
|
|
4373
4614
|
"div",
|
|
4374
4615
|
{
|
|
4375
4616
|
className: cn(
|
|
@@ -4377,7 +4618,7 @@ function Conversation({
|
|
|
4377
4618
|
SETTLE_BODY
|
|
4378
4619
|
),
|
|
4379
4620
|
children: [
|
|
4380
|
-
messages.length === 0 ? /* @__PURE__ */
|
|
4621
|
+
messages.length === 0 ? /* @__PURE__ */ jsx35(
|
|
4381
4622
|
WidgetEmpty,
|
|
4382
4623
|
{
|
|
4383
4624
|
team: presence.team,
|
|
@@ -4397,8 +4638,8 @@ function Conversation({
|
|
|
4397
4638
|
so a scroller left alone slides the newest message under the
|
|
4398
4639
|
composer and has to catch up afterwards. Following it is what the
|
|
4399
4640
|
scroller stops easing for, so this tracks frame by frame. */
|
|
4400
|
-
/* @__PURE__ */
|
|
4401
|
-
/* @__PURE__ */
|
|
4641
|
+
/* @__PURE__ */ jsx35(MessageScrollerProvider, { children: /* @__PURE__ */ jsxs20(MessageScroller, { className: "h-auto min-h-0 flex-1", children: [
|
|
4642
|
+
/* @__PURE__ */ jsx35(
|
|
4402
4643
|
MessageScrollerViewport,
|
|
4403
4644
|
{
|
|
4404
4645
|
role: "log",
|
|
@@ -4406,12 +4647,12 @@ function Conversation({
|
|
|
4406
4647
|
"aria-relevant": "additions",
|
|
4407
4648
|
"aria-label": "Conversation",
|
|
4408
4649
|
className: compact ? "px-5 py-3" : "px-4 py-3",
|
|
4409
|
-
children: /* @__PURE__ */
|
|
4650
|
+
children: /* @__PURE__ */ jsx35(
|
|
4410
4651
|
MessageScrollerContent,
|
|
4411
4652
|
{
|
|
4412
4653
|
ref: stackRef,
|
|
4413
4654
|
className: "justify-end gap-0",
|
|
4414
|
-
children: messages.map((message, index) => /* @__PURE__ */
|
|
4655
|
+
children: messages.map((message, index) => /* @__PURE__ */ jsxs20(
|
|
4415
4656
|
MessageScrollerItem,
|
|
4416
4657
|
{
|
|
4417
4658
|
messageId: message.id,
|
|
@@ -4420,8 +4661,8 @@ function Conversation({
|
|
|
4420
4661
|
groups[index].isFirst ? compact ? "pt-4" : "pt-5" : compact ? "pt-1" : "pt-1.5"
|
|
4421
4662
|
),
|
|
4422
4663
|
children: [
|
|
4423
|
-
/* @__PURE__ */
|
|
4424
|
-
/* @__PURE__ */
|
|
4664
|
+
/* @__PURE__ */ jsx35(WidgetDivider, { message }),
|
|
4665
|
+
/* @__PURE__ */ jsx35(
|
|
4425
4666
|
WidgetMessage,
|
|
4426
4667
|
{
|
|
4427
4668
|
message,
|
|
@@ -4439,21 +4680,22 @@ function Conversation({
|
|
|
4439
4680
|
)
|
|
4440
4681
|
}
|
|
4441
4682
|
),
|
|
4442
|
-
/* @__PURE__ */
|
|
4683
|
+
/* @__PURE__ */ jsx35(MessageScrollerButton, {})
|
|
4443
4684
|
] }) })
|
|
4444
4685
|
),
|
|
4445
|
-
rating && /* @__PURE__ */
|
|
4446
|
-
/* @__PURE__ */
|
|
4686
|
+
rating && /* @__PURE__ */ jsx35(WidgetRating, { rating }),
|
|
4687
|
+
/* @__PURE__ */ jsx35(
|
|
4447
4688
|
Collapse,
|
|
4448
4689
|
{
|
|
4449
4690
|
isOpen: offer !== null && onFollow !== void 0,
|
|
4450
4691
|
className: "shrink-0",
|
|
4451
|
-
children: heldOffer !== null && onFollow !== void 0 && /* @__PURE__ */
|
|
4692
|
+
children: heldOffer !== null && onFollow !== void 0 && /* @__PURE__ */ jsx35("div", { className: "px-4 pb-1.5", children: /* @__PURE__ */ jsx35(WidgetDestination, { destination: heldOffer, onFollow }) })
|
|
4452
4693
|
}
|
|
4453
4694
|
),
|
|
4454
|
-
/* @__PURE__ */
|
|
4455
|
-
/* @__PURE__ */
|
|
4456
|
-
/* @__PURE__ */
|
|
4695
|
+
/* @__PURE__ */ jsx35(Collapse, { isOpen: screenRequest !== null, className: "shrink-0", children: heldRequest !== null && /* @__PURE__ */ jsx35("div", { className: "px-4 pb-1.5", children: /* @__PURE__ */ jsx35(WidgetScreenRequest, { request: heldRequest }) }) }),
|
|
4696
|
+
/* @__PURE__ */ jsx35(Collapse, { isOpen: awaitingHuman, className: "shrink-0", children: /* @__PURE__ */ jsx35(WidgetAwaitingHuman, {}) }),
|
|
4697
|
+
/* @__PURE__ */ jsx35(Collapse, { isOpen: Boolean(notice), className: "shrink-0", children: /* @__PURE__ */ jsx35("p", { className: "px-4 pb-1.5 text-center text-sm text-destructive", children: notice ?? heldNotice }) }),
|
|
4698
|
+
/* @__PURE__ */ jsx35(
|
|
4457
4699
|
WidgetComposer,
|
|
4458
4700
|
{
|
|
4459
4701
|
onSend,
|
|
@@ -4477,7 +4719,7 @@ import {
|
|
|
4477
4719
|
useEffect as useEffect7,
|
|
4478
4720
|
useLayoutEffect as useLayoutEffect7,
|
|
4479
4721
|
useRef as useRef12,
|
|
4480
|
-
useState as
|
|
4722
|
+
useState as useState12,
|
|
4481
4723
|
useSyncExternalStore as useSyncExternalStore4
|
|
4482
4724
|
} from "react";
|
|
4483
4725
|
import { flushSync } from "react-dom";
|
|
@@ -4496,7 +4738,7 @@ function useLauncherDrag({
|
|
|
4496
4738
|
subject
|
|
4497
4739
|
}) {
|
|
4498
4740
|
const spot = useSyncExternalStore4(subscribeSpot, getSpot, getDefaultSpot);
|
|
4499
|
-
const [isMoving, setIsMoving] =
|
|
4741
|
+
const [isMoving, setIsMoving] = useState12(false);
|
|
4500
4742
|
const grip = useRef12(null);
|
|
4501
4743
|
const justDragged = useRef12(false);
|
|
4502
4744
|
const measure = useCallback6(() => {
|
|
@@ -4739,14 +4981,14 @@ function clamp2(value, low, high) {
|
|
|
4739
4981
|
}
|
|
4740
4982
|
|
|
4741
4983
|
// ../../apps/web/src/components/support-widget/use-teaser-placement.ts
|
|
4742
|
-
import { useLayoutEffect as useLayoutEffect8, useState as
|
|
4984
|
+
import { useLayoutEffect as useLayoutEffect8, useState as useState13 } from "react";
|
|
4743
4985
|
var ROOM_ABOVE_PX = 128;
|
|
4744
4986
|
function useTeaserPlacement({
|
|
4745
4987
|
buttonRef,
|
|
4746
4988
|
enabled: enabled2,
|
|
4747
4989
|
isMoving
|
|
4748
4990
|
}) {
|
|
4749
|
-
const [placement, setPlacement] =
|
|
4991
|
+
const [placement, setPlacement] = useState13("above");
|
|
4750
4992
|
useLayoutEffect8(() => {
|
|
4751
4993
|
if (!enabled2 || isMoving) return;
|
|
4752
4994
|
const measure = () => {
|
|
@@ -4764,7 +5006,7 @@ function useTeaserPlacement({
|
|
|
4764
5006
|
// ../../apps/web/src/components/support-widget/use-widget-sheet.ts
|
|
4765
5007
|
import {
|
|
4766
5008
|
useLayoutEffect as useLayoutEffect9,
|
|
4767
|
-
useState as
|
|
5009
|
+
useState as useState14,
|
|
4768
5010
|
useSyncExternalStore as useSyncExternalStore5
|
|
4769
5011
|
} from "react";
|
|
4770
5012
|
|
|
@@ -4819,7 +5061,7 @@ function useWidgetSheet({
|
|
|
4819
5061
|
isPhoneNow,
|
|
4820
5062
|
isPhoneOnServer
|
|
4821
5063
|
);
|
|
4822
|
-
const [isFramed, setIsFramed] =
|
|
5064
|
+
const [isFramed, setIsFramed] = useState14(false);
|
|
4823
5065
|
useLayoutEffect9(() => {
|
|
4824
5066
|
setIsFramed(boxRef.current?.offsetParent != null);
|
|
4825
5067
|
}, [boxRef, isPhone]);
|
|
@@ -4914,7 +5156,7 @@ function useScrollLock(isLocked) {
|
|
|
4914
5156
|
}
|
|
4915
5157
|
|
|
4916
5158
|
// ../../apps/web/src/components/support-widget/widget-modal.tsx
|
|
4917
|
-
import { jsx as
|
|
5159
|
+
import { jsx as jsx36, jsxs as jsxs21 } from "react/jsx-runtime";
|
|
4918
5160
|
var LAYER = 2147483e3;
|
|
4919
5161
|
var WIDTH = "50rem";
|
|
4920
5162
|
var HEIGHT = "40rem";
|
|
@@ -4936,7 +5178,7 @@ function SupportModal({
|
|
|
4936
5178
|
useScrollLock(isOpen && !isSheet);
|
|
4937
5179
|
if (!isHydrated) return null;
|
|
4938
5180
|
return createPortal(
|
|
4939
|
-
/* @__PURE__ */
|
|
5181
|
+
/* @__PURE__ */ jsxs21(
|
|
4940
5182
|
"div",
|
|
4941
5183
|
{
|
|
4942
5184
|
ref: layerRef,
|
|
@@ -4950,7 +5192,7 @@ function SupportModal({
|
|
|
4950
5192
|
!isOpen && "pointer-events-none"
|
|
4951
5193
|
),
|
|
4952
5194
|
children: [
|
|
4953
|
-
/* @__PURE__ */
|
|
5195
|
+
/* @__PURE__ */ jsx36(
|
|
4954
5196
|
"div",
|
|
4955
5197
|
{
|
|
4956
5198
|
"aria-hidden": true,
|
|
@@ -4961,7 +5203,7 @@ function SupportModal({
|
|
|
4961
5203
|
)
|
|
4962
5204
|
}
|
|
4963
5205
|
),
|
|
4964
|
-
/* @__PURE__ */
|
|
5206
|
+
/* @__PURE__ */ jsx36(
|
|
4965
5207
|
"div",
|
|
4966
5208
|
{
|
|
4967
5209
|
ref: panelRef,
|
|
@@ -5004,7 +5246,7 @@ var SHEET_PANEL = cn(
|
|
|
5004
5246
|
);
|
|
5005
5247
|
|
|
5006
5248
|
// ../../apps/web/src/components/support-widget/widget-teaser.tsx
|
|
5007
|
-
import { useState as
|
|
5249
|
+
import { useState as useState15 } from "react";
|
|
5008
5250
|
|
|
5009
5251
|
// ../../apps/web/src/components/support-widget/plain-text.ts
|
|
5010
5252
|
function plainTextOf(markdown) {
|
|
@@ -5012,7 +5254,7 @@ function plainTextOf(markdown) {
|
|
|
5012
5254
|
}
|
|
5013
5255
|
|
|
5014
5256
|
// ../../apps/web/src/components/support-widget/widget-teaser.tsx
|
|
5015
|
-
import { Fragment as
|
|
5257
|
+
import { Fragment as Fragment31, jsx as jsx37, jsxs as jsxs22 } from "react/jsx-runtime";
|
|
5016
5258
|
var WIDTH2 = "min(20rem, 100%)";
|
|
5017
5259
|
var GAP = "0.5rem";
|
|
5018
5260
|
function WidgetTeaser({
|
|
@@ -5025,13 +5267,13 @@ function WidgetTeaser({
|
|
|
5025
5267
|
onOpen,
|
|
5026
5268
|
onDismiss
|
|
5027
5269
|
}) {
|
|
5028
|
-
const [held2, setHeld] =
|
|
5270
|
+
const [held2, setHeld] = useState15(message);
|
|
5029
5271
|
if (message !== null && message !== held2) setHeld(message);
|
|
5030
5272
|
const shown = message ?? held2;
|
|
5031
5273
|
if (shown === null) return null;
|
|
5032
5274
|
const agent = shown.agent;
|
|
5033
5275
|
const text = plainTextOf(shown.body);
|
|
5034
|
-
return /* @__PURE__ */
|
|
5276
|
+
return /* @__PURE__ */ jsxs22(
|
|
5035
5277
|
"div",
|
|
5036
5278
|
{
|
|
5037
5279
|
inert: !isShown,
|
|
@@ -5056,7 +5298,7 @@ function WidgetTeaser({
|
|
|
5056
5298
|
] : "pointer-events-none scale-95 opacity-0 duration-150 ease-out-quint"
|
|
5057
5299
|
),
|
|
5058
5300
|
children: [
|
|
5059
|
-
/* @__PURE__ */
|
|
5301
|
+
/* @__PURE__ */ jsxs22(
|
|
5060
5302
|
"button",
|
|
5061
5303
|
{
|
|
5062
5304
|
type: "button",
|
|
@@ -5071,19 +5313,19 @@ function WidgetTeaser({
|
|
|
5071
5313
|
"cursor-pointer select-none"
|
|
5072
5314
|
),
|
|
5073
5315
|
children: [
|
|
5074
|
-
/* @__PURE__ */
|
|
5075
|
-
agent && /* @__PURE__ */
|
|
5076
|
-
/* @__PURE__ */
|
|
5077
|
-
/* @__PURE__ */
|
|
5078
|
-
agent.kind === "ai" && /* @__PURE__ */
|
|
5316
|
+
/* @__PURE__ */ jsxs22("span", { className: "flex items-center gap-2", children: [
|
|
5317
|
+
agent && /* @__PURE__ */ jsxs22(Fragment31, { children: [
|
|
5318
|
+
/* @__PURE__ */ jsx37(WidgetAvatar, { agent, className: "size-6 rounded-md" }),
|
|
5319
|
+
/* @__PURE__ */ jsx37("span", { className: "truncate text-sm font-medium", children: agent.name }),
|
|
5320
|
+
agent.kind === "ai" && /* @__PURE__ */ jsx37(Badge, { variant: "muted", className: "shrink-0 rounded-md bg-muted px-1 inset-ring-0", children: "AI" })
|
|
5079
5321
|
] }),
|
|
5080
|
-
/* @__PURE__ */
|
|
5322
|
+
/* @__PURE__ */ jsx37("span", { className: "ml-auto shrink-0 text-sm text-muted-foreground tabular-nums", children: shown.time })
|
|
5081
5323
|
] }),
|
|
5082
|
-
/* @__PURE__ */
|
|
5324
|
+
/* @__PURE__ */ jsx37("span", { className: "mt-1.5 line-clamp-2 block text-base leading-snug", children: text.length > 0 ? text : "Sent a file" })
|
|
5083
5325
|
]
|
|
5084
5326
|
}
|
|
5085
5327
|
),
|
|
5086
|
-
/* @__PURE__ */
|
|
5328
|
+
/* @__PURE__ */ jsx37(
|
|
5087
5329
|
"button",
|
|
5088
5330
|
{
|
|
5089
5331
|
type: "button",
|
|
@@ -5095,7 +5337,7 @@ function WidgetTeaser({
|
|
|
5095
5337
|
"hover:bg-muted hover:text-foreground focus-visible:ring-3 focus-visible:ring-ring/50",
|
|
5096
5338
|
"cursor-pointer"
|
|
5097
5339
|
),
|
|
5098
|
-
children: /* @__PURE__ */
|
|
5340
|
+
children: /* @__PURE__ */ jsx37(X, { className: "size-4" })
|
|
5099
5341
|
}
|
|
5100
5342
|
)
|
|
5101
5343
|
]
|
|
@@ -5105,7 +5347,7 @@ function WidgetTeaser({
|
|
|
5105
5347
|
}
|
|
5106
5348
|
|
|
5107
5349
|
// ../../apps/web/src/components/support-widget/widget-launcher.tsx
|
|
5108
|
-
import { Fragment as
|
|
5350
|
+
import { Fragment as Fragment32, jsx as jsx38, jsxs as jsxs23 } from "react/jsx-runtime";
|
|
5109
5351
|
var DEFAULT_WIDTH = "28rem";
|
|
5110
5352
|
var DEFAULT_HEIGHT = "40rem";
|
|
5111
5353
|
var DEFAULT_BUTTON_SIZE = "3rem";
|
|
@@ -5144,6 +5386,7 @@ function SupportLauncher({
|
|
|
5144
5386
|
rating,
|
|
5145
5387
|
offer = null,
|
|
5146
5388
|
onFollow,
|
|
5389
|
+
screenRequest = null,
|
|
5147
5390
|
unreadCount = 0,
|
|
5148
5391
|
teaser = null,
|
|
5149
5392
|
onDismissTeaser,
|
|
@@ -5161,11 +5404,11 @@ function SupportLauncher({
|
|
|
5161
5404
|
onOpenChange,
|
|
5162
5405
|
className
|
|
5163
5406
|
}) {
|
|
5164
|
-
const [uncontrolledOpen, setUncontrolledOpen] =
|
|
5407
|
+
const [uncontrolledOpen, setUncontrolledOpen] = useState16(defaultOpen);
|
|
5165
5408
|
const isOpen = open ?? uncontrolledOpen;
|
|
5166
5409
|
const hasBubble = launcher === "bubble";
|
|
5167
5410
|
const isModal = presentation === "modal";
|
|
5168
|
-
const [isExpanded, setExpanded] =
|
|
5411
|
+
const [isExpanded, setExpanded] = useState16(false);
|
|
5169
5412
|
const launcherRef = useRef14(null);
|
|
5170
5413
|
const panelRef = useRef14(null);
|
|
5171
5414
|
const boxRef = useRef14(null);
|
|
@@ -5229,7 +5472,7 @@ function SupportLauncher({
|
|
|
5229
5472
|
opener.current = null;
|
|
5230
5473
|
if (back && back !== document.body && back.isConnected) back.focus();
|
|
5231
5474
|
}, [isOpen]);
|
|
5232
|
-
const widget = (isFullScreen) => /* @__PURE__ */
|
|
5475
|
+
const widget = (isFullScreen) => /* @__PURE__ */ jsx38(
|
|
5233
5476
|
SupportWidget,
|
|
5234
5477
|
{
|
|
5235
5478
|
presence,
|
|
@@ -5249,6 +5492,7 @@ function SupportLauncher({
|
|
|
5249
5492
|
rating,
|
|
5250
5493
|
offer,
|
|
5251
5494
|
onFollow: onFollow === void 0 ? void 0 : follow,
|
|
5495
|
+
screenRequest,
|
|
5252
5496
|
notice,
|
|
5253
5497
|
showBadge,
|
|
5254
5498
|
grabHandlers: isFullScreen || isModal ? void 0 : drag.dragHandlers,
|
|
@@ -5257,8 +5501,8 @@ function SupportLauncher({
|
|
|
5257
5501
|
compact: isModal
|
|
5258
5502
|
}
|
|
5259
5503
|
);
|
|
5260
|
-
return /* @__PURE__ */
|
|
5261
|
-
/* @__PURE__ */
|
|
5504
|
+
return /* @__PURE__ */ jsxs23(Fragment32, { children: [
|
|
5505
|
+
/* @__PURE__ */ jsxs23(
|
|
5262
5506
|
"div",
|
|
5263
5507
|
{
|
|
5264
5508
|
ref: boxRef,
|
|
@@ -5293,7 +5537,7 @@ function SupportLauncher({
|
|
|
5293
5537
|
className
|
|
5294
5538
|
),
|
|
5295
5539
|
children: [
|
|
5296
|
-
!isSheet && !isModal && /* @__PURE__ */
|
|
5540
|
+
!isSheet && !isModal && /* @__PURE__ */ jsx38("div", { "aria-hidden": true, className: "absolute inset-0 drop-shadow-xl", children: /* @__PURE__ */ jsx38(
|
|
5297
5541
|
"div",
|
|
5298
5542
|
{
|
|
5299
5543
|
style: shape(isOpen, buttonSize, drag.side, hasBubble),
|
|
@@ -5304,7 +5548,7 @@ function SupportLauncher({
|
|
|
5304
5548
|
)
|
|
5305
5549
|
}
|
|
5306
5550
|
) }),
|
|
5307
|
-
!isModal && /* @__PURE__ */
|
|
5551
|
+
!isModal && /* @__PURE__ */ jsx38(
|
|
5308
5552
|
"div",
|
|
5309
5553
|
{
|
|
5310
5554
|
ref: panelRef,
|
|
@@ -5327,7 +5571,7 @@ function SupportLauncher({
|
|
|
5327
5571
|
children: widget(isSheet)
|
|
5328
5572
|
}
|
|
5329
5573
|
),
|
|
5330
|
-
hasBubble && /* @__PURE__ */
|
|
5574
|
+
hasBubble && /* @__PURE__ */ jsxs23(
|
|
5331
5575
|
"button",
|
|
5332
5576
|
{
|
|
5333
5577
|
ref: launcherRef,
|
|
@@ -5395,8 +5639,8 @@ function SupportLauncher({
|
|
|
5395
5639
|
!isOpen && (drag.isMoving ? "cursor-grabbing" : "cursor-pointer active:scale-95")
|
|
5396
5640
|
),
|
|
5397
5641
|
children: [
|
|
5398
|
-
/* @__PURE__ */
|
|
5399
|
-
unreadCount > 0 && /* @__PURE__ */
|
|
5642
|
+
/* @__PURE__ */ jsx38(ChatCircleDots, { className: "size-7" }),
|
|
5643
|
+
unreadCount > 0 && /* @__PURE__ */ jsx38(
|
|
5400
5644
|
"span",
|
|
5401
5645
|
{
|
|
5402
5646
|
"aria-hidden": true,
|
|
@@ -5412,7 +5656,7 @@ function SupportLauncher({
|
|
|
5412
5656
|
]
|
|
5413
5657
|
}
|
|
5414
5658
|
),
|
|
5415
|
-
hasBubble && /* @__PURE__ */
|
|
5659
|
+
hasBubble && /* @__PURE__ */ jsx38(
|
|
5416
5660
|
WidgetTeaser,
|
|
5417
5661
|
{
|
|
5418
5662
|
message: teaser,
|
|
@@ -5428,7 +5672,7 @@ function SupportLauncher({
|
|
|
5428
5672
|
]
|
|
5429
5673
|
}
|
|
5430
5674
|
),
|
|
5431
|
-
isModal && /* @__PURE__ */
|
|
5675
|
+
isModal && /* @__PURE__ */ jsx38(
|
|
5432
5676
|
SupportModal,
|
|
5433
5677
|
{
|
|
5434
5678
|
isOpen,
|
|
@@ -5442,9 +5686,9 @@ function SupportLauncher({
|
|
|
5442
5686
|
}
|
|
5443
5687
|
|
|
5444
5688
|
// ../../apps/web/src/components/support-widget/widget-spotlight.tsx
|
|
5445
|
-
import { useEffect as useEffect11, useRef as useRef15, useState as
|
|
5689
|
+
import { useEffect as useEffect11, useRef as useRef15, useState as useState17 } from "react";
|
|
5446
5690
|
import { createPortal as createPortal2 } from "react-dom";
|
|
5447
|
-
import { jsx as
|
|
5691
|
+
import { jsx as jsx39, jsxs as jsxs24 } from "react/jsx-runtime";
|
|
5448
5692
|
var FIND_TIMEOUT_MS = 4e3;
|
|
5449
5693
|
var HOLD_MS = 2600;
|
|
5450
5694
|
var FADE_MS = 300;
|
|
@@ -5453,8 +5697,8 @@ function prefersReducedMotion4() {
|
|
|
5453
5697
|
return window.matchMedia("(prefers-reduced-motion: reduce)").matches;
|
|
5454
5698
|
}
|
|
5455
5699
|
function WidgetSpotlight({ selector }) {
|
|
5456
|
-
const [isShown, setIsShown] =
|
|
5457
|
-
const [isLeaving, setIsLeaving] =
|
|
5700
|
+
const [isShown, setIsShown] = useState17(false);
|
|
5701
|
+
const [isLeaving, setIsLeaving] = useState17(false);
|
|
5458
5702
|
const ring = useRef15(null);
|
|
5459
5703
|
useEffect11(() => {
|
|
5460
5704
|
let target = null;
|
|
@@ -5515,7 +5759,7 @@ function WidgetSpotlight({ selector }) {
|
|
|
5515
5759
|
}, [selector]);
|
|
5516
5760
|
if (!isShown || typeof document === "undefined") return null;
|
|
5517
5761
|
return createPortal2(
|
|
5518
|
-
/* @__PURE__ */
|
|
5762
|
+
/* @__PURE__ */ jsxs24(
|
|
5519
5763
|
"div",
|
|
5520
5764
|
{
|
|
5521
5765
|
ref: ring,
|
|
@@ -5524,7 +5768,7 @@ function WidgetSpotlight({ selector }) {
|
|
|
5524
5768
|
style: { zIndex: LAYER2, top: 0, left: 0 },
|
|
5525
5769
|
className: "pointer-events-none fixed",
|
|
5526
5770
|
children: [
|
|
5527
|
-
/* @__PURE__ */
|
|
5771
|
+
/* @__PURE__ */ jsx39(
|
|
5528
5772
|
"span",
|
|
5529
5773
|
{
|
|
5530
5774
|
className: [
|
|
@@ -5537,7 +5781,7 @@ function WidgetSpotlight({ selector }) {
|
|
|
5537
5781
|
].join(" ")
|
|
5538
5782
|
}
|
|
5539
5783
|
),
|
|
5540
|
-
/* @__PURE__ */
|
|
5784
|
+
/* @__PURE__ */ jsx39(
|
|
5541
5785
|
"span",
|
|
5542
5786
|
{
|
|
5543
5787
|
className: [
|
|
@@ -6236,6 +6480,7 @@ var TYPE = "image/jpeg";
|
|
|
6236
6480
|
var QUALITY = 0.85;
|
|
6237
6481
|
var SCREENSHOT_NAME = "screenshot.jpg";
|
|
6238
6482
|
var PIN_ATTRIBUTE = "data-median-pin";
|
|
6483
|
+
var SKIP_ATTRIBUTE = "data-median-skip";
|
|
6239
6484
|
async function capturePage() {
|
|
6240
6485
|
if (typeof window === "undefined" || typeof document === "undefined") {
|
|
6241
6486
|
return null;
|
|
@@ -6259,6 +6504,7 @@ async function draw(page) {
|
|
|
6259
6504
|
const width = page.clientWidth || window.innerWidth;
|
|
6260
6505
|
const height = page.clientHeight || window.innerHeight;
|
|
6261
6506
|
const unpin = pinFixed();
|
|
6507
|
+
const unskip = skipUnloaded();
|
|
6262
6508
|
try {
|
|
6263
6509
|
return await domToBlob(page, {
|
|
6264
6510
|
width,
|
|
@@ -6277,14 +6523,51 @@ async function draw(page) {
|
|
|
6277
6523
|
// JPEG has no transparency, so anything clear would come out black.
|
|
6278
6524
|
backgroundColor: pageBackground(),
|
|
6279
6525
|
filter: notOurs,
|
|
6280
|
-
onCloneNode:
|
|
6526
|
+
onCloneNode: (clone) => {
|
|
6527
|
+
placePinned(clone);
|
|
6528
|
+
dropSkipped(clone);
|
|
6529
|
+
},
|
|
6281
6530
|
timeout: TIMEOUT_MS,
|
|
6282
6531
|
features: { copyScrollbar: false }
|
|
6283
6532
|
});
|
|
6284
6533
|
} finally {
|
|
6534
|
+
unskip();
|
|
6285
6535
|
unpin();
|
|
6286
6536
|
}
|
|
6287
6537
|
}
|
|
6538
|
+
function skipUnloaded() {
|
|
6539
|
+
const skipped = [];
|
|
6540
|
+
for (const image of Array.from(document.images)) {
|
|
6541
|
+
if (image.complete) continue;
|
|
6542
|
+
const isOurs = image.closest("[data-median-widget]") !== null;
|
|
6543
|
+
if (!isOurs && image.loading !== "lazy") continue;
|
|
6544
|
+
Object.defineProperty(image, "complete", {
|
|
6545
|
+
configurable: true,
|
|
6546
|
+
get: () => true
|
|
6547
|
+
});
|
|
6548
|
+
Object.defineProperty(image, "decode", {
|
|
6549
|
+
configurable: true,
|
|
6550
|
+
value: () => Promise.resolve()
|
|
6551
|
+
});
|
|
6552
|
+
image.setAttribute(SKIP_ATTRIBUTE, "");
|
|
6553
|
+
skipped.push(image);
|
|
6554
|
+
}
|
|
6555
|
+
return () => {
|
|
6556
|
+
for (const image of skipped) {
|
|
6557
|
+
Reflect.deleteProperty(image, "complete");
|
|
6558
|
+
Reflect.deleteProperty(image, "decode");
|
|
6559
|
+
image.removeAttribute(SKIP_ATTRIBUTE);
|
|
6560
|
+
}
|
|
6561
|
+
};
|
|
6562
|
+
}
|
|
6563
|
+
function dropSkipped(clone) {
|
|
6564
|
+
if (!(clone instanceof Element)) return;
|
|
6565
|
+
for (const image of clone.querySelectorAll(`[${SKIP_ATTRIBUTE}]`)) {
|
|
6566
|
+
image.removeAttribute(SKIP_ATTRIBUTE);
|
|
6567
|
+
image.removeAttribute("srcset");
|
|
6568
|
+
image.removeAttribute("src");
|
|
6569
|
+
}
|
|
6570
|
+
}
|
|
6288
6571
|
function pinFixed() {
|
|
6289
6572
|
const pinned = [];
|
|
6290
6573
|
for (const element of document.body.querySelectorAll("*")) {
|
|
@@ -6394,17 +6677,17 @@ function useWidgetMutation(reference) {
|
|
|
6394
6677
|
|
|
6395
6678
|
// ../../apps/web/src/components/support-widget/sdk/use-median-thread.ts
|
|
6396
6679
|
import {
|
|
6397
|
-
useCallback as
|
|
6680
|
+
useCallback as useCallback13,
|
|
6398
6681
|
useEffect as useEffect18,
|
|
6399
|
-
useMemo as
|
|
6400
|
-
useState as
|
|
6682
|
+
useMemo as useMemo3,
|
|
6683
|
+
useState as useState20,
|
|
6401
6684
|
useSyncExternalStore as useSyncExternalStore9
|
|
6402
6685
|
} from "react";
|
|
6403
6686
|
|
|
6404
6687
|
// ../../apps/web/src/hooks/use-now.ts
|
|
6405
|
-
import { useEffect as useEffect16, useState as
|
|
6688
|
+
import { useEffect as useEffect16, useState as useState18 } from "react";
|
|
6406
6689
|
function useNow(intervalMs = 3e4) {
|
|
6407
|
-
const [now, setNow] =
|
|
6690
|
+
const [now, setNow] = useState18(() => Date.now());
|
|
6408
6691
|
useEffect16(() => {
|
|
6409
6692
|
const timer = setInterval(() => setNow(Date.now()), intervalMs);
|
|
6410
6693
|
return () => clearInterval(timer);
|
|
@@ -6526,27 +6809,187 @@ function widgetReadReceipts(messages, now) {
|
|
|
6526
6809
|
}
|
|
6527
6810
|
|
|
6528
6811
|
// ../../apps/web/src/components/support-widget/sdk/use-screenshot-ask.ts
|
|
6529
|
-
import { useEffect as useEffect17, useRef as useRef18 } from "react";
|
|
6812
|
+
import { useCallback as useCallback11, useEffect as useEffect17, useMemo as useMemo2, useRef as useRef18, useState as useState19 } from "react";
|
|
6813
|
+
|
|
6814
|
+
// ../../apps/web/src/components/support-widget/sdk/screen-capture.ts
|
|
6815
|
+
var FADE_MS2 = 150;
|
|
6816
|
+
var FRAME_WAIT_MS = 500;
|
|
6817
|
+
async function captureScreen() {
|
|
6818
|
+
const sharing = askToShare();
|
|
6819
|
+
if (sharing === null) return await fromPage();
|
|
6820
|
+
let stream;
|
|
6821
|
+
try {
|
|
6822
|
+
stream = await sharing;
|
|
6823
|
+
} catch (caught) {
|
|
6824
|
+
if (caught instanceof DOMException && caught.name === "NotAllowedError") {
|
|
6825
|
+
return { kind: "declined" };
|
|
6826
|
+
}
|
|
6827
|
+
console.warn("Median: sharing the screen failed, so the page is redrawn", caught);
|
|
6828
|
+
return await fromPage();
|
|
6829
|
+
}
|
|
6830
|
+
try {
|
|
6831
|
+
const file = await frameOf(stream);
|
|
6832
|
+
return file === null ? await fromPage() : { kind: "taken", file };
|
|
6833
|
+
} catch (caught) {
|
|
6834
|
+
console.warn("Median: reading the shared screen failed", caught);
|
|
6835
|
+
return await fromPage();
|
|
6836
|
+
} finally {
|
|
6837
|
+
for (const track of stream.getTracks()) track.stop();
|
|
6838
|
+
}
|
|
6839
|
+
}
|
|
6840
|
+
function askToShare() {
|
|
6841
|
+
if (typeof navigator === "undefined" || typeof document === "undefined") {
|
|
6842
|
+
return null;
|
|
6843
|
+
}
|
|
6844
|
+
const media = navigator.mediaDevices;
|
|
6845
|
+
if (typeof media?.getDisplayMedia !== "function" || !policyAllows()) {
|
|
6846
|
+
return null;
|
|
6847
|
+
}
|
|
6848
|
+
const options = {
|
|
6849
|
+
video: { displaySurface: "browser" },
|
|
6850
|
+
audio: false,
|
|
6851
|
+
preferCurrentTab: true,
|
|
6852
|
+
selfBrowserSurface: "include",
|
|
6853
|
+
surfaceSwitching: "exclude"
|
|
6854
|
+
};
|
|
6855
|
+
try {
|
|
6856
|
+
return media.getDisplayMedia(options);
|
|
6857
|
+
} catch {
|
|
6858
|
+
return null;
|
|
6859
|
+
}
|
|
6860
|
+
}
|
|
6861
|
+
function policyAllows() {
|
|
6862
|
+
const policy = document;
|
|
6863
|
+
const reader = policy.permissionsPolicy ?? policy.featurePolicy;
|
|
6864
|
+
try {
|
|
6865
|
+
return reader?.allowsFeature("display-capture") ?? true;
|
|
6866
|
+
} catch {
|
|
6867
|
+
return true;
|
|
6868
|
+
}
|
|
6869
|
+
}
|
|
6870
|
+
async function fromPage() {
|
|
6871
|
+
const file = await capturePage();
|
|
6872
|
+
return file === null ? { kind: "failed" } : { kind: "taken", file };
|
|
6873
|
+
}
|
|
6874
|
+
async function frameOf(stream) {
|
|
6875
|
+
const video = document.createElement("video");
|
|
6876
|
+
video.muted = true;
|
|
6877
|
+
video.playsInline = true;
|
|
6878
|
+
video.srcObject = stream;
|
|
6879
|
+
try {
|
|
6880
|
+
await video.play();
|
|
6881
|
+
if (video.videoWidth === 0) await nextFrame(video);
|
|
6882
|
+
const show = hideOurs();
|
|
6883
|
+
try {
|
|
6884
|
+
await delay(FADE_MS2);
|
|
6885
|
+
await nextFrame(video);
|
|
6886
|
+
return await drawn(video);
|
|
6887
|
+
} finally {
|
|
6888
|
+
show();
|
|
6889
|
+
}
|
|
6890
|
+
} finally {
|
|
6891
|
+
video.pause();
|
|
6892
|
+
video.srcObject = null;
|
|
6893
|
+
}
|
|
6894
|
+
}
|
|
6895
|
+
async function drawn(video) {
|
|
6896
|
+
const { videoWidth: width, videoHeight: height } = video;
|
|
6897
|
+
if (width === 0 || height === 0) return null;
|
|
6898
|
+
const scale = Math.min(1, MAX_WIDTH / width);
|
|
6899
|
+
const canvas = document.createElement("canvas");
|
|
6900
|
+
canvas.width = Math.round(width * scale);
|
|
6901
|
+
canvas.height = Math.round(height * scale);
|
|
6902
|
+
const context = canvas.getContext("2d");
|
|
6903
|
+
if (context === null) return null;
|
|
6904
|
+
context.drawImage(video, 0, 0, canvas.width, canvas.height);
|
|
6905
|
+
const blob = await new Promise(
|
|
6906
|
+
(resolve) => canvas.toBlob(resolve, TYPE, QUALITY)
|
|
6907
|
+
);
|
|
6908
|
+
return blob === null ? null : new File([blob], SCREENSHOT_NAME, { type: TYPE });
|
|
6909
|
+
}
|
|
6910
|
+
function hideOurs() {
|
|
6911
|
+
const duration = prefersReducedMotion2() ? 0 : FADE_MS2;
|
|
6912
|
+
const fades = Array.from(
|
|
6913
|
+
document.querySelectorAll("[data-median-widget]")
|
|
6914
|
+
).map(
|
|
6915
|
+
(root) => root.animate(
|
|
6916
|
+
{ opacity: 0 },
|
|
6917
|
+
{
|
|
6918
|
+
duration,
|
|
6919
|
+
easing: "cubic-bezier(0.22, 1, 0.36, 1)",
|
|
6920
|
+
fill: "forwards"
|
|
6921
|
+
}
|
|
6922
|
+
)
|
|
6923
|
+
);
|
|
6924
|
+
return () => {
|
|
6925
|
+
for (const fade of fades) {
|
|
6926
|
+
fade.reverse();
|
|
6927
|
+
void fade.finished.then(
|
|
6928
|
+
() => fade.cancel(),
|
|
6929
|
+
() => void 0
|
|
6930
|
+
);
|
|
6931
|
+
}
|
|
6932
|
+
};
|
|
6933
|
+
}
|
|
6934
|
+
function nextFrame(video) {
|
|
6935
|
+
return new Promise((resolve) => {
|
|
6936
|
+
const timer = setTimeout(resolve, FRAME_WAIT_MS);
|
|
6937
|
+
if (typeof video.requestVideoFrameCallback === "function") {
|
|
6938
|
+
video.requestVideoFrameCallback(() => {
|
|
6939
|
+
clearTimeout(timer);
|
|
6940
|
+
resolve();
|
|
6941
|
+
});
|
|
6942
|
+
}
|
|
6943
|
+
});
|
|
6944
|
+
}
|
|
6945
|
+
function delay(ms) {
|
|
6946
|
+
return new Promise((resolve) => setTimeout(resolve, ms));
|
|
6947
|
+
}
|
|
6948
|
+
|
|
6949
|
+
// ../../apps/web/src/components/support-widget/sdk/use-screenshot-ask.ts
|
|
6530
6950
|
function useScreenshotAsk({
|
|
6531
6951
|
ask,
|
|
6532
6952
|
enabled: enabled2,
|
|
6533
6953
|
answer
|
|
6534
6954
|
}) {
|
|
6535
|
-
const
|
|
6955
|
+
const refused = useRef18(/* @__PURE__ */ new Set());
|
|
6956
|
+
const [pressed, setPressed] = useState19(null);
|
|
6536
6957
|
useEffect17(() => {
|
|
6537
|
-
if (ask === null ||
|
|
6538
|
-
|
|
6539
|
-
|
|
6540
|
-
const shot = enabled2 ? await capturePage() : null;
|
|
6541
|
-
await answer(ask.key, shot);
|
|
6542
|
-
})().catch((caught) => {
|
|
6543
|
-
console.warn("Median: answering the agent's request for a picture failed", caught);
|
|
6544
|
-
});
|
|
6958
|
+
if (ask === null || enabled2 || refused.current.has(ask.key)) return;
|
|
6959
|
+
refused.current.add(ask.key);
|
|
6960
|
+
answer(ask.key, { kind: "failed" }).catch(warn);
|
|
6545
6961
|
}, [ask, enabled2, answer]);
|
|
6962
|
+
const settle = useCallback11(
|
|
6963
|
+
(key2, capture) => {
|
|
6964
|
+
setPressed(key2);
|
|
6965
|
+
capture.then((result) => answer(key2, result)).catch((caught) => {
|
|
6966
|
+
warn(caught);
|
|
6967
|
+
setPressed((current2) => current2 === key2 ? null : current2);
|
|
6968
|
+
});
|
|
6969
|
+
},
|
|
6970
|
+
[answer]
|
|
6971
|
+
);
|
|
6972
|
+
const key = ask?.key ?? null;
|
|
6973
|
+
const isSharing = key !== null && pressed === key;
|
|
6974
|
+
const share = useCallback11(() => {
|
|
6975
|
+
if (key === null || isSharing) return;
|
|
6976
|
+
settle(key, captureScreen());
|
|
6977
|
+
}, [key, isSharing, settle]);
|
|
6978
|
+
const decline = useCallback11(() => {
|
|
6979
|
+
if (key === null || isSharing) return;
|
|
6980
|
+
settle(key, Promise.resolve({ kind: "declined" }));
|
|
6981
|
+
}, [key, isSharing, settle]);
|
|
6982
|
+
return useMemo2(
|
|
6983
|
+
() => key === null || !enabled2 ? null : { key, isSharing, share, decline },
|
|
6984
|
+
[key, enabled2, isSharing, share, decline]
|
|
6985
|
+
);
|
|
6986
|
+
}
|
|
6987
|
+
function warn(caught) {
|
|
6988
|
+
console.warn("Median: answering the agent's request to see the screen failed", caught);
|
|
6546
6989
|
}
|
|
6547
6990
|
|
|
6548
6991
|
// ../../apps/web/src/components/support-widget/sdk/visitor-email.ts
|
|
6549
|
-
import { useCallback as
|
|
6992
|
+
import { useCallback as useCallback12, useSyncExternalStore as useSyncExternalStore8 } from "react";
|
|
6550
6993
|
var STORAGE_PREFIX3 = "median:email:";
|
|
6551
6994
|
var inMemory2 = /* @__PURE__ */ new Map();
|
|
6552
6995
|
var listeners5 = /* @__PURE__ */ new Set();
|
|
@@ -6591,10 +7034,10 @@ function resetVisitorEmails() {
|
|
|
6591
7034
|
function useVisitorEmail(apiKey) {
|
|
6592
7035
|
const email = useSyncExternalStore8(
|
|
6593
7036
|
subscribeVisitorEmail,
|
|
6594
|
-
|
|
7037
|
+
useCallback12(() => readVisitorEmail(apiKey), [apiKey]),
|
|
6595
7038
|
() => null
|
|
6596
7039
|
);
|
|
6597
|
-
const setEmail =
|
|
7040
|
+
const setEmail = useCallback12(
|
|
6598
7041
|
(next) => writeVisitorEmail(apiKey, next),
|
|
6599
7042
|
[apiKey]
|
|
6600
7043
|
);
|
|
@@ -6634,7 +7077,7 @@ function useMedianThread({
|
|
|
6634
7077
|
}) {
|
|
6635
7078
|
const sessionId = useSyncExternalStore9(
|
|
6636
7079
|
subscribeSession,
|
|
6637
|
-
|
|
7080
|
+
useCallback13(() => getOrCreateSessionId(apiKey), [apiKey]),
|
|
6638
7081
|
() => null
|
|
6639
7082
|
);
|
|
6640
7083
|
const config = useQuery(api.widget.config, { apiKey });
|
|
@@ -6651,15 +7094,15 @@ function useMedianThread({
|
|
|
6651
7094
|
const identify = useWidgetMutation(api.widget.identifyV2);
|
|
6652
7095
|
const generateUploadUrl = useWidgetMutation(api.widget.generateUploadUrlV2);
|
|
6653
7096
|
const answerScreenshot = useWidgetMutation(api.widget.answerScreenshotV2);
|
|
6654
|
-
const answerAsk =
|
|
6655
|
-
async (key,
|
|
7097
|
+
const answerAsk = useCallback13(
|
|
7098
|
+
async (key, capture) => {
|
|
6656
7099
|
if (sessionId === null) return;
|
|
6657
7100
|
let attachment;
|
|
6658
|
-
if (
|
|
7101
|
+
if (capture.kind === "taken") {
|
|
6659
7102
|
try {
|
|
6660
7103
|
[attachment] = await uploadAttachments(
|
|
6661
7104
|
() => generateUploadUrl({ apiKey, sessionId }),
|
|
6662
|
-
[
|
|
7105
|
+
[capture.file]
|
|
6663
7106
|
);
|
|
6664
7107
|
} catch (caught) {
|
|
6665
7108
|
console.warn(
|
|
@@ -6672,13 +7115,14 @@ function useMedianThread({
|
|
|
6672
7115
|
apiKey,
|
|
6673
7116
|
sessionId,
|
|
6674
7117
|
key,
|
|
6675
|
-
...attachment === void 0 ? {} : { attachment }
|
|
7118
|
+
...attachment === void 0 ? {} : { attachment },
|
|
7119
|
+
...capture.kind === "declined" ? { declined: true } : {}
|
|
6676
7120
|
});
|
|
6677
7121
|
},
|
|
6678
7122
|
[apiKey, sessionId, generateUploadUrl, answerScreenshot]
|
|
6679
7123
|
);
|
|
6680
7124
|
const identityKey = user ? JSON.stringify(user) : null;
|
|
6681
|
-
const identity =
|
|
7125
|
+
const identity = useMemo3(
|
|
6682
7126
|
() => identityKey === null ? null : JSON.parse(identityKey),
|
|
6683
7127
|
[identityKey]
|
|
6684
7128
|
);
|
|
@@ -6701,9 +7145,9 @@ function useMedianThread({
|
|
|
6701
7145
|
) ?? false;
|
|
6702
7146
|
const now = useNow(hasLiveDots ? 1e3 : 6e4);
|
|
6703
7147
|
const takeDiagnostics = useDiagnostics(diagnostics, appState);
|
|
6704
|
-
const [isSending, setIsSending] =
|
|
6705
|
-
const [sendError, setSendError] =
|
|
6706
|
-
const agent =
|
|
7148
|
+
const [isSending, setIsSending] = useState20(false);
|
|
7149
|
+
const [sendError, setSendError] = useState20(null);
|
|
7150
|
+
const agent = useMemo3(
|
|
6707
7151
|
() => config === void 0 ? null : {
|
|
6708
7152
|
id: "median-agent",
|
|
6709
7153
|
name: config.agent.name,
|
|
@@ -6712,7 +7156,7 @@ function useMedianThread({
|
|
|
6712
7156
|
},
|
|
6713
7157
|
[config]
|
|
6714
7158
|
);
|
|
6715
|
-
const messages =
|
|
7159
|
+
const messages = useMemo3(() => {
|
|
6716
7160
|
if (!thread || agent === null) return [];
|
|
6717
7161
|
const out = [];
|
|
6718
7162
|
let previousAt;
|
|
@@ -6754,14 +7198,17 @@ function useMedianThread({
|
|
|
6754
7198
|
};
|
|
6755
7199
|
}) : void 0,
|
|
6756
7200
|
navigateTo: message.navigateTo ?? void 0,
|
|
6757
|
-
highlight: message.highlight ?? void 0
|
|
7201
|
+
highlight: message.highlight ?? void 0,
|
|
7202
|
+
// Optional in practice: a published widget can meet a backend from
|
|
7203
|
+
// before chips, and a missing list is no chips rather than a crash.
|
|
7204
|
+
sources: message.sources?.length ? message.sources : void 0
|
|
6758
7205
|
});
|
|
6759
7206
|
previousAt = message.createdAt;
|
|
6760
7207
|
previousConversationId = message.conversationId;
|
|
6761
7208
|
}
|
|
6762
7209
|
return out;
|
|
6763
7210
|
}, [thread, agent, now]);
|
|
6764
|
-
const presence =
|
|
7211
|
+
const presence = useMemo3(() => {
|
|
6765
7212
|
if (config === void 0 || agent === null) return null;
|
|
6766
7213
|
const humans = /* @__PURE__ */ new Map();
|
|
6767
7214
|
for (const message of messages) {
|
|
@@ -6775,7 +7222,7 @@ function useMedianThread({
|
|
|
6775
7222
|
team: [...[...humans.values()].slice(-2), agent]
|
|
6776
7223
|
};
|
|
6777
7224
|
}, [config, agent, messages]);
|
|
6778
|
-
const unread =
|
|
7225
|
+
const unread = useMemo3(() => {
|
|
6779
7226
|
const unreadIds = new Set(
|
|
6780
7227
|
thread?.messages.filter(isUnreadReply).map((message) => message._id)
|
|
6781
7228
|
);
|
|
@@ -6783,8 +7230,8 @@ function useMedianThread({
|
|
|
6783
7230
|
}, [messages, thread]);
|
|
6784
7231
|
const unreadCount = unread.length;
|
|
6785
7232
|
const latestUnread = messagePreview && (config?.messagePreview ?? true) ? unread[unread.length - 1] ?? null : null;
|
|
6786
|
-
const [picked, setPicked] =
|
|
6787
|
-
const [skipped, setSkipped] =
|
|
7233
|
+
const [picked, setPicked] = useState20(null);
|
|
7234
|
+
const [skipped, setSkipped] = useState20(
|
|
6788
7235
|
() => readSkippedRatings(apiKey)
|
|
6789
7236
|
);
|
|
6790
7237
|
const conversationId = thread?.conversationId ?? null;
|
|
@@ -6852,11 +7299,11 @@ function useMedianThread({
|
|
|
6852
7299
|
const readsKey = JSON.stringify(
|
|
6853
7300
|
widgetReadReceipts(thread?.messages ?? [], now)
|
|
6854
7301
|
);
|
|
6855
|
-
const reads =
|
|
7302
|
+
const reads = useMemo3(
|
|
6856
7303
|
() => JSON.parse(readsKey),
|
|
6857
7304
|
[readsKey]
|
|
6858
7305
|
);
|
|
6859
|
-
const reportPresence =
|
|
7306
|
+
const reportPresence = useCallback13(() => {
|
|
6860
7307
|
if (sessionId === null || isLocked) return;
|
|
6861
7308
|
sendPresence({
|
|
6862
7309
|
apiKey,
|
|
@@ -6867,7 +7314,7 @@ function useMedianThread({
|
|
|
6867
7314
|
});
|
|
6868
7315
|
}, [apiKey, sessionId, isLocked, sendPresence, reads]);
|
|
6869
7316
|
const ask = thread?.direction ?? null;
|
|
6870
|
-
useScreenshotAsk({
|
|
7317
|
+
const screenRequest = useScreenshotAsk({
|
|
6871
7318
|
ask: thread?.screenshotAsk ?? null,
|
|
6872
7319
|
enabled: screenshot,
|
|
6873
7320
|
answer: answerAsk
|
|
@@ -6877,6 +7324,8 @@ function useMedianThread({
|
|
|
6877
7324
|
messages,
|
|
6878
7325
|
/** Something a tool run asked of this page, with no message to ride on. */
|
|
6879
7326
|
ask,
|
|
7327
|
+
/** The agent asking to see their screen, as an offer to share it. */
|
|
7328
|
+
screenRequest,
|
|
6880
7329
|
/**
|
|
6881
7330
|
* The live thread, or null before there is one. Read by whatever has to
|
|
6882
7331
|
* tell "the next thing in this conversation" from "a different
|
|
@@ -7033,7 +7482,7 @@ function useCanReportError() {
|
|
|
7033
7482
|
}
|
|
7034
7483
|
|
|
7035
7484
|
// ../../apps/web/src/components/support-widget/sdk/signed-out.ts
|
|
7036
|
-
import { useEffect as useEffect19, useRef as useRef19, useState as
|
|
7485
|
+
import { useEffect as useEffect19, useRef as useRef19, useState as useState21, useSyncExternalStore as useSyncExternalStore11 } from "react";
|
|
7037
7486
|
var held = /* @__PURE__ */ new Map();
|
|
7038
7487
|
var signedOut = /* @__PURE__ */ new Set();
|
|
7039
7488
|
var RELEASE_AFTER_MS = 2e3;
|
|
@@ -7054,7 +7503,7 @@ function personKey(user) {
|
|
|
7054
7503
|
function useSignedInUser(user) {
|
|
7055
7504
|
const person = personKey(user);
|
|
7056
7505
|
useSyncExternalStore11(subscribeSession, getResetCount, () => 0);
|
|
7057
|
-
const [token] =
|
|
7506
|
+
const [token] = useState21(() => Symbol("median-panel"));
|
|
7058
7507
|
const previous = useRef19(null);
|
|
7059
7508
|
useEffect19(() => {
|
|
7060
7509
|
if (previous.current !== null && previous.current !== person) {
|
|
@@ -7225,7 +7674,7 @@ var MedianErrorBoundary = class extends Component {
|
|
|
7225
7674
|
};
|
|
7226
7675
|
|
|
7227
7676
|
// ../../apps/web/src/components/support-widget/sdk/use-identity.ts
|
|
7228
|
-
import { useEffect as useEffect20, useState as
|
|
7677
|
+
import { useEffect as useEffect20, useState as useState22, useSyncExternalStore as useSyncExternalStore14 } from "react";
|
|
7229
7678
|
var NOTHING = {
|
|
7230
7679
|
apiKey: void 0,
|
|
7231
7680
|
user: void 0,
|
|
@@ -7263,7 +7712,7 @@ function useMissingCredentials(caller, apiKey, endpoint, consequence = "nothing
|
|
|
7263
7712
|
}, [caller, apiKey, endpoint, consequence]);
|
|
7264
7713
|
}
|
|
7265
7714
|
function useMedianIdentity(endpoint) {
|
|
7266
|
-
const [answered, setAnswered] =
|
|
7715
|
+
const [answered, setAnswered] = useState22(null);
|
|
7267
7716
|
const resets = useSyncExternalStore14(subscribeSession, getResetCount, () => 0);
|
|
7268
7717
|
useEffect20(() => {
|
|
7269
7718
|
if (endpoint === void 0) return;
|
|
@@ -7302,9 +7751,9 @@ function useMedianIdentity(endpoint) {
|
|
|
7302
7751
|
|
|
7303
7752
|
// ../../apps/web/src/components/support-widget/sdk/use-median-branding.ts
|
|
7304
7753
|
import { ConvexHttpClient as ConvexHttpClient2 } from "convex/browser";
|
|
7305
|
-
import { useEffect as useEffect21, useState as
|
|
7754
|
+
import { useEffect as useEffect21, useState as useState23 } from "react";
|
|
7306
7755
|
function useMedianBranding(apiKey) {
|
|
7307
|
-
const [state, setState] =
|
|
7756
|
+
const [state, setState] = useState23({ key: apiKey, show: true });
|
|
7308
7757
|
useEffect21(() => {
|
|
7309
7758
|
if (!apiKey || !MEDIAN_DEPLOYMENT_URL) return;
|
|
7310
7759
|
const client3 = new ConvexHttpClient2(MEDIAN_DEPLOYMENT_URL);
|
|
@@ -7341,13 +7790,13 @@ function useMedianBranding(apiKey) {
|
|
|
7341
7790
|
|
|
7342
7791
|
// ../../apps/web/src/components/support-widget/sdk/median-connection.tsx
|
|
7343
7792
|
import { ConvexProvider, ConvexReactClient } from "convex/react";
|
|
7344
|
-
import { useState as
|
|
7345
|
-
import { jsx as
|
|
7793
|
+
import { useState as useState24 } from "react";
|
|
7794
|
+
import { jsx as jsx40 } from "react/jsx-runtime";
|
|
7346
7795
|
function MedianConnection({
|
|
7347
7796
|
what,
|
|
7348
7797
|
children
|
|
7349
7798
|
}) {
|
|
7350
|
-
const [client3] =
|
|
7799
|
+
const [client3] = useState24(() => {
|
|
7351
7800
|
if (!MEDIAN_DEPLOYMENT_URL) {
|
|
7352
7801
|
throw new Error(
|
|
7353
7802
|
`The Median ${what} was built without a deployment URL. Set NEXT_PUBLIC_CONVEX_URL.`
|
|
@@ -7355,7 +7804,7 @@ function MedianConnection({
|
|
|
7355
7804
|
}
|
|
7356
7805
|
return new ConvexReactClient(MEDIAN_DEPLOYMENT_URL);
|
|
7357
7806
|
});
|
|
7358
|
-
return /* @__PURE__ */
|
|
7807
|
+
return /* @__PURE__ */ jsx40(ConvexProvider, { client: client3, children });
|
|
7359
7808
|
}
|
|
7360
7809
|
|
|
7361
7810
|
// ../../apps/web/src/components/support-widget/sdk/use-api-key-warning.ts
|
|
@@ -7576,8 +8025,8 @@ function renderNoise(context, destination, layer, startTime) {
|
|
|
7576
8025
|
source.stop(startTime + duration);
|
|
7577
8026
|
}
|
|
7578
8027
|
function attachShimmer(context, source, destination, shimmer) {
|
|
7579
|
-
const
|
|
7580
|
-
|
|
8028
|
+
const delay2 = context.createDelay(1);
|
|
8029
|
+
delay2.delayTime.value = shimmer.delay;
|
|
7581
8030
|
const feedbackFilter = context.createBiquadFilter();
|
|
7582
8031
|
feedbackFilter.type = "lowpass";
|
|
7583
8032
|
feedbackFilter.frequency.value = shimmer.lowpass;
|
|
@@ -7585,13 +8034,13 @@ function attachShimmer(context, source, destination, shimmer) {
|
|
|
7585
8034
|
feedbackGain.gain.value = shimmer.feedback;
|
|
7586
8035
|
const wetGain = context.createGain();
|
|
7587
8036
|
wetGain.gain.value = shimmer.wet;
|
|
7588
|
-
source.connect(
|
|
7589
|
-
|
|
8037
|
+
source.connect(delay2);
|
|
8038
|
+
delay2.connect(feedbackFilter);
|
|
7590
8039
|
feedbackFilter.connect(feedbackGain);
|
|
7591
|
-
feedbackGain.connect(
|
|
8040
|
+
feedbackGain.connect(delay2);
|
|
7592
8041
|
feedbackFilter.connect(wetGain);
|
|
7593
8042
|
wetGain.connect(destination);
|
|
7594
|
-
return [
|
|
8043
|
+
return [delay2, feedbackFilter, feedbackGain, wetGain];
|
|
7595
8044
|
}
|
|
7596
8045
|
function sourceEnd(recipe) {
|
|
7597
8046
|
return Math.max(...recipe.layers.map((layer) => (layer.offset ?? 0) + layer.attack + layer.decay + SOURCE_STOP_PADDING));
|
|
@@ -7721,7 +8170,7 @@ function useMessageSound({
|
|
|
7721
8170
|
}
|
|
7722
8171
|
|
|
7723
8172
|
// ../../apps/web/src/components/support-widget/sdk/use-navigation.ts
|
|
7724
|
-
import { useCallback as
|
|
8173
|
+
import { useCallback as useCallback14, useEffect as useEffect24, useLayoutEffect as useLayoutEffect10, useRef as useRef21, useState as useState25 } from "react";
|
|
7725
8174
|
var isDevelopment2 = typeof process !== "undefined" && process.env.NODE_ENV === "development";
|
|
7726
8175
|
var STALE_AFTER_MS = 5 * 60 * 1e3;
|
|
7727
8176
|
function isFresh(at2) {
|
|
@@ -7767,10 +8216,10 @@ function useSupportNavigation({
|
|
|
7767
8216
|
}) {
|
|
7768
8217
|
const seen = useRef21(null);
|
|
7769
8218
|
const watching = useRef21(null);
|
|
7770
|
-
const [spotlight, setSpotlight] =
|
|
7771
|
-
const
|
|
7772
|
-
const [taken, setTaken] =
|
|
7773
|
-
const follow =
|
|
8219
|
+
const [spotlight, setSpotlight] = useState25(null);
|
|
8220
|
+
const drawn2 = useRef21(0);
|
|
8221
|
+
const [taken, setTaken] = useState25(null);
|
|
8222
|
+
const follow = useCallback14(
|
|
7774
8223
|
(destination) => {
|
|
7775
8224
|
if (onNavigate === void 0) return;
|
|
7776
8225
|
const path = pathOnThisSite(destination.path);
|
|
@@ -7783,9 +8232,9 @@ function useSupportNavigation({
|
|
|
7783
8232
|
onNavigate(path);
|
|
7784
8233
|
setTaken(destination.key);
|
|
7785
8234
|
if (destination.highlight !== null) {
|
|
7786
|
-
|
|
8235
|
+
drawn2.current += 1;
|
|
7787
8236
|
setSpotlight({
|
|
7788
|
-
key: `${destination.key}:${
|
|
8237
|
+
key: `${destination.key}:${drawn2.current}`,
|
|
7789
8238
|
selector: destination.highlight
|
|
7790
8239
|
});
|
|
7791
8240
|
}
|
|
@@ -7805,8 +8254,8 @@ function useSupportNavigation({
|
|
|
7805
8254
|
if (seen.current.has(one.key)) continue;
|
|
7806
8255
|
seen.current.add(one.key);
|
|
7807
8256
|
if (!isFresh(one.at)) continue;
|
|
7808
|
-
|
|
7809
|
-
latest = { key: `${one.key}:${
|
|
8257
|
+
drawn2.current += 1;
|
|
8258
|
+
latest = { key: `${one.key}:${drawn2.current}`, selector: one.selector };
|
|
7810
8259
|
}
|
|
7811
8260
|
if (latest !== null) setSpotlight(latest);
|
|
7812
8261
|
}, [messages, ask, conversationId, isLoading]);
|
|
@@ -7820,7 +8269,7 @@ function useSupportNavigation({
|
|
|
7820
8269
|
"Median: a tool offered to take this visitor to a page, but <MedianSupport> has no onNavigate, so no button is shown for it. Pass one, such as onNavigate={router.push}."
|
|
7821
8270
|
);
|
|
7822
8271
|
}, [messages, ask, onNavigate]);
|
|
7823
|
-
const [, expire] =
|
|
8272
|
+
const [, expire] = useState25(0);
|
|
7824
8273
|
useEffect24(() => {
|
|
7825
8274
|
if (ask === null || ask.navigateTo === null) return;
|
|
7826
8275
|
const left = ask.at + STALE_AFTER_MS - Date.now();
|
|
@@ -7833,7 +8282,7 @@ function useSupportNavigation({
|
|
|
7833
8282
|
}
|
|
7834
8283
|
|
|
7835
8284
|
// ../../apps/web/src/components/support-widget/sdk/use-teaser.ts
|
|
7836
|
-
import { useCallback as
|
|
8285
|
+
import { useCallback as useCallback15, useState as useState26 } from "react";
|
|
7837
8286
|
|
|
7838
8287
|
// ../../apps/web/src/components/support-widget/sdk/stamps.ts
|
|
7839
8288
|
var inMemory3 = /* @__PURE__ */ new Map();
|
|
@@ -7872,11 +8321,11 @@ function writeTeaserDismissedAt(apiKey, at2) {
|
|
|
7872
8321
|
|
|
7873
8322
|
// ../../apps/web/src/components/support-widget/sdk/use-teaser.ts
|
|
7874
8323
|
function useTeaser(apiKey, latestUnread) {
|
|
7875
|
-
const [dismissedAt, setDismissedAt] =
|
|
8324
|
+
const [dismissedAt, setDismissedAt] = useState26(
|
|
7876
8325
|
() => readTeaserDismissedAt(apiKey)
|
|
7877
8326
|
);
|
|
7878
8327
|
const teaser = latestUnread !== null && (latestUnread.sentAt ?? 0) > dismissedAt ? latestUnread : null;
|
|
7879
|
-
const dismiss =
|
|
8328
|
+
const dismiss = useCallback15(() => {
|
|
7880
8329
|
if (teaser === null) return;
|
|
7881
8330
|
const at2 = teaser.sentAt ?? Date.now();
|
|
7882
8331
|
writeTeaserDismissedAt(apiKey, at2);
|
|
@@ -7916,10 +8365,10 @@ function useUnreadTitle(unreadCount) {
|
|
|
7916
8365
|
}
|
|
7917
8366
|
|
|
7918
8367
|
// ../../apps/web/src/components/support-widget/sdk/median-support.tsx
|
|
7919
|
-
import { Fragment as
|
|
8368
|
+
import { Fragment as Fragment33, jsx as jsx41, jsxs as jsxs25 } from "react/jsx-runtime";
|
|
7920
8369
|
var PRESENCE_BEAT_MS = 45e3;
|
|
7921
8370
|
function MedianSupport(props) {
|
|
7922
|
-
return /* @__PURE__ */
|
|
8371
|
+
return /* @__PURE__ */ jsx41(MedianSupportPreview, { ...props });
|
|
7923
8372
|
}
|
|
7924
8373
|
function MedianSupportPreview({
|
|
7925
8374
|
defaultOpen = false,
|
|
@@ -7927,7 +8376,7 @@ function MedianSupportPreview({
|
|
|
7927
8376
|
className,
|
|
7928
8377
|
...props
|
|
7929
8378
|
}) {
|
|
7930
|
-
return /* @__PURE__ */
|
|
8379
|
+
return /* @__PURE__ */ jsx41(MedianErrorBoundary, { component: componentName(presentation), children: /* @__PURE__ */ jsx41(
|
|
7931
8380
|
MedianIdentity,
|
|
7932
8381
|
{
|
|
7933
8382
|
...props,
|
|
@@ -7950,7 +8399,7 @@ function MedianIdentity({ apiKey, identity, user, ...rest }) {
|
|
|
7950
8399
|
const key = apiKey ?? resolved.apiKey;
|
|
7951
8400
|
const person = useSignedInUser(user ?? resolved.user);
|
|
7952
8401
|
if (key === void 0) return null;
|
|
7953
|
-
return /* @__PURE__ */
|
|
8402
|
+
return /* @__PURE__ */ jsx41(MedianConnection, { what: "widget", children: /* @__PURE__ */ jsx41(
|
|
7954
8403
|
MedianLauncher,
|
|
7955
8404
|
{
|
|
7956
8405
|
...rest,
|
|
@@ -7996,6 +8445,7 @@ function MedianLauncher({
|
|
|
7996
8445
|
presence,
|
|
7997
8446
|
messages,
|
|
7998
8447
|
ask,
|
|
8448
|
+
screenRequest,
|
|
7999
8449
|
conversationId,
|
|
8000
8450
|
isLoading,
|
|
8001
8451
|
isSending,
|
|
@@ -8069,9 +8519,9 @@ function MedianLauncher({
|
|
|
8069
8519
|
status: "Connecting",
|
|
8070
8520
|
team: []
|
|
8071
8521
|
};
|
|
8072
|
-
return /* @__PURE__ */
|
|
8073
|
-
spotlight !== null && /* @__PURE__ */
|
|
8074
|
-
/* @__PURE__ */
|
|
8522
|
+
return /* @__PURE__ */ jsxs25(Fragment33, { children: [
|
|
8523
|
+
spotlight !== null && /* @__PURE__ */ jsx41(WidgetSpotlight, { selector: spotlight.selector }, spotlight.key),
|
|
8524
|
+
/* @__PURE__ */ jsx41(
|
|
8075
8525
|
SupportLauncher,
|
|
8076
8526
|
{
|
|
8077
8527
|
showBadge: showBranding,
|
|
@@ -8089,6 +8539,7 @@ function MedianLauncher({
|
|
|
8089
8539
|
rating,
|
|
8090
8540
|
offer,
|
|
8091
8541
|
onFollow: onNavigate === void 0 ? void 0 : follow,
|
|
8542
|
+
screenRequest,
|
|
8092
8543
|
unreadCount,
|
|
8093
8544
|
teaser,
|
|
8094
8545
|
onDismissTeaser: dismissTeaser,
|
|
@@ -8158,7 +8609,7 @@ function mountMedian({
|
|
|
8158
8609
|
}
|
|
8159
8610
|
|
|
8160
8611
|
// ../../apps/web/src/components/support-widget/sdk/mount.tsx
|
|
8161
|
-
import { jsx as
|
|
8612
|
+
import { jsx as jsx42 } from "react/jsx-runtime";
|
|
8162
8613
|
function mountMedianSupport(options) {
|
|
8163
8614
|
return mountMedian({
|
|
8164
8615
|
caller: "mountMedianSupport",
|
|
@@ -8166,18 +8617,18 @@ function mountMedianSupport(options) {
|
|
|
8166
8617
|
marker: "medianSupport",
|
|
8167
8618
|
into: null,
|
|
8168
8619
|
options,
|
|
8169
|
-
render: (current2) => /* @__PURE__ */
|
|
8620
|
+
render: (current2) => /* @__PURE__ */ jsx42(MedianSupport, { ...current2 })
|
|
8170
8621
|
});
|
|
8171
8622
|
}
|
|
8172
8623
|
|
|
8173
8624
|
// ../../apps/web/src/components/support-widget/sdk/median-support-modal.tsx
|
|
8174
|
-
import { jsx as
|
|
8625
|
+
import { jsx as jsx43 } from "react/jsx-runtime";
|
|
8175
8626
|
function MedianSupportModal(props) {
|
|
8176
|
-
return /* @__PURE__ */
|
|
8627
|
+
return /* @__PURE__ */ jsx43(MedianSupportPreview, { ...props, presentation: "modal" });
|
|
8177
8628
|
}
|
|
8178
8629
|
|
|
8179
8630
|
// ../../apps/web/src/components/support-widget/sdk/mount-support-modal.tsx
|
|
8180
|
-
import { jsx as
|
|
8631
|
+
import { jsx as jsx44 } from "react/jsx-runtime";
|
|
8181
8632
|
function mountMedianSupportModal(options) {
|
|
8182
8633
|
return mountMedian({
|
|
8183
8634
|
caller: "mountMedianSupportModal",
|
|
@@ -8185,16 +8636,16 @@ function mountMedianSupportModal(options) {
|
|
|
8185
8636
|
marker: "medianSupportModal",
|
|
8186
8637
|
into: null,
|
|
8187
8638
|
options,
|
|
8188
|
-
render: (current2) => /* @__PURE__ */
|
|
8639
|
+
render: (current2) => /* @__PURE__ */ jsx44(MedianSupportModal, { ...current2 })
|
|
8189
8640
|
});
|
|
8190
8641
|
}
|
|
8191
8642
|
|
|
8192
8643
|
// ../../apps/web/src/components/support-widget/sdk/median-feedback.tsx
|
|
8193
8644
|
import {
|
|
8194
|
-
useCallback as
|
|
8645
|
+
useCallback as useCallback17,
|
|
8195
8646
|
useEffect as useEffect29,
|
|
8196
8647
|
useRef as useRef24,
|
|
8197
|
-
useState as
|
|
8648
|
+
useState as useState30
|
|
8198
8649
|
} from "react";
|
|
8199
8650
|
|
|
8200
8651
|
// ../backend/convex/shared/feedback.ts
|
|
@@ -8207,7 +8658,7 @@ var MAX_REPORT_IMAGES = 6;
|
|
|
8207
8658
|
import {
|
|
8208
8659
|
useEffect as useEffect28,
|
|
8209
8660
|
useRef as useRef23,
|
|
8210
|
-
useState as
|
|
8661
|
+
useState as useState28
|
|
8211
8662
|
} from "react";
|
|
8212
8663
|
|
|
8213
8664
|
// ../../apps/web/src/components/support-widget/feedback/feedback-popover.tsx
|
|
@@ -8215,7 +8666,7 @@ import { useEffect as useEffect27, useRef as useRef22 } from "react";
|
|
|
8215
8666
|
import { createPortal as createPortal3 } from "react-dom";
|
|
8216
8667
|
|
|
8217
8668
|
// ../../apps/web/src/components/support-widget/feedback/use-anchor.ts
|
|
8218
|
-
import { useLayoutEffect as useLayoutEffect11, useState as
|
|
8669
|
+
import { useLayoutEffect as useLayoutEffect11, useState as useState27 } from "react";
|
|
8219
8670
|
var GAP2 = 8;
|
|
8220
8671
|
var MARGIN2 = 16;
|
|
8221
8672
|
function findAnchor(selector) {
|
|
@@ -8235,7 +8686,7 @@ function useAnchor({
|
|
|
8235
8686
|
panelRef,
|
|
8236
8687
|
isOpen
|
|
8237
8688
|
}) {
|
|
8238
|
-
const [side, setSide] =
|
|
8689
|
+
const [side, setSide] = useState27("bottom");
|
|
8239
8690
|
useLayoutEffect11(() => {
|
|
8240
8691
|
if (!isOpen) return;
|
|
8241
8692
|
let frame = 0;
|
|
@@ -8290,7 +8741,7 @@ function clamp3(value, low, high) {
|
|
|
8290
8741
|
}
|
|
8291
8742
|
|
|
8292
8743
|
// ../../apps/web/src/components/support-widget/feedback/feedback-popover.tsx
|
|
8293
|
-
import { jsx as
|
|
8744
|
+
import { jsx as jsx45 } from "react/jsx-runtime";
|
|
8294
8745
|
var LAYER3 = 2147483e3;
|
|
8295
8746
|
var AUTOFOCUS_ATTRIBUTE = "data-median-autofocus";
|
|
8296
8747
|
var MOTION2 = "transition-[opacity,scale,translate] motion-reduce:transition-none";
|
|
@@ -8347,7 +8798,7 @@ function FeedbackPopover({
|
|
|
8347
8798
|
}, [isOpen, triggerRef]);
|
|
8348
8799
|
if (!isHydrated) return null;
|
|
8349
8800
|
return createPortal3(
|
|
8350
|
-
/* @__PURE__ */
|
|
8801
|
+
/* @__PURE__ */ jsx45(
|
|
8351
8802
|
"div",
|
|
8352
8803
|
{
|
|
8353
8804
|
ref: panelRef,
|
|
@@ -8385,7 +8836,7 @@ function FeedbackPopover({
|
|
|
8385
8836
|
}
|
|
8386
8837
|
|
|
8387
8838
|
// ../../apps/web/src/components/support-widget/feedback/feedback-panel.tsx
|
|
8388
|
-
import { Fragment as
|
|
8839
|
+
import { Fragment as Fragment34, jsx as jsx46, jsxs as jsxs26 } from "react/jsx-runtime";
|
|
8389
8840
|
var THANKS_MS2 = 1600;
|
|
8390
8841
|
function FeedbackPanel({
|
|
8391
8842
|
onSubmit,
|
|
@@ -8398,9 +8849,9 @@ function FeedbackPanel({
|
|
|
8398
8849
|
placeholder = "Tell us what could be better.",
|
|
8399
8850
|
className
|
|
8400
8851
|
}) {
|
|
8401
|
-
const [draft, setDraft] =
|
|
8402
|
-
const [isSending, setSending] =
|
|
8403
|
-
const [isSent, setSent] =
|
|
8852
|
+
const [draft, setDraft] = useState28("");
|
|
8853
|
+
const [isSending, setSending] = useState28(false);
|
|
8854
|
+
const [isSent, setSent] = useState28(false);
|
|
8404
8855
|
const fileInputRef = useRef23(null);
|
|
8405
8856
|
const images = useAttachmentDrafts({
|
|
8406
8857
|
accept: "image",
|
|
@@ -8436,7 +8887,7 @@ function FeedbackPanel({
|
|
|
8436
8887
|
event.preventDefault();
|
|
8437
8888
|
void send();
|
|
8438
8889
|
}
|
|
8439
|
-
return /* @__PURE__ */
|
|
8890
|
+
return /* @__PURE__ */ jsxs26(
|
|
8440
8891
|
"section",
|
|
8441
8892
|
{
|
|
8442
8893
|
"aria-label": title,
|
|
@@ -8448,12 +8899,12 @@ function FeedbackPanel({
|
|
|
8448
8899
|
className
|
|
8449
8900
|
),
|
|
8450
8901
|
children: [
|
|
8451
|
-
/* @__PURE__ */
|
|
8452
|
-
/* @__PURE__ */
|
|
8453
|
-
/* @__PURE__ */
|
|
8454
|
-
/* @__PURE__ */
|
|
8902
|
+
/* @__PURE__ */ jsxs26("header", { className: "flex items-start gap-2", children: [
|
|
8903
|
+
/* @__PURE__ */ jsxs26("div", { className: "flex min-w-0 flex-1 flex-col", children: [
|
|
8904
|
+
/* @__PURE__ */ jsx46("h2", { className: "truncate text-sm font-semibold tracking-tight", children: title }),
|
|
8905
|
+
/* @__PURE__ */ jsx46("p", { className: "text-xs text-muted-foreground", children: description })
|
|
8455
8906
|
] }),
|
|
8456
|
-
onClose && /* @__PURE__ */
|
|
8907
|
+
onClose && /* @__PURE__ */ jsx46(
|
|
8457
8908
|
WidgetButton,
|
|
8458
8909
|
{
|
|
8459
8910
|
type: "button",
|
|
@@ -8462,13 +8913,13 @@ function FeedbackPanel({
|
|
|
8462
8913
|
onClick: onClose,
|
|
8463
8914
|
"aria-label": "Close feedback",
|
|
8464
8915
|
className: "-mt-0.5 -mr-1 shrink-0 text-muted-foreground",
|
|
8465
|
-
children: /* @__PURE__ */
|
|
8916
|
+
children: /* @__PURE__ */ jsx46(X, {})
|
|
8466
8917
|
}
|
|
8467
8918
|
)
|
|
8468
8919
|
] }),
|
|
8469
|
-
/* @__PURE__ */
|
|
8470
|
-
/* @__PURE__ */
|
|
8471
|
-
/* @__PURE__ */
|
|
8920
|
+
/* @__PURE__ */ jsxs26("div", { className: "grid", children: [
|
|
8921
|
+
/* @__PURE__ */ jsx46(Collapse, { isOpen: !isSent, children: /* @__PURE__ */ jsxs26("div", { className: "flex flex-col gap-1.5", children: [
|
|
8922
|
+
/* @__PURE__ */ jsx46(
|
|
8472
8923
|
Textarea,
|
|
8473
8924
|
{
|
|
8474
8925
|
rows: 3,
|
|
@@ -8488,7 +8939,7 @@ function FeedbackPanel({
|
|
|
8488
8939
|
)
|
|
8489
8940
|
}
|
|
8490
8941
|
),
|
|
8491
|
-
images.drafts.length > 0 && /* @__PURE__ */
|
|
8942
|
+
images.drafts.length > 0 && /* @__PURE__ */ jsx46("div", { className: "flex flex-wrap gap-1.5", children: images.drafts.map((draft2) => /* @__PURE__ */ jsx46(
|
|
8492
8943
|
AttachmentDraftChip,
|
|
8493
8944
|
{
|
|
8494
8945
|
draft: draft2,
|
|
@@ -8496,17 +8947,17 @@ function FeedbackPanel({
|
|
|
8496
8947
|
},
|
|
8497
8948
|
draft2.id
|
|
8498
8949
|
)) }),
|
|
8499
|
-
notice && /* @__PURE__ */
|
|
8950
|
+
notice && /* @__PURE__ */ jsx46("p", { className: "animate-in px-0.5 text-xs text-destructive fade-in duration-150", children: notice })
|
|
8500
8951
|
] }) }),
|
|
8501
|
-
/* @__PURE__ */
|
|
8502
|
-
/* @__PURE__ */
|
|
8952
|
+
/* @__PURE__ */ jsx46(Collapse, { isOpen: isSent, children: /* @__PURE__ */ jsxs26("div", { className: "flex items-center justify-center gap-2 py-4 text-sm font-medium", children: [
|
|
8953
|
+
/* @__PURE__ */ jsx46("span", { className: "grid size-5 shrink-0 place-items-center rounded-full bg-primary text-primary-foreground", children: /* @__PURE__ */ jsx46(Check, { className: "size-3" }) }),
|
|
8503
8954
|
"Thanks for your feedback."
|
|
8504
8955
|
] }) })
|
|
8505
8956
|
] }),
|
|
8506
|
-
/* @__PURE__ */
|
|
8507
|
-
showBadge && /* @__PURE__ */
|
|
8508
|
-
!isSent && /* @__PURE__ */
|
|
8509
|
-
/* @__PURE__ */
|
|
8957
|
+
/* @__PURE__ */ jsxs26("div", { className: "flex min-h-8 items-center gap-2", children: [
|
|
8958
|
+
showBadge && /* @__PURE__ */ jsx46(PoweredByMedian, { className: "justify-start" }),
|
|
8959
|
+
!isSent && /* @__PURE__ */ jsxs26(Fragment34, { children: [
|
|
8960
|
+
/* @__PURE__ */ jsx46(
|
|
8510
8961
|
"input",
|
|
8511
8962
|
{
|
|
8512
8963
|
ref: fileInputRef,
|
|
@@ -8518,7 +8969,7 @@ function FeedbackPanel({
|
|
|
8518
8969
|
className: "sr-only"
|
|
8519
8970
|
}
|
|
8520
8971
|
),
|
|
8521
|
-
/* @__PURE__ */
|
|
8972
|
+
/* @__PURE__ */ jsx46(
|
|
8522
8973
|
WidgetButton,
|
|
8523
8974
|
{
|
|
8524
8975
|
type: "button",
|
|
@@ -8528,10 +8979,10 @@ function FeedbackPanel({
|
|
|
8528
8979
|
onClick: () => fileInputRef.current?.click(),
|
|
8529
8980
|
"aria-label": "Add a picture",
|
|
8530
8981
|
className: "ml-auto shrink-0 rounded-full text-muted-foreground",
|
|
8531
|
-
children: /* @__PURE__ */
|
|
8982
|
+
children: /* @__PURE__ */ jsx46(ImageSquare, {})
|
|
8532
8983
|
}
|
|
8533
8984
|
),
|
|
8534
|
-
/* @__PURE__ */
|
|
8985
|
+
/* @__PURE__ */ jsxs26(
|
|
8535
8986
|
WidgetButton,
|
|
8536
8987
|
{
|
|
8537
8988
|
type: "button",
|
|
@@ -8540,7 +8991,7 @@ function FeedbackPanel({
|
|
|
8540
8991
|
onClick: () => void send(),
|
|
8541
8992
|
className: "relative shrink-0 rounded-full px-3",
|
|
8542
8993
|
children: [
|
|
8543
|
-
/* @__PURE__ */
|
|
8994
|
+
/* @__PURE__ */ jsx46(
|
|
8544
8995
|
"span",
|
|
8545
8996
|
{
|
|
8546
8997
|
className: cn(
|
|
@@ -8550,7 +9001,7 @@ function FeedbackPanel({
|
|
|
8550
9001
|
children: "Send"
|
|
8551
9002
|
}
|
|
8552
9003
|
),
|
|
8553
|
-
isSending && /* @__PURE__ */
|
|
9004
|
+
isSending && /* @__PURE__ */ jsx46(
|
|
8554
9005
|
ArrowsClockwise,
|
|
8555
9006
|
{
|
|
8556
9007
|
"aria-hidden": true,
|
|
@@ -8611,7 +9062,7 @@ function useRegisterMedianFeedback() {
|
|
|
8611
9062
|
}
|
|
8612
9063
|
|
|
8613
9064
|
// ../../apps/web/src/components/support-widget/sdk/use-feedback-note.ts
|
|
8614
|
-
import { useCallback as
|
|
9065
|
+
import { useCallback as useCallback16, useState as useState29, useSyncExternalStore as useSyncExternalStore16 } from "react";
|
|
8615
9066
|
var REFUSALS = {
|
|
8616
9067
|
off: "Feedback is currently unavailable. Try again later.",
|
|
8617
9068
|
empty: "Enter your feedback before sending."
|
|
@@ -8626,14 +9077,14 @@ function useFeedbackNote({
|
|
|
8626
9077
|
}) {
|
|
8627
9078
|
const sessionId = useSyncExternalStore16(
|
|
8628
9079
|
subscribeSession,
|
|
8629
|
-
|
|
9080
|
+
useCallback16(() => getOrCreateSessionId(apiKey), [apiKey]),
|
|
8630
9081
|
() => null
|
|
8631
9082
|
);
|
|
8632
9083
|
const submitNote = useWidgetMutation(api.feedback.submitV2);
|
|
8633
9084
|
const getUploadUrl = useWidgetMutation(api.widget.generateUploadUrlV2);
|
|
8634
9085
|
const takeDiagnostics = useDiagnostics(diagnostics, appState);
|
|
8635
|
-
const [notice, setNotice] =
|
|
8636
|
-
const submit =
|
|
9086
|
+
const [notice, setNotice] = useState29(null);
|
|
9087
|
+
const submit = useCallback16(
|
|
8637
9088
|
async (body, images = []) => {
|
|
8638
9089
|
setNotice(null);
|
|
8639
9090
|
if (sessionId === null) {
|
|
@@ -8698,10 +9149,10 @@ function useFeedbackNote({
|
|
|
8698
9149
|
}
|
|
8699
9150
|
|
|
8700
9151
|
// ../../apps/web/src/components/support-widget/sdk/median-feedback.tsx
|
|
8701
|
-
import { Fragment as
|
|
9152
|
+
import { Fragment as Fragment35, jsx as jsx47, jsxs as jsxs27 } from "react/jsx-runtime";
|
|
8702
9153
|
var DEFAULT_WIDTH2 = "20rem";
|
|
8703
9154
|
function MedianFeedback(props) {
|
|
8704
|
-
return /* @__PURE__ */
|
|
9155
|
+
return /* @__PURE__ */ jsx47(MedianErrorBoundary, { component: "MedianFeedback", children: /* @__PURE__ */ jsx47(FeedbackIdentity, { ...props }) });
|
|
8705
9156
|
}
|
|
8706
9157
|
function FeedbackIdentity({
|
|
8707
9158
|
apiKey,
|
|
@@ -8714,7 +9165,7 @@ function FeedbackIdentity({
|
|
|
8714
9165
|
const key = apiKey ?? resolved.apiKey;
|
|
8715
9166
|
const person = useSignedInUser(user ?? resolved.user);
|
|
8716
9167
|
if (key === void 0) return null;
|
|
8717
|
-
return /* @__PURE__ */
|
|
9168
|
+
return /* @__PURE__ */ jsx47(MedianConnection, { what: "feedback panel", children: /* @__PURE__ */ jsx47(Feedback, { ...rest, apiKey: key, ...person ? { user: person } : {} }) });
|
|
8718
9169
|
}
|
|
8719
9170
|
function Feedback({
|
|
8720
9171
|
apiKey,
|
|
@@ -8750,20 +9201,20 @@ function Feedback({
|
|
|
8750
9201
|
...appState ? { appState } : {}
|
|
8751
9202
|
});
|
|
8752
9203
|
const showBranding = useMedianBranding(apiKey);
|
|
8753
|
-
const close =
|
|
8754
|
-
const [attempt, setAttempt] =
|
|
9204
|
+
const close = useCallback17(() => setOpen(false), [setOpen]);
|
|
9205
|
+
const [attempt, setAttempt] = useState30(0);
|
|
8755
9206
|
const hasSent = useRef24(false);
|
|
8756
9207
|
useEffect29(() => {
|
|
8757
9208
|
if (!isOpen || !hasSent.current) return;
|
|
8758
9209
|
hasSent.current = false;
|
|
8759
9210
|
setAttempt((count2) => count2 + 1);
|
|
8760
9211
|
}, [isOpen]);
|
|
8761
|
-
return /* @__PURE__ */
|
|
9212
|
+
return /* @__PURE__ */ jsxs27(Fragment35, { children: [
|
|
8762
9213
|
children !== void 0 && // An inline span rather than a clone of whatever was passed: the
|
|
8763
9214
|
// host's trigger keeps its own props, its own ref and its own
|
|
8764
9215
|
// styles, and the click is caught on the way past. `display:
|
|
8765
9216
|
// contents` would lose the rectangle the panel is measured against.
|
|
8766
|
-
/* @__PURE__ */
|
|
9217
|
+
/* @__PURE__ */ jsx47(
|
|
8767
9218
|
"span",
|
|
8768
9219
|
{
|
|
8769
9220
|
ref: triggerRef,
|
|
@@ -8772,7 +9223,7 @@ function Feedback({
|
|
|
8772
9223
|
children
|
|
8773
9224
|
}
|
|
8774
9225
|
),
|
|
8775
|
-
/* @__PURE__ */
|
|
9226
|
+
/* @__PURE__ */ jsx47(
|
|
8776
9227
|
FeedbackPopover,
|
|
8777
9228
|
{
|
|
8778
9229
|
isOpen,
|
|
@@ -8780,7 +9231,7 @@ function Feedback({
|
|
|
8780
9231
|
triggerRef,
|
|
8781
9232
|
...anchor !== void 0 ? { anchor } : {},
|
|
8782
9233
|
width,
|
|
8783
|
-
children: /* @__PURE__ */
|
|
9234
|
+
children: /* @__PURE__ */ jsx47(
|
|
8784
9235
|
FeedbackPanel,
|
|
8785
9236
|
{
|
|
8786
9237
|
showBadge: showBranding,
|
|
@@ -8803,7 +9254,7 @@ function Feedback({
|
|
|
8803
9254
|
}
|
|
8804
9255
|
|
|
8805
9256
|
// ../../apps/web/src/components/support-widget/sdk/mount-feedback.tsx
|
|
8806
|
-
import { jsx as
|
|
9257
|
+
import { jsx as jsx48 } from "react/jsx-runtime";
|
|
8807
9258
|
function mountMedianFeedback(options) {
|
|
8808
9259
|
return mountMedian({
|
|
8809
9260
|
caller: "mountMedianFeedback",
|
|
@@ -8811,25 +9262,25 @@ function mountMedianFeedback(options) {
|
|
|
8811
9262
|
marker: "medianFeedback",
|
|
8812
9263
|
into: null,
|
|
8813
9264
|
options,
|
|
8814
|
-
render: (current2) => /* @__PURE__ */
|
|
9265
|
+
render: (current2) => /* @__PURE__ */ jsx48(MedianFeedback, { ...current2 })
|
|
8815
9266
|
});
|
|
8816
9267
|
}
|
|
8817
9268
|
|
|
8818
9269
|
// ../../apps/web/src/components/support-widget/sdk/median-contact-form.tsx
|
|
8819
|
-
import { useEffect as useEffect31, useMemo as
|
|
9270
|
+
import { useEffect as useEffect31, useMemo as useMemo6 } from "react";
|
|
8820
9271
|
|
|
8821
9272
|
// ../../apps/web/src/components/support-widget/contact/contact-form.tsx
|
|
8822
9273
|
import {
|
|
8823
9274
|
useEffect as useEffect30,
|
|
8824
9275
|
useId,
|
|
8825
|
-
useMemo as
|
|
9276
|
+
useMemo as useMemo4,
|
|
8826
9277
|
useRef as useRef26,
|
|
8827
|
-
useState as
|
|
9278
|
+
useState as useState32
|
|
8828
9279
|
} from "react";
|
|
8829
9280
|
|
|
8830
9281
|
// ../../apps/web/src/components/support-widget/contact/contact-field.tsx
|
|
8831
|
-
import { useState as
|
|
8832
|
-
import { jsx as
|
|
9282
|
+
import { useState as useState31 } from "react";
|
|
9283
|
+
import { jsx as jsx49, jsxs as jsxs28 } from "react/jsx-runtime";
|
|
8833
9284
|
var LINE_MAX_LENGTH = 200;
|
|
8834
9285
|
var SHELL = cn(
|
|
8835
9286
|
WIDGET_TEXT_FIELD_SHELL,
|
|
@@ -8846,7 +9297,7 @@ function ContactField({
|
|
|
8846
9297
|
onChange,
|
|
8847
9298
|
onSubmit
|
|
8848
9299
|
}) {
|
|
8849
|
-
const [held2, setHeld] =
|
|
9300
|
+
const [held2, setHeld] = useState31(error);
|
|
8850
9301
|
if (error !== null && error !== held2) setHeld(error);
|
|
8851
9302
|
const shown = error ?? held2;
|
|
8852
9303
|
const errorId = `${id}-error`;
|
|
@@ -8864,19 +9315,19 @@ function ContactField({
|
|
|
8864
9315
|
event.preventDefault();
|
|
8865
9316
|
onSubmit?.();
|
|
8866
9317
|
}
|
|
8867
|
-
return /* @__PURE__ */
|
|
8868
|
-
/* @__PURE__ */
|
|
9318
|
+
return /* @__PURE__ */ jsxs28("div", { className: "flex flex-col", children: [
|
|
9319
|
+
/* @__PURE__ */ jsxs28(
|
|
8869
9320
|
"label",
|
|
8870
9321
|
{
|
|
8871
9322
|
htmlFor: id,
|
|
8872
9323
|
className: "flex items-baseline gap-2 px-1 pb-1.5 text-sm font-medium",
|
|
8873
9324
|
children: [
|
|
8874
9325
|
field.label,
|
|
8875
|
-
!field.required && /* @__PURE__ */
|
|
9326
|
+
!field.required && /* @__PURE__ */ jsx49("span", { className: "text-xs font-normal text-muted-foreground", children: "Optional" })
|
|
8876
9327
|
]
|
|
8877
9328
|
}
|
|
8878
9329
|
),
|
|
8879
|
-
field.type === "textarea" ? /* @__PURE__ */
|
|
9330
|
+
field.type === "textarea" ? /* @__PURE__ */ jsx49(
|
|
8880
9331
|
Textarea,
|
|
8881
9332
|
{
|
|
8882
9333
|
...control,
|
|
@@ -8887,8 +9338,8 @@ function ContactField({
|
|
|
8887
9338
|
onKeyDown: handleKeyDown,
|
|
8888
9339
|
className: cn(SHELL, PARAGRAPH)
|
|
8889
9340
|
}
|
|
8890
|
-
) : field.type === "select" ? /* @__PURE__ */
|
|
8891
|
-
/* @__PURE__ */
|
|
9341
|
+
) : field.type === "select" ? /* @__PURE__ */ jsxs28("div", { className: "relative", children: [
|
|
9342
|
+
/* @__PURE__ */ jsxs28(
|
|
8892
9343
|
"select",
|
|
8893
9344
|
{
|
|
8894
9345
|
...control,
|
|
@@ -8901,19 +9352,19 @@ function ContactField({
|
|
|
8901
9352
|
value === "" && "text-muted-foreground"
|
|
8902
9353
|
),
|
|
8903
9354
|
children: [
|
|
8904
|
-
/* @__PURE__ */
|
|
8905
|
-
field.options.map((option) => /* @__PURE__ */
|
|
9355
|
+
/* @__PURE__ */ jsx49("option", { value: "", children: field.placeholder ?? "Choose one" }),
|
|
9356
|
+
field.options.map((option) => /* @__PURE__ */ jsx49("option", { value: option, children: option }, option))
|
|
8906
9357
|
]
|
|
8907
9358
|
}
|
|
8908
9359
|
),
|
|
8909
|
-
/* @__PURE__ */
|
|
9360
|
+
/* @__PURE__ */ jsx49(
|
|
8910
9361
|
CaretDown,
|
|
8911
9362
|
{
|
|
8912
9363
|
"aria-hidden": true,
|
|
8913
9364
|
className: "pointer-events-none absolute top-1/2 right-4 size-4 -translate-y-1/2 text-muted-foreground"
|
|
8914
9365
|
}
|
|
8915
9366
|
)
|
|
8916
|
-
] }) : /* @__PURE__ */
|
|
9367
|
+
] }) : /* @__PURE__ */ jsx49(
|
|
8917
9368
|
"input",
|
|
8918
9369
|
{
|
|
8919
9370
|
...control,
|
|
@@ -8926,7 +9377,7 @@ function ContactField({
|
|
|
8926
9377
|
className: cn(SHELL, LINE)
|
|
8927
9378
|
}
|
|
8928
9379
|
),
|
|
8929
|
-
/* @__PURE__ */
|
|
9380
|
+
/* @__PURE__ */ jsx49(Collapse, { isOpen: error !== null, children: /* @__PURE__ */ jsx49("p", { id: errorId, className: "px-1 pt-1.5 text-sm text-destructive", children: shown }) })
|
|
8930
9381
|
] });
|
|
8931
9382
|
}
|
|
8932
9383
|
|
|
@@ -9055,7 +9506,7 @@ function fieldComplaints(fields) {
|
|
|
9055
9506
|
|
|
9056
9507
|
// ../../apps/web/src/components/support-widget/contact/sent-mark.tsx
|
|
9057
9508
|
import { useLayoutEffect as useLayoutEffect12, useRef as useRef25 } from "react";
|
|
9058
|
-
import { jsx as
|
|
9509
|
+
import { jsx as jsx50, jsxs as jsxs29 } from "react/jsx-runtime";
|
|
9059
9510
|
var EASE_OUT = "cubic-bezier(0.22, 1, 0.36, 1)";
|
|
9060
9511
|
var TRAVEL_MS = 550;
|
|
9061
9512
|
var DRAW_LEAD_MS = 150;
|
|
@@ -9130,13 +9581,13 @@ function SentMark({
|
|
|
9130
9581
|
for (const animation of animations) animation.cancel();
|
|
9131
9582
|
};
|
|
9132
9583
|
}, [from]);
|
|
9133
|
-
return /* @__PURE__ */
|
|
9584
|
+
return /* @__PURE__ */ jsxs29(
|
|
9134
9585
|
"span",
|
|
9135
9586
|
{
|
|
9136
9587
|
ref: frame,
|
|
9137
9588
|
className: cn("relative grid size-16 place-items-center", className),
|
|
9138
9589
|
children: [
|
|
9139
|
-
/* @__PURE__ */
|
|
9590
|
+
/* @__PURE__ */ jsx50(
|
|
9140
9591
|
"span",
|
|
9141
9592
|
{
|
|
9142
9593
|
ref: ring,
|
|
@@ -9144,7 +9595,7 @@ function SentMark({
|
|
|
9144
9595
|
className: "absolute inset-0 rounded-2xl border-2 border-primary opacity-0"
|
|
9145
9596
|
}
|
|
9146
9597
|
),
|
|
9147
|
-
/* @__PURE__ */
|
|
9598
|
+
/* @__PURE__ */ jsx50(
|
|
9148
9599
|
"span",
|
|
9149
9600
|
{
|
|
9150
9601
|
ref: square,
|
|
@@ -9152,7 +9603,7 @@ function SentMark({
|
|
|
9152
9603
|
"absolute inset-0 grid place-items-center rounded-2xl bg-primary text-primary-foreground",
|
|
9153
9604
|
from === null && "animate-in duration-500 ease-spring fade-in-0 zoom-in-50 motion-reduce:animate-none"
|
|
9154
9605
|
),
|
|
9155
|
-
children: /* @__PURE__ */
|
|
9606
|
+
children: /* @__PURE__ */ jsx50(
|
|
9156
9607
|
"svg",
|
|
9157
9608
|
{
|
|
9158
9609
|
viewBox: "0 0 24 24",
|
|
@@ -9163,7 +9614,7 @@ function SentMark({
|
|
|
9163
9614
|
strokeWidth: 2.5,
|
|
9164
9615
|
strokeLinecap: "round",
|
|
9165
9616
|
strokeLinejoin: "round",
|
|
9166
|
-
children: /* @__PURE__ */
|
|
9617
|
+
children: /* @__PURE__ */ jsx50("path", { ref: tick, d: "M5 12.5 10 17.5 19 7" })
|
|
9167
9618
|
}
|
|
9168
9619
|
)
|
|
9169
9620
|
}
|
|
@@ -9174,7 +9625,7 @@ function SentMark({
|
|
|
9174
9625
|
}
|
|
9175
9626
|
|
|
9176
9627
|
// ../../apps/web/src/components/support-widget/contact/contact-form.tsx
|
|
9177
|
-
import { jsx as
|
|
9628
|
+
import { jsx as jsx51, jsxs as jsxs30 } from "react/jsx-runtime";
|
|
9178
9629
|
var EMAIL_PATTERN2 = /^[^\s@]+@[^\s@]+\.[^\s@]+$/;
|
|
9179
9630
|
var FORM_SWAP = "transition-[opacity,translate] duration-250 ease-out-quint motion-reduce:transition-none";
|
|
9180
9631
|
var THANKS_SWAP = "transition-opacity ease-out motion-reduce:transition-none";
|
|
@@ -9217,20 +9668,20 @@ function ContactForm({
|
|
|
9217
9668
|
showBadge = true,
|
|
9218
9669
|
className
|
|
9219
9670
|
}) {
|
|
9220
|
-
const fields =
|
|
9671
|
+
const fields = useMemo4(() => resolveFields(hostFields), [hostFields]);
|
|
9221
9672
|
const prefix = useId();
|
|
9222
9673
|
const formRef = useRef26(null);
|
|
9223
9674
|
const sendRef = useRef26(null);
|
|
9224
|
-
const [values, setValues] =
|
|
9675
|
+
const [values, setValues] = useState32(
|
|
9225
9676
|
() => startingValues(fields, initialValues)
|
|
9226
9677
|
);
|
|
9227
|
-
const [errors, setErrors] =
|
|
9228
|
-
const [isSending, setSending] =
|
|
9229
|
-
const [sent, setSent] =
|
|
9678
|
+
const [errors, setErrors] = useState32({});
|
|
9679
|
+
const [isSending, setSending] = useState32(false);
|
|
9680
|
+
const [sent, setSent] = useState32(null);
|
|
9230
9681
|
const isSent = sent !== null;
|
|
9231
9682
|
const knownEmail = initialValues?.email;
|
|
9232
9683
|
const knownName = initialValues?.name;
|
|
9233
|
-
const [known, setKnown] =
|
|
9684
|
+
const [known, setKnown] = useState32({ email: knownEmail, name: knownName });
|
|
9234
9685
|
if (known.email !== knownEmail || known.name !== knownName) {
|
|
9235
9686
|
setKnown({ email: knownEmail, name: knownName });
|
|
9236
9687
|
setValues((current2) => {
|
|
@@ -9240,7 +9691,7 @@ function ContactForm({
|
|
|
9240
9691
|
return next;
|
|
9241
9692
|
});
|
|
9242
9693
|
}
|
|
9243
|
-
const [focusRequest, setFocusRequest] =
|
|
9694
|
+
const [focusRequest, setFocusRequest] = useState32(0);
|
|
9244
9695
|
useEffect30(() => {
|
|
9245
9696
|
if (focusRequest === 0) return;
|
|
9246
9697
|
formRef.current?.querySelector('[aria-invalid="true"]')?.focus({ preventScroll: false });
|
|
@@ -9292,7 +9743,7 @@ function ContactForm({
|
|
|
9292
9743
|
event.preventDefault();
|
|
9293
9744
|
void send();
|
|
9294
9745
|
}
|
|
9295
|
-
return /* @__PURE__ */
|
|
9746
|
+
return /* @__PURE__ */ jsxs30(
|
|
9296
9747
|
"section",
|
|
9297
9748
|
{
|
|
9298
9749
|
"aria-label": title,
|
|
@@ -9302,12 +9753,12 @@ function ContactForm({
|
|
|
9302
9753
|
className
|
|
9303
9754
|
),
|
|
9304
9755
|
children: [
|
|
9305
|
-
/* @__PURE__ */
|
|
9306
|
-
/* @__PURE__ */
|
|
9307
|
-
/* @__PURE__ */
|
|
9756
|
+
/* @__PURE__ */ jsxs30("header", { className: "flex flex-col gap-0.5 pb-4", children: [
|
|
9757
|
+
/* @__PURE__ */ jsx51("h2", { className: "text-lg font-semibold tracking-tight", children: title }),
|
|
9758
|
+
/* @__PURE__ */ jsx51("p", { className: "text-sm text-muted-foreground", children: description })
|
|
9308
9759
|
] }),
|
|
9309
|
-
/* @__PURE__ */
|
|
9310
|
-
/* @__PURE__ */
|
|
9760
|
+
/* @__PURE__ */ jsxs30("div", { className: "grid", children: [
|
|
9761
|
+
/* @__PURE__ */ jsxs30(
|
|
9311
9762
|
"form",
|
|
9312
9763
|
{
|
|
9313
9764
|
ref: formRef,
|
|
@@ -9320,7 +9771,7 @@ function ContactForm({
|
|
|
9320
9771
|
isSent && "pointer-events-none -translate-y-1.5 opacity-0"
|
|
9321
9772
|
),
|
|
9322
9773
|
children: [
|
|
9323
|
-
fields.map((field) => /* @__PURE__ */
|
|
9774
|
+
fields.map((field) => /* @__PURE__ */ jsx51(
|
|
9324
9775
|
ContactField,
|
|
9325
9776
|
{
|
|
9326
9777
|
field,
|
|
@@ -9333,10 +9784,10 @@ function ContactForm({
|
|
|
9333
9784
|
},
|
|
9334
9785
|
field.name
|
|
9335
9786
|
)),
|
|
9336
|
-
notice && /* @__PURE__ */
|
|
9337
|
-
/* @__PURE__ */
|
|
9338
|
-
showBadge && /* @__PURE__ */
|
|
9339
|
-
/* @__PURE__ */
|
|
9787
|
+
notice && /* @__PURE__ */ jsx51("p", { className: "animate-in px-1 text-sm text-destructive fade-in duration-150", children: notice }),
|
|
9788
|
+
/* @__PURE__ */ jsxs30("div", { className: "flex min-h-10 flex-wrap items-center gap-3 pt-1", children: [
|
|
9789
|
+
showBadge && /* @__PURE__ */ jsx51(PoweredByMedian, { className: "justify-start" }),
|
|
9790
|
+
/* @__PURE__ */ jsxs30(
|
|
9340
9791
|
WidgetButton,
|
|
9341
9792
|
{
|
|
9342
9793
|
ref: sendRef,
|
|
@@ -9353,7 +9804,7 @@ function ContactForm({
|
|
|
9353
9804
|
isSent && "opacity-0 transition-none"
|
|
9354
9805
|
),
|
|
9355
9806
|
children: [
|
|
9356
|
-
/* @__PURE__ */
|
|
9807
|
+
/* @__PURE__ */ jsx51(
|
|
9357
9808
|
"span",
|
|
9358
9809
|
{
|
|
9359
9810
|
className: cn(
|
|
@@ -9363,7 +9814,7 @@ function ContactForm({
|
|
|
9363
9814
|
children: "Send message"
|
|
9364
9815
|
}
|
|
9365
9816
|
),
|
|
9366
|
-
isSending && /* @__PURE__ */
|
|
9817
|
+
isSending && /* @__PURE__ */ jsx51(
|
|
9367
9818
|
ArrowsClockwise,
|
|
9368
9819
|
{
|
|
9369
9820
|
"aria-hidden": true,
|
|
@@ -9377,7 +9828,7 @@ function ContactForm({
|
|
|
9377
9828
|
]
|
|
9378
9829
|
}
|
|
9379
9830
|
),
|
|
9380
|
-
/* @__PURE__ */
|
|
9831
|
+
/* @__PURE__ */ jsx51(
|
|
9381
9832
|
"div",
|
|
9382
9833
|
{
|
|
9383
9834
|
inert: !isSent,
|
|
@@ -9388,15 +9839,15 @@ function ContactForm({
|
|
|
9388
9839
|
THANKS_SWAP,
|
|
9389
9840
|
isSent ? "duration-0" : "pointer-events-none opacity-0 duration-200"
|
|
9390
9841
|
),
|
|
9391
|
-
children: sent !== null && /* @__PURE__ */
|
|
9392
|
-
/* @__PURE__ */
|
|
9393
|
-
/* @__PURE__ */
|
|
9842
|
+
children: sent !== null && /* @__PURE__ */ jsxs30("div", { className: "contents", children: [
|
|
9843
|
+
/* @__PURE__ */ jsx51(SentMark, { from: sent.from }),
|
|
9844
|
+
/* @__PURE__ */ jsxs30(
|
|
9394
9845
|
"div",
|
|
9395
9846
|
{
|
|
9396
9847
|
className: cn("flex max-w-72 flex-col gap-1", ARRIVES2, "delay-[400ms]"),
|
|
9397
9848
|
children: [
|
|
9398
|
-
/* @__PURE__ */
|
|
9399
|
-
/* @__PURE__ */
|
|
9849
|
+
/* @__PURE__ */ jsx51("p", { className: "text-xl font-semibold tracking-tight", children: "Message sent" }),
|
|
9850
|
+
/* @__PURE__ */ jsxs30("p", { className: "text-base text-balance text-muted-foreground", children: [
|
|
9400
9851
|
"Replies go to ",
|
|
9401
9852
|
sent.email,
|
|
9402
9853
|
"."
|
|
@@ -9404,7 +9855,7 @@ function ContactForm({
|
|
|
9404
9855
|
]
|
|
9405
9856
|
}
|
|
9406
9857
|
),
|
|
9407
|
-
/* @__PURE__ */
|
|
9858
|
+
/* @__PURE__ */ jsxs30(
|
|
9408
9859
|
"div",
|
|
9409
9860
|
{
|
|
9410
9861
|
className: cn(
|
|
@@ -9413,7 +9864,7 @@ function ContactForm({
|
|
|
9413
9864
|
"delay-[600ms]"
|
|
9414
9865
|
),
|
|
9415
9866
|
children: [
|
|
9416
|
-
/* @__PURE__ */
|
|
9867
|
+
/* @__PURE__ */ jsx51(
|
|
9417
9868
|
WidgetButton,
|
|
9418
9869
|
{
|
|
9419
9870
|
type: "button",
|
|
@@ -9424,7 +9875,7 @@ function ContactForm({
|
|
|
9424
9875
|
children: "Send another"
|
|
9425
9876
|
}
|
|
9426
9877
|
),
|
|
9427
|
-
showBadge && /* @__PURE__ */
|
|
9878
|
+
showBadge && /* @__PURE__ */ jsx51(PoweredByMedian, {})
|
|
9428
9879
|
]
|
|
9429
9880
|
}
|
|
9430
9881
|
)
|
|
@@ -9438,7 +9889,7 @@ function ContactForm({
|
|
|
9438
9889
|
}
|
|
9439
9890
|
|
|
9440
9891
|
// ../../apps/web/src/components/support-widget/sdk/use-median-contact.ts
|
|
9441
|
-
import { useCallback as
|
|
9892
|
+
import { useCallback as useCallback18, useMemo as useMemo5, useState as useState33, useSyncExternalStore as useSyncExternalStore17 } from "react";
|
|
9442
9893
|
|
|
9443
9894
|
// ../../apps/web/src/components/support-widget/sdk/contact.ts
|
|
9444
9895
|
import { ConvexHttpClient as ConvexHttpClient3 } from "convex/browser";
|
|
@@ -9503,7 +9954,7 @@ function useMedianContact(options, caller = "useMedianContact()") {
|
|
|
9503
9954
|
useRememberInstall(key, person);
|
|
9504
9955
|
const sessionId = useSyncExternalStore17(
|
|
9505
9956
|
subscribeSession,
|
|
9506
|
-
|
|
9957
|
+
useCallback18(
|
|
9507
9958
|
() => key === void 0 ? null : getOrCreateSessionId(key),
|
|
9508
9959
|
[key]
|
|
9509
9960
|
),
|
|
@@ -9511,9 +9962,9 @@ function useMedianContact(options, caller = "useMedianContact()") {
|
|
|
9511
9962
|
);
|
|
9512
9963
|
const takeDiagnostics = useDiagnostics(diagnostics, appState);
|
|
9513
9964
|
const [knownEmail] = useVisitorEmail(key ?? "");
|
|
9514
|
-
const [isSending, setSending] =
|
|
9515
|
-
const [error, setError] =
|
|
9516
|
-
const send =
|
|
9965
|
+
const [isSending, setSending] = useState33(false);
|
|
9966
|
+
const [error, setError] = useState33(null);
|
|
9967
|
+
const send = useCallback18(
|
|
9517
9968
|
async (message) => {
|
|
9518
9969
|
setError(null);
|
|
9519
9970
|
if (key === void 0 || sessionId === null) {
|
|
@@ -9543,7 +9994,7 @@ function useMedianContact(options, caller = "useMedianContact()") {
|
|
|
9543
9994
|
},
|
|
9544
9995
|
[key, sessionId, person, telemetry, takeDiagnostics]
|
|
9545
9996
|
);
|
|
9546
|
-
const known =
|
|
9997
|
+
const known = useMemo5(() => {
|
|
9547
9998
|
const email = person?.email || knownEmail || void 0;
|
|
9548
9999
|
if (person === void 0 && email === void 0) return void 0;
|
|
9549
10000
|
return { ...person, ...email ? { email } : {} };
|
|
@@ -9559,9 +10010,9 @@ function useMedianContact(options, caller = "useMedianContact()") {
|
|
|
9559
10010
|
}
|
|
9560
10011
|
|
|
9561
10012
|
// ../../apps/web/src/components/support-widget/sdk/median-contact-form.tsx
|
|
9562
|
-
import { jsx as
|
|
10013
|
+
import { jsx as jsx52 } from "react/jsx-runtime";
|
|
9563
10014
|
function MedianContactForm(props) {
|
|
9564
|
-
return /* @__PURE__ */
|
|
10015
|
+
return /* @__PURE__ */ jsx52(MedianErrorBoundary, { component: "MedianContactForm", children: /* @__PURE__ */ jsx52(ConnectedContactForm, { ...props }) });
|
|
9565
10016
|
}
|
|
9566
10017
|
function useFieldComplaints(fields) {
|
|
9567
10018
|
const key = fields === void 0 ? null : JSON.stringify(fields);
|
|
@@ -9585,14 +10036,14 @@ function ConnectedContactForm({
|
|
|
9585
10036
|
useFieldComplaints(fields);
|
|
9586
10037
|
const knownEmail = contact.user?.email || void 0;
|
|
9587
10038
|
const knownName = contact.user?.name || void 0;
|
|
9588
|
-
const initialValues =
|
|
10039
|
+
const initialValues = useMemo6(
|
|
9589
10040
|
() => ({
|
|
9590
10041
|
...knownEmail ? { email: knownEmail } : {},
|
|
9591
10042
|
...knownName ? { name: knownName } : {}
|
|
9592
10043
|
}),
|
|
9593
10044
|
[knownEmail, knownName]
|
|
9594
10045
|
);
|
|
9595
|
-
return /* @__PURE__ */
|
|
10046
|
+
return /* @__PURE__ */ jsx52(
|
|
9596
10047
|
ContactForm,
|
|
9597
10048
|
{
|
|
9598
10049
|
showBadge: contact.showBranding,
|
|
@@ -9618,7 +10069,7 @@ function ConnectedContactForm({
|
|
|
9618
10069
|
}
|
|
9619
10070
|
|
|
9620
10071
|
// ../../apps/web/src/components/support-widget/sdk/mount-contact-form.tsx
|
|
9621
|
-
import { jsx as
|
|
10072
|
+
import { jsx as jsx53 } from "react/jsx-runtime";
|
|
9622
10073
|
function describe(target) {
|
|
9623
10074
|
return typeof target === "string" ? `an element matching "${target}"` : "the element passed as target";
|
|
9624
10075
|
}
|
|
@@ -9642,7 +10093,7 @@ function mountMedianContactForm({
|
|
|
9642
10093
|
marker: "medianContactForm",
|
|
9643
10094
|
into,
|
|
9644
10095
|
options,
|
|
9645
|
-
render: (current2) => /* @__PURE__ */
|
|
10096
|
+
render: (current2) => /* @__PURE__ */ jsx53(MedianContactForm, { ...current2 })
|
|
9646
10097
|
});
|
|
9647
10098
|
}
|
|
9648
10099
|
export {
|