glitchgrab 1.52.0 → 1.53.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/README.md +2 -0
- package/dist/index.js +1123 -517
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +1123 -517
- package/dist/index.mjs.map +1 -1
- package/dist/server.d.mts +4 -0
- package/dist/server.d.ts +4 -0
- package/dist/server.js +2 -0
- package/dist/server.js.map +1 -1
- package/dist/server.mjs +2 -0
- package/dist/server.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -783,9 +783,9 @@ function topStackFrame(stack) {
|
|
|
783
783
|
if (!stack) return "";
|
|
784
784
|
const lines = stack.split("\n");
|
|
785
785
|
for (const line of lines) {
|
|
786
|
-
const
|
|
787
|
-
if (
|
|
788
|
-
return
|
|
786
|
+
const t = line.trim();
|
|
787
|
+
if (t.startsWith("at ") || t.includes("@")) {
|
|
788
|
+
return t;
|
|
789
789
|
}
|
|
790
790
|
}
|
|
791
791
|
return "";
|
|
@@ -1590,8 +1590,8 @@ function renderBlocks(lines, theme, key) {
|
|
|
1590
1590
|
const body = [];
|
|
1591
1591
|
i++;
|
|
1592
1592
|
while (i < lines.length) {
|
|
1593
|
-
const
|
|
1594
|
-
if (
|
|
1593
|
+
const t = lines[i].trim();
|
|
1594
|
+
if (t.length >= fence.length && [...t].every((c) => c === fence[0])) break;
|
|
1595
1595
|
body.push(lines[i]);
|
|
1596
1596
|
i++;
|
|
1597
1597
|
}
|
|
@@ -1834,8 +1834,8 @@ var STARTERS = [
|
|
|
1834
1834
|
];
|
|
1835
1835
|
var CONFIRM_OPTION = "Yes, that's it";
|
|
1836
1836
|
function isCheckBackQuestion(text) {
|
|
1837
|
-
const
|
|
1838
|
-
return /^so,? you['’]?re saying\b/i.test(
|
|
1837
|
+
const t = text.trim();
|
|
1838
|
+
return /^so,? you['’]?re saying\b/i.test(t) || /\b(is that right|is that correct|did i get (that|it) right|have i got (that|it) right)\s*\??\s*$/i.test(t);
|
|
1839
1839
|
}
|
|
1840
1840
|
function isAffirmativeReply(text) {
|
|
1841
1841
|
return /^(y|ya|yah|yes|yess|yeah|yep|yup|ok|okay|sure|correct|right|exactly|confirm(ed)?|that['’]?s (it|right|correct)|yes,? that['’]?s (it|right)|haan|han|ha|ho|hmm yes|👍)[\s.!👍]*$/i.test(
|
|
@@ -1871,8 +1871,8 @@ function Sparkle({ color, size = 14 }) {
|
|
|
1871
1871
|
}
|
|
1872
1872
|
function Avatar({
|
|
1873
1873
|
who,
|
|
1874
|
-
theme:
|
|
1875
|
-
initials
|
|
1874
|
+
theme: t,
|
|
1875
|
+
initials: initials2
|
|
1876
1876
|
}) {
|
|
1877
1877
|
const isAi = who === "assistant";
|
|
1878
1878
|
return /* @__PURE__ */ jsx3(
|
|
@@ -1888,13 +1888,13 @@ function Avatar({
|
|
|
1888
1888
|
alignItems: "center",
|
|
1889
1889
|
justifyContent: "center",
|
|
1890
1890
|
marginTop: "2px",
|
|
1891
|
-
backgroundColor: isAi ? `${
|
|
1892
|
-
border: `1px solid ${isAi ?
|
|
1893
|
-
color: isAi ?
|
|
1891
|
+
backgroundColor: isAi ? `${t.accent}22` : t.bgSecondary,
|
|
1892
|
+
border: `1px solid ${isAi ? t.accent : t.inputBorder}`,
|
|
1893
|
+
color: isAi ? t.accent : t.textMuted,
|
|
1894
1894
|
fontSize: "10px",
|
|
1895
1895
|
fontWeight: 700
|
|
1896
1896
|
},
|
|
1897
|
-
children: isAi ? /* @__PURE__ */ jsx3(Sparkle, { color:
|
|
1897
|
+
children: isAi ? /* @__PURE__ */ jsx3(Sparkle, { color: t.accent, size: 12 }) : initials2 ? initials2 : /* @__PURE__ */ jsxs3("svg", { width: "12", height: "12", viewBox: "0 0 24 24", fill: "none", "aria-hidden": "true", children: [
|
|
1898
1898
|
/* @__PURE__ */ jsx3("circle", { cx: "12", cy: "8", r: "3.4", stroke: "currentColor", strokeWidth: "1.8" }),
|
|
1899
1899
|
/* @__PURE__ */ jsx3(
|
|
1900
1900
|
"path",
|
|
@@ -1911,7 +1911,7 @@ function Avatar({
|
|
|
1911
1911
|
}
|
|
1912
1912
|
function AssistSheet({
|
|
1913
1913
|
assist,
|
|
1914
|
-
theme:
|
|
1914
|
+
theme: t,
|
|
1915
1915
|
screenshots,
|
|
1916
1916
|
pageShot = null,
|
|
1917
1917
|
onAddFiles,
|
|
@@ -2193,20 +2193,20 @@ function AssistSheet({
|
|
|
2193
2193
|
minWidth: 0
|
|
2194
2194
|
},
|
|
2195
2195
|
children: [
|
|
2196
|
-
/* @__PURE__ */ jsx3("span", { style: { color:
|
|
2197
|
-
title && /* @__PURE__ */ jsxs3("span", { style: { color:
|
|
2196
|
+
/* @__PURE__ */ jsx3("span", { style: { color: t.text, fontWeight: 600 }, children: duplicate.kind === "related" ? title ? "Your request goes onto this issue" : `Connected to #${duplicate.number}` : title ? "Our team is already on this" : `Our team is already on #${duplicate.number}` }),
|
|
2197
|
+
title && /* @__PURE__ */ jsxs3("span", { style: { color: t.textMuted, wordBreak: "break-word" }, children: [
|
|
2198
2198
|
"#",
|
|
2199
2199
|
duplicate.number,
|
|
2200
2200
|
" ",
|
|
2201
2201
|
duplicate.title
|
|
2202
2202
|
] }),
|
|
2203
|
-
duplicate.status && duplicate.kind !== "related" && /* @__PURE__ */ jsx3("span", { style: { color:
|
|
2204
|
-
footer && /* @__PURE__ */ jsx3("span", { style: { color:
|
|
2203
|
+
duplicate.status && duplicate.kind !== "related" && /* @__PURE__ */ jsx3("span", { style: { color: t.text, fontWeight: 600 }, children: duplicate.status }),
|
|
2204
|
+
footer && /* @__PURE__ */ jsx3("span", { style: { color: t.textMuted }, children: duplicate.kind === "related" ? "Added as a separate request on it, not a repeat \u2014 the team sees both." : footer })
|
|
2205
2205
|
]
|
|
2206
2206
|
}
|
|
2207
2207
|
);
|
|
2208
2208
|
}
|
|
2209
|
-
const
|
|
2209
|
+
const initials2 = (reporterName != null ? reporterName : "").split(/\s+/).filter(Boolean).slice(0, 2).map((w) => {
|
|
2210
2210
|
var _a, _b;
|
|
2211
2211
|
return (_b = (_a = w[0]) == null ? void 0 : _a.toUpperCase()) != null ? _b : "";
|
|
2212
2212
|
}).join("");
|
|
@@ -2220,7 +2220,7 @@ function AssistSheet({
|
|
|
2220
2220
|
width: "440px",
|
|
2221
2221
|
maxWidth: "100%",
|
|
2222
2222
|
height: "100dvh",
|
|
2223
|
-
borderLeft: `1px solid ${
|
|
2223
|
+
borderLeft: `1px solid ${t.border}`,
|
|
2224
2224
|
animation: "gg-sheet-in .22s cubic-bezier(.2,.8,.2,1)"
|
|
2225
2225
|
};
|
|
2226
2226
|
return createPortal(
|
|
@@ -2267,8 +2267,8 @@ function AssistSheet({
|
|
|
2267
2267
|
minWidth: 0,
|
|
2268
2268
|
maxWidth: "100%",
|
|
2269
2269
|
boxSizing: "border-box",
|
|
2270
|
-
backgroundColor:
|
|
2271
|
-
color:
|
|
2270
|
+
backgroundColor: t.bg,
|
|
2271
|
+
color: t.text,
|
|
2272
2272
|
boxShadow: "0 20px 60px rgba(0,0,0,.35)",
|
|
2273
2273
|
overflow: "hidden",
|
|
2274
2274
|
isolation: "isolate"
|
|
@@ -2281,7 +2281,7 @@ function AssistSheet({
|
|
|
2281
2281
|
style: {
|
|
2282
2282
|
flexShrink: 0,
|
|
2283
2283
|
padding: "14px 16px",
|
|
2284
|
-
borderBottom: `1px solid ${
|
|
2284
|
+
borderBottom: `1px solid ${t.border}`,
|
|
2285
2285
|
display: "flex",
|
|
2286
2286
|
alignItems: "flex-start",
|
|
2287
2287
|
justifyContent: "space-between",
|
|
@@ -2301,7 +2301,7 @@ function AssistSheet({
|
|
|
2301
2301
|
fontWeight: 600
|
|
2302
2302
|
},
|
|
2303
2303
|
children: [
|
|
2304
|
-
/* @__PURE__ */ jsx3(Sparkle, { color:
|
|
2304
|
+
/* @__PURE__ */ jsx3(Sparkle, { color: t.accent }),
|
|
2305
2305
|
"Describe it with AI",
|
|
2306
2306
|
/* @__PURE__ */ jsx3(
|
|
2307
2307
|
"span",
|
|
@@ -2311,8 +2311,8 @@ function AssistSheet({
|
|
|
2311
2311
|
fontWeight: 600,
|
|
2312
2312
|
letterSpacing: ".04em",
|
|
2313
2313
|
textTransform: "uppercase",
|
|
2314
|
-
color:
|
|
2315
|
-
border: `1px solid ${
|
|
2314
|
+
color: t.accent,
|
|
2315
|
+
border: `1px solid ${t.accent}55`,
|
|
2316
2316
|
borderRadius: "4px",
|
|
2317
2317
|
padding: "1px 5px"
|
|
2318
2318
|
},
|
|
@@ -2322,7 +2322,7 @@ function AssistSheet({
|
|
|
2322
2322
|
]
|
|
2323
2323
|
}
|
|
2324
2324
|
),
|
|
2325
|
-
/* @__PURE__ */ jsxs3("div", { style: { fontSize: "11.5px", color:
|
|
2325
|
+
/* @__PURE__ */ jsxs3("div", { style: { fontSize: "11.5px", color: t.textMuted, marginTop: "3px" }, children: [
|
|
2326
2326
|
phase === "type" ? null : reportTypeLabel,
|
|
2327
2327
|
phase !== "type" && severityAsked && severity ? ` \xB7 ${SEVERITY_LABELS[severity]}` : null,
|
|
2328
2328
|
projectSlot ? /* @__PURE__ */ jsx3("span", { style: { marginLeft: "6px" }, children: projectSlot }) : null
|
|
@@ -2337,10 +2337,10 @@ function AssistSheet({
|
|
|
2337
2337
|
"aria-label": "Write it myself instead",
|
|
2338
2338
|
style: {
|
|
2339
2339
|
flexShrink: 0,
|
|
2340
|
-
border: `1px solid ${
|
|
2340
|
+
border: `1px solid ${t.inputBorder}`,
|
|
2341
2341
|
borderRadius: "999px",
|
|
2342
2342
|
background: "transparent",
|
|
2343
|
-
color:
|
|
2343
|
+
color: t.textMuted,
|
|
2344
2344
|
cursor: "pointer",
|
|
2345
2345
|
fontSize: "11.5px",
|
|
2346
2346
|
lineHeight: 1,
|
|
@@ -2380,14 +2380,14 @@ function AssistSheet({
|
|
|
2380
2380
|
children: [
|
|
2381
2381
|
phase === "type" && /* @__PURE__ */ jsxs3("div", { style: { display: "flex", flexDirection: "column", gap: "12px" }, children: [
|
|
2382
2382
|
/* @__PURE__ */ jsxs3("div", { style: { display: "flex", gap: "8px" }, children: [
|
|
2383
|
-
/* @__PURE__ */ jsx3(Avatar, { who: "assistant", theme:
|
|
2383
|
+
/* @__PURE__ */ jsx3(Avatar, { who: "assistant", theme: t }),
|
|
2384
2384
|
/* @__PURE__ */ jsxs3(
|
|
2385
2385
|
"div",
|
|
2386
2386
|
{
|
|
2387
2387
|
style: {
|
|
2388
2388
|
padding: "9px 12px",
|
|
2389
2389
|
borderRadius: "12px 12px 12px 4px",
|
|
2390
|
-
backgroundColor:
|
|
2390
|
+
backgroundColor: t.bgSecondary,
|
|
2391
2391
|
fontSize: "13px",
|
|
2392
2392
|
lineHeight: 1.55,
|
|
2393
2393
|
maxWidth: "88%"
|
|
@@ -2424,9 +2424,9 @@ function AssistSheet({
|
|
|
2424
2424
|
// The rating is the only tile that isn't a report, so
|
|
2425
2425
|
// it wears the star colour the dialog's hero row uses
|
|
2426
2426
|
// rather than hiding among the report types.
|
|
2427
|
-
border: `1px solid ${rate ? "rgba(245,158,11,0.5)" :
|
|
2427
|
+
border: `1px solid ${rate ? "rgba(245,158,11,0.5)" : t.inputBorder}`,
|
|
2428
2428
|
background: rate ? "rgba(245,158,11,0.08)" : "transparent",
|
|
2429
|
-
color: rate ? "#f59e0b" :
|
|
2429
|
+
color: rate ? "#f59e0b" : t.textMuted,
|
|
2430
2430
|
borderRadius: "999px",
|
|
2431
2431
|
// 8px vertical keeps the tap target at ~32px.
|
|
2432
2432
|
padding: "8px 12px",
|
|
@@ -2445,14 +2445,14 @@ function AssistSheet({
|
|
|
2445
2445
|
] }),
|
|
2446
2446
|
phase === "severity" && /* @__PURE__ */ jsxs3("div", { style: { display: "flex", flexDirection: "column", gap: "12px" }, children: [
|
|
2447
2447
|
/* @__PURE__ */ jsxs3("div", { style: { display: "flex", gap: "8px" }, children: [
|
|
2448
|
-
/* @__PURE__ */ jsx3(Avatar, { who: "assistant", theme:
|
|
2448
|
+
/* @__PURE__ */ jsx3(Avatar, { who: "assistant", theme: t }),
|
|
2449
2449
|
/* @__PURE__ */ jsx3(
|
|
2450
2450
|
"div",
|
|
2451
2451
|
{
|
|
2452
2452
|
style: {
|
|
2453
2453
|
padding: "9px 12px",
|
|
2454
2454
|
borderRadius: "12px 12px 12px 4px",
|
|
2455
|
-
backgroundColor:
|
|
2455
|
+
backgroundColor: t.bgSecondary,
|
|
2456
2456
|
fontSize: "13px",
|
|
2457
2457
|
lineHeight: 1.55,
|
|
2458
2458
|
maxWidth: "88%"
|
|
@@ -2482,9 +2482,9 @@ function AssistSheet({
|
|
|
2482
2482
|
"data-gg-severity": s,
|
|
2483
2483
|
onClick: () => answerSeverity(s),
|
|
2484
2484
|
style: {
|
|
2485
|
-
border: `1px solid ${
|
|
2485
|
+
border: `1px solid ${t.inputBorder}`,
|
|
2486
2486
|
background: "transparent",
|
|
2487
|
-
color:
|
|
2487
|
+
color: t.textMuted,
|
|
2488
2488
|
borderRadius: "999px",
|
|
2489
2489
|
// Same as the picker and option chips — one chip size.
|
|
2490
2490
|
padding: "8px 12px",
|
|
@@ -2501,14 +2501,14 @@ function AssistSheet({
|
|
|
2501
2501
|
] }),
|
|
2502
2502
|
phase === "rating" && !submitted && /* @__PURE__ */ jsxs3("div", { style: { display: "flex", flexDirection: "column", gap: "12px" }, children: [
|
|
2503
2503
|
/* @__PURE__ */ jsxs3("div", { style: { display: "flex", gap: "8px" }, children: [
|
|
2504
|
-
/* @__PURE__ */ jsx3(Avatar, { who: "assistant", theme:
|
|
2504
|
+
/* @__PURE__ */ jsx3(Avatar, { who: "assistant", theme: t }),
|
|
2505
2505
|
/* @__PURE__ */ jsx3(
|
|
2506
2506
|
"div",
|
|
2507
2507
|
{
|
|
2508
2508
|
style: {
|
|
2509
2509
|
padding: "9px 12px",
|
|
2510
2510
|
borderRadius: "12px 12px 12px 4px",
|
|
2511
|
-
backgroundColor:
|
|
2511
|
+
backgroundColor: t.bgSecondary,
|
|
2512
2512
|
fontSize: "13px",
|
|
2513
2513
|
lineHeight: 1.55,
|
|
2514
2514
|
maxWidth: "88%"
|
|
@@ -2554,7 +2554,7 @@ function AssistSheet({
|
|
|
2554
2554
|
{
|
|
2555
2555
|
d: "M12 3l2.6 5.3 5.9.9-4.3 4.1 1 5.8L12 16.4 6.8 19.1l1-5.8L3.5 9.2l5.9-.9L12 3z",
|
|
2556
2556
|
fill: filled ? "#f59e0b" : "transparent",
|
|
2557
|
-
stroke: filled ? "#f59e0b" :
|
|
2557
|
+
stroke: filled ? "#f59e0b" : t.inputBorder,
|
|
2558
2558
|
strokeWidth: "1.5",
|
|
2559
2559
|
strokeLinejoin: "round"
|
|
2560
2560
|
}
|
|
@@ -2574,9 +2574,9 @@ function AssistSheet({
|
|
|
2574
2574
|
width: "100%",
|
|
2575
2575
|
padding: "10px",
|
|
2576
2576
|
borderRadius: "8px",
|
|
2577
|
-
border: `1px solid ${
|
|
2578
|
-
backgroundColor:
|
|
2579
|
-
color:
|
|
2577
|
+
border: `1px solid ${t.inputBorder}`,
|
|
2578
|
+
backgroundColor: t.inputBg,
|
|
2579
|
+
color: t.text,
|
|
2580
2580
|
fontSize: "13px",
|
|
2581
2581
|
lineHeight: 1.5,
|
|
2582
2582
|
fontFamily: "inherit",
|
|
@@ -2595,7 +2595,7 @@ function AssistSheet({
|
|
|
2595
2595
|
alignSelf: "flex-start",
|
|
2596
2596
|
border: "none",
|
|
2597
2597
|
background: "transparent",
|
|
2598
|
-
color:
|
|
2598
|
+
color: t.textMuted,
|
|
2599
2599
|
fontSize: "12px",
|
|
2600
2600
|
fontFamily: "inherit",
|
|
2601
2601
|
// A bare text link is ~14px tall — half a thumb.
|
|
@@ -2612,14 +2612,14 @@ function AssistSheet({
|
|
|
2612
2612
|
] }),
|
|
2613
2613
|
empty && /* @__PURE__ */ jsxs3("div", { style: { display: "flex", flexDirection: "column", gap: "12px" }, children: [
|
|
2614
2614
|
/* @__PURE__ */ jsxs3("div", { style: { display: "flex", gap: "8px" }, children: [
|
|
2615
|
-
/* @__PURE__ */ jsx3(Avatar, { who: "assistant", theme:
|
|
2615
|
+
/* @__PURE__ */ jsx3(Avatar, { who: "assistant", theme: t }),
|
|
2616
2616
|
/* @__PURE__ */ jsxs3(
|
|
2617
2617
|
"div",
|
|
2618
2618
|
{
|
|
2619
2619
|
style: {
|
|
2620
2620
|
padding: "9px 12px",
|
|
2621
2621
|
borderRadius: "12px 12px 12px 4px",
|
|
2622
|
-
backgroundColor:
|
|
2622
|
+
backgroundColor: t.bgSecondary,
|
|
2623
2623
|
fontSize: "13px",
|
|
2624
2624
|
lineHeight: 1.55,
|
|
2625
2625
|
maxWidth: "88%"
|
|
@@ -2650,9 +2650,9 @@ function AssistSheet({
|
|
|
2650
2650
|
send(s);
|
|
2651
2651
|
},
|
|
2652
2652
|
style: {
|
|
2653
|
-
border: `1px solid ${
|
|
2653
|
+
border: `1px solid ${t.inputBorder}`,
|
|
2654
2654
|
background: "transparent",
|
|
2655
|
-
color:
|
|
2655
|
+
color: t.textMuted,
|
|
2656
2656
|
borderRadius: "999px",
|
|
2657
2657
|
padding: "6px 11px",
|
|
2658
2658
|
fontSize: "12px",
|
|
@@ -2671,7 +2671,7 @@ function AssistSheet({
|
|
|
2671
2671
|
if (m.kind === "report") {
|
|
2672
2672
|
const live = phase === "draft" && i === messages.length - 1;
|
|
2673
2673
|
return /* @__PURE__ */ jsxs3("div", { style: { display: "flex", gap: "8px", minWidth: 0 }, children: [
|
|
2674
|
-
/* @__PURE__ */ jsx3(Avatar, { who: "assistant", theme:
|
|
2674
|
+
/* @__PURE__ */ jsx3(Avatar, { who: "assistant", theme: t }),
|
|
2675
2675
|
/* @__PURE__ */ jsx3(
|
|
2676
2676
|
"div",
|
|
2677
2677
|
{
|
|
@@ -2683,9 +2683,9 @@ function AssistSheet({
|
|
|
2683
2683
|
borderRadius: "12px 12px 12px 4px",
|
|
2684
2684
|
fontSize: "13px",
|
|
2685
2685
|
lineHeight: 1.55,
|
|
2686
|
-
backgroundColor:
|
|
2687
|
-
color:
|
|
2688
|
-
border: live ? "none" : `1px solid ${
|
|
2686
|
+
backgroundColor: t.bgSecondary,
|
|
2687
|
+
color: t.text,
|
|
2688
|
+
border: live ? "none" : `1px solid ${t.accent}66`
|
|
2689
2689
|
},
|
|
2690
2690
|
children: live ? (
|
|
2691
2691
|
// #402: "have a read" beside a countdown reads as a
|
|
@@ -2701,7 +2701,7 @@ function AssistSheet({
|
|
|
2701
2701
|
fontWeight: 700,
|
|
2702
2702
|
letterSpacing: ".06em",
|
|
2703
2703
|
textTransform: "uppercase",
|
|
2704
|
-
color:
|
|
2704
|
+
color: t.accent,
|
|
2705
2705
|
marginBottom: "4px"
|
|
2706
2706
|
},
|
|
2707
2707
|
children: "Draft so far"
|
|
@@ -2716,7 +2716,7 @@ function AssistSheet({
|
|
|
2716
2716
|
wordBreak: "break-word",
|
|
2717
2717
|
maxHeight: "160px",
|
|
2718
2718
|
overflowY: "auto",
|
|
2719
|
-
color:
|
|
2719
|
+
color: t.textMuted
|
|
2720
2720
|
},
|
|
2721
2721
|
children: m.content
|
|
2722
2722
|
}
|
|
@@ -2736,7 +2736,7 @@ function AssistSheet({
|
|
|
2736
2736
|
flexDirection: mine ? "row-reverse" : "row"
|
|
2737
2737
|
},
|
|
2738
2738
|
children: [
|
|
2739
|
-
/* @__PURE__ */ jsx3(Avatar, { who: m.role, theme:
|
|
2739
|
+
/* @__PURE__ */ jsx3(Avatar, { who: m.role, theme: t, initials: initials2 }),
|
|
2740
2740
|
/* @__PURE__ */ jsx3(
|
|
2741
2741
|
"div",
|
|
2742
2742
|
{
|
|
@@ -2750,10 +2750,10 @@ function AssistSheet({
|
|
|
2750
2750
|
// Markdown owns the assistant's line breaks and lists.
|
|
2751
2751
|
whiteSpace: mine ? "pre-wrap" : "normal",
|
|
2752
2752
|
wordBreak: "break-word",
|
|
2753
|
-
backgroundColor: mine ?
|
|
2754
|
-
color: mine ?
|
|
2753
|
+
backgroundColor: mine ? t.accent : t.bgSecondary,
|
|
2754
|
+
color: mine ? t.accentText : t.text
|
|
2755
2755
|
},
|
|
2756
|
-
children: mine ? m.content : /* @__PURE__ */ jsx3(ChatMarkdown, { text: m.content, theme:
|
|
2756
|
+
children: mine ? m.content : /* @__PURE__ */ jsx3(ChatMarkdown, { text: m.content, theme: t })
|
|
2757
2757
|
}
|
|
2758
2758
|
)
|
|
2759
2759
|
]
|
|
@@ -2772,14 +2772,14 @@ function AssistSheet({
|
|
|
2772
2772
|
gap: "8px",
|
|
2773
2773
|
padding: "10px",
|
|
2774
2774
|
borderRadius: "8px",
|
|
2775
|
-
border: `1px solid ${
|
|
2776
|
-
backgroundColor: `${
|
|
2775
|
+
border: `1px solid ${t.accent}55`,
|
|
2776
|
+
backgroundColor: `${t.accent}14`,
|
|
2777
2777
|
fontSize: "12px",
|
|
2778
2778
|
lineHeight: 1.5
|
|
2779
2779
|
},
|
|
2780
2780
|
children: [
|
|
2781
|
-
/* @__PURE__ */ jsx3("span", { style: { color:
|
|
2782
|
-
/* @__PURE__ */ jsx3("span", { style: { color:
|
|
2781
|
+
/* @__PURE__ */ jsx3("span", { style: { color: t.text, fontWeight: 600 }, children: "This is about Glitchgrab, not this app" }),
|
|
2782
|
+
/* @__PURE__ */ jsx3("span", { style: { color: t.textMuted }, children: "It goes to the team that builds this reporter, with your chat attached." }),
|
|
2783
2783
|
/* @__PURE__ */ jsxs3("div", { style: { display: "flex", flexWrap: "wrap", gap: "6px" }, children: [
|
|
2784
2784
|
/* @__PURE__ */ jsx3(
|
|
2785
2785
|
"button",
|
|
@@ -2797,8 +2797,8 @@ function AssistSheet({
|
|
|
2797
2797
|
padding: "8px 12px",
|
|
2798
2798
|
borderRadius: "999px",
|
|
2799
2799
|
border: "none",
|
|
2800
|
-
backgroundColor:
|
|
2801
|
-
color:
|
|
2800
|
+
backgroundColor: t.accent,
|
|
2801
|
+
color: t.accentText,
|
|
2802
2802
|
fontSize: "12px",
|
|
2803
2803
|
fontWeight: 700,
|
|
2804
2804
|
fontFamily: "inherit",
|
|
@@ -2822,9 +2822,9 @@ function AssistSheet({
|
|
|
2822
2822
|
style: {
|
|
2823
2823
|
padding: "8px 12px",
|
|
2824
2824
|
borderRadius: "999px",
|
|
2825
|
-
border: `1px solid ${
|
|
2825
|
+
border: `1px solid ${t.inputBorder}`,
|
|
2826
2826
|
background: "transparent",
|
|
2827
|
-
color:
|
|
2827
|
+
color: t.textMuted,
|
|
2828
2828
|
fontSize: "12px",
|
|
2829
2829
|
fontFamily: "inherit",
|
|
2830
2830
|
cursor: "pointer",
|
|
@@ -2863,9 +2863,9 @@ function AssistSheet({
|
|
|
2863
2863
|
send(option, option === CONFIRM_OPTION);
|
|
2864
2864
|
},
|
|
2865
2865
|
style: {
|
|
2866
|
-
border: `1px solid ${
|
|
2866
|
+
border: `1px solid ${t.inputBorder}`,
|
|
2867
2867
|
background: "transparent",
|
|
2868
|
-
color:
|
|
2868
|
+
color: t.textMuted,
|
|
2869
2869
|
borderRadius: "999px",
|
|
2870
2870
|
// Same 8px as the picker chips — one tap target size in
|
|
2871
2871
|
// this sheet, not two.
|
|
@@ -2882,7 +2882,7 @@ function AssistSheet({
|
|
|
2882
2882
|
}
|
|
2883
2883
|
),
|
|
2884
2884
|
busy && /* @__PURE__ */ jsxs3("div", { style: { display: "flex", gap: "8px" }, role: "status", "aria-label": "Thinking", children: [
|
|
2885
|
-
/* @__PURE__ */ jsx3(Avatar, { who: "assistant", theme:
|
|
2885
|
+
/* @__PURE__ */ jsx3(Avatar, { who: "assistant", theme: t }),
|
|
2886
2886
|
/* @__PURE__ */ jsx3(
|
|
2887
2887
|
"span",
|
|
2888
2888
|
{
|
|
@@ -2892,7 +2892,7 @@ function AssistSheet({
|
|
|
2892
2892
|
gap: "4px",
|
|
2893
2893
|
padding: "12px",
|
|
2894
2894
|
borderRadius: "12px 12px 12px 4px",
|
|
2895
|
-
backgroundColor:
|
|
2895
|
+
backgroundColor: t.bgSecondary
|
|
2896
2896
|
},
|
|
2897
2897
|
children: [0, 1, 2].map((i) => /* @__PURE__ */ jsx3(
|
|
2898
2898
|
"span",
|
|
@@ -2901,7 +2901,7 @@ function AssistSheet({
|
|
|
2901
2901
|
width: "5px",
|
|
2902
2902
|
height: "5px",
|
|
2903
2903
|
borderRadius: "50%",
|
|
2904
|
-
backgroundColor:
|
|
2904
|
+
backgroundColor: t.textMuted,
|
|
2905
2905
|
animation: `gg-dot 1.1s ease-in-out ${i * 0.15}s infinite`
|
|
2906
2906
|
}
|
|
2907
2907
|
},
|
|
@@ -2914,9 +2914,9 @@ function AssistSheet({
|
|
|
2914
2914
|
"div",
|
|
2915
2915
|
{
|
|
2916
2916
|
style: {
|
|
2917
|
-
border: `1px solid ${
|
|
2917
|
+
border: `1px solid ${t.accent}`,
|
|
2918
2918
|
borderRadius: "12px",
|
|
2919
|
-
backgroundColor:
|
|
2919
|
+
backgroundColor: t.bgSecondary,
|
|
2920
2920
|
padding: "12px",
|
|
2921
2921
|
display: "flex",
|
|
2922
2922
|
flexDirection: "column",
|
|
@@ -2933,7 +2933,7 @@ function AssistSheet({
|
|
|
2933
2933
|
fontWeight: 700,
|
|
2934
2934
|
letterSpacing: ".06em",
|
|
2935
2935
|
textTransform: "uppercase",
|
|
2936
|
-
color:
|
|
2936
|
+
color: t.accent
|
|
2937
2937
|
},
|
|
2938
2938
|
children: duplicate ? `What we'll add to #${duplicate.number}${duplicate.kind === "related" ? " as a related request" : ""} \xB7 edit anything` : "Your report \xB7 edit anything"
|
|
2939
2939
|
}
|
|
@@ -2957,9 +2957,9 @@ function AssistSheet({
|
|
|
2957
2957
|
minHeight: "120px",
|
|
2958
2958
|
padding: "10px",
|
|
2959
2959
|
borderRadius: "8px",
|
|
2960
|
-
border: `1px solid ${
|
|
2961
|
-
backgroundColor:
|
|
2962
|
-
color:
|
|
2960
|
+
border: `1px solid ${t.inputBorder}`,
|
|
2961
|
+
backgroundColor: t.inputBg,
|
|
2962
|
+
color: t.text,
|
|
2963
2963
|
fontSize: "13px",
|
|
2964
2964
|
lineHeight: 1.55,
|
|
2965
2965
|
fontFamily: "inherit",
|
|
@@ -2975,7 +2975,7 @@ function AssistSheet({
|
|
|
2975
2975
|
{
|
|
2976
2976
|
style: {
|
|
2977
2977
|
fontSize: "11.5px",
|
|
2978
|
-
color:
|
|
2978
|
+
color: t.textMuted,
|
|
2979
2979
|
display: "block",
|
|
2980
2980
|
marginBottom: "6px"
|
|
2981
2981
|
},
|
|
@@ -2987,7 +2987,7 @@ function AssistSheet({
|
|
|
2987
2987
|
style: {
|
|
2988
2988
|
marginLeft: "6px",
|
|
2989
2989
|
fontSize: "11px",
|
|
2990
|
-
color: severityRefused ? "#ef4444" :
|
|
2990
|
+
color: severityRefused ? "#ef4444" : t.textMuted
|
|
2991
2991
|
},
|
|
2992
2992
|
children: "\xB7 required"
|
|
2993
2993
|
}
|
|
@@ -3015,9 +3015,9 @@ function AssistSheet({
|
|
|
3015
3015
|
minWidth: 0,
|
|
3016
3016
|
padding: "8px 2px",
|
|
3017
3017
|
borderRadius: "8px",
|
|
3018
|
-
border: `1px solid ${on ?
|
|
3019
|
-
backgroundColor: on ?
|
|
3020
|
-
color: on ?
|
|
3018
|
+
border: `1px solid ${on ? t.accent : severityRefused ? "#ef4444" : t.inputBorder}`,
|
|
3019
|
+
backgroundColor: on ? t.accent : "transparent",
|
|
3020
|
+
color: on ? t.accentText : t.textMuted,
|
|
3021
3021
|
fontSize: "12px",
|
|
3022
3022
|
fontWeight: 600,
|
|
3023
3023
|
fontFamily: "inherit",
|
|
@@ -3034,7 +3034,7 @@ function AssistSheet({
|
|
|
3034
3034
|
}
|
|
3035
3035
|
)
|
|
3036
3036
|
] }),
|
|
3037
|
-
attachmentCount > 0 && /* @__PURE__ */ jsxs3("span", { style: { fontSize: "11.5px", color:
|
|
3037
|
+
attachmentCount > 0 && /* @__PURE__ */ jsxs3("span", { style: { fontSize: "11.5px", color: t.textMuted }, children: [
|
|
3038
3038
|
attachmentCount,
|
|
3039
3039
|
" ",
|
|
3040
3040
|
attachmentCount === 1 ? "attachment" : "attachments",
|
|
@@ -3045,14 +3045,14 @@ function AssistSheet({
|
|
|
3045
3045
|
),
|
|
3046
3046
|
phase === "solved" && solved && /* @__PURE__ */ jsxs3("div", { style: { display: "flex", flexDirection: "column", gap: "12px" }, children: [
|
|
3047
3047
|
/* @__PURE__ */ jsxs3("div", { style: { display: "flex", gap: "8px" }, children: [
|
|
3048
|
-
/* @__PURE__ */ jsx3(Avatar, { who: "assistant", theme:
|
|
3048
|
+
/* @__PURE__ */ jsx3(Avatar, { who: "assistant", theme: t }),
|
|
3049
3049
|
/* @__PURE__ */ jsx3(
|
|
3050
3050
|
"div",
|
|
3051
3051
|
{
|
|
3052
3052
|
style: {
|
|
3053
3053
|
padding: "9px 12px",
|
|
3054
3054
|
borderRadius: "12px 12px 12px 4px",
|
|
3055
|
-
backgroundColor:
|
|
3055
|
+
backgroundColor: t.bgSecondary,
|
|
3056
3056
|
fontSize: "13px",
|
|
3057
3057
|
lineHeight: 1.55,
|
|
3058
3058
|
maxWidth: "88%",
|
|
@@ -3065,7 +3065,7 @@ function AssistSheet({
|
|
|
3065
3065
|
/* @__PURE__ */ jsx3(
|
|
3066
3066
|
"span",
|
|
3067
3067
|
{
|
|
3068
|
-
style: { fontSize: "11.5px", color:
|
|
3068
|
+
style: { fontSize: "11.5px", color: t.textMuted, paddingLeft: "32px" },
|
|
3069
3069
|
children: "Nothing was filed \u2014 you are all set."
|
|
3070
3070
|
}
|
|
3071
3071
|
)
|
|
@@ -3076,7 +3076,7 @@ function AssistSheet({
|
|
|
3076
3076
|
style: {
|
|
3077
3077
|
textAlign: "center",
|
|
3078
3078
|
padding: "24px 0",
|
|
3079
|
-
color:
|
|
3079
|
+
color: t.accent,
|
|
3080
3080
|
fontSize: "14px",
|
|
3081
3081
|
fontWeight: 600
|
|
3082
3082
|
},
|
|
@@ -3096,10 +3096,10 @@ function AssistSheet({
|
|
|
3096
3096
|
{
|
|
3097
3097
|
style: {
|
|
3098
3098
|
flexShrink: 0,
|
|
3099
|
-
borderTop: `1px solid ${
|
|
3099
|
+
borderTop: `1px solid ${t.border}`,
|
|
3100
3100
|
padding: "12px 16px",
|
|
3101
3101
|
paddingBottom: narrow ? "max(12px, env(safe-area-inset-bottom))" : "12px",
|
|
3102
|
-
backgroundColor:
|
|
3102
|
+
backgroundColor: t.bg
|
|
3103
3103
|
},
|
|
3104
3104
|
children: [
|
|
3105
3105
|
phase === "solved" ? /* @__PURE__ */ jsx3(
|
|
@@ -3113,8 +3113,8 @@ function AssistSheet({
|
|
|
3113
3113
|
padding: "12px",
|
|
3114
3114
|
borderRadius: "10px",
|
|
3115
3115
|
border: "none",
|
|
3116
|
-
backgroundColor:
|
|
3117
|
-
color:
|
|
3116
|
+
backgroundColor: t.accent,
|
|
3117
|
+
color: t.accentText,
|
|
3118
3118
|
fontSize: "14px",
|
|
3119
3119
|
fontWeight: 700,
|
|
3120
3120
|
fontFamily: "inherit",
|
|
@@ -3134,8 +3134,8 @@ function AssistSheet({
|
|
|
3134
3134
|
padding: "12px",
|
|
3135
3135
|
borderRadius: "10px",
|
|
3136
3136
|
border: "none",
|
|
3137
|
-
backgroundColor: isSubmitting || rating < 1 ?
|
|
3138
|
-
color: isSubmitting || rating < 1 ?
|
|
3137
|
+
backgroundColor: isSubmitting || rating < 1 ? t.bgSecondary : "#f59e0b",
|
|
3138
|
+
color: isSubmitting || rating < 1 ? t.textMuted : "#1a1a1a",
|
|
3139
3139
|
fontSize: "14px",
|
|
3140
3140
|
fontWeight: 700,
|
|
3141
3141
|
fontFamily: "inherit",
|
|
@@ -3184,7 +3184,7 @@ function AssistSheet({
|
|
|
3184
3184
|
height: "100%",
|
|
3185
3185
|
objectFit: "cover",
|
|
3186
3186
|
borderRadius: "8px",
|
|
3187
|
-
border: `1px solid ${read ?
|
|
3187
|
+
border: `1px solid ${read ? t.accent : t.inputBorder}`,
|
|
3188
3188
|
opacity: read ? 1 : 0.45,
|
|
3189
3189
|
boxSizing: "border-box"
|
|
3190
3190
|
}
|
|
@@ -3229,7 +3229,7 @@ function AssistSheet({
|
|
|
3229
3229
|
height: "20px",
|
|
3230
3230
|
boxSizing: "border-box",
|
|
3231
3231
|
borderRadius: "50%",
|
|
3232
|
-
border: `2px solid ${
|
|
3232
|
+
border: `2px solid ${t.bg}`,
|
|
3233
3233
|
background: "#ef4444",
|
|
3234
3234
|
color: "#fff",
|
|
3235
3235
|
display: "flex",
|
|
@@ -3272,7 +3272,7 @@ function AssistSheet({
|
|
|
3272
3272
|
gap: "6px",
|
|
3273
3273
|
padding: "0 10px",
|
|
3274
3274
|
borderRadius: "8px",
|
|
3275
|
-
border: `1px solid ${read ?
|
|
3275
|
+
border: `1px solid ${read ? t.accent : t.inputBorder}`,
|
|
3276
3276
|
opacity: read ? 1 : 0.55,
|
|
3277
3277
|
boxSizing: "border-box",
|
|
3278
3278
|
flexShrink: 0
|
|
@@ -3282,7 +3282,7 @@ function AssistSheet({
|
|
|
3282
3282
|
"path",
|
|
3283
3283
|
{
|
|
3284
3284
|
d: "M14 2H6a2 2 0 00-2 2v16a2 2 0 002 2h12a2 2 0 002-2V8z M14 2v6h6",
|
|
3285
|
-
stroke:
|
|
3285
|
+
stroke: t.textMuted,
|
|
3286
3286
|
strokeWidth: "1.5",
|
|
3287
3287
|
strokeLinecap: "round",
|
|
3288
3288
|
strokeLinejoin: "round"
|
|
@@ -3293,7 +3293,7 @@ function AssistSheet({
|
|
|
3293
3293
|
{
|
|
3294
3294
|
style: {
|
|
3295
3295
|
fontSize: "11.5px",
|
|
3296
|
-
color:
|
|
3296
|
+
color: t.text,
|
|
3297
3297
|
overflow: "hidden",
|
|
3298
3298
|
textOverflow: "ellipsis",
|
|
3299
3299
|
whiteSpace: "nowrap"
|
|
@@ -3337,7 +3337,7 @@ function AssistSheet({
|
|
|
3337
3337
|
height: "20px",
|
|
3338
3338
|
boxSizing: "border-box",
|
|
3339
3339
|
borderRadius: "50%",
|
|
3340
|
-
border: `2px solid ${
|
|
3340
|
+
border: `2px solid ${t.bg}`,
|
|
3341
3341
|
background: "#ef4444",
|
|
3342
3342
|
color: "#fff",
|
|
3343
3343
|
display: "flex",
|
|
@@ -3371,11 +3371,11 @@ function AssistSheet({
|
|
|
3371
3371
|
width: "40px",
|
|
3372
3372
|
height: "40px",
|
|
3373
3373
|
borderRadius: "8px",
|
|
3374
|
-
border: `1px dashed ${
|
|
3374
|
+
border: `1px dashed ${t.inputBorder}`,
|
|
3375
3375
|
display: "inline-flex",
|
|
3376
3376
|
alignItems: "center",
|
|
3377
3377
|
justifyContent: "center",
|
|
3378
|
-
color:
|
|
3378
|
+
color: t.textMuted,
|
|
3379
3379
|
fontSize: "18px",
|
|
3380
3380
|
cursor: "pointer",
|
|
3381
3381
|
flexShrink: 0
|
|
@@ -3408,7 +3408,7 @@ function AssistSheet({
|
|
|
3408
3408
|
]
|
|
3409
3409
|
}
|
|
3410
3410
|
),
|
|
3411
|
-
readShots.size < screenshots.length && /* @__PURE__ */ jsxs3("span", { style: { color:
|
|
3411
|
+
readShots.size < screenshots.length && /* @__PURE__ */ jsxs3("span", { style: { color: t.textMuted, fontSize: "11px" }, children: [
|
|
3412
3412
|
readShots.size,
|
|
3413
3413
|
" of ",
|
|
3414
3414
|
screenshots.length,
|
|
@@ -3442,9 +3442,9 @@ function AssistSheet({
|
|
|
3442
3442
|
maxHeight: "120px",
|
|
3443
3443
|
padding: "11px 12px",
|
|
3444
3444
|
borderRadius: "10px",
|
|
3445
|
-
border: `1px solid ${
|
|
3446
|
-
backgroundColor:
|
|
3447
|
-
color:
|
|
3445
|
+
border: `1px solid ${t.inputBorder}`,
|
|
3446
|
+
backgroundColor: t.inputBg,
|
|
3447
|
+
color: t.text,
|
|
3448
3448
|
fontSize: "13px",
|
|
3449
3449
|
lineHeight: 1.4,
|
|
3450
3450
|
fontFamily: "inherit",
|
|
@@ -3472,8 +3472,8 @@ function AssistSheet({
|
|
|
3472
3472
|
display: "inline-flex",
|
|
3473
3473
|
alignItems: "center",
|
|
3474
3474
|
justifyContent: "center",
|
|
3475
|
-
backgroundColor: busy || !input.trim() ?
|
|
3476
|
-
color: busy || !input.trim() ?
|
|
3475
|
+
backgroundColor: busy || !input.trim() ? t.bgSecondary : t.accent,
|
|
3476
|
+
color: busy || !input.trim() ? t.textMuted : t.accentText,
|
|
3477
3477
|
cursor: busy || !input.trim() ? "default" : "pointer"
|
|
3478
3478
|
},
|
|
3479
3479
|
children: /* @__PURE__ */ jsx3("svg", { width: "17", height: "17", viewBox: "0 0 24 24", fill: "none", "aria-hidden": "true", children: /* @__PURE__ */ jsx3(
|
|
@@ -3520,8 +3520,8 @@ function AssistSheet({
|
|
|
3520
3520
|
padding: "12px",
|
|
3521
3521
|
borderRadius: "10px",
|
|
3522
3522
|
border: "none",
|
|
3523
|
-
backgroundColor:
|
|
3524
|
-
color:
|
|
3523
|
+
backgroundColor: t.accent,
|
|
3524
|
+
color: t.accentText,
|
|
3525
3525
|
fontSize: "14px",
|
|
3526
3526
|
fontWeight: 700,
|
|
3527
3527
|
fontFamily: "inherit",
|
|
@@ -3561,9 +3561,9 @@ function AssistSheet({
|
|
|
3561
3561
|
flexShrink: 0,
|
|
3562
3562
|
width: "44px",
|
|
3563
3563
|
borderRadius: "10px",
|
|
3564
|
-
border: `1px solid ${
|
|
3564
|
+
border: `1px solid ${t.inputBorder}`,
|
|
3565
3565
|
background: "transparent",
|
|
3566
|
-
color:
|
|
3566
|
+
color: t.text,
|
|
3567
3567
|
display: "inline-flex",
|
|
3568
3568
|
alignItems: "center",
|
|
3569
3569
|
justifyContent: "center",
|
|
@@ -3594,8 +3594,8 @@ function AssistSheet({
|
|
|
3594
3594
|
padding: "12px",
|
|
3595
3595
|
borderRadius: "10px",
|
|
3596
3596
|
border: "none",
|
|
3597
|
-
backgroundColor: isSubmitting || !description.trim() ?
|
|
3598
|
-
color: isSubmitting || !description.trim() ?
|
|
3597
|
+
backgroundColor: isSubmitting || !description.trim() ? t.bgSecondary : t.accent,
|
|
3598
|
+
color: isSubmitting || !description.trim() ? t.textMuted : t.accentText,
|
|
3599
3599
|
fontSize: "14px",
|
|
3600
3600
|
fontWeight: 700,
|
|
3601
3601
|
fontFamily: "inherit",
|
|
@@ -3618,7 +3618,7 @@ function AssistSheet({
|
|
|
3618
3618
|
margin: "8px auto 0",
|
|
3619
3619
|
border: "none",
|
|
3620
3620
|
background: "transparent",
|
|
3621
|
-
color:
|
|
3621
|
+
color: t.textMuted,
|
|
3622
3622
|
fontSize: "11.5px",
|
|
3623
3623
|
fontFamily: "inherit",
|
|
3624
3624
|
padding: "6px 8px",
|
|
@@ -3640,7 +3640,7 @@ function AssistSheet({
|
|
|
3640
3640
|
margin: "-2px auto -8px",
|
|
3641
3641
|
border: "none",
|
|
3642
3642
|
background: "transparent",
|
|
3643
|
-
color:
|
|
3643
|
+
color: t.textMuted,
|
|
3644
3644
|
fontSize: "11.5px",
|
|
3645
3645
|
fontFamily: "inherit",
|
|
3646
3646
|
padding: "10px 8px",
|
|
@@ -3677,7 +3677,7 @@ function describeSentAlong(hasChat, screenshotCount) {
|
|
|
3677
3677
|
}
|
|
3678
3678
|
function GlitchgrabProblemPanel({
|
|
3679
3679
|
send,
|
|
3680
|
-
theme:
|
|
3680
|
+
theme: t,
|
|
3681
3681
|
surface,
|
|
3682
3682
|
conversationId,
|
|
3683
3683
|
reportType,
|
|
@@ -3766,9 +3766,9 @@ function GlitchgrabProblemPanel({
|
|
|
3766
3766
|
const secondaryButton = {
|
|
3767
3767
|
padding: "10px 14px",
|
|
3768
3768
|
borderRadius: "8px",
|
|
3769
|
-
border: `1px solid ${
|
|
3769
|
+
border: `1px solid ${t.inputBorder}`,
|
|
3770
3770
|
background: "transparent",
|
|
3771
|
-
color:
|
|
3771
|
+
color: t.text,
|
|
3772
3772
|
fontSize: "13px",
|
|
3773
3773
|
fontWeight: 600,
|
|
3774
3774
|
fontFamily: "inherit",
|
|
@@ -3778,8 +3778,8 @@ function GlitchgrabProblemPanel({
|
|
|
3778
3778
|
padding: "10px 14px",
|
|
3779
3779
|
borderRadius: "8px",
|
|
3780
3780
|
border: "none",
|
|
3781
|
-
backgroundColor: enabled ?
|
|
3782
|
-
color: enabled ?
|
|
3781
|
+
backgroundColor: enabled ? t.accent : t.bgSecondary,
|
|
3782
|
+
color: enabled ? t.accentText : t.textMuted,
|
|
3783
3783
|
fontSize: "13px",
|
|
3784
3784
|
fontWeight: 700,
|
|
3785
3785
|
fontFamily: "inherit",
|
|
@@ -3817,16 +3817,16 @@ function GlitchgrabProblemPanel({
|
|
|
3817
3817
|
width: "100%",
|
|
3818
3818
|
maxWidth: "420px",
|
|
3819
3819
|
boxSizing: "border-box",
|
|
3820
|
-
backgroundColor:
|
|
3821
|
-
color:
|
|
3822
|
-
border: `1px solid ${
|
|
3820
|
+
backgroundColor: t.bg,
|
|
3821
|
+
color: t.text,
|
|
3822
|
+
border: `1px solid ${t.border}`,
|
|
3823
3823
|
borderRadius: "12px",
|
|
3824
3824
|
boxShadow: "0 20px 50px rgba(0,0,0,0.5)",
|
|
3825
3825
|
padding: "18px"
|
|
3826
3826
|
},
|
|
3827
3827
|
children: sent ? /* @__PURE__ */ jsxs4(Fragment3, { children: [
|
|
3828
3828
|
/* @__PURE__ */ jsx4("div", { id: "gg-self-report-title", style: { fontSize: "15px", fontWeight: 600 }, children: "Sent to the Glitchgrab team" }),
|
|
3829
|
-
/* @__PURE__ */ jsx4("p", { style: { margin: "6px 0 16px", fontSize: "13px", lineHeight: 1.5, color:
|
|
3829
|
+
/* @__PURE__ */ jsx4("p", { style: { margin: "6px 0 16px", fontSize: "13px", lineHeight: 1.5, color: t.textMuted }, children: "Thanks \u2014 we'll look into it. Your report is still open behind this, exactly as you left it." }),
|
|
3830
3830
|
/* @__PURE__ */ jsx4(
|
|
3831
3831
|
"button",
|
|
3832
3832
|
{
|
|
@@ -3858,7 +3858,7 @@ function GlitchgrabProblemPanel({
|
|
|
3858
3858
|
style: {
|
|
3859
3859
|
border: "none",
|
|
3860
3860
|
background: "transparent",
|
|
3861
|
-
color:
|
|
3861
|
+
color: t.textMuted,
|
|
3862
3862
|
fontSize: "18px",
|
|
3863
3863
|
lineHeight: 1,
|
|
3864
3864
|
cursor: "pointer",
|
|
@@ -3871,7 +3871,7 @@ function GlitchgrabProblemPanel({
|
|
|
3871
3871
|
]
|
|
3872
3872
|
}
|
|
3873
3873
|
),
|
|
3874
|
-
/* @__PURE__ */ jsx4("p", { style: { margin: "6px 0 12px", fontSize: "13px", lineHeight: 1.5, color:
|
|
3874
|
+
/* @__PURE__ */ jsx4("p", { style: { margin: "6px 0 12px", fontSize: "13px", lineHeight: 1.5, color: t.textMuted }, children: "This goes to the people who build this reporter \u2014 not to this project's team. Tell us what went wrong: the AI chat, a button, anything." }),
|
|
3875
3875
|
/* @__PURE__ */ jsx4(
|
|
3876
3876
|
"textarea",
|
|
3877
3877
|
{
|
|
@@ -3896,9 +3896,9 @@ function GlitchgrabProblemPanel({
|
|
|
3896
3896
|
resize: "vertical",
|
|
3897
3897
|
padding: "10px 12px",
|
|
3898
3898
|
borderRadius: "8px",
|
|
3899
|
-
border: `1px solid ${
|
|
3900
|
-
backgroundColor:
|
|
3901
|
-
color:
|
|
3899
|
+
border: `1px solid ${t.inputBorder}`,
|
|
3900
|
+
backgroundColor: t.inputBg,
|
|
3901
|
+
color: t.text,
|
|
3902
3902
|
fontSize: "14px",
|
|
3903
3903
|
lineHeight: 1.45,
|
|
3904
3904
|
fontFamily: "inherit",
|
|
@@ -3931,7 +3931,7 @@ function GlitchgrabProblemPanel({
|
|
|
3931
3931
|
display: "block",
|
|
3932
3932
|
boxSizing: "border-box",
|
|
3933
3933
|
borderRadius: "8px",
|
|
3934
|
-
border: `1px solid ${
|
|
3934
|
+
border: `1px solid ${t.inputBorder}`
|
|
3935
3935
|
}
|
|
3936
3936
|
}
|
|
3937
3937
|
),
|
|
@@ -3967,7 +3967,7 @@ function GlitchgrabProblemPanel({
|
|
|
3967
3967
|
height: "20px",
|
|
3968
3968
|
boxSizing: "border-box",
|
|
3969
3969
|
borderRadius: "50%",
|
|
3970
|
-
border: `2px solid ${
|
|
3970
|
+
border: `2px solid ${t.bg}`,
|
|
3971
3971
|
background: "#ef4444",
|
|
3972
3972
|
color: "#fff",
|
|
3973
3973
|
display: "flex",
|
|
@@ -4004,9 +4004,9 @@ function GlitchgrabProblemPanel({
|
|
|
4004
4004
|
padding: "0 12px",
|
|
4005
4005
|
boxSizing: "border-box",
|
|
4006
4006
|
borderRadius: "8px",
|
|
4007
|
-
border: `1px dashed ${
|
|
4007
|
+
border: `1px dashed ${t.inputBorder}`,
|
|
4008
4008
|
background: "transparent",
|
|
4009
|
-
color:
|
|
4009
|
+
color: t.textMuted,
|
|
4010
4010
|
fontSize: "12.5px",
|
|
4011
4011
|
fontWeight: 600,
|
|
4012
4012
|
fontFamily: "inherit",
|
|
@@ -4038,7 +4038,7 @@ function GlitchgrabProblemPanel({
|
|
|
4038
4038
|
"p",
|
|
4039
4039
|
{
|
|
4040
4040
|
"data-gg-self-report-includes": "",
|
|
4041
|
-
style: { margin: "8px 0 0", fontSize: "11.5px", lineHeight: 1.45, color:
|
|
4041
|
+
style: { margin: "8px 0 0", fontSize: "11.5px", lineHeight: 1.45, color: t.textMuted },
|
|
4042
4042
|
children: [
|
|
4043
4043
|
"Also sent, so we can see what happened:",
|
|
4044
4044
|
" ",
|
|
@@ -4224,29 +4224,6 @@ function captureDefaultScreenshot(options) {
|
|
|
4224
4224
|
});
|
|
4225
4225
|
return inFlight;
|
|
4226
4226
|
}
|
|
4227
|
-
var SEVERITY_REQUIRED = "Pick how bad it is before sending.";
|
|
4228
|
-
var SHOT_WAIT_MS = 3e3;
|
|
4229
|
-
var SIMILAR_WAIT_MS = 2500;
|
|
4230
|
-
var MAX_SIMILAR_SHOWN = 3;
|
|
4231
|
-
function ButtonSpinner() {
|
|
4232
|
-
return /* @__PURE__ */ jsx5(
|
|
4233
|
-
"span",
|
|
4234
|
-
{
|
|
4235
|
-
"aria-hidden": "true",
|
|
4236
|
-
style: {
|
|
4237
|
-
display: "inline-block",
|
|
4238
|
-
width: "11px",
|
|
4239
|
-
height: "11px",
|
|
4240
|
-
marginRight: "6px",
|
|
4241
|
-
verticalAlign: "-1px",
|
|
4242
|
-
border: "2px solid currentColor",
|
|
4243
|
-
borderRightColor: "transparent",
|
|
4244
|
-
borderRadius: "50%",
|
|
4245
|
-
animation: "gg-spin .7s linear infinite"
|
|
4246
|
-
}
|
|
4247
|
-
}
|
|
4248
|
-
);
|
|
4249
|
-
}
|
|
4250
4227
|
function detectDark() {
|
|
4251
4228
|
if (typeof window === "undefined") return true;
|
|
4252
4229
|
try {
|
|
@@ -4359,6 +4336,29 @@ function detectHostAccent() {
|
|
|
4359
4336
|
return null;
|
|
4360
4337
|
}
|
|
4361
4338
|
}
|
|
4339
|
+
var SEVERITY_REQUIRED = "Pick how bad it is before sending.";
|
|
4340
|
+
var SHOT_WAIT_MS = 3e3;
|
|
4341
|
+
var SIMILAR_WAIT_MS = 2500;
|
|
4342
|
+
var MAX_SIMILAR_SHOWN = 3;
|
|
4343
|
+
function ButtonSpinner() {
|
|
4344
|
+
return /* @__PURE__ */ jsx5(
|
|
4345
|
+
"span",
|
|
4346
|
+
{
|
|
4347
|
+
"aria-hidden": "true",
|
|
4348
|
+
style: {
|
|
4349
|
+
display: "inline-block",
|
|
4350
|
+
width: "11px",
|
|
4351
|
+
height: "11px",
|
|
4352
|
+
marginRight: "6px",
|
|
4353
|
+
verticalAlign: "-1px",
|
|
4354
|
+
border: "2px solid currentColor",
|
|
4355
|
+
borderRightColor: "transparent",
|
|
4356
|
+
borderRadius: "50%",
|
|
4357
|
+
animation: "gg-spin .7s linear infinite"
|
|
4358
|
+
}
|
|
4359
|
+
}
|
|
4360
|
+
);
|
|
4361
|
+
}
|
|
4362
4362
|
function initialsOf(name) {
|
|
4363
4363
|
return name.trim().split(/\s+/).slice(0, 2).map((part) => {
|
|
4364
4364
|
var _a, _b;
|
|
@@ -4367,7 +4367,7 @@ function initialsOf(name) {
|
|
|
4367
4367
|
}
|
|
4368
4368
|
function ReporterChip({
|
|
4369
4369
|
reporter,
|
|
4370
|
-
t
|
|
4370
|
+
t
|
|
4371
4371
|
}) {
|
|
4372
4372
|
var _a;
|
|
4373
4373
|
const [avatarFailed, setAvatarFailed] = useState4(false);
|
|
@@ -4377,7 +4377,7 @@ function ReporterChip({
|
|
|
4377
4377
|
}, [avatarUrl]);
|
|
4378
4378
|
const name = ((_a = reporter == null ? void 0 : reporter.name) == null ? void 0 : _a.trim()) || "";
|
|
4379
4379
|
const isAnonymous = !name;
|
|
4380
|
-
const
|
|
4380
|
+
const initials2 = isAnonymous ? "" : initialsOf(name);
|
|
4381
4381
|
const label = isAnonymous ? "Anonymous" : name;
|
|
4382
4382
|
const title = isAnonymous ? "No reporter identity was passed to Glitchgrab \u2014 this report won't be attributed to anyone" : [name, reporter == null ? void 0 : reporter.email, reporter == null ? void 0 : reporter.role].filter(Boolean).join(" \xB7 ");
|
|
4383
4383
|
const showAvatarImage = !!avatarUrl && !avatarFailed;
|
|
@@ -4403,9 +4403,9 @@ function ReporterChip({
|
|
|
4403
4403
|
fontSize: "8px",
|
|
4404
4404
|
fontWeight: 700,
|
|
4405
4405
|
letterSpacing: "0.02em",
|
|
4406
|
-
background: isAnonymous ?
|
|
4407
|
-
color: isAnonymous ?
|
|
4408
|
-
border: `1px solid ${isAnonymous ?
|
|
4406
|
+
background: isAnonymous ? t.inputBg : t.accent,
|
|
4407
|
+
color: isAnonymous ? t.textMuted : t.accentText,
|
|
4408
|
+
border: `1px solid ${isAnonymous ? t.inputBorder : "transparent"}`
|
|
4409
4409
|
},
|
|
4410
4410
|
children: showAvatarImage ? /* @__PURE__ */ jsx5(
|
|
4411
4411
|
"img",
|
|
@@ -4417,7 +4417,7 @@ function ReporterChip({
|
|
|
4417
4417
|
onError: () => setAvatarFailed(true),
|
|
4418
4418
|
style: { width: "100%", height: "100%", objectFit: "cover" }
|
|
4419
4419
|
}
|
|
4420
|
-
) :
|
|
4420
|
+
) : initials2 ? initials2 : /* @__PURE__ */ jsxs5("svg", { width: "10", height: "10", viewBox: "0 0 16 16", fill: "none", children: [
|
|
4421
4421
|
/* @__PURE__ */ jsx5("circle", { cx: "8", cy: "5.5", r: "2.75", stroke: "currentColor", strokeWidth: "1.4" }),
|
|
4422
4422
|
/* @__PURE__ */ jsx5(
|
|
4423
4423
|
"path",
|
|
@@ -4436,7 +4436,7 @@ function ReporterChip({
|
|
|
4436
4436
|
{
|
|
4437
4437
|
style: {
|
|
4438
4438
|
fontSize: "11px",
|
|
4439
|
-
color:
|
|
4439
|
+
color: t.textMuted,
|
|
4440
4440
|
overflow: "hidden",
|
|
4441
4441
|
textOverflow: "ellipsis",
|
|
4442
4442
|
whiteSpace: "nowrap"
|
|
@@ -4734,17 +4734,17 @@ function ReportDialog({
|
|
|
4734
4734
|
(_c = tiles[next]) == null ? void 0 : _c.focus();
|
|
4735
4735
|
};
|
|
4736
4736
|
const isDark = useMemo2(() => isOpen ? detectDark() : true, [isOpen]);
|
|
4737
|
-
const
|
|
4737
|
+
const t = getTheme(isDark);
|
|
4738
4738
|
const layerTheme = {
|
|
4739
|
-
bg:
|
|
4740
|
-
bgSecondary:
|
|
4741
|
-
border:
|
|
4742
|
-
text:
|
|
4743
|
-
textMuted:
|
|
4744
|
-
inputBg:
|
|
4745
|
-
inputBorder:
|
|
4746
|
-
accent:
|
|
4747
|
-
accentText:
|
|
4739
|
+
bg: t.bg,
|
|
4740
|
+
bgSecondary: t.bgSecondary,
|
|
4741
|
+
border: t.border,
|
|
4742
|
+
text: t.text,
|
|
4743
|
+
textMuted: t.textMuted,
|
|
4744
|
+
inputBg: t.inputBg,
|
|
4745
|
+
inputBorder: t.inputBorder,
|
|
4746
|
+
accent: t.accent,
|
|
4747
|
+
accentText: t.accentText
|
|
4748
4748
|
};
|
|
4749
4749
|
const canZoomPreview = previewNatural !== null && typeof window !== "undefined" && (previewNatural.w > window.innerWidth - 32 || previewNatural.h > window.innerHeight - 80);
|
|
4750
4750
|
const handleFileUpload = (e) => {
|
|
@@ -4966,7 +4966,7 @@ function ReportDialog({
|
|
|
4966
4966
|
sarvamChunksRef.current = [];
|
|
4967
4967
|
const stream = streamRef.current;
|
|
4968
4968
|
streamRef.current = null;
|
|
4969
|
-
stream == null ? void 0 : stream.getTracks().forEach((
|
|
4969
|
+
stream == null ? void 0 : stream.getTracks().forEach((t2) => t2.stop());
|
|
4970
4970
|
try {
|
|
4971
4971
|
(_b = mediaRecorderRef.current) == null ? void 0 : _b.stop();
|
|
4972
4972
|
} catch (e) {
|
|
@@ -5068,7 +5068,7 @@ function ReportDialog({
|
|
|
5068
5068
|
};
|
|
5069
5069
|
rec.onstop = async () => {
|
|
5070
5070
|
var _a3;
|
|
5071
|
-
stream.getTracks().forEach((
|
|
5071
|
+
stream.getTracks().forEach((t2) => t2.stop());
|
|
5072
5072
|
if (streamRef.current === stream) streamRef.current = null;
|
|
5073
5073
|
mediaRecorderRef.current = null;
|
|
5074
5074
|
const chunks = sarvamChunksRef.current;
|
|
@@ -5351,7 +5351,7 @@ function ReportDialog({
|
|
|
5351
5351
|
button[data-gg-type]{transition:transform .15s ease,border-color .15s ease,box-shadow .15s ease,background-color .15s ease}
|
|
5352
5352
|
button[data-gg-type]:hover{transform:translateY(-2px);box-shadow:0 6px 16px rgba(0,0,0,.18)}
|
|
5353
5353
|
button[data-gg-type]:active{transform:translateY(0) scale(.985);box-shadow:none}
|
|
5354
|
-
button[data-gg-type]:focus-visible{outline:2px solid ${
|
|
5354
|
+
button[data-gg-type]:focus-visible{outline:2px solid ${t.accent};outline-offset:2px}
|
|
5355
5355
|
@keyframes gg-star-pop{0%{transform:scale(.6);opacity:0}60%{transform:scale(1.12)}100%{transform:scale(1);opacity:1}}
|
|
5356
5356
|
button[data-gg-star]{transition:transform .12s ease}
|
|
5357
5357
|
button[data-gg-star]:hover{transform:scale(1.18)}
|
|
@@ -5398,15 +5398,15 @@ function ReportDialog({
|
|
|
5398
5398
|
width: sheet ? "440px" : "420px",
|
|
5399
5399
|
maxWidth: sheet ? "100%" : "calc(100% - 32px)",
|
|
5400
5400
|
maxHeight: sheet ? "100dvh" : "calc(100dvh - 32px)",
|
|
5401
|
-
...sheet ? { height: "100dvh", borderLeft: `1px solid ${
|
|
5401
|
+
...sheet ? { height: "100dvh", borderLeft: `1px solid ${t.inputBorder}` } : {},
|
|
5402
5402
|
display: "flex",
|
|
5403
5403
|
flexDirection: "column",
|
|
5404
|
-
backgroundColor:
|
|
5404
|
+
backgroundColor: t.bg,
|
|
5405
5405
|
borderRadius: sheet ? 0 : "12px",
|
|
5406
5406
|
boxShadow: sheet ? "0 20px 60px rgba(0, 0, 0, 0.35)" : "0 20px 60px rgba(0, 0, 0, 0.2), 0 4px 16px rgba(0, 0, 0, 0.1)",
|
|
5407
5407
|
fontFamily: '-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif',
|
|
5408
5408
|
overflow: "hidden",
|
|
5409
|
-
color:
|
|
5409
|
+
color: t.text,
|
|
5410
5410
|
isolation: "isolate"
|
|
5411
5411
|
},
|
|
5412
5412
|
children: [
|
|
@@ -5416,7 +5416,7 @@ function ReportDialog({
|
|
|
5416
5416
|
style: {
|
|
5417
5417
|
flexShrink: 0,
|
|
5418
5418
|
padding: "16px 16px 12px",
|
|
5419
|
-
borderBottom: `1px solid ${
|
|
5419
|
+
borderBottom: `1px solid ${t.border}`
|
|
5420
5420
|
},
|
|
5421
5421
|
children: [
|
|
5422
5422
|
/* @__PURE__ */ jsxs5(
|
|
@@ -5462,7 +5462,7 @@ function ReportDialog({
|
|
|
5462
5462
|
"path",
|
|
5463
5463
|
{
|
|
5464
5464
|
d: "M10 3L5 8L10 13",
|
|
5465
|
-
stroke:
|
|
5465
|
+
stroke: t.textMuted,
|
|
5466
5466
|
strokeWidth: "2",
|
|
5467
5467
|
strokeLinecap: "round",
|
|
5468
5468
|
strokeLinejoin: "round"
|
|
@@ -5478,7 +5478,7 @@ function ReportDialog({
|
|
|
5478
5478
|
style: {
|
|
5479
5479
|
fontSize: "15px",
|
|
5480
5480
|
fontWeight: 600,
|
|
5481
|
-
color:
|
|
5481
|
+
color: t.text
|
|
5482
5482
|
},
|
|
5483
5483
|
children: step === 1 ? "What's on your mind?" : "Tell us more"
|
|
5484
5484
|
}
|
|
@@ -5505,9 +5505,9 @@ function ReportDialog({
|
|
|
5505
5505
|
lineHeight: 1,
|
|
5506
5506
|
padding: "3px 6px",
|
|
5507
5507
|
borderRadius: "4px",
|
|
5508
|
-
border: `1px solid ${
|
|
5509
|
-
background:
|
|
5510
|
-
color:
|
|
5508
|
+
border: `1px solid ${t.inputBorder}`,
|
|
5509
|
+
background: t.inputBg,
|
|
5510
|
+
color: t.textMuted,
|
|
5511
5511
|
whiteSpace: "nowrap"
|
|
5512
5512
|
},
|
|
5513
5513
|
children: getShortcutLabel()
|
|
@@ -5540,7 +5540,7 @@ function ReportDialog({
|
|
|
5540
5540
|
"path",
|
|
5541
5541
|
{
|
|
5542
5542
|
d: "M4 4L12 12M12 4L4 12",
|
|
5543
|
-
stroke:
|
|
5543
|
+
stroke: t.textMuted,
|
|
5544
5544
|
strokeWidth: "2",
|
|
5545
5545
|
strokeLinecap: "round"
|
|
5546
5546
|
}
|
|
@@ -5577,7 +5577,7 @@ function ReportDialog({
|
|
|
5577
5577
|
width: "8px",
|
|
5578
5578
|
height: "8px",
|
|
5579
5579
|
borderRadius: "50%",
|
|
5580
|
-
backgroundColor: s <= step ?
|
|
5580
|
+
backgroundColor: s <= step ? t.accent : t.inputBorder,
|
|
5581
5581
|
transition: "background-color 0.2s ease"
|
|
5582
5582
|
}
|
|
5583
5583
|
}
|
|
@@ -5588,7 +5588,7 @@ function ReportDialog({
|
|
|
5588
5588
|
style: {
|
|
5589
5589
|
width: "40px",
|
|
5590
5590
|
height: "2px",
|
|
5591
|
-
backgroundColor: s < step ?
|
|
5591
|
+
backgroundColor: s < step ? t.accent : t.inputBorder,
|
|
5592
5592
|
transition: "background-color 0.2s ease"
|
|
5593
5593
|
}
|
|
5594
5594
|
}
|
|
@@ -5617,7 +5617,7 @@ function ReportDialog({
|
|
|
5617
5617
|
style: {
|
|
5618
5618
|
textAlign: "center",
|
|
5619
5619
|
padding: "20px 0",
|
|
5620
|
-
color:
|
|
5620
|
+
color: t.accent,
|
|
5621
5621
|
fontSize: "14px",
|
|
5622
5622
|
fontWeight: 500
|
|
5623
5623
|
},
|
|
@@ -5656,7 +5656,7 @@ function ReportDialog({
|
|
|
5656
5656
|
/* @__PURE__ */ jsx5(
|
|
5657
5657
|
"span",
|
|
5658
5658
|
{
|
|
5659
|
-
style: { fontSize: "13px", fontWeight: 600, color:
|
|
5659
|
+
style: { fontSize: "13px", fontWeight: 600, color: t.text },
|
|
5660
5660
|
children: "How are we doing?"
|
|
5661
5661
|
}
|
|
5662
5662
|
),
|
|
@@ -5710,9 +5710,9 @@ function ReportDialog({
|
|
|
5710
5710
|
marginBottom: "16px"
|
|
5711
5711
|
},
|
|
5712
5712
|
children: [
|
|
5713
|
-
/* @__PURE__ */ jsx5("span", { style: { flex: 1, height: "1px", background:
|
|
5714
|
-
/* @__PURE__ */ jsx5("span", { style: { fontSize: "11px", color:
|
|
5715
|
-
/* @__PURE__ */ jsx5("span", { style: { flex: 1, height: "1px", background:
|
|
5713
|
+
/* @__PURE__ */ jsx5("span", { style: { flex: 1, height: "1px", background: t.border } }),
|
|
5714
|
+
/* @__PURE__ */ jsx5("span", { style: { fontSize: "11px", color: t.textMuted }, children: "or report something" }),
|
|
5715
|
+
/* @__PURE__ */ jsx5("span", { style: { flex: 1, height: "1px", background: t.border } })
|
|
5716
5716
|
]
|
|
5717
5717
|
}
|
|
5718
5718
|
),
|
|
@@ -5725,9 +5725,9 @@ function ReportDialog({
|
|
|
5725
5725
|
gap: "10px",
|
|
5726
5726
|
marginBottom: "14px",
|
|
5727
5727
|
padding: "8px 10px",
|
|
5728
|
-
border: `1px solid ${
|
|
5728
|
+
border: `1px solid ${t.inputBorder}`,
|
|
5729
5729
|
borderRadius: "8px",
|
|
5730
|
-
background:
|
|
5730
|
+
background: t.inputBg
|
|
5731
5731
|
},
|
|
5732
5732
|
children: [
|
|
5733
5733
|
/* @__PURE__ */ jsx5(
|
|
@@ -5740,12 +5740,12 @@ function ReportDialog({
|
|
|
5740
5740
|
height: "24px",
|
|
5741
5741
|
objectFit: "cover",
|
|
5742
5742
|
borderRadius: "4px",
|
|
5743
|
-
border: `1px solid ${
|
|
5743
|
+
border: `1px solid ${t.border}`,
|
|
5744
5744
|
flexShrink: 0
|
|
5745
5745
|
}
|
|
5746
5746
|
}
|
|
5747
5747
|
),
|
|
5748
|
-
/* @__PURE__ */ jsx5("span", { style: { fontSize: "11px", color:
|
|
5748
|
+
/* @__PURE__ */ jsx5("span", { style: { fontSize: "11px", color: t.textMuted, flex: 1 }, children: "Screenshot attached" }),
|
|
5749
5749
|
/* @__PURE__ */ jsx5(
|
|
5750
5750
|
"button",
|
|
5751
5751
|
{
|
|
@@ -5755,7 +5755,7 @@ function ReportDialog({
|
|
|
5755
5755
|
style: {
|
|
5756
5756
|
border: "none",
|
|
5757
5757
|
background: "transparent",
|
|
5758
|
-
color:
|
|
5758
|
+
color: t.textMuted,
|
|
5759
5759
|
cursor: "pointer",
|
|
5760
5760
|
fontSize: "15px",
|
|
5761
5761
|
lineHeight: 1,
|
|
@@ -5794,20 +5794,20 @@ function ReportDialog({
|
|
|
5794
5794
|
gap: "9px",
|
|
5795
5795
|
padding: "18px 10px",
|
|
5796
5796
|
borderRadius: "8px",
|
|
5797
|
-
border: `1px solid ${
|
|
5798
|
-
background:
|
|
5797
|
+
border: `1px solid ${t.inputBorder}`,
|
|
5798
|
+
background: t.inputBg,
|
|
5799
5799
|
cursor: "pointer",
|
|
5800
|
-
color:
|
|
5800
|
+
color: t.text,
|
|
5801
5801
|
fontFamily: "inherit"
|
|
5802
5802
|
},
|
|
5803
5803
|
onMouseEnter: (e) => {
|
|
5804
|
-
e.currentTarget.style.borderColor =
|
|
5804
|
+
e.currentTarget.style.borderColor = t.accent;
|
|
5805
5805
|
},
|
|
5806
5806
|
onMouseLeave: (e) => {
|
|
5807
|
-
e.currentTarget.style.borderColor =
|
|
5807
|
+
e.currentTarget.style.borderColor = t.inputBorder;
|
|
5808
5808
|
},
|
|
5809
5809
|
children: [
|
|
5810
|
-
getTypeIcon(type,
|
|
5810
|
+
getTypeIcon(type, t.accent, 22),
|
|
5811
5811
|
/* @__PURE__ */ jsx5(
|
|
5812
5812
|
"span",
|
|
5813
5813
|
{
|
|
@@ -5840,18 +5840,18 @@ function ReportDialog({
|
|
|
5840
5840
|
marginBottom: "10px",
|
|
5841
5841
|
padding: "4px 10px 4px 8px",
|
|
5842
5842
|
borderRadius: "999px",
|
|
5843
|
-
border: `1px solid ${isRating ? "rgba(245,158,11,0.4)" :
|
|
5844
|
-
background: isRating ? "rgba(245,158,11,0.1)" :
|
|
5845
|
-
color:
|
|
5843
|
+
border: `1px solid ${isRating ? "rgba(245,158,11,0.4)" : t.inputBorder}`,
|
|
5844
|
+
background: isRating ? "rgba(245,158,11,0.1)" : t.inputBg,
|
|
5845
|
+
color: t.text,
|
|
5846
5846
|
fontSize: "11px",
|
|
5847
5847
|
fontWeight: 600,
|
|
5848
5848
|
fontFamily: "inherit",
|
|
5849
5849
|
cursor: availableTypes.length === 1 ? "default" : "pointer"
|
|
5850
5850
|
},
|
|
5851
5851
|
children: [
|
|
5852
|
-
getTypeIcon(reportType, isRating ? "#f59e0b" :
|
|
5852
|
+
getTypeIcon(reportType, isRating ? "#f59e0b" : t.accent, 13),
|
|
5853
5853
|
getTypeLabel(reportType),
|
|
5854
|
-
availableTypes.length > 1 && /* @__PURE__ */ jsx5("span", { style: { color:
|
|
5854
|
+
availableTypes.length > 1 && /* @__PURE__ */ jsx5("span", { style: { color: t.textMuted, fontWeight: 400 }, children: "\xB7 change" })
|
|
5855
5855
|
]
|
|
5856
5856
|
}
|
|
5857
5857
|
),
|
|
@@ -5888,7 +5888,7 @@ function ReportDialog({
|
|
|
5888
5888
|
{
|
|
5889
5889
|
d: "M12 3l2.6 5.3 5.9.9-4.3 4.1 1 5.8L12 16.4 6.8 19.1l1-5.8L3.5 9.2l5.9-.9L12 3z",
|
|
5890
5890
|
fill: filled ? "#f59e0b" : "transparent",
|
|
5891
|
-
stroke: filled ? "#f59e0b" :
|
|
5891
|
+
stroke: filled ? "#f59e0b" : t.inputBorder,
|
|
5892
5892
|
strokeWidth: "1.5",
|
|
5893
5893
|
strokeLinejoin: "round"
|
|
5894
5894
|
}
|
|
@@ -5916,9 +5916,9 @@ function ReportDialog({
|
|
|
5916
5916
|
// 8px vertical keeps the tap target at ~32px.
|
|
5917
5917
|
padding: "8px 10px",
|
|
5918
5918
|
borderRadius: "6px",
|
|
5919
|
-
border: `1px solid ${
|
|
5919
|
+
border: `1px solid ${t.accent}`,
|
|
5920
5920
|
background: "transparent",
|
|
5921
|
-
color:
|
|
5921
|
+
color: t.accent,
|
|
5922
5922
|
fontSize: "12px",
|
|
5923
5923
|
fontWeight: 600,
|
|
5924
5924
|
fontFamily: "inherit",
|
|
@@ -5930,7 +5930,7 @@ function ReportDialog({
|
|
|
5930
5930
|
"path",
|
|
5931
5931
|
{
|
|
5932
5932
|
d: "M12 3l1.5 4.5L18 9l-4.5 1.5L12 15l-1.5-4.5L6 9l4.5-1.5L12 3zM19 15l.75 2.25L22 18l-2.25.75L19 21l-.75-2.25L16 18l2.25-.75L19 15z",
|
|
5933
|
-
stroke:
|
|
5933
|
+
stroke: t.accent,
|
|
5934
5934
|
strokeWidth: "1.5",
|
|
5935
5935
|
strokeLinejoin: "round"
|
|
5936
5936
|
}
|
|
@@ -5960,24 +5960,24 @@ function ReportDialog({
|
|
|
5960
5960
|
minHeight: "100px",
|
|
5961
5961
|
padding: enhanceText2 ? "28px 12px 36px" : transcribeAudio2 ? "10px 12px 36px" : "10px 12px",
|
|
5962
5962
|
borderRadius: "8px",
|
|
5963
|
-
border: `1px solid ${isTranscribing ? "#f59e0b" : isListening ?
|
|
5963
|
+
border: `1px solid ${isTranscribing ? "#f59e0b" : isListening ? t.accent : t.inputBorder}`,
|
|
5964
5964
|
fontSize: "14px",
|
|
5965
5965
|
fontFamily: "inherit",
|
|
5966
5966
|
resize: "none",
|
|
5967
5967
|
outline: "none",
|
|
5968
5968
|
boxSizing: "border-box",
|
|
5969
|
-
color:
|
|
5970
|
-
backgroundColor:
|
|
5969
|
+
color: t.text,
|
|
5970
|
+
backgroundColor: t.inputBg,
|
|
5971
5971
|
transition: "border-color 0.2s ease"
|
|
5972
5972
|
},
|
|
5973
5973
|
onKeyDown: handleSpaceDown,
|
|
5974
5974
|
onKeyUp: handleSpaceUp,
|
|
5975
5975
|
onFocus: (e) => {
|
|
5976
|
-
e.target.style.borderColor =
|
|
5976
|
+
e.target.style.borderColor = t.accent;
|
|
5977
5977
|
},
|
|
5978
5978
|
onBlur: (e) => {
|
|
5979
5979
|
if (!isListening && !isTranscribing)
|
|
5980
|
-
e.target.style.borderColor =
|
|
5980
|
+
e.target.style.borderColor = t.inputBorder;
|
|
5981
5981
|
},
|
|
5982
5982
|
autoFocus: true
|
|
5983
5983
|
}
|
|
@@ -6094,13 +6094,13 @@ function ReportDialog({
|
|
|
6094
6094
|
display: "inline-flex",
|
|
6095
6095
|
alignItems: "center",
|
|
6096
6096
|
gap: "4px",
|
|
6097
|
-
background:
|
|
6097
|
+
background: t.inputBg,
|
|
6098
6098
|
border: "none",
|
|
6099
6099
|
padding: "2px 6px",
|
|
6100
6100
|
borderRadius: "4px",
|
|
6101
6101
|
fontFamily: "inherit",
|
|
6102
6102
|
fontSize: "11px",
|
|
6103
|
-
color:
|
|
6103
|
+
color: t.textMuted,
|
|
6104
6104
|
cursor: !description.trim() || isEnhancing ? "default" : "pointer",
|
|
6105
6105
|
opacity: !description.trim() ? 0.5 : 1,
|
|
6106
6106
|
zIndex: 1
|
|
@@ -6119,7 +6119,7 @@ function ReportDialog({
|
|
|
6119
6119
|
"path",
|
|
6120
6120
|
{
|
|
6121
6121
|
d: "M12 3l1.5 4.5L18 9l-4.5 1.5L12 15l-1.5-4.5L6 9l4.5-1.5L12 3zM19 15l.75 2.25L22 18l-2.25.75L19 21l-.75-2.25L16 18l2.25-.75L19 15z",
|
|
6122
|
-
stroke:
|
|
6122
|
+
stroke: t.textMuted,
|
|
6123
6123
|
strokeWidth: "1.5",
|
|
6124
6124
|
strokeLinejoin: "round"
|
|
6125
6125
|
}
|
|
@@ -6148,9 +6148,9 @@ function ReportDialog({
|
|
|
6148
6148
|
alignItems: "center",
|
|
6149
6149
|
justifyContent: "center",
|
|
6150
6150
|
background: "transparent",
|
|
6151
|
-
border: `1.5px solid ${isListening ? "#ef4444" :
|
|
6151
|
+
border: `1.5px solid ${isListening ? "#ef4444" : t.inputBorder}`,
|
|
6152
6152
|
borderRadius: "6px",
|
|
6153
|
-
color: isListening ? "#ef4444" :
|
|
6153
|
+
color: isListening ? "#ef4444" : t.textMuted,
|
|
6154
6154
|
cursor: "pointer",
|
|
6155
6155
|
zIndex: 1,
|
|
6156
6156
|
padding: 0,
|
|
@@ -6220,7 +6220,7 @@ function ReportDialog({
|
|
|
6220
6220
|
gap: "5px",
|
|
6221
6221
|
marginTop: "5px",
|
|
6222
6222
|
fontSize: "11px",
|
|
6223
|
-
color:
|
|
6223
|
+
color: t.text,
|
|
6224
6224
|
opacity: 0.55,
|
|
6225
6225
|
userSelect: "none"
|
|
6226
6226
|
},
|
|
@@ -6245,7 +6245,7 @@ function ReportDialog({
|
|
|
6245
6245
|
padding: "6px 8px",
|
|
6246
6246
|
borderRadius: "6px",
|
|
6247
6247
|
background: isDark ? "rgba(34,211,238,0.06)" : "rgba(8,145,178,0.05)",
|
|
6248
|
-
border: `1px solid ${
|
|
6248
|
+
border: `1px solid ${t.accent}40`
|
|
6249
6249
|
},
|
|
6250
6250
|
children: [
|
|
6251
6251
|
/* @__PURE__ */ jsx5(
|
|
@@ -6260,7 +6260,7 @@ function ReportDialog({
|
|
|
6260
6260
|
"path",
|
|
6261
6261
|
{
|
|
6262
6262
|
d: "M12 3l1.5 4.5L18 9l-4.5 1.5L12 15l-1.5-4.5L6 9l4.5-1.5L12 3z",
|
|
6263
|
-
stroke:
|
|
6263
|
+
stroke: t.accent,
|
|
6264
6264
|
strokeWidth: "1.5",
|
|
6265
6265
|
strokeLinejoin: "round"
|
|
6266
6266
|
}
|
|
@@ -6272,7 +6272,7 @@ function ReportDialog({
|
|
|
6272
6272
|
{
|
|
6273
6273
|
style: {
|
|
6274
6274
|
fontSize: "11px",
|
|
6275
|
-
color:
|
|
6275
|
+
color: t.textMuted,
|
|
6276
6276
|
flex: 1
|
|
6277
6277
|
},
|
|
6278
6278
|
children: "AI enhanced"
|
|
@@ -6289,9 +6289,9 @@ function ReportDialog({
|
|
|
6289
6289
|
style: {
|
|
6290
6290
|
padding: "2px 8px",
|
|
6291
6291
|
borderRadius: "4px",
|
|
6292
|
-
border: `1px solid ${
|
|
6293
|
-
background:
|
|
6294
|
-
color:
|
|
6292
|
+
border: `1px solid ${t.accent}`,
|
|
6293
|
+
background: t.accent,
|
|
6294
|
+
color: t.accentText,
|
|
6295
6295
|
fontSize: "11px",
|
|
6296
6296
|
fontWeight: 600,
|
|
6297
6297
|
cursor: "pointer",
|
|
@@ -6312,9 +6312,9 @@ function ReportDialog({
|
|
|
6312
6312
|
style: {
|
|
6313
6313
|
padding: "2px 8px",
|
|
6314
6314
|
borderRadius: "4px",
|
|
6315
|
-
border: `1px solid ${
|
|
6315
|
+
border: `1px solid ${t.inputBorder}`,
|
|
6316
6316
|
background: "transparent",
|
|
6317
|
-
color:
|
|
6317
|
+
color: t.textMuted,
|
|
6318
6318
|
fontSize: "11px",
|
|
6319
6319
|
fontWeight: 600,
|
|
6320
6320
|
cursor: "pointer",
|
|
@@ -6344,7 +6344,7 @@ function ReportDialog({
|
|
|
6344
6344
|
"p",
|
|
6345
6345
|
{
|
|
6346
6346
|
style: {
|
|
6347
|
-
color:
|
|
6347
|
+
color: t.textMuted,
|
|
6348
6348
|
fontSize: "12px",
|
|
6349
6349
|
marginTop: "6px",
|
|
6350
6350
|
marginBottom: 0,
|
|
@@ -6359,7 +6359,7 @@ function ReportDialog({
|
|
|
6359
6359
|
{
|
|
6360
6360
|
style: {
|
|
6361
6361
|
fontSize: "12px",
|
|
6362
|
-
color:
|
|
6362
|
+
color: t.textMuted,
|
|
6363
6363
|
marginBottom: "6px",
|
|
6364
6364
|
display: "block",
|
|
6365
6365
|
fontWeight: 500
|
|
@@ -6390,7 +6390,7 @@ function ReportDialog({
|
|
|
6390
6390
|
width: "56px",
|
|
6391
6391
|
height: "56px",
|
|
6392
6392
|
borderRadius: "6px",
|
|
6393
|
-
border: `1px dashed ${
|
|
6393
|
+
border: `1px dashed ${t.border}`,
|
|
6394
6394
|
display: "flex",
|
|
6395
6395
|
alignItems: "center",
|
|
6396
6396
|
justifyContent: "center",
|
|
@@ -6399,7 +6399,7 @@ function ReportDialog({
|
|
|
6399
6399
|
fontSize: "9px",
|
|
6400
6400
|
lineHeight: 1.2,
|
|
6401
6401
|
textAlign: "center",
|
|
6402
|
-
color:
|
|
6402
|
+
color: t.textMuted,
|
|
6403
6403
|
animation: "gg-pulse 1.4s ease-in-out infinite"
|
|
6404
6404
|
},
|
|
6405
6405
|
children: "Capturing\u2026"
|
|
@@ -6424,7 +6424,7 @@ function ReportDialog({
|
|
|
6424
6424
|
width: "100%",
|
|
6425
6425
|
height: "100%",
|
|
6426
6426
|
borderRadius: "6px",
|
|
6427
|
-
border: `1px solid ${
|
|
6427
|
+
border: `1px solid ${t.border}`,
|
|
6428
6428
|
objectFit: "cover",
|
|
6429
6429
|
objectPosition: "top",
|
|
6430
6430
|
cursor: "zoom-in",
|
|
@@ -6494,8 +6494,8 @@ function ReportDialog({
|
|
|
6494
6494
|
height: "24px",
|
|
6495
6495
|
borderRadius: "50%",
|
|
6496
6496
|
border: "none",
|
|
6497
|
-
background:
|
|
6498
|
-
color:
|
|
6497
|
+
background: t.accent,
|
|
6498
|
+
color: t.accentText,
|
|
6499
6499
|
padding: 0,
|
|
6500
6500
|
cursor: "pointer",
|
|
6501
6501
|
display: "flex",
|
|
@@ -6549,7 +6549,7 @@ function ReportDialog({
|
|
|
6549
6549
|
gap: "8px",
|
|
6550
6550
|
padding: "6px 8px",
|
|
6551
6551
|
borderRadius: "6px",
|
|
6552
|
-
border: `1px solid ${
|
|
6552
|
+
border: `1px solid ${t.border}`
|
|
6553
6553
|
},
|
|
6554
6554
|
children: [
|
|
6555
6555
|
/* @__PURE__ */ jsxs5(
|
|
@@ -6565,7 +6565,7 @@ function ReportDialog({
|
|
|
6565
6565
|
"path",
|
|
6566
6566
|
{
|
|
6567
6567
|
d: "M14 2H6a2 2 0 00-2 2v16a2 2 0 002 2h12a2 2 0 002-2V8z",
|
|
6568
|
-
stroke:
|
|
6568
|
+
stroke: t.textMuted,
|
|
6569
6569
|
strokeWidth: "1.5",
|
|
6570
6570
|
strokeLinecap: "round",
|
|
6571
6571
|
strokeLinejoin: "round"
|
|
@@ -6575,7 +6575,7 @@ function ReportDialog({
|
|
|
6575
6575
|
"path",
|
|
6576
6576
|
{
|
|
6577
6577
|
d: "M14 2v6h6",
|
|
6578
|
-
stroke:
|
|
6578
|
+
stroke: t.textMuted,
|
|
6579
6579
|
strokeWidth: "1.5",
|
|
6580
6580
|
strokeLinecap: "round",
|
|
6581
6581
|
strokeLinejoin: "round"
|
|
@@ -6589,7 +6589,7 @@ function ReportDialog({
|
|
|
6589
6589
|
{
|
|
6590
6590
|
style: {
|
|
6591
6591
|
fontSize: "11px",
|
|
6592
|
-
color:
|
|
6592
|
+
color: t.text,
|
|
6593
6593
|
flex: 1,
|
|
6594
6594
|
overflow: "hidden",
|
|
6595
6595
|
textOverflow: "ellipsis",
|
|
@@ -6601,7 +6601,7 @@ function ReportDialog({
|
|
|
6601
6601
|
/* @__PURE__ */ jsxs5(
|
|
6602
6602
|
"span",
|
|
6603
6603
|
{
|
|
6604
|
-
style: { fontSize: "10px", color:
|
|
6604
|
+
style: { fontSize: "10px", color: t.textMuted },
|
|
6605
6605
|
children: [
|
|
6606
6606
|
(a.size / 1024).toFixed(0),
|
|
6607
6607
|
"KB"
|
|
@@ -6676,7 +6676,7 @@ function ReportDialog({
|
|
|
6676
6676
|
},
|
|
6677
6677
|
onDragLeave: () => setScreenshotDragOver(false),
|
|
6678
6678
|
style: {
|
|
6679
|
-
border: `1.5px dashed ${screenshotDragOver ?
|
|
6679
|
+
border: `1.5px dashed ${screenshotDragOver ? t.accent : t.inputBorder}`,
|
|
6680
6680
|
borderRadius: "8px",
|
|
6681
6681
|
padding: screenshots.length + attachments.length > 0 ? "8px 12px" : "18px 12px",
|
|
6682
6682
|
textAlign: "center",
|
|
@@ -6691,7 +6691,7 @@ function ReportDialog({
|
|
|
6691
6691
|
margin: 0,
|
|
6692
6692
|
fontSize: "11px",
|
|
6693
6693
|
fontWeight: 500,
|
|
6694
|
-
color:
|
|
6694
|
+
color: t.textMuted
|
|
6695
6695
|
},
|
|
6696
6696
|
children: screenshotDragOver ? "Drop to attach" : "+ Add more \xB7 Drag & drop \xB7 Paste"
|
|
6697
6697
|
}
|
|
@@ -6717,7 +6717,7 @@ function ReportDialog({
|
|
|
6717
6717
|
width: "18",
|
|
6718
6718
|
height: "18",
|
|
6719
6719
|
rx: "2",
|
|
6720
|
-
stroke:
|
|
6720
|
+
stroke: t.textMuted,
|
|
6721
6721
|
strokeWidth: "1.5"
|
|
6722
6722
|
}
|
|
6723
6723
|
),
|
|
@@ -6727,7 +6727,7 @@ function ReportDialog({
|
|
|
6727
6727
|
cx: "8.5",
|
|
6728
6728
|
cy: "8.5",
|
|
6729
6729
|
r: "1.5",
|
|
6730
|
-
stroke:
|
|
6730
|
+
stroke: t.textMuted,
|
|
6731
6731
|
strokeWidth: "1.5"
|
|
6732
6732
|
}
|
|
6733
6733
|
),
|
|
@@ -6735,7 +6735,7 @@ function ReportDialog({
|
|
|
6735
6735
|
"path",
|
|
6736
6736
|
{
|
|
6737
6737
|
d: "M21 15l-5-5L5 21",
|
|
6738
|
-
stroke:
|
|
6738
|
+
stroke: t.textMuted,
|
|
6739
6739
|
strokeWidth: "1.5",
|
|
6740
6740
|
strokeLinecap: "round",
|
|
6741
6741
|
strokeLinejoin: "round"
|
|
@@ -6751,7 +6751,7 @@ function ReportDialog({
|
|
|
6751
6751
|
margin: 0,
|
|
6752
6752
|
fontSize: "12px",
|
|
6753
6753
|
fontWeight: 600,
|
|
6754
|
-
color:
|
|
6754
|
+
color: t.text
|
|
6755
6755
|
},
|
|
6756
6756
|
children: screenshotDragOver ? "Drop to attach" : "Add screenshots or files"
|
|
6757
6757
|
}
|
|
@@ -6762,7 +6762,7 @@ function ReportDialog({
|
|
|
6762
6762
|
style: {
|
|
6763
6763
|
margin: "3px 0 0",
|
|
6764
6764
|
fontSize: "11px",
|
|
6765
|
-
color:
|
|
6765
|
+
color: t.textMuted
|
|
6766
6766
|
},
|
|
6767
6767
|
children: "Images, PDF, DOC, XLS \xB7 Drag & drop \xB7 Paste \u2318V / Ctrl+V \xB7 Click to browse"
|
|
6768
6768
|
}
|
|
@@ -6777,7 +6777,7 @@ function ReportDialog({
|
|
|
6777
6777
|
{
|
|
6778
6778
|
style: {
|
|
6779
6779
|
fontSize: "12px",
|
|
6780
|
-
color:
|
|
6780
|
+
color: t.textMuted,
|
|
6781
6781
|
marginBottom: "6px",
|
|
6782
6782
|
display: "flex",
|
|
6783
6783
|
alignItems: "center",
|
|
@@ -6789,7 +6789,7 @@ function ReportDialog({
|
|
|
6789
6789
|
"span",
|
|
6790
6790
|
{
|
|
6791
6791
|
style: {
|
|
6792
|
-
color: severity ?
|
|
6792
|
+
color: severity ? t.textMuted : needsSeverity ? "#ef4444" : t.textMuted,
|
|
6793
6793
|
fontSize: "11px"
|
|
6794
6794
|
},
|
|
6795
6795
|
children: severity ? "" : "\xB7 required"
|
|
@@ -6824,9 +6824,9 @@ function ReportDialog({
|
|
|
6824
6824
|
// tap target; 6px left it at ~29px.
|
|
6825
6825
|
padding: "9px 2px",
|
|
6826
6826
|
borderRadius: "6px",
|
|
6827
|
-
border: `1px solid ${on ?
|
|
6828
|
-
background: on ?
|
|
6829
|
-
color: on ?
|
|
6827
|
+
border: `1px solid ${on ? t.accent : needsSeverity ? "#ef4444" : t.inputBorder}`,
|
|
6828
|
+
background: on ? t.accent : "transparent",
|
|
6829
|
+
color: on ? t.accentText : t.text,
|
|
6830
6830
|
fontSize: "12px",
|
|
6831
6831
|
fontWeight: 600,
|
|
6832
6832
|
cursor: "pointer",
|
|
@@ -6878,8 +6878,8 @@ function ReportDialog({
|
|
|
6878
6878
|
},
|
|
6879
6879
|
children: [
|
|
6880
6880
|
/* @__PURE__ */ jsxs5("div", { style: { display: "flex", flexDirection: "column", gap: "2px" }, children: [
|
|
6881
|
-
/* @__PURE__ */ jsx5("span", { style: { color:
|
|
6882
|
-
/* @__PURE__ */ jsx5("span", { style: { color:
|
|
6881
|
+
/* @__PURE__ */ jsx5("span", { style: { color: t.text, fontWeight: 600, fontSize: "13px" }, children: "Our team may already have this, or something close" }),
|
|
6882
|
+
/* @__PURE__ */ jsx5("span", { style: { color: t.textMuted, fontSize: "12px", lineHeight: 1.5 }, children: similarIssues.length > 1 ? "Pick the one that matches. Same problem, or a different request for the same feature \u2014 it's added to that issue, so the team has it in one place." : "Same problem, or a different request for the same feature? Pick it \u2014 it's added to that issue, so the team has it in one place." })
|
|
6883
6883
|
] }),
|
|
6884
6884
|
/* @__PURE__ */ jsx5(
|
|
6885
6885
|
"div",
|
|
@@ -6905,10 +6905,10 @@ function ReportDialog({
|
|
|
6905
6905
|
minHeight: "44px",
|
|
6906
6906
|
padding: "9px 10px",
|
|
6907
6907
|
borderRadius: "8px",
|
|
6908
|
-
border: `1px solid ${picked ?
|
|
6909
|
-
boxShadow: picked ? `0 0 0 1px ${
|
|
6910
|
-
backgroundColor:
|
|
6911
|
-
color:
|
|
6908
|
+
border: `1px solid ${picked ? t.accent : t.border}`,
|
|
6909
|
+
boxShadow: picked ? `0 0 0 1px ${t.accent}` : "none",
|
|
6910
|
+
backgroundColor: t.bg,
|
|
6911
|
+
color: t.text,
|
|
6912
6912
|
textAlign: "left",
|
|
6913
6913
|
cursor: isSubmitting ? "not-allowed" : "pointer",
|
|
6914
6914
|
fontFamily: "inherit"
|
|
@@ -6925,9 +6925,9 @@ function ReportDialog({
|
|
|
6925
6925
|
height: "14px",
|
|
6926
6926
|
boxSizing: "border-box",
|
|
6927
6927
|
borderRadius: "50%",
|
|
6928
|
-
border: `2px solid ${picked ?
|
|
6929
|
-
backgroundColor: picked ?
|
|
6930
|
-
boxShadow: picked ? `inset 0 0 0 2px ${
|
|
6928
|
+
border: `2px solid ${picked ? t.accent : t.textMuted}`,
|
|
6929
|
+
backgroundColor: picked ? t.accent : "transparent",
|
|
6930
|
+
boxShadow: picked ? `inset 0 0 0 2px ${t.bg}` : "none"
|
|
6931
6931
|
}
|
|
6932
6932
|
}
|
|
6933
6933
|
),
|
|
@@ -6955,7 +6955,7 @@ function ReportDialog({
|
|
|
6955
6955
|
WebkitBoxOrient: "vertical"
|
|
6956
6956
|
},
|
|
6957
6957
|
children: [
|
|
6958
|
-
/* @__PURE__ */ jsxs5("span", { style: { color:
|
|
6958
|
+
/* @__PURE__ */ jsxs5("span", { style: { color: t.textMuted, fontWeight: 600 }, children: [
|
|
6959
6959
|
"#",
|
|
6960
6960
|
issue.number
|
|
6961
6961
|
] }),
|
|
@@ -6964,7 +6964,7 @@ function ReportDialog({
|
|
|
6964
6964
|
]
|
|
6965
6965
|
}
|
|
6966
6966
|
),
|
|
6967
|
-
issue.status && /* @__PURE__ */ jsx5("span", { style: { fontSize: "11.5px", color:
|
|
6967
|
+
issue.status && /* @__PURE__ */ jsx5("span", { style: { fontSize: "11.5px", color: t.textMuted }, children: issue.status })
|
|
6968
6968
|
]
|
|
6969
6969
|
}
|
|
6970
6970
|
)
|
|
@@ -6993,8 +6993,8 @@ function ReportDialog({
|
|
|
6993
6993
|
padding: "10px",
|
|
6994
6994
|
borderRadius: "8px",
|
|
6995
6995
|
border: "none",
|
|
6996
|
-
backgroundColor: isSubmitting || !pickedSimilar ?
|
|
6997
|
-
color: isSubmitting || !pickedSimilar ?
|
|
6996
|
+
backgroundColor: isSubmitting || !pickedSimilar ? t.bgSecondary : t.accent,
|
|
6997
|
+
color: isSubmitting || !pickedSimilar ? t.textMuted : t.accentText,
|
|
6998
6998
|
fontSize: "14px",
|
|
6999
6999
|
fontWeight: 600,
|
|
7000
7000
|
cursor: isSubmitting || !pickedSimilar ? "not-allowed" : "pointer",
|
|
@@ -7027,7 +7027,7 @@ function ReportDialog({
|
|
|
7027
7027
|
borderRadius: "8px",
|
|
7028
7028
|
border: "1px solid rgba(245,158,11,0.4)",
|
|
7029
7029
|
backgroundColor: "transparent",
|
|
7030
|
-
color: isSubmitting ?
|
|
7030
|
+
color: isSubmitting ? t.textMuted : t.text,
|
|
7031
7031
|
fontSize: "13px",
|
|
7032
7032
|
fontWeight: 600,
|
|
7033
7033
|
cursor: isSubmitting ? "not-allowed" : "pointer",
|
|
@@ -7058,7 +7058,7 @@ function ReportDialog({
|
|
|
7058
7058
|
borderRadius: "8px",
|
|
7059
7059
|
border: "none",
|
|
7060
7060
|
backgroundColor: "transparent",
|
|
7061
|
-
color: isSubmitting ?
|
|
7061
|
+
color: isSubmitting ? t.textMuted : t.text,
|
|
7062
7062
|
fontSize: "13px",
|
|
7063
7063
|
fontWeight: 500,
|
|
7064
7064
|
textDecoration: "underline",
|
|
@@ -7087,8 +7087,8 @@ function ReportDialog({
|
|
|
7087
7087
|
padding: "10px",
|
|
7088
7088
|
borderRadius: "8px",
|
|
7089
7089
|
border: "none",
|
|
7090
|
-
backgroundColor: submitDisabled ?
|
|
7091
|
-
color: submitDisabled ?
|
|
7090
|
+
backgroundColor: submitDisabled ? t.bgSecondary : t.accent,
|
|
7091
|
+
color: submitDisabled ? t.textMuted : t.accentText,
|
|
7092
7092
|
fontSize: "14px",
|
|
7093
7093
|
fontWeight: 600,
|
|
7094
7094
|
cursor: submitDisabled ? "not-allowed" : "pointer",
|
|
@@ -7110,14 +7110,14 @@ function ReportDialog({
|
|
|
7110
7110
|
{
|
|
7111
7111
|
style: {
|
|
7112
7112
|
padding: "8px 16px 10px",
|
|
7113
|
-
borderTop: `1px solid ${
|
|
7113
|
+
borderTop: `1px solid ${t.border}`,
|
|
7114
7114
|
display: "flex",
|
|
7115
7115
|
alignItems: "center",
|
|
7116
7116
|
justifyContent: "space-between",
|
|
7117
7117
|
gap: "12px"
|
|
7118
7118
|
},
|
|
7119
7119
|
children: [
|
|
7120
|
-
/* @__PURE__ */ jsx5(ReporterChip, { reporter, t
|
|
7120
|
+
/* @__PURE__ */ jsx5(ReporterChip, { reporter, t }),
|
|
7121
7121
|
reportGlitchgrabProblem ? /* @__PURE__ */ jsx5(
|
|
7122
7122
|
"button",
|
|
7123
7123
|
{
|
|
@@ -7130,7 +7130,7 @@ function ReportDialog({
|
|
|
7130
7130
|
title: "Something wrong with this reporter itself? Tell the Glitchgrab team.",
|
|
7131
7131
|
style: {
|
|
7132
7132
|
fontSize: "11px",
|
|
7133
|
-
color:
|
|
7133
|
+
color: t.textMuted,
|
|
7134
7134
|
whiteSpace: "nowrap",
|
|
7135
7135
|
flexShrink: 0,
|
|
7136
7136
|
border: "none",
|
|
@@ -7150,7 +7150,7 @@ function ReportDialog({
|
|
|
7150
7150
|
{
|
|
7151
7151
|
style: {
|
|
7152
7152
|
fontSize: "11px",
|
|
7153
|
-
color:
|
|
7153
|
+
color: t.textMuted,
|
|
7154
7154
|
whiteSpace: "nowrap",
|
|
7155
7155
|
flexShrink: 0
|
|
7156
7156
|
},
|
|
@@ -7278,8 +7278,8 @@ function ReportDialog({
|
|
|
7278
7278
|
padding: "8px 14px",
|
|
7279
7279
|
borderRadius: "999px",
|
|
7280
7280
|
border: "none",
|
|
7281
|
-
background:
|
|
7282
|
-
color:
|
|
7281
|
+
background: t.accent,
|
|
7282
|
+
color: t.accentText,
|
|
7283
7283
|
fontSize: "13px",
|
|
7284
7284
|
fontWeight: 700,
|
|
7285
7285
|
cursor: "pointer",
|
|
@@ -7318,7 +7318,7 @@ function ReportDialog({
|
|
|
7318
7318
|
"span",
|
|
7319
7319
|
{
|
|
7320
7320
|
style: {
|
|
7321
|
-
color:
|
|
7321
|
+
color: t.textMuted,
|
|
7322
7322
|
fontSize: "12px"
|
|
7323
7323
|
},
|
|
7324
7324
|
children: [
|
|
@@ -7570,15 +7570,36 @@ function getTypeIcon(type, color, size = 24) {
|
|
|
7570
7570
|
// src/booking-dialog.tsx
|
|
7571
7571
|
import { useCallback as useCallback2, useEffect as useEffect5, useMemo as useMemo3, useState as useState5 } from "react";
|
|
7572
7572
|
import { Fragment as Fragment5, jsx as jsx6, jsxs as jsxs6 } from "react/jsx-runtime";
|
|
7573
|
-
var
|
|
7573
|
+
var LIGHT = {
|
|
7574
|
+
bg: "#ffffff",
|
|
7575
|
+
pane: "#ffffff",
|
|
7576
|
+
border: "#e5e7eb",
|
|
7577
|
+
text: "#111827",
|
|
7578
|
+
muted: "#6b7280",
|
|
7579
|
+
faint: "#9ca3af",
|
|
7580
|
+
open: "#e8e8eb",
|
|
7581
|
+
ink: "#111111",
|
|
7582
|
+
onInk: "#ffffff",
|
|
7583
|
+
input: "#ffffff",
|
|
7584
|
+
danger: "#dc2626"
|
|
7585
|
+
};
|
|
7586
|
+
var DARK = {
|
|
7574
7587
|
bg: "#141414",
|
|
7575
|
-
|
|
7588
|
+
pane: "#141414",
|
|
7576
7589
|
border: "#2a2a2a",
|
|
7577
|
-
text: "#
|
|
7578
|
-
muted: "#
|
|
7579
|
-
|
|
7590
|
+
text: "#f3f4f6",
|
|
7591
|
+
muted: "#9ca3af",
|
|
7592
|
+
faint: "#6b7280",
|
|
7593
|
+
open: "#262626",
|
|
7594
|
+
ink: "#f3f4f6",
|
|
7595
|
+
onInk: "#111111",
|
|
7596
|
+
input: "#1c1c1c",
|
|
7580
7597
|
danger: "#f87171"
|
|
7581
7598
|
};
|
|
7599
|
+
var WEEKDAYS = ["Mon", "Tue", "Wed", "Thu", "Fri", "Sat", "Sun"];
|
|
7600
|
+
var DAY_MS = 864e5;
|
|
7601
|
+
var ZONE_PAD_MS = 14 * 36e5;
|
|
7602
|
+
var WIDE_QUERY = "(min-width: 900px)";
|
|
7582
7603
|
function localZone() {
|
|
7583
7604
|
try {
|
|
7584
7605
|
return Intl.DateTimeFormat().resolvedOptions().timeZone;
|
|
@@ -7586,18 +7607,92 @@ function localZone() {
|
|
|
7586
7607
|
return "UTC";
|
|
7587
7608
|
}
|
|
7588
7609
|
}
|
|
7589
|
-
function
|
|
7590
|
-
|
|
7610
|
+
function zoneList(current) {
|
|
7611
|
+
var _a;
|
|
7612
|
+
try {
|
|
7613
|
+
const all = (_a = Intl.supportedValuesOf) == null ? void 0 : _a.call(Intl, "timeZone");
|
|
7614
|
+
if (all == null ? void 0 : all.length) return all.includes(current) ? all : [current, ...all];
|
|
7615
|
+
} catch (e) {
|
|
7616
|
+
}
|
|
7617
|
+
return [current];
|
|
7591
7618
|
}
|
|
7592
|
-
function
|
|
7593
|
-
|
|
7594
|
-
|
|
7595
|
-
|
|
7596
|
-
|
|
7597
|
-
}
|
|
7619
|
+
function prefers12h() {
|
|
7620
|
+
try {
|
|
7621
|
+
return new Intl.DateTimeFormat(void 0, { hour: "numeric" }).resolvedOptions().hour12 === true;
|
|
7622
|
+
} catch (e) {
|
|
7623
|
+
return false;
|
|
7624
|
+
}
|
|
7625
|
+
}
|
|
7626
|
+
function useMediaQuery(query, fallback) {
|
|
7627
|
+
const [matches, setMatches] = useState5(
|
|
7628
|
+
() => typeof window !== "undefined" && window.matchMedia ? window.matchMedia(query).matches : fallback
|
|
7629
|
+
);
|
|
7630
|
+
useEffect5(() => {
|
|
7631
|
+
var _a;
|
|
7632
|
+
if (typeof window === "undefined" || !window.matchMedia) return;
|
|
7633
|
+
const mql = window.matchMedia(query);
|
|
7634
|
+
const onChange = () => setMatches(mql.matches);
|
|
7635
|
+
onChange();
|
|
7636
|
+
(_a = mql.addEventListener) == null ? void 0 : _a.call(mql, "change", onChange);
|
|
7637
|
+
return () => {
|
|
7638
|
+
var _a2;
|
|
7639
|
+
return (_a2 = mql.removeEventListener) == null ? void 0 : _a2.call(mql, "change", onChange);
|
|
7640
|
+
};
|
|
7641
|
+
}, [query]);
|
|
7642
|
+
return matches;
|
|
7643
|
+
}
|
|
7644
|
+
function dayKeyIn(iso, timeZone) {
|
|
7645
|
+
try {
|
|
7646
|
+
return new Intl.DateTimeFormat("en-CA", { timeZone, year: "numeric", month: "2-digit", day: "2-digit" }).format(
|
|
7647
|
+
new Date(iso)
|
|
7648
|
+
);
|
|
7649
|
+
} catch (e) {
|
|
7650
|
+
return new Date(iso).toISOString().slice(0, 10);
|
|
7651
|
+
}
|
|
7652
|
+
}
|
|
7653
|
+
function keyToUtc(key) {
|
|
7654
|
+
const [y, m, d] = key.split("-").map(Number);
|
|
7655
|
+
return Date.UTC(y, m - 1, d);
|
|
7656
|
+
}
|
|
7657
|
+
function utcToKey(ms) {
|
|
7658
|
+
return new Date(ms).toISOString().slice(0, 10);
|
|
7659
|
+
}
|
|
7660
|
+
function monthGrid(month) {
|
|
7661
|
+
const first = keyToUtc(`${month}-01`);
|
|
7662
|
+
const lead = (new Date(first).getUTCDay() + 6) % 7;
|
|
7663
|
+
const start = first - lead * DAY_MS;
|
|
7664
|
+
return Array.from({ length: 42 }, (_, i) => utcToKey(start + i * DAY_MS));
|
|
7598
7665
|
}
|
|
7599
|
-
function
|
|
7600
|
-
|
|
7666
|
+
function shiftMonth(month, by) {
|
|
7667
|
+
const [y, m] = month.split("-").map(Number);
|
|
7668
|
+
return new Date(Date.UTC(y, m - 1 + by, 1)).toISOString().slice(0, 7);
|
|
7669
|
+
}
|
|
7670
|
+
function formatTime(iso, timeZone, twelve) {
|
|
7671
|
+
try {
|
|
7672
|
+
if (twelve) {
|
|
7673
|
+
return new Date(iso).toLocaleTimeString("en-US", { hour: "numeric", minute: "2-digit", hour12: true, timeZone }).replace(" ", "").toLowerCase();
|
|
7674
|
+
}
|
|
7675
|
+
return new Date(iso).toLocaleTimeString("en-GB", { hour: "2-digit", minute: "2-digit", hour12: false, timeZone });
|
|
7676
|
+
} catch (e) {
|
|
7677
|
+
return new Date(iso).toLocaleTimeString();
|
|
7678
|
+
}
|
|
7679
|
+
}
|
|
7680
|
+
function ordinal(n) {
|
|
7681
|
+
var _a;
|
|
7682
|
+
const tens = n % 100;
|
|
7683
|
+
if (tens >= 11 && tens <= 13) return `${n}th`;
|
|
7684
|
+
return `${n}${(_a = ["th", "st", "nd", "rd"][n % 10]) != null ? _a : "th"}`;
|
|
7685
|
+
}
|
|
7686
|
+
function formatDuration(minutes) {
|
|
7687
|
+
if (minutes < 60) return `${minutes}m`;
|
|
7688
|
+
const rest = minutes % 60;
|
|
7689
|
+
return rest ? `${Math.floor(minutes / 60)}h ${rest}m` : `${minutes / 60}h`;
|
|
7690
|
+
}
|
|
7691
|
+
function initials(name) {
|
|
7692
|
+
return name.split(/\s+/).filter(Boolean).slice(0, 2).map((w) => {
|
|
7693
|
+
var _a;
|
|
7694
|
+
return (_a = w[0]) == null ? void 0 : _a.toUpperCase();
|
|
7695
|
+
}).join("");
|
|
7601
7696
|
}
|
|
7602
7697
|
function BookingDialog({
|
|
7603
7698
|
token,
|
|
@@ -7605,14 +7700,23 @@ function BookingDialog({
|
|
|
7605
7700
|
open,
|
|
7606
7701
|
onClose
|
|
7607
7702
|
}) {
|
|
7608
|
-
var _a;
|
|
7703
|
+
var _a, _b, _c, _d, _e;
|
|
7704
|
+
const wide = useMediaQuery(WIDE_QUERY, true);
|
|
7705
|
+
const t = useMemo3(() => {
|
|
7706
|
+
if (!open) return LIGHT;
|
|
7707
|
+
const base = detectDark() ? DARK : LIGHT;
|
|
7708
|
+
const accent = detectHostAccent();
|
|
7709
|
+
return accent ? { ...base, ink: accent.accent, onInk: accent.accentText } : base;
|
|
7710
|
+
}, [open]);
|
|
7609
7711
|
const [step, setStep] = useState5("slots");
|
|
7610
|
-
const [
|
|
7611
|
-
const [
|
|
7612
|
-
|
|
7613
|
-
|
|
7614
|
-
|
|
7712
|
+
const [zone, setZone] = useState5(localZone);
|
|
7713
|
+
const [twelve, setTwelve] = useState5(prefers12h);
|
|
7714
|
+
const [month, setMonth] = useState5(() => dayKeyIn(Date.now(), localZone()).slice(0, 7));
|
|
7715
|
+
const [slotsByMonth, setSlotsByMonth] = useState5({});
|
|
7716
|
+
const [pickedDay, setPickedDay] = useState5(null);
|
|
7717
|
+
const [page, setPage] = useState5({ title: "Book a demo", description: null, hostName: null, hostAvatarUrl: null, slotMinutes: 30 });
|
|
7615
7718
|
const [whatsappUrl, setWhatsappUrl] = useState5(null);
|
|
7719
|
+
const [avatarFailed, setAvatarFailed] = useState5(false);
|
|
7616
7720
|
const [selected, setSelected] = useState5(null);
|
|
7617
7721
|
const [name, setName] = useState5("");
|
|
7618
7722
|
const [email, setEmail] = useState5("");
|
|
@@ -7627,40 +7731,64 @@ function BookingDialog({
|
|
|
7627
7731
|
() => ({ Authorization: `Bearer ${token}`, "Content-Type": "application/json" }),
|
|
7628
7732
|
[token]
|
|
7629
7733
|
);
|
|
7630
|
-
const
|
|
7631
|
-
|
|
7632
|
-
|
|
7633
|
-
|
|
7634
|
-
|
|
7635
|
-
const
|
|
7636
|
-
|
|
7637
|
-
|
|
7638
|
-
`${baseUrl}/api/v1/sdk/booking/availability?from=${encodeURIComponent(from)}&to=${encodeURIComponent(to)}`,
|
|
7639
|
-
{ headers }
|
|
7640
|
-
);
|
|
7641
|
-
const json = await res.json();
|
|
7642
|
-
if (!json.success) {
|
|
7643
|
-
setError((_a2 = json.error) != null ? _a2 : "Couldn't load available times");
|
|
7644
|
-
setSlots([]);
|
|
7734
|
+
const loadMonth = useCallback2(
|
|
7735
|
+
async (target) => {
|
|
7736
|
+
var _a2, _b2, _c2;
|
|
7737
|
+
const grid2 = monthGrid(target);
|
|
7738
|
+
const from = Math.max(Date.now(), keyToUtc(grid2[0]) - ZONE_PAD_MS);
|
|
7739
|
+
const to = keyToUtc(grid2[41]) + DAY_MS + ZONE_PAD_MS;
|
|
7740
|
+
if (to <= from) {
|
|
7741
|
+
setSlotsByMonth((prev) => ({ ...prev, [target]: [] }));
|
|
7645
7742
|
return;
|
|
7646
7743
|
}
|
|
7647
|
-
|
|
7648
|
-
|
|
7649
|
-
|
|
7650
|
-
|
|
7651
|
-
|
|
7652
|
-
|
|
7653
|
-
|
|
7654
|
-
|
|
7744
|
+
try {
|
|
7745
|
+
const res = await fetch(
|
|
7746
|
+
`${baseUrl}/api/v1/sdk/booking/availability?from=${encodeURIComponent(new Date(from).toISOString())}&to=${encodeURIComponent(new Date(to).toISOString())}`,
|
|
7747
|
+
{ headers }
|
|
7748
|
+
);
|
|
7749
|
+
const json = await res.json();
|
|
7750
|
+
if (!json.success) {
|
|
7751
|
+
setError((_a2 = json.error) != null ? _a2 : "Couldn't load available times");
|
|
7752
|
+
setSlotsByMonth((prev) => ({ ...prev, [target]: [] }));
|
|
7753
|
+
return;
|
|
7754
|
+
}
|
|
7755
|
+
const data = (_b2 = json.data) != null ? _b2 : {};
|
|
7756
|
+
setSlotsByMonth((prev) => ({ ...prev, [target]: Array.isArray(data.slots) ? data.slots : [] }));
|
|
7757
|
+
setPage({
|
|
7758
|
+
title: typeof data.title === "string" && data.title ? data.title : "Book a demo",
|
|
7759
|
+
description: typeof data.description === "string" ? data.description : null,
|
|
7760
|
+
hostName: typeof data.hostName === "string" ? data.hostName : null,
|
|
7761
|
+
hostAvatarUrl: typeof data.hostAvatarUrl === "string" ? data.hostAvatarUrl : null,
|
|
7762
|
+
slotMinutes: typeof data.slotMinutes === "number" ? data.slotMinutes : 30
|
|
7763
|
+
});
|
|
7764
|
+
setWhatsappUrl((_c2 = data.whatsappUrl) != null ? _c2 : null);
|
|
7765
|
+
} catch (e) {
|
|
7766
|
+
setError("Couldn't reach the booking service");
|
|
7767
|
+
setSlotsByMonth((prev) => ({ ...prev, [target]: [] }));
|
|
7768
|
+
}
|
|
7769
|
+
},
|
|
7770
|
+
[baseUrl, headers]
|
|
7771
|
+
);
|
|
7655
7772
|
useEffect5(() => {
|
|
7656
7773
|
if (!open) return;
|
|
7774
|
+
const now = localZone();
|
|
7657
7775
|
setStep("slots");
|
|
7776
|
+
setZone(now);
|
|
7777
|
+
setMonth(dayKeyIn(Date.now(), now).slice(0, 7));
|
|
7778
|
+
setSlotsByMonth({});
|
|
7779
|
+
setPickedDay(null);
|
|
7658
7780
|
setSelected(null);
|
|
7659
7781
|
setCode("");
|
|
7660
7782
|
setBookingId(null);
|
|
7661
7783
|
setError(null);
|
|
7662
|
-
|
|
7663
|
-
}, [open
|
|
7784
|
+
setAvatarFailed(false);
|
|
7785
|
+
}, [open]);
|
|
7786
|
+
const monthLoaded = month in slotsByMonth;
|
|
7787
|
+
useEffect5(() => {
|
|
7788
|
+
if (!open || monthLoaded) return;
|
|
7789
|
+
setError(null);
|
|
7790
|
+
void loadMonth(month);
|
|
7791
|
+
}, [open, month, monthLoaded, loadMonth]);
|
|
7664
7792
|
useEffect5(() => {
|
|
7665
7793
|
if (!open) return;
|
|
7666
7794
|
const onKey = (e) => {
|
|
@@ -7669,12 +7797,19 @@ function BookingDialog({
|
|
|
7669
7797
|
document.addEventListener("keydown", onKey, true);
|
|
7670
7798
|
return () => document.removeEventListener("keydown", onKey, true);
|
|
7671
7799
|
}, [open, onClose]);
|
|
7800
|
+
const zones = useMemo3(() => open ? zoneList(zone) : [zone], [open, zone]);
|
|
7672
7801
|
if (!open) return null;
|
|
7802
|
+
const today = dayKeyIn(Date.now(), zone);
|
|
7803
|
+
const grid = monthGrid(month);
|
|
7673
7804
|
const byDay = /* @__PURE__ */ new Map();
|
|
7674
|
-
for (const slot of
|
|
7675
|
-
const key =
|
|
7676
|
-
byDay.set(key, [...(
|
|
7805
|
+
for (const slot of (_a = slotsByMonth[month]) != null ? _a : []) {
|
|
7806
|
+
const key = dayKeyIn(slot.startsAt, zone);
|
|
7807
|
+
byDay.set(key, [...(_b = byDay.get(key)) != null ? _b : [], slot]);
|
|
7677
7808
|
}
|
|
7809
|
+
const day = pickedDay && byDay.has(pickedDay) ? pickedDay : (_c = grid.find((k) => k >= today && byDay.has(k))) != null ? _c : null;
|
|
7810
|
+
const daySlots = day ? (_d = byDay.get(day)) != null ? _d : [] : [];
|
|
7811
|
+
const atFirstMonth = month <= today.slice(0, 7);
|
|
7812
|
+
const pastHorizon = monthLoaded && !error && byDay.size === 0 && !atFirstMonth;
|
|
7678
7813
|
async function startBooking() {
|
|
7679
7814
|
var _a2;
|
|
7680
7815
|
if (!selected) return;
|
|
@@ -7690,7 +7825,8 @@ function BookingDialog({
|
|
|
7690
7825
|
phone,
|
|
7691
7826
|
note,
|
|
7692
7827
|
startsAt: selected.startsAt,
|
|
7693
|
-
|
|
7828
|
+
// The zone the times were shown in, which is the one the visitor chose.
|
|
7829
|
+
timezone: zone
|
|
7694
7830
|
})
|
|
7695
7831
|
});
|
|
7696
7832
|
const json = await res.json();
|
|
@@ -7731,233 +7867,703 @@ function BookingDialog({
|
|
|
7731
7867
|
}
|
|
7732
7868
|
}
|
|
7733
7869
|
const canSubmitDetails = name.trim() && email.includes("@") && phone.replace(/\D/g, "").length >= 8;
|
|
7734
|
-
|
|
7870
|
+
const selectedEnd = selected ? (_e = selected.endsAt) != null ? _e : new Date(new Date(selected.startsAt).getTime() + page.slotMinutes * 6e4).toISOString() : null;
|
|
7871
|
+
const monthDate = new Date(keyToUtc(`${month}-01`));
|
|
7872
|
+
const muted = { color: t.muted };
|
|
7873
|
+
const summary = /* @__PURE__ */ jsxs6(
|
|
7735
7874
|
"div",
|
|
7736
7875
|
{
|
|
7737
|
-
onClick: (e) => {
|
|
7738
|
-
if (e.target === e.currentTarget) onClose();
|
|
7739
|
-
},
|
|
7740
7876
|
style: {
|
|
7741
|
-
position: "
|
|
7742
|
-
|
|
7743
|
-
|
|
7744
|
-
|
|
7877
|
+
position: "relative",
|
|
7878
|
+
padding: wide ? "28px 24px" : "20px 20px 16px",
|
|
7879
|
+
borderRight: wide ? `1px solid ${t.border}` : void 0,
|
|
7880
|
+
borderBottom: wide ? void 0 : `1px solid ${t.border}`,
|
|
7881
|
+
width: wide ? 260 : void 0,
|
|
7882
|
+
flex: wide ? "0 0 260px" : void 0,
|
|
7883
|
+
boxSizing: "border-box",
|
|
7745
7884
|
display: "flex",
|
|
7746
|
-
|
|
7747
|
-
|
|
7748
|
-
padding: 16,
|
|
7749
|
-
fontFamily: "-apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif"
|
|
7885
|
+
flexDirection: "column",
|
|
7886
|
+
gap: 10
|
|
7750
7887
|
},
|
|
7751
|
-
children:
|
|
7752
|
-
|
|
7753
|
-
|
|
7754
|
-
|
|
7755
|
-
|
|
7756
|
-
|
|
7757
|
-
|
|
7758
|
-
|
|
7759
|
-
|
|
7760
|
-
|
|
7761
|
-
|
|
7762
|
-
|
|
7763
|
-
|
|
7764
|
-
|
|
7765
|
-
|
|
7766
|
-
|
|
7767
|
-
|
|
7768
|
-
|
|
7769
|
-
|
|
7770
|
-
"
|
|
7888
|
+
children: [
|
|
7889
|
+
/* @__PURE__ */ jsx6(
|
|
7890
|
+
"button",
|
|
7891
|
+
{
|
|
7892
|
+
type: "button",
|
|
7893
|
+
onClick: onClose,
|
|
7894
|
+
"aria-label": "Close",
|
|
7895
|
+
className: "gg-bk-ghost",
|
|
7896
|
+
style: {
|
|
7897
|
+
position: "absolute",
|
|
7898
|
+
top: 12,
|
|
7899
|
+
right: 12,
|
|
7900
|
+
width: 30,
|
|
7901
|
+
height: 30,
|
|
7902
|
+
display: "flex",
|
|
7903
|
+
alignItems: "center",
|
|
7904
|
+
justifyContent: "center",
|
|
7905
|
+
border: 0,
|
|
7906
|
+
borderRadius: 8,
|
|
7907
|
+
background: "transparent",
|
|
7908
|
+
color: t.muted,
|
|
7909
|
+
cursor: "pointer",
|
|
7910
|
+
padding: 0
|
|
7911
|
+
},
|
|
7912
|
+
children: /* @__PURE__ */ jsx6(Icon, { name: "x" })
|
|
7913
|
+
}
|
|
7914
|
+
),
|
|
7915
|
+
(page.hostName || page.hostAvatarUrl) && /* @__PURE__ */ jsxs6("div", { style: { display: "flex", flexDirection: "column", gap: 8, paddingRight: 32 }, children: [
|
|
7916
|
+
page.hostAvatarUrl && !avatarFailed ? (
|
|
7917
|
+
// eslint-disable-next-line @next/next/no-img-element -- rendered on the host's page, not ours
|
|
7918
|
+
/* @__PURE__ */ jsx6(
|
|
7919
|
+
"img",
|
|
7771
7920
|
{
|
|
7921
|
+
src: page.hostAvatarUrl,
|
|
7922
|
+
alt: "",
|
|
7923
|
+
width: 36,
|
|
7924
|
+
height: 36,
|
|
7925
|
+
referrerPolicy: "no-referrer",
|
|
7926
|
+
onError: () => setAvatarFailed(true),
|
|
7927
|
+
style: { width: 36, height: 36, borderRadius: 999, objectFit: "cover", border: `1px solid ${t.border}` }
|
|
7928
|
+
}
|
|
7929
|
+
)
|
|
7930
|
+
) : page.hostName ? /* @__PURE__ */ jsx6(
|
|
7931
|
+
"div",
|
|
7932
|
+
{
|
|
7933
|
+
"aria-hidden": true,
|
|
7934
|
+
style: {
|
|
7935
|
+
width: 36,
|
|
7936
|
+
height: 36,
|
|
7937
|
+
borderRadius: 999,
|
|
7938
|
+
background: t.open,
|
|
7939
|
+
color: t.text,
|
|
7940
|
+
display: "flex",
|
|
7941
|
+
alignItems: "center",
|
|
7942
|
+
justifyContent: "center",
|
|
7943
|
+
fontSize: 13,
|
|
7944
|
+
fontWeight: 600
|
|
7945
|
+
},
|
|
7946
|
+
children: initials(page.hostName)
|
|
7947
|
+
}
|
|
7948
|
+
) : null,
|
|
7949
|
+
page.hostName && /* @__PURE__ */ jsx6("div", { style: { fontSize: 14, fontWeight: 500, ...muted }, children: page.hostName })
|
|
7950
|
+
] }),
|
|
7951
|
+
/* @__PURE__ */ jsx6("div", { style: { fontSize: 20, fontWeight: 600, lineHeight: 1.25, paddingRight: 32, overflowWrap: "anywhere" }, children: page.title }),
|
|
7952
|
+
page.description && /* @__PURE__ */ jsx6("div", { style: { fontSize: 13, lineHeight: 1.5, overflowWrap: "anywhere", ...muted }, children: page.description }),
|
|
7953
|
+
/* @__PURE__ */ jsxs6("div", { style: { display: "flex", flexDirection: "column", gap: 10, marginTop: 4, fontSize: 14 }, children: [
|
|
7954
|
+
selected && step !== "slots" && /* @__PURE__ */ jsx6(Row, { icon: "calendar", t, children: /* @__PURE__ */ jsxs6("span", { children: [
|
|
7955
|
+
new Date(selected.startsAt).toLocaleDateString("en-US", {
|
|
7956
|
+
weekday: "long",
|
|
7957
|
+
month: "long",
|
|
7958
|
+
day: "numeric",
|
|
7959
|
+
year: "numeric",
|
|
7960
|
+
timeZone: zone
|
|
7961
|
+
}),
|
|
7962
|
+
/* @__PURE__ */ jsx6("br", {}),
|
|
7963
|
+
/* @__PURE__ */ jsxs6("span", { style: muted, children: [
|
|
7964
|
+
formatTime(selected.startsAt, zone, twelve),
|
|
7965
|
+
" \u2013 ",
|
|
7966
|
+
selectedEnd && formatTime(selectedEnd, zone, twelve)
|
|
7967
|
+
] })
|
|
7968
|
+
] }) }),
|
|
7969
|
+
/* @__PURE__ */ jsx6(Row, { icon: "clock", t, children: formatDuration(page.slotMinutes) }),
|
|
7970
|
+
/* @__PURE__ */ jsx6(Row, { icon: "video", t, children: "Google Meet" }),
|
|
7971
|
+
/* @__PURE__ */ jsx6(Row, { icon: "globe", t, children: step === "slots" ? (
|
|
7972
|
+
// The visible label is plain text; the native select sits on top of
|
|
7973
|
+
// it, invisible. A styled select sizes itself to the longest zone
|
|
7974
|
+
// name in the list, which pushed the chevron to the pane's edge.
|
|
7975
|
+
/* @__PURE__ */ jsxs6("span", { style: { position: "relative", display: "inline-flex", alignItems: "center", gap: 4 }, children: [
|
|
7976
|
+
zone,
|
|
7977
|
+
/* @__PURE__ */ jsx6("span", { style: { color: t.muted }, children: /* @__PURE__ */ jsx6(Icon, { name: "down" }) }),
|
|
7978
|
+
/* @__PURE__ */ jsx6(
|
|
7979
|
+
"select",
|
|
7980
|
+
{
|
|
7981
|
+
value: zone,
|
|
7982
|
+
onChange: (e) => setZone(e.target.value),
|
|
7983
|
+
"aria-label": "Time zone",
|
|
7984
|
+
style: { position: "absolute", inset: 0, width: "100%", opacity: 0, cursor: "pointer", font: "inherit" },
|
|
7985
|
+
children: zones.map((z) => /* @__PURE__ */ jsx6("option", { value: z, children: z }, z))
|
|
7986
|
+
}
|
|
7987
|
+
)
|
|
7988
|
+
] })
|
|
7989
|
+
) : zone })
|
|
7990
|
+
] }),
|
|
7991
|
+
whatsappUrl && step === "slots" && /* @__PURE__ */ jsxs6(
|
|
7992
|
+
"a",
|
|
7993
|
+
{
|
|
7994
|
+
href: whatsappUrl,
|
|
7995
|
+
target: "_blank",
|
|
7996
|
+
rel: "noreferrer",
|
|
7997
|
+
className: "gg-bk-ghost",
|
|
7998
|
+
style: {
|
|
7999
|
+
marginTop: wide ? "auto" : 6,
|
|
8000
|
+
display: "flex",
|
|
8001
|
+
alignItems: "center",
|
|
8002
|
+
gap: 10,
|
|
8003
|
+
padding: "10px 12px",
|
|
8004
|
+
borderRadius: 8,
|
|
8005
|
+
border: `1px solid ${t.border}`,
|
|
8006
|
+
background: "transparent",
|
|
8007
|
+
color: t.text,
|
|
8008
|
+
fontSize: 13,
|
|
8009
|
+
fontWeight: 500,
|
|
8010
|
+
textDecoration: "none"
|
|
8011
|
+
},
|
|
8012
|
+
children: [
|
|
8013
|
+
/* @__PURE__ */ jsx6("span", { style: { color: "#25D366", flex: "0 0 auto" }, children: /* @__PURE__ */ jsx6(WhatsAppIcon, {}) }),
|
|
8014
|
+
/* @__PURE__ */ jsxs6("span", { children: [
|
|
8015
|
+
"Book on WhatsApp",
|
|
8016
|
+
/* @__PURE__ */ jsx6("span", { style: { display: "block", fontSize: 12, fontWeight: 400, color: t.muted, marginTop: 1 }, children: "We'll ask the same questions in chat." })
|
|
8017
|
+
] })
|
|
8018
|
+
]
|
|
8019
|
+
}
|
|
8020
|
+
)
|
|
8021
|
+
]
|
|
8022
|
+
}
|
|
8023
|
+
);
|
|
8024
|
+
const calendar = /* @__PURE__ */ jsxs6(
|
|
8025
|
+
"div",
|
|
8026
|
+
{
|
|
8027
|
+
style: {
|
|
8028
|
+
flex: "1 1 auto",
|
|
8029
|
+
minWidth: 0,
|
|
8030
|
+
padding: wide ? "24px 24px 20px" : "16px 16px 8px",
|
|
8031
|
+
boxSizing: "border-box",
|
|
8032
|
+
overflowY: wide ? "auto" : void 0
|
|
8033
|
+
},
|
|
8034
|
+
children: [
|
|
8035
|
+
/* @__PURE__ */ jsxs6("div", { style: { display: "flex", alignItems: "center", justifyContent: "space-between", marginBottom: 14 }, children: [
|
|
8036
|
+
/* @__PURE__ */ jsxs6("div", { style: { fontSize: 16, fontWeight: 600 }, children: [
|
|
8037
|
+
monthDate.toLocaleDateString("en-US", { month: "long", timeZone: "UTC" }),
|
|
8038
|
+
" ",
|
|
8039
|
+
/* @__PURE__ */ jsx6("span", { style: { fontWeight: 500, ...muted }, children: monthDate.getUTCFullYear() })
|
|
8040
|
+
] }),
|
|
8041
|
+
/* @__PURE__ */ jsxs6("div", { style: { display: "flex", gap: 4 }, children: [
|
|
8042
|
+
/* @__PURE__ */ jsx6(
|
|
8043
|
+
NavButton,
|
|
8044
|
+
{
|
|
8045
|
+
t,
|
|
8046
|
+
label: "Previous month",
|
|
8047
|
+
icon: "left",
|
|
8048
|
+
disabled: atFirstMonth,
|
|
8049
|
+
onClick: () => setMonth(shiftMonth(month, -1))
|
|
8050
|
+
}
|
|
8051
|
+
),
|
|
8052
|
+
/* @__PURE__ */ jsx6(
|
|
8053
|
+
NavButton,
|
|
8054
|
+
{
|
|
8055
|
+
t,
|
|
8056
|
+
label: "Next month",
|
|
8057
|
+
icon: "right",
|
|
8058
|
+
disabled: pastHorizon,
|
|
8059
|
+
onClick: () => setMonth(shiftMonth(month, 1))
|
|
8060
|
+
}
|
|
8061
|
+
)
|
|
8062
|
+
] })
|
|
8063
|
+
] }),
|
|
8064
|
+
/* @__PURE__ */ jsxs6("div", { style: { display: "grid", gridTemplateColumns: "repeat(7, minmax(0, 1fr))", gap: wide ? 6 : 4 }, children: [
|
|
8065
|
+
WEEKDAYS.map((w) => /* @__PURE__ */ jsx6(
|
|
8066
|
+
"div",
|
|
8067
|
+
{
|
|
8068
|
+
style: {
|
|
8069
|
+
textAlign: "center",
|
|
8070
|
+
fontSize: 11,
|
|
8071
|
+
fontWeight: 500,
|
|
8072
|
+
letterSpacing: ".08em",
|
|
8073
|
+
textTransform: "uppercase",
|
|
8074
|
+
padding: "6px 0 8px",
|
|
8075
|
+
color: t.text
|
|
8076
|
+
},
|
|
8077
|
+
children: w
|
|
8078
|
+
},
|
|
8079
|
+
w
|
|
8080
|
+
)),
|
|
8081
|
+
grid.map((key) => {
|
|
8082
|
+
const inMonth = key.startsWith(month);
|
|
8083
|
+
const bookable = byDay.has(key);
|
|
8084
|
+
const isSelected = key === day;
|
|
8085
|
+
const dayNum = Number(key.slice(8));
|
|
8086
|
+
if (!inMonth && !bookable) return /* @__PURE__ */ jsx6("div", { "aria-hidden": true }, key);
|
|
8087
|
+
return /* @__PURE__ */ jsxs6(
|
|
8088
|
+
"button",
|
|
8089
|
+
{
|
|
8090
|
+
type: "button",
|
|
8091
|
+
disabled: !bookable,
|
|
8092
|
+
onClick: () => setPickedDay(key),
|
|
8093
|
+
"aria-pressed": isSelected,
|
|
8094
|
+
"aria-label": new Date(keyToUtc(key)).toLocaleDateString("en-US", {
|
|
8095
|
+
weekday: "long",
|
|
8096
|
+
month: "long",
|
|
8097
|
+
day: "numeric",
|
|
8098
|
+
timeZone: "UTC"
|
|
8099
|
+
}),
|
|
8100
|
+
className: bookable && !isSelected ? "gg-bk-day" : void 0,
|
|
7772
8101
|
style: {
|
|
7773
|
-
|
|
7774
|
-
|
|
7775
|
-
|
|
7776
|
-
|
|
7777
|
-
|
|
7778
|
-
|
|
8102
|
+
position: "relative",
|
|
8103
|
+
aspectRatio: "1 / 1",
|
|
8104
|
+
minHeight: 36,
|
|
8105
|
+
border: 0,
|
|
8106
|
+
borderRadius: 8,
|
|
8107
|
+
padding: 0,
|
|
8108
|
+
fontFamily: "inherit",
|
|
8109
|
+
fontSize: wide ? 15 : 14,
|
|
8110
|
+
fontWeight: bookable ? 600 : 400,
|
|
8111
|
+
cursor: bookable ? "pointer" : "default",
|
|
8112
|
+
background: isSelected ? t.ink : bookable ? t.open : "transparent",
|
|
8113
|
+
color: isSelected ? t.onInk : bookable ? t.text : t.faint,
|
|
8114
|
+
opacity: monthLoaded ? 1 : 0.5
|
|
7779
8115
|
},
|
|
7780
8116
|
children: [
|
|
7781
|
-
/* @__PURE__ */
|
|
7782
|
-
|
|
7783
|
-
heading.description && /* @__PURE__ */ jsx6("div", { style: { fontSize: 12, color: t.muted, marginTop: 2 }, children: heading.description })
|
|
7784
|
-
] }),
|
|
7785
|
-
/* @__PURE__ */ jsx6(
|
|
7786
|
-
"button",
|
|
8117
|
+
!inMonth && dayNum === 1 && /* @__PURE__ */ jsx6(
|
|
8118
|
+
"span",
|
|
7787
8119
|
{
|
|
7788
|
-
|
|
7789
|
-
|
|
7790
|
-
|
|
7791
|
-
|
|
8120
|
+
style: {
|
|
8121
|
+
position: "absolute",
|
|
8122
|
+
top: 4,
|
|
8123
|
+
left: 0,
|
|
8124
|
+
right: 0,
|
|
8125
|
+
fontSize: 9,
|
|
8126
|
+
fontWeight: 500,
|
|
8127
|
+
letterSpacing: ".06em",
|
|
8128
|
+
textTransform: "uppercase"
|
|
8129
|
+
},
|
|
8130
|
+
children: new Date(keyToUtc(key)).toLocaleDateString("en-US", { month: "short", timeZone: "UTC" })
|
|
7792
8131
|
}
|
|
7793
|
-
)
|
|
7794
|
-
|
|
7795
|
-
|
|
7796
|
-
|
|
7797
|
-
/* @__PURE__ */ jsxs6("div", { style: { padding: 18, overflowY: "auto", flex: "1 1 auto" }, children: [
|
|
7798
|
-
error && /* @__PURE__ */ jsx6("div", { style: { color: t.danger, fontSize: 12, marginBottom: 12, lineHeight: 1.5 }, children: error }),
|
|
7799
|
-
step === "slots" && /* @__PURE__ */ jsxs6(Fragment5, { children: [
|
|
7800
|
-
whatsappUrl && /* @__PURE__ */ jsxs6(
|
|
7801
|
-
"a",
|
|
7802
|
-
{
|
|
7803
|
-
href: whatsappUrl,
|
|
7804
|
-
target: "_blank",
|
|
7805
|
-
rel: "noreferrer",
|
|
7806
|
-
style: {
|
|
7807
|
-
display: "block",
|
|
7808
|
-
marginBottom: 16,
|
|
7809
|
-
padding: "10px 14px",
|
|
7810
|
-
borderRadius: 10,
|
|
7811
|
-
border: `1px solid ${t.border}`,
|
|
7812
|
-
background: t.surface,
|
|
7813
|
-
color: t.text,
|
|
7814
|
-
fontSize: 13,
|
|
7815
|
-
textDecoration: "none"
|
|
7816
|
-
},
|
|
7817
|
-
children: [
|
|
7818
|
-
"\u{1F4AC} Rather book on WhatsApp?",
|
|
7819
|
-
/* @__PURE__ */ jsx6("span", { style: { display: "block", fontSize: 11, color: t.muted, marginTop: 2 }, children: "We'll ask the same questions in chat." })
|
|
7820
|
-
]
|
|
7821
|
-
}
|
|
7822
|
-
),
|
|
7823
|
-
slots === null && /* @__PURE__ */ jsx6("div", { style: { color: t.muted, fontSize: 13 }, children: "Finding times\u2026" }),
|
|
7824
|
-
(slots == null ? void 0 : slots.length) === 0 && !error && /* @__PURE__ */ jsx6("div", { style: { color: t.muted, fontSize: 13 }, children: "No times available right now." }),
|
|
7825
|
-
[...byDay.entries()].map(([day, daySlots]) => /* @__PURE__ */ jsxs6("div", { style: { marginBottom: 18 }, children: [
|
|
7826
|
-
/* @__PURE__ */ jsx6("div", { style: { fontSize: 11, color: t.muted, marginBottom: 8, textTransform: "uppercase", letterSpacing: ".6px" }, children: formatDay(daySlots[0].startsAt) }),
|
|
7827
|
-
/* @__PURE__ */ jsx6("div", { style: { display: "flex", flexWrap: "wrap", gap: 8 }, children: daySlots.map((slot) => /* @__PURE__ */ jsx6(
|
|
7828
|
-
"button",
|
|
8132
|
+
),
|
|
8133
|
+
dayNum,
|
|
8134
|
+
key === today && /* @__PURE__ */ jsx6(
|
|
8135
|
+
"span",
|
|
7829
8136
|
{
|
|
7830
|
-
|
|
7831
|
-
setSelected(slot);
|
|
7832
|
-
setStep("details");
|
|
7833
|
-
},
|
|
8137
|
+
"aria-hidden": true,
|
|
7834
8138
|
style: {
|
|
7835
|
-
|
|
8139
|
+
position: "absolute",
|
|
8140
|
+
bottom: 6,
|
|
8141
|
+
left: "50%",
|
|
8142
|
+
width: 4,
|
|
8143
|
+
height: 4,
|
|
8144
|
+
marginLeft: -2,
|
|
7836
8145
|
borderRadius: 999,
|
|
7837
|
-
|
|
7838
|
-
|
|
7839
|
-
color: t.text,
|
|
7840
|
-
fontSize: 13,
|
|
7841
|
-
cursor: "pointer"
|
|
7842
|
-
},
|
|
7843
|
-
children: formatTime(slot.startsAt)
|
|
7844
|
-
},
|
|
7845
|
-
slot.startsAt
|
|
7846
|
-
)) })
|
|
7847
|
-
] }, day))
|
|
7848
|
-
] }),
|
|
7849
|
-
step === "details" && selected && /* @__PURE__ */ jsxs6("div", { style: { display: "flex", flexDirection: "column", gap: 10 }, children: [
|
|
7850
|
-
/* @__PURE__ */ jsxs6("div", { style: { fontSize: 13, color: t.muted }, children: [
|
|
7851
|
-
formatDay(selected.startsAt),
|
|
7852
|
-
" \xB7 ",
|
|
7853
|
-
formatTime(selected.startsAt),
|
|
7854
|
-
" \xB7 ",
|
|
7855
|
-
/* @__PURE__ */ jsx6(
|
|
7856
|
-
"button",
|
|
7857
|
-
{
|
|
7858
|
-
onClick: () => setStep("slots"),
|
|
7859
|
-
style: { border: 0, background: "transparent", color: t.accent, cursor: "pointer", fontSize: 13, padding: 0 },
|
|
7860
|
-
children: "change"
|
|
8146
|
+
background: isSelected ? t.onInk : t.text
|
|
8147
|
+
}
|
|
7861
8148
|
}
|
|
7862
8149
|
)
|
|
7863
|
-
]
|
|
7864
|
-
|
|
7865
|
-
|
|
7866
|
-
|
|
7867
|
-
|
|
7868
|
-
|
|
7869
|
-
|
|
7870
|
-
|
|
7871
|
-
|
|
7872
|
-
|
|
7873
|
-
|
|
7874
|
-
|
|
7875
|
-
|
|
7876
|
-
|
|
7877
|
-
|
|
7878
|
-
|
|
7879
|
-
|
|
7880
|
-
|
|
7881
|
-
|
|
7882
|
-
|
|
7883
|
-
|
|
7884
|
-
|
|
7885
|
-
|
|
7886
|
-
|
|
7887
|
-
|
|
7888
|
-
|
|
7889
|
-
|
|
7890
|
-
|
|
7891
|
-
|
|
7892
|
-
|
|
7893
|
-
|
|
7894
|
-
|
|
7895
|
-
|
|
7896
|
-
|
|
7897
|
-
|
|
7898
|
-
|
|
7899
|
-
]
|
|
7900
|
-
|
|
7901
|
-
|
|
7902
|
-
|
|
7903
|
-
|
|
7904
|
-
|
|
7905
|
-
|
|
7906
|
-
|
|
7907
|
-
|
|
7908
|
-
|
|
7909
|
-
|
|
7910
|
-
|
|
7911
|
-
|
|
8150
|
+
]
|
|
8151
|
+
},
|
|
8152
|
+
key
|
|
8153
|
+
);
|
|
8154
|
+
})
|
|
8155
|
+
] })
|
|
8156
|
+
]
|
|
8157
|
+
}
|
|
8158
|
+
);
|
|
8159
|
+
const times = /* @__PURE__ */ jsxs6(
|
|
8160
|
+
"div",
|
|
8161
|
+
{
|
|
8162
|
+
style: {
|
|
8163
|
+
width: wide ? 260 : void 0,
|
|
8164
|
+
flex: wide ? "0 0 260px" : void 0,
|
|
8165
|
+
borderLeft: wide ? `1px solid ${t.border}` : void 0,
|
|
8166
|
+
borderTop: wide ? void 0 : `1px solid ${t.border}`,
|
|
8167
|
+
padding: wide ? "24px 20px 0" : "16px 16px 0",
|
|
8168
|
+
boxSizing: "border-box",
|
|
8169
|
+
display: "flex",
|
|
8170
|
+
flexDirection: "column",
|
|
8171
|
+
minHeight: 0
|
|
8172
|
+
},
|
|
8173
|
+
children: [
|
|
8174
|
+
/* @__PURE__ */ jsxs6("div", { style: { display: "flex", alignItems: "center", justifyContent: "space-between", gap: 8, marginBottom: 14 }, children: [
|
|
8175
|
+
/* @__PURE__ */ jsx6("div", { style: { fontSize: 16, fontWeight: 600, whiteSpace: "nowrap" }, children: day ? /* @__PURE__ */ jsxs6(Fragment5, { children: [
|
|
8176
|
+
new Date(keyToUtc(day)).toLocaleDateString("en-US", { weekday: "short", timeZone: "UTC" }),
|
|
8177
|
+
" ",
|
|
8178
|
+
/* @__PURE__ */ jsx6("span", { style: { fontWeight: 500, ...muted }, children: ordinal(Number(day.slice(8))) })
|
|
8179
|
+
] }) : /* @__PURE__ */ jsx6("span", { style: { fontWeight: 500, ...muted }, children: "Times" }) }),
|
|
8180
|
+
/* @__PURE__ */ jsx6(
|
|
8181
|
+
"div",
|
|
8182
|
+
{
|
|
8183
|
+
role: "group",
|
|
8184
|
+
"aria-label": "Clock format",
|
|
8185
|
+
style: { display: "flex", padding: 3, borderRadius: 8, background: t.open, flex: "0 0 auto" },
|
|
8186
|
+
children: [true, false].map((h12) => /* @__PURE__ */ jsx6(
|
|
8187
|
+
"button",
|
|
8188
|
+
{
|
|
8189
|
+
type: "button",
|
|
8190
|
+
"aria-pressed": twelve === h12,
|
|
8191
|
+
onClick: () => setTwelve(h12),
|
|
8192
|
+
style: {
|
|
8193
|
+
border: 0,
|
|
8194
|
+
borderRadius: 6,
|
|
8195
|
+
padding: "4px 9px",
|
|
8196
|
+
fontFamily: "inherit",
|
|
8197
|
+
fontSize: 13,
|
|
8198
|
+
fontWeight: 500,
|
|
8199
|
+
cursor: "pointer",
|
|
8200
|
+
background: twelve === h12 ? t.bg : "transparent",
|
|
8201
|
+
color: twelve === h12 ? t.text : t.muted,
|
|
8202
|
+
boxShadow: twelve === h12 ? "0 1px 2px rgba(0,0,0,.12)" : "none"
|
|
8203
|
+
},
|
|
8204
|
+
children: h12 ? "12h" : "24h"
|
|
8205
|
+
},
|
|
8206
|
+
String(h12)
|
|
8207
|
+
))
|
|
8208
|
+
}
|
|
8209
|
+
)
|
|
8210
|
+
] }),
|
|
8211
|
+
/* @__PURE__ */ jsxs6(
|
|
8212
|
+
"div",
|
|
8213
|
+
{
|
|
8214
|
+
style: {
|
|
8215
|
+
overflowY: wide ? "auto" : void 0,
|
|
8216
|
+
flex: "1 1 auto",
|
|
8217
|
+
minHeight: 0,
|
|
8218
|
+
paddingBottom: 20,
|
|
8219
|
+
display: wide ? "flex" : "grid",
|
|
8220
|
+
flexDirection: "column",
|
|
8221
|
+
gridTemplateColumns: "repeat(auto-fill, minmax(96px, 1fr))",
|
|
8222
|
+
gap: 8
|
|
8223
|
+
},
|
|
8224
|
+
children: [
|
|
8225
|
+
error && /* @__PURE__ */ jsx6("div", { style: { color: t.danger, fontSize: 13, lineHeight: 1.5, gridColumn: "1 / -1" }, children: error }),
|
|
8226
|
+
!monthLoaded && !error && /* @__PURE__ */ jsx6("div", { style: { fontSize: 13, gridColumn: "1 / -1", ...muted }, children: "Finding times\u2026" }),
|
|
8227
|
+
monthLoaded && !error && !day && /* @__PURE__ */ jsx6("div", { style: { fontSize: 13, lineHeight: 1.5, gridColumn: "1 / -1", ...muted }, children: pastHorizon ? "Nothing can be booked this far ahead yet." : "No times left this month. Try the next one." }),
|
|
8228
|
+
monthLoaded && daySlots.map((slot) => /* @__PURE__ */ jsx6(
|
|
8229
|
+
"button",
|
|
8230
|
+
{
|
|
8231
|
+
type: "button",
|
|
8232
|
+
className: "gg-bk-slot",
|
|
8233
|
+
onClick: () => {
|
|
8234
|
+
setSelected(slot);
|
|
8235
|
+
setError(null);
|
|
8236
|
+
setStep("details");
|
|
8237
|
+
},
|
|
8238
|
+
style: {
|
|
8239
|
+
flex: "0 0 auto",
|
|
8240
|
+
padding: "11px 12px",
|
|
8241
|
+
borderRadius: 8,
|
|
8242
|
+
border: `1px solid ${t.border}`,
|
|
8243
|
+
background: t.pane,
|
|
8244
|
+
color: t.text,
|
|
8245
|
+
fontFamily: "inherit",
|
|
8246
|
+
fontSize: 14,
|
|
8247
|
+
fontWeight: 500,
|
|
8248
|
+
cursor: "pointer",
|
|
8249
|
+
textAlign: "center"
|
|
8250
|
+
},
|
|
8251
|
+
children: formatTime(slot.startsAt, zone, twelve)
|
|
8252
|
+
},
|
|
8253
|
+
slot.startsAt
|
|
8254
|
+
))
|
|
8255
|
+
]
|
|
8256
|
+
}
|
|
8257
|
+
)
|
|
8258
|
+
]
|
|
8259
|
+
}
|
|
8260
|
+
);
|
|
8261
|
+
const form = /* @__PURE__ */ jsx6(
|
|
8262
|
+
"div",
|
|
8263
|
+
{
|
|
8264
|
+
style: {
|
|
8265
|
+
flex: "1 1 auto",
|
|
8266
|
+
minWidth: 0,
|
|
8267
|
+
padding: wide ? "28px 32px" : "20px",
|
|
8268
|
+
boxSizing: "border-box",
|
|
8269
|
+
overflowY: wide ? "auto" : void 0
|
|
8270
|
+
},
|
|
8271
|
+
children: /* @__PURE__ */ jsxs6("div", { style: { maxWidth: 440, display: "flex", flexDirection: "column", gap: 14 }, children: [
|
|
8272
|
+
error && /* @__PURE__ */ jsx6("div", { style: { color: t.danger, fontSize: 13, lineHeight: 1.5 }, children: error }),
|
|
8273
|
+
step === "details" && /* @__PURE__ */ jsxs6(Fragment5, { children: [
|
|
8274
|
+
/* @__PURE__ */ jsx6(Field, { t, label: "Your name", value: name, onChange: setName, autoComplete: "name" }),
|
|
8275
|
+
/* @__PURE__ */ jsx6(Field, { t, label: "Email", value: email, onChange: setEmail, type: "email", autoComplete: "email" }),
|
|
8276
|
+
/* @__PURE__ */ jsx6(
|
|
8277
|
+
Field,
|
|
8278
|
+
{
|
|
8279
|
+
t,
|
|
8280
|
+
label: "Mobile number",
|
|
8281
|
+
value: phone,
|
|
8282
|
+
onChange: setPhone,
|
|
8283
|
+
type: "tel",
|
|
8284
|
+
autoComplete: "tel",
|
|
8285
|
+
hint: "We send a code here to confirm, then a reminder before the call."
|
|
8286
|
+
}
|
|
8287
|
+
),
|
|
8288
|
+
/* @__PURE__ */ jsx6(Field, { t, label: "Anything we should know? (optional)", value: note, onChange: setNote, multiline: true }),
|
|
8289
|
+
/* @__PURE__ */ jsxs6("div", { style: { display: "flex", justifyContent: "flex-end", gap: 8, marginTop: 4 }, children: [
|
|
8290
|
+
/* @__PURE__ */ jsx6(
|
|
8291
|
+
"button",
|
|
8292
|
+
{
|
|
8293
|
+
type: "button",
|
|
8294
|
+
className: "gg-bk-ghost",
|
|
8295
|
+
onClick: () => {
|
|
8296
|
+
setError(null);
|
|
8297
|
+
setStep("slots");
|
|
8298
|
+
},
|
|
8299
|
+
style: secondaryStyle(t),
|
|
8300
|
+
children: "Back"
|
|
8301
|
+
}
|
|
8302
|
+
),
|
|
8303
|
+
/* @__PURE__ */ jsx6(
|
|
8304
|
+
"button",
|
|
8305
|
+
{
|
|
8306
|
+
type: "button",
|
|
8307
|
+
onClick: startBooking,
|
|
8308
|
+
disabled: !canSubmitDetails || busy,
|
|
8309
|
+
style: primaryStyle(t, !canSubmitDetails || busy),
|
|
8310
|
+
children: busy ? "Sending code\u2026" : "Send verification code"
|
|
8311
|
+
}
|
|
8312
|
+
)
|
|
8313
|
+
] })
|
|
8314
|
+
] }),
|
|
8315
|
+
step === "code" && /* @__PURE__ */ jsxs6(Fragment5, { children: [
|
|
8316
|
+
/* @__PURE__ */ jsx6("div", { style: { fontSize: 14, lineHeight: 1.5, ...muted }, children: "We sent a code to your phone. Your slot is held for 10 minutes." }),
|
|
8317
|
+
/* @__PURE__ */ jsx6(Field, { t, label: "Code", value: code, onChange: setCode, autoComplete: "one-time-code", inputMode: "numeric" }),
|
|
8318
|
+
/* @__PURE__ */ jsx6("div", { style: { display: "flex", justifyContent: "flex-end", marginTop: 4 }, children: /* @__PURE__ */ jsx6(
|
|
8319
|
+
"button",
|
|
8320
|
+
{
|
|
8321
|
+
type: "button",
|
|
8322
|
+
onClick: confirmBooking,
|
|
8323
|
+
disabled: code.trim().length < 4 || busy,
|
|
8324
|
+
style: primaryStyle(t, code.trim().length < 4 || busy),
|
|
8325
|
+
children: busy ? "Confirming\u2026" : "Confirm booking"
|
|
8326
|
+
}
|
|
8327
|
+
) })
|
|
8328
|
+
] }),
|
|
8329
|
+
step === "done" && /* @__PURE__ */ jsxs6(Fragment5, { children: [
|
|
8330
|
+
/* @__PURE__ */ jsx6("div", { style: { fontSize: 20, fontWeight: 600 }, children: "You're booked." }),
|
|
8331
|
+
/* @__PURE__ */ jsxs6("div", { style: { fontSize: 14, lineHeight: 1.6, ...muted }, children: [
|
|
8332
|
+
"A calendar invite is on its way to ",
|
|
8333
|
+
email,
|
|
8334
|
+
", and we'll send a WhatsApp reminder before the call."
|
|
8335
|
+
] }),
|
|
8336
|
+
meetUrl && /* @__PURE__ */ jsx6(
|
|
8337
|
+
"a",
|
|
8338
|
+
{
|
|
8339
|
+
href: meetUrl,
|
|
8340
|
+
target: "_blank",
|
|
8341
|
+
rel: "noreferrer",
|
|
8342
|
+
style: { ...primaryStyle(t, false), alignSelf: "flex-start", textDecoration: "none" },
|
|
8343
|
+
children: "Open the meeting link"
|
|
8344
|
+
}
|
|
8345
|
+
)
|
|
8346
|
+
] })
|
|
8347
|
+
] })
|
|
8348
|
+
}
|
|
8349
|
+
);
|
|
8350
|
+
return /* @__PURE__ */ jsxs6(
|
|
8351
|
+
"div",
|
|
8352
|
+
{
|
|
8353
|
+
onClick: (e) => {
|
|
8354
|
+
if (e.target === e.currentTarget) onClose();
|
|
8355
|
+
},
|
|
8356
|
+
style: {
|
|
8357
|
+
position: "fixed",
|
|
8358
|
+
inset: 0,
|
|
8359
|
+
zIndex: 2147483e3,
|
|
8360
|
+
background: "rgba(0,0,0,.6)",
|
|
8361
|
+
display: "flex",
|
|
8362
|
+
alignItems: wide ? "center" : "flex-start",
|
|
8363
|
+
justifyContent: "center",
|
|
8364
|
+
padding: wide ? 24 : 12,
|
|
8365
|
+
boxSizing: "border-box",
|
|
8366
|
+
overflowY: "auto",
|
|
8367
|
+
fontFamily: "Inter, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif"
|
|
8368
|
+
},
|
|
8369
|
+
children: [
|
|
8370
|
+
/* @__PURE__ */ jsx6("style", { children: `
|
|
8371
|
+
.gg-bk-day:hover { box-shadow: inset 0 0 0 1.5px ${t.ink}; }
|
|
8372
|
+
.gg-bk-slot:hover { border-color: ${t.ink} !important; }
|
|
8373
|
+
.gg-bk-ghost:hover { background: ${t.open} !important; }
|
|
8374
|
+
.gg-bk-root button:focus-visible, .gg-bk-root a:focus-visible,
|
|
8375
|
+
.gg-bk-root span:has(> select:focus-visible), .gg-bk-root input:focus-visible, .gg-bk-root textarea:focus-visible {
|
|
8376
|
+
outline: 2px solid ${t.ink}; outline-offset: 2px;
|
|
7912
8377
|
}
|
|
7913
|
-
)
|
|
8378
|
+
` }),
|
|
8379
|
+
/* @__PURE__ */ jsxs6(
|
|
8380
|
+
"div",
|
|
8381
|
+
{
|
|
8382
|
+
role: "dialog",
|
|
8383
|
+
"aria-modal": "true",
|
|
8384
|
+
"aria-label": page.title,
|
|
8385
|
+
className: "gg-bk-root",
|
|
8386
|
+
style: {
|
|
8387
|
+
width: step === "slots" ? "min(1060px, 100%)" : "min(820px, 100%)",
|
|
8388
|
+
// A month grid should not jump in height between months; the form
|
|
8389
|
+
// steps are short and would sit in a mostly empty box.
|
|
8390
|
+
height: wide && step === "slots" ? "min(640px, calc(100vh - 48px))" : void 0,
|
|
8391
|
+
minHeight: wide && step !== "slots" ? 420 : void 0,
|
|
8392
|
+
margin: wide ? void 0 : "auto 0",
|
|
8393
|
+
display: "flex",
|
|
8394
|
+
flexDirection: wide ? "row" : "column",
|
|
8395
|
+
background: t.bg,
|
|
8396
|
+
color: t.text,
|
|
8397
|
+
border: `1px solid ${t.border}`,
|
|
8398
|
+
borderRadius: 14,
|
|
8399
|
+
boxShadow: "0 24px 64px rgba(0,0,0,.35)",
|
|
8400
|
+
overflow: "hidden",
|
|
8401
|
+
boxSizing: "border-box",
|
|
8402
|
+
textAlign: "left",
|
|
8403
|
+
lineHeight: 1.4
|
|
8404
|
+
},
|
|
8405
|
+
children: [
|
|
8406
|
+
summary,
|
|
8407
|
+
step === "slots" ? /* @__PURE__ */ jsxs6(Fragment5, { children: [
|
|
8408
|
+
calendar,
|
|
8409
|
+
times
|
|
8410
|
+
] }) : form
|
|
8411
|
+
]
|
|
8412
|
+
}
|
|
8413
|
+
)
|
|
8414
|
+
]
|
|
7914
8415
|
}
|
|
7915
8416
|
);
|
|
7916
8417
|
}
|
|
7917
|
-
function primaryStyle(disabled) {
|
|
8418
|
+
function primaryStyle(t, disabled) {
|
|
7918
8419
|
return {
|
|
7919
|
-
marginTop: 4,
|
|
7920
8420
|
padding: "10px 16px",
|
|
7921
|
-
borderRadius:
|
|
8421
|
+
borderRadius: 8,
|
|
7922
8422
|
border: 0,
|
|
7923
|
-
background:
|
|
7924
|
-
color:
|
|
8423
|
+
background: t.ink,
|
|
8424
|
+
color: t.onInk,
|
|
8425
|
+
opacity: disabled ? 0.4 : 1,
|
|
8426
|
+
fontFamily: "inherit",
|
|
7925
8427
|
fontSize: 14,
|
|
7926
|
-
fontWeight:
|
|
8428
|
+
fontWeight: 600,
|
|
7927
8429
|
cursor: disabled ? "default" : "pointer"
|
|
7928
8430
|
};
|
|
7929
8431
|
}
|
|
8432
|
+
function secondaryStyle(t) {
|
|
8433
|
+
return {
|
|
8434
|
+
padding: "10px 16px",
|
|
8435
|
+
borderRadius: 8,
|
|
8436
|
+
border: 0,
|
|
8437
|
+
background: "transparent",
|
|
8438
|
+
color: t.text,
|
|
8439
|
+
fontFamily: "inherit",
|
|
8440
|
+
fontSize: 14,
|
|
8441
|
+
fontWeight: 500,
|
|
8442
|
+
cursor: "pointer"
|
|
8443
|
+
};
|
|
8444
|
+
}
|
|
8445
|
+
function Row({ icon, t, children }) {
|
|
8446
|
+
return /* @__PURE__ */ jsxs6("div", { style: { display: "flex", alignItems: "flex-start", gap: 10, color: t.text, minWidth: 0 }, children: [
|
|
8447
|
+
/* @__PURE__ */ jsx6("span", { style: { color: t.muted, flex: "0 0 auto", marginTop: 1 }, children: /* @__PURE__ */ jsx6(Icon, { name: icon }) }),
|
|
8448
|
+
/* @__PURE__ */ jsx6("span", { style: { minWidth: 0, overflowWrap: "anywhere" }, children })
|
|
8449
|
+
] });
|
|
8450
|
+
}
|
|
8451
|
+
function NavButton({
|
|
8452
|
+
t,
|
|
8453
|
+
label,
|
|
8454
|
+
icon,
|
|
8455
|
+
disabled,
|
|
8456
|
+
onClick
|
|
8457
|
+
}) {
|
|
8458
|
+
return /* @__PURE__ */ jsx6(
|
|
8459
|
+
"button",
|
|
8460
|
+
{
|
|
8461
|
+
type: "button",
|
|
8462
|
+
"aria-label": label,
|
|
8463
|
+
disabled,
|
|
8464
|
+
onClick,
|
|
8465
|
+
className: disabled ? void 0 : "gg-bk-ghost",
|
|
8466
|
+
style: {
|
|
8467
|
+
width: 32,
|
|
8468
|
+
height: 32,
|
|
8469
|
+
display: "flex",
|
|
8470
|
+
alignItems: "center",
|
|
8471
|
+
justifyContent: "center",
|
|
8472
|
+
border: 0,
|
|
8473
|
+
borderRadius: 8,
|
|
8474
|
+
background: "transparent",
|
|
8475
|
+
color: disabled ? t.faint : t.text,
|
|
8476
|
+
opacity: disabled ? 0.5 : 1,
|
|
8477
|
+
cursor: disabled ? "default" : "pointer",
|
|
8478
|
+
padding: 0
|
|
8479
|
+
},
|
|
8480
|
+
children: /* @__PURE__ */ jsx6(Icon, { name: icon })
|
|
8481
|
+
}
|
|
8482
|
+
);
|
|
8483
|
+
}
|
|
8484
|
+
function WhatsAppIcon() {
|
|
8485
|
+
return /* @__PURE__ */ jsx6("svg", { width: "20", height: "20", viewBox: "0 0 24 24", fill: "currentColor", "aria-hidden": true, style: { display: "block" }, children: /* @__PURE__ */ jsx6("path", { d: "M17.472 14.382c-.297-.149-1.758-.867-2.03-.967-.273-.099-.471-.148-.67.15-.197.297-.767.966-.94 1.164-.173.199-.347.223-.644.075-.297-.15-1.255-.463-2.39-1.475-.883-.788-1.48-1.761-1.653-2.059-.173-.297-.018-.458.13-.606.134-.133.298-.347.446-.52.149-.174.198-.298.298-.497.099-.198.05-.371-.025-.52-.075-.149-.669-1.612-.916-2.207-.242-.579-.487-.5-.669-.51-.173-.008-.371-.01-.57-.01-.198 0-.52.074-.792.372-.272.297-1.04 1.016-1.04 2.479 0 1.462 1.065 2.875 1.213 3.074.149.198 2.096 3.2 5.077 4.487.709.306 1.262.489 1.694.625.712.227 1.36.195 1.871.118.571-.085 1.758-.719 2.006-1.413.248-.694.248-1.289.173-1.413-.074-.124-.272-.198-.57-.347m-5.421 7.403h-.004a9.87 9.87 0 0 1-5.031-1.378l-.361-.214-3.741.982.998-3.648-.235-.374a9.86 9.86 0 0 1-1.51-5.26c.001-5.45 4.436-9.884 9.888-9.884 2.64 0 5.122 1.03 6.988 2.898a9.825 9.825 0 0 1 2.893 6.994c-.003 5.45-4.437 9.884-9.885 9.884m8.413-18.297A11.815 11.815 0 0 0 12.05 0C5.495 0 .16 5.335.157 11.892c0 2.096.547 4.142 1.588 5.945L.057 24l6.305-1.654a11.882 11.882 0 0 0 5.683 1.448h.005c6.554 0 11.89-5.335 11.893-11.893a11.821 11.821 0 0 0-3.48-8.413Z" }) });
|
|
8486
|
+
}
|
|
8487
|
+
function Icon({ name }) {
|
|
8488
|
+
const paths = {
|
|
8489
|
+
x: /* @__PURE__ */ jsx6("path", { d: "M18 6 6 18M6 6l12 12" }),
|
|
8490
|
+
left: /* @__PURE__ */ jsx6("path", { d: "m15 18-6-6 6-6" }),
|
|
8491
|
+
right: /* @__PURE__ */ jsx6("path", { d: "m9 18 6-6-6-6" }),
|
|
8492
|
+
down: /* @__PURE__ */ jsx6("path", { d: "m6 9 6 6 6-6" }),
|
|
8493
|
+
clock: /* @__PURE__ */ jsxs6(Fragment5, { children: [
|
|
8494
|
+
/* @__PURE__ */ jsx6("circle", { cx: "12", cy: "12", r: "9" }),
|
|
8495
|
+
/* @__PURE__ */ jsx6("path", { d: "M12 7v5l3 2" })
|
|
8496
|
+
] }),
|
|
8497
|
+
video: /* @__PURE__ */ jsxs6(Fragment5, { children: [
|
|
8498
|
+
/* @__PURE__ */ jsx6("rect", { x: "3", y: "6", width: "13", height: "12", rx: "2" }),
|
|
8499
|
+
/* @__PURE__ */ jsx6("path", { d: "m16 10 5-3v10l-5-3" })
|
|
8500
|
+
] }),
|
|
8501
|
+
globe: /* @__PURE__ */ jsxs6(Fragment5, { children: [
|
|
8502
|
+
/* @__PURE__ */ jsx6("circle", { cx: "12", cy: "12", r: "9" }),
|
|
8503
|
+
/* @__PURE__ */ jsx6("path", { d: "M3 12h18M12 3a14 14 0 0 1 0 18M12 3a14 14 0 0 0 0 18" })
|
|
8504
|
+
] }),
|
|
8505
|
+
calendar: /* @__PURE__ */ jsxs6(Fragment5, { children: [
|
|
8506
|
+
/* @__PURE__ */ jsx6("rect", { x: "3", y: "5", width: "18", height: "16", rx: "2" }),
|
|
8507
|
+
/* @__PURE__ */ jsx6("path", { d: "M3 10h18M8 3v4M16 3v4" })
|
|
8508
|
+
] })
|
|
8509
|
+
};
|
|
8510
|
+
return /* @__PURE__ */ jsx6(
|
|
8511
|
+
"svg",
|
|
8512
|
+
{
|
|
8513
|
+
width: "16",
|
|
8514
|
+
height: "16",
|
|
8515
|
+
viewBox: "0 0 24 24",
|
|
8516
|
+
fill: "none",
|
|
8517
|
+
stroke: "currentColor",
|
|
8518
|
+
strokeWidth: "2",
|
|
8519
|
+
strokeLinecap: "round",
|
|
8520
|
+
strokeLinejoin: "round",
|
|
8521
|
+
"aria-hidden": true,
|
|
8522
|
+
style: { display: "block" },
|
|
8523
|
+
children: paths[name]
|
|
8524
|
+
}
|
|
8525
|
+
);
|
|
8526
|
+
}
|
|
7930
8527
|
function Field({
|
|
8528
|
+
t,
|
|
7931
8529
|
label,
|
|
7932
8530
|
value,
|
|
7933
8531
|
onChange,
|
|
7934
8532
|
type = "text",
|
|
7935
|
-
hint
|
|
8533
|
+
hint,
|
|
8534
|
+
autoComplete,
|
|
8535
|
+
inputMode,
|
|
8536
|
+
multiline
|
|
7936
8537
|
}) {
|
|
7937
|
-
|
|
8538
|
+
const inputStyle = {
|
|
8539
|
+
display: "block",
|
|
8540
|
+
width: "100%",
|
|
8541
|
+
boxSizing: "border-box",
|
|
8542
|
+
marginTop: 6,
|
|
8543
|
+
padding: "9px 12px",
|
|
8544
|
+
background: t.input,
|
|
8545
|
+
color: t.text,
|
|
8546
|
+
border: `1px solid ${t.border}`,
|
|
8547
|
+
borderRadius: 8,
|
|
8548
|
+
fontFamily: "inherit",
|
|
8549
|
+
fontSize: 14,
|
|
8550
|
+
outline: "none",
|
|
8551
|
+
resize: "vertical"
|
|
8552
|
+
};
|
|
8553
|
+
return /* @__PURE__ */ jsxs6("label", { style: { display: "block", fontSize: 13, fontWeight: 500, color: t.text }, children: [
|
|
7938
8554
|
label,
|
|
7939
|
-
/* @__PURE__ */ jsx6(
|
|
8555
|
+
multiline ? /* @__PURE__ */ jsx6("textarea", { rows: 3, value, onChange: (e) => onChange(e.target.value), style: inputStyle }) : /* @__PURE__ */ jsx6(
|
|
7940
8556
|
"input",
|
|
7941
8557
|
{
|
|
7942
8558
|
type,
|
|
7943
8559
|
value,
|
|
8560
|
+
autoComplete,
|
|
8561
|
+
inputMode,
|
|
7944
8562
|
onChange: (e) => onChange(e.target.value),
|
|
7945
|
-
style:
|
|
7946
|
-
display: "block",
|
|
7947
|
-
width: "100%",
|
|
7948
|
-
boxSizing: "border-box",
|
|
7949
|
-
marginTop: 4,
|
|
7950
|
-
padding: "9px 12px",
|
|
7951
|
-
background: t.surface,
|
|
7952
|
-
color: t.text,
|
|
7953
|
-
border: `1px solid ${t.border}`,
|
|
7954
|
-
borderRadius: 8,
|
|
7955
|
-
fontSize: 13,
|
|
7956
|
-
outline: "none"
|
|
7957
|
-
}
|
|
8563
|
+
style: inputStyle
|
|
7958
8564
|
}
|
|
7959
8565
|
),
|
|
7960
|
-
hint && /* @__PURE__ */ jsx6("div", { style: { marginTop:
|
|
8566
|
+
hint && /* @__PURE__ */ jsx6("div", { style: { marginTop: 6, fontSize: 12, fontWeight: 400, color: t.muted }, children: hint })
|
|
7961
8567
|
] });
|
|
7962
8568
|
}
|
|
7963
8569
|
|