@mcp-b/react-components 0.64.0 → 0.65.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/agents-sdk/WorkspaceProject.d.ts +2 -1
- package/dist/components/agents-sdk/WorkspaceProject.js +7 -4
- package/dist/components/extension/FirstRunSetup.d.ts +169 -36
- package/dist/components/extension/FirstRunSetup.js +2061 -1572
- package/dist/components/general-purpose/StatusScreen.d.ts +6 -1
- package/dist/components/general-purpose/StatusScreen.js +44 -36
- package/dist/styles/chatgpt-sign-in-screen.css +2 -0
- package/dist/styles/first-run-setup.css +107 -96
- package/dist/styles/select.css +2 -1
- package/dist/styles/switch.css +20 -5
- package/package.json +2 -2
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { CHROME_MARK, GMAIL_MARK, SIGVELO_LOGO } from "../../utils/brand-marks.js";
|
|
2
2
|
import { t as cx } from "../../class-names-BiMDVpUo.js";
|
|
3
|
-
import { N as KeyboardIcon, P as LaptopIcon, Q as PuzzleIcon, T as EllipsisVerticalIcon, Y as PinIcon, Z as PlusIcon, ft as UserIcon, i as ArrowRightIcon, it as SpinnerIcon, m as ChevronDownIcon, mt as WarningIcon, p as CheckIcon, r as ArrowLeftIcon, s as ArrowUpRightIcon, u as BoxIcon } from "../../icons-nLTnB9kd.js";
|
|
3
|
+
import { N as KeyboardIcon, P as LaptopIcon, Q as PuzzleIcon, T as EllipsisVerticalIcon, U as MinusIcon, Y as PinIcon, Z as PlusIcon, ft as UserIcon, i as ArrowRightIcon, it as SpinnerIcon, m as ChevronDownIcon, mt as WarningIcon, p as CheckIcon, r as ArrowLeftIcon, s as ArrowUpRightIcon, u as BoxIcon, v as ClockIcon } from "../../icons-nLTnB9kd.js";
|
|
4
4
|
import { Select } from "../foundations/Select.js";
|
|
5
5
|
import { a as formatErrorMessage, r as firstLine, t as capitalize } from "../../format-DL7f2rqp.js";
|
|
6
6
|
import { Button } from "../foundations/Button.js";
|
|
@@ -29,25 +29,46 @@ import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
|
29
29
|
import { useIsMutating, useMutation, useQuery } from "@tanstack/react-query";
|
|
30
30
|
//#region src/components/extension/first-run/flow.ts
|
|
31
31
|
/**
|
|
32
|
-
*
|
|
33
|
-
*
|
|
32
|
+
* Every screen of the first run, in order. `FirstRunStep` is derived from this
|
|
33
|
+
* list, so a host that persists the step can validate it at its boundary.
|
|
34
34
|
*/
|
|
35
|
-
const
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
"ready"
|
|
49
|
-
]]
|
|
35
|
+
const firstRunSteps = [
|
|
36
|
+
"welcome",
|
|
37
|
+
"sign-in",
|
|
38
|
+
"model-connection",
|
|
39
|
+
"chrome-profile",
|
|
40
|
+
"history",
|
|
41
|
+
"preparation",
|
|
42
|
+
"writing",
|
|
43
|
+
"schedules",
|
|
44
|
+
"try",
|
|
45
|
+
"pin",
|
|
46
|
+
"ask",
|
|
47
|
+
"ready"
|
|
50
48
|
];
|
|
49
|
+
/** Every history choice, for a host that persists it. */
|
|
50
|
+
const firstRunHistoryChoices = [
|
|
51
|
+
"unset",
|
|
52
|
+
"history",
|
|
53
|
+
"skip"
|
|
54
|
+
];
|
|
55
|
+
const rank = (step) => firstRunSteps.indexOf(step);
|
|
56
|
+
/**
|
|
57
|
+
* The selector's sections, each named at its first screen. A section runs
|
|
58
|
+
* until the next one starts; the welcome comes before them all.
|
|
59
|
+
*/
|
|
60
|
+
const SECTIONS = [
|
|
61
|
+
["Connect your AI", "sign-in"],
|
|
62
|
+
["Chrome profile", "chrome-profile"],
|
|
63
|
+
["Work", "history"],
|
|
64
|
+
["Pin", "pin"],
|
|
65
|
+
["Ask", "ask"],
|
|
66
|
+
["Ready", "ready"]
|
|
67
|
+
];
|
|
68
|
+
const RAIL = SECTIONS.map(([label, first], index) => {
|
|
69
|
+
const following = SECTIONS[index + 1];
|
|
70
|
+
return [label, firstRunSteps.slice(rank(first), following && rank(following[1]))];
|
|
71
|
+
});
|
|
51
72
|
/** Work's screens, each listed under Work in the selector once history is in use. */
|
|
52
73
|
const WORK = [
|
|
53
74
|
["preparation", "Preparation"],
|
|
@@ -55,30 +76,38 @@ const WORK = [
|
|
|
55
76
|
["schedules", "Schedule"],
|
|
56
77
|
["try", "Try an automation"]
|
|
57
78
|
];
|
|
58
|
-
const STEPS = ["welcome", ...RAIL.flatMap(([, steps]) => steps)];
|
|
59
|
-
const rank = (step) => STEPS.indexOf(step);
|
|
60
79
|
const section = (step) => RAIL.find(([, steps]) => steps.includes(step));
|
|
61
80
|
const isWork = (step) => WORK.some(([candidate]) => candidate === step);
|
|
81
|
+
/** Preparation has settled: nothing runs, so what finished can be used and what failed waits for a retry. */
|
|
82
|
+
const settled = (preparation) => preparation === "done" || preparation === "failed";
|
|
62
83
|
/**
|
|
63
84
|
* Whether a screen is a stop on this person's way. Connecting a model is a
|
|
64
|
-
* branch of sign-in, Work's screens wait for history consent
|
|
65
|
-
* only while there is something to pin or the
|
|
85
|
+
* branch of sign-in, Work's screens wait for history consent and for the
|
|
86
|
+
* work they show, and Pin stays only while there is something to pin or the
|
|
87
|
+
* person is on it.
|
|
66
88
|
*/
|
|
67
|
-
function applies(candidate,
|
|
89
|
+
function applies(candidate, flow) {
|
|
90
|
+
const { step, history, pinned } = flow;
|
|
68
91
|
switch (candidate) {
|
|
69
92
|
case "model-connection": return false;
|
|
70
|
-
case "
|
|
93
|
+
case "writing": return history === "history" && flow.writing;
|
|
94
|
+
case "schedules": return history === "history" && flow.automations;
|
|
95
|
+
case "try": return history === "history" && flow.trial;
|
|
71
96
|
case "pin": return !pinned || step === "pin";
|
|
72
97
|
default: return !isWork(candidate) || history === "history";
|
|
73
98
|
}
|
|
74
99
|
}
|
|
75
|
-
const flowOrder = (flow) =>
|
|
76
|
-
/**
|
|
100
|
+
const flowOrder = (flow) => firstRunSteps.filter((candidate) => applies(candidate, flow));
|
|
101
|
+
/**
|
|
102
|
+
* The screen to show for the host's step: a skipped screen shows the next one
|
|
103
|
+
* that applies. A Work screen restored before consent shows the history
|
|
104
|
+
* choice; the choice itself moves on only once the host has recorded consent.
|
|
105
|
+
*/
|
|
77
106
|
function currentStep(flow) {
|
|
78
107
|
const { step, history, preparation } = flow;
|
|
79
108
|
if (step === "model-connection") return step;
|
|
80
109
|
if (isWork(step) && history === "unset") return "history";
|
|
81
|
-
if (isWork(step) && step !== "preparation" && history === "history" && preparation
|
|
110
|
+
if (isWork(step) && step !== "preparation" && history === "history" && !settled(preparation)) return "preparation";
|
|
82
111
|
const order = flowOrder(flow);
|
|
83
112
|
return order.includes(step) ? step : order.find((candidate) => rank(candidate) > rank(step)) ?? "ready";
|
|
84
113
|
}
|
|
@@ -91,6 +120,19 @@ function nextStep(flow) {
|
|
|
91
120
|
});
|
|
92
121
|
return order[order.indexOf(current) + 1];
|
|
93
122
|
}
|
|
123
|
+
/**
|
|
124
|
+
* Where skipping history leads: the screen after the history choice once it
|
|
125
|
+
* reads skipped. From the choice itself or from a Work screen restored before
|
|
126
|
+
* consent, which shows the choice; Ready is last, so a skip always has
|
|
127
|
+
* somewhere to go.
|
|
128
|
+
*/
|
|
129
|
+
function afterHistorySkip(flow) {
|
|
130
|
+
return nextStep({
|
|
131
|
+
...flow,
|
|
132
|
+
step: "history",
|
|
133
|
+
history: "skip"
|
|
134
|
+
}) ?? "ready";
|
|
135
|
+
}
|
|
94
136
|
function previousStep(flow) {
|
|
95
137
|
const current = currentStep(flow);
|
|
96
138
|
if (current === "model-connection") return "sign-in";
|
|
@@ -100,22 +142,52 @@ function previousStep(flow) {
|
|
|
100
142
|
});
|
|
101
143
|
return order[order.indexOf(current) - 1];
|
|
102
144
|
}
|
|
103
|
-
/**
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
145
|
+
/**
|
|
146
|
+
* The screens the selector lists: the flow's, and Pin once reached, so a
|
|
147
|
+
* profile pinned on the way keeps its check in view.
|
|
148
|
+
*/
|
|
149
|
+
const selectorOrder = (navigation) => {
|
|
150
|
+
const order = flowOrder({
|
|
107
151
|
...navigation,
|
|
108
152
|
step: currentStep(navigation)
|
|
109
|
-
})
|
|
110
|
-
|
|
153
|
+
});
|
|
154
|
+
return firstRunSteps.filter((candidate) => order.includes(candidate) || candidate === "pin" && rank(candidate) <= navigation.furthest);
|
|
155
|
+
};
|
|
156
|
+
/**
|
|
157
|
+
* Whether the selector can move to `target`: Work's later screens open once
|
|
158
|
+
* preparation settles and their own work is done.
|
|
159
|
+
*/
|
|
160
|
+
function canVisit(target, navigation) {
|
|
161
|
+
if (navigation.saving) return false;
|
|
162
|
+
if (!selectorOrder(navigation).includes(target)) return false;
|
|
163
|
+
if (isWork(target)) return target === "preparation" || settled(navigation.preparation);
|
|
111
164
|
return rank(target) <= navigation.furthest;
|
|
112
165
|
}
|
|
166
|
+
/**
|
|
167
|
+
* A screen's outcome, from the answer it produced rather than from having
|
|
168
|
+
* passed it: a model in use, a history choice, finished work, a review, a
|
|
169
|
+
* completed run, a pin, or Not now. Screens with nothing to answer complete
|
|
170
|
+
* when the person leaves them with Continue; passing them in the selector
|
|
171
|
+
* answers nothing.
|
|
172
|
+
*/
|
|
173
|
+
function outcome(step, navigation) {
|
|
174
|
+
const skipped = navigation.left[step] === "skipped" ? "Skipped" : void 0;
|
|
175
|
+
switch (step) {
|
|
176
|
+
case "sign-in": return navigation.connected ? "Completed" : void 0;
|
|
177
|
+
case "history": return navigation.history === "history" ? "Completed" : navigation.history === "skip" ? "Skipped" : void 0;
|
|
178
|
+
case "preparation": return navigation.preparation === "done" ? "Completed" : void 0;
|
|
179
|
+
case "writing":
|
|
180
|
+
case "schedules": return navigation.reviewed[step] ? "Reviewed" : void 0;
|
|
181
|
+
case "try": return navigation.tried ? "Completed" : skipped;
|
|
182
|
+
case "pin": return navigation.pinned ? "Completed" : skipped;
|
|
183
|
+
case "chrome-profile":
|
|
184
|
+
case "ask": return navigation.left[step] === "continued" ? "Completed" : skipped;
|
|
185
|
+
default: return;
|
|
186
|
+
}
|
|
187
|
+
}
|
|
113
188
|
/** The selector's entries: each section at its first screen, and Work's screens under it. */
|
|
114
189
|
function navigationItems(navigation) {
|
|
115
|
-
const order =
|
|
116
|
-
...navigation,
|
|
117
|
-
step: currentStep(navigation)
|
|
118
|
-
});
|
|
190
|
+
const order = selectorOrder(navigation);
|
|
119
191
|
return RAIL.flatMap(([label, steps]) => {
|
|
120
192
|
const value = order.find((candidate) => steps.includes(candidate));
|
|
121
193
|
if (!value) return [];
|
|
@@ -123,14 +195,13 @@ function navigationItems(navigation) {
|
|
|
123
195
|
label,
|
|
124
196
|
value,
|
|
125
197
|
disabled: !canVisit(value, navigation),
|
|
126
|
-
|
|
127
|
-
completionText: "Completed"
|
|
198
|
+
outcome: outcome(value, navigation)
|
|
128
199
|
}, ...value === "history" && navigation.history === "history" ? WORK.map(([step, label]) => ({
|
|
129
200
|
label,
|
|
130
201
|
value: step,
|
|
131
202
|
disabled: !canVisit(step, navigation),
|
|
132
|
-
|
|
133
|
-
|
|
203
|
+
outcome: outcome(step, navigation),
|
|
204
|
+
nested: true
|
|
134
205
|
})) : []];
|
|
135
206
|
});
|
|
136
207
|
}
|
|
@@ -145,18 +216,78 @@ function navigationValue(flow) {
|
|
|
145
216
|
const steps = section(current)?.[1] ?? [];
|
|
146
217
|
return order.find((candidate) => steps.includes(candidate));
|
|
147
218
|
}
|
|
148
|
-
/**
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
219
|
+
/**
|
|
220
|
+
* Parallel work in one status: working while any runs, then failed if any
|
|
221
|
+
* failed, done once all are, and idle otherwise. Setup combines its own
|
|
222
|
+
* preparation this way; a host combines the jobs behind one work with it.
|
|
223
|
+
*/
|
|
224
|
+
function combineFirstRunWorkStatus(statuses) {
|
|
225
|
+
if (statuses.includes("working")) return "working";
|
|
226
|
+
if (statuses.includes("failed")) return "failed";
|
|
227
|
+
return statuses.every((status) => status === "done") ? "done" : "idle";
|
|
228
|
+
}
|
|
229
|
+
/**
|
|
230
|
+
* All preparation in one status. Once nothing runs and some work is done, a
|
|
231
|
+
* work the host never started counts as unfinished, as a failed one does, so
|
|
232
|
+
* the person goes on with what finished instead of waiting on nothing.
|
|
233
|
+
*/
|
|
234
|
+
function preparationStatus(works) {
|
|
235
|
+
const statuses = works.map((work) => work.status);
|
|
236
|
+
const status = combineFirstRunWorkStatus(statuses);
|
|
237
|
+
return status === "idle" && statuses.includes("done") ? "failed" : status;
|
|
156
238
|
}
|
|
157
239
|
//#endregion
|
|
158
240
|
//#region src/components/extension/first-run/frame.tsx
|
|
159
241
|
const ADVANCE_MS = 1600;
|
|
242
|
+
/**
|
|
243
|
+
* Owns one work's retry: pending reads as working, so Try again cannot be
|
|
244
|
+
* pressed twice, and a rejection's sentence stays until the host runs the
|
|
245
|
+
* work again.
|
|
246
|
+
*/
|
|
247
|
+
function useRetry(work) {
|
|
248
|
+
const $ = c(13);
|
|
249
|
+
let t0;
|
|
250
|
+
if ($[0] !== work) {
|
|
251
|
+
t0 = { mutationFn: () => work.onRetry() };
|
|
252
|
+
$[0] = work;
|
|
253
|
+
$[1] = t0;
|
|
254
|
+
} else t0 = $[1];
|
|
255
|
+
const retry = useMutation(t0);
|
|
256
|
+
const [hostStatus, setHostStatus] = React.useState(work.status);
|
|
257
|
+
if (hostStatus !== work.status) {
|
|
258
|
+
setHostStatus(work.status);
|
|
259
|
+
if (hostStatus === "failed") retry.reset();
|
|
260
|
+
}
|
|
261
|
+
const t1 = retry.isPending ? "working" : work.status;
|
|
262
|
+
let t2;
|
|
263
|
+
if ($[2] !== retry) {
|
|
264
|
+
t2 = () => retry.mutate();
|
|
265
|
+
$[2] = retry;
|
|
266
|
+
$[3] = t2;
|
|
267
|
+
} else t2 = $[3];
|
|
268
|
+
let t3;
|
|
269
|
+
if ($[4] !== retry.error || $[5] !== retry.isError || $[6] !== work.failure || $[7] !== work.status) {
|
|
270
|
+
t3 = work.status !== "failed" ? void 0 : retry.isError && formatErrorMessage(retry.error) || work.failure;
|
|
271
|
+
$[4] = retry.error;
|
|
272
|
+
$[5] = retry.isError;
|
|
273
|
+
$[6] = work.failure;
|
|
274
|
+
$[7] = work.status;
|
|
275
|
+
$[8] = t3;
|
|
276
|
+
} else t3 = $[8];
|
|
277
|
+
let t4;
|
|
278
|
+
if ($[9] !== t1 || $[10] !== t2 || $[11] !== t3) {
|
|
279
|
+
t4 = {
|
|
280
|
+
status: t1,
|
|
281
|
+
onRetry: t2,
|
|
282
|
+
failure: t3
|
|
283
|
+
};
|
|
284
|
+
$[9] = t1;
|
|
285
|
+
$[10] = t2;
|
|
286
|
+
$[11] = t3;
|
|
287
|
+
$[12] = t4;
|
|
288
|
+
} else t4 = $[12];
|
|
289
|
+
return t4;
|
|
290
|
+
}
|
|
160
291
|
const FirstRunContext = React.createContext(null);
|
|
161
292
|
function useFirstRun() {
|
|
162
293
|
const context = React.use(FirstRunContext);
|
|
@@ -201,125 +332,140 @@ function PoweredBy() {
|
|
|
201
332
|
* `layout` names a screen whose body sets its own scroll layout.
|
|
202
333
|
*/
|
|
203
334
|
function Step(t0) {
|
|
204
|
-
const $ = c(
|
|
335
|
+
const $ = c(30);
|
|
205
336
|
const { hero, title, lead, body, narrow, layout, actions, center, announce: t1 } = t0;
|
|
206
337
|
const announce = t1 === void 0 ? "" : t1;
|
|
207
338
|
const { arrival, titleId } = useFirstRun();
|
|
208
339
|
const heading = React.useRef(null);
|
|
209
340
|
const shown = React.useRef(false);
|
|
210
|
-
const
|
|
341
|
+
const focused = React.useRef(null);
|
|
211
342
|
let t2;
|
|
212
|
-
if ($[0]
|
|
213
|
-
t2 = () => {
|
|
343
|
+
if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
|
|
344
|
+
t2 = (event) => {
|
|
345
|
+
focused.current = event.target;
|
|
346
|
+
};
|
|
347
|
+
$[0] = t2;
|
|
348
|
+
} else t2 = $[0];
|
|
349
|
+
const track = t2;
|
|
350
|
+
const [initial] = React.useState(announce);
|
|
351
|
+
let t3;
|
|
352
|
+
if ($[1] !== arrival) {
|
|
353
|
+
t3 = () => {
|
|
214
354
|
const update = shown.current;
|
|
215
355
|
shown.current = true;
|
|
216
|
-
|
|
356
|
+
const lost = document.activeElement === document.body && focused.current !== null && (!focused.current.isConnected || focused.current.matches(":disabled"));
|
|
357
|
+
if (update ? lost : !arrival) {
|
|
358
|
+
focused.current = null;
|
|
359
|
+
heading.current?.focus({ preventScroll: true });
|
|
360
|
+
}
|
|
217
361
|
};
|
|
218
|
-
$[
|
|
219
|
-
$[
|
|
220
|
-
} else
|
|
221
|
-
React.useLayoutEffect(
|
|
222
|
-
let
|
|
223
|
-
if ($[
|
|
224
|
-
|
|
362
|
+
$[1] = arrival;
|
|
363
|
+
$[2] = t3;
|
|
364
|
+
} else t3 = $[2];
|
|
365
|
+
React.useLayoutEffect(t3);
|
|
366
|
+
let t4;
|
|
367
|
+
if ($[3] !== title || $[4] !== titleId) {
|
|
368
|
+
t4 = /* @__PURE__ */ jsx("h1", {
|
|
225
369
|
ref: heading,
|
|
226
370
|
id: titleId,
|
|
227
371
|
tabIndex: -1,
|
|
228
372
|
children: title
|
|
229
373
|
});
|
|
230
|
-
$[
|
|
231
|
-
$[
|
|
232
|
-
$[
|
|
233
|
-
} else
|
|
234
|
-
let t4;
|
|
235
|
-
if ($[5] !== lead) {
|
|
236
|
-
t4 = lead ? /* @__PURE__ */ jsx("p", { children: lead }) : null;
|
|
237
|
-
$[5] = lead;
|
|
238
|
-
$[6] = t4;
|
|
239
|
-
} else t4 = $[6];
|
|
374
|
+
$[3] = title;
|
|
375
|
+
$[4] = titleId;
|
|
376
|
+
$[5] = t4;
|
|
377
|
+
} else t4 = $[5];
|
|
240
378
|
let t5;
|
|
241
|
-
if ($[
|
|
242
|
-
t5 = /* @__PURE__ */
|
|
379
|
+
if ($[6] !== lead) {
|
|
380
|
+
t5 = lead ? /* @__PURE__ */ jsx("p", { children: lead }) : null;
|
|
381
|
+
$[6] = lead;
|
|
382
|
+
$[7] = t5;
|
|
383
|
+
} else t5 = $[7];
|
|
384
|
+
let t6;
|
|
385
|
+
if ($[8] !== hero || $[9] !== t4 || $[10] !== t5) {
|
|
386
|
+
t6 = /* @__PURE__ */ jsxs("div", {
|
|
243
387
|
className: "first-run-intro",
|
|
244
388
|
children: [
|
|
245
389
|
hero,
|
|
246
|
-
|
|
247
|
-
|
|
390
|
+
t4,
|
|
391
|
+
t5
|
|
248
392
|
]
|
|
249
393
|
});
|
|
250
|
-
$[
|
|
251
|
-
$[8] = t3;
|
|
394
|
+
$[8] = hero;
|
|
252
395
|
$[9] = t4;
|
|
253
396
|
$[10] = t5;
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
397
|
+
$[11] = t6;
|
|
398
|
+
} else t6 = $[11];
|
|
399
|
+
let t7;
|
|
400
|
+
if ($[12] !== body || $[13] !== narrow) {
|
|
401
|
+
t7 = body ? /* @__PURE__ */ jsx("div", {
|
|
258
402
|
className: "first-run-body",
|
|
259
403
|
"data-narrow": narrow ? "" : void 0,
|
|
260
404
|
children: body
|
|
261
405
|
}) : null;
|
|
262
|
-
$[
|
|
263
|
-
$[
|
|
264
|
-
$[
|
|
265
|
-
} else
|
|
266
|
-
let
|
|
267
|
-
if ($[
|
|
268
|
-
|
|
406
|
+
$[12] = body;
|
|
407
|
+
$[13] = narrow;
|
|
408
|
+
$[14] = t7;
|
|
409
|
+
} else t7 = $[14];
|
|
410
|
+
let t8;
|
|
411
|
+
if ($[15] !== t6 || $[16] !== t7) {
|
|
412
|
+
t8 = /* @__PURE__ */ jsx(React.ViewTransition, {
|
|
269
413
|
name: "first-run-step",
|
|
270
|
-
children: /* @__PURE__ */ jsxs("div", { children: [
|
|
414
|
+
children: /* @__PURE__ */ jsxs("div", { children: [t6, t7] })
|
|
271
415
|
});
|
|
272
|
-
$[14] = t5;
|
|
273
416
|
$[15] = t6;
|
|
274
417
|
$[16] = t7;
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
418
|
+
$[17] = t8;
|
|
419
|
+
} else t8 = $[17];
|
|
420
|
+
const t9 = announce === initial ? "" : announce;
|
|
421
|
+
let t10;
|
|
422
|
+
if ($[18] !== t9) {
|
|
423
|
+
t10 = /* @__PURE__ */ jsx("p", {
|
|
280
424
|
role: "status",
|
|
281
425
|
className: "sigvelo-visually-hidden",
|
|
282
|
-
children:
|
|
426
|
+
children: t9
|
|
283
427
|
});
|
|
284
|
-
$[17] = t8;
|
|
285
428
|
$[18] = t9;
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
429
|
+
$[19] = t10;
|
|
430
|
+
} else t10 = $[19];
|
|
431
|
+
let t11;
|
|
432
|
+
if ($[20] !== layout || $[21] !== t10 || $[22] !== t8) {
|
|
433
|
+
t11 = /* @__PURE__ */ jsxs("div", {
|
|
290
434
|
className: "first-run-screen__scroll",
|
|
291
435
|
"data-recipe": "scroll-fade-y",
|
|
292
436
|
"data-layout": layout,
|
|
293
|
-
|
|
437
|
+
onFocus: track,
|
|
438
|
+
children: [t8, t10]
|
|
294
439
|
});
|
|
295
|
-
$[
|
|
296
|
-
$[
|
|
297
|
-
$[
|
|
298
|
-
$[
|
|
299
|
-
} else
|
|
300
|
-
const
|
|
301
|
-
let
|
|
302
|
-
if ($[
|
|
303
|
-
|
|
440
|
+
$[20] = layout;
|
|
441
|
+
$[21] = t10;
|
|
442
|
+
$[22] = t8;
|
|
443
|
+
$[23] = t11;
|
|
444
|
+
} else t11 = $[23];
|
|
445
|
+
const t12 = center ? "" : void 0;
|
|
446
|
+
let t13;
|
|
447
|
+
if ($[24] !== actions || $[25] !== t12) {
|
|
448
|
+
t13 = /* @__PURE__ */ jsx(React.ViewTransition, {
|
|
304
449
|
name: "first-run-actions",
|
|
305
450
|
children: /* @__PURE__ */ jsx("div", {
|
|
306
451
|
className: "first-run-actions",
|
|
307
|
-
"data-center":
|
|
452
|
+
"data-center": t12,
|
|
453
|
+
onFocus: track,
|
|
308
454
|
children: actions
|
|
309
455
|
})
|
|
310
456
|
});
|
|
311
|
-
$[
|
|
312
|
-
$[24] = t11;
|
|
457
|
+
$[24] = actions;
|
|
313
458
|
$[25] = t12;
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
$[27] =
|
|
459
|
+
$[26] = t13;
|
|
460
|
+
} else t13 = $[26];
|
|
461
|
+
let t14;
|
|
462
|
+
if ($[27] !== t11 || $[28] !== t13) {
|
|
463
|
+
t14 = /* @__PURE__ */ jsxs(Fragment, { children: [t11, t13] });
|
|
464
|
+
$[27] = t11;
|
|
320
465
|
$[28] = t13;
|
|
321
|
-
|
|
322
|
-
|
|
466
|
+
$[29] = t14;
|
|
467
|
+
} else t14 = $[29];
|
|
468
|
+
return t14;
|
|
323
469
|
}
|
|
324
470
|
/** A screen's usual actions: Back at the start, its own controls at the end. */
|
|
325
471
|
function Actions(t0) {
|
|
@@ -403,17 +549,17 @@ function Next(t0) {
|
|
|
403
549
|
}
|
|
404
550
|
function NotNow() {
|
|
405
551
|
const $ = c(2);
|
|
406
|
-
const {
|
|
552
|
+
const { skip } = useFirstRun();
|
|
407
553
|
let t0;
|
|
408
|
-
if ($[0] !==
|
|
554
|
+
if ($[0] !== skip) {
|
|
409
555
|
t0 = /* @__PURE__ */ jsx(Button, {
|
|
410
556
|
variant: "surface",
|
|
411
557
|
color: "neutral",
|
|
412
558
|
size: "md",
|
|
413
|
-
onClick:
|
|
559
|
+
onClick: skip,
|
|
414
560
|
children: "Not now"
|
|
415
561
|
});
|
|
416
|
-
$[0] =
|
|
562
|
+
$[0] = skip;
|
|
417
563
|
$[1] = t0;
|
|
418
564
|
} else t0 = $[1];
|
|
419
565
|
return t0;
|
|
@@ -556,116 +702,133 @@ function validateModelAddress(value) {
|
|
|
556
702
|
}
|
|
557
703
|
//#endregion
|
|
558
704
|
//#region src/components/extension/first-run/ModelConnectionStep.tsx
|
|
705
|
+
/** A failure that came without a sentence still names the next step. */
|
|
706
|
+
const UNREACHABLE = "Couldn’t reach this model. Check the address and try again.";
|
|
559
707
|
function ModelConnectionStep(t0) {
|
|
560
|
-
const $ = c(
|
|
708
|
+
const $ = c(2);
|
|
561
709
|
const { connection } = t0;
|
|
562
|
-
const { go } = useFirstRun();
|
|
563
|
-
const { value } = connection;
|
|
564
710
|
let t1;
|
|
565
|
-
if ($[0] !==
|
|
566
|
-
t1 =
|
|
567
|
-
|
|
711
|
+
if ($[0] !== connection) {
|
|
712
|
+
t1 = connection.kind === "managed" ? /* @__PURE__ */ jsx(Step, {
|
|
713
|
+
title: connection.model,
|
|
714
|
+
lead: "Your organization manages this model.",
|
|
715
|
+
actions: /* @__PURE__ */ jsx(Actions, { children: /* @__PURE__ */ jsx(Next, {}) })
|
|
716
|
+
}) : /* @__PURE__ */ jsx(EditableModelConnection, { connection });
|
|
717
|
+
$[0] = connection;
|
|
568
718
|
$[1] = t1;
|
|
569
719
|
} else t1 = $[1];
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
720
|
+
return t1;
|
|
721
|
+
}
|
|
722
|
+
function EditableModelConnection(t0) {
|
|
723
|
+
const $ = c(86);
|
|
724
|
+
const { connection } = t0;
|
|
725
|
+
const { go } = useFirstRun();
|
|
726
|
+
const { value } = connection;
|
|
727
|
+
let t1;
|
|
728
|
+
if ($[0] !== value.apiKey || $[1] !== value.endpoint || $[2] !== value.keySaved || $[3] !== value.kind || $[4] !== value.model) {
|
|
729
|
+
t1 = value.kind === "local" ? {
|
|
730
|
+
kind: "local",
|
|
731
|
+
endpoint: value.endpoint.trim(),
|
|
732
|
+
model: value.model.trim()
|
|
733
|
+
} : {
|
|
734
|
+
kind: "api",
|
|
735
|
+
endpoint: value.endpoint.trim(),
|
|
736
|
+
model: value.model.trim(),
|
|
737
|
+
apiKey: value.apiKey.trim(),
|
|
738
|
+
keySaved: value.keySaved
|
|
582
739
|
};
|
|
583
|
-
$[
|
|
584
|
-
$[
|
|
585
|
-
$[
|
|
586
|
-
$[
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
$[
|
|
595
|
-
$[
|
|
596
|
-
|
|
597
|
-
|
|
740
|
+
$[0] = value.apiKey;
|
|
741
|
+
$[1] = value.endpoint;
|
|
742
|
+
$[2] = value.keySaved;
|
|
743
|
+
$[3] = value.kind;
|
|
744
|
+
$[4] = value.model;
|
|
745
|
+
$[5] = t1;
|
|
746
|
+
} else t1 = $[5];
|
|
747
|
+
const settings = t1;
|
|
748
|
+
let t2;
|
|
749
|
+
if ($[6] !== connection.connected || $[7] !== value.kind || $[8] !== value.model) {
|
|
750
|
+
t2 = () => connection.connected && value.kind === "local" && value.model ? [value.model] : [];
|
|
751
|
+
$[6] = connection.connected;
|
|
752
|
+
$[7] = value.kind;
|
|
753
|
+
$[8] = value.model;
|
|
754
|
+
$[9] = t2;
|
|
755
|
+
} else t2 = $[9];
|
|
756
|
+
const [models, setModels] = React.useState(t2);
|
|
598
757
|
const [busy, setBusy] = React.useState(false);
|
|
599
758
|
const [message, setMessage] = React.useState("");
|
|
600
759
|
const [error, setError] = React.useState("");
|
|
601
760
|
const request = React.useRef(0);
|
|
602
761
|
const controller = React.useRef(null);
|
|
603
|
-
let
|
|
604
|
-
let
|
|
605
|
-
if ($[
|
|
606
|
-
|
|
762
|
+
let t3;
|
|
763
|
+
let t4;
|
|
764
|
+
if ($[10] === Symbol.for("react.memo_cache_sentinel")) {
|
|
765
|
+
t3 = () => () => {
|
|
607
766
|
request.current = request.current + 1;
|
|
608
767
|
controller.current?.abort();
|
|
609
768
|
};
|
|
610
|
-
|
|
611
|
-
$[
|
|
612
|
-
$[
|
|
769
|
+
t4 = [];
|
|
770
|
+
$[10] = t3;
|
|
771
|
+
$[11] = t4;
|
|
613
772
|
} else {
|
|
614
|
-
|
|
615
|
-
|
|
773
|
+
t3 = $[10];
|
|
774
|
+
t4 = $[11];
|
|
616
775
|
}
|
|
617
|
-
React.useEffect(
|
|
618
|
-
let
|
|
619
|
-
if ($[
|
|
620
|
-
|
|
776
|
+
React.useEffect(t3, t4);
|
|
777
|
+
let t5;
|
|
778
|
+
if ($[12] !== connection || $[13] !== value.endpoint || $[14] !== value.kind) {
|
|
779
|
+
t5 = (next) => {
|
|
621
780
|
request.current = request.current + 1;
|
|
622
781
|
controller.current?.abort();
|
|
623
782
|
setBusy(false);
|
|
624
783
|
setError("");
|
|
625
|
-
if (
|
|
784
|
+
if (next.kind !== value.kind || next.endpoint !== value.endpoint) {
|
|
626
785
|
setModels([]);
|
|
627
786
|
setMessage("");
|
|
628
787
|
}
|
|
629
|
-
connection.onChange(
|
|
630
|
-
...value,
|
|
631
|
-
...patch
|
|
632
|
-
});
|
|
788
|
+
connection.onChange(next);
|
|
633
789
|
};
|
|
634
|
-
$[
|
|
635
|
-
$[
|
|
636
|
-
$[
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
790
|
+
$[12] = connection;
|
|
791
|
+
$[13] = value.endpoint;
|
|
792
|
+
$[14] = value.kind;
|
|
793
|
+
$[15] = t5;
|
|
794
|
+
} else t5 = $[15];
|
|
795
|
+
const update = t5;
|
|
796
|
+
let t6;
|
|
797
|
+
if ($[16] !== update || $[17] !== value.endpoint || $[18] !== value.kind) {
|
|
798
|
+
t6 = (kind) => {
|
|
642
799
|
if (kind === value.kind) return;
|
|
643
800
|
const local = localModelAddress(value.endpoint);
|
|
644
|
-
update({
|
|
801
|
+
update(kind === "local" ? {
|
|
645
802
|
kind,
|
|
646
|
-
endpoint:
|
|
803
|
+
endpoint: local ? value.endpoint : "http://localhost:11434/v1",
|
|
647
804
|
model: ""
|
|
805
|
+
} : {
|
|
806
|
+
kind,
|
|
807
|
+
endpoint: local ? "" : value.endpoint,
|
|
808
|
+
model: "",
|
|
809
|
+
apiKey: "",
|
|
810
|
+
keySaved: false
|
|
648
811
|
});
|
|
649
812
|
};
|
|
650
|
-
$[
|
|
651
|
-
$[
|
|
652
|
-
$[
|
|
653
|
-
$[
|
|
654
|
-
} else
|
|
655
|
-
const chooseKind =
|
|
656
|
-
let
|
|
657
|
-
if ($[
|
|
658
|
-
|
|
813
|
+
$[16] = update;
|
|
814
|
+
$[17] = value.endpoint;
|
|
815
|
+
$[18] = value.kind;
|
|
816
|
+
$[19] = t6;
|
|
817
|
+
} else t6 = $[19];
|
|
818
|
+
const chooseKind = t6;
|
|
819
|
+
let t7;
|
|
820
|
+
if ($[20] === Symbol.for("react.memo_cache_sentinel")) {
|
|
821
|
+
t7 = (failure) => {
|
|
659
822
|
setBusy(false);
|
|
660
823
|
setError(failure);
|
|
661
824
|
setMessage("");
|
|
662
825
|
};
|
|
663
|
-
$[
|
|
664
|
-
} else
|
|
665
|
-
const fail =
|
|
666
|
-
let
|
|
667
|
-
if ($[
|
|
668
|
-
|
|
826
|
+
$[20] = t7;
|
|
827
|
+
} else t7 = $[20];
|
|
828
|
+
const fail = t7;
|
|
829
|
+
let t8;
|
|
830
|
+
if ($[21] !== connection || $[22] !== settings || $[23] !== update || $[24] !== value) {
|
|
831
|
+
t8 = async () => {
|
|
669
832
|
const id = request.current = request.current + 1;
|
|
670
833
|
controller.current?.abort();
|
|
671
834
|
const pending = controller.current = new AbortController();
|
|
@@ -681,11 +844,11 @@ function ModelConnectionStep(t0) {
|
|
|
681
844
|
let found;
|
|
682
845
|
try {
|
|
683
846
|
found = await connection.onFindModels(settings, pending.signal);
|
|
684
|
-
} catch (
|
|
685
|
-
const failure_0 =
|
|
847
|
+
} catch (t9) {
|
|
848
|
+
const failure_0 = t9;
|
|
686
849
|
if (id === request.current) {
|
|
687
850
|
setModels([]);
|
|
688
|
-
fail(formatErrorMessage(failure_0));
|
|
851
|
+
fail(formatErrorMessage(failure_0) || UNREACHABLE);
|
|
689
852
|
}
|
|
690
853
|
return;
|
|
691
854
|
}
|
|
@@ -697,18 +860,22 @@ function ModelConnectionStep(t0) {
|
|
|
697
860
|
return;
|
|
698
861
|
}
|
|
699
862
|
setModels(localModels);
|
|
700
|
-
update({
|
|
863
|
+
update({
|
|
864
|
+
...value,
|
|
865
|
+
model: localModels.includes(settings.model) ? settings.model : localModels[0]
|
|
866
|
+
});
|
|
701
867
|
setMessage("Choose a model, then connect it.");
|
|
702
868
|
};
|
|
703
|
-
$[
|
|
704
|
-
$[
|
|
705
|
-
$[
|
|
706
|
-
$[
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
869
|
+
$[21] = connection;
|
|
870
|
+
$[22] = settings;
|
|
871
|
+
$[23] = update;
|
|
872
|
+
$[24] = value;
|
|
873
|
+
$[25] = t8;
|
|
874
|
+
} else t8 = $[25];
|
|
875
|
+
const findModels = t8;
|
|
876
|
+
let t9;
|
|
710
877
|
if ($[26] !== connection || $[27] !== go || $[28] !== settings) {
|
|
711
|
-
|
|
878
|
+
t9 = async () => {
|
|
712
879
|
const id_0 = request.current = request.current + 1;
|
|
713
880
|
controller.current?.abort();
|
|
714
881
|
const pending_0 = controller.current = new AbortController();
|
|
@@ -722,9 +889,9 @@ function ModelConnectionStep(t0) {
|
|
|
722
889
|
setMessage("Testing a short answer from this model…");
|
|
723
890
|
try {
|
|
724
891
|
await connection.onConnect(settings, pending_0.signal);
|
|
725
|
-
} catch (
|
|
726
|
-
const failure_1 =
|
|
727
|
-
if (id_0 === request.current) fail(formatErrorMessage(failure_1));
|
|
892
|
+
} catch (t10) {
|
|
893
|
+
const failure_1 = t10;
|
|
894
|
+
if (id_0 === request.current) fail(formatErrorMessage(failure_1) || UNREACHABLE);
|
|
728
895
|
return;
|
|
729
896
|
}
|
|
730
897
|
if (id_0 !== request.current) return;
|
|
@@ -734,51 +901,51 @@ function ModelConnectionStep(t0) {
|
|
|
734
901
|
$[26] = connection;
|
|
735
902
|
$[27] = go;
|
|
736
903
|
$[28] = settings;
|
|
737
|
-
$[29] =
|
|
738
|
-
} else
|
|
739
|
-
const connect =
|
|
740
|
-
let
|
|
904
|
+
$[29] = t9;
|
|
905
|
+
} else t9 = $[29];
|
|
906
|
+
const connect = t9;
|
|
907
|
+
let t10;
|
|
741
908
|
if ($[30] === Symbol.for("react.memo_cache_sentinel")) {
|
|
742
|
-
|
|
743
|
-
$[30] =
|
|
744
|
-
} else
|
|
745
|
-
let
|
|
909
|
+
t10 = /* @__PURE__ */ jsx("legend", { children: "AI source" });
|
|
910
|
+
$[30] = t10;
|
|
911
|
+
} else t10 = $[30];
|
|
912
|
+
let t11;
|
|
746
913
|
if ($[31] === Symbol.for("react.memo_cache_sentinel")) {
|
|
747
|
-
|
|
914
|
+
t11 = /* @__PURE__ */ jsxs("label", { children: [/* @__PURE__ */ jsx(Radio.Root, {
|
|
748
915
|
value: "local",
|
|
749
916
|
children: /* @__PURE__ */ jsx(Radio.Indicator, {})
|
|
750
917
|
}), "Local AI"] });
|
|
751
|
-
$[31] =
|
|
752
|
-
} else
|
|
753
|
-
let
|
|
918
|
+
$[31] = t11;
|
|
919
|
+
} else t11 = $[31];
|
|
920
|
+
let t12;
|
|
754
921
|
if ($[32] === Symbol.for("react.memo_cache_sentinel")) {
|
|
755
|
-
|
|
922
|
+
t12 = /* @__PURE__ */ jsxs("label", { children: [/* @__PURE__ */ jsx(Radio.Root, {
|
|
756
923
|
value: "api",
|
|
757
924
|
children: /* @__PURE__ */ jsx(Radio.Indicator, {})
|
|
758
925
|
}), "Another provider"] });
|
|
759
|
-
$[32] =
|
|
760
|
-
} else
|
|
761
|
-
let
|
|
926
|
+
$[32] = t12;
|
|
927
|
+
} else t12 = $[32];
|
|
928
|
+
let t13;
|
|
762
929
|
if ($[33] !== chooseKind || $[34] !== value.kind) {
|
|
763
|
-
|
|
930
|
+
t13 = /* @__PURE__ */ jsxs("fieldset", {
|
|
764
931
|
className: "first-run-model-source",
|
|
765
|
-
children: [
|
|
932
|
+
children: [t10, /* @__PURE__ */ jsxs(RadioGroup.Root, {
|
|
766
933
|
className: "first-run-model-source__options",
|
|
767
934
|
"aria-label": "AI source",
|
|
768
935
|
name: "providerKind",
|
|
769
936
|
orientation: "horizontal",
|
|
770
937
|
value: value.kind,
|
|
771
938
|
onValueChange: chooseKind,
|
|
772
|
-
children: [
|
|
939
|
+
children: [t11, t12]
|
|
773
940
|
})]
|
|
774
941
|
});
|
|
775
942
|
$[33] = chooseKind;
|
|
776
943
|
$[34] = value.kind;
|
|
777
|
-
$[35] =
|
|
778
|
-
} else
|
|
779
|
-
let
|
|
944
|
+
$[35] = t13;
|
|
945
|
+
} else t13 = $[35];
|
|
946
|
+
let t14;
|
|
780
947
|
if ($[36] !== value.kind) {
|
|
781
|
-
|
|
948
|
+
t14 = value.kind === "local" ? /* @__PURE__ */ jsxs("p", { children: [
|
|
782
949
|
"New to local AI?",
|
|
783
950
|
" ",
|
|
784
951
|
/* @__PURE__ */ jsx("a", {
|
|
@@ -790,51 +957,56 @@ function ModelConnectionStep(t0) {
|
|
|
790
957
|
", then find your models below."
|
|
791
958
|
] }) : null;
|
|
792
959
|
$[36] = value.kind;
|
|
793
|
-
$[37] =
|
|
794
|
-
} else
|
|
795
|
-
let
|
|
960
|
+
$[37] = t14;
|
|
961
|
+
} else t14 = $[37];
|
|
962
|
+
let t15;
|
|
796
963
|
if ($[38] !== value.kind) {
|
|
797
|
-
|
|
964
|
+
t15 = value.kind === "api" ? /* @__PURE__ */ jsx("p", { children: "Enter your provider’s OpenAI-compatible service address, API key and model name." }) : null;
|
|
798
965
|
$[38] = value.kind;
|
|
799
|
-
$[39] =
|
|
800
|
-
} else
|
|
801
|
-
let
|
|
966
|
+
$[39] = t15;
|
|
967
|
+
} else t15 = $[39];
|
|
968
|
+
let t16;
|
|
802
969
|
if ($[40] === Symbol.for("react.memo_cache_sentinel")) {
|
|
803
|
-
|
|
804
|
-
$[40] =
|
|
805
|
-
} else
|
|
806
|
-
const
|
|
807
|
-
let
|
|
808
|
-
if ($[41] !== update) {
|
|
809
|
-
|
|
970
|
+
t16 = /* @__PURE__ */ jsx("span", { children: "Service address" });
|
|
971
|
+
$[40] = t16;
|
|
972
|
+
} else t16 = $[40];
|
|
973
|
+
const t17 = value.kind === "local" ? "http://localhost:11434/v1" : "https://your-provider.example/v1";
|
|
974
|
+
let t18;
|
|
975
|
+
if ($[41] !== update || $[42] !== value) {
|
|
976
|
+
t18 = (event) => update({
|
|
977
|
+
...value,
|
|
978
|
+
endpoint: event.currentTarget.value
|
|
979
|
+
});
|
|
810
980
|
$[41] = update;
|
|
811
|
-
$[42] =
|
|
812
|
-
|
|
813
|
-
|
|
814
|
-
|
|
815
|
-
|
|
981
|
+
$[42] = value;
|
|
982
|
+
$[43] = t18;
|
|
983
|
+
} else t18 = $[43];
|
|
984
|
+
let t19;
|
|
985
|
+
if ($[44] !== busy || $[45] !== t17 || $[46] !== t18 || $[47] !== value.endpoint) {
|
|
986
|
+
t19 = /* @__PURE__ */ jsxs("label", {
|
|
816
987
|
className: "first-run-field",
|
|
817
|
-
children: [
|
|
988
|
+
children: [t16, /* @__PURE__ */ jsx(Input, {
|
|
818
989
|
name: "endpoint",
|
|
819
990
|
value: value.endpoint,
|
|
820
991
|
disabled: busy,
|
|
821
|
-
placeholder:
|
|
822
|
-
onChange:
|
|
992
|
+
placeholder: t17,
|
|
993
|
+
onChange: t18
|
|
823
994
|
})]
|
|
824
995
|
});
|
|
825
|
-
$[
|
|
826
|
-
$[
|
|
827
|
-
$[
|
|
828
|
-
$[
|
|
829
|
-
$[
|
|
830
|
-
} else
|
|
831
|
-
let
|
|
832
|
-
if ($[
|
|
833
|
-
|
|
996
|
+
$[44] = busy;
|
|
997
|
+
$[45] = t17;
|
|
998
|
+
$[46] = t18;
|
|
999
|
+
$[47] = value.endpoint;
|
|
1000
|
+
$[48] = t19;
|
|
1001
|
+
} else t19 = $[48];
|
|
1002
|
+
let t20;
|
|
1003
|
+
if ($[49] !== busy || $[50] !== findModels || $[51] !== models || $[52] !== update || $[53] !== value) {
|
|
1004
|
+
t20 = value.kind === "local" ? /* @__PURE__ */ jsxs("div", { children: [/* @__PURE__ */ jsx(Button, {
|
|
834
1005
|
variant: "surface",
|
|
835
1006
|
color: "neutral",
|
|
836
1007
|
size: "sm",
|
|
837
1008
|
disabled: busy,
|
|
1009
|
+
focusableWhenDisabled: busy,
|
|
838
1010
|
onClick: () => void findModels(),
|
|
839
1011
|
children: "Find models"
|
|
840
1012
|
}), /* @__PURE__ */ jsx("div", {
|
|
@@ -845,7 +1017,10 @@ function ModelConnectionStep(t0) {
|
|
|
845
1017
|
value: models.length ? value.model : null,
|
|
846
1018
|
disabled: busy || !models.length,
|
|
847
1019
|
onValueChange: (model_2) => {
|
|
848
|
-
if (model_2) update({
|
|
1020
|
+
if (model_2) update({
|
|
1021
|
+
...value,
|
|
1022
|
+
model: model_2
|
|
1023
|
+
});
|
|
849
1024
|
},
|
|
850
1025
|
children: [
|
|
851
1026
|
/* @__PURE__ */ jsx(Select.Label, { children: "Model" }),
|
|
@@ -856,11 +1031,27 @@ function ModelConnectionStep(t0) {
|
|
|
856
1031
|
/* @__PURE__ */ jsx(Select.Portal, { children: /* @__PURE__ */ jsx(Select.Positioner, {
|
|
857
1032
|
sideOffset: 4,
|
|
858
1033
|
alignItemWithTrigger: false,
|
|
1034
|
+
align: "start",
|
|
859
1035
|
children: /* @__PURE__ */ jsx(Select.Popup, { children: /* @__PURE__ */ jsx(Select.List, { children: models.map(_temp4$2) }) })
|
|
860
1036
|
}) })
|
|
861
1037
|
]
|
|
862
1038
|
})
|
|
863
|
-
})] }) : /* @__PURE__ */ jsxs("label", {
|
|
1039
|
+
})] }) : /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsxs("label", {
|
|
1040
|
+
className: "first-run-field",
|
|
1041
|
+
children: [/* @__PURE__ */ jsx("span", { children: "API key" }), /* @__PURE__ */ jsx(Input, {
|
|
1042
|
+
name: "apiKey",
|
|
1043
|
+
type: "password",
|
|
1044
|
+
autoComplete: "off",
|
|
1045
|
+
spellCheck: false,
|
|
1046
|
+
value: value.apiKey,
|
|
1047
|
+
disabled: busy,
|
|
1048
|
+
placeholder: value.keySaved ? "A key is saved. Enter a new one to replace it." : "Leave empty if your provider doesn’t use one",
|
|
1049
|
+
onChange: (event_0) => update({
|
|
1050
|
+
...value,
|
|
1051
|
+
apiKey: event_0.currentTarget.value
|
|
1052
|
+
})
|
|
1053
|
+
})]
|
|
1054
|
+
}), /* @__PURE__ */ jsxs("label", {
|
|
864
1055
|
className: "first-run-field",
|
|
865
1056
|
children: [/* @__PURE__ */ jsx("span", { children: "Model name" }), /* @__PURE__ */ jsx(Input, {
|
|
866
1057
|
name: "model",
|
|
@@ -868,97 +1059,111 @@ function ModelConnectionStep(t0) {
|
|
|
868
1059
|
disabled: busy,
|
|
869
1060
|
required: true,
|
|
870
1061
|
placeholder: "Model ID from your provider",
|
|
871
|
-
onChange: (
|
|
1062
|
+
onChange: (event_1) => update({
|
|
1063
|
+
...value,
|
|
1064
|
+
model: event_1.currentTarget.value
|
|
1065
|
+
})
|
|
872
1066
|
})]
|
|
873
|
-
});
|
|
874
|
-
$[
|
|
875
|
-
$[
|
|
876
|
-
$[
|
|
877
|
-
$[
|
|
878
|
-
$[
|
|
879
|
-
$[
|
|
880
|
-
|
|
881
|
-
|
|
882
|
-
let t23;
|
|
1067
|
+
})] });
|
|
1068
|
+
$[49] = busy;
|
|
1069
|
+
$[50] = findModels;
|
|
1070
|
+
$[51] = models;
|
|
1071
|
+
$[52] = update;
|
|
1072
|
+
$[53] = value;
|
|
1073
|
+
$[54] = t20;
|
|
1074
|
+
} else t20 = $[54];
|
|
1075
|
+
let t21;
|
|
883
1076
|
if ($[55] !== message) {
|
|
884
|
-
|
|
1077
|
+
t21 = message ? /* @__PURE__ */ jsx("p", {
|
|
885
1078
|
className: "first-run-provider-status",
|
|
886
1079
|
role: "status",
|
|
887
1080
|
children: message
|
|
888
1081
|
}) : null;
|
|
889
1082
|
$[55] = message;
|
|
890
|
-
$[56] =
|
|
891
|
-
} else
|
|
892
|
-
let
|
|
1083
|
+
$[56] = t21;
|
|
1084
|
+
} else t21 = $[56];
|
|
1085
|
+
let t22;
|
|
893
1086
|
if ($[57] !== error) {
|
|
894
|
-
|
|
1087
|
+
t22 = error ? /* @__PURE__ */ jsx("p", {
|
|
895
1088
|
className: "first-run-connection-error",
|
|
896
1089
|
role: "alert",
|
|
897
1090
|
children: error
|
|
898
1091
|
}) : null;
|
|
899
1092
|
$[57] = error;
|
|
900
|
-
$[58] =
|
|
901
|
-
} else
|
|
902
|
-
let
|
|
903
|
-
if ($[59] !==
|
|
904
|
-
|
|
1093
|
+
$[58] = t22;
|
|
1094
|
+
} else t22 = $[58];
|
|
1095
|
+
let t23;
|
|
1096
|
+
if ($[59] !== t13 || $[60] !== t14 || $[61] !== t15 || $[62] !== t19 || $[63] !== t20 || $[64] !== t21 || $[65] !== t22) {
|
|
1097
|
+
t23 = /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
1098
|
+
t13,
|
|
1099
|
+
t14,
|
|
905
1100
|
t15,
|
|
906
|
-
|
|
907
|
-
|
|
1101
|
+
t19,
|
|
1102
|
+
t20,
|
|
908
1103
|
t21,
|
|
909
|
-
t22
|
|
910
|
-
t23,
|
|
911
|
-
t24
|
|
1104
|
+
t22
|
|
912
1105
|
] });
|
|
913
|
-
$[59] =
|
|
914
|
-
$[60] =
|
|
915
|
-
$[61] =
|
|
916
|
-
$[62] =
|
|
917
|
-
$[63] =
|
|
918
|
-
$[64] =
|
|
919
|
-
$[65] =
|
|
920
|
-
$[66] =
|
|
921
|
-
} else
|
|
922
|
-
|
|
1106
|
+
$[59] = t13;
|
|
1107
|
+
$[60] = t14;
|
|
1108
|
+
$[61] = t15;
|
|
1109
|
+
$[62] = t19;
|
|
1110
|
+
$[63] = t20;
|
|
1111
|
+
$[64] = t21;
|
|
1112
|
+
$[65] = t22;
|
|
1113
|
+
$[66] = t23;
|
|
1114
|
+
} else t23 = $[66];
|
|
1115
|
+
let t24;
|
|
1116
|
+
if ($[67] !== busy || $[68] !== models || $[69] !== value.endpoint || $[70] !== value.kind || $[71] !== value.model) {
|
|
1117
|
+
t24 = busy || !value.endpoint.trim() || !value.model.trim() || value.kind === "local" && !models.length;
|
|
1118
|
+
$[67] = busy;
|
|
1119
|
+
$[68] = models;
|
|
1120
|
+
$[69] = value.endpoint;
|
|
1121
|
+
$[70] = value.kind;
|
|
1122
|
+
$[71] = value.model;
|
|
1123
|
+
$[72] = t24;
|
|
1124
|
+
} else t24 = $[72];
|
|
1125
|
+
let t25;
|
|
1126
|
+
if ($[73] !== connect) {
|
|
1127
|
+
t25 = () => void connect();
|
|
1128
|
+
$[73] = connect;
|
|
1129
|
+
$[74] = t25;
|
|
1130
|
+
} else t25 = $[74];
|
|
1131
|
+
const t26 = busy ? "Checking…" : "Connect model";
|
|
923
1132
|
let t27;
|
|
924
|
-
if ($[
|
|
925
|
-
t27 =
|
|
926
|
-
$[
|
|
927
|
-
$[
|
|
928
|
-
} else t27 = $[
|
|
929
|
-
|
|
930
|
-
|
|
931
|
-
|
|
932
|
-
|
|
933
|
-
|
|
934
|
-
|
|
935
|
-
|
|
936
|
-
|
|
937
|
-
if ($[71] !== t26 || $[72] !== t27 || $[73] !== t28 || $[74] !== t29) {
|
|
938
|
-
t30 = /* @__PURE__ */ jsx(Actions, { children: /* @__PURE__ */ jsxs(Button, {
|
|
939
|
-
disabled: t26,
|
|
940
|
-
onClick: t27,
|
|
941
|
-
children: [t28, t29]
|
|
1133
|
+
if ($[75] !== busy) {
|
|
1134
|
+
t27 = busy ? null : /* @__PURE__ */ jsx(ArrowRightIcon, {});
|
|
1135
|
+
$[75] = busy;
|
|
1136
|
+
$[76] = t27;
|
|
1137
|
+
} else t27 = $[76];
|
|
1138
|
+
let t28;
|
|
1139
|
+
if ($[77] !== busy || $[78] !== t24 || $[79] !== t25 || $[80] !== t26 || $[81] !== t27) {
|
|
1140
|
+
t28 = /* @__PURE__ */ jsx(Actions, { children: /* @__PURE__ */ jsxs(Button, {
|
|
1141
|
+
size: "md",
|
|
1142
|
+
disabled: t24,
|
|
1143
|
+
focusableWhenDisabled: busy,
|
|
1144
|
+
onClick: t25,
|
|
1145
|
+
children: [t26, t27]
|
|
942
1146
|
}) });
|
|
943
|
-
$[
|
|
944
|
-
$[
|
|
945
|
-
$[
|
|
946
|
-
$[
|
|
947
|
-
$[
|
|
948
|
-
|
|
949
|
-
|
|
950
|
-
|
|
951
|
-
|
|
1147
|
+
$[77] = busy;
|
|
1148
|
+
$[78] = t24;
|
|
1149
|
+
$[79] = t25;
|
|
1150
|
+
$[80] = t26;
|
|
1151
|
+
$[81] = t27;
|
|
1152
|
+
$[82] = t28;
|
|
1153
|
+
} else t28 = $[82];
|
|
1154
|
+
let t29;
|
|
1155
|
+
if ($[83] !== t23 || $[84] !== t28) {
|
|
1156
|
+
t29 = /* @__PURE__ */ jsx(Step, {
|
|
952
1157
|
title: "Connect a model",
|
|
953
1158
|
lead: "Use another AI provider or a model running on this computer.",
|
|
954
|
-
body:
|
|
955
|
-
actions:
|
|
1159
|
+
body: t23,
|
|
1160
|
+
actions: t28
|
|
956
1161
|
});
|
|
957
|
-
$[
|
|
958
|
-
$[
|
|
959
|
-
$[
|
|
960
|
-
} else
|
|
961
|
-
return
|
|
1162
|
+
$[83] = t23;
|
|
1163
|
+
$[84] = t28;
|
|
1164
|
+
$[85] = t29;
|
|
1165
|
+
} else t29 = $[85];
|
|
1166
|
+
return t29;
|
|
962
1167
|
}
|
|
963
1168
|
function _temp4$2(model_3) {
|
|
964
1169
|
return /* @__PURE__ */ jsxs(Select.Item, {
|
|
@@ -996,7 +1201,7 @@ const ORB_PARTICLES = Array.from({ length: 80 }, (_, id) => {
|
|
|
996
1201
|
});
|
|
997
1202
|
/** Parallel preparation shares one tabbed page; writing, approvals, and a trial are separate. */
|
|
998
1203
|
function WorkPreparation(t0) {
|
|
999
|
-
const $ = c(
|
|
1204
|
+
const $ = c(77);
|
|
1000
1205
|
const { tab, onTabChange, preparation, projects, people, automations, skills, writing } = t0;
|
|
1001
1206
|
const { brandName } = useFirstRun();
|
|
1002
1207
|
const groupId = React.useId();
|
|
@@ -1021,6 +1226,7 @@ function WorkPreparation(t0) {
|
|
|
1021
1226
|
let completed;
|
|
1022
1227
|
let stages;
|
|
1023
1228
|
let t10;
|
|
1229
|
+
let t11;
|
|
1024
1230
|
let t3;
|
|
1025
1231
|
let t4;
|
|
1026
1232
|
let t5;
|
|
@@ -1028,27 +1234,27 @@ function WorkPreparation(t0) {
|
|
|
1028
1234
|
let t7;
|
|
1029
1235
|
let t8;
|
|
1030
1236
|
let t9;
|
|
1031
|
-
if ($[2] !== automationEntries || $[3] !== automations || $[4] !== brandName || $[5] !== groupId || $[6] !== onTabChange || $[7] !== people || $[8] !== personEntries || $[9] !== personRow || $[10] !== preparation || $[11] !== projectEntries || $[12] !== projects || $[13] !== skills || $[14] !== t2 || $[15] !== tab || $[16] !== writing
|
|
1032
|
-
let
|
|
1033
|
-
if ($[
|
|
1034
|
-
|
|
1237
|
+
if ($[2] !== automationEntries || $[3] !== automations || $[4] !== brandName || $[5] !== groupId || $[6] !== onTabChange || $[7] !== people || $[8] !== personEntries || $[9] !== personRow || $[10] !== preparation || $[11] !== projectEntries || $[12] !== projects || $[13] !== skills || $[14] !== t2 || $[15] !== tab || $[16] !== writing) {
|
|
1238
|
+
let t12;
|
|
1239
|
+
if ($[31] !== projects.source.queryOptions) {
|
|
1240
|
+
t12 = (project) => /* @__PURE__ */ jsx("li", { children: /* @__PURE__ */ jsx(WorkspaceProjectFile, {
|
|
1035
1241
|
flat: true,
|
|
1036
1242
|
path: project.path,
|
|
1037
1243
|
source: { queryOptions: projects.source.queryOptions }
|
|
1038
1244
|
}) }, project.path);
|
|
1039
|
-
$[
|
|
1040
|
-
$[
|
|
1041
|
-
} else
|
|
1042
|
-
let
|
|
1043
|
-
if ($[
|
|
1044
|
-
|
|
1245
|
+
$[31] = projects.source.queryOptions;
|
|
1246
|
+
$[32] = t12;
|
|
1247
|
+
} else t12 = $[32];
|
|
1248
|
+
let t13;
|
|
1249
|
+
if ($[33] !== automations.source.queryOptions) {
|
|
1250
|
+
t13 = (automation) => /* @__PURE__ */ jsx("li", { children: /* @__PURE__ */ jsx(WorkspaceAutomationFile, {
|
|
1045
1251
|
flat: true,
|
|
1046
1252
|
path: automation.path,
|
|
1047
1253
|
source: { queryOptions: automations.source.queryOptions }
|
|
1048
1254
|
}) }, automation.path);
|
|
1049
|
-
$[
|
|
1050
|
-
$[
|
|
1051
|
-
} else
|
|
1255
|
+
$[33] = automations.source.queryOptions;
|
|
1256
|
+
$[34] = t13;
|
|
1257
|
+
} else t13 = $[34];
|
|
1052
1258
|
stages = [
|
|
1053
1259
|
{
|
|
1054
1260
|
id: "projects",
|
|
@@ -1056,7 +1262,7 @@ function WorkPreparation(t0) {
|
|
|
1056
1262
|
work: projects,
|
|
1057
1263
|
count: projectEntries.length,
|
|
1058
1264
|
description: t2,
|
|
1059
|
-
rows: projectEntries.map(
|
|
1265
|
+
rows: projectEntries.map(t12)
|
|
1060
1266
|
},
|
|
1061
1267
|
{
|
|
1062
1268
|
id: "people",
|
|
@@ -1072,7 +1278,7 @@ function WorkPreparation(t0) {
|
|
|
1072
1278
|
work: automations,
|
|
1073
1279
|
count: automationEntries.length,
|
|
1074
1280
|
description: "Each takes over work you do by hand. None runs until you say so.",
|
|
1075
|
-
rows: automationEntries.map(
|
|
1281
|
+
rows: automationEntries.map(t13)
|
|
1076
1282
|
},
|
|
1077
1283
|
{
|
|
1078
1284
|
id: "skills",
|
|
@@ -1083,15 +1289,20 @@ function WorkPreparation(t0) {
|
|
|
1083
1289
|
rows: skills.source.list.map(_temp$4)
|
|
1084
1290
|
}
|
|
1085
1291
|
];
|
|
1086
|
-
const categories =
|
|
1292
|
+
const categories = combineFirstRunWorkStatus(stages.map(_temp2$3));
|
|
1087
1293
|
const working = preparation === "working";
|
|
1088
1294
|
completed = preparation === "done";
|
|
1295
|
+
const unfinished = [...stages.map(_temp3$2), {
|
|
1296
|
+
label: "Writing style",
|
|
1297
|
+
work: writing
|
|
1298
|
+
}].filter(_temp4$1);
|
|
1299
|
+
const [only] = unfinished;
|
|
1300
|
+
const title = completed ? "Your work is ready" : working ? categories === "done" ? `${brandName} is preparing your writing style` : `${brandName} is preparing your work` : preparation === "idle" || !only ? `${brandName} hasn’t started preparing your work` : unfinished.length > 1 ? unfinished.some(_temp5$1) ? "Some of your work didn’t finish" : "Some of your work hasn’t started" : only.work === writing ? only.work.status === "failed" ? `${brandName} couldn’t analyze your writing style` : `${brandName} hasn’t started on your writing style` : only.work.status === "failed" ? `${brandName} couldn’t find your ${only.label.toLowerCase()}` : `${brandName} hasn’t started finding your ${only.label.toLowerCase()}`;
|
|
1089
1301
|
T2 = Step;
|
|
1090
|
-
|
|
1091
|
-
|
|
1092
|
-
|
|
1093
|
-
|
|
1094
|
-
children: [working ? /* @__PURE__ */ jsx("span", {
|
|
1302
|
+
t10 = "work";
|
|
1303
|
+
let t14;
|
|
1304
|
+
if ($[35] !== working) {
|
|
1305
|
+
t14 = working ? /* @__PURE__ */ jsx("span", {
|
|
1095
1306
|
className: "first-run-orb",
|
|
1096
1307
|
"aria-hidden": "true",
|
|
1097
1308
|
children: /* @__PURE__ */ jsx("svg", {
|
|
@@ -1100,38 +1311,55 @@ function WorkPreparation(t0) {
|
|
|
1100
1311
|
width: "40",
|
|
1101
1312
|
height: "40",
|
|
1102
1313
|
focusable: "false",
|
|
1103
|
-
children: ORB_PARTICLES.map(
|
|
1314
|
+
children: ORB_PARTICLES.map(_temp6$1)
|
|
1104
1315
|
})
|
|
1105
|
-
}) : null
|
|
1106
|
-
|
|
1316
|
+
}) : null;
|
|
1317
|
+
$[35] = working;
|
|
1318
|
+
$[36] = t14;
|
|
1319
|
+
} else t14 = $[36];
|
|
1320
|
+
let t15;
|
|
1321
|
+
if ($[37] !== title) {
|
|
1322
|
+
t15 = /* @__PURE__ */ jsx("span", { children: title });
|
|
1323
|
+
$[37] = title;
|
|
1324
|
+
$[38] = t15;
|
|
1325
|
+
} else t15 = $[38];
|
|
1326
|
+
if ($[39] !== t14 || $[40] !== t15) {
|
|
1327
|
+
t11 = /* @__PURE__ */ jsxs("span", {
|
|
1328
|
+
className: "first-run-work__heading",
|
|
1329
|
+
children: [t14, t15]
|
|
1330
|
+
});
|
|
1331
|
+
$[39] = t14;
|
|
1332
|
+
$[40] = t15;
|
|
1333
|
+
$[41] = t11;
|
|
1334
|
+
} else t11 = $[41];
|
|
1107
1335
|
T1 = Tabs.Root;
|
|
1108
1336
|
t5 = tab;
|
|
1109
|
-
if ($[
|
|
1337
|
+
if ($[42] !== onTabChange) {
|
|
1110
1338
|
t6 = (value) => onTabChange(String(value));
|
|
1111
|
-
$[
|
|
1112
|
-
$[
|
|
1113
|
-
} else t6 = $[
|
|
1339
|
+
$[42] = onTabChange;
|
|
1340
|
+
$[43] = t6;
|
|
1341
|
+
} else t6 = $[43];
|
|
1114
1342
|
t7 = "first-run-work";
|
|
1115
|
-
let
|
|
1116
|
-
if ($[
|
|
1117
|
-
|
|
1118
|
-
$[
|
|
1119
|
-
} else
|
|
1343
|
+
let t17;
|
|
1344
|
+
if ($[44] === Symbol.for("react.memo_cache_sentinel")) {
|
|
1345
|
+
t17 = /* @__PURE__ */ jsx(Tabs.Indicator, {});
|
|
1346
|
+
$[44] = t17;
|
|
1347
|
+
} else t17 = $[44];
|
|
1120
1348
|
t8 = /* @__PURE__ */ jsxs(Tabs.List, {
|
|
1121
1349
|
variant: "line",
|
|
1122
1350
|
className: "first-run-work__tabs",
|
|
1123
1351
|
"aria-label": "Work preparation",
|
|
1124
|
-
children: [stages.map((
|
|
1125
|
-
const { id: id_0, label, work:
|
|
1352
|
+
children: [stages.map((t16) => {
|
|
1353
|
+
const { id: id_0, label: label_0, work: work_3, count } = t16;
|
|
1126
1354
|
return /* @__PURE__ */ jsxs(Tabs.Tab, {
|
|
1127
1355
|
value: id_0,
|
|
1128
1356
|
className: "first-run-work__tab",
|
|
1129
|
-
"aria-label":
|
|
1357
|
+
"aria-label": label_0,
|
|
1130
1358
|
"aria-describedby": `${groupId}-${id_0}-status`,
|
|
1131
1359
|
children: [
|
|
1132
1360
|
/* @__PURE__ */ jsxs("span", {
|
|
1133
1361
|
className: "first-run-work__tab-label",
|
|
1134
|
-
children: [
|
|
1362
|
+
children: [label_0, /* @__PURE__ */ jsx("span", {
|
|
1135
1363
|
className: "first-run-work__tab-count",
|
|
1136
1364
|
children: count
|
|
1137
1365
|
})]
|
|
@@ -1140,30 +1368,54 @@ function WorkPreparation(t0) {
|
|
|
1140
1368
|
className: "first-run-work__tab-state",
|
|
1141
1369
|
"aria-hidden": "true",
|
|
1142
1370
|
children: /* @__PURE__ */ jsx(WorkStatusMark, {
|
|
1143
|
-
status:
|
|
1371
|
+
status: work_3.status,
|
|
1144
1372
|
idle: "—"
|
|
1145
1373
|
})
|
|
1146
1374
|
}),
|
|
1147
1375
|
/* @__PURE__ */ jsx("span", {
|
|
1148
1376
|
id: `${groupId}-${id_0}-status`,
|
|
1149
1377
|
className: "sigvelo-visually-hidden",
|
|
1150
|
-
children: WORK_STATUS_TEXT[
|
|
1378
|
+
children: WORK_STATUS_TEXT[work_3.status]
|
|
1151
1379
|
})
|
|
1152
1380
|
]
|
|
1153
1381
|
}, id_0);
|
|
1154
|
-
}),
|
|
1382
|
+
}), t17]
|
|
1155
1383
|
});
|
|
1384
|
+
if ($[45] !== brandName || $[46] !== groupId || $[47] !== writing.failure || $[48] !== writing.onRetry || $[49] !== writing.status) {
|
|
1385
|
+
t9 = writing.status === "failed" ? /* @__PURE__ */ jsxs("div", {
|
|
1386
|
+
className: "first-run-work__unfinished",
|
|
1387
|
+
children: [/* @__PURE__ */ jsx("p", {
|
|
1388
|
+
id: `${groupId}-writing-failure`,
|
|
1389
|
+
role: "alert",
|
|
1390
|
+
children: writing.failure ?? `${brandName} couldn’t analyze your writing style.`
|
|
1391
|
+
}), /* @__PURE__ */ jsx(Button, {
|
|
1392
|
+
variant: "surface",
|
|
1393
|
+
color: "neutral",
|
|
1394
|
+
size: "sm",
|
|
1395
|
+
"aria-describedby": `${groupId}-writing-failure`,
|
|
1396
|
+
onClick: writing.onRetry,
|
|
1397
|
+
children: "Analyze writing again"
|
|
1398
|
+
})]
|
|
1399
|
+
}) : null;
|
|
1400
|
+
$[45] = brandName;
|
|
1401
|
+
$[46] = groupId;
|
|
1402
|
+
$[47] = writing.failure;
|
|
1403
|
+
$[48] = writing.onRetry;
|
|
1404
|
+
$[49] = writing.status;
|
|
1405
|
+
$[50] = t9;
|
|
1406
|
+
} else t9 = $[50];
|
|
1156
1407
|
T0 = Tabs.Panels;
|
|
1157
1408
|
t3 = "first-run-work__panels";
|
|
1158
|
-
t4 = stages.map((
|
|
1159
|
-
const { id: id_1, label:
|
|
1409
|
+
t4 = stages.map((t18) => {
|
|
1410
|
+
const { id: id_1, label: label_1, work: work_4, description, rows } = t18;
|
|
1160
1411
|
return /* @__PURE__ */ jsxs(Tabs.Panel, {
|
|
1161
1412
|
value: id_1,
|
|
1162
1413
|
className: "first-run-work__panel",
|
|
1414
|
+
"data-recipe": "scroll-fade-y",
|
|
1163
1415
|
children: [
|
|
1164
1416
|
/* @__PURE__ */ jsx("h2", {
|
|
1165
1417
|
className: "sigvelo-visually-hidden",
|
|
1166
|
-
children:
|
|
1418
|
+
children: label_1
|
|
1167
1419
|
}),
|
|
1168
1420
|
/* @__PURE__ */ jsx("p", {
|
|
1169
1421
|
className: "first-run-work__description",
|
|
@@ -1172,26 +1424,31 @@ function WorkPreparation(t0) {
|
|
|
1172
1424
|
/* @__PURE__ */ jsxs("div", {
|
|
1173
1425
|
className: "first-run-work__result",
|
|
1174
1426
|
children: [
|
|
1175
|
-
|
|
1427
|
+
work_4.status !== "done" && work_4.activity?.length ? /* @__PURE__ */ jsx("ul", {
|
|
1176
1428
|
className: "first-run-work__sources",
|
|
1177
|
-
"aria-label": `${
|
|
1178
|
-
children:
|
|
1429
|
+
"aria-label": `${label_1} activity`,
|
|
1430
|
+
children: work_4.activity.map(_temp7$1)
|
|
1179
1431
|
}) : null,
|
|
1180
1432
|
rows.length ? /* @__PURE__ */ jsx("ul", {
|
|
1181
1433
|
className: "workspace-concept-list",
|
|
1182
1434
|
children: rows
|
|
1183
|
-
}) :
|
|
1435
|
+
}) : null,
|
|
1436
|
+
work_4.status === "failed" ? /* @__PURE__ */ jsxs("div", {
|
|
1437
|
+
className: "first-run-work__unfinished",
|
|
1438
|
+
children: [/* @__PURE__ */ jsx("p", {
|
|
1439
|
+
id: `${groupId}-${id_1}-failure`,
|
|
1440
|
+
role: "alert",
|
|
1441
|
+
children: work_4.failure ?? `${brandName} didn’t finish finding your ${label_1.toLowerCase()}.`
|
|
1442
|
+
}), /* @__PURE__ */ jsx(TryAgain, {
|
|
1443
|
+
size: "sm",
|
|
1444
|
+
onClick: work_4.onRetry,
|
|
1445
|
+
"aria-label": `Try again: ${label_1}`,
|
|
1446
|
+
"aria-describedby": `${groupId}-${id_1}-failure`
|
|
1447
|
+
})]
|
|
1448
|
+
}) : rows.length || work_4.status === "working" && work_4.activity?.length ? null : /* @__PURE__ */ jsx("p", {
|
|
1184
1449
|
className: "first-run-work__empty",
|
|
1185
|
-
children:
|
|
1186
|
-
})
|
|
1187
|
-
work_1.status === "failed" ? /* @__PURE__ */ jsx(Button, {
|
|
1188
|
-
className: "first-run-work__retry",
|
|
1189
|
-
variant: "surface",
|
|
1190
|
-
color: "neutral",
|
|
1191
|
-
onClick: work_1.onRetry,
|
|
1192
|
-
"aria-label": `Retry ${label_0}`,
|
|
1193
|
-
children: "Try again"
|
|
1194
|
-
}) : null
|
|
1450
|
+
children: work_4.status === "done" ? `No ${label_1.toLowerCase()} found. You can add them later.` : work_4.status === "working" ? `Finding your ${label_1.toLowerCase()}…` : `Waiting to find your ${label_1.toLowerCase()}.`
|
|
1451
|
+
})
|
|
1195
1452
|
]
|
|
1196
1453
|
})
|
|
1197
1454
|
]
|
|
@@ -1211,20 +1468,21 @@ function WorkPreparation(t0) {
|
|
|
1211
1468
|
$[13] = skills;
|
|
1212
1469
|
$[14] = t2;
|
|
1213
1470
|
$[15] = tab;
|
|
1214
|
-
$[16] = writing
|
|
1471
|
+
$[16] = writing;
|
|
1215
1472
|
$[17] = T0;
|
|
1216
1473
|
$[18] = T1;
|
|
1217
1474
|
$[19] = T2;
|
|
1218
1475
|
$[20] = completed;
|
|
1219
1476
|
$[21] = stages;
|
|
1220
1477
|
$[22] = t10;
|
|
1221
|
-
$[23] =
|
|
1222
|
-
$[24] =
|
|
1223
|
-
$[25] =
|
|
1224
|
-
$[26] =
|
|
1225
|
-
$[27] =
|
|
1226
|
-
$[28] =
|
|
1227
|
-
$[29] =
|
|
1478
|
+
$[23] = t11;
|
|
1479
|
+
$[24] = t3;
|
|
1480
|
+
$[25] = t4;
|
|
1481
|
+
$[26] = t5;
|
|
1482
|
+
$[27] = t6;
|
|
1483
|
+
$[28] = t7;
|
|
1484
|
+
$[29] = t8;
|
|
1485
|
+
$[30] = t9;
|
|
1228
1486
|
} else {
|
|
1229
1487
|
T0 = $[17];
|
|
1230
1488
|
T1 = $[18];
|
|
@@ -1232,96 +1490,95 @@ function WorkPreparation(t0) {
|
|
|
1232
1490
|
completed = $[20];
|
|
1233
1491
|
stages = $[21];
|
|
1234
1492
|
t10 = $[22];
|
|
1235
|
-
|
|
1236
|
-
|
|
1237
|
-
|
|
1238
|
-
|
|
1239
|
-
|
|
1240
|
-
|
|
1241
|
-
|
|
1493
|
+
t11 = $[23];
|
|
1494
|
+
t3 = $[24];
|
|
1495
|
+
t4 = $[25];
|
|
1496
|
+
t5 = $[26];
|
|
1497
|
+
t6 = $[27];
|
|
1498
|
+
t7 = $[28];
|
|
1499
|
+
t8 = $[29];
|
|
1500
|
+
t9 = $[30];
|
|
1242
1501
|
}
|
|
1243
|
-
let
|
|
1244
|
-
if ($[
|
|
1245
|
-
|
|
1502
|
+
let t12;
|
|
1503
|
+
if ($[51] !== T0 || $[52] !== t3 || $[53] !== t4) {
|
|
1504
|
+
t12 = /* @__PURE__ */ jsx(T0, {
|
|
1246
1505
|
className: t3,
|
|
1247
1506
|
children: t4
|
|
1248
1507
|
});
|
|
1249
|
-
$[
|
|
1250
|
-
$[
|
|
1251
|
-
$[
|
|
1252
|
-
$[
|
|
1253
|
-
} else
|
|
1254
|
-
let
|
|
1255
|
-
if ($[
|
|
1256
|
-
|
|
1508
|
+
$[51] = T0;
|
|
1509
|
+
$[52] = t3;
|
|
1510
|
+
$[53] = t4;
|
|
1511
|
+
$[54] = t12;
|
|
1512
|
+
} else t12 = $[54];
|
|
1513
|
+
let t13;
|
|
1514
|
+
if ($[55] !== T1 || $[56] !== t12 || $[57] !== t5 || $[58] !== t6 || $[59] !== t7 || $[60] !== t8 || $[61] !== t9) {
|
|
1515
|
+
t13 = /* @__PURE__ */ jsxs(T1, {
|
|
1257
1516
|
value: t5,
|
|
1258
1517
|
onValueChange: t6,
|
|
1259
1518
|
className: t7,
|
|
1260
|
-
children: [
|
|
1261
|
-
|
|
1262
|
-
|
|
1263
|
-
|
|
1264
|
-
|
|
1265
|
-
|
|
1266
|
-
$[
|
|
1267
|
-
$[
|
|
1268
|
-
$[
|
|
1269
|
-
|
|
1270
|
-
|
|
1271
|
-
|
|
1272
|
-
|
|
1273
|
-
|
|
1274
|
-
|
|
1275
|
-
|
|
1276
|
-
$[48] = writing.onRetry;
|
|
1277
|
-
$[49] = writing.status;
|
|
1278
|
-
$[50] = t13;
|
|
1279
|
-
} else t13 = $[50];
|
|
1280
|
-
const t14 = !completed;
|
|
1519
|
+
children: [
|
|
1520
|
+
t8,
|
|
1521
|
+
t9,
|
|
1522
|
+
t12
|
|
1523
|
+
]
|
|
1524
|
+
});
|
|
1525
|
+
$[55] = T1;
|
|
1526
|
+
$[56] = t12;
|
|
1527
|
+
$[57] = t5;
|
|
1528
|
+
$[58] = t6;
|
|
1529
|
+
$[59] = t7;
|
|
1530
|
+
$[60] = t8;
|
|
1531
|
+
$[61] = t9;
|
|
1532
|
+
$[62] = t13;
|
|
1533
|
+
} else t13 = $[62];
|
|
1534
|
+
const t14 = !completed && preparation !== "failed";
|
|
1281
1535
|
let t15;
|
|
1282
|
-
if ($[
|
|
1283
|
-
t15 = /* @__PURE__ */ jsx(Next, { disabled: t14 });
|
|
1284
|
-
$[
|
|
1285
|
-
$[
|
|
1286
|
-
} else t15 = $[
|
|
1536
|
+
if ($[63] !== t14) {
|
|
1537
|
+
t15 = /* @__PURE__ */ jsx(Actions, { children: /* @__PURE__ */ jsx(Next, { disabled: t14 }) });
|
|
1538
|
+
$[63] = t14;
|
|
1539
|
+
$[64] = t15;
|
|
1540
|
+
} else t15 = $[64];
|
|
1287
1541
|
let t16;
|
|
1288
|
-
if ($[
|
|
1289
|
-
t16 =
|
|
1290
|
-
|
|
1291
|
-
|
|
1292
|
-
|
|
1293
|
-
|
|
1542
|
+
if ($[65] !== writing) {
|
|
1543
|
+
t16 = {
|
|
1544
|
+
label: "Writing style",
|
|
1545
|
+
work: writing
|
|
1546
|
+
};
|
|
1547
|
+
$[65] = writing;
|
|
1548
|
+
$[66] = t16;
|
|
1549
|
+
} else t16 = $[66];
|
|
1294
1550
|
let t17;
|
|
1295
|
-
if ($[
|
|
1296
|
-
t17 = stages.map(
|
|
1297
|
-
$[
|
|
1298
|
-
$[
|
|
1299
|
-
|
|
1551
|
+
if ($[67] !== stages || $[68] !== t16) {
|
|
1552
|
+
t17 = [...stages, t16].map(_temp8);
|
|
1553
|
+
$[67] = stages;
|
|
1554
|
+
$[68] = t16;
|
|
1555
|
+
$[69] = t17;
|
|
1556
|
+
} else t17 = $[69];
|
|
1300
1557
|
const t18 = t17.join(". ");
|
|
1301
1558
|
let t19;
|
|
1302
|
-
if ($[
|
|
1559
|
+
if ($[70] !== T2 || $[71] !== t10 || $[72] !== t11 || $[73] !== t13 || $[74] !== t15 || $[75] !== t18) {
|
|
1303
1560
|
t19 = /* @__PURE__ */ jsx(T2, {
|
|
1304
|
-
layout:
|
|
1305
|
-
title:
|
|
1306
|
-
body:
|
|
1307
|
-
actions:
|
|
1561
|
+
layout: t10,
|
|
1562
|
+
title: t11,
|
|
1563
|
+
body: t13,
|
|
1564
|
+
actions: t15,
|
|
1308
1565
|
announce: t18
|
|
1309
1566
|
});
|
|
1310
|
-
$[
|
|
1311
|
-
$[
|
|
1312
|
-
$[
|
|
1313
|
-
$[
|
|
1314
|
-
$[
|
|
1315
|
-
$[
|
|
1316
|
-
$[
|
|
1317
|
-
} else t19 = $[
|
|
1567
|
+
$[70] = T2;
|
|
1568
|
+
$[71] = t10;
|
|
1569
|
+
$[72] = t11;
|
|
1570
|
+
$[73] = t13;
|
|
1571
|
+
$[74] = t15;
|
|
1572
|
+
$[75] = t18;
|
|
1573
|
+
$[76] = t19;
|
|
1574
|
+
} else t19 = $[76];
|
|
1318
1575
|
return t19;
|
|
1319
1576
|
}
|
|
1320
|
-
function
|
|
1321
|
-
const { label:
|
|
1322
|
-
return `${
|
|
1577
|
+
function _temp8(t0) {
|
|
1578
|
+
const { label: label_2, work: work_5 } = t0;
|
|
1579
|
+
return `${label_2}: ${WORK_STATUS_TEXT[work_5.status]}`;
|
|
1323
1580
|
}
|
|
1324
|
-
function
|
|
1581
|
+
function _temp7$1(activity) {
|
|
1325
1582
|
return /* @__PURE__ */ jsxs("li", {
|
|
1326
1583
|
className: "first-run-work__source",
|
|
1327
1584
|
children: [
|
|
@@ -1339,13 +1596,13 @@ function _temp4$1(activity) {
|
|
|
1339
1596
|
className: "first-run-work__source-status",
|
|
1340
1597
|
children: /* @__PURE__ */ jsx(WorkStatusMark, {
|
|
1341
1598
|
status: activity.status,
|
|
1342
|
-
text:
|
|
1599
|
+
text: WORK_STATUS_TEXT
|
|
1343
1600
|
})
|
|
1344
1601
|
})
|
|
1345
1602
|
]
|
|
1346
1603
|
}, activity.id);
|
|
1347
1604
|
}
|
|
1348
|
-
function
|
|
1605
|
+
function _temp6$1(t0) {
|
|
1349
1606
|
const { id, x, y, radius, opacity } = t0;
|
|
1350
1607
|
return /* @__PURE__ */ jsx("circle", {
|
|
1351
1608
|
className: "first-run-orb__particle",
|
|
@@ -1355,9 +1612,24 @@ function _temp3$2(t0) {
|
|
|
1355
1612
|
opacity
|
|
1356
1613
|
}, id);
|
|
1357
1614
|
}
|
|
1615
|
+
function _temp5$1(t0) {
|
|
1616
|
+
const { work: work_2 } = t0;
|
|
1617
|
+
return work_2.status === "failed";
|
|
1618
|
+
}
|
|
1619
|
+
function _temp4$1(t0) {
|
|
1620
|
+
const { work: work_1 } = t0;
|
|
1621
|
+
return work_1.status === "failed" || work_1.status === "idle";
|
|
1622
|
+
}
|
|
1623
|
+
function _temp3$2(t0) {
|
|
1624
|
+
const { label, work: work_0 } = t0;
|
|
1625
|
+
return {
|
|
1626
|
+
label,
|
|
1627
|
+
work: work_0
|
|
1628
|
+
};
|
|
1629
|
+
}
|
|
1358
1630
|
function _temp2$3(t0) {
|
|
1359
1631
|
const { work } = t0;
|
|
1360
|
-
return work;
|
|
1632
|
+
return work.status;
|
|
1361
1633
|
}
|
|
1362
1634
|
function _temp$4(skill) {
|
|
1363
1635
|
return /* @__PURE__ */ jsx("li", { children: /* @__PURE__ */ jsx(WorkspaceEntityCard, {
|
|
@@ -1367,159 +1639,172 @@ function _temp$4(skill) {
|
|
|
1367
1639
|
meta: firstLine(skill.description)
|
|
1368
1640
|
}) }, skill.name);
|
|
1369
1641
|
}
|
|
1370
|
-
/** How a preparation tab names its status. */
|
|
1642
|
+
/** How a preparation tab or source row names its status. */
|
|
1371
1643
|
const WORK_STATUS_TEXT = {
|
|
1372
1644
|
idle: "Waiting",
|
|
1373
1645
|
working: "Preparing",
|
|
1374
1646
|
done: "Ready",
|
|
1375
|
-
failed: "
|
|
1376
|
-
};
|
|
1377
|
-
/** How a source row names its status, in words while it waits or works. */
|
|
1378
|
-
const ACTIVITY_STATUS_TEXT = {
|
|
1379
|
-
idle: "Waiting",
|
|
1380
|
-
working: "Checking…",
|
|
1381
|
-
done: "Completed",
|
|
1382
|
-
failed: "Needs attention"
|
|
1647
|
+
failed: "Didn’t finish"
|
|
1383
1648
|
};
|
|
1384
1649
|
//#endregion
|
|
1385
1650
|
//#region src/components/extension/first-run/WorkTrial.tsx
|
|
1651
|
+
/**
|
|
1652
|
+
* The offered automation's run. Setup owns it, so a run outlives its screen
|
|
1653
|
+
* and the selector can mark Try an automation once one completes.
|
|
1654
|
+
*/
|
|
1655
|
+
function useTrialRun(automation, source) {
|
|
1656
|
+
const $ = c(9);
|
|
1657
|
+
let t0;
|
|
1658
|
+
if ($[0] !== source) {
|
|
1659
|
+
t0 = { mutationFn: (path) => source.onRun({
|
|
1660
|
+
path,
|
|
1661
|
+
args: {}
|
|
1662
|
+
}) };
|
|
1663
|
+
$[0] = source;
|
|
1664
|
+
$[1] = t0;
|
|
1665
|
+
} else t0 = $[1];
|
|
1666
|
+
const request = useMutation(t0);
|
|
1667
|
+
const trace = automation && source.trace?.path === automation.path ? source.trace : void 0;
|
|
1668
|
+
let t1;
|
|
1669
|
+
if ($[2] !== request.status || $[3] !== trace) {
|
|
1670
|
+
t1 = tryStatus(request.status, trace);
|
|
1671
|
+
$[2] = request.status;
|
|
1672
|
+
$[3] = trace;
|
|
1673
|
+
$[4] = t1;
|
|
1674
|
+
} else t1 = $[4];
|
|
1675
|
+
let t2;
|
|
1676
|
+
if ($[5] !== request || $[6] !== t1 || $[7] !== trace) {
|
|
1677
|
+
t2 = {
|
|
1678
|
+
request,
|
|
1679
|
+
trace,
|
|
1680
|
+
status: t1
|
|
1681
|
+
};
|
|
1682
|
+
$[5] = request;
|
|
1683
|
+
$[6] = t1;
|
|
1684
|
+
$[7] = trace;
|
|
1685
|
+
$[8] = t2;
|
|
1686
|
+
} else t2 = $[8];
|
|
1687
|
+
return t2;
|
|
1688
|
+
}
|
|
1386
1689
|
/** A trial is separate from schedule decisions and always starts with an explicit Run action. */
|
|
1387
1690
|
function WorkTrial(t0) {
|
|
1388
|
-
const $ = c(
|
|
1389
|
-
const { automation, source } = t0;
|
|
1691
|
+
const $ = c(41);
|
|
1692
|
+
const { automation, source, run: t1 } = t0;
|
|
1693
|
+
const { request: run, trace, status } = t1;
|
|
1390
1694
|
const { brandName } = useFirstRun();
|
|
1391
|
-
const trace = source.trace?.path === automation.path ? source.trace : void 0;
|
|
1392
|
-
let t1;
|
|
1393
|
-
if ($[0] !== automation.path || $[1] !== source.onRun) {
|
|
1394
|
-
t1 = { mutationFn: () => source.onRun({
|
|
1395
|
-
path: automation.path,
|
|
1396
|
-
args: {}
|
|
1397
|
-
}) };
|
|
1398
|
-
$[0] = automation.path;
|
|
1399
|
-
$[1] = source.onRun;
|
|
1400
|
-
$[2] = t1;
|
|
1401
|
-
} else t1 = $[2];
|
|
1402
|
-
const run = useMutation(t1);
|
|
1403
1695
|
let t2;
|
|
1404
|
-
if ($[
|
|
1696
|
+
if ($[0] !== source) {
|
|
1405
1697
|
t2 = { mutationFn: (executionId) => source.onStop(executionId) };
|
|
1406
|
-
$[
|
|
1407
|
-
$[
|
|
1408
|
-
} else t2 = $[
|
|
1698
|
+
$[0] = source;
|
|
1699
|
+
$[1] = t2;
|
|
1700
|
+
} else t2 = $[1];
|
|
1409
1701
|
const stop = useMutation(t2);
|
|
1410
1702
|
let t3;
|
|
1411
|
-
if ($[
|
|
1412
|
-
t3 =
|
|
1413
|
-
$[
|
|
1414
|
-
$[
|
|
1415
|
-
|
|
1416
|
-
|
|
1417
|
-
const status = t3;
|
|
1703
|
+
if ($[2] !== trace) {
|
|
1704
|
+
t3 = trace ? boardNotice(trace.graph, trace) : void 0;
|
|
1705
|
+
$[2] = trace;
|
|
1706
|
+
$[3] = t3;
|
|
1707
|
+
} else t3 = $[3];
|
|
1708
|
+
const notice = t3;
|
|
1418
1709
|
let t4;
|
|
1419
|
-
if ($[
|
|
1420
|
-
t4 = trace
|
|
1421
|
-
$[
|
|
1422
|
-
$[
|
|
1423
|
-
|
|
1424
|
-
|
|
1425
|
-
|
|
1426
|
-
if ($[10] !== automation.graph || $[11] !== trace?.graph) {
|
|
1427
|
-
t5 = (trace?.graph ?? automation.graph)?.nodes ?? [];
|
|
1428
|
-
$[10] = automation.graph;
|
|
1429
|
-
$[11] = trace?.graph;
|
|
1430
|
-
$[12] = t5;
|
|
1431
|
-
} else t5 = $[12];
|
|
1432
|
-
const nodes = t5;
|
|
1710
|
+
if ($[4] !== automation || $[5] !== trace?.graph) {
|
|
1711
|
+
t4 = (trace?.graph ?? automation.graph)?.nodes ?? [];
|
|
1712
|
+
$[4] = automation;
|
|
1713
|
+
$[5] = trace?.graph;
|
|
1714
|
+
$[6] = t4;
|
|
1715
|
+
} else t4 = $[6];
|
|
1716
|
+
const nodes = t4;
|
|
1433
1717
|
const busy = status === "running";
|
|
1434
|
-
const
|
|
1718
|
+
const t5 = status === "idle" ? "Try an automation" : automation.name;
|
|
1719
|
+
let t6;
|
|
1720
|
+
if ($[7] !== automation || $[8] !== brandName || $[9] !== busy || $[10] !== notice?.text || $[11] !== run || $[12] !== status || $[13] !== stop || $[14] !== trace?.result) {
|
|
1721
|
+
t6 = status === "idle" ? [automation.description, `${brandName} can run “${automation.name}” now, in tabs of its own.`].filter(Boolean).join(" ") : busy ? stop.error ? executionErrorSummary(formatErrorMessage(stop.error)) : `${brandName} is working in tabs of its own.` : status === "done" ? firstLine(executionResultSummary(run.data?.result ?? trace?.result)) : notice?.text ?? executionErrorSummary(formatErrorMessage(run.error));
|
|
1722
|
+
$[7] = automation;
|
|
1723
|
+
$[8] = brandName;
|
|
1724
|
+
$[9] = busy;
|
|
1725
|
+
$[10] = notice?.text;
|
|
1726
|
+
$[11] = run;
|
|
1727
|
+
$[12] = status;
|
|
1728
|
+
$[13] = stop;
|
|
1729
|
+
$[14] = trace?.result;
|
|
1730
|
+
$[15] = t6;
|
|
1731
|
+
} else t6 = $[15];
|
|
1435
1732
|
let t7;
|
|
1436
|
-
if ($[
|
|
1437
|
-
t7 = status
|
|
1438
|
-
$[13] = automation.name;
|
|
1439
|
-
$[14] = brandName;
|
|
1440
|
-
$[15] = busy;
|
|
1441
|
-
$[16] = notice?.text;
|
|
1442
|
-
$[17] = run.data?.result;
|
|
1443
|
-
$[18] = run.error;
|
|
1444
|
-
$[19] = status;
|
|
1445
|
-
$[20] = stop;
|
|
1446
|
-
$[21] = trace?.result;
|
|
1447
|
-
$[22] = t7;
|
|
1448
|
-
} else t7 = $[22];
|
|
1449
|
-
let t8;
|
|
1450
|
-
if ($[23] !== nodes || $[24] !== status || $[25] !== trace) {
|
|
1451
|
-
t8 = status !== "idle" && nodes.length ? /* @__PURE__ */ jsx(RunProgress, {
|
|
1733
|
+
if ($[16] !== nodes || $[17] !== status || $[18] !== trace) {
|
|
1734
|
+
t7 = status !== "idle" && nodes.length ? /* @__PURE__ */ jsx(RunProgress, {
|
|
1452
1735
|
nodes,
|
|
1453
1736
|
trace
|
|
1454
1737
|
}) : void 0;
|
|
1455
|
-
$[
|
|
1456
|
-
$[
|
|
1457
|
-
$[
|
|
1458
|
-
$[
|
|
1459
|
-
} else
|
|
1738
|
+
$[16] = nodes;
|
|
1739
|
+
$[17] = status;
|
|
1740
|
+
$[18] = trace;
|
|
1741
|
+
$[19] = t7;
|
|
1742
|
+
} else t7 = $[19];
|
|
1743
|
+
let t8;
|
|
1744
|
+
if ($[20] !== busy) {
|
|
1745
|
+
t8 = /* @__PURE__ */ jsx(Back, { disabled: busy });
|
|
1746
|
+
$[20] = busy;
|
|
1747
|
+
$[21] = t8;
|
|
1748
|
+
} else t8 = $[21];
|
|
1460
1749
|
let t9;
|
|
1461
|
-
if ($[27] !==
|
|
1462
|
-
t9 = /* @__PURE__ */ jsx(
|
|
1463
|
-
$[27] = busy;
|
|
1464
|
-
$[28] = t9;
|
|
1465
|
-
} else t9 = $[28];
|
|
1466
|
-
let t10;
|
|
1467
|
-
if ($[29] !== busy || $[30] !== run || $[31] !== source.onStop || $[32] !== status || $[33] !== stop || $[34] !== trace) {
|
|
1468
|
-
t10 = busy ? source.onStop && trace ? /* @__PURE__ */ jsx(Button, {
|
|
1750
|
+
if ($[22] !== automation || $[23] !== busy || $[24] !== run || $[25] !== source || $[26] !== status || $[27] !== stop || $[28] !== trace) {
|
|
1751
|
+
t9 = busy ? source.onStop && trace ? /* @__PURE__ */ jsx(Button, {
|
|
1469
1752
|
variant: "surface",
|
|
1470
1753
|
color: "neutral",
|
|
1471
1754
|
size: "md",
|
|
1472
1755
|
disabled: stop.isPending,
|
|
1756
|
+
focusableWhenDisabled: stop.isPending,
|
|
1473
1757
|
onClick: () => stop.mutate(trace.executionId),
|
|
1474
1758
|
children: "Stop run"
|
|
1475
1759
|
}) : null : status === "idle" ? /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx(NotNow, {}), /* @__PURE__ */ jsx(Button, {
|
|
1476
1760
|
size: "md",
|
|
1477
|
-
onClick: () => run.mutate(),
|
|
1478
|
-
children: "Run
|
|
1479
|
-
})] }) : /* @__PURE__ */ jsxs(Fragment, { children: [status === "failed" ? /* @__PURE__ */ jsx(TryAgain, { onClick: () => run.mutate() }) : null, /* @__PURE__ */ jsx(Next, {})] });
|
|
1480
|
-
$[
|
|
1481
|
-
$[
|
|
1482
|
-
$[
|
|
1483
|
-
$[
|
|
1484
|
-
$[
|
|
1485
|
-
$[
|
|
1486
|
-
$[
|
|
1487
|
-
|
|
1488
|
-
|
|
1489
|
-
|
|
1490
|
-
|
|
1761
|
+
onClick: () => run.mutate(automation.path),
|
|
1762
|
+
children: "Run"
|
|
1763
|
+
})] }) : /* @__PURE__ */ jsxs(Fragment, { children: [status === "failed" ? /* @__PURE__ */ jsx(TryAgain, { onClick: () => run.mutate(automation.path) }) : null, /* @__PURE__ */ jsx(Next, {})] });
|
|
1764
|
+
$[22] = automation;
|
|
1765
|
+
$[23] = busy;
|
|
1766
|
+
$[24] = run;
|
|
1767
|
+
$[25] = source;
|
|
1768
|
+
$[26] = status;
|
|
1769
|
+
$[27] = stop;
|
|
1770
|
+
$[28] = trace;
|
|
1771
|
+
$[29] = t9;
|
|
1772
|
+
} else t9 = $[29];
|
|
1773
|
+
let t10;
|
|
1774
|
+
if ($[30] !== t9) {
|
|
1775
|
+
t10 = /* @__PURE__ */ jsx("div", {
|
|
1491
1776
|
className: "first-run-actions__end",
|
|
1492
|
-
children:
|
|
1777
|
+
children: t9
|
|
1493
1778
|
});
|
|
1494
|
-
$[
|
|
1495
|
-
$[
|
|
1496
|
-
} else
|
|
1497
|
-
let
|
|
1498
|
-
if ($[
|
|
1499
|
-
|
|
1500
|
-
$[
|
|
1501
|
-
$[
|
|
1502
|
-
$[
|
|
1503
|
-
} else
|
|
1504
|
-
const
|
|
1505
|
-
let
|
|
1506
|
-
if ($[
|
|
1507
|
-
|
|
1779
|
+
$[30] = t9;
|
|
1780
|
+
$[31] = t10;
|
|
1781
|
+
} else t10 = $[31];
|
|
1782
|
+
let t11;
|
|
1783
|
+
if ($[32] !== t10 || $[33] !== t8) {
|
|
1784
|
+
t11 = /* @__PURE__ */ jsxs(Fragment, { children: [t8, t10] });
|
|
1785
|
+
$[32] = t10;
|
|
1786
|
+
$[33] = t8;
|
|
1787
|
+
$[34] = t11;
|
|
1788
|
+
} else t11 = $[34];
|
|
1789
|
+
const t12 = busy ? `Running ${automation.name}` : status === "done" ? `Ran ${automation.name}` : "";
|
|
1790
|
+
let t13;
|
|
1791
|
+
if ($[35] !== t11 || $[36] !== t12 || $[37] !== t5 || $[38] !== t6 || $[39] !== t7) {
|
|
1792
|
+
t13 = /* @__PURE__ */ jsx(Step, {
|
|
1508
1793
|
narrow: true,
|
|
1509
|
-
title:
|
|
1510
|
-
lead:
|
|
1511
|
-
body:
|
|
1512
|
-
actions:
|
|
1513
|
-
announce:
|
|
1794
|
+
title: t5,
|
|
1795
|
+
lead: t6,
|
|
1796
|
+
body: t7,
|
|
1797
|
+
actions: t11,
|
|
1798
|
+
announce: t12
|
|
1514
1799
|
});
|
|
1515
|
-
$[
|
|
1516
|
-
$[
|
|
1517
|
-
$[
|
|
1518
|
-
$[
|
|
1519
|
-
$[
|
|
1520
|
-
$[
|
|
1521
|
-
} else
|
|
1522
|
-
return
|
|
1800
|
+
$[35] = t11;
|
|
1801
|
+
$[36] = t12;
|
|
1802
|
+
$[37] = t5;
|
|
1803
|
+
$[38] = t6;
|
|
1804
|
+
$[39] = t7;
|
|
1805
|
+
$[40] = t13;
|
|
1806
|
+
} else t13 = $[40];
|
|
1807
|
+
return t13;
|
|
1523
1808
|
}
|
|
1524
1809
|
/** Where the tried run stands: its trace once the host streams one, else the request. */
|
|
1525
1810
|
function tryStatus(request, trace) {
|
|
@@ -1588,7 +1873,11 @@ function ScheduleReview(t0) {
|
|
|
1588
1873
|
const { brandName, titleId } = useFirstRun();
|
|
1589
1874
|
let t1;
|
|
1590
1875
|
if ($[0] !== titleId) {
|
|
1591
|
-
t1 = [
|
|
1876
|
+
t1 = [
|
|
1877
|
+
"first-run",
|
|
1878
|
+
titleId,
|
|
1879
|
+
"schedule"
|
|
1880
|
+
];
|
|
1592
1881
|
$[0] = titleId;
|
|
1593
1882
|
$[1] = t1;
|
|
1594
1883
|
} else t1 = $[1];
|
|
@@ -1600,7 +1889,7 @@ function ScheduleReview(t0) {
|
|
|
1600
1889
|
$[3] = t2;
|
|
1601
1890
|
} else t2 = $[3];
|
|
1602
1891
|
const saving = useIsMutating(t2) > 0;
|
|
1603
|
-
const t3 = automations.length ? "Choose
|
|
1892
|
+
const t3 = automations.length ? "Choose schedules" : "No schedules suggested";
|
|
1604
1893
|
const t4 = automations.length ? "Only schedules you turn on will run automatically." : `You can ask ${brandName} to schedule work anytime.`;
|
|
1605
1894
|
let t5;
|
|
1606
1895
|
if ($[4] !== automations || $[5] !== mutationKey || $[6] !== schedules) {
|
|
@@ -1663,7 +1952,7 @@ function ScheduleReview(t0) {
|
|
|
1663
1952
|
}
|
|
1664
1953
|
/** Each switch is an explicit, immediately saved approval with its own pending/error state. */
|
|
1665
1954
|
function ScheduleChoice(t0) {
|
|
1666
|
-
const $ = c(
|
|
1955
|
+
const $ = c(44);
|
|
1667
1956
|
const { automation, schedules, mutationKey } = t0;
|
|
1668
1957
|
const id = React.useId();
|
|
1669
1958
|
let t1;
|
|
@@ -1674,145 +1963,131 @@ function ScheduleChoice(t0) {
|
|
|
1674
1963
|
} else t1 = $[1];
|
|
1675
1964
|
const schedule = schedules.list.find(t1);
|
|
1676
1965
|
const enabled = schedule?.enabled ?? false;
|
|
1677
|
-
|
|
1678
|
-
|
|
1679
|
-
|
|
1680
|
-
|
|
1681
|
-
$[3] = schedules;
|
|
1682
|
-
$[4] = t2;
|
|
1683
|
-
} else t2 = $[4];
|
|
1684
|
-
let t3;
|
|
1685
|
-
if ($[5] !== mutationKey || $[6] !== t2) {
|
|
1686
|
-
t3 = {
|
|
1687
|
-
mutationKey,
|
|
1688
|
-
mutationFn: t2
|
|
1689
|
-
};
|
|
1690
|
-
$[5] = mutationKey;
|
|
1691
|
-
$[6] = t2;
|
|
1692
|
-
$[7] = t3;
|
|
1693
|
-
} else t3 = $[7];
|
|
1694
|
-
const change = useMutation(t3);
|
|
1966
|
+
const change = useMutation({
|
|
1967
|
+
mutationKey,
|
|
1968
|
+
mutationFn: (value) => schedules.onChange(automation, value, schedule)
|
|
1969
|
+
});
|
|
1695
1970
|
const next = enabled && schedule ? getThinkScheduleNextRun(schedule) : void 0;
|
|
1696
|
-
const
|
|
1697
|
-
let
|
|
1698
|
-
if ($[
|
|
1699
|
-
|
|
1700
|
-
$[
|
|
1701
|
-
$[
|
|
1702
|
-
} else
|
|
1703
|
-
let
|
|
1704
|
-
if ($[
|
|
1705
|
-
|
|
1971
|
+
const t2 = change.isPending;
|
|
1972
|
+
let t3;
|
|
1973
|
+
if ($[2] !== automation.name) {
|
|
1974
|
+
t3 = /* @__PURE__ */ jsx("strong", { children: automation.name });
|
|
1975
|
+
$[2] = automation.name;
|
|
1976
|
+
$[3] = t3;
|
|
1977
|
+
} else t3 = $[3];
|
|
1978
|
+
let t4;
|
|
1979
|
+
if ($[4] !== id || $[5] !== t3) {
|
|
1980
|
+
t4 = /* @__PURE__ */ jsx("label", {
|
|
1706
1981
|
htmlFor: id,
|
|
1707
|
-
children:
|
|
1982
|
+
children: t3
|
|
1708
1983
|
});
|
|
1709
|
-
$[
|
|
1710
|
-
$[
|
|
1711
|
-
$[
|
|
1712
|
-
} else
|
|
1713
|
-
const
|
|
1714
|
-
const
|
|
1984
|
+
$[4] = id;
|
|
1985
|
+
$[5] = t3;
|
|
1986
|
+
$[6] = t4;
|
|
1987
|
+
} else t4 = $[6];
|
|
1988
|
+
const t5 = `${id}-timing`;
|
|
1989
|
+
const t6 = automation.schedule ?? "";
|
|
1990
|
+
let t7;
|
|
1991
|
+
if ($[7] !== t6) {
|
|
1992
|
+
t7 = formatThinkScheduleRepeat(t6);
|
|
1993
|
+
$[7] = t6;
|
|
1994
|
+
$[8] = t7;
|
|
1995
|
+
} else t7 = $[8];
|
|
1996
|
+
let t8;
|
|
1997
|
+
if ($[9] !== t5 || $[10] !== t7) {
|
|
1998
|
+
t8 = /* @__PURE__ */ jsx("span", {
|
|
1999
|
+
id: t5,
|
|
2000
|
+
children: t7
|
|
2001
|
+
});
|
|
2002
|
+
$[9] = t5;
|
|
2003
|
+
$[10] = t7;
|
|
2004
|
+
$[11] = t8;
|
|
2005
|
+
} else t8 = $[11];
|
|
1715
2006
|
let t9;
|
|
1716
|
-
if ($[
|
|
1717
|
-
t9 =
|
|
1718
|
-
$[
|
|
1719
|
-
$[
|
|
1720
|
-
} else t9 = $[
|
|
2007
|
+
if ($[12] !== next) {
|
|
2008
|
+
t9 = next ? /* @__PURE__ */ jsxs("small", { children: ["Next ", next] }) : null;
|
|
2009
|
+
$[12] = next;
|
|
2010
|
+
$[13] = t9;
|
|
2011
|
+
} else t9 = $[13];
|
|
1721
2012
|
let t10;
|
|
1722
|
-
if ($[15] !==
|
|
1723
|
-
t10 = /* @__PURE__ */
|
|
1724
|
-
|
|
1725
|
-
children:
|
|
2013
|
+
if ($[14] !== t4 || $[15] !== t8 || $[16] !== t9) {
|
|
2014
|
+
t10 = /* @__PURE__ */ jsxs("div", {
|
|
2015
|
+
className: "first-run-schedule__copy",
|
|
2016
|
+
children: [
|
|
2017
|
+
t4,
|
|
2018
|
+
t8,
|
|
2019
|
+
t9
|
|
2020
|
+
]
|
|
1726
2021
|
});
|
|
1727
|
-
$[
|
|
2022
|
+
$[14] = t4;
|
|
2023
|
+
$[15] = t8;
|
|
1728
2024
|
$[16] = t9;
|
|
1729
2025
|
$[17] = t10;
|
|
1730
2026
|
} else t10 = $[17];
|
|
1731
2027
|
let t11;
|
|
1732
|
-
if ($[18] !==
|
|
1733
|
-
t11 =
|
|
1734
|
-
$[18] = next;
|
|
1735
|
-
$[19] = t11;
|
|
1736
|
-
} else t11 = $[19];
|
|
1737
|
-
let t12;
|
|
1738
|
-
if ($[20] !== t10 || $[21] !== t11 || $[22] !== t6) {
|
|
1739
|
-
t12 = /* @__PURE__ */ jsxs("div", {
|
|
1740
|
-
className: "first-run-schedule__copy",
|
|
1741
|
-
children: [
|
|
1742
|
-
t6,
|
|
1743
|
-
t10,
|
|
1744
|
-
t11
|
|
1745
|
-
]
|
|
1746
|
-
});
|
|
1747
|
-
$[20] = t10;
|
|
1748
|
-
$[21] = t11;
|
|
1749
|
-
$[22] = t6;
|
|
1750
|
-
$[23] = t12;
|
|
1751
|
-
} else t12 = $[23];
|
|
1752
|
-
let t13;
|
|
1753
|
-
if ($[24] !== change.isPending) {
|
|
1754
|
-
t13 = change.isPending ? /* @__PURE__ */ jsx("span", {
|
|
2028
|
+
if ($[18] !== change.isPending) {
|
|
2029
|
+
t11 = change.isPending ? /* @__PURE__ */ jsx("span", {
|
|
1755
2030
|
role: "status",
|
|
1756
2031
|
children: "Saving…"
|
|
1757
2032
|
}) : null;
|
|
1758
|
-
$[
|
|
1759
|
-
$[
|
|
1760
|
-
} else
|
|
1761
|
-
const
|
|
1762
|
-
const
|
|
2033
|
+
$[18] = change.isPending;
|
|
2034
|
+
$[19] = t11;
|
|
2035
|
+
} else t11 = $[19];
|
|
2036
|
+
const t12 = `${id}-timing`;
|
|
2037
|
+
const t13 = change.isPending ? change.variables : enabled;
|
|
2038
|
+
let t14;
|
|
2039
|
+
if ($[20] !== change) {
|
|
2040
|
+
t14 = (value_0) => change.mutate(value_0);
|
|
2041
|
+
$[20] = change;
|
|
2042
|
+
$[21] = t14;
|
|
2043
|
+
} else t14 = $[21];
|
|
2044
|
+
let t15;
|
|
2045
|
+
if ($[22] === Symbol.for("react.memo_cache_sentinel")) {
|
|
2046
|
+
t15 = /* @__PURE__ */ jsx(Switch.Thumb, {});
|
|
2047
|
+
$[22] = t15;
|
|
2048
|
+
} else t15 = $[22];
|
|
1763
2049
|
let t16;
|
|
1764
|
-
if ($[26] !==
|
|
1765
|
-
t16 =
|
|
1766
|
-
$[26] = change;
|
|
1767
|
-
$[27] = t16;
|
|
1768
|
-
} else t16 = $[27];
|
|
1769
|
-
let t17;
|
|
1770
|
-
if ($[28] === Symbol.for("react.memo_cache_sentinel")) {
|
|
1771
|
-
t17 = /* @__PURE__ */ jsx(Switch.Thumb, {});
|
|
1772
|
-
$[28] = t17;
|
|
1773
|
-
} else t17 = $[28];
|
|
1774
|
-
let t18;
|
|
1775
|
-
if ($[29] !== automation.name || $[30] !== change.isPending || $[31] !== id || $[32] !== t14 || $[33] !== t15 || $[34] !== t16) {
|
|
1776
|
-
t18 = /* @__PURE__ */ jsx(Switch.Root, {
|
|
2050
|
+
if ($[23] !== automation.name || $[24] !== change.isPending || $[25] !== id || $[26] !== t12 || $[27] !== t13 || $[28] !== t14) {
|
|
2051
|
+
t16 = /* @__PURE__ */ jsx(Switch.Root, {
|
|
1777
2052
|
id,
|
|
1778
2053
|
"aria-label": automation.name,
|
|
1779
|
-
"aria-describedby":
|
|
1780
|
-
checked:
|
|
2054
|
+
"aria-describedby": t12,
|
|
2055
|
+
checked: t13,
|
|
1781
2056
|
disabled: change.isPending,
|
|
1782
|
-
onCheckedChange:
|
|
1783
|
-
children:
|
|
1784
|
-
});
|
|
1785
|
-
$[
|
|
1786
|
-
$[
|
|
1787
|
-
$[
|
|
1788
|
-
$[
|
|
1789
|
-
$[
|
|
1790
|
-
$[
|
|
1791
|
-
$[
|
|
1792
|
-
} else
|
|
1793
|
-
let
|
|
1794
|
-
if ($[
|
|
1795
|
-
|
|
2057
|
+
onCheckedChange: t14,
|
|
2058
|
+
children: t15
|
|
2059
|
+
});
|
|
2060
|
+
$[23] = automation.name;
|
|
2061
|
+
$[24] = change.isPending;
|
|
2062
|
+
$[25] = id;
|
|
2063
|
+
$[26] = t12;
|
|
2064
|
+
$[27] = t13;
|
|
2065
|
+
$[28] = t14;
|
|
2066
|
+
$[29] = t16;
|
|
2067
|
+
} else t16 = $[29];
|
|
2068
|
+
let t17;
|
|
2069
|
+
if ($[30] !== t11 || $[31] !== t16) {
|
|
2070
|
+
t17 = /* @__PURE__ */ jsxs("div", {
|
|
1796
2071
|
className: "first-run-schedule__control",
|
|
1797
|
-
children: [
|
|
2072
|
+
children: [t11, t16]
|
|
1798
2073
|
});
|
|
1799
|
-
$[
|
|
1800
|
-
$[
|
|
1801
|
-
$[
|
|
1802
|
-
} else
|
|
1803
|
-
let
|
|
1804
|
-
if ($[
|
|
1805
|
-
|
|
2074
|
+
$[30] = t11;
|
|
2075
|
+
$[31] = t16;
|
|
2076
|
+
$[32] = t17;
|
|
2077
|
+
} else t17 = $[32];
|
|
2078
|
+
let t18;
|
|
2079
|
+
if ($[33] !== t10 || $[34] !== t17) {
|
|
2080
|
+
t18 = /* @__PURE__ */ jsxs("div", {
|
|
1806
2081
|
className: "first-run-schedule",
|
|
1807
|
-
children: [
|
|
2082
|
+
children: [t10, t17]
|
|
1808
2083
|
});
|
|
1809
|
-
$[
|
|
1810
|
-
$[
|
|
1811
|
-
$[
|
|
1812
|
-
} else
|
|
1813
|
-
let
|
|
1814
|
-
if ($[
|
|
1815
|
-
|
|
2084
|
+
$[33] = t10;
|
|
2085
|
+
$[34] = t17;
|
|
2086
|
+
$[35] = t18;
|
|
2087
|
+
} else t18 = $[35];
|
|
2088
|
+
let t19;
|
|
2089
|
+
if ($[36] !== automation.name || $[37] !== change || $[38] !== enabled) {
|
|
2090
|
+
t19 = change.isError ? /* @__PURE__ */ jsxs("div", {
|
|
1816
2091
|
className: "first-run-schedule__error",
|
|
1817
2092
|
children: [/* @__PURE__ */ jsxs("p", {
|
|
1818
2093
|
role: "alert",
|
|
@@ -1826,29 +2101,29 @@ function ScheduleChoice(t0) {
|
|
|
1826
2101
|
variant: "ghost",
|
|
1827
2102
|
color: "neutral",
|
|
1828
2103
|
size: "sm",
|
|
1829
|
-
"aria-label": `
|
|
2104
|
+
"aria-label": `Try again: ${automation.name}`,
|
|
1830
2105
|
onClick: () => change.mutate(change.variables ?? !enabled),
|
|
1831
|
-
children: "
|
|
2106
|
+
children: "Try again"
|
|
1832
2107
|
})]
|
|
1833
2108
|
}) : null;
|
|
1834
|
-
$[
|
|
1835
|
-
$[
|
|
1836
|
-
$[
|
|
1837
|
-
$[
|
|
1838
|
-
} else
|
|
1839
|
-
let
|
|
1840
|
-
if ($[
|
|
1841
|
-
|
|
2109
|
+
$[36] = automation.name;
|
|
2110
|
+
$[37] = change;
|
|
2111
|
+
$[38] = enabled;
|
|
2112
|
+
$[39] = t19;
|
|
2113
|
+
} else t19 = $[39];
|
|
2114
|
+
let t20;
|
|
2115
|
+
if ($[40] !== change.isPending || $[41] !== t18 || $[42] !== t19) {
|
|
2116
|
+
t20 = /* @__PURE__ */ jsxs("li", {
|
|
1842
2117
|
className: "first-run-schedule-choice",
|
|
1843
|
-
"aria-busy":
|
|
1844
|
-
children: [
|
|
2118
|
+
"aria-busy": t2,
|
|
2119
|
+
children: [t18, t19]
|
|
1845
2120
|
});
|
|
1846
|
-
$[
|
|
1847
|
-
$[
|
|
1848
|
-
$[
|
|
1849
|
-
$[
|
|
1850
|
-
} else
|
|
1851
|
-
return
|
|
2121
|
+
$[40] = change.isPending;
|
|
2122
|
+
$[41] = t18;
|
|
2123
|
+
$[42] = t19;
|
|
2124
|
+
$[43] = t20;
|
|
2125
|
+
} else t20 = $[43];
|
|
2126
|
+
return t20;
|
|
1852
2127
|
}
|
|
1853
2128
|
//#endregion
|
|
1854
2129
|
//#region src/components/extension/first-run/WritingStep.tsx
|
|
@@ -1860,10 +2135,10 @@ const STYLES = [
|
|
|
1860
2135
|
];
|
|
1861
2136
|
/** Preview the selected writing style and signing identity together. */
|
|
1862
2137
|
function WritingStep(t0) {
|
|
1863
|
-
const $ = c(
|
|
2138
|
+
const $ = c(79);
|
|
1864
2139
|
const { writing, answer, onStyleChange, onSignChange, onReviewed, profileEmail } = t0;
|
|
1865
2140
|
const { brandName } = useFirstRun();
|
|
1866
|
-
const profileLabel = profileEmail ?? "
|
|
2141
|
+
const profileLabel = profileEmail ?? "Me (Chrome profile)";
|
|
1867
2142
|
let T0;
|
|
1868
2143
|
let t1;
|
|
1869
2144
|
let t2;
|
|
@@ -1873,188 +2148,183 @@ function WritingStep(t0) {
|
|
|
1873
2148
|
let t6;
|
|
1874
2149
|
let t7;
|
|
1875
2150
|
let t8;
|
|
1876
|
-
if ($[0] !== answer || $[1] !== brandName || $[2] !== onSignChange || $[3] !== onStyleChange || $[4] !== profileLabel || $[5] !== writing.samples || $[6] !== writing.
|
|
2151
|
+
if ($[0] !== answer || $[1] !== brandName || $[2] !== onSignChange || $[3] !== onStyleChange || $[4] !== profileLabel || $[5] !== writing.samples || $[6] !== writing.suggested) {
|
|
1877
2152
|
let t9;
|
|
1878
|
-
if ($[
|
|
2153
|
+
if ($[16] !== answer.sign || $[17] !== answer.style) {
|
|
1879
2154
|
t9 = (candidate) => candidate.style === answer.style && candidate.sign === answer.sign;
|
|
1880
|
-
$[
|
|
1881
|
-
$[
|
|
1882
|
-
$[
|
|
1883
|
-
} else t9 = $[
|
|
2155
|
+
$[16] = answer.sign;
|
|
2156
|
+
$[17] = answer.style;
|
|
2157
|
+
$[18] = t9;
|
|
2158
|
+
} else t9 = $[18];
|
|
1884
2159
|
const sample = writing.samples.find(t9);
|
|
1885
|
-
const working = writing.status === "working";
|
|
1886
2160
|
T0 = Step;
|
|
1887
2161
|
t6 = "writing";
|
|
1888
2162
|
t7 = "Writing style";
|
|
1889
|
-
t8 =
|
|
2163
|
+
t8 = writing.suggested ? `${brandName} recommends a tone based on your sent emails.` : "Choose a tone and signature for this Chrome profile.";
|
|
1890
2164
|
t4 = "first-run-writing";
|
|
1891
2165
|
let t10;
|
|
1892
|
-
if ($[
|
|
2166
|
+
if ($[19] === Symbol.for("react.memo_cache_sentinel")) {
|
|
1893
2167
|
t10 = /* @__PURE__ */ jsx("legend", { children: "Tone" });
|
|
1894
|
-
$[
|
|
1895
|
-
} else t10 = $[
|
|
1896
|
-
|
|
1897
|
-
|
|
1898
|
-
|
|
1899
|
-
t12 = /* @__PURE__ */ jsxs("fieldset", {
|
|
2168
|
+
$[19] = t10;
|
|
2169
|
+
} else t10 = $[19];
|
|
2170
|
+
let t11;
|
|
2171
|
+
if ($[20] !== answer || $[21] !== onStyleChange || $[22] !== writing.suggested) {
|
|
2172
|
+
t11 = /* @__PURE__ */ jsxs("fieldset", {
|
|
1900
2173
|
className: "first-run-writing__preference",
|
|
1901
2174
|
children: [t10, /* @__PURE__ */ jsx(WritingChoices, {
|
|
1902
2175
|
answer,
|
|
1903
2176
|
onStyleChange,
|
|
1904
|
-
suggested:
|
|
2177
|
+
suggested: writing.suggested
|
|
1905
2178
|
})]
|
|
1906
2179
|
});
|
|
1907
|
-
$[
|
|
1908
|
-
$[
|
|
2180
|
+
$[20] = answer;
|
|
2181
|
+
$[21] = onStyleChange;
|
|
2182
|
+
$[22] = writing.suggested;
|
|
1909
2183
|
$[23] = t11;
|
|
2184
|
+
} else t11 = $[23];
|
|
2185
|
+
let t12;
|
|
2186
|
+
if ($[24] === Symbol.for("react.memo_cache_sentinel")) {
|
|
2187
|
+
t12 = /* @__PURE__ */ jsx("legend", { children: "Signature" });
|
|
1910
2188
|
$[24] = t12;
|
|
1911
2189
|
} else t12 = $[24];
|
|
1912
2190
|
let t13;
|
|
1913
|
-
if ($[25]
|
|
1914
|
-
t13 =
|
|
1915
|
-
$[25] = t13;
|
|
1916
|
-
} else t13 = $[25];
|
|
1917
|
-
let t14;
|
|
1918
|
-
if ($[26] !== profileLabel) {
|
|
1919
|
-
t14 = {
|
|
2191
|
+
if ($[25] !== profileLabel) {
|
|
2192
|
+
t13 = {
|
|
1920
2193
|
value: "profile",
|
|
1921
2194
|
label: profileLabel
|
|
1922
2195
|
};
|
|
1923
|
-
$[
|
|
1924
|
-
$[
|
|
1925
|
-
} else
|
|
1926
|
-
let
|
|
1927
|
-
if ($[
|
|
1928
|
-
|
|
2196
|
+
$[25] = profileLabel;
|
|
2197
|
+
$[26] = t13;
|
|
2198
|
+
} else t13 = $[26];
|
|
2199
|
+
let t14;
|
|
2200
|
+
if ($[27] !== brandName) {
|
|
2201
|
+
t14 = {
|
|
1929
2202
|
value: "assistant",
|
|
1930
2203
|
label: brandName
|
|
1931
2204
|
};
|
|
1932
|
-
$[
|
|
1933
|
-
$[
|
|
1934
|
-
} else
|
|
1935
|
-
let
|
|
1936
|
-
if ($[
|
|
1937
|
-
|
|
2205
|
+
$[27] = brandName;
|
|
2206
|
+
$[28] = t14;
|
|
2207
|
+
} else t14 = $[28];
|
|
2208
|
+
let t15;
|
|
2209
|
+
if ($[29] !== t13 || $[30] !== t14) {
|
|
2210
|
+
t15 = [t13, t14];
|
|
2211
|
+
$[29] = t13;
|
|
1938
2212
|
$[30] = t14;
|
|
1939
2213
|
$[31] = t15;
|
|
1940
|
-
|
|
1941
|
-
|
|
1942
|
-
|
|
1943
|
-
|
|
1944
|
-
t17 = (value) => {
|
|
2214
|
+
} else t15 = $[31];
|
|
2215
|
+
let t16;
|
|
2216
|
+
if ($[32] !== onSignChange) {
|
|
2217
|
+
t16 = (value) => {
|
|
1945
2218
|
if (value === "profile" || value === "assistant") onSignChange(value);
|
|
1946
2219
|
};
|
|
1947
|
-
$[
|
|
2220
|
+
$[32] = onSignChange;
|
|
2221
|
+
$[33] = t16;
|
|
2222
|
+
} else t16 = $[33];
|
|
2223
|
+
let t17;
|
|
2224
|
+
if ($[34] === Symbol.for("react.memo_cache_sentinel")) {
|
|
2225
|
+
t17 = /* @__PURE__ */ jsx(Select.Value, {});
|
|
1948
2226
|
$[34] = t17;
|
|
1949
2227
|
} else t17 = $[34];
|
|
1950
2228
|
let t18;
|
|
1951
2229
|
if ($[35] === Symbol.for("react.memo_cache_sentinel")) {
|
|
1952
|
-
t18 = /* @__PURE__ */
|
|
2230
|
+
t18 = /* @__PURE__ */ jsxs(Select.Trigger, {
|
|
2231
|
+
className: "first-run-writing__signature-select",
|
|
2232
|
+
"aria-label": "Sign as",
|
|
2233
|
+
children: [t17, /* @__PURE__ */ jsx(Select.Icon, { children: /* @__PURE__ */ jsx(ChevronDownIcon, {}) })]
|
|
2234
|
+
});
|
|
1953
2235
|
$[35] = t18;
|
|
1954
2236
|
} else t18 = $[35];
|
|
1955
2237
|
let t19;
|
|
1956
2238
|
if ($[36] === Symbol.for("react.memo_cache_sentinel")) {
|
|
1957
|
-
t19 = /* @__PURE__ */
|
|
1958
|
-
className: "first-run-writing__signature-select",
|
|
1959
|
-
"aria-label": "Sign as",
|
|
1960
|
-
children: [t18, /* @__PURE__ */ jsx(Select.Icon, { children: /* @__PURE__ */ jsx(ChevronDownIcon, {}) })]
|
|
1961
|
-
});
|
|
2239
|
+
t19 = /* @__PURE__ */ jsx(Select.ItemIndicator, {});
|
|
1962
2240
|
$[36] = t19;
|
|
1963
2241
|
} else t19 = $[36];
|
|
1964
2242
|
let t20;
|
|
1965
|
-
if ($[37]
|
|
1966
|
-
t20 = /* @__PURE__ */ jsx(Select.
|
|
1967
|
-
$[37] =
|
|
1968
|
-
|
|
2243
|
+
if ($[37] !== profileLabel) {
|
|
2244
|
+
t20 = /* @__PURE__ */ jsx(Select.ItemText, { children: profileLabel });
|
|
2245
|
+
$[37] = profileLabel;
|
|
2246
|
+
$[38] = t20;
|
|
2247
|
+
} else t20 = $[38];
|
|
1969
2248
|
let t21;
|
|
1970
|
-
if ($[
|
|
1971
|
-
t21 = /* @__PURE__ */
|
|
1972
|
-
$[38] = profileLabel;
|
|
1973
|
-
$[39] = t21;
|
|
1974
|
-
} else t21 = $[39];
|
|
1975
|
-
let t22;
|
|
1976
|
-
if ($[40] !== profileLabel || $[41] !== t21) {
|
|
1977
|
-
t22 = /* @__PURE__ */ jsxs(Select.Item, {
|
|
2249
|
+
if ($[39] !== profileLabel || $[40] !== t20) {
|
|
2250
|
+
t21 = /* @__PURE__ */ jsxs(Select.Item, {
|
|
1978
2251
|
value: "profile",
|
|
1979
2252
|
"aria-label": profileLabel,
|
|
1980
|
-
children: [
|
|
2253
|
+
children: [t19, t20]
|
|
1981
2254
|
});
|
|
1982
|
-
$[
|
|
2255
|
+
$[39] = profileLabel;
|
|
2256
|
+
$[40] = t20;
|
|
1983
2257
|
$[41] = t21;
|
|
2258
|
+
} else t21 = $[41];
|
|
2259
|
+
let t22;
|
|
2260
|
+
if ($[42] === Symbol.for("react.memo_cache_sentinel")) {
|
|
2261
|
+
t22 = /* @__PURE__ */ jsx(Select.ItemIndicator, {});
|
|
1984
2262
|
$[42] = t22;
|
|
1985
2263
|
} else t22 = $[42];
|
|
1986
2264
|
let t23;
|
|
1987
|
-
if ($[43]
|
|
1988
|
-
t23 = /* @__PURE__ */ jsx(Select.
|
|
1989
|
-
$[43] =
|
|
1990
|
-
|
|
2265
|
+
if ($[43] !== brandName) {
|
|
2266
|
+
t23 = /* @__PURE__ */ jsx(Select.ItemText, { children: brandName });
|
|
2267
|
+
$[43] = brandName;
|
|
2268
|
+
$[44] = t23;
|
|
2269
|
+
} else t23 = $[44];
|
|
1991
2270
|
let t24;
|
|
1992
|
-
if ($[
|
|
1993
|
-
t24 = /* @__PURE__ */
|
|
1994
|
-
$[44] = brandName;
|
|
1995
|
-
$[45] = t24;
|
|
1996
|
-
} else t24 = $[45];
|
|
1997
|
-
let t25;
|
|
1998
|
-
if ($[46] !== brandName || $[47] !== t24) {
|
|
1999
|
-
t25 = /* @__PURE__ */ jsxs(Select.Item, {
|
|
2271
|
+
if ($[45] !== brandName || $[46] !== t23) {
|
|
2272
|
+
t24 = /* @__PURE__ */ jsxs(Select.Item, {
|
|
2000
2273
|
value: "assistant",
|
|
2001
2274
|
"aria-label": brandName,
|
|
2002
|
-
children: [
|
|
2275
|
+
children: [t22, t23]
|
|
2003
2276
|
});
|
|
2004
|
-
$[
|
|
2277
|
+
$[45] = brandName;
|
|
2278
|
+
$[46] = t23;
|
|
2005
2279
|
$[47] = t24;
|
|
2006
|
-
|
|
2007
|
-
|
|
2008
|
-
|
|
2009
|
-
|
|
2010
|
-
t26 = /* @__PURE__ */ jsx(Select.Portal, { children: /* @__PURE__ */ jsx(Select.Positioner, {
|
|
2280
|
+
} else t24 = $[47];
|
|
2281
|
+
let t25;
|
|
2282
|
+
if ($[48] !== t21 || $[49] !== t24) {
|
|
2283
|
+
t25 = /* @__PURE__ */ jsx(Select.Portal, { children: /* @__PURE__ */ jsx(Select.Positioner, {
|
|
2011
2284
|
sideOffset: 4,
|
|
2012
2285
|
alignItemWithTrigger: false,
|
|
2013
2286
|
align: "start",
|
|
2014
|
-
children: /* @__PURE__ */ jsx(Select.Popup, { children: /* @__PURE__ */ jsxs(Select.List, { children: [
|
|
2287
|
+
children: /* @__PURE__ */ jsx(Select.Popup, { children: /* @__PURE__ */ jsxs(Select.List, { children: [t21, t24] }) })
|
|
2015
2288
|
}) });
|
|
2016
|
-
$[
|
|
2289
|
+
$[48] = t21;
|
|
2290
|
+
$[49] = t24;
|
|
2017
2291
|
$[50] = t25;
|
|
2018
|
-
|
|
2019
|
-
|
|
2020
|
-
|
|
2021
|
-
|
|
2022
|
-
t27 = /* @__PURE__ */ jsxs("fieldset", {
|
|
2292
|
+
} else t25 = $[50];
|
|
2293
|
+
let t26;
|
|
2294
|
+
if ($[51] !== answer.sign || $[52] !== t15 || $[53] !== t16 || $[54] !== t25) {
|
|
2295
|
+
t26 = /* @__PURE__ */ jsxs("fieldset", {
|
|
2023
2296
|
className: "first-run-writing__preference first-run-writing__signature",
|
|
2024
|
-
children: [
|
|
2025
|
-
items:
|
|
2297
|
+
children: [t12, /* @__PURE__ */ jsxs(Select.Root, {
|
|
2298
|
+
items: t15,
|
|
2026
2299
|
value: answer.sign,
|
|
2027
|
-
onValueChange:
|
|
2028
|
-
children: [
|
|
2300
|
+
onValueChange: t16,
|
|
2301
|
+
children: [t18, t25]
|
|
2029
2302
|
})]
|
|
2030
2303
|
});
|
|
2031
|
-
$[
|
|
2304
|
+
$[51] = answer.sign;
|
|
2305
|
+
$[52] = t15;
|
|
2032
2306
|
$[53] = t16;
|
|
2033
|
-
$[54] =
|
|
2307
|
+
$[54] = t25;
|
|
2034
2308
|
$[55] = t26;
|
|
2035
|
-
|
|
2036
|
-
|
|
2037
|
-
if ($[57] !== t12 || $[58] !== t27) {
|
|
2309
|
+
} else t26 = $[55];
|
|
2310
|
+
if ($[56] !== t11 || $[57] !== t26) {
|
|
2038
2311
|
t5 = /* @__PURE__ */ jsxs("div", {
|
|
2039
2312
|
className: "first-run-writing__preferences",
|
|
2040
|
-
children: [
|
|
2313
|
+
children: [t11, t26]
|
|
2041
2314
|
});
|
|
2042
|
-
$[
|
|
2043
|
-
$[
|
|
2044
|
-
$[
|
|
2045
|
-
} else t5 = $[
|
|
2315
|
+
$[56] = t11;
|
|
2316
|
+
$[57] = t26;
|
|
2317
|
+
$[58] = t5;
|
|
2318
|
+
} else t5 = $[58];
|
|
2046
2319
|
t1 = "first-run-figure first-run-writing__preview";
|
|
2047
|
-
if ($[
|
|
2320
|
+
if ($[59] === Symbol.for("react.memo_cache_sentinel")) {
|
|
2048
2321
|
t2 = /* @__PURE__ */ jsx("h2", {
|
|
2049
2322
|
className: "sigvelo-visually-hidden",
|
|
2050
2323
|
children: "Email preview"
|
|
2051
2324
|
});
|
|
2052
|
-
$[
|
|
2053
|
-
} else t2 = $[
|
|
2054
|
-
t3 =
|
|
2055
|
-
className: "first-run-live",
|
|
2056
|
-
children: "Writing your email"
|
|
2057
|
-
}) : sample ? /* @__PURE__ */ jsx(WorkspaceEntityCard, {
|
|
2325
|
+
$[59] = t2;
|
|
2326
|
+
} else t2 = $[59];
|
|
2327
|
+
t3 = sample ? /* @__PURE__ */ jsx(WorkspaceEntityCard, {
|
|
2058
2328
|
className: "first-run-writing__email",
|
|
2059
2329
|
name: "Example email",
|
|
2060
2330
|
icon: /* @__PURE__ */ jsx(AppIcon.Root, {
|
|
@@ -2085,119 +2355,102 @@ function WritingStep(t0) {
|
|
|
2085
2355
|
$[3] = onStyleChange;
|
|
2086
2356
|
$[4] = profileLabel;
|
|
2087
2357
|
$[5] = writing.samples;
|
|
2088
|
-
$[6] = writing.
|
|
2089
|
-
$[7] =
|
|
2090
|
-
$[8] =
|
|
2091
|
-
$[9] =
|
|
2092
|
-
$[10] =
|
|
2093
|
-
$[11] =
|
|
2094
|
-
$[12] =
|
|
2095
|
-
$[13] =
|
|
2096
|
-
$[14] =
|
|
2097
|
-
$[15] =
|
|
2098
|
-
$[16] = t8;
|
|
2358
|
+
$[6] = writing.suggested;
|
|
2359
|
+
$[7] = T0;
|
|
2360
|
+
$[8] = t1;
|
|
2361
|
+
$[9] = t2;
|
|
2362
|
+
$[10] = t3;
|
|
2363
|
+
$[11] = t4;
|
|
2364
|
+
$[12] = t5;
|
|
2365
|
+
$[13] = t6;
|
|
2366
|
+
$[14] = t7;
|
|
2367
|
+
$[15] = t8;
|
|
2099
2368
|
} else {
|
|
2100
|
-
T0 = $[
|
|
2101
|
-
t1 = $[
|
|
2102
|
-
t2 = $[
|
|
2103
|
-
t3 = $[
|
|
2104
|
-
t4 = $[
|
|
2105
|
-
t5 = $[
|
|
2106
|
-
t6 = $[
|
|
2107
|
-
t7 = $[
|
|
2108
|
-
t8 = $[
|
|
2369
|
+
T0 = $[7];
|
|
2370
|
+
t1 = $[8];
|
|
2371
|
+
t2 = $[9];
|
|
2372
|
+
t3 = $[10];
|
|
2373
|
+
t4 = $[11];
|
|
2374
|
+
t5 = $[12];
|
|
2375
|
+
t6 = $[13];
|
|
2376
|
+
t7 = $[14];
|
|
2377
|
+
t8 = $[15];
|
|
2109
2378
|
}
|
|
2110
2379
|
let t9;
|
|
2111
|
-
if ($[
|
|
2380
|
+
if ($[60] !== t1 || $[61] !== t2 || $[62] !== t3) {
|
|
2112
2381
|
t9 = /* @__PURE__ */ jsxs("figure", {
|
|
2113
2382
|
className: t1,
|
|
2114
2383
|
children: [t2, t3]
|
|
2115
2384
|
});
|
|
2116
|
-
$[
|
|
2117
|
-
$[
|
|
2118
|
-
$[
|
|
2119
|
-
$[
|
|
2120
|
-
} else t9 = $[
|
|
2385
|
+
$[60] = t1;
|
|
2386
|
+
$[61] = t2;
|
|
2387
|
+
$[62] = t3;
|
|
2388
|
+
$[63] = t9;
|
|
2389
|
+
} else t9 = $[63];
|
|
2121
2390
|
let t10;
|
|
2122
|
-
if ($[
|
|
2391
|
+
if ($[64] !== t4 || $[65] !== t5 || $[66] !== t9) {
|
|
2123
2392
|
t10 = /* @__PURE__ */ jsxs("section", {
|
|
2124
2393
|
className: t4,
|
|
2125
2394
|
children: [t5, t9]
|
|
2126
2395
|
});
|
|
2127
|
-
$[
|
|
2128
|
-
$[
|
|
2129
|
-
$[
|
|
2130
|
-
$[
|
|
2131
|
-
} else t10 = $[
|
|
2396
|
+
$[64] = t4;
|
|
2397
|
+
$[65] = t5;
|
|
2398
|
+
$[66] = t9;
|
|
2399
|
+
$[67] = t10;
|
|
2400
|
+
} else t10 = $[67];
|
|
2132
2401
|
let t11;
|
|
2133
|
-
if ($[69] !==
|
|
2134
|
-
t11 =
|
|
2135
|
-
|
|
2136
|
-
|
|
2402
|
+
if ($[68] !== answer || $[69] !== onReviewed || $[70] !== writing) {
|
|
2403
|
+
t11 = /* @__PURE__ */ jsx(Actions, { children: /* @__PURE__ */ jsx(Next, { onSave: () => {
|
|
2404
|
+
writing.onSave(answer);
|
|
2405
|
+
onReviewed();
|
|
2406
|
+
} }) });
|
|
2407
|
+
$[68] = answer;
|
|
2408
|
+
$[69] = onReviewed;
|
|
2409
|
+
$[70] = writing;
|
|
2137
2410
|
$[71] = t11;
|
|
2138
2411
|
} else t11 = $[71];
|
|
2139
2412
|
let t12;
|
|
2140
|
-
if ($[72] !==
|
|
2141
|
-
t12 = /* @__PURE__ */ jsx(
|
|
2142
|
-
writing.onSave(answer);
|
|
2143
|
-
onReviewed();
|
|
2144
|
-
} });
|
|
2145
|
-
$[72] = answer;
|
|
2146
|
-
$[73] = onReviewed;
|
|
2147
|
-
$[74] = writing;
|
|
2148
|
-
$[75] = t12;
|
|
2149
|
-
} else t12 = $[75];
|
|
2150
|
-
let t13;
|
|
2151
|
-
if ($[76] !== t11 || $[77] !== t12) {
|
|
2152
|
-
t13 = /* @__PURE__ */ jsxs(Actions, { children: [t11, t12] });
|
|
2153
|
-
$[76] = t11;
|
|
2154
|
-
$[77] = t12;
|
|
2155
|
-
$[78] = t13;
|
|
2156
|
-
} else t13 = $[78];
|
|
2157
|
-
let t14;
|
|
2158
|
-
if ($[79] !== T0 || $[80] !== t10 || $[81] !== t13 || $[82] !== t6 || $[83] !== t7 || $[84] !== t8) {
|
|
2159
|
-
t14 = /* @__PURE__ */ jsx(T0, {
|
|
2413
|
+
if ($[72] !== T0 || $[73] !== t10 || $[74] !== t11 || $[75] !== t6 || $[76] !== t7 || $[77] !== t8) {
|
|
2414
|
+
t12 = /* @__PURE__ */ jsx(T0, {
|
|
2160
2415
|
layout: t6,
|
|
2161
2416
|
title: t7,
|
|
2162
2417
|
lead: t8,
|
|
2163
2418
|
body: t10,
|
|
2164
|
-
actions:
|
|
2165
|
-
});
|
|
2166
|
-
$[
|
|
2167
|
-
$[
|
|
2168
|
-
$[
|
|
2169
|
-
$[
|
|
2170
|
-
$[
|
|
2171
|
-
$[
|
|
2172
|
-
$[
|
|
2173
|
-
} else
|
|
2174
|
-
return
|
|
2419
|
+
actions: t11
|
|
2420
|
+
});
|
|
2421
|
+
$[72] = T0;
|
|
2422
|
+
$[73] = t10;
|
|
2423
|
+
$[74] = t11;
|
|
2424
|
+
$[75] = t6;
|
|
2425
|
+
$[76] = t7;
|
|
2426
|
+
$[77] = t8;
|
|
2427
|
+
$[78] = t12;
|
|
2428
|
+
} else t12 = $[78];
|
|
2429
|
+
return t12;
|
|
2175
2430
|
}
|
|
2176
2431
|
function _temp$3(field) {
|
|
2177
2432
|
return /* @__PURE__ */ jsxs(DescriptionList.Item, { children: [/* @__PURE__ */ jsx(DescriptionList.Term, { children: field.label }), /* @__PURE__ */ jsx(DescriptionList.Details, { children: field.value })] }, field.name);
|
|
2178
2433
|
}
|
|
2179
2434
|
/** The writing styles available to choose from. */
|
|
2180
2435
|
function WritingChoices(t0) {
|
|
2181
|
-
const $ = c(
|
|
2436
|
+
const $ = c(6);
|
|
2182
2437
|
const { answer, onStyleChange, suggested } = t0;
|
|
2183
|
-
const { brandName } = useFirstRun();
|
|
2184
2438
|
const t1 = answer.style;
|
|
2185
2439
|
let t2;
|
|
2186
|
-
if ($[0] !==
|
|
2440
|
+
if ($[0] !== suggested) {
|
|
2187
2441
|
t2 = STYLES.map((t3) => {
|
|
2188
2442
|
const [style, label] = t3;
|
|
2189
2443
|
return /* @__PURE__ */ jsx(Choice, {
|
|
2190
2444
|
value: style,
|
|
2191
|
-
note: style === suggested ?
|
|
2445
|
+
note: style === suggested ? "Matches your sent email" : void 0,
|
|
2192
2446
|
children: label
|
|
2193
2447
|
}, style);
|
|
2194
2448
|
});
|
|
2195
|
-
$[0] =
|
|
2196
|
-
$[1] =
|
|
2197
|
-
|
|
2198
|
-
} else t2 = $[2];
|
|
2449
|
+
$[0] = suggested;
|
|
2450
|
+
$[1] = t2;
|
|
2451
|
+
} else t2 = $[1];
|
|
2199
2452
|
let t3;
|
|
2200
|
-
if ($[
|
|
2453
|
+
if ($[2] !== answer.style || $[3] !== onStyleChange || $[4] !== t2) {
|
|
2201
2454
|
t3 = /* @__PURE__ */ jsx(RadioGroup.Root, {
|
|
2202
2455
|
className: "first-run-choices",
|
|
2203
2456
|
orientation: "vertical",
|
|
@@ -2206,11 +2459,11 @@ function WritingChoices(t0) {
|
|
|
2206
2459
|
onValueChange: onStyleChange,
|
|
2207
2460
|
children: t2
|
|
2208
2461
|
});
|
|
2209
|
-
$[
|
|
2210
|
-
$[
|
|
2211
|
-
$[
|
|
2212
|
-
$[
|
|
2213
|
-
} else t3 = $[
|
|
2462
|
+
$[2] = answer.style;
|
|
2463
|
+
$[3] = onStyleChange;
|
|
2464
|
+
$[4] = t2;
|
|
2465
|
+
$[5] = t3;
|
|
2466
|
+
} else t3 = $[5];
|
|
2214
2467
|
return t3;
|
|
2215
2468
|
}
|
|
2216
2469
|
function Choice(t0) {
|
|
@@ -2557,7 +2810,7 @@ function WelcomeStep() {
|
|
|
2557
2810
|
} else t2 = $[5];
|
|
2558
2811
|
let t3;
|
|
2559
2812
|
if ($[6] === Symbol.for("react.memo_cache_sentinel")) {
|
|
2560
|
-
t3 = /* @__PURE__ */ jsx("p", { children: "
|
|
2813
|
+
t3 = /* @__PURE__ */ jsx("p", { children: "Set up your new employee." });
|
|
2561
2814
|
$[6] = t3;
|
|
2562
2815
|
} else t3 = $[6];
|
|
2563
2816
|
let t4;
|
|
@@ -2619,16 +2872,16 @@ function SignInStep(t0) {
|
|
|
2619
2872
|
const { status, onSignIn, modelConnection } = t0;
|
|
2620
2873
|
const { brandName } = useFirstRun();
|
|
2621
2874
|
const done = status === "done";
|
|
2875
|
+
const modelInUse = modelConnection.kind === "managed" || modelConnection.connected;
|
|
2622
2876
|
useAutoAdvance(done);
|
|
2623
2877
|
const t1 = `${brandName} uses it for everything, starting with the rest of setup.`;
|
|
2624
2878
|
let t2;
|
|
2625
|
-
if ($[0] !== modelConnection.
|
|
2626
|
-
t2 = /* @__PURE__ */ jsx(ChatGptProviderChoice, {
|
|
2879
|
+
if ($[0] !== modelConnection.kind || $[1] !== onSignIn || $[2] !== status) {
|
|
2880
|
+
t2 = modelConnection.kind === "managed" ? null : /* @__PURE__ */ jsx(ChatGptProviderChoice, {
|
|
2627
2881
|
status,
|
|
2628
|
-
onSignIn
|
|
2629
|
-
modelConnected: modelConnection.connected
|
|
2882
|
+
onSignIn
|
|
2630
2883
|
});
|
|
2631
|
-
$[0] = modelConnection.
|
|
2884
|
+
$[0] = modelConnection.kind;
|
|
2632
2885
|
$[1] = onSignIn;
|
|
2633
2886
|
$[2] = status;
|
|
2634
2887
|
$[3] = t2;
|
|
@@ -2654,7 +2907,7 @@ function SignInStep(t0) {
|
|
|
2654
2907
|
t5 = status === "failed" ? /* @__PURE__ */ jsx("p", {
|
|
2655
2908
|
role: "alert",
|
|
2656
2909
|
className: "chatgpt-sign-in__error",
|
|
2657
|
-
children: "
|
|
2910
|
+
children: "Couldn’t sign in to ChatGPT. Try again."
|
|
2658
2911
|
}) : null;
|
|
2659
2912
|
$[9] = status;
|
|
2660
2913
|
$[10] = t5;
|
|
@@ -2667,10 +2920,10 @@ function SignInStep(t0) {
|
|
|
2667
2920
|
$[13] = t6;
|
|
2668
2921
|
} else t6 = $[13];
|
|
2669
2922
|
let t7;
|
|
2670
|
-
if ($[14] !== done || $[15] !==
|
|
2671
|
-
t7 = done ||
|
|
2923
|
+
if ($[14] !== done || $[15] !== modelInUse) {
|
|
2924
|
+
t7 = done || modelInUse ? /* @__PURE__ */ jsx(Next, {}) : null;
|
|
2672
2925
|
$[14] = done;
|
|
2673
|
-
$[15] =
|
|
2926
|
+
$[15] = modelInUse;
|
|
2674
2927
|
$[16] = t7;
|
|
2675
2928
|
} else t7 = $[16];
|
|
2676
2929
|
let t8;
|
|
@@ -2698,32 +2951,20 @@ function SignInStep(t0) {
|
|
|
2698
2951
|
return t10;
|
|
2699
2952
|
}
|
|
2700
2953
|
function ChatGptProviderChoice(t0) {
|
|
2701
|
-
const $ = c(
|
|
2702
|
-
const { status, onSignIn
|
|
2703
|
-
const { brandName,
|
|
2954
|
+
const $ = c(23);
|
|
2955
|
+
const { status, onSignIn } = t0;
|
|
2956
|
+
const { brandName, next } = useFirstRun();
|
|
2704
2957
|
const descriptionId = React.useId();
|
|
2705
2958
|
const done = status === "done";
|
|
2706
|
-
const
|
|
2707
|
-
const t1 =
|
|
2708
|
-
const t2 =
|
|
2709
|
-
|
|
2710
|
-
|
|
2711
|
-
|
|
2712
|
-
t4 = () => {
|
|
2713
|
-
onSignIn();
|
|
2714
|
-
if (done) go("chrome-profile");
|
|
2715
|
-
};
|
|
2716
|
-
$[0] = done;
|
|
2717
|
-
$[1] = go;
|
|
2718
|
-
$[2] = onSignIn;
|
|
2719
|
-
$[3] = t4;
|
|
2720
|
-
} else t4 = $[3];
|
|
2721
|
-
let t5;
|
|
2722
|
-
if ($[4] !== status) {
|
|
2723
|
-
t5 = /* @__PURE__ */ jsx("span", {
|
|
2959
|
+
const waiting = status === "waiting";
|
|
2960
|
+
const t1 = waiting ? "Waiting for ChatGPT" : void 0;
|
|
2961
|
+
const t2 = done ? next : onSignIn;
|
|
2962
|
+
let t3;
|
|
2963
|
+
if ($[0] !== waiting) {
|
|
2964
|
+
t3 = /* @__PURE__ */ jsx("span", {
|
|
2724
2965
|
className: "first-run-provider-logo",
|
|
2725
2966
|
"aria-hidden": "true",
|
|
2726
|
-
children:
|
|
2967
|
+
children: waiting ? /* @__PURE__ */ jsx(SpinnerIcon, {
|
|
2727
2968
|
className: "sigvelo-icon--spinner",
|
|
2728
2969
|
size: 80,
|
|
2729
2970
|
strokeWidth: 1.75
|
|
@@ -2733,64 +2974,67 @@ function ChatGptProviderChoice(t0) {
|
|
|
2733
2974
|
height: 80
|
|
2734
2975
|
})
|
|
2735
2976
|
});
|
|
2736
|
-
$[
|
|
2737
|
-
$[
|
|
2738
|
-
} else
|
|
2977
|
+
$[0] = waiting;
|
|
2978
|
+
$[1] = t3;
|
|
2979
|
+
} else t3 = $[1];
|
|
2980
|
+
const t4 = waiting ? "Waiting for ChatGPT…" : done ? "Continue with ChatGPT" : "Sign in with ChatGPT";
|
|
2981
|
+
let t5;
|
|
2982
|
+
if ($[2] !== done || $[3] !== waiting) {
|
|
2983
|
+
t5 = !done && !waiting ? /* @__PURE__ */ jsx(ArrowUpRightIcon, { "aria-hidden": "true" }) : null;
|
|
2984
|
+
$[2] = done;
|
|
2985
|
+
$[3] = waiting;
|
|
2986
|
+
$[4] = t5;
|
|
2987
|
+
} else t5 = $[4];
|
|
2739
2988
|
let t6;
|
|
2740
|
-
if ($[
|
|
2741
|
-
t6 =
|
|
2742
|
-
$[6] = done;
|
|
2743
|
-
$[7] = status;
|
|
2744
|
-
$[8] = t6;
|
|
2745
|
-
} else t6 = $[8];
|
|
2746
|
-
let t7;
|
|
2747
|
-
if ($[9] !== label || $[10] !== t6) {
|
|
2748
|
-
t7 = /* @__PURE__ */ jsxs("span", {
|
|
2989
|
+
if ($[5] !== t4 || $[6] !== t5) {
|
|
2990
|
+
t6 = /* @__PURE__ */ jsxs("span", {
|
|
2749
2991
|
className: "first-run-provider-label first-run-provider-label--external",
|
|
2750
|
-
children: [
|
|
2992
|
+
children: [t4, t5]
|
|
2751
2993
|
});
|
|
2752
|
-
$[
|
|
2753
|
-
$[
|
|
2754
|
-
$[
|
|
2755
|
-
} else
|
|
2756
|
-
let
|
|
2757
|
-
if ($[
|
|
2758
|
-
|
|
2994
|
+
$[5] = t4;
|
|
2995
|
+
$[6] = t5;
|
|
2996
|
+
$[7] = t6;
|
|
2997
|
+
} else t6 = $[7];
|
|
2998
|
+
let t7;
|
|
2999
|
+
if ($[8] !== descriptionId || $[9] !== t1 || $[10] !== t2 || $[11] !== t3 || $[12] !== t6 || $[13] !== waiting) {
|
|
3000
|
+
t7 = /* @__PURE__ */ jsxs(Button, {
|
|
2759
3001
|
className: "first-run-provider-action",
|
|
2760
3002
|
variant: "ghost",
|
|
2761
3003
|
color: "neutral",
|
|
2762
|
-
disabled:
|
|
2763
|
-
|
|
3004
|
+
disabled: waiting,
|
|
3005
|
+
focusableWhenDisabled: waiting,
|
|
3006
|
+
"aria-busy": waiting,
|
|
2764
3007
|
"aria-describedby": descriptionId,
|
|
2765
|
-
"aria-label":
|
|
2766
|
-
onClick:
|
|
2767
|
-
children: [
|
|
3008
|
+
"aria-label": t1,
|
|
3009
|
+
onClick: t2,
|
|
3010
|
+
children: [t3, t6]
|
|
2768
3011
|
});
|
|
2769
|
-
$[
|
|
2770
|
-
$[
|
|
2771
|
-
$[
|
|
2772
|
-
$[
|
|
2773
|
-
$[
|
|
2774
|
-
$[
|
|
2775
|
-
$[
|
|
2776
|
-
|
|
2777
|
-
|
|
3012
|
+
$[8] = descriptionId;
|
|
3013
|
+
$[9] = t1;
|
|
3014
|
+
$[10] = t2;
|
|
3015
|
+
$[11] = t3;
|
|
3016
|
+
$[12] = t6;
|
|
3017
|
+
$[13] = waiting;
|
|
3018
|
+
$[14] = t7;
|
|
3019
|
+
} else t7 = $[14];
|
|
3020
|
+
const t8 = done ? "Signed in. " : null;
|
|
2778
3021
|
let t9;
|
|
2779
|
-
if ($[
|
|
3022
|
+
if ($[15] === Symbol.for("react.memo_cache_sentinel")) {
|
|
2780
3023
|
t9 = /* @__PURE__ */ jsx("a", {
|
|
2781
3024
|
href: "https://help.openai.com/en/articles/7730893-data-controls-faq",
|
|
2782
3025
|
target: "_blank",
|
|
2783
3026
|
rel: "noopener noreferrer",
|
|
2784
3027
|
children: "data controls"
|
|
2785
3028
|
});
|
|
2786
|
-
$[
|
|
2787
|
-
} else t9 = $[
|
|
3029
|
+
$[15] = t9;
|
|
3030
|
+
} else t9 = $[15];
|
|
2788
3031
|
let t10;
|
|
2789
|
-
if ($[
|
|
3032
|
+
if ($[16] !== brandName || $[17] !== descriptionId || $[18] !== t8) {
|
|
2790
3033
|
t10 = /* @__PURE__ */ jsxs("p", {
|
|
2791
3034
|
id: descriptionId,
|
|
2792
3035
|
className: "first-run-provider-subtitle",
|
|
2793
3036
|
children: [
|
|
3037
|
+
t8,
|
|
2794
3038
|
brandName,
|
|
2795
3039
|
" never sees your password. Control how OpenAI uses your conversations for model training in ChatGPT’s",
|
|
2796
3040
|
" ",
|
|
@@ -2798,37 +3042,41 @@ function ChatGptProviderChoice(t0) {
|
|
|
2798
3042
|
"."
|
|
2799
3043
|
]
|
|
2800
3044
|
});
|
|
2801
|
-
$[
|
|
2802
|
-
$[
|
|
2803
|
-
$[
|
|
2804
|
-
|
|
3045
|
+
$[16] = brandName;
|
|
3046
|
+
$[17] = descriptionId;
|
|
3047
|
+
$[18] = t8;
|
|
3048
|
+
$[19] = t10;
|
|
3049
|
+
} else t10 = $[19];
|
|
2805
3050
|
let t11;
|
|
2806
|
-
if ($[
|
|
3051
|
+
if ($[20] !== t10 || $[21] !== t7) {
|
|
2807
3052
|
t11 = /* @__PURE__ */ jsxs(Card, {
|
|
2808
3053
|
className: "first-run-provider-choice first-run-provider-choice--linked",
|
|
2809
|
-
children: [
|
|
3054
|
+
children: [t7, t10]
|
|
2810
3055
|
});
|
|
2811
|
-
$[
|
|
2812
|
-
$[
|
|
2813
|
-
$[
|
|
2814
|
-
} else t11 = $[
|
|
3056
|
+
$[20] = t10;
|
|
3057
|
+
$[21] = t7;
|
|
3058
|
+
$[22] = t11;
|
|
3059
|
+
} else t11 = $[22];
|
|
2815
3060
|
return t11;
|
|
2816
3061
|
}
|
|
2817
3062
|
function OtherProviderChoice(t0) {
|
|
2818
|
-
const $ = c(
|
|
2819
|
-
const { connection
|
|
3063
|
+
const $ = c(23);
|
|
3064
|
+
const { connection } = t0;
|
|
2820
3065
|
const { go } = useFirstRun();
|
|
2821
3066
|
const descriptionId = React.useId();
|
|
2822
|
-
const
|
|
2823
|
-
|
|
3067
|
+
const managed = connection.kind === "managed";
|
|
3068
|
+
const model = managed ? connection.model : connection.connected ? connection.value.model : "";
|
|
3069
|
+
const t1 = managed ? void 0 : model ? `Configure ${model}` : "Use a different provider";
|
|
3070
|
+
const t2 = model ? true : void 0;
|
|
3071
|
+
let t3;
|
|
2824
3072
|
if ($[0] !== go) {
|
|
2825
|
-
|
|
3073
|
+
t3 = () => go("model-connection");
|
|
2826
3074
|
$[0] = go;
|
|
2827
|
-
$[1] =
|
|
2828
|
-
} else
|
|
2829
|
-
let
|
|
3075
|
+
$[1] = t3;
|
|
3076
|
+
} else t3 = $[1];
|
|
3077
|
+
let t4;
|
|
2830
3078
|
if ($[2] === Symbol.for("react.memo_cache_sentinel")) {
|
|
2831
|
-
|
|
3079
|
+
t4 = /* @__PURE__ */ jsx("span", {
|
|
2832
3080
|
className: "first-run-provider-logo",
|
|
2833
3081
|
"aria-hidden": "true",
|
|
2834
3082
|
children: /* @__PURE__ */ jsx(LaptopIcon, {
|
|
@@ -2836,38 +3084,47 @@ function OtherProviderChoice(t0) {
|
|
|
2836
3084
|
strokeWidth: 1.5
|
|
2837
3085
|
})
|
|
2838
3086
|
});
|
|
2839
|
-
$[2] =
|
|
2840
|
-
} else
|
|
2841
|
-
const
|
|
2842
|
-
let t5;
|
|
2843
|
-
if ($[3] !== t4) {
|
|
2844
|
-
t5 = /* @__PURE__ */ jsx("span", {
|
|
2845
|
-
className: "first-run-provider-label",
|
|
2846
|
-
children: t4
|
|
2847
|
-
});
|
|
2848
|
-
$[3] = t4;
|
|
2849
|
-
$[4] = t5;
|
|
2850
|
-
} else t5 = $[4];
|
|
3087
|
+
$[2] = t4;
|
|
3088
|
+
} else t4 = $[2];
|
|
3089
|
+
const t5 = model || "Use a different provider";
|
|
2851
3090
|
let t6;
|
|
2852
|
-
if ($[
|
|
2853
|
-
t6 = /* @__PURE__ */
|
|
3091
|
+
if ($[3] !== model) {
|
|
3092
|
+
t6 = model ? /* @__PURE__ */ jsx(CheckIcon, { "aria-hidden": "true" }) : null;
|
|
3093
|
+
$[3] = model;
|
|
3094
|
+
$[4] = t6;
|
|
3095
|
+
} else t6 = $[4];
|
|
3096
|
+
let t7;
|
|
3097
|
+
if ($[5] !== t5 || $[6] !== t6) {
|
|
3098
|
+
t7 = /* @__PURE__ */ jsxs("span", {
|
|
3099
|
+
className: "first-run-provider-label first-run-provider-label--external",
|
|
3100
|
+
children: [t5, t6]
|
|
3101
|
+
});
|
|
3102
|
+
$[5] = t5;
|
|
3103
|
+
$[6] = t6;
|
|
3104
|
+
$[7] = t7;
|
|
3105
|
+
} else t7 = $[7];
|
|
3106
|
+
let t8;
|
|
3107
|
+
if ($[8] !== descriptionId || $[9] !== t1 || $[10] !== t2 || $[11] !== t3 || $[12] !== t7) {
|
|
3108
|
+
t8 = /* @__PURE__ */ jsxs(Button, {
|
|
2854
3109
|
className: "first-run-provider-action",
|
|
2855
3110
|
variant: "ghost",
|
|
2856
3111
|
color: "neutral",
|
|
2857
3112
|
"aria-describedby": descriptionId,
|
|
2858
3113
|
"aria-label": t1,
|
|
2859
|
-
|
|
2860
|
-
|
|
3114
|
+
"aria-current": t2,
|
|
3115
|
+
onClick: t3,
|
|
3116
|
+
children: [t4, t7]
|
|
2861
3117
|
});
|
|
2862
|
-
$[
|
|
2863
|
-
$[
|
|
2864
|
-
$[
|
|
2865
|
-
$[
|
|
2866
|
-
$[
|
|
2867
|
-
|
|
2868
|
-
|
|
2869
|
-
|
|
2870
|
-
|
|
3118
|
+
$[8] = descriptionId;
|
|
3119
|
+
$[9] = t1;
|
|
3120
|
+
$[10] = t2;
|
|
3121
|
+
$[11] = t3;
|
|
3122
|
+
$[12] = t7;
|
|
3123
|
+
$[13] = t8;
|
|
3124
|
+
} else t8 = $[13];
|
|
3125
|
+
let t9;
|
|
3126
|
+
if ($[14] !== managed || $[15] !== model) {
|
|
3127
|
+
t9 = managed ? "Your organization manages this model." : model ? "Your model is connected." : /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
2871
3128
|
"Choose another AI provider, or keep processing on this computer with",
|
|
2872
3129
|
" ",
|
|
2873
3130
|
/* @__PURE__ */ jsx("a", {
|
|
@@ -2878,35 +3135,36 @@ function OtherProviderChoice(t0) {
|
|
|
2878
3135
|
}),
|
|
2879
3136
|
"."
|
|
2880
3137
|
] });
|
|
2881
|
-
$[
|
|
2882
|
-
$[
|
|
2883
|
-
|
|
2884
|
-
|
|
2885
|
-
|
|
2886
|
-
|
|
3138
|
+
$[14] = managed;
|
|
3139
|
+
$[15] = model;
|
|
3140
|
+
$[16] = t9;
|
|
3141
|
+
} else t9 = $[16];
|
|
3142
|
+
let t10;
|
|
3143
|
+
if ($[17] !== descriptionId || $[18] !== t9) {
|
|
3144
|
+
t10 = /* @__PURE__ */ jsx("p", {
|
|
2887
3145
|
id: descriptionId,
|
|
2888
3146
|
className: "first-run-provider-subtitle",
|
|
2889
|
-
children:
|
|
3147
|
+
children: t9
|
|
2890
3148
|
});
|
|
2891
|
-
$[
|
|
2892
|
-
$[
|
|
2893
|
-
$[
|
|
2894
|
-
} else
|
|
2895
|
-
let
|
|
2896
|
-
if ($[
|
|
2897
|
-
|
|
3149
|
+
$[17] = descriptionId;
|
|
3150
|
+
$[18] = t9;
|
|
3151
|
+
$[19] = t10;
|
|
3152
|
+
} else t10 = $[19];
|
|
3153
|
+
let t11;
|
|
3154
|
+
if ($[20] !== t10 || $[21] !== t8) {
|
|
3155
|
+
t11 = /* @__PURE__ */ jsxs(Card, {
|
|
2898
3156
|
className: "first-run-provider-choice first-run-provider-choice--linked",
|
|
2899
|
-
children: [
|
|
3157
|
+
children: [t8, t10]
|
|
2900
3158
|
});
|
|
2901
|
-
$[
|
|
2902
|
-
$[
|
|
2903
|
-
$[
|
|
2904
|
-
} else
|
|
2905
|
-
return
|
|
3159
|
+
$[20] = t10;
|
|
3160
|
+
$[21] = t8;
|
|
3161
|
+
$[22] = t11;
|
|
3162
|
+
} else t11 = $[22];
|
|
3163
|
+
return t11;
|
|
2906
3164
|
}
|
|
2907
3165
|
function ChromeProfileStep(t0) {
|
|
2908
|
-
const $ = c(
|
|
2909
|
-
const { email
|
|
3166
|
+
const $ = c(31);
|
|
3167
|
+
const { email } = t0;
|
|
2910
3168
|
const { brandName } = useFirstRun();
|
|
2911
3169
|
let t1;
|
|
2912
3170
|
if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
|
|
@@ -2928,34 +3186,32 @@ function ChromeProfileStep(t0) {
|
|
|
2928
3186
|
$[1] = brandName;
|
|
2929
3187
|
$[2] = t2;
|
|
2930
3188
|
} else t2 = $[2];
|
|
2931
|
-
|
|
2932
|
-
let t4;
|
|
3189
|
+
let t3;
|
|
2933
3190
|
if ($[3] === Symbol.for("react.memo_cache_sentinel")) {
|
|
2934
|
-
|
|
2935
|
-
$[3] =
|
|
2936
|
-
} else
|
|
2937
|
-
|
|
2938
|
-
|
|
2939
|
-
|
|
2940
|
-
t6 = /* @__PURE__ */ jsx(Avatar.Root, {
|
|
3191
|
+
t3 = /* @__PURE__ */ jsx("section", {});
|
|
3192
|
+
$[3] = t3;
|
|
3193
|
+
} else t3 = $[3];
|
|
3194
|
+
let t4;
|
|
3195
|
+
if ($[4] !== email) {
|
|
3196
|
+
t4 = /* @__PURE__ */ jsx(Avatar.Root, {
|
|
2941
3197
|
size: "lg",
|
|
2942
3198
|
shape: "circle",
|
|
2943
3199
|
"aria-hidden": "true",
|
|
2944
|
-
children: /* @__PURE__ */ jsx(ProfileInitial, { email
|
|
3200
|
+
children: /* @__PURE__ */ jsx(ProfileInitial, { email })
|
|
2945
3201
|
});
|
|
2946
|
-
$[4] =
|
|
2947
|
-
$[5] =
|
|
2948
|
-
} else
|
|
2949
|
-
const
|
|
2950
|
-
let
|
|
2951
|
-
if ($[6] !==
|
|
2952
|
-
|
|
2953
|
-
$[6] =
|
|
2954
|
-
$[7] =
|
|
2955
|
-
} else
|
|
2956
|
-
let
|
|
2957
|
-
if ($[8] !== brandName || $[9] !==
|
|
2958
|
-
|
|
3202
|
+
$[4] = email;
|
|
3203
|
+
$[5] = t4;
|
|
3204
|
+
} else t4 = $[5];
|
|
3205
|
+
const t5 = email ?? "Not signed in";
|
|
3206
|
+
let t6;
|
|
3207
|
+
if ($[6] !== t5) {
|
|
3208
|
+
t6 = /* @__PURE__ */ jsx("strong", { children: t5 });
|
|
3209
|
+
$[6] = t5;
|
|
3210
|
+
$[7] = t6;
|
|
3211
|
+
} else t6 = $[7];
|
|
3212
|
+
let t7;
|
|
3213
|
+
if ($[8] !== brandName || $[9] !== email) {
|
|
3214
|
+
t7 = email ? `${brandName} will use this signed-in Chrome profile.` : /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
2959
3215
|
/* @__PURE__ */ jsx("a", {
|
|
2960
3216
|
href: "https://support.google.com/chrome/answer/185277",
|
|
2961
3217
|
target: "_blank",
|
|
@@ -2974,116 +3230,115 @@ function ChromeProfileStep(t0) {
|
|
|
2974
3230
|
"with a Gmail address or an existing email address from Microsoft or another provider. You can also continue without signing in."
|
|
2975
3231
|
] });
|
|
2976
3232
|
$[8] = brandName;
|
|
2977
|
-
$[9] =
|
|
2978
|
-
$[10] =
|
|
2979
|
-
} else
|
|
2980
|
-
let
|
|
2981
|
-
if ($[11] !==
|
|
2982
|
-
|
|
2983
|
-
$[11] =
|
|
2984
|
-
$[12] =
|
|
2985
|
-
} else
|
|
2986
|
-
let
|
|
2987
|
-
if ($[13] !==
|
|
2988
|
-
|
|
3233
|
+
$[9] = email;
|
|
3234
|
+
$[10] = t7;
|
|
3235
|
+
} else t7 = $[10];
|
|
3236
|
+
let t8;
|
|
3237
|
+
if ($[11] !== t7) {
|
|
3238
|
+
t8 = /* @__PURE__ */ jsx("span", { children: t7 });
|
|
3239
|
+
$[11] = t7;
|
|
3240
|
+
$[12] = t8;
|
|
3241
|
+
} else t8 = $[12];
|
|
3242
|
+
let t9;
|
|
3243
|
+
if ($[13] !== t6 || $[14] !== t8) {
|
|
3244
|
+
t9 = /* @__PURE__ */ jsxs("div", {
|
|
2989
3245
|
className: "first-run-profile-card__identity",
|
|
2990
|
-
children: [
|
|
3246
|
+
children: [t6, t8]
|
|
2991
3247
|
});
|
|
2992
|
-
$[13] =
|
|
3248
|
+
$[13] = t6;
|
|
2993
3249
|
$[14] = t8;
|
|
2994
|
-
$[15] =
|
|
2995
|
-
} else
|
|
2996
|
-
let
|
|
2997
|
-
if ($[16] !==
|
|
2998
|
-
|
|
2999
|
-
render:
|
|
3250
|
+
$[15] = t9;
|
|
3251
|
+
} else t9 = $[15];
|
|
3252
|
+
let t10;
|
|
3253
|
+
if ($[16] !== t4 || $[17] !== t9) {
|
|
3254
|
+
t10 = /* @__PURE__ */ jsxs(Card, {
|
|
3255
|
+
render: t3,
|
|
3000
3256
|
className: "first-run-profile-card",
|
|
3001
3257
|
size: "sm",
|
|
3002
3258
|
"aria-label": "Chrome profile",
|
|
3003
|
-
children: [
|
|
3259
|
+
children: [t4, t9]
|
|
3004
3260
|
});
|
|
3005
|
-
$[16] =
|
|
3006
|
-
$[17] =
|
|
3007
|
-
$[18] =
|
|
3008
|
-
} else
|
|
3009
|
-
let
|
|
3261
|
+
$[16] = t4;
|
|
3262
|
+
$[17] = t9;
|
|
3263
|
+
$[18] = t10;
|
|
3264
|
+
} else t10 = $[18];
|
|
3265
|
+
let t11;
|
|
3010
3266
|
if ($[19] === Symbol.for("react.memo_cache_sentinel")) {
|
|
3011
|
-
|
|
3267
|
+
t11 = /* @__PURE__ */ jsx(ShieldCheck, {
|
|
3012
3268
|
size: 16,
|
|
3013
3269
|
strokeWidth: 1.75
|
|
3014
3270
|
});
|
|
3015
|
-
$[19] =
|
|
3016
|
-
} else
|
|
3017
|
-
let
|
|
3271
|
+
$[19] = t11;
|
|
3272
|
+
} else t11 = $[19];
|
|
3273
|
+
let t12;
|
|
3018
3274
|
if ($[20] === Symbol.for("react.memo_cache_sentinel")) {
|
|
3019
|
-
|
|
3275
|
+
t12 = /* @__PURE__ */ jsx("a", {
|
|
3020
3276
|
href: "https://support.google.com/chrome/a/answer/7532419",
|
|
3021
3277
|
target: "_blank",
|
|
3022
3278
|
rel: "noopener noreferrer",
|
|
3023
3279
|
children: "managed Chrome settings"
|
|
3024
3280
|
});
|
|
3025
|
-
$[20] =
|
|
3026
|
-
} else
|
|
3027
|
-
let
|
|
3281
|
+
$[20] = t12;
|
|
3282
|
+
} else t12 = $[20];
|
|
3283
|
+
let t13;
|
|
3028
3284
|
if ($[21] === Symbol.for("react.memo_cache_sentinel")) {
|
|
3029
|
-
|
|
3285
|
+
t13 = /* @__PURE__ */ jsx("a", {
|
|
3030
3286
|
href: "https://support.google.com/a/answer/7281227",
|
|
3031
3287
|
target: "_blank",
|
|
3032
3288
|
rel: "noopener noreferrer",
|
|
3033
3289
|
children: "Google Workspace app controls"
|
|
3034
3290
|
});
|
|
3035
|
-
$[21] =
|
|
3036
|
-
} else
|
|
3037
|
-
let
|
|
3291
|
+
$[21] = t13;
|
|
3292
|
+
} else t13 = $[21];
|
|
3293
|
+
let t14;
|
|
3038
3294
|
if ($[22] !== brandName) {
|
|
3039
|
-
|
|
3295
|
+
t14 = /* @__PURE__ */ jsx("div", {
|
|
3040
3296
|
className: "first-run-notes",
|
|
3041
3297
|
children: /* @__PURE__ */ jsxs(Note, {
|
|
3042
|
-
icon:
|
|
3298
|
+
icon: t11,
|
|
3043
3299
|
children: [
|
|
3044
3300
|
"An administrator can use",
|
|
3045
3301
|
" ",
|
|
3046
|
-
|
|
3302
|
+
t12,
|
|
3047
3303
|
" ",
|
|
3048
3304
|
"to limit the sites ",
|
|
3049
3305
|
brandName,
|
|
3050
3306
|
" can visit, and",
|
|
3051
3307
|
" ",
|
|
3052
|
-
|
|
3308
|
+
t13,
|
|
3053
3309
|
" ",
|
|
3054
3310
|
"to manage Google app connections."
|
|
3055
3311
|
]
|
|
3056
3312
|
})
|
|
3057
3313
|
});
|
|
3058
3314
|
$[22] = brandName;
|
|
3059
|
-
$[23] =
|
|
3060
|
-
} else
|
|
3061
|
-
let
|
|
3062
|
-
if ($[24] !==
|
|
3063
|
-
|
|
3064
|
-
$[24] =
|
|
3065
|
-
$[25] =
|
|
3066
|
-
$[26] =
|
|
3067
|
-
} else
|
|
3068
|
-
let
|
|
3315
|
+
$[23] = t14;
|
|
3316
|
+
} else t14 = $[23];
|
|
3317
|
+
let t15;
|
|
3318
|
+
if ($[24] !== t10 || $[25] !== t14) {
|
|
3319
|
+
t15 = /* @__PURE__ */ jsxs(Fragment, { children: [t10, t14] });
|
|
3320
|
+
$[24] = t10;
|
|
3321
|
+
$[25] = t14;
|
|
3322
|
+
$[26] = t15;
|
|
3323
|
+
} else t15 = $[26];
|
|
3324
|
+
let t16;
|
|
3069
3325
|
if ($[27] === Symbol.for("react.memo_cache_sentinel")) {
|
|
3070
|
-
|
|
3071
|
-
$[27] =
|
|
3072
|
-
} else
|
|
3073
|
-
let
|
|
3074
|
-
if ($[28] !==
|
|
3075
|
-
|
|
3326
|
+
t16 = /* @__PURE__ */ jsx(Actions, { children: /* @__PURE__ */ jsx(Next, {}) });
|
|
3327
|
+
$[27] = t16;
|
|
3328
|
+
} else t16 = $[27];
|
|
3329
|
+
let t17;
|
|
3330
|
+
if ($[28] !== t15 || $[29] !== t2) {
|
|
3331
|
+
t17 = /* @__PURE__ */ jsx(Step, {
|
|
3076
3332
|
title: t2,
|
|
3077
|
-
lead:
|
|
3078
|
-
body:
|
|
3079
|
-
actions:
|
|
3333
|
+
lead: "Your data stays on this device. Only what a task needs goes to your AI provider and the apps it uses.",
|
|
3334
|
+
body: t15,
|
|
3335
|
+
actions: t16
|
|
3080
3336
|
});
|
|
3081
|
-
$[28] =
|
|
3337
|
+
$[28] = t15;
|
|
3082
3338
|
$[29] = t2;
|
|
3083
|
-
$[30] =
|
|
3084
|
-
|
|
3085
|
-
|
|
3086
|
-
return t19;
|
|
3339
|
+
$[30] = t17;
|
|
3340
|
+
} else t17 = $[30];
|
|
3341
|
+
return t17;
|
|
3087
3342
|
}
|
|
3088
3343
|
/** A Chrome profile's avatar: its email's first letter, or a person when signed out. */
|
|
3089
3344
|
function ProfileInitial(t0) {
|
|
@@ -3103,193 +3358,248 @@ function ProfileInitial(t0) {
|
|
|
3103
3358
|
} else t2 = $[3];
|
|
3104
3359
|
return t2;
|
|
3105
3360
|
}
|
|
3361
|
+
/**
|
|
3362
|
+
* The history choice. Setup owns the consent ask, so a person who leaves and
|
|
3363
|
+
* comes back while it is pending finds it still waiting.
|
|
3364
|
+
*/
|
|
3106
3365
|
function HistoryChoiceStep(t0) {
|
|
3107
|
-
const $ = c(
|
|
3108
|
-
const { history, skipTo } = t0;
|
|
3366
|
+
const $ = c(58);
|
|
3367
|
+
const { history, waiting, failure, onSetUp, skipTo } = t0;
|
|
3109
3368
|
const { brandName, go, titleId } = useFirstRun();
|
|
3110
|
-
|
|
3111
|
-
|
|
3369
|
+
let t1;
|
|
3370
|
+
if ($[0] !== history.choice || $[1] !== waiting) {
|
|
3371
|
+
t1 = (choice) => !waiting && history.choice === choice ? /* @__PURE__ */ jsx(CheckIcon, { "aria-hidden": "true" }) : null;
|
|
3372
|
+
$[0] = history.choice;
|
|
3373
|
+
$[1] = waiting;
|
|
3374
|
+
$[2] = t1;
|
|
3375
|
+
} else t1 = $[2];
|
|
3376
|
+
const current = t1;
|
|
3377
|
+
const t2 = `How should ${brandName} get started?`;
|
|
3112
3378
|
const t3 = `Choose how ${brandName} gets started`;
|
|
3113
|
-
const t4 =
|
|
3114
|
-
const t5 = `${titleId}-history-
|
|
3115
|
-
|
|
3116
|
-
if ($[0] !== go || $[1] !== history) {
|
|
3117
|
-
t6 = () => {
|
|
3118
|
-
history.onSetUpFromHistory();
|
|
3119
|
-
go("preparation");
|
|
3120
|
-
};
|
|
3121
|
-
$[0] = go;
|
|
3122
|
-
$[1] = history;
|
|
3123
|
-
$[2] = t6;
|
|
3124
|
-
} else t6 = $[2];
|
|
3379
|
+
const t4 = history.choice === "history" ? true : void 0;
|
|
3380
|
+
const t5 = `${titleId}-history-choice`;
|
|
3381
|
+
const t6 = `${titleId}-history-description`;
|
|
3125
3382
|
let t7;
|
|
3126
|
-
if ($[3]
|
|
3383
|
+
if ($[3] !== waiting) {
|
|
3127
3384
|
t7 = /* @__PURE__ */ jsx("span", {
|
|
3128
3385
|
className: "first-run-provider-logo",
|
|
3129
3386
|
"aria-hidden": "true",
|
|
3130
|
-
children: /* @__PURE__ */ jsx(
|
|
3387
|
+
children: waiting ? /* @__PURE__ */ jsx(SpinnerIcon, {
|
|
3388
|
+
className: "sigvelo-icon--spinner",
|
|
3389
|
+
size: 48,
|
|
3390
|
+
strokeWidth: 1.75
|
|
3391
|
+
}) : /* @__PURE__ */ jsx("img", {
|
|
3131
3392
|
src: CHROME_MARK,
|
|
3132
3393
|
alt: "",
|
|
3133
3394
|
width: 48,
|
|
3134
3395
|
height: 48
|
|
3135
3396
|
})
|
|
3136
3397
|
});
|
|
3137
|
-
$[3] =
|
|
3138
|
-
|
|
3398
|
+
$[3] = waiting;
|
|
3399
|
+
$[4] = t7;
|
|
3400
|
+
} else t7 = $[4];
|
|
3139
3401
|
const t8 = `${titleId}-history-choice`;
|
|
3140
|
-
|
|
3141
|
-
|
|
3142
|
-
|
|
3402
|
+
const t9 = waiting ? "Waiting for permission…" : "Set up from history";
|
|
3403
|
+
let t10;
|
|
3404
|
+
if ($[5] !== current) {
|
|
3405
|
+
t10 = current("history");
|
|
3406
|
+
$[5] = current;
|
|
3407
|
+
$[6] = t10;
|
|
3408
|
+
} else t10 = $[6];
|
|
3409
|
+
let t11;
|
|
3410
|
+
if ($[7] !== t10 || $[8] !== t8 || $[9] !== t9) {
|
|
3411
|
+
t11 = /* @__PURE__ */ jsxs("span", {
|
|
3143
3412
|
id: t8,
|
|
3144
|
-
className: "first-run-provider-label",
|
|
3145
|
-
children:
|
|
3413
|
+
className: "first-run-provider-label first-run-provider-label--external",
|
|
3414
|
+
children: [t9, t10]
|
|
3146
3415
|
});
|
|
3147
|
-
$[
|
|
3148
|
-
$[
|
|
3149
|
-
|
|
3150
|
-
|
|
3151
|
-
|
|
3152
|
-
|
|
3153
|
-
|
|
3154
|
-
|
|
3416
|
+
$[7] = t10;
|
|
3417
|
+
$[8] = t8;
|
|
3418
|
+
$[9] = t9;
|
|
3419
|
+
$[10] = t11;
|
|
3420
|
+
} else t11 = $[10];
|
|
3421
|
+
const t12 = `${titleId}-history-description`;
|
|
3422
|
+
const t13 = waiting ? "Approve access in the Google window." : "Reads this profile’s history and sent email to set up your projects, people, writing style and automations.";
|
|
3423
|
+
let t14;
|
|
3424
|
+
if ($[11] !== t12 || $[12] !== t13) {
|
|
3425
|
+
t14 = /* @__PURE__ */ jsx("span", {
|
|
3426
|
+
id: t12,
|
|
3155
3427
|
className: "first-run-provider-subtitle",
|
|
3156
|
-
children:
|
|
3428
|
+
children: t13
|
|
3157
3429
|
});
|
|
3158
|
-
$[
|
|
3159
|
-
$[
|
|
3160
|
-
|
|
3161
|
-
|
|
3162
|
-
|
|
3163
|
-
|
|
3430
|
+
$[11] = t12;
|
|
3431
|
+
$[12] = t13;
|
|
3432
|
+
$[13] = t14;
|
|
3433
|
+
} else t14 = $[13];
|
|
3434
|
+
let t15;
|
|
3435
|
+
if ($[14] !== onSetUp || $[15] !== t11 || $[16] !== t14 || $[17] !== t4 || $[18] !== t5 || $[19] !== t6 || $[20] !== t7 || $[21] !== waiting) {
|
|
3436
|
+
t15 = /* @__PURE__ */ jsxs(Button, {
|
|
3164
3437
|
type: "button",
|
|
3165
3438
|
className: "first-run-provider-choice",
|
|
3166
3439
|
variant: "surface",
|
|
3167
3440
|
color: "neutral",
|
|
3168
3441
|
size: "sm",
|
|
3169
|
-
|
|
3170
|
-
|
|
3171
|
-
|
|
3442
|
+
disabled: waiting,
|
|
3443
|
+
focusableWhenDisabled: waiting,
|
|
3444
|
+
"aria-busy": waiting,
|
|
3445
|
+
"aria-current": t4,
|
|
3446
|
+
"aria-labelledby": t5,
|
|
3447
|
+
"aria-describedby": t6,
|
|
3448
|
+
onClick: onSetUp,
|
|
3172
3449
|
children: [
|
|
3173
3450
|
t7,
|
|
3174
|
-
|
|
3175
|
-
|
|
3451
|
+
t11,
|
|
3452
|
+
t14
|
|
3176
3453
|
]
|
|
3177
3454
|
});
|
|
3178
|
-
$[
|
|
3179
|
-
$[
|
|
3180
|
-
$[
|
|
3181
|
-
$[
|
|
3182
|
-
$[
|
|
3183
|
-
$[
|
|
3184
|
-
|
|
3185
|
-
|
|
3186
|
-
|
|
3187
|
-
|
|
3188
|
-
|
|
3189
|
-
|
|
3190
|
-
|
|
3191
|
-
|
|
3455
|
+
$[14] = onSetUp;
|
|
3456
|
+
$[15] = t11;
|
|
3457
|
+
$[16] = t14;
|
|
3458
|
+
$[17] = t4;
|
|
3459
|
+
$[18] = t5;
|
|
3460
|
+
$[19] = t6;
|
|
3461
|
+
$[20] = t7;
|
|
3462
|
+
$[21] = waiting;
|
|
3463
|
+
$[22] = t15;
|
|
3464
|
+
} else t15 = $[22];
|
|
3465
|
+
const t16 = history.choice === "skip" ? true : void 0;
|
|
3466
|
+
const t17 = `${titleId}-skip-choice`;
|
|
3467
|
+
const t18 = `${titleId}-skip-description`;
|
|
3468
|
+
let t19;
|
|
3469
|
+
if ($[23] !== go || $[24] !== history || $[25] !== skipTo) {
|
|
3470
|
+
t19 = () => {
|
|
3471
|
+
history.onSkipForNow(skipTo);
|
|
3472
|
+
go(skipTo);
|
|
3192
3473
|
};
|
|
3193
|
-
$[
|
|
3194
|
-
$[
|
|
3195
|
-
$[
|
|
3196
|
-
$[
|
|
3197
|
-
} else
|
|
3198
|
-
let
|
|
3199
|
-
if ($[
|
|
3200
|
-
|
|
3474
|
+
$[23] = go;
|
|
3475
|
+
$[24] = history;
|
|
3476
|
+
$[25] = skipTo;
|
|
3477
|
+
$[26] = t19;
|
|
3478
|
+
} else t19 = $[26];
|
|
3479
|
+
let t20;
|
|
3480
|
+
if ($[27] === Symbol.for("react.memo_cache_sentinel")) {
|
|
3481
|
+
t20 = /* @__PURE__ */ jsx("span", {
|
|
3201
3482
|
className: "first-run-provider-logo",
|
|
3202
3483
|
"aria-hidden": "true",
|
|
3203
|
-
children: /* @__PURE__ */ jsx(
|
|
3484
|
+
children: /* @__PURE__ */ jsx(ClockIcon, {
|
|
3204
3485
|
size: 48,
|
|
3205
3486
|
strokeWidth: 1.5
|
|
3206
3487
|
})
|
|
3207
3488
|
});
|
|
3208
|
-
$[
|
|
3209
|
-
} else
|
|
3210
|
-
const
|
|
3211
|
-
let
|
|
3212
|
-
if ($[
|
|
3213
|
-
|
|
3214
|
-
|
|
3215
|
-
|
|
3216
|
-
|
|
3217
|
-
|
|
3218
|
-
|
|
3219
|
-
|
|
3220
|
-
|
|
3221
|
-
|
|
3222
|
-
|
|
3223
|
-
|
|
3224
|
-
|
|
3225
|
-
|
|
3489
|
+
$[27] = t20;
|
|
3490
|
+
} else t20 = $[27];
|
|
3491
|
+
const t21 = `${titleId}-skip-choice`;
|
|
3492
|
+
let t22;
|
|
3493
|
+
if ($[28] !== current) {
|
|
3494
|
+
t22 = current("skip");
|
|
3495
|
+
$[28] = current;
|
|
3496
|
+
$[29] = t22;
|
|
3497
|
+
} else t22 = $[29];
|
|
3498
|
+
let t23;
|
|
3499
|
+
if ($[30] !== t21 || $[31] !== t22) {
|
|
3500
|
+
t23 = /* @__PURE__ */ jsxs("span", {
|
|
3501
|
+
id: t21,
|
|
3502
|
+
className: "first-run-provider-label first-run-provider-label--external",
|
|
3503
|
+
children: ["Skip for now", t22]
|
|
3504
|
+
});
|
|
3505
|
+
$[30] = t21;
|
|
3506
|
+
$[31] = t22;
|
|
3507
|
+
$[32] = t23;
|
|
3508
|
+
} else t23 = $[32];
|
|
3509
|
+
const t24 = `${titleId}-skip-description`;
|
|
3510
|
+
let t25;
|
|
3511
|
+
if ($[33] !== brandName || $[34] !== t24) {
|
|
3512
|
+
t25 = /* @__PURE__ */ jsxs("span", {
|
|
3513
|
+
id: t24,
|
|
3226
3514
|
className: "first-run-provider-subtitle",
|
|
3227
3515
|
children: [
|
|
3228
|
-
"
|
|
3516
|
+
"Start without history. ",
|
|
3229
3517
|
brandName,
|
|
3230
|
-
"
|
|
3518
|
+
" learns from your tasks."
|
|
3231
3519
|
]
|
|
3232
3520
|
});
|
|
3233
|
-
$[
|
|
3234
|
-
$[
|
|
3235
|
-
$[
|
|
3236
|
-
} else
|
|
3237
|
-
let
|
|
3238
|
-
if ($[
|
|
3239
|
-
|
|
3521
|
+
$[33] = brandName;
|
|
3522
|
+
$[34] = t24;
|
|
3523
|
+
$[35] = t25;
|
|
3524
|
+
} else t25 = $[35];
|
|
3525
|
+
let t26;
|
|
3526
|
+
if ($[36] !== t16 || $[37] !== t17 || $[38] !== t18 || $[39] !== t19 || $[40] !== t23 || $[41] !== t25 || $[42] !== waiting) {
|
|
3527
|
+
t26 = /* @__PURE__ */ jsxs(Button, {
|
|
3240
3528
|
type: "button",
|
|
3241
3529
|
className: "first-run-provider-choice",
|
|
3242
3530
|
variant: "surface",
|
|
3243
3531
|
color: "neutral",
|
|
3244
3532
|
size: "sm",
|
|
3245
|
-
|
|
3246
|
-
"aria-
|
|
3247
|
-
|
|
3533
|
+
disabled: waiting,
|
|
3534
|
+
"aria-current": t16,
|
|
3535
|
+
"aria-labelledby": t17,
|
|
3536
|
+
"aria-describedby": t18,
|
|
3537
|
+
onClick: t19,
|
|
3248
3538
|
children: [
|
|
3249
|
-
|
|
3250
|
-
|
|
3251
|
-
|
|
3539
|
+
t20,
|
|
3540
|
+
t23,
|
|
3541
|
+
t25
|
|
3252
3542
|
]
|
|
3253
3543
|
});
|
|
3254
|
-
$[
|
|
3255
|
-
$[
|
|
3256
|
-
$[
|
|
3257
|
-
$[
|
|
3258
|
-
$[
|
|
3259
|
-
$[
|
|
3260
|
-
|
|
3261
|
-
|
|
3262
|
-
|
|
3263
|
-
|
|
3544
|
+
$[36] = t16;
|
|
3545
|
+
$[37] = t17;
|
|
3546
|
+
$[38] = t18;
|
|
3547
|
+
$[39] = t19;
|
|
3548
|
+
$[40] = t23;
|
|
3549
|
+
$[41] = t25;
|
|
3550
|
+
$[42] = waiting;
|
|
3551
|
+
$[43] = t26;
|
|
3552
|
+
} else t26 = $[43];
|
|
3553
|
+
let t27;
|
|
3554
|
+
if ($[44] !== t15 || $[45] !== t26 || $[46] !== t3) {
|
|
3555
|
+
t27 = /* @__PURE__ */ jsxs("div", {
|
|
3264
3556
|
className: "first-run-provider-choices",
|
|
3265
3557
|
role: "group",
|
|
3266
3558
|
"aria-label": t3,
|
|
3267
|
-
children: [
|
|
3559
|
+
children: [t15, t26]
|
|
3268
3560
|
});
|
|
3269
|
-
$[
|
|
3270
|
-
$[
|
|
3271
|
-
$[
|
|
3272
|
-
$[
|
|
3273
|
-
} else
|
|
3274
|
-
let
|
|
3275
|
-
if ($[
|
|
3276
|
-
|
|
3277
|
-
|
|
3278
|
-
|
|
3279
|
-
|
|
3280
|
-
|
|
3281
|
-
|
|
3282
|
-
|
|
3283
|
-
|
|
3284
|
-
|
|
3285
|
-
|
|
3286
|
-
});
|
|
3287
|
-
$[
|
|
3288
|
-
$[
|
|
3289
|
-
$[
|
|
3290
|
-
|
|
3291
|
-
|
|
3292
|
-
|
|
3561
|
+
$[44] = t15;
|
|
3562
|
+
$[45] = t26;
|
|
3563
|
+
$[46] = t3;
|
|
3564
|
+
$[47] = t27;
|
|
3565
|
+
} else t27 = $[47];
|
|
3566
|
+
let t28;
|
|
3567
|
+
if ($[48] !== failure) {
|
|
3568
|
+
t28 = failure ? /* @__PURE__ */ jsx("p", {
|
|
3569
|
+
role: "alert",
|
|
3570
|
+
className: "chatgpt-sign-in__error",
|
|
3571
|
+
children: failure
|
|
3572
|
+
}) : null;
|
|
3573
|
+
$[48] = failure;
|
|
3574
|
+
$[49] = t28;
|
|
3575
|
+
} else t28 = $[49];
|
|
3576
|
+
let t29;
|
|
3577
|
+
if ($[50] !== t27 || $[51] !== t28) {
|
|
3578
|
+
t29 = /* @__PURE__ */ jsxs(Fragment, { children: [t27, t28] });
|
|
3579
|
+
$[50] = t27;
|
|
3580
|
+
$[51] = t28;
|
|
3581
|
+
$[52] = t29;
|
|
3582
|
+
} else t29 = $[52];
|
|
3583
|
+
let t30;
|
|
3584
|
+
if ($[53] === Symbol.for("react.memo_cache_sentinel")) {
|
|
3585
|
+
t30 = /* @__PURE__ */ jsx(Back, {});
|
|
3586
|
+
$[53] = t30;
|
|
3587
|
+
} else t30 = $[53];
|
|
3588
|
+
const t31 = waiting ? "Waiting for permission in the Google window" : "";
|
|
3589
|
+
let t32;
|
|
3590
|
+
if ($[54] !== t2 || $[55] !== t29 || $[56] !== t31) {
|
|
3591
|
+
t32 = /* @__PURE__ */ jsx(Step, {
|
|
3592
|
+
title: t2,
|
|
3593
|
+
body: t29,
|
|
3594
|
+
actions: t30,
|
|
3595
|
+
announce: t31
|
|
3596
|
+
});
|
|
3597
|
+
$[54] = t2;
|
|
3598
|
+
$[55] = t29;
|
|
3599
|
+
$[56] = t31;
|
|
3600
|
+
$[57] = t32;
|
|
3601
|
+
} else t32 = $[57];
|
|
3602
|
+
return t32;
|
|
3293
3603
|
}
|
|
3294
3604
|
/**
|
|
3295
3605
|
* A drawing of Chrome's toolbar and Extensions menu that says where to click.
|
|
@@ -3453,7 +3763,7 @@ function ReadyStep(t0) {
|
|
|
3453
3763
|
$[11] = t2;
|
|
3454
3764
|
} else t2 = $[11];
|
|
3455
3765
|
t3 = `${brandName} is ready`;
|
|
3456
|
-
t4 = `${on.length ? "
|
|
3766
|
+
t4 = `${on.length ? "" : "Nothing is scheduled. "}Ask it for anything in the side panel.`;
|
|
3457
3767
|
t5 = on.length || shortcut ? /* @__PURE__ */ jsxs(Fragment, { children: [on.length ? /* @__PURE__ */ jsxs("figure", {
|
|
3458
3768
|
className: "first-run-figure",
|
|
3459
3769
|
children: [/* @__PURE__ */ jsx("figcaption", { children: "Schedules" }), on.map(_temp2$1)]
|
|
@@ -3526,7 +3836,7 @@ function _temp2$1(schedule_0) {
|
|
|
3526
3836
|
children: [
|
|
3527
3837
|
/* @__PURE__ */ jsx("strong", { children: schedule_0.name }),
|
|
3528
3838
|
/* @__PURE__ */ jsx("span", { children: formatThinkScheduleRepeat(schedule_0.task.schedule, "timezone" in schedule_0.task ? schedule_0.task.timezone : void 0) }),
|
|
3529
|
-
/* @__PURE__ */ jsx("small", { children: next ? `Next ${next}` : "
|
|
3839
|
+
/* @__PURE__ */ jsx("small", { children: next ? `Next ${next}` : "No upcoming run" })
|
|
3530
3840
|
]
|
|
3531
3841
|
})
|
|
3532
3842
|
}, schedule_0.id);
|
|
@@ -3543,6 +3853,147 @@ const sigveloLogo = /* @__PURE__ */ jsx("img", {
|
|
|
3543
3853
|
height: 96
|
|
3544
3854
|
});
|
|
3545
3855
|
/**
|
|
3856
|
+
* The page setup draws around every step after the welcome: the wallpaper,
|
|
3857
|
+
* the brand bar, one glass card, and the footer. `FirstRunSetup` renders its
|
|
3858
|
+
* steps in it. It is exported for host screens outside the step flow, such
|
|
3859
|
+
* as setup stopping because its saved progress did not read, so they share
|
|
3860
|
+
* the frame instead of copying its classes.
|
|
3861
|
+
*/
|
|
3862
|
+
function FirstRunFrame(t0) {
|
|
3863
|
+
const $ = c(34);
|
|
3864
|
+
let children;
|
|
3865
|
+
let className;
|
|
3866
|
+
let navigation;
|
|
3867
|
+
let props;
|
|
3868
|
+
let t1;
|
|
3869
|
+
let t2;
|
|
3870
|
+
let titleId;
|
|
3871
|
+
if ($[0] !== t0) {
|
|
3872
|
+
({brandName: t1, brandLogo: t2, navigation, titleId, children, className, ...props} = t0);
|
|
3873
|
+
$[0] = t0;
|
|
3874
|
+
$[1] = children;
|
|
3875
|
+
$[2] = className;
|
|
3876
|
+
$[3] = navigation;
|
|
3877
|
+
$[4] = props;
|
|
3878
|
+
$[5] = t1;
|
|
3879
|
+
$[6] = t2;
|
|
3880
|
+
$[7] = titleId;
|
|
3881
|
+
} else {
|
|
3882
|
+
children = $[1];
|
|
3883
|
+
className = $[2];
|
|
3884
|
+
navigation = $[3];
|
|
3885
|
+
props = $[4];
|
|
3886
|
+
t1 = $[5];
|
|
3887
|
+
t2 = $[6];
|
|
3888
|
+
titleId = $[7];
|
|
3889
|
+
}
|
|
3890
|
+
const brandName = t1 === void 0 ? "Rook" : t1;
|
|
3891
|
+
const brandLogo = t2 === void 0 ? sigveloLogo : t2;
|
|
3892
|
+
const t3 = `Set up ${brandName}`;
|
|
3893
|
+
let t4;
|
|
3894
|
+
if ($[8] !== className) {
|
|
3895
|
+
t4 = cx("first-run", className);
|
|
3896
|
+
$[8] = className;
|
|
3897
|
+
$[9] = t4;
|
|
3898
|
+
} else t4 = $[9];
|
|
3899
|
+
let t5;
|
|
3900
|
+
if ($[10] !== brandLogo) {
|
|
3901
|
+
t5 = /* @__PURE__ */ jsx(React.ViewTransition, {
|
|
3902
|
+
name: "first-run-mark",
|
|
3903
|
+
children: /* @__PURE__ */ jsx("span", {
|
|
3904
|
+
className: "first-run-brand__mark",
|
|
3905
|
+
children: brandLogo
|
|
3906
|
+
})
|
|
3907
|
+
});
|
|
3908
|
+
$[10] = brandLogo;
|
|
3909
|
+
$[11] = t5;
|
|
3910
|
+
} else t5 = $[11];
|
|
3911
|
+
let t6;
|
|
3912
|
+
if ($[12] !== brandName) {
|
|
3913
|
+
t6 = /* @__PURE__ */ jsx(React.ViewTransition, {
|
|
3914
|
+
name: "first-run-brand-name",
|
|
3915
|
+
children: /* @__PURE__ */ jsx("span", { children: brandName })
|
|
3916
|
+
});
|
|
3917
|
+
$[12] = brandName;
|
|
3918
|
+
$[13] = t6;
|
|
3919
|
+
} else t6 = $[13];
|
|
3920
|
+
let t7;
|
|
3921
|
+
if ($[14] !== t5 || $[15] !== t6) {
|
|
3922
|
+
t7 = /* @__PURE__ */ jsx("header", {
|
|
3923
|
+
className: "first-run-top",
|
|
3924
|
+
children: /* @__PURE__ */ jsxs("span", {
|
|
3925
|
+
className: "first-run-brand",
|
|
3926
|
+
children: [t5, t6]
|
|
3927
|
+
})
|
|
3928
|
+
});
|
|
3929
|
+
$[14] = t5;
|
|
3930
|
+
$[15] = t6;
|
|
3931
|
+
$[16] = t7;
|
|
3932
|
+
} else t7 = $[16];
|
|
3933
|
+
let t8;
|
|
3934
|
+
if ($[17] !== navigation) {
|
|
3935
|
+
t8 = navigation ?? /* @__PURE__ */ jsx("span", { "aria-hidden": "true" });
|
|
3936
|
+
$[17] = navigation;
|
|
3937
|
+
$[18] = t8;
|
|
3938
|
+
} else t8 = $[18];
|
|
3939
|
+
let t9;
|
|
3940
|
+
if ($[19] !== children || $[20] !== titleId) {
|
|
3941
|
+
t9 = /* @__PURE__ */ jsx("section", {
|
|
3942
|
+
className: "first-run-screen",
|
|
3943
|
+
"aria-labelledby": titleId,
|
|
3944
|
+
children
|
|
3945
|
+
});
|
|
3946
|
+
$[19] = children;
|
|
3947
|
+
$[20] = titleId;
|
|
3948
|
+
$[21] = t9;
|
|
3949
|
+
} else t9 = $[21];
|
|
3950
|
+
let t10;
|
|
3951
|
+
if ($[22] !== t8 || $[23] !== t9) {
|
|
3952
|
+
t10 = /* @__PURE__ */ jsxs(Card, {
|
|
3953
|
+
className: "first-run-frame",
|
|
3954
|
+
children: [t8, t9]
|
|
3955
|
+
});
|
|
3956
|
+
$[22] = t8;
|
|
3957
|
+
$[23] = t9;
|
|
3958
|
+
$[24] = t10;
|
|
3959
|
+
} else t10 = $[24];
|
|
3960
|
+
let t11;
|
|
3961
|
+
if ($[25] === Symbol.for("react.memo_cache_sentinel")) {
|
|
3962
|
+
t11 = /* @__PURE__ */ jsx(PoweredBy, {});
|
|
3963
|
+
$[25] = t11;
|
|
3964
|
+
} else t11 = $[25];
|
|
3965
|
+
let t12;
|
|
3966
|
+
if ($[26] !== t10 || $[27] !== t7) {
|
|
3967
|
+
t12 = /* @__PURE__ */ jsxs("div", {
|
|
3968
|
+
className: "first-run__page",
|
|
3969
|
+
children: [
|
|
3970
|
+
t7,
|
|
3971
|
+
t10,
|
|
3972
|
+
t11
|
|
3973
|
+
]
|
|
3974
|
+
});
|
|
3975
|
+
$[26] = t10;
|
|
3976
|
+
$[27] = t7;
|
|
3977
|
+
$[28] = t12;
|
|
3978
|
+
} else t12 = $[28];
|
|
3979
|
+
let t13;
|
|
3980
|
+
if ($[29] !== props || $[30] !== t12 || $[31] !== t3 || $[32] !== t4) {
|
|
3981
|
+
t13 = /* @__PURE__ */ jsx("main", {
|
|
3982
|
+
"aria-label": t3,
|
|
3983
|
+
...props,
|
|
3984
|
+
className: t4,
|
|
3985
|
+
"data-recipe": "fill-host computer-wallpaper",
|
|
3986
|
+
children: t12
|
|
3987
|
+
});
|
|
3988
|
+
$[29] = props;
|
|
3989
|
+
$[30] = t12;
|
|
3990
|
+
$[31] = t3;
|
|
3991
|
+
$[32] = t4;
|
|
3992
|
+
$[33] = t13;
|
|
3993
|
+
} else t13 = $[33];
|
|
3994
|
+
return t13;
|
|
3995
|
+
}
|
|
3996
|
+
/**
|
|
3546
3997
|
* Full-screen first run of the agent, one screen at a time: connect a
|
|
3547
3998
|
* model, confirm the Chrome profile, choose whether to use history, and set up projects, people, writing, and
|
|
3548
3999
|
* automations from the person's own work, try
|
|
@@ -3552,89 +4003,111 @@ const sigveloLogo = /* @__PURE__ */ jsx("img", {
|
|
|
3552
4003
|
* moving between screens animates through React view transitions.
|
|
3553
4004
|
*/
|
|
3554
4005
|
function FirstRunSetup(t0) {
|
|
3555
|
-
const $ = c(
|
|
3556
|
-
let
|
|
4006
|
+
const $ = c(58);
|
|
4007
|
+
let automationWork;
|
|
3557
4008
|
let className;
|
|
3558
4009
|
let email;
|
|
3559
4010
|
let history;
|
|
3560
4011
|
let modelConnection;
|
|
3561
4012
|
let onOpen;
|
|
3562
4013
|
let onStepChange;
|
|
3563
|
-
let
|
|
4014
|
+
let peopleWork;
|
|
3564
4015
|
let pinned;
|
|
3565
|
-
let
|
|
4016
|
+
let projectWork;
|
|
3566
4017
|
let props;
|
|
3567
4018
|
let schedules;
|
|
3568
4019
|
let shortcut;
|
|
3569
4020
|
let signIn;
|
|
3570
|
-
let
|
|
4021
|
+
let skillWork;
|
|
3571
4022
|
let step;
|
|
3572
4023
|
let t1;
|
|
3573
4024
|
let t2;
|
|
3574
|
-
let
|
|
3575
|
-
let writing;
|
|
4025
|
+
let writingWork;
|
|
3576
4026
|
if ($[0] !== t0) {
|
|
3577
|
-
({step, onStepChange, brandName: t1, brandLogo: t2, email,
|
|
4027
|
+
({step, onStepChange, brandName: t1, brandLogo: t2, email, shortcut, signIn, modelConnection, history, projects: projectWork, people: peopleWork, writing: writingWork, automations: automationWork, schedules, skills: skillWork, pinned, onOpen, className, ...props} = t0);
|
|
3578
4028
|
$[0] = t0;
|
|
3579
|
-
$[1] =
|
|
4029
|
+
$[1] = automationWork;
|
|
3580
4030
|
$[2] = className;
|
|
3581
4031
|
$[3] = email;
|
|
3582
4032
|
$[4] = history;
|
|
3583
4033
|
$[5] = modelConnection;
|
|
3584
4034
|
$[6] = onOpen;
|
|
3585
4035
|
$[7] = onStepChange;
|
|
3586
|
-
$[8] =
|
|
4036
|
+
$[8] = peopleWork;
|
|
3587
4037
|
$[9] = pinned;
|
|
3588
|
-
$[10] =
|
|
4038
|
+
$[10] = projectWork;
|
|
3589
4039
|
$[11] = props;
|
|
3590
4040
|
$[12] = schedules;
|
|
3591
4041
|
$[13] = shortcut;
|
|
3592
4042
|
$[14] = signIn;
|
|
3593
|
-
$[15] =
|
|
4043
|
+
$[15] = skillWork;
|
|
3594
4044
|
$[16] = step;
|
|
3595
4045
|
$[17] = t1;
|
|
3596
4046
|
$[18] = t2;
|
|
3597
|
-
$[19] =
|
|
3598
|
-
$[20] = writing;
|
|
4047
|
+
$[19] = writingWork;
|
|
3599
4048
|
} else {
|
|
3600
|
-
|
|
4049
|
+
automationWork = $[1];
|
|
3601
4050
|
className = $[2];
|
|
3602
4051
|
email = $[3];
|
|
3603
4052
|
history = $[4];
|
|
3604
4053
|
modelConnection = $[5];
|
|
3605
4054
|
onOpen = $[6];
|
|
3606
4055
|
onStepChange = $[7];
|
|
3607
|
-
|
|
4056
|
+
peopleWork = $[8];
|
|
3608
4057
|
pinned = $[9];
|
|
3609
|
-
|
|
4058
|
+
projectWork = $[10];
|
|
3610
4059
|
props = $[11];
|
|
3611
4060
|
schedules = $[12];
|
|
3612
4061
|
shortcut = $[13];
|
|
3613
4062
|
signIn = $[14];
|
|
3614
|
-
|
|
4063
|
+
skillWork = $[15];
|
|
3615
4064
|
step = $[16];
|
|
3616
4065
|
t1 = $[17];
|
|
3617
4066
|
t2 = $[18];
|
|
3618
|
-
|
|
3619
|
-
writing = $[20];
|
|
4067
|
+
writingWork = $[19];
|
|
3620
4068
|
}
|
|
3621
4069
|
const brandName = t1 === void 0 ? "Rook" : t1;
|
|
3622
4070
|
const brandLogo = t2 === void 0 ? sigveloLogo : t2;
|
|
3623
|
-
const chromeSignedIn = t3 === void 0 ? Boolean(email) : t3;
|
|
3624
4071
|
const titleId = React.useId();
|
|
3625
|
-
let
|
|
3626
|
-
if ($[
|
|
3627
|
-
|
|
3628
|
-
$[
|
|
3629
|
-
$[
|
|
3630
|
-
} else
|
|
3631
|
-
const saving = useIsMutating(
|
|
4072
|
+
let t3;
|
|
4073
|
+
if ($[20] !== titleId) {
|
|
4074
|
+
t3 = { mutationKey: ["first-run", titleId] };
|
|
4075
|
+
$[20] = titleId;
|
|
4076
|
+
$[21] = t3;
|
|
4077
|
+
} else t3 = $[21];
|
|
4078
|
+
const saving = useIsMutating(t3) > 0;
|
|
3632
4079
|
const [arrival, setArrival] = React.useState(true);
|
|
3633
4080
|
const [style, setStyle] = React.useState();
|
|
3634
|
-
const [sign, setSign] = React.useState(
|
|
4081
|
+
const [sign, setSign] = React.useState();
|
|
3635
4082
|
const [workTab, setWorkTab] = React.useState("projects");
|
|
3636
4083
|
const [schedulesReviewed, setSchedulesReviewed] = React.useState(false);
|
|
3637
4084
|
const [writingReviewed, setWritingReviewed] = React.useState(false);
|
|
4085
|
+
let t4;
|
|
4086
|
+
if ($[22] === Symbol.for("react.memo_cache_sentinel")) {
|
|
4087
|
+
t4 = {};
|
|
4088
|
+
$[22] = t4;
|
|
4089
|
+
} else t4 = $[22];
|
|
4090
|
+
const [left, setLeft] = React.useState(t4);
|
|
4091
|
+
const projects = {
|
|
4092
|
+
...projectWork,
|
|
4093
|
+
...useRetry(projectWork)
|
|
4094
|
+
};
|
|
4095
|
+
const people = {
|
|
4096
|
+
...peopleWork,
|
|
4097
|
+
...useRetry(peopleWork)
|
|
4098
|
+
};
|
|
4099
|
+
const writing = {
|
|
4100
|
+
...writingWork,
|
|
4101
|
+
...useRetry(writingWork)
|
|
4102
|
+
};
|
|
4103
|
+
const automations = {
|
|
4104
|
+
...automationWork,
|
|
4105
|
+
...useRetry(automationWork)
|
|
4106
|
+
};
|
|
4107
|
+
const skills = {
|
|
4108
|
+
...skillWork,
|
|
4109
|
+
...useRetry(skillWork)
|
|
4110
|
+
};
|
|
3638
4111
|
const reading = history.choice === "history";
|
|
3639
4112
|
const automationEntries = useQuery({
|
|
3640
4113
|
...automations.source.queryOptions,
|
|
@@ -3650,27 +4123,60 @@ function FirstRunSetup(t0) {
|
|
|
3650
4123
|
} else t5 = $[25];
|
|
3651
4124
|
const scheduled = t5;
|
|
3652
4125
|
let t6;
|
|
3653
|
-
if ($[26] !== automationEntries || $[27] !==
|
|
3654
|
-
t6 = automationsReady
|
|
4126
|
+
if ($[26] !== automationEntries || $[27] !== automationsReady) {
|
|
4127
|
+
t6 = automationsReady ? automationEntries.find(_temp3) : void 0;
|
|
3655
4128
|
$[26] = automationEntries;
|
|
3656
|
-
$[27] =
|
|
3657
|
-
$[28] =
|
|
3658
|
-
|
|
3659
|
-
} else t6 = $[29];
|
|
4129
|
+
$[27] = automationsReady;
|
|
4130
|
+
$[28] = t6;
|
|
4131
|
+
} else t6 = $[28];
|
|
3660
4132
|
const trial = t6;
|
|
3661
|
-
const preparation =
|
|
4133
|
+
const preparation = preparationStatus([
|
|
3662
4134
|
projects,
|
|
3663
4135
|
people,
|
|
3664
4136
|
automations,
|
|
3665
4137
|
skills,
|
|
3666
4138
|
writing
|
|
3667
4139
|
]);
|
|
4140
|
+
const run = useTrialRun(trial, automations.source);
|
|
4141
|
+
const [tried, setTried] = React.useState(false);
|
|
4142
|
+
if (run.status === "done" && !tried) setTried(true);
|
|
4143
|
+
let t7;
|
|
4144
|
+
if ($[29] !== titleId) {
|
|
4145
|
+
t7 = [
|
|
4146
|
+
"first-run",
|
|
4147
|
+
titleId,
|
|
4148
|
+
"history"
|
|
4149
|
+
];
|
|
4150
|
+
$[29] = titleId;
|
|
4151
|
+
$[30] = t7;
|
|
4152
|
+
} else t7 = $[30];
|
|
4153
|
+
let t8;
|
|
4154
|
+
if ($[31] !== history) {
|
|
4155
|
+
t8 = () => history.onSetUpFromHistory();
|
|
4156
|
+
$[31] = history;
|
|
4157
|
+
$[32] = t8;
|
|
4158
|
+
} else t8 = $[32];
|
|
4159
|
+
let t9;
|
|
4160
|
+
if ($[33] !== t7 || $[34] !== t8) {
|
|
4161
|
+
t9 = {
|
|
4162
|
+
mutationKey: t7,
|
|
4163
|
+
mutationFn: t8
|
|
4164
|
+
};
|
|
4165
|
+
$[33] = t7;
|
|
4166
|
+
$[34] = t8;
|
|
4167
|
+
$[35] = t9;
|
|
4168
|
+
} else t9 = $[35];
|
|
4169
|
+
const consent = useMutation(t9);
|
|
4170
|
+
const asking = React.useRef(false);
|
|
4171
|
+
const consented = React.useRef(void 0);
|
|
3668
4172
|
const flow = {
|
|
3669
4173
|
step,
|
|
3670
4174
|
history: history.choice,
|
|
3671
4175
|
pinned,
|
|
3672
4176
|
trial: Boolean(trial),
|
|
3673
|
-
|
|
4177
|
+
writing: reading && writing.status === "done",
|
|
4178
|
+
automations: automationsReady,
|
|
4179
|
+
preparation
|
|
3674
4180
|
};
|
|
3675
4181
|
const current = currentStep(flow);
|
|
3676
4182
|
const currentRank = rank(current);
|
|
@@ -3680,23 +4186,25 @@ function FirstRunSetup(t0) {
|
|
|
3680
4186
|
...flow,
|
|
3681
4187
|
furthest: furthestRank,
|
|
3682
4188
|
saving,
|
|
4189
|
+
connected: signIn.status === "done" || modelConnection.kind === "managed" || modelConnection.connected,
|
|
4190
|
+
left,
|
|
4191
|
+
tried,
|
|
3683
4192
|
reviewed: {
|
|
3684
|
-
writing: writingReviewed,
|
|
4193
|
+
writing: writingReviewed || writing.answer !== void 0,
|
|
3685
4194
|
schedules: schedulesReviewed
|
|
3686
4195
|
}
|
|
3687
4196
|
};
|
|
3688
|
-
const
|
|
3689
|
-
|
|
3690
|
-
|
|
3691
|
-
|
|
3692
|
-
|
|
3693
|
-
|
|
3694
|
-
|
|
3695
|
-
$[
|
|
3696
|
-
|
|
3697
|
-
|
|
3698
|
-
|
|
3699
|
-
const answer = t8;
|
|
4197
|
+
const answer = {
|
|
4198
|
+
style: style ?? writing.answer?.style ?? writing.suggested ?? "direct",
|
|
4199
|
+
sign: sign ?? writing.answer?.sign ?? "assistant"
|
|
4200
|
+
};
|
|
4201
|
+
let t10;
|
|
4202
|
+
if ($[36] === Symbol.for("react.memo_cache_sentinel")) {
|
|
4203
|
+
t10 = [];
|
|
4204
|
+
$[36] = t10;
|
|
4205
|
+
} else t10 = $[36];
|
|
4206
|
+
React.useEffect(_temp5, t10);
|
|
4207
|
+
const chosen = React.useRef(false);
|
|
3700
4208
|
const go = (to) => {
|
|
3701
4209
|
if (!to || to === current) return;
|
|
3702
4210
|
const back = rank(to) < rank(current);
|
|
@@ -3712,278 +4220,259 @@ function FirstRunSetup(t0) {
|
|
|
3712
4220
|
titleId,
|
|
3713
4221
|
arrival,
|
|
3714
4222
|
go,
|
|
3715
|
-
next: () =>
|
|
4223
|
+
next: () => {
|
|
4224
|
+
setLeft((previous) => ({
|
|
4225
|
+
...previous,
|
|
4226
|
+
[current]: "continued"
|
|
4227
|
+
}));
|
|
4228
|
+
go(nextStep(flow));
|
|
4229
|
+
},
|
|
4230
|
+
skip: () => {
|
|
4231
|
+
setLeft((previous_0) => ({
|
|
4232
|
+
...previous_0,
|
|
4233
|
+
[current]: "skipped"
|
|
4234
|
+
}));
|
|
4235
|
+
go(nextStep(flow));
|
|
4236
|
+
},
|
|
3716
4237
|
back: () => go(previousStep(flow))
|
|
3717
4238
|
};
|
|
3718
|
-
|
|
3719
|
-
|
|
3720
|
-
|
|
4239
|
+
React.useLayoutEffect(() => {
|
|
4240
|
+
consented.current = (choice) => {
|
|
4241
|
+
if (current === "history") go(choice === "history" ? "preparation" : afterHistorySkip(flow));
|
|
4242
|
+
};
|
|
4243
|
+
});
|
|
4244
|
+
const setUpFromHistory = () => {
|
|
4245
|
+
if (asking.current) return;
|
|
4246
|
+
asking.current = true;
|
|
4247
|
+
consent.mutate(void 0, {
|
|
4248
|
+
onSuccess: (choice_0) => consented.current?.(choice_0),
|
|
4249
|
+
onSettled: () => {
|
|
4250
|
+
asking.current = false;
|
|
4251
|
+
}
|
|
4252
|
+
});
|
|
4253
|
+
};
|
|
4254
|
+
let t11;
|
|
4255
|
+
if ($[37] !== modelConnection || $[38] !== signIn) {
|
|
4256
|
+
t11 = () => /* @__PURE__ */ jsx(SignInStep, {
|
|
3721
4257
|
...signIn,
|
|
3722
4258
|
modelConnection
|
|
3723
4259
|
});
|
|
3724
|
-
$[
|
|
3725
|
-
$[
|
|
3726
|
-
$[
|
|
3727
|
-
} else
|
|
3728
|
-
let t10;
|
|
3729
|
-
if ($[36] !== modelConnection) {
|
|
3730
|
-
t10 = () => /* @__PURE__ */ jsx(ModelConnectionStep, { connection: modelConnection });
|
|
3731
|
-
$[36] = modelConnection;
|
|
3732
|
-
$[37] = t10;
|
|
3733
|
-
} else t10 = $[37];
|
|
3734
|
-
let t11;
|
|
3735
|
-
if ($[38] !== chromeSignedIn || $[39] !== email) {
|
|
3736
|
-
t11 = () => /* @__PURE__ */ jsx(ChromeProfileStep, {
|
|
3737
|
-
email,
|
|
3738
|
-
signedIn: chromeSignedIn
|
|
3739
|
-
});
|
|
3740
|
-
$[38] = chromeSignedIn;
|
|
3741
|
-
$[39] = email;
|
|
3742
|
-
$[40] = t11;
|
|
3743
|
-
} else t11 = $[40];
|
|
4260
|
+
$[37] = modelConnection;
|
|
4261
|
+
$[38] = signIn;
|
|
4262
|
+
$[39] = t11;
|
|
4263
|
+
} else t11 = $[39];
|
|
3744
4264
|
let t12;
|
|
3745
|
-
if ($[
|
|
3746
|
-
t12 = () => /* @__PURE__ */ jsx(
|
|
3747
|
-
|
|
3748
|
-
|
|
3749
|
-
|
|
3750
|
-
onSignChange: setSign,
|
|
3751
|
-
onReviewed: () => setWritingReviewed(true),
|
|
3752
|
-
profileEmail: chromeSignedIn ? email : void 0
|
|
3753
|
-
});
|
|
3754
|
-
$[41] = answer;
|
|
3755
|
-
$[42] = chromeSignedIn;
|
|
3756
|
-
$[43] = email;
|
|
3757
|
-
$[44] = writing;
|
|
3758
|
-
$[45] = t12;
|
|
3759
|
-
} else t12 = $[45];
|
|
4265
|
+
if ($[40] !== modelConnection) {
|
|
4266
|
+
t12 = () => /* @__PURE__ */ jsx(ModelConnectionStep, { connection: modelConnection });
|
|
4267
|
+
$[40] = modelConnection;
|
|
4268
|
+
$[41] = t12;
|
|
4269
|
+
} else t12 = $[41];
|
|
3760
4270
|
let t13;
|
|
3761
|
-
if ($[
|
|
3762
|
-
t13 = () => /* @__PURE__ */ jsx(
|
|
4271
|
+
if ($[42] !== email) {
|
|
4272
|
+
t13 = () => /* @__PURE__ */ jsx(ChromeProfileStep, { email });
|
|
4273
|
+
$[42] = email;
|
|
4274
|
+
$[43] = t13;
|
|
4275
|
+
} else t13 = $[43];
|
|
4276
|
+
let t14;
|
|
4277
|
+
if ($[44] !== scheduled || $[45] !== schedules) {
|
|
4278
|
+
t14 = () => /* @__PURE__ */ jsx(ScheduleReview, {
|
|
3763
4279
|
automations: scheduled,
|
|
3764
4280
|
schedules,
|
|
3765
4281
|
onReviewed: () => setSchedulesReviewed(true)
|
|
3766
4282
|
});
|
|
3767
|
-
$[
|
|
3768
|
-
$[
|
|
3769
|
-
$[
|
|
3770
|
-
} else
|
|
3771
|
-
let t14;
|
|
3772
|
-
if ($[49] !== automations.source || $[50] !== trial) {
|
|
3773
|
-
t14 = () => trial ? /* @__PURE__ */ jsx(WorkTrial, {
|
|
3774
|
-
automation: trial,
|
|
3775
|
-
source: automations.source
|
|
3776
|
-
}) : null;
|
|
3777
|
-
$[49] = automations.source;
|
|
3778
|
-
$[50] = trial;
|
|
3779
|
-
$[51] = t14;
|
|
3780
|
-
} else t14 = $[51];
|
|
4283
|
+
$[44] = scheduled;
|
|
4284
|
+
$[45] = schedules;
|
|
4285
|
+
$[46] = t14;
|
|
4286
|
+
} else t14 = $[46];
|
|
3781
4287
|
let t15;
|
|
3782
|
-
if ($[
|
|
4288
|
+
if ($[47] !== email || $[48] !== pinned) {
|
|
3783
4289
|
t15 = () => /* @__PURE__ */ jsx(PinStep, {
|
|
3784
4290
|
pinned,
|
|
3785
4291
|
email
|
|
3786
4292
|
});
|
|
3787
|
-
$[
|
|
3788
|
-
$[
|
|
3789
|
-
$[
|
|
3790
|
-
} else t15 = $[
|
|
4293
|
+
$[47] = email;
|
|
4294
|
+
$[48] = pinned;
|
|
4295
|
+
$[49] = t15;
|
|
4296
|
+
} else t15 = $[49];
|
|
3791
4297
|
let t16;
|
|
3792
|
-
if ($[
|
|
4298
|
+
if ($[50] !== onOpen || $[51] !== schedules || $[52] !== shortcut) {
|
|
3793
4299
|
t16 = () => /* @__PURE__ */ jsx(ReadyStep, {
|
|
3794
4300
|
schedules: schedules.list,
|
|
3795
4301
|
shortcut,
|
|
3796
4302
|
onOpen
|
|
3797
4303
|
});
|
|
3798
|
-
$[
|
|
3799
|
-
$[
|
|
3800
|
-
$[
|
|
3801
|
-
$[
|
|
3802
|
-
} else t16 = $[
|
|
4304
|
+
$[50] = onOpen;
|
|
4305
|
+
$[51] = schedules;
|
|
4306
|
+
$[52] = shortcut;
|
|
4307
|
+
$[53] = t16;
|
|
4308
|
+
} else t16 = $[53];
|
|
3803
4309
|
const screen = {
|
|
3804
|
-
welcome:
|
|
3805
|
-
"sign-in":
|
|
3806
|
-
"model-connection":
|
|
3807
|
-
"chrome-profile":
|
|
4310
|
+
welcome: _temp6,
|
|
4311
|
+
"sign-in": t11,
|
|
4312
|
+
"model-connection": t12,
|
|
4313
|
+
"chrome-profile": t13,
|
|
3808
4314
|
history: () => /* @__PURE__ */ jsx(HistoryChoiceStep, {
|
|
3809
4315
|
history,
|
|
3810
|
-
|
|
3811
|
-
|
|
3812
|
-
|
|
3813
|
-
|
|
4316
|
+
waiting: consent.isPending,
|
|
4317
|
+
failure: consent.isError ? formatErrorMessage(consent.error) || "Couldn’t set up from history. Try again." : "",
|
|
4318
|
+
onSetUp: setUpFromHistory,
|
|
4319
|
+
skipTo: afterHistorySkip(flow)
|
|
3814
4320
|
}),
|
|
3815
4321
|
preparation: () => /* @__PURE__ */ jsx(WorkPreparation, {
|
|
3816
4322
|
tab: workTab,
|
|
3817
4323
|
onTabChange: setWorkTab,
|
|
3818
|
-
preparation
|
|
4324
|
+
preparation,
|
|
3819
4325
|
projects,
|
|
3820
4326
|
people,
|
|
3821
4327
|
automations,
|
|
3822
4328
|
skills,
|
|
3823
4329
|
writing
|
|
3824
4330
|
}),
|
|
3825
|
-
writing:
|
|
3826
|
-
|
|
3827
|
-
|
|
4331
|
+
writing: () => /* @__PURE__ */ jsx(WritingStep, {
|
|
4332
|
+
writing,
|
|
4333
|
+
answer,
|
|
4334
|
+
onStyleChange: setStyle,
|
|
4335
|
+
onSignChange: setSign,
|
|
4336
|
+
onReviewed: () => setWritingReviewed(true),
|
|
4337
|
+
profileEmail: email
|
|
4338
|
+
}),
|
|
4339
|
+
schedules: t14,
|
|
4340
|
+
try: () => trial ? /* @__PURE__ */ jsx(WorkTrial, {
|
|
4341
|
+
automation: trial,
|
|
4342
|
+
source: automations.source,
|
|
4343
|
+
run
|
|
4344
|
+
}) : null,
|
|
3828
4345
|
pin: t15,
|
|
3829
|
-
ask:
|
|
4346
|
+
ask: _temp7,
|
|
3830
4347
|
ready: t16
|
|
3831
4348
|
}[current]();
|
|
3832
4349
|
const items = navigationItems(navigation);
|
|
3833
|
-
const preparing = reading && preparation
|
|
3834
|
-
|
|
3835
|
-
|
|
3836
|
-
|
|
3837
|
-
|
|
3838
|
-
|
|
3839
|
-
|
|
3840
|
-
|
|
3841
|
-
|
|
3842
|
-
|
|
3843
|
-
|
|
3844
|
-
|
|
3845
|
-
|
|
3846
|
-
|
|
3847
|
-
|
|
3848
|
-
|
|
3849
|
-
|
|
3850
|
-
|
|
3851
|
-
|
|
3852
|
-
|
|
3853
|
-
|
|
3854
|
-
|
|
3855
|
-
|
|
3856
|
-
|
|
3857
|
-
|
|
3858
|
-
|
|
3859
|
-
|
|
3860
|
-
|
|
3861
|
-
|
|
3862
|
-
/* @__PURE__ */ jsxs(
|
|
3863
|
-
className: "first-run-
|
|
3864
|
-
|
|
3865
|
-
|
|
3866
|
-
|
|
3867
|
-
|
|
3868
|
-
|
|
3869
|
-
|
|
3870
|
-
|
|
3871
|
-
|
|
3872
|
-
|
|
3873
|
-
|
|
3874
|
-
|
|
3875
|
-
|
|
3876
|
-
|
|
3877
|
-
|
|
3878
|
-
|
|
3879
|
-
|
|
3880
|
-
|
|
3881
|
-
|
|
3882
|
-
|
|
3883
|
-
|
|
3884
|
-
|
|
3885
|
-
|
|
3886
|
-
|
|
3887
|
-
|
|
3888
|
-
|
|
4350
|
+
const preparing = reading && preparation === "working";
|
|
4351
|
+
const t17 = arrival ? "" : void 0;
|
|
4352
|
+
let t18;
|
|
4353
|
+
if ($[54] !== current || $[55] !== props || $[56] !== t17) {
|
|
4354
|
+
t18 = {
|
|
4355
|
+
...props,
|
|
4356
|
+
"data-screen": current,
|
|
4357
|
+
"data-arrival": t17
|
|
4358
|
+
};
|
|
4359
|
+
$[54] = current;
|
|
4360
|
+
$[55] = props;
|
|
4361
|
+
$[56] = t17;
|
|
4362
|
+
$[57] = t18;
|
|
4363
|
+
} else t18 = $[57];
|
|
4364
|
+
const page = t18;
|
|
4365
|
+
return /* @__PURE__ */ jsx(FirstRunContext, {
|
|
4366
|
+
value: context,
|
|
4367
|
+
children: current === "welcome" ? /* @__PURE__ */ jsx("main", {
|
|
4368
|
+
...page,
|
|
4369
|
+
className: cx("first-run", className),
|
|
4370
|
+
"aria-label": `Set up ${brandName}`,
|
|
4371
|
+
"data-recipe": "fill-host computer-wallpaper",
|
|
4372
|
+
children: screen
|
|
4373
|
+
}) : /* @__PURE__ */ jsx(FirstRunFrame, {
|
|
4374
|
+
...page,
|
|
4375
|
+
className,
|
|
4376
|
+
brandName,
|
|
4377
|
+
brandLogo,
|
|
4378
|
+
titleId,
|
|
4379
|
+
navigation: /* @__PURE__ */ jsxs("nav", {
|
|
4380
|
+
className: "first-run-navigation",
|
|
4381
|
+
"aria-label": "Setup steps",
|
|
4382
|
+
children: [/* @__PURE__ */ jsxs(Select.Root, {
|
|
4383
|
+
items,
|
|
4384
|
+
value: navigationValue(flow),
|
|
4385
|
+
onValueChange: (value, details) => {
|
|
4386
|
+
if (details.reason === "none") {
|
|
4387
|
+
details.cancel();
|
|
4388
|
+
return;
|
|
4389
|
+
}
|
|
4390
|
+
if (!value || !canVisit(value, navigation)) return;
|
|
4391
|
+
chosen.current = value !== current;
|
|
4392
|
+
go(value);
|
|
4393
|
+
},
|
|
4394
|
+
children: [/* @__PURE__ */ jsxs(Select.Trigger, {
|
|
4395
|
+
className: "first-run-navigation__picker",
|
|
4396
|
+
size: "md",
|
|
4397
|
+
"aria-label": "Setup step",
|
|
4398
|
+
disabled: saving,
|
|
4399
|
+
children: [/* @__PURE__ */ jsx(Select.Value, {}), /* @__PURE__ */ jsx(Select.Icon, { children: /* @__PURE__ */ jsx(ChevronDownIcon, {}) })]
|
|
4400
|
+
}), /* @__PURE__ */ jsx(Select.Portal, { children: /* @__PURE__ */ jsx(Select.Positioner, {
|
|
4401
|
+
sideOffset: 4,
|
|
4402
|
+
alignItemWithTrigger: false,
|
|
4403
|
+
align: "start",
|
|
4404
|
+
children: /* @__PURE__ */ jsx(Select.Popup, {
|
|
4405
|
+
className: "first-run-navigation__menu",
|
|
4406
|
+
finalFocus: () => {
|
|
4407
|
+
const moved = chosen.current;
|
|
4408
|
+
chosen.current = false;
|
|
4409
|
+
return !moved;
|
|
4410
|
+
},
|
|
4411
|
+
children: /* @__PURE__ */ jsx(Select.List, {
|
|
4412
|
+
"aria-label": "Setup steps",
|
|
4413
|
+
children: items.map((t19, position) => {
|
|
4414
|
+
const { label, value: value_0, disabled, outcome, nested } = t19;
|
|
4415
|
+
return /* @__PURE__ */ jsxs(Select.Item, {
|
|
4416
|
+
value: value_0,
|
|
4417
|
+
className: "first-run-navigation__step",
|
|
4418
|
+
"data-nested": nested ? "" : void 0,
|
|
4419
|
+
"aria-label": label,
|
|
4420
|
+
"aria-describedby": outcome ? `${titleId}-${value_0}-status` : void 0,
|
|
4421
|
+
disabled,
|
|
3889
4422
|
children: [
|
|
3890
|
-
|
|
3891
|
-
|
|
3892
|
-
|
|
4423
|
+
/* @__PURE__ */ jsx("span", {
|
|
4424
|
+
className: "first-run-navigation__mark",
|
|
4425
|
+
"aria-hidden": "true",
|
|
4426
|
+
children: outcome === "Skipped" ? /* @__PURE__ */ jsx(MinusIcon, {}) : outcome ? /* @__PURE__ */ jsx(CheckIcon, {}) : position + 1
|
|
4427
|
+
}),
|
|
4428
|
+
/* @__PURE__ */ jsx(Select.ItemText, { children: label }),
|
|
4429
|
+
outcome ? /* @__PURE__ */ jsx("span", {
|
|
4430
|
+
id: `${titleId}-${value_0}-status`,
|
|
4431
|
+
className: "sigvelo-visually-hidden",
|
|
4432
|
+
children: outcome
|
|
4433
|
+
}) : null
|
|
3893
4434
|
]
|
|
3894
|
-
})
|
|
3895
|
-
}) : null,
|
|
3896
|
-
/* @__PURE__ */ jsx(Select.Icon, { children: /* @__PURE__ */ jsx(ChevronDownIcon, {}) })
|
|
3897
|
-
]
|
|
3898
|
-
}), /* @__PURE__ */ jsx(Select.Portal, { children: /* @__PURE__ */ jsx(Select.Positioner, {
|
|
3899
|
-
sideOffset: 4,
|
|
3900
|
-
alignItemWithTrigger: false,
|
|
3901
|
-
align: "start",
|
|
3902
|
-
children: /* @__PURE__ */ jsx(Select.Popup, {
|
|
3903
|
-
className: "first-run-navigation__menu",
|
|
3904
|
-
children: /* @__PURE__ */ jsx(Select.List, {
|
|
3905
|
-
"aria-label": "Setup steps",
|
|
3906
|
-
children: items.map((t22, position) => {
|
|
3907
|
-
const { label, value: value_0, disabled, completed, completionText } = t22;
|
|
3908
|
-
return /* @__PURE__ */ jsxs(Select.Item, {
|
|
3909
|
-
value: value_0,
|
|
3910
|
-
className: "first-run-navigation__step",
|
|
3911
|
-
"aria-label": label,
|
|
3912
|
-
"aria-describedby": completed ? `${titleId}-${value_0}-status` : void 0,
|
|
3913
|
-
disabled,
|
|
3914
|
-
children: [
|
|
3915
|
-
/* @__PURE__ */ jsx("span", {
|
|
3916
|
-
className: "first-run-navigation__mark",
|
|
3917
|
-
"aria-hidden": "true",
|
|
3918
|
-
children: completed ? /* @__PURE__ */ jsx(CheckIcon, {}) : position + 1
|
|
3919
|
-
}),
|
|
3920
|
-
/* @__PURE__ */ jsx(Select.ItemText, { children: label }),
|
|
3921
|
-
completed ? /* @__PURE__ */ jsx("span", {
|
|
3922
|
-
id: `${titleId}-${value_0}-status`,
|
|
3923
|
-
className: "sigvelo-visually-hidden",
|
|
3924
|
-
children: completionText
|
|
3925
|
-
}) : null
|
|
3926
|
-
]
|
|
3927
|
-
}, value_0);
|
|
3928
|
-
})
|
|
4435
|
+
}, value_0);
|
|
3929
4436
|
})
|
|
3930
4437
|
})
|
|
3931
|
-
})
|
|
3932
|
-
})
|
|
3933
|
-
|
|
3934
|
-
|
|
3935
|
-
|
|
3936
|
-
|
|
3937
|
-
|
|
3938
|
-
|
|
3939
|
-
|
|
3940
|
-
|
|
3941
|
-
|
|
3942
|
-
|
|
3943
|
-
|
|
3944
|
-
|
|
3945
|
-
|
|
3946
|
-
|
|
3947
|
-
|
|
3948
|
-
})
|
|
3949
|
-
className: "first-run-screen",
|
|
3950
|
-
"aria-labelledby": titleId,
|
|
3951
|
-
children: /* @__PURE__ */ jsx(React.Fragment, { children: screen }, current)
|
|
3952
|
-
})]
|
|
4438
|
+
})
|
|
4439
|
+
}) })]
|
|
4440
|
+
}), current === "preparation" && reading && preparation !== "done" ? /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsxs(Button, {
|
|
4441
|
+
className: "first-run-navigation__open",
|
|
4442
|
+
variant: "ghost",
|
|
4443
|
+
color: "neutral",
|
|
4444
|
+
onClick: onOpen,
|
|
4445
|
+
"aria-describedby": preparing ? `${titleId}-open-background` : void 0,
|
|
4446
|
+
children: [
|
|
4447
|
+
"Open ",
|
|
4448
|
+
brandName,
|
|
4449
|
+
/* @__PURE__ */ jsx(ArrowRightIcon, {})
|
|
4450
|
+
]
|
|
4451
|
+
}), preparing ? /* @__PURE__ */ jsxs("span", {
|
|
4452
|
+
id: `${titleId}-open-background`,
|
|
4453
|
+
className: "sigvelo-visually-hidden",
|
|
4454
|
+
children: [brandName, " will keep preparing your work in the background."]
|
|
4455
|
+
}) : null] }) : null]
|
|
3953
4456
|
}),
|
|
3954
|
-
/* @__PURE__ */ jsx(
|
|
3955
|
-
|
|
3956
|
-
});
|
|
3957
|
-
let t23;
|
|
3958
|
-
if ($[61] !== current || $[62] !== props || $[63] !== t17 || $[64] !== t18 || $[65] !== t19 || $[66] !== t21) {
|
|
3959
|
-
t23 = /* @__PURE__ */ jsx("main", {
|
|
3960
|
-
...props,
|
|
3961
|
-
className: t17,
|
|
3962
|
-
"aria-label": t18,
|
|
3963
|
-
"data-screen": current,
|
|
3964
|
-
"data-arrival": t19,
|
|
3965
|
-
"data-recipe": t20,
|
|
3966
|
-
children: t21
|
|
3967
|
-
});
|
|
3968
|
-
$[61] = current;
|
|
3969
|
-
$[62] = props;
|
|
3970
|
-
$[63] = t17;
|
|
3971
|
-
$[64] = t18;
|
|
3972
|
-
$[65] = t19;
|
|
3973
|
-
$[66] = t21;
|
|
3974
|
-
$[67] = t23;
|
|
3975
|
-
} else t23 = $[67];
|
|
3976
|
-
return /* @__PURE__ */ jsx(FirstRunContext, {
|
|
3977
|
-
value: context,
|
|
3978
|
-
children: t23
|
|
4457
|
+
children: /* @__PURE__ */ jsx(React.Fragment, { children: screen }, current)
|
|
4458
|
+
})
|
|
3979
4459
|
});
|
|
3980
4460
|
}
|
|
3981
|
-
function
|
|
4461
|
+
function _temp7() {
|
|
3982
4462
|
return /* @__PURE__ */ jsx(AskStep, {});
|
|
3983
4463
|
}
|
|
3984
|
-
function
|
|
4464
|
+
function _temp6() {
|
|
3985
4465
|
return /* @__PURE__ */ jsx(WelcomeStep, {});
|
|
3986
4466
|
}
|
|
4467
|
+
function _temp5() {
|
|
4468
|
+
const finish = _temp4;
|
|
4469
|
+
document.addEventListener("keydown", finish, true);
|
|
4470
|
+
return () => document.removeEventListener("keydown", finish, true);
|
|
4471
|
+
}
|
|
4472
|
+
function _temp4() {
|
|
4473
|
+
const transition = document.activeViewTransition;
|
|
4474
|
+
if (transition?.types.has("first-run-forward") || transition?.types.has("first-run-back")) transition.skipTransition();
|
|
4475
|
+
}
|
|
3987
4476
|
function _temp3(item_0) {
|
|
3988
4477
|
return !item_0.parameters.some(_temp2);
|
|
3989
4478
|
}
|
|
@@ -3994,4 +4483,4 @@ function _temp(item) {
|
|
|
3994
4483
|
return item.schedule;
|
|
3995
4484
|
}
|
|
3996
4485
|
//#endregion
|
|
3997
|
-
export { FirstRunSetup };
|
|
4486
|
+
export { FirstRunFrame, FirstRunSetup, combineFirstRunWorkStatus, firstRunHistoryChoices, firstRunSteps };
|