@hanzo/dev 4.2.0 → 4.2.2
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/{BinaryViewer-CmFUK4zZ.js → BinaryViewer-CeQaKnXQ.js} +19 -19
- package/dist/{ChatMarkdown-nvEI7iCv.js → ChatMarkdown-DqKVAYd6.js} +2460 -2460
- package/dist/{DevicePanel-v5e3sEIf.js → DevicePanel-D-pksK3r.js} +532 -532
- package/dist/{DeviceStreamView-CCIfmbxH.js → DeviceStreamView-DsCoOzDV.js} +377 -377
- package/dist/{DiffCommentAnnotation-BPTN_2a6.js → DiffCommentAnnotation-CCtanhmq.js} +227 -227
- package/dist/{DiffFileTree-B_br90vY.js → DiffFileTree-BhEDIwzm.js} +13 -13
- package/dist/{DiffPanel-V5R5TPuK.js → DiffPanel-BPZ6Ru_G.js} +328 -328
- package/dist/{DiffWorkerPoolProvider-BwFR-Fc9.js → DiffWorkerPoolProvider-8Qh-Y5iP.js} +3 -3
- package/dist/{DocumentPages-VSn83vty.js → DocumentPages-MN1xyIRb.js} +3 -3
- package/dist/{ExpandedImageDialog-CAorLacL.js → ExpandedImageDialog-tCY2TFXU.js} +404 -404
- package/dist/{FileExplorerPane-CeHulcPz.js → FileExplorerPane-BgJw-BA4.js} +4 -4
- package/dist/{FilePreviewPanel-BVNLvWOc.js → FilePreviewPanel-DHteid8j.js} +1089 -1089
- package/dist/{FontFilePreview-Dj8Blcay.js → FontFilePreview-COxgoDy5.js} +2 -2
- package/dist/{FontViewer-CLDdwhSr.js → FontViewer-jxARaj1f.js} +5 -5
- package/dist/{HanzoConnectAccountPages-BEzYfu2l.js → HanzoConnectAccountPages-BM2mB27b.js} +357 -357
- package/dist/{HanzoConnectSidebarSignIn-BhD6-Up5.js → HanzoConnectSidebarSignIn-BSOkKAjH.js} +3 -3
- package/dist/{Icons-CvSmt8vD.js → Icons-CdegMw5l.js} +1 -1
- package/dist/{LargeTextViewer-DfFnYGCw.js → LargeTextViewer-BX5-yWcy.js} +8 -8
- package/dist/{MermaidDiagram-CTolIzQD.js → MermaidDiagram-sVLnox7j.js} +8 -8
- package/dist/{MermaidFilePreview-CP2zP4FU.js → MermaidFilePreview-BqB2exZU.js} +2 -2
- package/dist/{MermaidViewer-BDfYkS9E.js → MermaidViewer-B0WYx1jk.js} +3 -3
- package/dist/{NotebookPreview-Cybs5uM0.js → NotebookPreview-B_7pSd7A.js} +10 -10
- package/dist/{OfficeFilePreview-7JsmSoKU.js → OfficeFilePreview-BJsNoaju.js} +2 -2
- package/dist/{OfficeViewer-CJoojlJK.js → OfficeViewer-TgdFnOtV.js} +10 -10
- package/dist/{OpenInPicker-BIMWUxBP.js → OpenInPicker-B3gPcFs6.js} +287 -287
- package/dist/{OpenXmlOfficeViewer-C24Kj8DM.js → OpenXmlOfficeViewer-C18a0NFP.js} +4 -4
- package/dist/{PdfViewer-Cf1iD759.js → PdfViewer-BanXvPmz.js} +16 -16
- package/dist/{PreviewFaviconIcon-zFOuzIxe.js → PreviewFaviconIcon-Dzjf4QXZ.js} +892 -892
- package/dist/{PreviewImage-oY5YnuTr.js → PreviewImage-Ct8eWJb8.js} +3 -3
- package/dist/{PreviewImageContent-n6eLzY99.js → PreviewImageContent-Dd8dzt9u.js} +3 -3
- package/dist/{PreviewPanel-Bo4Lt02m.js → PreviewPanel-BnsoHObW.js} +489 -489
- package/dist/{PreviewPanelShell-DhXLeN5j.js → PreviewPanelShell-Dezxjg0T.js} +71 -71
- package/dist/{ProjectIconPickerDialog-D0kFzt8f.js → ProjectIconPickerDialog-LomrzROv.js} +29 -29
- package/dist/{ProjectMonogram-D35xrrXQ.js → ProjectMonogram-D21--FQY.js} +1 -1
- package/dist/{ProviderAuthTerminal-DfsXnu7A.js → ProviderAuthTerminal-CYalqlUB.js} +3 -3
- package/dist/{PullRequestCodeTab-Dv_0kVad.js → PullRequestCodeTab-Jt9jdq55.js} +476 -476
- package/dist/{PullRequestReviewAnnotation-LeuwO-iH.js → PullRequestReviewAnnotation-xg3n0doV.js} +334 -334
- package/dist/{ReadOnlySourcePreview-D__IA5g1.js → ReadOnlySourcePreview-BYlRPbKI.js} +5 -5
- package/dist/{RelativeTime-BMRprQS8.js → RelativeTime-DQhoNsWZ.js} +2 -2
- package/dist/{RightPanelResizeHandle-BLbSz-gk.js → RightPanelResizeHandle-PumvYb9P.js} +2 -2
- package/dist/{ThemeEditorPanel-CUDdsRsE.js → ThemeEditorPanel-BmXXpaCI.js} +196 -196
- package/dist/{ThreadTerminalDrawer-BF3Ix0q_.js → ThreadTerminalDrawer-Cf4l2axO.js} +461 -461
- package/dist/{VirtualTablePreview-dajviAfu.js → VirtualTablePreview-mA6DOFwb.js} +1 -1
- package/dist/{anchoredCopyToast-DnUtg1n_.js → anchoredCopyToast-BVa_dlBU.js} +2 -2
- package/dist/{assetUrls-DkY7vXfM.js → assetUrls-D8lRk7Xd.js} +45 -45
- package/dist/{browserLinkTarget-CA46wnQC.js → browserLinkTarget-CCzAioAu.js} +18 -18
- package/dist/builder/api/models.d.ts +2 -0
- package/dist/builder/api/models.js +6 -1
- package/dist/builder/api/sandbox.d.ts +2 -0
- package/dist/builder/api/sandbox.js +3 -1
- package/dist/builder/desk.d.ts +6 -0
- package/dist/builder/desk.js +79 -14
- package/dist/builder/mind.d.ts +5 -5
- package/dist/builder/mind.js +35 -14
- package/dist/builder/pane.d.ts +1 -1
- package/dist/builder/pane.js +1 -1
- package/dist/builder/panel.js +5 -5
- package/dist/builder/preview-fallback.d.ts +47 -0
- package/dist/builder/preview-fallback.js +341 -0
- package/dist/{changedFileKind-D6QYvIez.js → changedFileKind-OIp-fuQd.js} +5 -5
- package/dist/{collapsible-DFT41MdC.js → collapsible-CDT6JKbk.js} +1 -1
- package/dist/{color-picker-CshqBbpY.js → color-picker-kSVcH92L.js} +16 -16
- package/dist/core.d.ts +38 -0
- package/dist/core.js +1 -1
- package/dist/{decodeImagePreview-DnfFEjhw.js → decodeImagePreview-DbkSuh7q.js} +2 -2
- package/dist/{delimitedPreview-BiEpdYOj.js → delimitedPreview-DbbXcqOT.js} +1 -1
- package/dist/{dialog-DhQtWGRa.js → dialog-EmpqFZiK.js} +40 -40
- package/dist/{embed-c030vUqM.js → embed-CzXFS50X.js} +39626 -38922
- package/dist/{empty-Bm5EzcG8.js → empty-ChM6gdzn.js} +1 -1
- package/dist/{errors-DrFQSJW3.js → errors-D8_Zn8KN.js} +2 -2
- package/dist/{fileContextMenu-BBo91omq.js → fileContextMenu-hdALQktP.js} +54 -54
- package/dist/{fileExplorerLabel-AikEChiS.js → fileExplorerLabel-DMdkA7jY.js} +507 -507
- package/dist/{fileSurfaceChrome-Cqkvn8RQ.js → fileSurfaceChrome-BDyKklTq.js} +26 -26
- package/dist/{hanzoWebAnalytics-CCxpTzcI.js → hanzoWebAnalytics-B1eETW-7.js} +1 -1
- package/dist/index.css +1 -1
- package/dist/{input-group-DEJEuwc9.js → input-group-BZ_QN-y7.js} +1 -1
- package/dist/{keybindings-C5tK_GAk.js → keybindings-D0pBlT1k.js} +7812 -7806
- package/dist/keymap.js +1 -1
- package/dist/{lucideIconByName-DUaXKH0V.js → lucideIconByName-CXY44V8P.js} +6835 -6848
- package/dist/{mediaReference-Bt_mh-ag.js → mediaReference-3wc4ZfY8.js} +95 -95
- package/dist/mediaSource-jW5c7b4r.js +70 -0
- package/dist/{modelPickerVisibility-Jue3CLfc.js → modelPickerVisibility-DBTc5r1G.js} +1 -1
- package/dist/{network-BbwqRm8c.js → network-wuXD7-is.js} +1 -1
- package/dist/{popover-anNQdce7.js → popover-BAyP2Tdr.js} +1 -1
- package/dist/{presentation-D9mVPBHm.js → presentation-68y8EAuH.js} +299 -299
- package/dist/{previewFailureMessages-BKpsSGX5.js → previewFailureMessages-CFguipaK.js} +3 -3
- package/dist/query-BPk2W3QN.js +63 -0
- package/dist/{readBinaryPreview-BAQ4fFjm.js → readBinaryPreview-DgDAUfzQ.js} +2 -2
- package/dist/{refresh-icon-BYx64to1.js → refresh-icon-Vo5ImiQL.js} +1 -1
- package/dist/{scroll-area-ChvX8uOh.js → scroll-area-CEoyjC7h.js} +1 -1
- package/dist/{select-DumYjny_.js → select-DLFnkZsI.js} +2 -2
- package/dist/{session-_kmiSv2A.js → session-Decc4Fo5.js} +1063 -1063
- package/dist/{skeleton-CJqwfMSF.js → skeleton-BOKpAZv6.js} +1 -1
- package/dist/{switch-COwevwaq.js → switch-DjpPjtQN.js} +2 -2
- package/dist/{themePalette-Dl_7omVL.js → themePalette-C-GtwwqV.js} +977 -977
- package/dist/{threadSearch-BHyWwcV3.js → threadSearch-sHEENLiT.js} +162 -162
- package/dist/{toggle-CEO6qTxB.js → toggle-B4F0EEtI.js} +1 -1
- package/dist/{toggle-group-BHovdMDl.js → toggle-group-l8hRPswr.js} +2 -2
- package/dist/{use-atom-command-ByoYq_K6.js → use-atom-command-XemtT1Gv.js} +1 -1
- package/dist/{useAriaLabelledBy-DPSISlnL.js → useAriaLabelledBy-CibvSz-b.js} +1 -1
- package/dist/{useFileMetadata-e7zsixVX.js → useFileMetadata-ChvPTfBY.js} +33 -33
- package/dist/{useFloatingRootContext-CJ9stHca.js → useFloatingRootContext-ppoGvqar.js} +1 -1
- package/dist/{useLiveRefresh-BkKJKXhH.js → useLiveRefresh-aHkPuz6N.js} +172 -172
- package/dist/{useNextRenderData-CyUmSAgz.js → useNextRenderData-Jm142a1q.js} +1 -1
- package/dist/{useSettings-DYG9Dmro.js → useSettings-Due4XCTB.js} +139 -139
- package/dist/{useTextFieldSpeech-COa9XcRx.js → useTextFieldSpeech-XN9r-f-r.js} +1404 -1404
- package/dist/useTheme-B9hvAuzL.js +411 -0
- package/dist/{utils-515nQ17G.js → utils-DtKQl-D3.js} +6184 -6172
- package/dist/{wizard-i86ViMRc.js → wizard-DjD4UNew.js} +3 -3
- package/dist/{workspaceFocus-BV1_9KiH.js → workspaceFocus-MR1plm6A.js} +144 -144
- package/dist/{zap-e0OsRjBR.js → zap-iwsUKtvA.js} +30 -17
- package/package.json +17 -17
- package/dist/mediaSource-zI7JWid4.js +0 -70
- package/dist/query-BxrrBAp6.js +0 -63
- package/dist/useTheme-D2ZM1gvV.js +0 -376
|
@@ -1,51 +1,51 @@
|
|
|
1
|
-
import { d as e, m as t, t as n } from "./session-
|
|
1
|
+
import { d as e, m as t, t as n } from "./session-Decc4Fo5.js";
|
|
2
2
|
import { c as r, n as i, s as a } from "./messages-yqmY7G5x.js";
|
|
3
|
-
import { Ag as o, Bs as s,
|
|
4
|
-
import { Eh as
|
|
5
|
-
import { Zt as
|
|
6
|
-
import { u as
|
|
7
|
-
import { $ as
|
|
8
|
-
import { a as
|
|
9
|
-
import { r as
|
|
10
|
-
import { r as
|
|
11
|
-
import { t as
|
|
12
|
-
import { t as
|
|
13
|
-
import { a as
|
|
14
|
-
import "./errors-
|
|
15
|
-
import { n as
|
|
16
|
-
import { S as
|
|
17
|
-
import { l as
|
|
18
|
-
import { n as
|
|
19
|
-
import { F as
|
|
20
|
-
import { In as
|
|
21
|
-
import { t as
|
|
22
|
-
import { useEffect as
|
|
23
|
-
import { c as
|
|
24
|
-
import { Fragment as
|
|
3
|
+
import { Ag as o, Bs as s, C_ as c, Dg as l, Ef as u, Eg as d, F as f, Gs as p, Hs as m, Jr as h, Js as g, Kh as _, Og as v, Qh as y, Qs as b, S_ as ee, Um as x, Vs as S, Xs as C, Y as w, Yh as T, Ys as E, Zh as D, b_ as O, bg as k, cg as A, ci as j, ct as M, ec as N, fg as P, gr as te, hg as ne, hr as re, ic as F, ig as ie, jg as ae, kg as oe, lt as se, nc as I, st as ce, t as le, x_ as L, xf as R, xg as ue, yg as de, yr as fe, zm as pe, zs as z } from "./utils-DtKQl-D3.js";
|
|
4
|
+
import { Eh as me, Hm as he, Im as ge, Jd as B, ah as _e, bd as ve, cd as ye, cy as be, hd as xe, it as V, kd as H, nf as Se, nn as Ce, py as we, td as Te, vg as Ee, vr as De, wd as U, yr as Oe } from "./keybindings-D0pBlT1k.js";
|
|
5
|
+
import { Zt as ke } from "./themePalette-C-GtwwqV.js";
|
|
6
|
+
import { u as Ae } from "./network-wuXD7-is.js";
|
|
7
|
+
import { $ as je, Cn as Me, En as Ne, On as W, Ot as Pe, Tn as Fe, et as G, hn as Ie } from "./threadSearch-sHEENLiT.js";
|
|
8
|
+
import { a as Le } from "./search-3oqTSaO6.js";
|
|
9
|
+
import { r as Re, t as ze } from "./unlink-2-CRzwRyat.js";
|
|
10
|
+
import { r as Be } from "./triangle-alert-CpJvcOXh.js";
|
|
11
|
+
import { t as Ve } from "./mouse-pointer-2-DfAsE-c4.js";
|
|
12
|
+
import { t as He } from "./x-Bjr9Dwvl.js";
|
|
13
|
+
import { a as Ue, c as We, i as Ge, o as Ke, r as qe, s as Je, t as Ye } from "./select-DLFnkZsI.js";
|
|
14
|
+
import "./errors-D8_Zn8KN.js";
|
|
15
|
+
import { n as Xe, r as Ze } from "./useSettings-Due4XCTB.js";
|
|
16
|
+
import { S as Qe, s as $e } from "./presentation-68y8EAuH.js";
|
|
17
|
+
import { l as et, r as tt, s as nt, u as rt } from "./PreviewPanelShell-Dezxjg0T.js";
|
|
18
|
+
import { n as it } from "./query-BPk2W3QN.js";
|
|
19
|
+
import { F as at, I as ot } from "./workspaceFocus-MR1plm6A.js";
|
|
20
|
+
import { In as st, Pn as ct } from "./fileExplorerLabel-DMdkA7jY.js";
|
|
21
|
+
import { t as lt } from "./observeResize-DRQ9DVLE.js";
|
|
22
|
+
import { useEffect as ut, useEffectEvent as dt, useImperativeHandle as ft, useLayoutEffect as pt, useRef as K, useState as q, useSyncExternalStore as mt } from "react";
|
|
23
|
+
import { c as J } from "react/compiler-runtime";
|
|
24
|
+
import { Fragment as ht, jsx as Y, jsxs as X } from "react/jsx-runtime";
|
|
25
25
|
// src/components/preview/usePreviewSession.ts
|
|
26
|
-
var
|
|
26
|
+
var gt = class extends H()("PreviewSessionThreadKeyParseError", { threadKey: U }) {
|
|
27
27
|
get message() {
|
|
28
28
|
return `Invalid scoped preview thread key: ${this.threadKey}`;
|
|
29
29
|
}
|
|
30
|
-
},
|
|
30
|
+
}, _t = T((e) => {
|
|
31
31
|
let t = l(e);
|
|
32
|
-
if (t === null) throw new
|
|
33
|
-
let n =
|
|
32
|
+
if (t === null) throw new gt({ threadKey: e });
|
|
33
|
+
let n = W.list({
|
|
34
34
|
environmentId: t.environmentId,
|
|
35
35
|
input: { threadId: t.threadId }
|
|
36
|
-
}), r =
|
|
36
|
+
}), r = W.events({
|
|
37
37
|
environmentId: t.environmentId,
|
|
38
38
|
input: {}
|
|
39
39
|
});
|
|
40
|
-
return
|
|
40
|
+
return y((e) => {
|
|
41
41
|
let i = !1, a = 0, o = (r) => {
|
|
42
|
-
!r.waiting &&
|
|
42
|
+
!r.waiting && ue(r) && (E(t, r.value), g(t).listLoaded || queueMicrotask(() => {
|
|
43
43
|
i || e.refresh(n);
|
|
44
44
|
}));
|
|
45
45
|
}, s = (r) => {
|
|
46
|
-
if (!
|
|
47
|
-
let i =
|
|
48
|
-
i !== null && i !== r.value.serverEpoch ? e.refresh(n) :
|
|
46
|
+
if (!ue(r) || r.value.threadId !== t.threadId) return;
|
|
47
|
+
let i = g(t).serverEpoch;
|
|
48
|
+
i !== null && i !== r.value.serverEpoch ? e.refresh(n) : z(t, r.value);
|
|
49
49
|
};
|
|
50
50
|
e.addFinalizer(() => {
|
|
51
51
|
i = !0;
|
|
@@ -58,63 +58,63 @@ var ht = class extends H()("PreviewSessionThreadKeyParseError", { threadKey: W }
|
|
|
58
58
|
}), e.mount(n), e.mount(r), queueMicrotask(() => {
|
|
59
59
|
if (i) return;
|
|
60
60
|
let t = e.once(n);
|
|
61
|
-
!
|
|
61
|
+
!k(t) && !t.waiting && e.refresh(n), a === 0 && s(c);
|
|
62
62
|
});
|
|
63
|
-
}).pipe(
|
|
63
|
+
}).pipe(ie(1e3), A(`preview:session-sync:${e}`));
|
|
64
64
|
});
|
|
65
|
-
function
|
|
66
|
-
let t =
|
|
67
|
-
t[0] === e ? n = t[1] : (n =
|
|
65
|
+
function vt(e) {
|
|
66
|
+
let t = J(2), n;
|
|
67
|
+
t[0] === e ? n = t[1] : (n = _t(ae(e)), t[0] = e, t[1] = n), _(n);
|
|
68
68
|
}
|
|
69
|
-
|
|
70
|
-
let t =
|
|
69
|
+
y(() => void 0), T((e) => {
|
|
70
|
+
let t = W.events({
|
|
71
71
|
environmentId: e,
|
|
72
72
|
input: {}
|
|
73
73
|
});
|
|
74
|
-
return
|
|
74
|
+
return y((n) => {
|
|
75
75
|
let r = /* @__PURE__ */ new Map();
|
|
76
76
|
n.addFinalizer(() => {
|
|
77
77
|
for (let e of r.values()) e();
|
|
78
78
|
}), n.subscribe(t, (t) => {
|
|
79
|
-
if (!
|
|
79
|
+
if (!ue(t) || t.value.type === "closed") return;
|
|
80
80
|
let i = t.value.threadId;
|
|
81
81
|
if (r.has(i)) return;
|
|
82
|
-
let a =
|
|
83
|
-
Object.keys(e.sessions).length > 0 ?
|
|
82
|
+
let a = ae(oe(e, Te.make(i))), o = n.registry.mount(_t(a)), s = !1, c = n.registry.subscribe(p(a), (e) => {
|
|
83
|
+
Object.keys(e.sessions).length > 0 ? s = !0 : s && e.suppressedTabIds.size === 0 && l();
|
|
84
84
|
}, { immediate: !0 });
|
|
85
|
-
function
|
|
86
|
-
|
|
85
|
+
function l() {
|
|
86
|
+
c(), o(), r.delete(i);
|
|
87
87
|
}
|
|
88
|
-
r.set(i,
|
|
88
|
+
r.set(i, l);
|
|
89
89
|
}, { immediate: !0 });
|
|
90
|
-
}).pipe(
|
|
90
|
+
}).pipe(A(`preview:desktop-hosted-sync:${e}`));
|
|
91
91
|
});
|
|
92
92
|
// src/browser/annotationTheme.ts
|
|
93
|
-
var
|
|
94
|
-
function
|
|
93
|
+
var Z = (e, t, n) => e.getPropertyValue(t).trim() || n;
|
|
94
|
+
function yt() {
|
|
95
95
|
let e = document.documentElement, t = getComputedStyle(e);
|
|
96
96
|
return {
|
|
97
97
|
colorScheme: e.classList.contains("dark") ? "dark" : "light",
|
|
98
|
-
radius:
|
|
99
|
-
background:
|
|
100
|
-
foreground:
|
|
101
|
-
popover:
|
|
102
|
-
popoverForeground:
|
|
103
|
-
primary:
|
|
104
|
-
primaryForeground:
|
|
105
|
-
muted:
|
|
106
|
-
mutedForeground:
|
|
107
|
-
accent:
|
|
108
|
-
accentForeground:
|
|
109
|
-
border:
|
|
110
|
-
input:
|
|
111
|
-
ring:
|
|
112
|
-
fontSans:
|
|
113
|
-
fontMono:
|
|
98
|
+
radius: Z(t, "--radius", "0.625rem"),
|
|
99
|
+
background: Z(t, "--background", "white"),
|
|
100
|
+
foreground: Z(t, "--contrast-foreground", "oklch(0.269 0 0)"),
|
|
101
|
+
popover: Z(t, "--popover", "white"),
|
|
102
|
+
popoverForeground: Z(t, "--contrast-popover-foreground", "oklch(0.269 0 0)"),
|
|
103
|
+
primary: Z(t, "--primary", "oklch(0.488 0.217 264)"),
|
|
104
|
+
primaryForeground: Z(t, "--primary-foreground", "white"),
|
|
105
|
+
muted: Z(t, "--muted", "rgb(0 0 0 / 4%)"),
|
|
106
|
+
mutedForeground: Z(t, "--contrast-muted-foreground", "oklch(0.556 0 0)"),
|
|
107
|
+
accent: Z(t, "--accent", "rgb(0 0 0 / 4%)"),
|
|
108
|
+
accentForeground: Z(t, "--contrast-accent-foreground", "oklch(0.269 0 0)"),
|
|
109
|
+
border: Z(t, "--contrast-border", "rgb(0 0 0 / 8%)"),
|
|
110
|
+
input: Z(t, "--contrast-input", "rgb(0 0 0 / 10%)"),
|
|
111
|
+
ring: Z(t, "--ring", "oklch(0.488 0.217 264)"),
|
|
112
|
+
fontSans: Z(t, "--font-sans", t.fontFamily || "system-ui, sans-serif"),
|
|
113
|
+
fontMono: Z(t, "--font-mono", "ui-monospace, monospace")
|
|
114
114
|
};
|
|
115
115
|
}
|
|
116
116
|
// src/browser/browserPointerStore.ts
|
|
117
|
-
var
|
|
117
|
+
var bt = se()((e) => ({
|
|
118
118
|
byTabId: {},
|
|
119
119
|
apply: (t) => e((e) => ({ byTabId: {
|
|
120
120
|
...e.byTabId,
|
|
@@ -125,98 +125,98 @@ var yt = se()((e) => ({
|
|
|
125
125
|
let { [t]: n, ...r } = e.byTabId;
|
|
126
126
|
return { byTabId: r };
|
|
127
127
|
})
|
|
128
|
-
})),
|
|
129
|
-
function
|
|
130
|
-
let t =
|
|
131
|
-
if (
|
|
128
|
+
})), xt = B(V);
|
|
129
|
+
function St(e) {
|
|
130
|
+
let t = xt(e);
|
|
131
|
+
if (we(t)) throw t.value;
|
|
132
132
|
return e;
|
|
133
133
|
}
|
|
134
|
-
var
|
|
135
|
-
...
|
|
136
|
-
captureScreenshot: async (e) =>
|
|
134
|
+
var Ct = typeof window > "u" ? null : window.desktopBridge?.preview ?? null, wt = Ct ? {
|
|
135
|
+
...Ct,
|
|
136
|
+
captureScreenshot: async (e) => St(await Ct.captureScreenshot(e)),
|
|
137
137
|
recording: {
|
|
138
|
-
...
|
|
139
|
-
startScreencast: async (e) =>
|
|
138
|
+
...Ct.recording,
|
|
139
|
+
startScreencast: async (e) => St(await Ct.recording.startScreencast(e))
|
|
140
140
|
}
|
|
141
|
-
} : null,
|
|
142
|
-
function Dt(e) {
|
|
143
|
-
return e.includes(":") ? `[${e}]` : e;
|
|
144
|
-
}
|
|
141
|
+
} : null, Tt = 4096, Et = 3e5, Dt = 255;
|
|
145
142
|
function Ot(e) {
|
|
146
|
-
return
|
|
143
|
+
return e.includes(":") ? `[${e}]` : e;
|
|
147
144
|
}
|
|
148
145
|
function kt(e) {
|
|
149
|
-
|
|
146
|
+
return typeof e == "number" && Number.isFinite(e) && e >= 0 && e <= 864e13 && e <= Date.now() + Et;
|
|
147
|
+
}
|
|
148
|
+
function At(e) {
|
|
149
|
+
if (e.length === 0 || e.length > Tt) return null;
|
|
150
150
|
let t = e.indexOf(" ");
|
|
151
151
|
if (t <= 0) return null;
|
|
152
152
|
let n = e.slice(0, t), r = e.slice(t + 1);
|
|
153
153
|
try {
|
|
154
154
|
let t = new URL(r);
|
|
155
155
|
if (t.protocol !== "http:" && t.protocol !== "https:" || t.pathname !== "/" || t.search !== "" || t.hash !== "" || t.username !== "" || t.password !== "") return null;
|
|
156
|
-
if (
|
|
156
|
+
if (x(t.hostname) !== "local") return e;
|
|
157
157
|
let i = t.port || (t.protocol === "https:" ? "443" : "80");
|
|
158
158
|
return `${n} ${t.protocol}//localhost:${i}`;
|
|
159
159
|
} catch {
|
|
160
160
|
return null;
|
|
161
161
|
}
|
|
162
162
|
}
|
|
163
|
-
function
|
|
164
|
-
if (typeof e != "string" || e.length >
|
|
165
|
-
let t =
|
|
163
|
+
function jt(e) {
|
|
164
|
+
if (typeof e != "string" || e.length > Dt) return null;
|
|
165
|
+
let t = x(e);
|
|
166
166
|
if (!t || t !== e) return null;
|
|
167
167
|
try {
|
|
168
|
-
let e = new URL(`http://${
|
|
169
|
-
return
|
|
168
|
+
let e = new URL(`http://${Ot(t)}`);
|
|
169
|
+
return x(e.hostname) === t ? t : null;
|
|
170
170
|
} catch {
|
|
171
171
|
return null;
|
|
172
172
|
}
|
|
173
173
|
}
|
|
174
|
-
function
|
|
174
|
+
function Mt(e, t, n) {
|
|
175
175
|
if (e.length === 0) return null;
|
|
176
176
|
try {
|
|
177
177
|
let r = new URL(t);
|
|
178
178
|
if (r.protocol !== "http:" && r.protocol !== "https:") return null;
|
|
179
|
-
let i =
|
|
180
|
-
return `${e} ${r.protocol}//${
|
|
179
|
+
let i = x(r.hostname), a = pe(i) || i === "0.0.0.0" || n !== null && i === x(n) ? "localhost" : i, o = r.port || (r.protocol === "https:" ? "443" : "80");
|
|
180
|
+
return `${e} ${r.protocol}//${Ot(a)}:${o}`;
|
|
181
181
|
} catch {
|
|
182
182
|
return null;
|
|
183
183
|
}
|
|
184
184
|
}
|
|
185
|
-
function
|
|
185
|
+
function Nt(e) {
|
|
186
186
|
if (typeof e != "string" || !e.startsWith("data:image/png;base64,") || e.length > 8192) return !1;
|
|
187
187
|
let t = e.slice(22);
|
|
188
188
|
return t.length > 0 && t.length % 4 != 1 && !/[^a-z0-9+/=]/i.test(t) && /^[a-z0-9+/]*={0,2}$/i.test(t);
|
|
189
189
|
}
|
|
190
|
-
function
|
|
190
|
+
function Pt(e) {
|
|
191
191
|
let t = Object.keys(e);
|
|
192
192
|
return t.length <= 40 ? e : Object.fromEntries(t.toSorted((t, n) => (e[n]?.capturedAt ?? 0) - (e[t]?.capturedAt ?? 0)).slice(0, 40).map((t) => [t, e[t]]));
|
|
193
193
|
}
|
|
194
|
-
function
|
|
194
|
+
function Ft(e) {
|
|
195
195
|
if (!e || typeof e != "object") return { byKey: {} };
|
|
196
196
|
let t = "byKey" in e ? e.byKey : null;
|
|
197
197
|
if (!t || typeof t != "object" || Array.isArray(t)) return { byKey: {} };
|
|
198
198
|
let n = {};
|
|
199
199
|
for (let [e, r] of Object.entries(t)) {
|
|
200
|
-
let t =
|
|
200
|
+
let t = At(e);
|
|
201
201
|
if (!t || !r || typeof r != "object") continue;
|
|
202
202
|
let { dataUrl: i, capturedAt: a } = r;
|
|
203
|
-
if (!
|
|
204
|
-
let o = r.aliases, s = Array.isArray(o) ? [...new Set(o.map(
|
|
203
|
+
if (!Nt(i) || !kt(a)) continue;
|
|
204
|
+
let o = r.aliases, s = Array.isArray(o) ? [...new Set(o.map(jt).filter((e) => e !== null))].slice(0, 4) : [], c = n[t], l = !c || a > c.capturedAt, u = [.../* @__PURE__ */ new Set([...l ? s : c?.aliases ?? [], ...l ? c?.aliases ?? [] : s])].slice(0, 4);
|
|
205
205
|
n[t] = {
|
|
206
206
|
dataUrl: l ? i : c.dataUrl,
|
|
207
207
|
capturedAt: l ? a : c.capturedAt,
|
|
208
208
|
...u.length > 0 ? { aliases: u } : {}
|
|
209
209
|
};
|
|
210
210
|
}
|
|
211
|
-
return { byKey:
|
|
211
|
+
return { byKey: Pt(n) };
|
|
212
212
|
}
|
|
213
213
|
// src/browserFaviconStore.ts
|
|
214
|
-
var
|
|
215
|
-
function
|
|
216
|
-
return
|
|
214
|
+
var It = "hanzodev:browser-favicons:v1";
|
|
215
|
+
function Lt(e) {
|
|
216
|
+
return Mt("pending", e, null)?.slice(8) ?? null;
|
|
217
217
|
}
|
|
218
|
-
function
|
|
219
|
-
let e =
|
|
218
|
+
function Rt() {
|
|
219
|
+
let e = w(), t = /* @__PURE__ */ new Set(), n;
|
|
220
220
|
try {
|
|
221
221
|
if (typeof window > "u") return e;
|
|
222
222
|
n = window.localStorage;
|
|
@@ -250,13 +250,13 @@ function Lt() {
|
|
|
250
250
|
}
|
|
251
251
|
};
|
|
252
252
|
}
|
|
253
|
-
var
|
|
253
|
+
var zt = se()(M((e) => ({
|
|
254
254
|
byKey: {},
|
|
255
255
|
pendingByThreadKey: {},
|
|
256
256
|
recordFavicon: (t, n, r, i = []) => e((e) => {
|
|
257
|
-
if (!
|
|
257
|
+
if (!Nt(n) || !kt(r)) return e;
|
|
258
258
|
let a = e.byKey[t], o = r > (a?.capturedAt ?? -1) ? [...i, ...a?.aliases ?? []] : [...a?.aliases ?? [], ...i], s = [...new Set(o)].slice(0, 4), c = s.length === (a?.aliases?.length ?? 0) && s.every((e, t) => e === a?.aliases?.[t]);
|
|
259
|
-
return a && r <= a.capturedAt && c ? e : { byKey:
|
|
259
|
+
return a && r <= a.capturedAt && c ? e : { byKey: Pt({
|
|
260
260
|
...e.byKey,
|
|
261
261
|
[t]: {
|
|
262
262
|
dataUrl: r > (a?.capturedAt ?? -1) ? n : a.dataUrl,
|
|
@@ -266,59 +266,59 @@ var Rt = se()(N((e) => ({
|
|
|
266
266
|
}) };
|
|
267
267
|
})
|
|
268
268
|
}), {
|
|
269
|
-
name:
|
|
269
|
+
name: It,
|
|
270
270
|
version: 1,
|
|
271
|
-
storage:
|
|
271
|
+
storage: ce(Rt),
|
|
272
272
|
partialize: (e) => ({ byKey: e.byKey }),
|
|
273
|
-
migrate:
|
|
274
|
-
merge:
|
|
273
|
+
migrate: Ft,
|
|
274
|
+
merge: Bt
|
|
275
275
|
}));
|
|
276
|
-
function
|
|
276
|
+
function Bt(e, t) {
|
|
277
277
|
return {
|
|
278
278
|
...t,
|
|
279
|
-
...
|
|
279
|
+
...Ft(e)
|
|
280
280
|
};
|
|
281
281
|
}
|
|
282
|
-
function
|
|
283
|
-
let t =
|
|
282
|
+
function Vt(e) {
|
|
283
|
+
let t = J(7), n = Pe(e), r;
|
|
284
284
|
t[0] === e ? r = t[1] : (r = (t) => {
|
|
285
285
|
let n = t.getDraftSessionByRef(e);
|
|
286
|
-
return n ?
|
|
286
|
+
return n ? o(v(n.environmentId, n.projectId)) : null;
|
|
287
287
|
}, t[0] = e, t[1] = r);
|
|
288
|
-
let i =
|
|
288
|
+
let i = f(r);
|
|
289
289
|
if (n?.projectId) {
|
|
290
290
|
let r;
|
|
291
|
-
return t[2] !== n.projectId || t[3] !== e.environmentId ? (r =
|
|
291
|
+
return t[2] !== n.projectId || t[3] !== e.environmentId ? (r = v(e.environmentId, n.projectId), t[2] = n.projectId, t[3] = e.environmentId, t[4] = r) : r = t[4], r;
|
|
292
292
|
}
|
|
293
293
|
let a;
|
|
294
|
-
return t[5] === i ? a = t[6] : (a = i === null ? null :
|
|
295
|
-
}
|
|
296
|
-
function
|
|
297
|
-
let r =
|
|
298
|
-
r[0] === a ?
|
|
299
|
-
let
|
|
300
|
-
r[2] === t ?
|
|
301
|
-
let
|
|
302
|
-
return r[4] !==
|
|
303
|
-
}
|
|
304
|
-
function
|
|
305
|
-
let a =
|
|
294
|
+
return t[5] === i ? a = t[6] : (a = i === null ? null : d(i), t[5] = i, t[6] = a), a;
|
|
295
|
+
}
|
|
296
|
+
function Ht(t, n) {
|
|
297
|
+
let r = J(9), i = Vt(t), a = e(t.environmentId), o;
|
|
298
|
+
r[0] === a ? o = r[1] : (o = we(a) ? new URL(a.value.httpBaseUrl).hostname : null, r[0] = a, r[1] = o);
|
|
299
|
+
let s = o, c;
|
|
300
|
+
r[2] === t ? c = r[3] : (c = ae(t), r[2] = t, r[3] = c);
|
|
301
|
+
let l = c, u;
|
|
302
|
+
return r[4] !== s || r[5] !== i || r[6] !== l || r[7] !== n ? (u = (e) => Ut(e, l, i, n, s), r[4] = s, r[5] = i, r[6] = l, r[7] = n, r[8] = u) : u = r[8], zt(u);
|
|
303
|
+
}
|
|
304
|
+
function Ut(e, t, n, r, i) {
|
|
305
|
+
let a = Wt(e.byKey, n, r, i), o = Lt(r), s = o ? e.pendingByThreadKey[t]?.[o] : void 0;
|
|
306
306
|
return s && (!a || s.capturedAt > a.capturedAt) ? s.dataUrl : a?.dataUrl ?? null;
|
|
307
307
|
}
|
|
308
|
-
function
|
|
309
|
-
let i = t ?
|
|
308
|
+
function Wt(e, t, n, r) {
|
|
309
|
+
let i = t ? Mt(o(t), n, r) : null;
|
|
310
310
|
if (!i) return null;
|
|
311
311
|
let a = e[i];
|
|
312
312
|
if (a) return a;
|
|
313
313
|
try {
|
|
314
|
-
let r =
|
|
314
|
+
let r = x(new URL(n).hostname), i = Mt(o(t), n, r), a = i ? e[i] : null;
|
|
315
315
|
return a?.aliases?.includes(r) ? a : null;
|
|
316
316
|
} catch {
|
|
317
317
|
return null;
|
|
318
318
|
}
|
|
319
319
|
}
|
|
320
320
|
// src/browser/browserSurfaceStore.ts
|
|
321
|
-
var
|
|
321
|
+
var Gt = (e, t) => e !== null && e.x === t.x && e.y === t.y && e.width === t.width && e.height === t.height, Q = se()((e) => ({
|
|
322
322
|
activityByTabId: {},
|
|
323
323
|
byTabId: {},
|
|
324
324
|
acquireActivity: (t) => {
|
|
@@ -352,7 +352,7 @@ var Wt = (e, t) => e !== null && e.x === t.x && e.y === t.y && e.width === t.wid
|
|
|
352
352
|
}),
|
|
353
353
|
present: (t, n, r, i, a, o) => e((e) => {
|
|
354
354
|
let s = e.byTabId[t];
|
|
355
|
-
return s?.owner !== n || s && s.visible === i && s.cornerRadius === a && s.zIndex === o &&
|
|
355
|
+
return s?.owner !== n || s && s.visible === i && s.cornerRadius === a && s.zIndex === o && Gt(s.rect, r) ? e : { byTabId: {
|
|
356
356
|
...e.byTabId,
|
|
357
357
|
[t]: {
|
|
358
358
|
...s,
|
|
@@ -405,25 +405,25 @@ var Wt = (e, t) => e !== null && e.x === t.x && e.y === t.y && e.width === t.wid
|
|
|
405
405
|
}
|
|
406
406
|
} } : e;
|
|
407
407
|
})
|
|
408
|
-
})),
|
|
409
|
-
function
|
|
408
|
+
})), Kt = (e) => Q.getState().acquireActivity(e);
|
|
409
|
+
function qt(e, t = !1) {
|
|
410
410
|
let n = Symbol(`browser-surface:${e}`), r = !1;
|
|
411
|
-
return
|
|
412
|
-
present: (t, i, a = 0, o = 30) => r ||
|
|
411
|
+
return Q.getState().claim(e, n, t), {
|
|
412
|
+
present: (t, i, a = 0, o = 30) => r || Q.getState().byTabId[e]?.owner !== n ? !1 : (Q.getState().present(e, n, t, i, a, o), !0),
|
|
413
413
|
release: () => {
|
|
414
|
-
r || (r = !0,
|
|
414
|
+
r || (r = !0, Q.getState().release(e, n));
|
|
415
415
|
}
|
|
416
416
|
};
|
|
417
417
|
}
|
|
418
418
|
// src/browser/recordingCompositor.ts
|
|
419
|
-
async function
|
|
419
|
+
async function Jt(e, t, n) {
|
|
420
420
|
let r = document.createElement("canvas"), i = r.getContext("2d", { alpha: !1 });
|
|
421
421
|
if (!i) throw Error("Recording canvas is unavailable.");
|
|
422
422
|
let a = document.createElement("video");
|
|
423
423
|
a.muted = !0, a.playsInline = !0, a.srcObject = e;
|
|
424
424
|
let o = e.getVideoTracks()[0]?.getSettings();
|
|
425
425
|
r.width = o?.width ?? 1920, r.height = o?.height ?? 1080;
|
|
426
|
-
let s = new
|
|
426
|
+
let s = new Yt(t, yt().primary), c = !1, l = !1, u, d, f = () => {
|
|
427
427
|
if (c || a.readyState < 2) return;
|
|
428
428
|
l ||= (r.width = a.videoWidth || r.width, r.height = a.videoHeight || r.height, !0);
|
|
429
429
|
let e = a.videoWidth || r.width, t = a.videoHeight || r.height, n = Math.min(r.width / e, r.height / t), o = Math.round(e * n), u = Math.round(t * n), p = Math.floor((r.width - o) / 2), m = Math.floor((r.height - u) / 2);
|
|
@@ -451,7 +451,7 @@ async function qt(e, t, n) {
|
|
|
451
451
|
throw g(), e;
|
|
452
452
|
}
|
|
453
453
|
}
|
|
454
|
-
var
|
|
454
|
+
var Yt = class {
|
|
455
455
|
options;
|
|
456
456
|
primaryColor;
|
|
457
457
|
ring = null;
|
|
@@ -499,34 +499,34 @@ var Jt = class {
|
|
|
499
499
|
e.fillStyle = "rgba(32,32,34,.86)", e.beginPath(), e.roundRect(s, c, r, a, 14 * i), e.fill(), e.fillStyle = "white", e.textAlign = "center", e.textBaseline = "middle", e.fillText(o.label, t / 2, c + a / 2, r - 24 * i), e.restore();
|
|
500
500
|
}
|
|
501
501
|
}
|
|
502
|
-
},
|
|
502
|
+
}, Xt = Se(V), Zt = class extends H()("BrowserRecordingUnavailableError", { tabId: U }) {
|
|
503
503
|
get message() {
|
|
504
504
|
return `Browser recording is unavailable for tab ${this.tabId}.`;
|
|
505
505
|
}
|
|
506
|
-
},
|
|
507
|
-
requestedTabId:
|
|
508
|
-
activeTabId:
|
|
506
|
+
}, Qt = class extends H()("BrowserRecordingConflictError", {
|
|
507
|
+
requestedTabId: U,
|
|
508
|
+
activeTabId: U
|
|
509
509
|
}) {
|
|
510
510
|
get message() {
|
|
511
511
|
return `Cannot record tab ${this.requestedTabId} while tab ${this.activeTabId} is already being recorded.`;
|
|
512
512
|
}
|
|
513
|
-
},
|
|
513
|
+
}, $t = class extends H()("BrowserRecordingStartCancelledError", { tabId: U }) {
|
|
514
514
|
get message() {
|
|
515
515
|
return `Browser recording start was cancelled for tab ${this.tabId}.`;
|
|
516
516
|
}
|
|
517
|
-
},
|
|
517
|
+
}, en = class extends H()("BrowserRecordingFormatUnavailableError", { tabId: U }) {
|
|
518
518
|
get message() {
|
|
519
519
|
return `MediaRecorder did not report an output format for tab ${this.tabId}.`;
|
|
520
520
|
}
|
|
521
|
-
},
|
|
522
|
-
tabId:
|
|
523
|
-
timeoutMs:
|
|
521
|
+
}, tn = class extends H()("BrowserRecordingCaptureTimeoutError", {
|
|
522
|
+
tabId: U,
|
|
523
|
+
timeoutMs: ve
|
|
524
524
|
}) {
|
|
525
525
|
get message() {
|
|
526
526
|
return `Browser recording media capture for tab ${this.tabId} did not settle within ${this.timeoutMs}ms.`;
|
|
527
527
|
}
|
|
528
|
-
},
|
|
529
|
-
operation:
|
|
528
|
+
}, $ = class extends H()("BrowserRecordingOperationError", {
|
|
529
|
+
operation: xe([
|
|
530
530
|
"initialize-media-recorder",
|
|
531
531
|
"capture-media-stream",
|
|
532
532
|
"start-media-recorder",
|
|
@@ -537,17 +537,17 @@ var Jt = class {
|
|
|
537
537
|
"save-artifact",
|
|
538
538
|
"cleanup"
|
|
539
539
|
]),
|
|
540
|
-
tabId:
|
|
541
|
-
cause:
|
|
540
|
+
tabId: U,
|
|
541
|
+
cause: ye()
|
|
542
542
|
}) {
|
|
543
543
|
get message() {
|
|
544
|
-
if (
|
|
544
|
+
if (Xt(this.cause)) return this.cause.message;
|
|
545
545
|
let e = this.cause instanceof AggregateError ? this.cause.cause : this.cause;
|
|
546
546
|
return this.operation === "capture-media-stream" && e instanceof DOMException && e.name === "NotReadableError" ? `Unable to start the preview video source. Make sure the capture host is unlocked and its display is on, then retry. ${e.name}: ${e.message}` : `Browser recording operation ${this.operation} failed for tab ${this.tabId}.`;
|
|
547
547
|
}
|
|
548
|
-
}, nn = Se(
|
|
548
|
+
}, nn = Se($), rn = Se(tn), an = Se($t), on = y({ tabIds: /* @__PURE__ */ new Set() }).pipe(D, A("preview:active-browser-recording-tabs"));
|
|
549
549
|
function sn() {
|
|
550
|
-
return
|
|
550
|
+
return _(on).tabIds;
|
|
551
551
|
}
|
|
552
552
|
var cn = /* @__PURE__ */ new Map(), ln = Promise.resolve(), un = 0, dn = () => {
|
|
553
553
|
let e, t = {
|
|
@@ -578,7 +578,7 @@ var cn = /* @__PURE__ */ new Map(), ln = Promise.resolve(), un = 0, dn = () => {
|
|
|
578
578
|
result: n
|
|
579
579
|
};
|
|
580
580
|
}, pn = () => {
|
|
581
|
-
|
|
581
|
+
I.set(on, { tabIds: new Set(cn.keys()) });
|
|
582
582
|
}, mn = 5e3, hn = 250;
|
|
583
583
|
function gn(e) {
|
|
584
584
|
return Array.from(cn.values()).flatMap((t) => t.threadRef?.environmentId === e.environmentId && t.threadRef.threadId === e.threadId ? [{
|
|
@@ -643,7 +643,7 @@ var Tn = async (e, t) => {
|
|
|
643
643
|
let n = !0, r = null, i = t.then((e) => (n || Sn(e), e));
|
|
644
644
|
try {
|
|
645
645
|
return await Promise.race([i, new Promise((t, n) => {
|
|
646
|
-
r = window.setTimeout(() => n(new
|
|
646
|
+
r = window.setTimeout(() => n(new tn({
|
|
647
647
|
tabId: e,
|
|
648
648
|
timeoutMs: mn
|
|
649
649
|
})), mn);
|
|
@@ -688,7 +688,7 @@ var Tn = async (e, t) => {
|
|
|
688
688
|
En(t);
|
|
689
689
|
}
|
|
690
690
|
if (n.length !== 0) return n.length === 1 ? n[0] : AggregateError(n, `Browser recording startup cleanup failed for tab ${t.tabId}.`, { cause: n[0] });
|
|
691
|
-
}, kn = (e, t = /* @__PURE__ */ Error(`Browser recording startup was cancelled for tab ${e.tabId}.`)) => new
|
|
691
|
+
}, kn = (e, t = /* @__PURE__ */ Error(`Browser recording startup was cancelled for tab ${e.tabId}.`)) => new $({
|
|
692
692
|
operation: "start-screencast",
|
|
693
693
|
tabId: e.tabId,
|
|
694
694
|
cause: t
|
|
@@ -701,7 +701,7 @@ var Tn = async (e, t) => {
|
|
|
701
701
|
}, mn);
|
|
702
702
|
})]);
|
|
703
703
|
} catch (t) {
|
|
704
|
-
throw new
|
|
704
|
+
throw new $({
|
|
705
705
|
operation: "wait-startup",
|
|
706
706
|
tabId: e.tabId,
|
|
707
707
|
cause: t
|
|
@@ -711,18 +711,18 @@ var Tn = async (e, t) => {
|
|
|
711
711
|
}
|
|
712
712
|
}, Mn = (e) => nn(e) && e.operation === "wait-startup";
|
|
713
713
|
async function Nn(e, t = null, n = e) {
|
|
714
|
-
let r =
|
|
715
|
-
if (!r) throw new
|
|
714
|
+
let r = wt;
|
|
715
|
+
if (!r) throw new Zt({ tabId: e });
|
|
716
716
|
let i = cn.get(e);
|
|
717
717
|
if (i) {
|
|
718
718
|
if (i.lifecycle.phase === "recording") return i.startedAt;
|
|
719
|
-
throw new
|
|
719
|
+
throw new Qt({
|
|
720
720
|
requestedTabId: e,
|
|
721
721
|
activeTabId: i.tabId
|
|
722
722
|
});
|
|
723
723
|
}
|
|
724
724
|
let a = t === null ? null : _n(t, n);
|
|
725
|
-
if (a !== null) throw new
|
|
725
|
+
if (a !== null) throw new Qt({
|
|
726
726
|
requestedTabId: e,
|
|
727
727
|
activeTabId: a
|
|
728
728
|
});
|
|
@@ -735,7 +735,7 @@ async function Nn(e, t = null, n = e) {
|
|
|
735
735
|
chunks: s,
|
|
736
736
|
startedAt: o,
|
|
737
737
|
startupSettled: l,
|
|
738
|
-
releaseSurfaceActivity:
|
|
738
|
+
releaseSurfaceActivity: Kt(e),
|
|
739
739
|
stream: null,
|
|
740
740
|
recorder: null,
|
|
741
741
|
compositor: null,
|
|
@@ -743,10 +743,10 @@ async function Nn(e, t = null, n = e) {
|
|
|
743
743
|
};
|
|
744
744
|
cn.set(e, d), pn();
|
|
745
745
|
try {
|
|
746
|
-
await
|
|
746
|
+
await Xe().catch((e) => {
|
|
747
747
|
throw En(d), e;
|
|
748
748
|
});
|
|
749
|
-
let t =
|
|
749
|
+
let t = Ze(), n = t.browserRecordingFrameRate;
|
|
750
750
|
await Dn();
|
|
751
751
|
let i = async () => {
|
|
752
752
|
if (cn.get(e) !== d) {
|
|
@@ -758,13 +758,13 @@ async function Nn(e, t = null, n = e) {
|
|
|
758
758
|
throw kn(d);
|
|
759
759
|
}
|
|
760
760
|
}, a = fn(async () => {
|
|
761
|
-
if (u.cancelledBeforeGrant) throw new
|
|
761
|
+
if (u.cancelledBeforeGrant) throw new $t({ tabId: e });
|
|
762
762
|
u.grantStarted = !0, await i();
|
|
763
763
|
let t = wn(e, n);
|
|
764
764
|
try {
|
|
765
765
|
await r.recording.startScreencast(e);
|
|
766
766
|
} catch (n) {
|
|
767
|
-
throw t.cancel(), An(d) ? (En(d), new
|
|
767
|
+
throw t.cancel(), An(d) ? (En(d), new $({
|
|
768
768
|
operation: "start-screencast",
|
|
769
769
|
tabId: e,
|
|
770
770
|
cause: n
|
|
@@ -779,7 +779,7 @@ async function Nn(e, t = null, n = e) {
|
|
|
779
779
|
return d.stream = await Tn(e, t.capturePromise), d.stream;
|
|
780
780
|
} catch (t) {
|
|
781
781
|
let n = await On(r, d);
|
|
782
|
-
throw rn(t) && n === void 0 ? t : new
|
|
782
|
+
throw rn(t) && n === void 0 ? t : new $({
|
|
783
783
|
operation: "capture-media-stream",
|
|
784
784
|
tabId: e,
|
|
785
785
|
cause: n === void 0 ? t : AggregateError([t, n], `Browser media capture and cleanup failed for tab ${e}.`, { cause: t })
|
|
@@ -788,12 +788,12 @@ async function Nn(e, t = null, n = e) {
|
|
|
788
788
|
});
|
|
789
789
|
u.setQueuedForGrant(a.queued);
|
|
790
790
|
let c = await Promise.race([a.result, u.cancelledBeforeGrantSignal.then(() => {
|
|
791
|
-
throw new
|
|
791
|
+
throw new $t({ tabId: e });
|
|
792
792
|
})]);
|
|
793
793
|
await i();
|
|
794
794
|
let l;
|
|
795
795
|
try {
|
|
796
|
-
d.compositor = await
|
|
796
|
+
d.compositor = await Jt(c, {
|
|
797
797
|
showKeyPresses: t.browserRecordingShowKeyPresses,
|
|
798
798
|
showMousePresses: t.browserRecordingShowMousePresses,
|
|
799
799
|
frameRate: n
|
|
@@ -804,7 +804,7 @@ async function Nn(e, t = null, n = e) {
|
|
|
804
804
|
});
|
|
805
805
|
} catch (t) {
|
|
806
806
|
let n = await On(r, d);
|
|
807
|
-
throw new
|
|
807
|
+
throw new $({
|
|
808
808
|
operation: "initialize-media-recorder",
|
|
809
809
|
tabId: e,
|
|
810
810
|
cause: n === void 0 ? t : AggregateError([t, n], `Browser recording initialization and cleanup failed for tab ${e}.`, { cause: t })
|
|
@@ -814,7 +814,7 @@ async function Nn(e, t = null, n = e) {
|
|
|
814
814
|
l.start(1e3);
|
|
815
815
|
} catch (t) {
|
|
816
816
|
let n = await On(r, d);
|
|
817
|
-
throw new
|
|
817
|
+
throw new $({
|
|
818
818
|
operation: "start-media-recorder",
|
|
819
819
|
tabId: e,
|
|
820
820
|
cause: n === void 0 ? t : AggregateError([t, n], `Browser media recorder start and cleanup failed for tab ${e}.`, { cause: t })
|
|
@@ -832,7 +832,7 @@ var Pn = async (e, t) => {
|
|
|
832
832
|
try {
|
|
833
833
|
await e.recording.stopScreencast(n);
|
|
834
834
|
} catch (e) {
|
|
835
|
-
throw new
|
|
835
|
+
throw new $({
|
|
836
836
|
operation: "stop-screencast",
|
|
837
837
|
tabId: n,
|
|
838
838
|
cause: e
|
|
@@ -846,7 +846,7 @@ var Pn = async (e, t) => {
|
|
|
846
846
|
try {
|
|
847
847
|
await xn(t.recorder);
|
|
848
848
|
} catch (e) {
|
|
849
|
-
throw new
|
|
849
|
+
throw new $({
|
|
850
850
|
operation: "stop-media-recorder",
|
|
851
851
|
tabId: n,
|
|
852
852
|
cause: e
|
|
@@ -854,7 +854,7 @@ var Pn = async (e, t) => {
|
|
|
854
854
|
}
|
|
855
855
|
t.compositor?.dispose(), t.compositor = null, Sn(t.stream), t.stream = null;
|
|
856
856
|
let i = t.recorder.mimeType || t.chunks.find((e) => e.type.length > 0)?.type;
|
|
857
|
-
if (!i) throw new
|
|
857
|
+
if (!i) throw new en({ tabId: n });
|
|
858
858
|
try {
|
|
859
859
|
let a = new Blob(t.chunks, { type: i });
|
|
860
860
|
r = {
|
|
@@ -862,7 +862,7 @@ var Pn = async (e, t) => {
|
|
|
862
862
|
artifact: await e.recording.save(n, i, new Uint8Array(await a.arrayBuffer()))
|
|
863
863
|
};
|
|
864
864
|
} catch (e) {
|
|
865
|
-
throw new
|
|
865
|
+
throw new $({
|
|
866
866
|
operation: "save-artifact",
|
|
867
867
|
tabId: n,
|
|
868
868
|
cause: e
|
|
@@ -889,12 +889,12 @@ var Pn = async (e, t) => {
|
|
|
889
889
|
} finally {
|
|
890
890
|
En(t);
|
|
891
891
|
}
|
|
892
|
-
let a = i.length === 0 ? void 0 : new
|
|
892
|
+
let a = i.length === 0 ? void 0 : new $({
|
|
893
893
|
operation: "cleanup",
|
|
894
894
|
tabId: n,
|
|
895
895
|
cause: i.length === 1 ? i[0] : AggregateError(i, `Browser recording media cleanup failed for tab ${n}.`, { cause: i[0] })
|
|
896
896
|
});
|
|
897
|
-
if (r._tag === "Failure") throw a ? new
|
|
897
|
+
if (r._tag === "Failure") throw a ? new $({
|
|
898
898
|
operation: "cleanup",
|
|
899
899
|
tabId: n,
|
|
900
900
|
cause: AggregateError([r.error, a], `Browser recording stop and cleanup failed for tab ${n}.`, { cause: r.error })
|
|
@@ -909,7 +909,7 @@ var Pn = async (e, t) => {
|
|
|
909
909
|
}
|
|
910
910
|
};
|
|
911
911
|
function In(e) {
|
|
912
|
-
let t =
|
|
912
|
+
let t = wt, n = cn.get(e);
|
|
913
913
|
if (!t || !n) return Promise.resolve(null);
|
|
914
914
|
if (n.lifecycle.phase === "stopping") return n.lifecycle.stopPromise;
|
|
915
915
|
n.lifecycle.phase === "starting" && n.lifecycle.cancelBeforeGrant();
|
|
@@ -1049,7 +1049,7 @@ var Ln = {
|
|
|
1049
1049
|
width: 1280,
|
|
1050
1050
|
height: 800
|
|
1051
1051
|
}
|
|
1052
|
-
}, Rn =
|
|
1052
|
+
}, Rn = Oe.map((e) => ({
|
|
1053
1053
|
id: e,
|
|
1054
1054
|
...Ln[e]
|
|
1055
1055
|
}));
|
|
@@ -1079,8 +1079,8 @@ async function Bn(e, t, n, r) {
|
|
|
1079
1079
|
}
|
|
1080
1080
|
// src/browser/ScreenRotationIcon.tsx
|
|
1081
1081
|
function Vn() {
|
|
1082
|
-
let e =
|
|
1083
|
-
return e[0] === Symbol.for("react.memo_cache_sentinel") ? (t = /* @__PURE__ */
|
|
1082
|
+
let e = J(1), t;
|
|
1083
|
+
return e[0] === Symbol.for("react.memo_cache_sentinel") ? (t = /* @__PURE__ */ X("svg", {
|
|
1084
1084
|
viewBox: "0 0 24 24",
|
|
1085
1085
|
fill: "none",
|
|
1086
1086
|
stroke: "currentColor",
|
|
@@ -1089,7 +1089,7 @@ function Vn() {
|
|
|
1089
1089
|
strokeLinejoin: "round",
|
|
1090
1090
|
"aria-hidden": "true",
|
|
1091
1091
|
children: [
|
|
1092
|
-
/* @__PURE__ */
|
|
1092
|
+
/* @__PURE__ */ Y("rect", {
|
|
1093
1093
|
x: "7.25",
|
|
1094
1094
|
y: "7.25",
|
|
1095
1095
|
width: "9.5",
|
|
@@ -1097,10 +1097,10 @@ function Vn() {
|
|
|
1097
1097
|
rx: "1.4",
|
|
1098
1098
|
transform: "rotate(-45 12 12)"
|
|
1099
1099
|
}),
|
|
1100
|
-
/* @__PURE__ */
|
|
1101
|
-
/* @__PURE__ */
|
|
1102
|
-
/* @__PURE__ */
|
|
1103
|
-
/* @__PURE__ */
|
|
1100
|
+
/* @__PURE__ */ Y("path", { d: "M12.5 2a10 10 0 0 1 8.4 5.4" }),
|
|
1101
|
+
/* @__PURE__ */ Y("path", { d: "M20.8 3.5v4h-4" }),
|
|
1102
|
+
/* @__PURE__ */ Y("path", { d: "M11.5 22a10 10 0 0 1-8.4-5.4" }),
|
|
1103
|
+
/* @__PURE__ */ Y("path", { d: "M3.2 20.5v-4h4" })
|
|
1104
1104
|
]
|
|
1105
1105
|
}), e[0] = t) : t = e[0], t;
|
|
1106
1106
|
}
|
|
@@ -1113,49 +1113,49 @@ var Hn = "responsive", Un = [{
|
|
|
1113
1113
|
label: e.label
|
|
1114
1114
|
}))];
|
|
1115
1115
|
function Wn(e) {
|
|
1116
|
-
let t =
|
|
1117
|
-
t[0] !==
|
|
1116
|
+
let t = J(163), { setting: n, width: r, aspectRatio: i, onAspectRatioChange: a, onChange: o } = e, s = c(), l = ee(), [u, d] = q(!1), [f, p] = q(null), m;
|
|
1117
|
+
t[0] !== f || t[1] !== n.height || t[2] !== n.width ? (m = f ?? {
|
|
1118
1118
|
width: String(n.width),
|
|
1119
1119
|
height: String(n.height)
|
|
1120
|
-
}, t[0] =
|
|
1121
|
-
let
|
|
1122
|
-
t[4] !== i || t[5] !==
|
|
1123
|
-
width:
|
|
1124
|
-
height:
|
|
1125
|
-
} :
|
|
1126
|
-
width:
|
|
1127
|
-
height:
|
|
1120
|
+
}, t[0] = f, t[1] = n.height, t[2] = n.width, t[3] = m) : m = t[3];
|
|
1121
|
+
let g = m, _ = n._tag === "preset" && Rn.some((e) => e.id === n.presetId) ? n.presetId : Hn, v = Number(g.width), y = Number(g.height), b;
|
|
1122
|
+
t[4] !== i || t[5] !== f?.axis || t[6] !== y || t[7] !== v ? (b = i === null || f?.axis === void 0 ? {
|
|
1123
|
+
width: v,
|
|
1124
|
+
height: y
|
|
1125
|
+
} : Fe({
|
|
1126
|
+
width: v,
|
|
1127
|
+
height: y
|
|
1128
1128
|
}, {
|
|
1129
1129
|
x: 0,
|
|
1130
1130
|
y: 0
|
|
1131
|
-
}, 1,
|
|
1132
|
-
let { width:
|
|
1133
|
-
t[9] !==
|
|
1134
|
-
let
|
|
1135
|
-
t[14] !== i || t[15] !== a || t[16] !== o ? (
|
|
1131
|
+
}, 1, f?.axis === "height" ? "south" : "east", i), t[4] = i, t[5] = f?.axis, t[6] = y, t[7] = v, t[8] = b) : b = t[8];
|
|
1132
|
+
let { width: x, height: S } = b, C;
|
|
1133
|
+
t[9] !== S || t[10] !== x || t[11] !== y || t[12] !== v ? (C = Number.isInteger(v) && Number.isInteger(y) && v >= 240 && v <= 3840 && y >= 240 && y <= 3840 && x * S <= 8294400, t[9] = S, t[10] = x, t[11] = y, t[12] = v, t[13] = C) : C = t[13];
|
|
1134
|
+
let w = C, T;
|
|
1135
|
+
t[14] !== i || t[15] !== a || t[16] !== o ? (T = (e, t) => {
|
|
1136
1136
|
let n = t === void 0 ? i : t;
|
|
1137
|
-
|
|
1138
|
-
|
|
1139
|
-
}, () =>
|
|
1140
|
-
}, t[14] = i, t[15] = a, t[16] = o, t[17] =
|
|
1141
|
-
let
|
|
1142
|
-
t[18] !==
|
|
1143
|
-
!
|
|
1137
|
+
d(!0), Bn(e, n, o, a).then(() => {
|
|
1138
|
+
d(!1), p(null);
|
|
1139
|
+
}, () => d(!1));
|
|
1140
|
+
}, t[14] = i, t[15] = a, t[16] = o, t[17] = T) : T = t[17];
|
|
1141
|
+
let E = T, D;
|
|
1142
|
+
t[18] !== E || t[19] !== S || t[20] !== w || t[21] !== x || t[22] !== n.height || t[23] !== n.width ? (D = () => {
|
|
1143
|
+
!w || x === n.width && S === n.height ? p(null) : E({
|
|
1144
1144
|
_tag: "freeform",
|
|
1145
|
-
width:
|
|
1146
|
-
height:
|
|
1145
|
+
width: x,
|
|
1146
|
+
height: S
|
|
1147
1147
|
});
|
|
1148
|
-
}, t[18] =
|
|
1149
|
-
let
|
|
1150
|
-
t[25] !== i || t[26] !== n ? (
|
|
1151
|
-
|
|
1148
|
+
}, t[18] = E, t[19] = S, t[20] = w, t[21] = x, t[22] = n.height, t[23] = n.width, t[24] = D) : D = t[24];
|
|
1149
|
+
let k = D, A;
|
|
1150
|
+
t[25] !== i || t[26] !== n ? (A = (e, t) => {
|
|
1151
|
+
p((r) => {
|
|
1152
1152
|
let a = {
|
|
1153
1153
|
width: e === "width" ? t : r?.width ?? String(n.width),
|
|
1154
1154
|
height: e === "height" ? t : r?.height ?? String(n.height),
|
|
1155
1155
|
axis: e
|
|
1156
1156
|
}, o = Number(t);
|
|
1157
1157
|
if (i === null || !Number.isInteger(o) || o < 240 || o > 3840) return a;
|
|
1158
|
-
let s =
|
|
1158
|
+
let s = Fe(n, e === "width" ? {
|
|
1159
1159
|
x: o - n.width,
|
|
1160
1160
|
y: 0
|
|
1161
1161
|
} : {
|
|
@@ -1168,13 +1168,13 @@ function Wn(e) {
|
|
|
1168
1168
|
height: e === "height" ? t : String(s.height)
|
|
1169
1169
|
};
|
|
1170
1170
|
});
|
|
1171
|
-
}, t[25] = i, t[26] = n, t[27] =
|
|
1172
|
-
let
|
|
1173
|
-
t[28] !==
|
|
1171
|
+
}, t[25] = i, t[26] = n, t[27] = A) : A = t[27];
|
|
1172
|
+
let M = A, N;
|
|
1173
|
+
t[28] !== E || t[29] !== i || t[30] !== n._tag || t[31] !== n.height || t[32] !== n.width ? (N = (e) => {
|
|
1174
1174
|
if (!e) return;
|
|
1175
1175
|
if (e === Hn) {
|
|
1176
1176
|
if (n._tag === "freeform") return;
|
|
1177
|
-
|
|
1177
|
+
E({
|
|
1178
1178
|
_tag: "freeform",
|
|
1179
1179
|
width: n.width,
|
|
1180
1180
|
height: n.height
|
|
@@ -1182,256 +1182,256 @@ function Wn(e) {
|
|
|
1182
1182
|
return;
|
|
1183
1183
|
}
|
|
1184
1184
|
let t = Rn.find((t) => t.id === e);
|
|
1185
|
-
t &&
|
|
1185
|
+
t && E(zn({
|
|
1186
1186
|
mode: "preset",
|
|
1187
1187
|
preset: t.id
|
|
1188
1188
|
}), i === null ? null : t.width / t.height);
|
|
1189
|
-
}, t[28] =
|
|
1190
|
-
let
|
|
1191
|
-
t[34] !==
|
|
1192
|
-
let e =
|
|
1189
|
+
}, t[28] = E, t[29] = i, t[30] = n._tag, t[31] = n.height, t[32] = n.width, t[33] = N) : N = t[33];
|
|
1190
|
+
let P = N, ne;
|
|
1191
|
+
t[34] !== E || t[35] !== i || t[36] !== S || t[37] !== w || t[38] !== x || t[39] !== n ? (ne = () => {
|
|
1192
|
+
let e = w && (x !== n.width || S !== n.height) ? {
|
|
1193
1193
|
_tag: "freeform",
|
|
1194
|
-
width:
|
|
1195
|
-
height:
|
|
1194
|
+
width: x,
|
|
1195
|
+
height: S
|
|
1196
1196
|
} : n;
|
|
1197
|
-
|
|
1197
|
+
E({
|
|
1198
1198
|
...e,
|
|
1199
1199
|
width: e.height,
|
|
1200
1200
|
height: e.width
|
|
1201
1201
|
}, i === null ? null : 1 / i);
|
|
1202
|
-
}, t[34] =
|
|
1203
|
-
let
|
|
1204
|
-
t[41] !== i || t[42] !==
|
|
1205
|
-
a(i === null ?
|
|
1206
|
-
}, t[41] = i, t[42] =
|
|
1207
|
-
let ae =
|
|
1202
|
+
}, t[34] = E, t[35] = i, t[36] = S, t[37] = w, t[38] = x, t[39] = n, t[40] = ne) : ne = t[40];
|
|
1203
|
+
let F = ne, ie;
|
|
1204
|
+
t[41] !== i || t[42] !== S || t[43] !== x || t[44] !== a ? (ie = () => {
|
|
1205
|
+
a(i === null ? x / S : null);
|
|
1206
|
+
}, t[41] = i, t[42] = S, t[43] = x, t[44] = a, t[45] = ie) : ie = t[45];
|
|
1207
|
+
let ae = ie, oe;
|
|
1208
1208
|
t[46] === r ? oe = t[47] : (oe = {
|
|
1209
1209
|
width: r,
|
|
1210
1210
|
height: 38
|
|
1211
1211
|
}, t[46] = r, t[47] = oe);
|
|
1212
1212
|
let se;
|
|
1213
1213
|
t[48] === s ? se = t[49] : (se = s("Browser device toolbar"), t[48] = s, t[49] = se);
|
|
1214
|
-
let
|
|
1215
|
-
t[50] ===
|
|
1214
|
+
let I;
|
|
1215
|
+
t[50] === k ? I = t[51] : (I = (e) => {
|
|
1216
1216
|
let t = e.relatedTarget;
|
|
1217
1217
|
if (t instanceof Node && e.currentTarget.contains(t)) return;
|
|
1218
1218
|
let n = e.target;
|
|
1219
|
-
t instanceof HTMLElement && t.closest("[data-slot=\"select-positioner\"]") || n instanceof HTMLElement && n.closest("[data-slot=\"select-positioner\"]") ||
|
|
1220
|
-
}, t[50] =
|
|
1221
|
-
let
|
|
1222
|
-
t[52] === r ?
|
|
1219
|
+
t instanceof HTMLElement && t.closest("[data-slot=\"select-positioner\"]") || n instanceof HTMLElement && n.closest("[data-slot=\"select-positioner\"]") || k();
|
|
1220
|
+
}, t[50] = k, t[51] = I);
|
|
1221
|
+
let ce;
|
|
1222
|
+
t[52] === r ? ce = t[53] : (ce = r >= 560 ? /* @__PURE__ */ Y("span", {
|
|
1223
1223
|
className: "mr-0.5 shrink-0 text-2xs font-medium text-muted-foreground",
|
|
1224
|
-
children: /* @__PURE__ */
|
|
1225
|
-
}) : null, t[52] = r, t[53] =
|
|
1226
|
-
let le;
|
|
1227
|
-
t[54] === c ? le = t[55] : (le = Un.map((e) => ({
|
|
1228
|
-
...e,
|
|
1229
|
-
label: c(e.label)
|
|
1230
|
-
})), t[54] = c, t[55] = le);
|
|
1231
|
-
let F = r >= 440 ? "w-36" : "w-24", ue;
|
|
1232
|
-
t[56] === F ? ue = t[57] : (ue = de("shrink-0 justify-between", F), t[56] = F, t[57] = ue);
|
|
1233
|
-
let fe;
|
|
1234
|
-
t[58] === s ? fe = t[59] : (fe = s("Browser device preset"), t[58] = s, t[59] = fe);
|
|
1235
|
-
let me;
|
|
1236
|
-
t[60] === Symbol.for("react.memo_cache_sentinel") ? (me = /* @__PURE__ */ X(Ue, {}), t[60] = me) : me = t[60];
|
|
1224
|
+
children: /* @__PURE__ */ Y(O, { children: "Dimensions" })
|
|
1225
|
+
}) : null, t[52] = r, t[53] = ce);
|
|
1237
1226
|
let L;
|
|
1238
|
-
t[
|
|
1227
|
+
t[54] === l ? L = t[55] : (L = Un.map((e) => ({
|
|
1228
|
+
...e,
|
|
1229
|
+
label: l(e.label)
|
|
1230
|
+
})), t[54] = l, t[55] = L);
|
|
1231
|
+
let R = r >= 440 ? "w-36" : "w-24", ue;
|
|
1232
|
+
t[56] === R ? ue = t[57] : (ue = le("shrink-0 justify-between", R), t[56] = R, t[57] = ue);
|
|
1233
|
+
let de;
|
|
1234
|
+
t[58] === s ? de = t[59] : (de = s("Browser device preset"), t[58] = s, t[59] = de);
|
|
1235
|
+
let pe;
|
|
1236
|
+
t[60] === Symbol.for("react.memo_cache_sentinel") ? (pe = /* @__PURE__ */ Y(We, {}), t[60] = pe) : pe = t[60];
|
|
1237
|
+
let z;
|
|
1238
|
+
t[61] !== ue || t[62] !== de ? (z = /* @__PURE__ */ Y(Je, {
|
|
1239
1239
|
variant: "ghost",
|
|
1240
1240
|
size: "xs",
|
|
1241
1241
|
className: ue,
|
|
1242
|
-
"aria-label":
|
|
1242
|
+
"aria-label": de,
|
|
1243
|
+
children: pe
|
|
1244
|
+
}), t[61] = ue, t[62] = de, t[63] = z) : z = t[63];
|
|
1245
|
+
let me;
|
|
1246
|
+
t[64] === l ? me = t[65] : (me = l(Un[0].label), t[64] = l, t[65] = me);
|
|
1247
|
+
let he;
|
|
1248
|
+
t[66] === me ? he = t[67] : (he = /* @__PURE__ */ Y(Ue, {
|
|
1249
|
+
value: Hn,
|
|
1243
1250
|
children: me
|
|
1244
|
-
}), t[
|
|
1251
|
+
}), t[66] = me, t[67] = he);
|
|
1245
1252
|
let ge;
|
|
1246
|
-
t[
|
|
1247
|
-
let _e;
|
|
1248
|
-
t[66] === ge ? _e = t[67] : (_e = /* @__PURE__ */ X(He, {
|
|
1249
|
-
value: Hn,
|
|
1250
|
-
children: ge
|
|
1251
|
-
}), t[66] = ge, t[67] = _e);
|
|
1252
|
-
let ve;
|
|
1253
|
-
t[68] === Symbol.for("react.memo_cache_sentinel") ? (ve = /* @__PURE__ */ Z(Ke, { children: [/* @__PURE__ */ X(We, { children: /* @__PURE__ */ X(I, {
|
|
1253
|
+
t[68] === Symbol.for("react.memo_cache_sentinel") ? (ge = /* @__PURE__ */ X(qe, { children: [/* @__PURE__ */ Y(Ge, { children: /* @__PURE__ */ Y(O, {
|
|
1254
1254
|
context: "group of standard device sizes",
|
|
1255
1255
|
children: "Standard"
|
|
1256
|
-
}) }), Rn.map(Kn)] }), t[68] =
|
|
1257
|
-
let
|
|
1258
|
-
t[69] ===
|
|
1256
|
+
}) }), Rn.map(Kn)] }), t[68] = ge) : ge = t[68];
|
|
1257
|
+
let B;
|
|
1258
|
+
t[69] === he ? B = t[70] : (B = /* @__PURE__ */ X(Ke, {
|
|
1259
1259
|
align: "start",
|
|
1260
1260
|
alignItemWithTrigger: !1,
|
|
1261
|
-
children: [
|
|
1262
|
-
}), t[69] =
|
|
1263
|
-
let
|
|
1264
|
-
t[71] !==
|
|
1261
|
+
children: [he, ge]
|
|
1262
|
+
}), t[69] = he, t[70] = B);
|
|
1263
|
+
let _e;
|
|
1264
|
+
t[71] !== u || t[72] !== P || t[73] !== _ || t[74] !== L || t[75] !== z || t[76] !== B ? (_e = /* @__PURE__ */ X(Ye, {
|
|
1265
1265
|
modal: !1,
|
|
1266
|
-
value:
|
|
1267
|
-
onValueChange:
|
|
1268
|
-
items:
|
|
1269
|
-
disabled:
|
|
1270
|
-
children: [
|
|
1271
|
-
}), t[71] =
|
|
1266
|
+
value: _,
|
|
1267
|
+
onValueChange: P,
|
|
1268
|
+
items: L,
|
|
1269
|
+
disabled: u,
|
|
1270
|
+
children: [z, B]
|
|
1271
|
+
}), t[71] = u, t[72] = P, t[73] = _, t[74] = L, t[75] = z, t[76] = B, t[77] = _e) : _e = t[77];
|
|
1272
|
+
let ve;
|
|
1273
|
+
t[78] === s ? ve = t[79] : (ve = s("Viewport dimensions"), t[78] = s, t[79] = ve);
|
|
1272
1274
|
let ye;
|
|
1273
|
-
t[
|
|
1274
|
-
|
|
1275
|
-
t[80]
|
|
1276
|
-
|
|
1277
|
-
|
|
1278
|
-
let xe = m.width, B;
|
|
1279
|
-
t[82] !== n.height || t[83] !== n.width ? (B = () => f((e) => e ?? {
|
|
1275
|
+
t[80] === k ? ye = t[81] : (ye = (e) => {
|
|
1276
|
+
e.preventDefault(), k();
|
|
1277
|
+
}, t[80] = k, t[81] = ye);
|
|
1278
|
+
let be = g.width, xe;
|
|
1279
|
+
t[82] !== n.height || t[83] !== n.width ? (xe = () => p((e) => e ?? {
|
|
1280
1280
|
width: String(n.width),
|
|
1281
1281
|
height: String(n.height)
|
|
1282
|
-
}), t[82] = n.height, t[83] = n.width, t[84] =
|
|
1282
|
+
}), t[82] = n.height, t[83] = n.width, t[84] = xe) : xe = t[84];
|
|
1283
1283
|
let V;
|
|
1284
|
-
t[85] ===
|
|
1284
|
+
t[85] === M ? V = t[86] : (V = (e) => M("width", e.target.value), t[85] = M, t[86] = V);
|
|
1285
1285
|
let H;
|
|
1286
1286
|
t[87] === s ? H = t[88] : (H = s("Viewport width"), t[87] = s, t[88] = H);
|
|
1287
|
-
let Se = !
|
|
1288
|
-
t[89] !==
|
|
1287
|
+
let Se = !w, Ce = r >= 360 ? "w-14" : "w-13", we;
|
|
1288
|
+
t[89] !== u || t[90] !== g.width || t[91] !== xe || t[92] !== V || t[93] !== H || t[94] !== Se || t[95] !== Ce ? (we = /* @__PURE__ */ Y(h, {
|
|
1289
1289
|
nativeInput: !0,
|
|
1290
1290
|
type: "number",
|
|
1291
1291
|
inputMode: "numeric",
|
|
1292
1292
|
size: "compact",
|
|
1293
1293
|
font: "mono",
|
|
1294
1294
|
min: 240,
|
|
1295
|
-
max:
|
|
1296
|
-
value:
|
|
1297
|
-
disabled:
|
|
1298
|
-
onFocus:
|
|
1295
|
+
max: De,
|
|
1296
|
+
value: be,
|
|
1297
|
+
disabled: u,
|
|
1298
|
+
onFocus: xe,
|
|
1299
1299
|
onChange: V,
|
|
1300
1300
|
"aria-label": H,
|
|
1301
1301
|
"aria-invalid": Se,
|
|
1302
1302
|
className: Ce
|
|
1303
|
-
}), t[89] =
|
|
1304
|
-
let
|
|
1305
|
-
t[97] === Symbol.for("react.memo_cache_sentinel") ? (
|
|
1303
|
+
}), t[89] = u, t[90] = g.width, t[91] = xe, t[92] = V, t[93] = H, t[94] = Se, t[95] = Ce, t[96] = we) : we = t[96];
|
|
1304
|
+
let Te;
|
|
1305
|
+
t[97] === Symbol.for("react.memo_cache_sentinel") ? (Te = /* @__PURE__ */ Y("span", {
|
|
1306
1306
|
className: "text-xs text-muted-foreground",
|
|
1307
1307
|
children: "×"
|
|
1308
|
-
}), t[97] =
|
|
1309
|
-
let
|
|
1310
|
-
t[98] !== n.height || t[99] !== n.width ? (
|
|
1308
|
+
}), t[97] = Te) : Te = t[97];
|
|
1309
|
+
let Ee = g.height, U;
|
|
1310
|
+
t[98] !== n.height || t[99] !== n.width ? (U = () => p((e) => e ?? {
|
|
1311
1311
|
width: String(n.width),
|
|
1312
1312
|
height: String(n.height)
|
|
1313
|
-
}), t[98] = n.height, t[99] = n.width, t[100] =
|
|
1314
|
-
let De;
|
|
1315
|
-
t[101] === k ? De = t[102] : (De = (e) => k("height", e.target.value), t[101] = k, t[102] = De);
|
|
1313
|
+
}), t[98] = n.height, t[99] = n.width, t[100] = U) : U = t[100];
|
|
1316
1314
|
let Oe;
|
|
1317
|
-
t[
|
|
1318
|
-
let ke
|
|
1319
|
-
t[
|
|
1315
|
+
t[101] === M ? Oe = t[102] : (Oe = (e) => M("height", e.target.value), t[101] = M, t[102] = Oe);
|
|
1316
|
+
let ke;
|
|
1317
|
+
t[103] === s ? ke = t[104] : (ke = s("Viewport height"), t[103] = s, t[104] = ke);
|
|
1318
|
+
let Ae = !w, je = r >= 360 ? "w-14" : "w-13", Me;
|
|
1319
|
+
t[105] !== u || t[106] !== g.height || t[107] !== U || t[108] !== Oe || t[109] !== ke || t[110] !== Ae || t[111] !== je ? (Me = /* @__PURE__ */ Y(h, {
|
|
1320
1320
|
nativeInput: !0,
|
|
1321
1321
|
type: "number",
|
|
1322
1322
|
inputMode: "numeric",
|
|
1323
1323
|
size: "compact",
|
|
1324
1324
|
font: "mono",
|
|
1325
1325
|
min: 240,
|
|
1326
|
-
max:
|
|
1327
|
-
value:
|
|
1328
|
-
disabled:
|
|
1329
|
-
onFocus:
|
|
1330
|
-
onChange:
|
|
1331
|
-
"aria-label":
|
|
1332
|
-
"aria-invalid":
|
|
1333
|
-
className:
|
|
1334
|
-
}), t[105] =
|
|
1335
|
-
let
|
|
1336
|
-
t[113] !==
|
|
1326
|
+
max: De,
|
|
1327
|
+
value: Ee,
|
|
1328
|
+
disabled: u,
|
|
1329
|
+
onFocus: U,
|
|
1330
|
+
onChange: Oe,
|
|
1331
|
+
"aria-label": ke,
|
|
1332
|
+
"aria-invalid": Ae,
|
|
1333
|
+
className: je
|
|
1334
|
+
}), t[105] = u, t[106] = g.height, t[107] = U, t[108] = Oe, t[109] = ke, t[110] = Ae, t[111] = je, t[112] = Me) : Me = t[112];
|
|
1335
|
+
let Ne;
|
|
1336
|
+
t[113] !== ve || t[114] !== ye || t[115] !== we || t[116] !== Me ? (Ne = /* @__PURE__ */ X("form", {
|
|
1337
1337
|
className: "m-0 flex min-w-0 shrink-0 items-center gap-0.5 border-0 p-0",
|
|
1338
|
-
"aria-label":
|
|
1339
|
-
onSubmit:
|
|
1338
|
+
"aria-label": ve,
|
|
1339
|
+
onSubmit: ye,
|
|
1340
1340
|
children: [
|
|
1341
|
-
U,
|
|
1342
1341
|
we,
|
|
1343
|
-
|
|
1342
|
+
Te,
|
|
1343
|
+
Me
|
|
1344
1344
|
]
|
|
1345
|
-
}), t[113] =
|
|
1346
|
-
let
|
|
1347
|
-
t[118] !== i || t[119] !== s ? (
|
|
1348
|
-
let
|
|
1349
|
-
t[121] !==
|
|
1350
|
-
variant:
|
|
1345
|
+
}), t[113] = ve, t[114] = ye, t[115] = we, t[116] = Me, t[117] = Ne) : Ne = t[117];
|
|
1346
|
+
let W = i === null ? "ghost" : "secondary", Pe;
|
|
1347
|
+
t[118] !== i || t[119] !== s ? (Pe = s(i === null ? "Lock viewport aspect ratio" : "Unlock viewport aspect ratio"), t[118] = i, t[119] = s, t[120] = Pe) : Pe = t[120];
|
|
1348
|
+
let G = i !== null, Ie = u || !w, Le;
|
|
1349
|
+
t[121] !== W || t[122] !== Pe || t[123] !== G || t[124] !== Ie || t[125] !== ae ? (Le = /* @__PURE__ */ Y(j, {
|
|
1350
|
+
variant: W,
|
|
1351
1351
|
size: "icon-xs",
|
|
1352
1352
|
type: "button",
|
|
1353
|
-
"aria-label":
|
|
1354
|
-
"aria-pressed":
|
|
1355
|
-
disabled:
|
|
1353
|
+
"aria-label": Pe,
|
|
1354
|
+
"aria-pressed": G,
|
|
1355
|
+
disabled: Ie,
|
|
1356
1356
|
onPointerDown: Gn,
|
|
1357
1357
|
onClick: ae
|
|
1358
|
-
}), t[121] =
|
|
1359
|
-
let ze;
|
|
1360
|
-
t[127] === i ? ze = t[128] : (ze = X(i === null ? Re : Le, { className: de(i !== null && "text-foreground") }), t[127] = i, t[128] = ze);
|
|
1358
|
+
}), t[121] = W, t[122] = Pe, t[123] = G, t[124] = Ie, t[125] = ae, t[126] = Le) : Le = t[126];
|
|
1361
1359
|
let Be;
|
|
1362
|
-
t[
|
|
1363
|
-
|
|
1364
|
-
|
|
1365
|
-
|
|
1366
|
-
|
|
1367
|
-
t[
|
|
1368
|
-
side: "top",
|
|
1369
|
-
children: i === null ? /* @__PURE__ */ X(I, { children: "Lock aspect ratio" }) : /* @__PURE__ */ X(I, { children: "Unlock aspect ratio" })
|
|
1370
|
-
}), t[132] = i, t[133] = Ye);
|
|
1360
|
+
t[127] === i ? Be = t[128] : (Be = Y(i === null ? ze : Re, { className: le(i !== null && "text-foreground") }), t[127] = i, t[128] = Be);
|
|
1361
|
+
let Ve;
|
|
1362
|
+
t[129] !== Le || t[130] !== Be ? (Ve = /* @__PURE__ */ Y(fe, {
|
|
1363
|
+
render: Le,
|
|
1364
|
+
children: Be
|
|
1365
|
+
}), t[129] = Le, t[130] = Be, t[131] = Ve) : Ve = t[131];
|
|
1371
1366
|
let Xe;
|
|
1372
|
-
t[
|
|
1367
|
+
t[132] === i ? Xe = t[133] : (Xe = /* @__PURE__ */ Y(te, {
|
|
1368
|
+
side: "top",
|
|
1369
|
+
children: i === null ? /* @__PURE__ */ Y(O, { children: "Lock aspect ratio" }) : /* @__PURE__ */ Y(O, { children: "Unlock aspect ratio" })
|
|
1370
|
+
}), t[132] = i, t[133] = Xe);
|
|
1373
1371
|
let Ze;
|
|
1374
|
-
t[
|
|
1372
|
+
t[134] !== Ve || t[135] !== Xe ? (Ze = /* @__PURE__ */ X(re, { children: [Ve, Xe] }), t[134] = Ve, t[135] = Xe, t[136] = Ze) : Ze = t[136];
|
|
1375
1373
|
let Qe;
|
|
1376
|
-
t[
|
|
1374
|
+
t[137] === s ? Qe = t[138] : (Qe = s("Rotate viewport"), t[137] = s, t[138] = Qe);
|
|
1377
1375
|
let $e;
|
|
1378
|
-
t[
|
|
1376
|
+
t[139] === Symbol.for("react.memo_cache_sentinel") ? ($e = /* @__PURE__ */ Y(Vn, {}), t[139] = $e) : $e = t[139];
|
|
1377
|
+
let et;
|
|
1378
|
+
t[140] !== u || t[141] !== F || t[142] !== Qe ? (et = /* @__PURE__ */ Y(j, {
|
|
1379
1379
|
variant: "ghost",
|
|
1380
1380
|
size: "icon-xs",
|
|
1381
1381
|
type: "button",
|
|
1382
|
-
"aria-label":
|
|
1383
|
-
disabled:
|
|
1384
|
-
onClick:
|
|
1385
|
-
children:
|
|
1386
|
-
}), t[140] =
|
|
1387
|
-
let et;
|
|
1388
|
-
t[144] === s ? et = t[145] : (et = s("Close device toolbar"), t[144] = s, t[145] = et);
|
|
1382
|
+
"aria-label": Qe,
|
|
1383
|
+
disabled: u,
|
|
1384
|
+
onClick: F,
|
|
1385
|
+
children: $e
|
|
1386
|
+
}), t[140] = u, t[141] = F, t[142] = Qe, t[143] = et) : et = t[143];
|
|
1389
1387
|
let tt;
|
|
1390
|
-
t[
|
|
1391
|
-
T({ _tag: "fill" }, null);
|
|
1392
|
-
}, t[146] = T, t[147] = tt);
|
|
1388
|
+
t[144] === s ? tt = t[145] : (tt = s("Close device toolbar"), t[144] = s, t[145] = tt);
|
|
1393
1389
|
let nt;
|
|
1394
|
-
t[
|
|
1390
|
+
t[146] === E ? nt = t[147] : (nt = () => {
|
|
1391
|
+
E({ _tag: "fill" }, null);
|
|
1392
|
+
}, t[146] = E, t[147] = nt);
|
|
1395
1393
|
let rt;
|
|
1396
|
-
t[
|
|
1394
|
+
t[148] === Symbol.for("react.memo_cache_sentinel") ? (rt = /* @__PURE__ */ Y(He, {}), t[148] = rt) : rt = t[148];
|
|
1395
|
+
let it;
|
|
1396
|
+
t[149] !== u || t[150] !== tt || t[151] !== nt ? (it = /* @__PURE__ */ Y("span", {
|
|
1397
1397
|
className: "sticky right-0 ml-auto flex bg-background/95",
|
|
1398
|
-
children: /* @__PURE__ */
|
|
1398
|
+
children: /* @__PURE__ */ Y(j, {
|
|
1399
1399
|
variant: "ghost",
|
|
1400
1400
|
size: "icon-xs",
|
|
1401
1401
|
type: "button",
|
|
1402
|
-
"aria-label":
|
|
1403
|
-
disabled:
|
|
1404
|
-
onClick:
|
|
1405
|
-
children:
|
|
1402
|
+
"aria-label": tt,
|
|
1403
|
+
disabled: u,
|
|
1404
|
+
onClick: nt,
|
|
1405
|
+
children: rt
|
|
1406
1406
|
})
|
|
1407
|
-
}), t[149] =
|
|
1408
|
-
let
|
|
1409
|
-
return t[153] !== oe || t[154] !== se || t[155] !==
|
|
1407
|
+
}), t[149] = u, t[150] = tt, t[151] = nt, t[152] = it) : it = t[152];
|
|
1408
|
+
let at;
|
|
1409
|
+
return t[153] !== oe || t[154] !== se || t[155] !== I || t[156] !== ce || t[157] !== _e || t[158] !== Ne || t[159] !== Ze || t[160] !== et || t[161] !== it ? (at = /* @__PURE__ */ X("div", {
|
|
1410
1410
|
className: "sticky left-0 top-0 z-50 flex items-center gap-0.5 overflow-x-auto border-b border-border/70 bg-background/95 px-1.5 shadow-xs backdrop-blur-md [scrollbar-width:none] [&::-webkit-scrollbar]:hidden",
|
|
1411
1411
|
style: oe,
|
|
1412
1412
|
role: "toolbar",
|
|
1413
1413
|
"aria-label": se,
|
|
1414
1414
|
"data-browser-device-toolbar": !0,
|
|
1415
|
-
onBlur:
|
|
1415
|
+
onBlur: I,
|
|
1416
1416
|
children: [
|
|
1417
|
-
|
|
1418
|
-
|
|
1419
|
-
|
|
1420
|
-
|
|
1421
|
-
|
|
1422
|
-
|
|
1417
|
+
ce,
|
|
1418
|
+
_e,
|
|
1419
|
+
Ne,
|
|
1420
|
+
Ze,
|
|
1421
|
+
et,
|
|
1422
|
+
it
|
|
1423
1423
|
]
|
|
1424
|
-
}), t[153] = oe, t[154] = se, t[155] =
|
|
1424
|
+
}), t[153] = oe, t[154] = se, t[155] = I, t[156] = ce, t[157] = _e, t[158] = Ne, t[159] = Ze, t[160] = et, t[161] = it, t[162] = at) : at = t[162], at;
|
|
1425
1425
|
}
|
|
1426
1426
|
function Gn(e) {
|
|
1427
1427
|
return e.preventDefault();
|
|
1428
1428
|
}
|
|
1429
1429
|
function Kn(e) {
|
|
1430
|
-
return /* @__PURE__ */
|
|
1430
|
+
return /* @__PURE__ */ Y(Ue, {
|
|
1431
1431
|
value: e.id,
|
|
1432
|
-
children: /* @__PURE__ */
|
|
1432
|
+
children: /* @__PURE__ */ X("span", {
|
|
1433
1433
|
className: "flex w-full items-center justify-between gap-5",
|
|
1434
|
-
children: [/* @__PURE__ */
|
|
1434
|
+
children: [/* @__PURE__ */ Y("span", { children: e.label }), /* @__PURE__ */ Y("span", {
|
|
1435
1435
|
className: "text-xs tabular-nums text-muted-foreground",
|
|
1436
1436
|
children: e.detail
|
|
1437
1437
|
})]
|
|
@@ -1441,11 +1441,11 @@ function Kn(e) {
|
|
|
1441
1441
|
// src/browser/useBrowserLayoutZoomFactor.ts
|
|
1442
1442
|
var qn = (e) => (window.addEventListener("resize", e), () => window.removeEventListener("resize", e)), Jn = () => window.desktopBridge?.getWindowZoomFactor() ?? 1;
|
|
1443
1443
|
function Yn(e) {
|
|
1444
|
-
let t =
|
|
1445
|
-
return t[0] !== e || t[1] !== n ? (r =
|
|
1444
|
+
let t = J(3), n = mt(qn, Jn), r;
|
|
1445
|
+
return t[0] !== e || t[1] !== n ? (r = Ne(e, n), t[0] = e, t[1] = n, t[2] = r) : r = t[2], r;
|
|
1446
1446
|
}
|
|
1447
1447
|
// src/browser/browserViewportActions.ts
|
|
1448
|
-
var Xn = 15e3, Zn = class extends H()("BrowserViewportCommitTimeoutError", { tabId:
|
|
1448
|
+
var Xn = 15e3, Zn = class extends H()("BrowserViewportCommitTimeoutError", { tabId: U }) {
|
|
1449
1449
|
get message() {
|
|
1450
1450
|
return `Timed out committing the browser viewport for tab ${this.tabId}`;
|
|
1451
1451
|
}
|
|
@@ -1468,7 +1468,7 @@ var Xn = 15e3, Zn = class extends H()("BrowserViewportCommitTimeoutError", { tab
|
|
|
1468
1468
|
});
|
|
1469
1469
|
};
|
|
1470
1470
|
async function tr(e, t) {
|
|
1471
|
-
let n = await
|
|
1471
|
+
let n = await R(I, W.resize, {
|
|
1472
1472
|
environmentId: e.threadRef.environmentId,
|
|
1473
1473
|
input: {
|
|
1474
1474
|
threadId: e.threadRef.threadId,
|
|
@@ -1477,14 +1477,14 @@ async function tr(e, t) {
|
|
|
1477
1477
|
}
|
|
1478
1478
|
}, { label: "preview viewport resize" });
|
|
1479
1479
|
if (n._tag === "Failure") {
|
|
1480
|
-
let e =
|
|
1481
|
-
throw
|
|
1480
|
+
let e = u(n);
|
|
1481
|
+
throw $e.add({
|
|
1482
1482
|
type: "error",
|
|
1483
1483
|
title: i(r("Unable to resize browser viewport")),
|
|
1484
|
-
description:
|
|
1484
|
+
description: Ae(e, i) ?? i(r("An error occurred."))
|
|
1485
1485
|
}), e;
|
|
1486
1486
|
}
|
|
1487
|
-
|
|
1487
|
+
b(e.threadRef, n.value);
|
|
1488
1488
|
}
|
|
1489
1489
|
function nr(e, t) {
|
|
1490
1490
|
let { started: n } = $n(e, t);
|
|
@@ -1504,52 +1504,52 @@ function ir(e, t, n) {
|
|
|
1504
1504
|
}
|
|
1505
1505
|
// src/components/CommandBlock.tsx
|
|
1506
1506
|
function ar(e) {
|
|
1507
|
-
let t =
|
|
1508
|
-
t[0] === Symbol.for("react.memo_cache_sentinel") ? (
|
|
1507
|
+
let t = J(22), { command: n, className: i, prominent: a } = e, o = a !== void 0 && a, s = c(), l;
|
|
1508
|
+
t[0] === Symbol.for("react.memo_cache_sentinel") ? (l = {
|
|
1509
1509
|
timeout: 1500,
|
|
1510
1510
|
target: {
|
|
1511
1511
|
target: "command",
|
|
1512
1512
|
unavailableMessage: r("Clipboard API is unavailable while copying command."),
|
|
1513
1513
|
failureMessage: r("Failed to copy command to the clipboard.")
|
|
1514
1514
|
}
|
|
1515
|
-
}, t[0] =
|
|
1516
|
-
let { copyToClipboard:
|
|
1517
|
-
t[1] !== i || t[2] !==
|
|
1518
|
-
let
|
|
1519
|
-
t[4] === Symbol.for("react.memo_cache_sentinel") ? (
|
|
1515
|
+
}, t[0] = l) : l = t[0];
|
|
1516
|
+
let { copyToClipboard: u, isCopied: d } = Qe(l), f = o ? "px-4 py-3.5 text-base" : "px-3 py-2.5 text-sm", p;
|
|
1517
|
+
t[1] !== i || t[2] !== f ? (p = le("flex items-center justify-between gap-3 rounded-lg border border-border bg-muted/50 font-mono", f, i), t[1] = i, t[2] = f, t[3] = p) : p = t[3];
|
|
1518
|
+
let m;
|
|
1519
|
+
t[4] === Symbol.for("react.memo_cache_sentinel") ? (m = /* @__PURE__ */ Y("span", {
|
|
1520
1520
|
className: "mr-2 text-muted-foreground",
|
|
1521
1521
|
children: "$"
|
|
1522
|
-
}), t[4] =
|
|
1523
|
-
let m;
|
|
1524
|
-
t[5] === n ? m = t[6] : (m = /* @__PURE__ */ Z("span", {
|
|
1525
|
-
className: "min-w-0 truncate",
|
|
1526
|
-
children: [p, n]
|
|
1527
|
-
}), t[5] = n, t[6] = m);
|
|
1522
|
+
}), t[4] = m) : m = t[4];
|
|
1528
1523
|
let h;
|
|
1529
|
-
t[
|
|
1524
|
+
t[5] === n ? h = t[6] : (h = /* @__PURE__ */ X("span", {
|
|
1525
|
+
className: "min-w-0 truncate",
|
|
1526
|
+
children: [m, n]
|
|
1527
|
+
}), t[5] = n, t[6] = h);
|
|
1530
1528
|
let g;
|
|
1531
|
-
t[
|
|
1529
|
+
t[7] === s ? g = t[8] : (g = s("Copy command"), t[7] = s, t[8] = g);
|
|
1532
1530
|
let _;
|
|
1533
|
-
t[
|
|
1531
|
+
t[9] !== n || t[10] !== u ? (_ = () => u(n, void 0), t[9] = n, t[10] = u, t[11] = _) : _ = t[11];
|
|
1534
1532
|
let v;
|
|
1535
|
-
t[
|
|
1533
|
+
t[12] === d ? v = t[13] : (v = Y(d ? Le : Be, { className: "size-3.5" }), t[12] = d, t[13] = v);
|
|
1534
|
+
let y;
|
|
1535
|
+
t[14] !== g || t[15] !== _ || t[16] !== v ? (y = /* @__PURE__ */ Y(j, {
|
|
1536
1536
|
size: "icon-xs",
|
|
1537
1537
|
variant: "ghost",
|
|
1538
|
-
"aria-label":
|
|
1539
|
-
onClick:
|
|
1540
|
-
children:
|
|
1541
|
-
}), t[14] =
|
|
1542
|
-
let
|
|
1543
|
-
return t[18] !==
|
|
1544
|
-
className:
|
|
1545
|
-
children: [
|
|
1546
|
-
}), t[18] =
|
|
1538
|
+
"aria-label": g,
|
|
1539
|
+
onClick: _,
|
|
1540
|
+
children: v
|
|
1541
|
+
}), t[14] = g, t[15] = _, t[16] = v, t[17] = y) : y = t[17];
|
|
1542
|
+
let b;
|
|
1543
|
+
return t[18] !== y || t[19] !== p || t[20] !== h ? (b = /* @__PURE__ */ X("div", {
|
|
1544
|
+
className: p,
|
|
1545
|
+
children: [h, y]
|
|
1546
|
+
}), t[18] = y, t[19] = p, t[20] = h, t[21] = b) : b = t[21], b;
|
|
1547
1547
|
}
|
|
1548
1548
|
// src/components/preview/openPreviewSession.ts
|
|
1549
1549
|
async function or(e) {
|
|
1550
|
-
let t = await
|
|
1551
|
-
if (
|
|
1552
|
-
let n = e.runtime ??
|
|
1550
|
+
let t = await Me().catch((e) => new ct({ cause: e }));
|
|
1551
|
+
if (st(t)) return ne(Ee(t));
|
|
1552
|
+
let n = e.runtime ?? je(e.threadRef.environmentId), r = await e.openPreview({
|
|
1553
1553
|
environmentId: e.threadRef.environmentId,
|
|
1554
1554
|
input: {
|
|
1555
1555
|
threadId: e.threadRef.threadId,
|
|
@@ -1565,26 +1565,26 @@ async function or(e) {
|
|
|
1565
1565
|
});
|
|
1566
1566
|
if (r._tag === "Failure") return r;
|
|
1567
1567
|
let i = r.value;
|
|
1568
|
-
return s(e.threadRef, i), e.url !== void 0 &&
|
|
1568
|
+
return s(e.threadRef, i), e.url !== void 0 && C(e.threadRef, i.navStatus._tag === "Idle" ? e.url : i.navStatus.url), r;
|
|
1569
1569
|
}
|
|
1570
1570
|
// src/browser/BrowserSurfaceSlot.tsx
|
|
1571
1571
|
function sr(e) {
|
|
1572
|
-
let t =
|
|
1572
|
+
let t = J(20), { tabId: n, visible: r, cornerRadius: i, zIndex: a, layoutVersion: o, className: s, fitSourceContent: c } = e, l = i === void 0 ? 0 : i, u = a === void 0 ? 30 : a, d = c !== void 0 && c, f;
|
|
1573
1573
|
t[0] !== l || t[1] !== r || t[2] !== u ? (f = {
|
|
1574
1574
|
visible: r,
|
|
1575
1575
|
cornerRadius: l,
|
|
1576
1576
|
zIndex: u
|
|
1577
1577
|
}, t[0] = l, t[1] = r, t[2] = u, t[3] = f) : f = t[3];
|
|
1578
|
-
let p =
|
|
1578
|
+
let p = K(f), m = K(null), h;
|
|
1579
1579
|
t[4] !== d || t[5] !== n ? (h = (e) => {
|
|
1580
|
-
let t =
|
|
1580
|
+
let t = qt(n, d), r = () => {
|
|
1581
1581
|
let r = e.getBoundingClientRect(), i = p.current, a = t.present({
|
|
1582
1582
|
x: Math.round(r.x),
|
|
1583
1583
|
y: Math.round(r.y),
|
|
1584
1584
|
width: Math.max(1, Math.round(r.width)),
|
|
1585
1585
|
height: Math.max(1, Math.round(r.height))
|
|
1586
1586
|
}, i.visible && r.width > 0 && r.height > 0, i.cornerRadius, i.zIndex);
|
|
1587
|
-
i.visible && !a && (t.release(), t =
|
|
1587
|
+
i.visible && !a && (t.release(), t = qt(n, d), t.present({
|
|
1588
1588
|
x: Math.round(r.x),
|
|
1589
1589
|
y: Math.round(r.y),
|
|
1590
1590
|
width: Math.max(1, Math.round(r.width)),
|
|
@@ -1594,7 +1594,7 @@ function sr(e) {
|
|
|
1594
1594
|
m.current = r, r();
|
|
1595
1595
|
let i = [e], a = e.closest("[data-preview-panel-mode=\"inline\"]");
|
|
1596
1596
|
a && i.push(a), i.push(...document.querySelectorAll("[data-slot=\"sidebar-gap\"]"));
|
|
1597
|
-
let o =
|
|
1597
|
+
let o = lt(i, r);
|
|
1598
1598
|
return window.addEventListener("resize", r), window.addEventListener("scroll", r, !0), () => {
|
|
1599
1599
|
o(), window.removeEventListener("resize", r), window.removeEventListener("scroll", r, !0), m.current === r && (m.current = null), t.release();
|
|
1600
1600
|
};
|
|
@@ -1613,16 +1613,16 @@ function sr(e) {
|
|
|
1613
1613
|
o,
|
|
1614
1614
|
r,
|
|
1615
1615
|
u
|
|
1616
|
-
], t[11] = l, t[12] = o, t[13] = r, t[14] = u, t[15] = v) : v = t[15],
|
|
1616
|
+
], t[11] = l, t[12] = o, t[13] = r, t[14] = u, t[15] = v) : v = t[15], pt(_, v);
|
|
1617
1617
|
let y;
|
|
1618
|
-
return t[16] !== g || t[17] !== s || t[18] !== n ? (y = /* @__PURE__ */
|
|
1618
|
+
return t[16] !== g || t[17] !== s || t[18] !== n ? (y = /* @__PURE__ */ Y("div", {
|
|
1619
1619
|
ref: g,
|
|
1620
1620
|
className: s,
|
|
1621
1621
|
"data-browser-surface-slot": n
|
|
1622
1622
|
}), t[16] = g, t[17] = s, t[18] = n, t[19] = y) : y = t[19], y;
|
|
1623
1623
|
}
|
|
1624
1624
|
// ../../packages/client-runtime/src/preview/serverBrowserStream.ts
|
|
1625
|
-
var cr = "/v1/preview-stream", lr = (e, t = a) => e ? e.canOperate ? e.controller === "you" ? t(r("You have control")) : e.controller === "agent" ? t(r("Agent has control")) : e.controller === "another-viewer" ? t(r("Another viewer has control")) : t(r("Watching", { $context: "preview stream status, viewing without control" })) : t(r("Read-only")) : t(r("Connecting...")), ur = (e) => e === null || typeof e == "object" && "type" in e && typeof e.type == "string" && "message" in e && typeof e.message == "string" && "defaultValue" in e && typeof e.defaultValue == "string", dr = (e, t) =>
|
|
1625
|
+
var cr = "/v1/preview-stream", lr = (e, t = a) => e ? e.canOperate ? e.controller === "you" ? t(r("You have control")) : e.controller === "agent" ? t(r("Agent has control")) : e.controller === "another-viewer" ? t(r("Another viewer has control")) : t(r("Watching", { $context: "preview stream status, viewing without control" })) : t(r("Read-only")) : t(r("Connecting...")), ur = (e) => e === null || typeof e == "object" && "type" in e && typeof e.type == "string" && "message" in e && typeof e.message == "string" && "defaultValue" in e && typeof e.defaultValue == "string", dr = (e, t) => rt(`${e.access.httpBase}/upload?${new URLSearchParams({
|
|
1626
1626
|
threadId: e.threadId,
|
|
1627
1627
|
tabId: e.tabId,
|
|
1628
1628
|
chooser: t
|
|
@@ -1637,7 +1637,7 @@ async function fr(e, t) {
|
|
|
1637
1637
|
});
|
|
1638
1638
|
if (!r.ok) throw Error(await r.text() || "The upload was refused.");
|
|
1639
1639
|
}
|
|
1640
|
-
var pr = (e, t) =>
|
|
1640
|
+
var pr = (e, t) => rt(`${e.access.httpBase}/download?${new URLSearchParams({
|
|
1641
1641
|
threadId: e.threadId,
|
|
1642
1642
|
tabId: e.tabId,
|
|
1643
1643
|
id: t
|
|
@@ -1650,7 +1650,7 @@ function gr(e, t) {
|
|
|
1650
1650
|
maxHeight: String(Math.max(1, Math.round(e.maxHeight)))
|
|
1651
1651
|
});
|
|
1652
1652
|
e.interactive === !1 && n.set("interactive", "false");
|
|
1653
|
-
let r =
|
|
1653
|
+
let r = rt(`${e.access.wsBase}/ws?${n.toString()}`, e.access), i = !1, a = null, o = null, s = 0, c = null, l = null, u = () => {
|
|
1654
1654
|
l !== null && (l = null, t.onFileChooser?.(null));
|
|
1655
1655
|
}, d = () => {
|
|
1656
1656
|
if (i) return;
|
|
@@ -1766,14 +1766,14 @@ function br(e, t) {
|
|
|
1766
1766
|
// src/components/preview/AgentBrowserCursor.tsx
|
|
1767
1767
|
var xr = 700;
|
|
1768
1768
|
function Sr(e) {
|
|
1769
|
-
let t =
|
|
1769
|
+
let t = J(9), { tabId: n, zoomFactor: r, controller: i } = e, a;
|
|
1770
1770
|
t[0] === n ? a = t[1] : (a = (e) => e.byTabId[n] ?? null, t[0] = n, t[1] = a);
|
|
1771
|
-
let o =
|
|
1771
|
+
let o = bt(a), s;
|
|
1772
1772
|
t[2] === n ? s = t[3] : (s = (e) => e.byTabId[n]?.content ?? null, t[2] = n, t[3] = s);
|
|
1773
|
-
let c =
|
|
1773
|
+
let c = Q(s);
|
|
1774
1774
|
if (!o) return null;
|
|
1775
1775
|
let l;
|
|
1776
|
-
return t[4] !== c || t[5] !== i || t[6] !== o || t[7] !== r ? (l = /* @__PURE__ */
|
|
1776
|
+
return t[4] !== c || t[5] !== i || t[6] !== o || t[7] !== r ? (l = /* @__PURE__ */ Y(Cr, {
|
|
1777
1777
|
event: o,
|
|
1778
1778
|
content: c,
|
|
1779
1779
|
zoomFactor: r,
|
|
@@ -1781,8 +1781,8 @@ function Sr(e) {
|
|
|
1781
1781
|
}), t[4] = c, t[5] = i, t[6] = o, t[7] = r, t[8] = l) : l = t[8], l;
|
|
1782
1782
|
}
|
|
1783
1783
|
function Cr(e) {
|
|
1784
|
-
let t =
|
|
1785
|
-
return t[0] !== a || t[1] !== n.phase || t[2] !== n.sequence || t[3] !== s || t[4] !== c ? (l = /* @__PURE__ */
|
|
1784
|
+
let t = J(6), { event: n, content: r, zoomFactor: i, controller: a } = e, o = i * (r?.scale ?? 1), s = n.x * o + (r?.x ?? 0) - (r?.scrollLeft ?? 0), c = n.y * o + (r?.y ?? 0) - (r?.scrollTop ?? 0), l;
|
|
1785
|
+
return t[0] !== a || t[1] !== n.phase || t[2] !== n.sequence || t[3] !== s || t[4] !== c ? (l = /* @__PURE__ */ Y(wr, {
|
|
1786
1786
|
phase: n.phase,
|
|
1787
1787
|
sequence: n.sequence,
|
|
1788
1788
|
left: s,
|
|
@@ -1791,11 +1791,11 @@ function Cr(e) {
|
|
|
1791
1791
|
}), t[0] = a, t[1] = n.phase, t[2] = n.sequence, t[3] = s, t[4] = c, t[5] = l) : l = t[5], l;
|
|
1792
1792
|
}
|
|
1793
1793
|
function wr(e) {
|
|
1794
|
-
let t =
|
|
1794
|
+
let t = J(16), { phase: n, sequence: r, left: i, top: a, controller: o } = e, [s, c] = q(null), l = s !== r, u, d;
|
|
1795
1795
|
t[0] === r ? (u = t[1], d = t[2]) : (u = () => {
|
|
1796
1796
|
let e = window.setTimeout(() => c(r), xr);
|
|
1797
1797
|
return () => window.clearTimeout(e);
|
|
1798
|
-
}, d = [r], t[0] = r, t[1] = u, t[2] = d),
|
|
1798
|
+
}, d = [r], t[0] = r, t[1] = u, t[2] = d), ut(u, d);
|
|
1799
1799
|
let f;
|
|
1800
1800
|
t[3] !== l || t[4] !== o ? (f = br(l, o), t[3] = l, t[4] = o, t[5] = f) : f = t[5];
|
|
1801
1801
|
let p = `translate3d(${i}px, ${a}px, 0)`, m;
|
|
@@ -1804,11 +1804,11 @@ function wr(e) {
|
|
|
1804
1804
|
transform: p
|
|
1805
1805
|
}, t[6] = f, t[7] = p, t[8] = m) : m = t[8];
|
|
1806
1806
|
let h;
|
|
1807
|
-
t[9] !== n || t[10] !== r ? (h = n === "click" ? /* @__PURE__ */
|
|
1807
|
+
t[9] !== n || t[10] !== r ? (h = n === "click" ? /* @__PURE__ */ Y("span", { className: "absolute left-0.5 top-0.5 size-4 animate-status-ping rounded-full bg-primary/25 motion-reduce:animate-none" }, r) : null, t[9] = n, t[10] = r, t[11] = h) : h = t[11];
|
|
1808
1808
|
let g;
|
|
1809
|
-
t[12] === Symbol.for("react.memo_cache_sentinel") ? (g = /* @__PURE__ */
|
|
1809
|
+
t[12] === Symbol.for("react.memo_cache_sentinel") ? (g = /* @__PURE__ */ Y(Ve, { className: "relative size-5 -translate-x-0.5 -translate-y-0.5 fill-background stroke-2 text-primary drop-shadow-sm" }), t[12] = g) : g = t[12];
|
|
1810
1810
|
let _;
|
|
1811
|
-
return t[13] !== m || t[14] !== h ? (_ = /* @__PURE__ */
|
|
1811
|
+
return t[13] !== m || t[14] !== h ? (_ = /* @__PURE__ */ X("div", {
|
|
1812
1812
|
className: "pointer-events-none absolute left-0 top-0 z-40 transition-[opacity,transform] duration-150 ease-out motion-reduce:transition-none",
|
|
1813
1813
|
style: m,
|
|
1814
1814
|
"aria-hidden": "true",
|
|
@@ -1817,32 +1817,32 @@ function wr(e) {
|
|
|
1817
1817
|
}), t[13] = m, t[14] = h, t[15] = _) : _ = t[15], _;
|
|
1818
1818
|
}
|
|
1819
1819
|
// src/state/previewStream.ts
|
|
1820
|
-
var Tr = 1e4, Er =
|
|
1821
|
-
let r =
|
|
1822
|
-
return r === null ?
|
|
1820
|
+
var Tr = 1e4, Er = T((e) => t.atom((t) => {
|
|
1821
|
+
let r = be(t(n.preparedConnectionValueAtom(e)));
|
|
1822
|
+
return r === null ? ge : et({
|
|
1823
1823
|
prepared: r,
|
|
1824
1824
|
hubBasePath: cr
|
|
1825
1825
|
});
|
|
1826
|
-
}).pipe(
|
|
1826
|
+
}).pipe(ie(6e4), A(`preview-stream-access:${e}`))), Dr = T((e) => y((t) => {
|
|
1827
1827
|
let n = Er(e), r = t(n);
|
|
1828
|
-
if (
|
|
1828
|
+
if (de(r)) {
|
|
1829
1829
|
let e = setTimeout(() => t.refresh(n), Tr);
|
|
1830
1830
|
t.addFinalizer(() => clearTimeout(e));
|
|
1831
1831
|
}
|
|
1832
1832
|
return r;
|
|
1833
1833
|
}));
|
|
1834
1834
|
function Or(e, t) {
|
|
1835
|
-
let n =
|
|
1835
|
+
let n = J(5), r;
|
|
1836
1836
|
n[0] !== e || n[1] !== t?.retry ? (r = t?.retry ? Dr(e) : Er(e), n[0] = e, n[1] = t?.retry, n[2] = r) : r = n[2];
|
|
1837
|
-
let i =
|
|
1838
|
-
return n[3] === i ? a = n[4] : (a =
|
|
1837
|
+
let i = _(r), a;
|
|
1838
|
+
return n[3] === i ? a = n[4] : (a = ue(i) ? i.value : null, n[3] = i, n[4] = a), a;
|
|
1839
1839
|
}
|
|
1840
1840
|
function kr(e) {
|
|
1841
|
-
|
|
1841
|
+
I.refresh(Er(e));
|
|
1842
1842
|
}
|
|
1843
1843
|
function Ar(e, t) {
|
|
1844
1844
|
let n = Er(e);
|
|
1845
|
-
return t &&
|
|
1845
|
+
return t && I.refresh(n), _e(P(I, n, { suspendOnWaiting: !0 }).pipe(me("10 seconds"), he(() => null)));
|
|
1846
1846
|
}
|
|
1847
1847
|
// src/browser/ServerBrowserSurface.tsx
|
|
1848
1848
|
var jr = 150, Mr = 24, Nr = 1e4, Pr = "", Fr = {
|
|
@@ -1866,26 +1866,26 @@ async function Yr(e) {
|
|
|
1866
1866
|
try {
|
|
1867
1867
|
await navigator.clipboard.writeText(e);
|
|
1868
1868
|
} catch {
|
|
1869
|
-
let t =
|
|
1869
|
+
let t = $e.add({
|
|
1870
1870
|
type: "info",
|
|
1871
1871
|
title: i(r("The page copied text")),
|
|
1872
1872
|
actionProps: {
|
|
1873
1873
|
children: i(r("Copy", { $context: "verb, copies text to the clipboard" })),
|
|
1874
1874
|
onClick: () => {
|
|
1875
|
-
|
|
1875
|
+
$e.close(t), navigator.clipboard.writeText(e).catch(() => void 0);
|
|
1876
1876
|
}
|
|
1877
1877
|
}
|
|
1878
1878
|
});
|
|
1879
1879
|
}
|
|
1880
1880
|
}
|
|
1881
1881
|
function Xr(e) {
|
|
1882
|
-
let t =
|
|
1882
|
+
let t = $e.add({
|
|
1883
1883
|
type: "info",
|
|
1884
1884
|
title: i(r("Downloaded {fileName}", { fileName: e.fileName })),
|
|
1885
1885
|
actionProps: {
|
|
1886
1886
|
children: i(r("Save", { $context: "verb, saves a downloaded file" })),
|
|
1887
1887
|
onClick: () => {
|
|
1888
|
-
|
|
1888
|
+
$e.close(t);
|
|
1889
1889
|
let n = document.createElement("a");
|
|
1890
1890
|
n.href = e.url, n.download = e.fileName, n.click();
|
|
1891
1891
|
}
|
|
@@ -1893,73 +1893,73 @@ function Xr(e) {
|
|
|
1893
1893
|
});
|
|
1894
1894
|
}
|
|
1895
1895
|
function Zr(e) {
|
|
1896
|
-
let t =
|
|
1897
|
-
t[0] !==
|
|
1898
|
-
let t =
|
|
1899
|
-
t && (ie(null), fr(t, e).catch((e) =>
|
|
1896
|
+
let t = J(139), { environmentId: n, threadId: r, tabId: a, visible: o, followSize: s, controlPosition: l, onFirstFrame: u, onNoFrames: d, onViewport: f, onControl: p, onPopup: m, className: g, pdfUrl: _, ref: v } = e, y = s === void 0 || s, b = l === void 0 ? "top" : l, x = _ === void 0 ? null : _, S = c(), C = ee(), w = K(null), T = K(null), E = K(!1), D = K(null), k = K(null), A = K(null), M = K(!1), N = K(null), [P, te] = q(null), [ne, re] = q(""), [F, ie] = q(null), [ae, oe] = q(null), se = K(null), I;
|
|
1897
|
+
t[0] !== F || t[1] !== S ? (I = (e) => {
|
|
1898
|
+
let t = F;
|
|
1899
|
+
t && (ie(null), fr(t, e).catch((e) => $e.add({
|
|
1900
1900
|
type: "error",
|
|
1901
|
-
title:
|
|
1902
|
-
description:
|
|
1901
|
+
title: S("Could not send the files to the page"),
|
|
1902
|
+
description: Ae(e, i) ?? void 0
|
|
1903
1903
|
})));
|
|
1904
|
-
}, t[0] =
|
|
1905
|
-
let
|
|
1906
|
-
t[3] ===
|
|
1907
|
-
let
|
|
1908
|
-
t[5] === Symbol.for("react.memo_cache_sentinel") ? (
|
|
1904
|
+
}, t[0] = F, t[1] = S, t[2] = I) : I = t[2];
|
|
1905
|
+
let ce = I, L = K(0), [R, ue] = q(!1), de = o && !R, fe;
|
|
1906
|
+
t[3] === de ? fe = t[4] : (fe = { retry: de }, t[3] = de, t[4] = fe);
|
|
1907
|
+
let pe = Or(n, fe), [z, me] = q(null), he = K(null), ge = K(null), B = K(null), _e = K(0), ve;
|
|
1908
|
+
t[5] === Symbol.for("react.memo_cache_sentinel") ? (ve = {
|
|
1909
1909
|
left: 1,
|
|
1910
1910
|
middle: 1,
|
|
1911
1911
|
right: 1,
|
|
1912
1912
|
none: 1
|
|
1913
|
-
}, t[5] =
|
|
1914
|
-
let
|
|
1915
|
-
t[6] ===
|
|
1916
|
-
let Ce =
|
|
1917
|
-
t[8] ===
|
|
1918
|
-
let
|
|
1919
|
-
t[10] ===
|
|
1920
|
-
let
|
|
1921
|
-
t[12] ===
|
|
1922
|
-
let
|
|
1923
|
-
t[14] ===
|
|
1924
|
-
let
|
|
1925
|
-
t[16] === Symbol.for("react.memo_cache_sentinel") ? (
|
|
1926
|
-
|
|
1927
|
-
}, t[16] =
|
|
1928
|
-
let
|
|
1929
|
-
t[17] === Symbol.for("react.memo_cache_sentinel") ? (
|
|
1930
|
-
|
|
1913
|
+
}, t[5] = ve) : ve = t[5];
|
|
1914
|
+
let ye = K(ve), be = K(null), xe = K(null), V = K(null), H = K(null), Se;
|
|
1915
|
+
t[6] === u ? Se = t[7] : (Se = () => u?.(), t[6] = u, t[7] = Se);
|
|
1916
|
+
let Ce = dt(Se), we;
|
|
1917
|
+
t[8] === d ? we = t[9] : (we = () => d?.(), t[8] = d, t[9] = we);
|
|
1918
|
+
let Te = dt(we), [Ee, De] = q(!1), U;
|
|
1919
|
+
t[10] === f ? U = t[11] : (U = (e) => f?.(e), t[10] = f, t[11] = U);
|
|
1920
|
+
let Oe = dt(U), ke;
|
|
1921
|
+
t[12] === p ? ke = t[13] : (ke = (e) => p?.(e), t[12] = p, t[13] = ke);
|
|
1922
|
+
let je = dt(ke), Me;
|
|
1923
|
+
t[14] === m ? Me = t[15] : (Me = (e) => m?.(e), t[14] = m, t[15] = Me);
|
|
1924
|
+
let Ne = dt(Me), [W, Pe] = q(null), Fe;
|
|
1925
|
+
t[16] === Symbol.for("react.memo_cache_sentinel") ? (Fe = (e) => {
|
|
1926
|
+
D.current?.send(e);
|
|
1927
|
+
}, t[16] = Fe) : Fe = t[16];
|
|
1928
|
+
let G = Fe, Ie;
|
|
1929
|
+
t[17] === Symbol.for("react.memo_cache_sentinel") ? (Ie = () => {
|
|
1930
|
+
B.current !== null && cancelAnimationFrame(B.current), B.current = null, he.current = ge.current = null, _e.current = 0, ye.current = {
|
|
1931
1931
|
left: 1,
|
|
1932
1932
|
middle: 1,
|
|
1933
1933
|
right: 1,
|
|
1934
1934
|
none: 1
|
|
1935
|
-
},
|
|
1936
|
-
}, t[17] =
|
|
1937
|
-
let
|
|
1938
|
-
t[18] === Symbol.for("react.memo_cache_sentinel") ? (
|
|
1939
|
-
|
|
1940
|
-
let e =
|
|
1941
|
-
|
|
1942
|
-
}, t[18] =
|
|
1943
|
-
let
|
|
1944
|
-
t[19] === Symbol.for("react.memo_cache_sentinel") ? (
|
|
1945
|
-
|
|
1946
|
-
}, t[19] =
|
|
1947
|
-
let
|
|
1948
|
-
t[20] === Symbol.for("react.memo_cache_sentinel") ? (
|
|
1949
|
-
let i =
|
|
1950
|
-
|
|
1935
|
+
}, be.current = null, xe.current = V.current = H.current = null, E.current = !1, T.current && (T.current.value = Pr), T.current?.blur();
|
|
1936
|
+
}, t[17] = Ie) : Ie = t[17];
|
|
1937
|
+
let Le = Ie, Re;
|
|
1938
|
+
t[18] === Symbol.for("react.memo_cache_sentinel") ? (Re = () => {
|
|
1939
|
+
B.current !== null && cancelAnimationFrame(B.current), B.current = null;
|
|
1940
|
+
let e = he.current, t = ge.current;
|
|
1941
|
+
he.current = null, ge.current = null, e && G(e), t && G(t);
|
|
1942
|
+
}, t[18] = Re) : Re = t[18];
|
|
1943
|
+
let ze = Re, Be;
|
|
1944
|
+
t[19] === Symbol.for("react.memo_cache_sentinel") ? (Be = () => {
|
|
1945
|
+
B.current === null && (B.current = requestAnimationFrame(ze));
|
|
1946
|
+
}, t[19] = Be) : Be = t[19];
|
|
1947
|
+
let Ve = Be, He;
|
|
1948
|
+
t[20] === Symbol.for("react.memo_cache_sentinel") ? (He = (e, t, n, r) => {
|
|
1949
|
+
let i = ge.current;
|
|
1950
|
+
ge.current = {
|
|
1951
1951
|
type: "wheel",
|
|
1952
1952
|
x: e.x,
|
|
1953
1953
|
y: e.y,
|
|
1954
1954
|
deltaX: (i?.deltaX ?? 0) + t,
|
|
1955
1955
|
deltaY: (i?.deltaY ?? 0) + n,
|
|
1956
1956
|
modifiers: r
|
|
1957
|
-
},
|
|
1958
|
-
}, t[20] =
|
|
1959
|
-
let
|
|
1960
|
-
t[21] === Symbol.for("react.memo_cache_sentinel") ? (
|
|
1961
|
-
let r =
|
|
1962
|
-
if (!r || !i || !
|
|
1957
|
+
}, Ve();
|
|
1958
|
+
}, t[20] = He) : He = t[20];
|
|
1959
|
+
let Ue = He, We;
|
|
1960
|
+
t[21] === Symbol.for("react.memo_cache_sentinel") ? (We = (e, t, n) => {
|
|
1961
|
+
let r = w.current, i = k.current;
|
|
1962
|
+
if (!r || !i || !M.current || N.current?.controller !== "you") return null;
|
|
1963
1963
|
let a = r.getBoundingClientRect(), o = Math.min(a.width / r.width, a.height / r.height), s = r.width * o, c = r.height * o;
|
|
1964
1964
|
if (!(s > 0 && c > 0)) return null;
|
|
1965
1965
|
let l = i.width / s, u = (e - a.left - (a.width - s) / 2) * l, d = (t - a.top - (a.height - c) / 2) * (i.height / c);
|
|
@@ -1968,51 +1968,51 @@ function Zr(e) {
|
|
|
1968
1968
|
y: Math.min(Math.max(d, 0), i.height),
|
|
1969
1969
|
scale: l
|
|
1970
1970
|
};
|
|
1971
|
-
}, t[21] =
|
|
1972
|
-
let
|
|
1973
|
-
t[22] === Symbol.for("react.memo_cache_sentinel") ? (
|
|
1974
|
-
let i =
|
|
1975
|
-
return
|
|
1971
|
+
}, t[21] = We) : We = t[21];
|
|
1972
|
+
let Ge = We, Ke;
|
|
1973
|
+
t[22] === Symbol.for("react.memo_cache_sentinel") ? (Ke = (e, t, n, r) => {
|
|
1974
|
+
let i = be.current, a = i && i.button === e && r - i.time < Hr && Math.hypot(t - i.x, n - i.y) < Ur ? i.count + 1 : 1;
|
|
1975
|
+
return be.current = {
|
|
1976
1976
|
button: e,
|
|
1977
1977
|
time: r,
|
|
1978
1978
|
x: t,
|
|
1979
1979
|
y: n,
|
|
1980
1980
|
count: a
|
|
1981
1981
|
}, a;
|
|
1982
|
-
}, t[22] =
|
|
1983
|
-
let
|
|
1984
|
-
t[23] === Symbol.for("react.memo_cache_sentinel") ? (
|
|
1985
|
-
let
|
|
1986
|
-
t[24] ===
|
|
1987
|
-
navigate: (e) =>
|
|
1982
|
+
}, t[22] = Ke) : Ke = t[22];
|
|
1983
|
+
let qe = Ke, Je;
|
|
1984
|
+
t[23] === Symbol.for("react.memo_cache_sentinel") ? (Je = () => T.current?.focus({ preventScroll: !0 }), t[23] = Je) : Je = t[23];
|
|
1985
|
+
let Ye = Je, Xe, Ze;
|
|
1986
|
+
t[24] === x ? (Xe = t[25], Ze = t[26]) : (Xe = () => ({
|
|
1987
|
+
navigate: (e) => G({
|
|
1988
1988
|
type: "navigate",
|
|
1989
1989
|
url: e
|
|
1990
1990
|
}),
|
|
1991
|
-
history: (e) =>
|
|
1991
|
+
history: (e) => G({
|
|
1992
1992
|
type: "history",
|
|
1993
1993
|
delta: e
|
|
1994
1994
|
}),
|
|
1995
|
-
reload: (e) =>
|
|
1995
|
+
reload: (e) => G({
|
|
1996
1996
|
type: "reload",
|
|
1997
1997
|
...e?.ignoreCache ? { ignoreCache: !0 } : {}
|
|
1998
1998
|
}),
|
|
1999
|
-
stopLoading: () =>
|
|
2000
|
-
viewport: (e) =>
|
|
1999
|
+
stopLoading: () => G({ type: "stopLoading" }),
|
|
2000
|
+
viewport: (e) => G({
|
|
2001
2001
|
type: "viewport",
|
|
2002
2002
|
setting: e
|
|
2003
2003
|
}),
|
|
2004
|
-
canvas: () => !
|
|
2005
|
-
}),
|
|
2006
|
-
let
|
|
2007
|
-
t[27] ===
|
|
2008
|
-
let e =
|
|
2004
|
+
canvas: () => !x && M.current ? w.current : null
|
|
2005
|
+
}), Ze = [x, G], t[24] = x, t[25] = Xe, t[26] = Ze), ft(v, Xe, Ze);
|
|
2006
|
+
let Qe, et;
|
|
2007
|
+
t[27] === y ? (Qe = t[28], et = t[29]) : (Qe = () => {
|
|
2008
|
+
let e = w.current?.parentElement;
|
|
2009
2009
|
if (!e) return;
|
|
2010
2010
|
let t = null, n = null, r = () => {
|
|
2011
2011
|
n = null;
|
|
2012
|
-
let e =
|
|
2012
|
+
let e = A.current;
|
|
2013
2013
|
if (!e) return;
|
|
2014
2014
|
let t = window.devicePixelRatio || 1, r = Math.round(e.width * t), i = Math.round(e.height * t);
|
|
2015
|
-
|
|
2015
|
+
Pe((e) => e !== null && e.width >= r && e.height >= i ? e : {
|
|
2016
2016
|
width: Math.max(r, e?.width ?? 0),
|
|
2017
2017
|
height: Math.max(i, e?.height ?? 0)
|
|
2018
2018
|
});
|
|
@@ -2023,125 +2023,125 @@ function Zr(e) {
|
|
|
2023
2023
|
let a = {
|
|
2024
2024
|
width: Math.round(i.width),
|
|
2025
2025
|
height: Math.round(i.height)
|
|
2026
|
-
}, o =
|
|
2027
|
-
(o?.width !== a.width || o.height !== a.height) && (
|
|
2026
|
+
}, o = A.current;
|
|
2027
|
+
(o?.width !== a.width || o.height !== a.height) && (A.current = a, y && D.current?.send({
|
|
2028
2028
|
type: "resize",
|
|
2029
2029
|
...a
|
|
2030
2030
|
}), n !== null && clearTimeout(n), n = setTimeout(r, o === null ? 0 : 300));
|
|
2031
|
-
}, a =
|
|
2032
|
-
t === null && (t = setTimeout(i,
|
|
2031
|
+
}, a = lt(e, () => {
|
|
2032
|
+
t === null && (t = setTimeout(i, A.current === null ? 0 : jr));
|
|
2033
2033
|
});
|
|
2034
2034
|
return () => {
|
|
2035
2035
|
a(), t !== null && clearTimeout(t), n !== null && clearTimeout(n);
|
|
2036
2036
|
};
|
|
2037
|
-
},
|
|
2038
|
-
let
|
|
2039
|
-
t[30] !==
|
|
2040
|
-
let e =
|
|
2041
|
-
if (!o ||
|
|
2037
|
+
}, et = [y], t[27] = y, t[28] = Qe, t[29] = et), ut(Qe, et);
|
|
2038
|
+
let tt;
|
|
2039
|
+
t[30] !== pe || t[31] !== R || t[32] !== W || t[33] !== je || t[34] !== n || t[35] !== Ce || t[36] !== y || t[37] !== z || t[38] !== Te || t[39] !== Ne || t[40] !== a || t[41] !== r || t[42] !== Oe || t[43] !== o ? (tt = () => {
|
|
2040
|
+
let e = w.current;
|
|
2041
|
+
if (!o || R || z || !pe || !W || !e) return;
|
|
2042
2042
|
let t = null, i = null, s = () => {
|
|
2043
2043
|
i !== null && clearTimeout(i), i = null;
|
|
2044
2044
|
}, c = _r(e, () => {
|
|
2045
|
-
|
|
2045
|
+
M.current || (M.current = !0, s(), De(!1), Ce());
|
|
2046
2046
|
}), l = gr({
|
|
2047
|
-
access:
|
|
2047
|
+
access: pe,
|
|
2048
2048
|
threadId: r,
|
|
2049
2049
|
tabId: a,
|
|
2050
|
-
maxWidth:
|
|
2051
|
-
maxHeight:
|
|
2050
|
+
maxWidth: W.width,
|
|
2051
|
+
maxHeight: W.height
|
|
2052
2052
|
}, {
|
|
2053
2053
|
onFrame: (e) => {
|
|
2054
|
-
|
|
2054
|
+
L.current = 0, c.paint(e);
|
|
2055
2055
|
},
|
|
2056
2056
|
onProbe: (e) => {
|
|
2057
|
-
if (
|
|
2057
|
+
if (N.current?.controller !== "you") return;
|
|
2058
2058
|
H.current = {
|
|
2059
2059
|
...e,
|
|
2060
2060
|
at: performance.now()
|
|
2061
2061
|
};
|
|
2062
2062
|
let t = V.current;
|
|
2063
|
-
t && t.x === e.x && t.y === e.y && (t.editable = e.editable, t.answered = !0, t.tapped && (V.current = null, e.editable ?
|
|
2063
|
+
t && t.x === e.x && t.y === e.y && (t.editable = e.editable, t.answered = !0, t.tapped && (V.current = null, e.editable ? T.current?.focus({ preventScroll: !0 }) : T.current?.blur()));
|
|
2064
2064
|
},
|
|
2065
2065
|
onPointer: (e) => {
|
|
2066
|
-
let t = ti(e,
|
|
2066
|
+
let t = ti(e, w.current, k.current);
|
|
2067
2067
|
t && oe(t);
|
|
2068
2068
|
},
|
|
2069
2069
|
onClipboard: ei,
|
|
2070
2070
|
onDownload: Xr,
|
|
2071
|
-
onPopup:
|
|
2071
|
+
onPopup: Ne,
|
|
2072
2072
|
onFileChooser: ie,
|
|
2073
2073
|
onViewport: (e) => {
|
|
2074
|
-
|
|
2074
|
+
k.current = e, Oe(e);
|
|
2075
2075
|
},
|
|
2076
2076
|
onControl: (e) => {
|
|
2077
|
-
let t =
|
|
2078
|
-
if (
|
|
2077
|
+
let t = N.current;
|
|
2078
|
+
if (N.current = e, te(e), je(e), (e.dialog?.message !== t?.dialog?.message || e.dialog?.defaultValue !== t?.dialog?.defaultValue) && re(e.dialog?.defaultValue ?? ""), e.controller !== "you") Le();
|
|
2079
2079
|
else if (t?.controller !== "you") {
|
|
2080
|
-
let e =
|
|
2081
|
-
|
|
2080
|
+
let e = A.current;
|
|
2081
|
+
y && e && l.send({
|
|
2082
2082
|
type: "resize",
|
|
2083
2083
|
...e
|
|
2084
2084
|
});
|
|
2085
2085
|
}
|
|
2086
2086
|
},
|
|
2087
2087
|
onConnectedChange: (e) => {
|
|
2088
|
-
s(), e ?
|
|
2089
|
-
|
|
2090
|
-
}, Gr)) : (ie(null),
|
|
2088
|
+
s(), e ? M.current || (i = setTimeout(() => {
|
|
2089
|
+
De(!0), Te();
|
|
2090
|
+
}, Gr)) : (ie(null), N.current = null, te(null), je(null), Le());
|
|
2091
2091
|
},
|
|
2092
|
-
onHostSetup:
|
|
2092
|
+
onHostSetup: me,
|
|
2093
2093
|
onUnauthorized: () => {
|
|
2094
|
-
let e =
|
|
2095
|
-
e >= Br ? (
|
|
2094
|
+
let e = L.current += 1;
|
|
2095
|
+
e >= Br ? (T.current?.blur(), ue(!0)) : t = setTimeout(() => kr(n), e === 1 ? 0 : 1e3 * 2 ** (e - 1));
|
|
2096
2096
|
}
|
|
2097
2097
|
});
|
|
2098
|
-
return
|
|
2099
|
-
c.stop(), s(), t !== null && clearTimeout(t), l.stop(),
|
|
2098
|
+
return D.current = l, () => {
|
|
2099
|
+
c.stop(), s(), t !== null && clearTimeout(t), l.stop(), D.current === l && (D.current = null), N.current = null, te(null), je(null), Le();
|
|
2100
2100
|
};
|
|
2101
|
-
}, t[30] =
|
|
2102
|
-
let
|
|
2103
|
-
t[45] !==
|
|
2104
|
-
|
|
2105
|
-
|
|
2106
|
-
|
|
2107
|
-
|
|
2101
|
+
}, t[30] = pe, t[31] = R, t[32] = W, t[33] = je, t[34] = n, t[35] = Ce, t[36] = y, t[37] = z, t[38] = Te, t[39] = Ne, t[40] = a, t[41] = r, t[42] = Oe, t[43] = o, t[44] = tt) : tt = t[44];
|
|
2102
|
+
let nt;
|
|
2103
|
+
t[45] !== pe || t[46] !== R || t[47] !== W || t[48] !== n || t[49] !== y || t[50] !== z || t[51] !== a || t[52] !== r || t[53] !== o ? (nt = [
|
|
2104
|
+
pe,
|
|
2105
|
+
R,
|
|
2106
|
+
W,
|
|
2107
|
+
Le,
|
|
2108
2108
|
n,
|
|
2109
|
-
|
|
2110
|
-
|
|
2109
|
+
y,
|
|
2110
|
+
z,
|
|
2111
2111
|
a,
|
|
2112
2112
|
r,
|
|
2113
2113
|
o
|
|
2114
|
-
], t[45] =
|
|
2115
|
-
let
|
|
2116
|
-
t[55] === Symbol.for("react.memo_cache_sentinel") ? (
|
|
2117
|
-
let e =
|
|
2114
|
+
], t[45] = pe, t[46] = R, t[47] = W, t[48] = n, t[49] = y, t[50] = z, t[51] = a, t[52] = r, t[53] = o, t[54] = nt) : nt = t[54], ut(tt, nt);
|
|
2115
|
+
let rt, it;
|
|
2116
|
+
t[55] === Symbol.for("react.memo_cache_sentinel") ? (rt = () => {
|
|
2117
|
+
let e = w.current;
|
|
2118
2118
|
if (!e) return;
|
|
2119
2119
|
let t = (e) => {
|
|
2120
|
-
let t =
|
|
2120
|
+
let t = Ge(e.clientX, e.clientY, !1);
|
|
2121
2121
|
if (!t) return;
|
|
2122
2122
|
e.preventDefault();
|
|
2123
|
-
let n = e.deltaMode === WheelEvent.DOM_DELTA_LINE ? Wr : e.deltaMode === WheelEvent.DOM_DELTA_PAGE ?
|
|
2124
|
-
|
|
2123
|
+
let n = e.deltaMode === WheelEvent.DOM_DELTA_LINE ? Wr : e.deltaMode === WheelEvent.DOM_DELTA_PAGE ? k.current?.height ?? 0 : 1;
|
|
2124
|
+
Ue(t, e.deltaX * n, e.deltaY * n, mr(e));
|
|
2125
2125
|
};
|
|
2126
2126
|
return e.addEventListener("wheel", t, { passive: !1 }), () => e.removeEventListener("wheel", t);
|
|
2127
|
-
},
|
|
2128
|
-
let
|
|
2129
|
-
t[57] === Symbol.for("react.memo_cache_sentinel") ? (
|
|
2130
|
-
|
|
2131
|
-
},
|
|
2132
|
-
let
|
|
2133
|
-
t[59] === Symbol.for("react.memo_cache_sentinel") ? (
|
|
2134
|
-
if (
|
|
2135
|
-
let { type: t, pointerId: n, clientX: r, clientY: i } = e, a = t === "pointercancel", o =
|
|
2127
|
+
}, it = [Ge, Ue], t[55] = rt, t[56] = it) : (rt = t[55], it = t[56]), ut(rt, it);
|
|
2128
|
+
let at, ot;
|
|
2129
|
+
t[57] === Symbol.for("react.memo_cache_sentinel") ? (at = () => () => {
|
|
2130
|
+
B.current !== null && cancelAnimationFrame(B.current);
|
|
2131
|
+
}, ot = [], t[57] = at, t[58] = ot) : (at = t[57], ot = t[58]), ut(at, ot);
|
|
2132
|
+
let st;
|
|
2133
|
+
t[59] === Symbol.for("react.memo_cache_sentinel") ? (st = (e) => {
|
|
2134
|
+
if (N.current?.controller !== "you" || Jr(e.button) !== null) return;
|
|
2135
|
+
let { type: t, pointerId: n, clientX: r, clientY: i } = e, a = t === "pointercancel", o = xe.current;
|
|
2136
2136
|
if (a && o?.pointerId === n) {
|
|
2137
|
-
|
|
2137
|
+
xe.current = V.current = null;
|
|
2138
2138
|
return;
|
|
2139
2139
|
}
|
|
2140
2140
|
if (e.pointerType === "touch" && !a) {
|
|
2141
|
-
let a =
|
|
2141
|
+
let a = Ge(r, i, t === "pointermove");
|
|
2142
2142
|
if (t === "pointerdown") {
|
|
2143
2143
|
if (!e.isPrimary) return;
|
|
2144
|
-
|
|
2144
|
+
xe.current = {
|
|
2145
2145
|
pointerId: n,
|
|
2146
2146
|
startX: r,
|
|
2147
2147
|
startY: i,
|
|
@@ -2156,7 +2156,7 @@ function Zr(e) {
|
|
|
2156
2156
|
editable: o ? t.editable : null,
|
|
2157
2157
|
answered: !1,
|
|
2158
2158
|
tapped: !1
|
|
2159
|
-
} : null, a &&
|
|
2159
|
+
} : null, a && G({
|
|
2160
2160
|
type: "probe",
|
|
2161
2161
|
x: a.x,
|
|
2162
2162
|
y: a.y
|
|
@@ -2166,37 +2166,37 @@ function Zr(e) {
|
|
|
2166
2166
|
if (!o || o.pointerId !== n) return;
|
|
2167
2167
|
if (t === "pointermove") {
|
|
2168
2168
|
if (!o.panning && Math.hypot(r - o.startX, i - o.startY) < Vr) return;
|
|
2169
|
-
o.panning = !0, a &&
|
|
2169
|
+
o.panning = !0, a && Ue(a, (o.lastX - r) * a.scale, (o.lastY - i) * a.scale, 0), o.lastX = r, o.lastY = i;
|
|
2170
2170
|
return;
|
|
2171
2171
|
}
|
|
2172
|
-
|
|
2172
|
+
xe.current = null;
|
|
2173
2173
|
let s = V.current;
|
|
2174
2174
|
if (o.panning) {
|
|
2175
2175
|
V.current = null;
|
|
2176
2176
|
return;
|
|
2177
2177
|
}
|
|
2178
2178
|
if (!a) return;
|
|
2179
|
-
s?.editable === !0 ?
|
|
2180
|
-
let c =
|
|
2179
|
+
s?.editable === !0 ? Ye() : s?.editable === !1 && T.current?.blur(), s && !s.answered ? s.tapped = !0 : V.current = null, ze();
|
|
2180
|
+
let c = qe("left", r, i, e.timeStamp), l = {
|
|
2181
2181
|
x: a.x,
|
|
2182
2182
|
y: a.y,
|
|
2183
2183
|
modifiers: 0
|
|
2184
2184
|
};
|
|
2185
|
-
|
|
2185
|
+
G({
|
|
2186
2186
|
type: "mouse",
|
|
2187
2187
|
action: "move",
|
|
2188
2188
|
...l,
|
|
2189
2189
|
button: "none",
|
|
2190
2190
|
buttons: 0,
|
|
2191
2191
|
clickCount: 0
|
|
2192
|
-
}),
|
|
2192
|
+
}), G({
|
|
2193
2193
|
type: "mouse",
|
|
2194
2194
|
action: "down",
|
|
2195
2195
|
...l,
|
|
2196
2196
|
button: "left",
|
|
2197
2197
|
buttons: 1,
|
|
2198
2198
|
clickCount: c
|
|
2199
|
-
}),
|
|
2199
|
+
}), G({
|
|
2200
2200
|
type: "mouse",
|
|
2201
2201
|
action: "up",
|
|
2202
2202
|
...l,
|
|
@@ -2206,84 +2206,84 @@ function Zr(e) {
|
|
|
2206
2206
|
});
|
|
2207
2207
|
return;
|
|
2208
2208
|
}
|
|
2209
|
-
let s =
|
|
2209
|
+
let s = _e.current;
|
|
2210
2210
|
if ((a || t === "pointerup") && s === 0) return;
|
|
2211
|
-
(a || t === "pointerup") && (
|
|
2212
|
-
let c =
|
|
2211
|
+
(a || t === "pointerup") && (_e.current = a ? 0 : e.buttons & 7);
|
|
2212
|
+
let c = Ge(r, i, t !== "pointerdown" && (a || t === "pointerup" || s !== 0 || e.buttons !== 0));
|
|
2213
2213
|
if (!c) return;
|
|
2214
2214
|
let l = {
|
|
2215
2215
|
x: c.x,
|
|
2216
2216
|
y: c.y,
|
|
2217
2217
|
modifiers: mr(e)
|
|
2218
2218
|
}, u = (t, n, a) => {
|
|
2219
|
-
t === "down" && (
|
|
2219
|
+
t === "down" && (ye.current[n] = qe(n, r, i, e.timeStamp)), G({
|
|
2220
2220
|
type: "mouse",
|
|
2221
2221
|
action: t,
|
|
2222
2222
|
...l,
|
|
2223
2223
|
button: n,
|
|
2224
2224
|
buttons: a,
|
|
2225
|
-
clickCount:
|
|
2225
|
+
clickCount: ye.current[n]
|
|
2226
2226
|
});
|
|
2227
2227
|
};
|
|
2228
|
-
if (t === "pointerdown")
|
|
2229
|
-
else if (t === "pointerup")
|
|
2228
|
+
if (t === "pointerdown") Ye(), e.currentTarget.setPointerCapture(n), ze(), _e.current = e.buttons & 7, u("down", Kr(e.button), e.buttons);
|
|
2229
|
+
else if (t === "pointerup") ze(), u("up", Kr(e.button), e.buttons);
|
|
2230
2230
|
else {
|
|
2231
2231
|
let t = a ? 0 : e.buttons & 7, n = s ^ t;
|
|
2232
2232
|
if (s !== 0 && n !== 0) {
|
|
2233
|
-
|
|
2233
|
+
ze();
|
|
2234
2234
|
let e = s;
|
|
2235
2235
|
for (let r of [
|
|
2236
2236
|
1,
|
|
2237
2237
|
2,
|
|
2238
2238
|
4
|
|
2239
2239
|
]) n & r && (e ^= r, u(t & r ? "down" : "up", qr(r), e));
|
|
2240
|
-
|
|
2240
|
+
_e.current = t;
|
|
2241
2241
|
}
|
|
2242
2242
|
if (a) return;
|
|
2243
|
-
|
|
2243
|
+
he.current = {
|
|
2244
2244
|
type: "mouse",
|
|
2245
2245
|
action: "move",
|
|
2246
2246
|
...l,
|
|
2247
2247
|
button: qr(e.buttons),
|
|
2248
2248
|
buttons: e.buttons,
|
|
2249
2249
|
clickCount: 0
|
|
2250
|
-
},
|
|
2250
|
+
}, Ve();
|
|
2251
2251
|
}
|
|
2252
|
-
}, t[59] =
|
|
2253
|
-
let
|
|
2254
|
-
t[60] === Symbol.for("react.memo_cache_sentinel") ? (
|
|
2252
|
+
}, t[59] = st) : st = t[59];
|
|
2253
|
+
let ct = st, pt;
|
|
2254
|
+
t[60] === Symbol.for("react.memo_cache_sentinel") ? (pt = (e) => {
|
|
2255
2255
|
let t = Jr(e.button);
|
|
2256
|
-
t !== null && (e.preventDefault(),
|
|
2256
|
+
t !== null && (e.preventDefault(), G({
|
|
2257
2257
|
type: "history",
|
|
2258
2258
|
delta: t
|
|
2259
2259
|
}));
|
|
2260
|
-
}, t[60] =
|
|
2261
|
-
let
|
|
2262
|
-
t[61] === Symbol.for("react.memo_cache_sentinel") ? (
|
|
2263
|
-
|
|
2264
|
-
}, t[61] =
|
|
2265
|
-
let
|
|
2266
|
-
t[62] === Symbol.for("react.memo_cache_sentinel") ? (
|
|
2260
|
+
}, t[60] = pt) : pt = t[60];
|
|
2261
|
+
let mt = pt, gt;
|
|
2262
|
+
t[61] === Symbol.for("react.memo_cache_sentinel") ? (gt = (e) => {
|
|
2263
|
+
E.current = !1, e.value = Pr, e.setSelectionRange(1, 1);
|
|
2264
|
+
}, t[61] = gt) : gt = t[61];
|
|
2265
|
+
let _t = gt, vt;
|
|
2266
|
+
t[62] === Symbol.for("react.memo_cache_sentinel") ? (vt = (e, t) => {
|
|
2267
2267
|
let n = t === void 0 ? 0 : t;
|
|
2268
|
-
|
|
2268
|
+
G({
|
|
2269
2269
|
type: "key",
|
|
2270
2270
|
action: "down",
|
|
2271
2271
|
...e,
|
|
2272
2272
|
modifiers: n
|
|
2273
|
-
}),
|
|
2273
|
+
}), G({
|
|
2274
2274
|
type: "key",
|
|
2275
2275
|
action: "up",
|
|
2276
2276
|
...e,
|
|
2277
2277
|
modifiers: n
|
|
2278
2278
|
});
|
|
2279
|
-
}, t[62] =
|
|
2280
|
-
let
|
|
2281
|
-
t[63] === Symbol.for("react.memo_cache_sentinel") ? (
|
|
2282
|
-
t.preventDefault(),
|
|
2283
|
-
}, t[63] =
|
|
2284
|
-
let
|
|
2285
|
-
t[64] === Symbol.for("react.memo_cache_sentinel") ? (
|
|
2286
|
-
if (
|
|
2279
|
+
}, t[62] = vt) : vt = t[62];
|
|
2280
|
+
let Z = vt, yt;
|
|
2281
|
+
t[63] === Symbol.for("react.memo_cache_sentinel") ? (yt = (e, t) => {
|
|
2282
|
+
t.preventDefault(), N.current?.controller === "you" && Z(e, zr);
|
|
2283
|
+
}, t[63] = yt) : yt = t[63];
|
|
2284
|
+
let bt = yt, xt;
|
|
2285
|
+
t[64] === Symbol.for("react.memo_cache_sentinel") ? (xt = (e, t) => {
|
|
2286
|
+
if (N.current?.controller !== "you" || (E.current = !1, t.nativeEvent.isComposing || t.keyCode === 229 || t.key === "Process" || t.key === "Unidentified")) return;
|
|
2287
2287
|
if (t.key === "Escape" && t.shiftKey) {
|
|
2288
2288
|
t.preventDefault(), t.stopPropagation(), e === "down" && t.currentTarget.blur();
|
|
2289
2289
|
return;
|
|
@@ -2291,7 +2291,7 @@ function Zr(e) {
|
|
|
2291
2291
|
let n = t.ctrlKey || t.metaKey;
|
|
2292
2292
|
if (n && t.key.toLowerCase() === "v" || t.shiftKey && t.key === "Insert") return;
|
|
2293
2293
|
let r = n ? void 0 : [...t.key].length === 1 ? t.key : t.key === "Enter" ? "\r" : void 0;
|
|
2294
|
-
|
|
2294
|
+
G({
|
|
2295
2295
|
type: "key",
|
|
2296
2296
|
action: e,
|
|
2297
2297
|
key: t.key,
|
|
@@ -2299,260 +2299,260 @@ function Zr(e) {
|
|
|
2299
2299
|
keyCode: t.keyCode,
|
|
2300
2300
|
...e === "down" && r !== void 0 ? { text: r } : {},
|
|
2301
2301
|
modifiers: mr(t)
|
|
2302
|
-
}),
|
|
2303
|
-
}, t[64] =
|
|
2304
|
-
let
|
|
2305
|
-
t[65] === Symbol.for("react.memo_cache_sentinel") ? (
|
|
2302
|
+
}), E.current = e === "down" && !n && (r !== void 0 || t.key === "Backspace" || t.key === "Delete"), t.ctrlKey !== t.metaKey && !t.altKey && !t.shiftKey && ["c", "x"].includes(t.key.toLowerCase()) && t.preventDefault(), !n && (t.preventDefault(), t.stopPropagation());
|
|
2303
|
+
}, t[64] = xt) : xt = t[64];
|
|
2304
|
+
let St = xt, Ct;
|
|
2305
|
+
t[65] === Symbol.for("react.memo_cache_sentinel") ? (Ct = (e) => {
|
|
2306
2306
|
let t = e.nativeEvent;
|
|
2307
2307
|
if (t instanceof InputEvent && t.isComposing) return;
|
|
2308
2308
|
let n = e.currentTarget, r = t instanceof InputEvent ? t.inputType : "";
|
|
2309
|
-
if (
|
|
2310
|
-
else if (r === "deleteContentBackward")
|
|
2311
|
-
else if (r === "deleteContentForward")
|
|
2309
|
+
if (E.current) E.current = !1;
|
|
2310
|
+
else if (r === "deleteContentBackward") Z(Fr);
|
|
2311
|
+
else if (r === "deleteContentForward") Z(Ir);
|
|
2312
2312
|
else {
|
|
2313
2313
|
let e = n.value.replace(/^\u200b/, "");
|
|
2314
|
-
e &&
|
|
2314
|
+
e && G({
|
|
2315
2315
|
type: "text",
|
|
2316
2316
|
text: e
|
|
2317
2317
|
});
|
|
2318
2318
|
}
|
|
2319
|
-
|
|
2320
|
-
}, t[65] =
|
|
2321
|
-
let
|
|
2322
|
-
t[66] ===
|
|
2323
|
-
let
|
|
2324
|
-
t[68] ===
|
|
2325
|
-
let Dt;
|
|
2326
|
-
t[70] !== j || t[71] !== S ? (Dt = lr(j, S), t[70] = j, t[71] = S, t[72] = Dt) : Dt = t[72];
|
|
2319
|
+
_t(n);
|
|
2320
|
+
}, t[65] = Ct) : Ct = t[65];
|
|
2321
|
+
let wt = Ct, Tt;
|
|
2322
|
+
t[66] === g ? Tt = t[67] : (Tt = le("relative flex flex-col overflow-hidden", g), t[66] = g, t[67] = Tt);
|
|
2323
|
+
let Et = b === "bottom" ? "order-last border-t" : "border-b", Dt;
|
|
2324
|
+
t[68] === Et ? Dt = t[69] : (Dt = le("visible relative z-20 flex shrink-0 items-center justify-between gap-2 border-border bg-background px-2 py-1", Et), t[68] = Et, t[69] = Dt);
|
|
2327
2325
|
let Ot;
|
|
2328
|
-
t[
|
|
2326
|
+
t[70] !== P || t[71] !== C ? (Ot = lr(P, C), t[70] = P, t[71] = C, t[72] = Ot) : Ot = t[72];
|
|
2327
|
+
let kt;
|
|
2328
|
+
t[73] === Ot ? kt = t[74] : (kt = /* @__PURE__ */ Y("span", {
|
|
2329
2329
|
role: "status",
|
|
2330
2330
|
className: "text-xs text-muted-foreground",
|
|
2331
|
-
children:
|
|
2332
|
-
}), t[73] =
|
|
2333
|
-
let
|
|
2334
|
-
t[75] ===
|
|
2331
|
+
children: Ot
|
|
2332
|
+
}), t[73] = Ot, t[74] = kt);
|
|
2333
|
+
let At;
|
|
2334
|
+
t[75] === P ? At = t[76] : (At = P?.canOperate ? /* @__PURE__ */ Y(j, {
|
|
2335
2335
|
variant: "outline",
|
|
2336
2336
|
size: "xs",
|
|
2337
|
-
disabled:
|
|
2338
|
-
onClick: () =>
|
|
2339
|
-
children:
|
|
2340
|
-
}) : null, t[75] =
|
|
2341
|
-
let At;
|
|
2342
|
-
t[77] !== Et || t[78] !== Ot || t[79] !== kt ? (At = /* @__PURE__ */ Z("div", {
|
|
2343
|
-
className: Et,
|
|
2344
|
-
children: [Ot, kt]
|
|
2345
|
-
}), t[77] = Et, t[78] = Ot, t[79] = kt, t[80] = At) : At = t[80];
|
|
2337
|
+
disabled: P.controller === "another-viewer",
|
|
2338
|
+
onClick: () => G({ type: P.controller === "you" ? "releaseControl" : "takeControl" }),
|
|
2339
|
+
children: P.controller === "you" ? /* @__PURE__ */ Y(O, { children: "Release control" }) : /* @__PURE__ */ Y(O, { children: "Take control" })
|
|
2340
|
+
}) : null, t[75] = P, t[76] = At);
|
|
2346
2341
|
let jt;
|
|
2347
|
-
t[
|
|
2348
|
-
|
|
2342
|
+
t[77] !== Dt || t[78] !== kt || t[79] !== At ? (jt = /* @__PURE__ */ X("div", {
|
|
2343
|
+
className: Dt,
|
|
2344
|
+
children: [kt, At]
|
|
2345
|
+
}), t[77] = Dt, t[78] = kt, t[79] = At, t[80] = jt) : jt = t[80];
|
|
2346
|
+
let Mt;
|
|
2347
|
+
t[81] !== S || t[82] !== x ? (Mt = x ? /* @__PURE__ */ Y("embed", {
|
|
2348
|
+
src: x,
|
|
2349
2349
|
type: "application/pdf",
|
|
2350
|
-
title:
|
|
2350
|
+
title: S("PDF document"),
|
|
2351
2351
|
className: "absolute inset-0 z-10 size-full border-0"
|
|
2352
|
-
}) : null, t[81] =
|
|
2353
|
-
let
|
|
2354
|
-
t[84] === Symbol.for("react.memo_cache_sentinel") ? (
|
|
2355
|
-
ref:
|
|
2352
|
+
}) : null, t[81] = S, t[82] = x, t[83] = Mt) : Mt = t[83];
|
|
2353
|
+
let Nt;
|
|
2354
|
+
t[84] === Symbol.for("react.memo_cache_sentinel") ? (Nt = /* @__PURE__ */ Y("canvas", {
|
|
2355
|
+
ref: w,
|
|
2356
2356
|
className: "block size-full touch-none object-contain",
|
|
2357
|
-
onPointerDown:
|
|
2358
|
-
onPointerMove:
|
|
2359
|
-
onPointerUp:
|
|
2360
|
-
onPointerCancel:
|
|
2357
|
+
onPointerDown: ct,
|
|
2358
|
+
onPointerMove: ct,
|
|
2359
|
+
onPointerUp: ct,
|
|
2360
|
+
onPointerCancel: ct,
|
|
2361
2361
|
onMouseDown: $r,
|
|
2362
2362
|
onContextMenu: Qr
|
|
2363
|
-
}), t[84] =
|
|
2364
|
-
let Nt;
|
|
2365
|
-
t[85] !== ae || t[86] !== j?.controller || t[87] !== b ? (Nt = !b && ae && j?.controller !== "you" ? /* @__PURE__ */ X(wr, {
|
|
2366
|
-
...ae,
|
|
2367
|
-
controller: j?.controller === "agent" ? "agent" : "none"
|
|
2368
|
-
}) : null, t[85] = ae, t[86] = j?.controller, t[87] = b, t[88] = Nt) : Nt = t[88];
|
|
2363
|
+
}), t[84] = Nt) : Nt = t[84];
|
|
2369
2364
|
let Pt;
|
|
2370
|
-
t[
|
|
2365
|
+
t[85] !== ae || t[86] !== P?.controller || t[87] !== x ? (Pt = !x && ae && P?.controller !== "you" ? /* @__PURE__ */ Y(wr, {
|
|
2366
|
+
...ae,
|
|
2367
|
+
controller: P?.controller === "agent" ? "agent" : "none"
|
|
2368
|
+
}) : null, t[85] = ae, t[86] = P?.controller, t[87] = x, t[88] = Pt) : Pt = t[88];
|
|
2371
2369
|
let Ft;
|
|
2372
|
-
t[
|
|
2373
|
-
let It
|
|
2374
|
-
t[
|
|
2375
|
-
let
|
|
2376
|
-
t[
|
|
2377
|
-
let
|
|
2378
|
-
t[
|
|
2370
|
+
t[89] === S ? Ft = t[90] : (Ft = S("Browser page"), t[89] = S, t[90] = Ft);
|
|
2371
|
+
let It;
|
|
2372
|
+
t[91] === S ? It = t[92] : (It = S("Press Shift+Escape to leave the browser page."), t[91] = S, t[92] = It);
|
|
2373
|
+
let Lt = x !== null || P?.controller !== "you", Rt;
|
|
2374
|
+
t[93] === Symbol.for("react.memo_cache_sentinel") ? (Rt = (e) => _t(e.currentTarget), t[93] = Rt) : Rt = t[93];
|
|
2375
|
+
let zt, Bt;
|
|
2376
|
+
t[94] === Symbol.for("react.memo_cache_sentinel") ? (zt = (e) => St("down", e), Bt = (e) => St("up", e), t[94] = zt, t[95] = Bt) : (zt = t[94], Bt = t[95]);
|
|
2377
|
+
let Vt, Ht, Ut, Wt;
|
|
2378
|
+
t[96] === Symbol.for("react.memo_cache_sentinel") ? (Vt = (e) => {
|
|
2379
2379
|
let t = e.data.replace(/^\u200b/, "");
|
|
2380
|
-
t &&
|
|
2380
|
+
t && G({
|
|
2381
2381
|
type: "text",
|
|
2382
2382
|
text: t
|
|
2383
|
-
}),
|
|
2384
|
-
},
|
|
2383
|
+
}), _t(e.currentTarget);
|
|
2384
|
+
}, Ht = (e) => bt(Lr, e), Ut = (e) => bt(Rr, e), Wt = (e) => {
|
|
2385
2385
|
e.preventDefault();
|
|
2386
2386
|
let t = e.clipboardData.getData("text/plain");
|
|
2387
|
-
t &&
|
|
2387
|
+
t && G({
|
|
2388
2388
|
type: "text",
|
|
2389
2389
|
text: t
|
|
2390
2390
|
});
|
|
2391
|
-
}, t[96] =
|
|
2392
|
-
let
|
|
2393
|
-
t[100] !==
|
|
2394
|
-
ref:
|
|
2395
|
-
"aria-label":
|
|
2396
|
-
"aria-description":
|
|
2391
|
+
}, t[96] = Vt, t[97] = Ht, t[98] = Ut, t[99] = Wt) : (Vt = t[96], Ht = t[97], Ut = t[98], Wt = t[99]);
|
|
2392
|
+
let Gt;
|
|
2393
|
+
t[100] !== Ft || t[101] !== It || t[102] !== Lt ? (Gt = /* @__PURE__ */ Y("textarea", {
|
|
2394
|
+
ref: T,
|
|
2395
|
+
"aria-label": Ft,
|
|
2396
|
+
"aria-description": It,
|
|
2397
2397
|
autoCapitalize: "off",
|
|
2398
2398
|
autoComplete: "off",
|
|
2399
2399
|
autoCorrect: "off",
|
|
2400
2400
|
spellCheck: !1,
|
|
2401
|
-
disabled:
|
|
2401
|
+
disabled: Lt,
|
|
2402
2402
|
defaultValue: Pr,
|
|
2403
|
-
onFocus:
|
|
2403
|
+
onFocus: Rt,
|
|
2404
2404
|
className: "sr-only top-0 left-0 text-base",
|
|
2405
|
-
onKeyDown:
|
|
2406
|
-
onKeyUp:
|
|
2407
|
-
onInput:
|
|
2408
|
-
onCompositionEnd:
|
|
2409
|
-
onCopy:
|
|
2410
|
-
onCut:
|
|
2411
|
-
onPaste:
|
|
2412
|
-
}), t[100] =
|
|
2413
|
-
let
|
|
2414
|
-
t[104] !==
|
|
2405
|
+
onKeyDown: zt,
|
|
2406
|
+
onKeyUp: Bt,
|
|
2407
|
+
onInput: wt,
|
|
2408
|
+
onCompositionEnd: Vt,
|
|
2409
|
+
onCopy: Ht,
|
|
2410
|
+
onCut: Ut,
|
|
2411
|
+
onPaste: Wt
|
|
2412
|
+
}), t[100] = Ft, t[101] = It, t[102] = Lt, t[103] = Gt) : Gt = t[103];
|
|
2413
|
+
let Q;
|
|
2414
|
+
t[104] !== Ee || t[105] !== x || t[106] !== o ? (Q = o && Ee && !x ? /* @__PURE__ */ Y("div", {
|
|
2415
2415
|
className: "absolute inset-0 flex items-center justify-center bg-background p-4 text-center",
|
|
2416
|
-
children: /* @__PURE__ */
|
|
2416
|
+
children: /* @__PURE__ */ Y("p", {
|
|
2417
2417
|
role: "alert",
|
|
2418
2418
|
className: "max-w-sm text-sm text-muted-foreground",
|
|
2419
|
-
children: /* @__PURE__ */
|
|
2419
|
+
children: /* @__PURE__ */ Y(O, { children: "The server's browser loaded this page but is not drawing it. Try reloading, or open the page in a browser on this computer." })
|
|
2420
2420
|
})
|
|
2421
|
-
}) : null, t[104] =
|
|
2422
|
-
let
|
|
2423
|
-
t[108] !==
|
|
2421
|
+
}) : null, t[104] = Ee, t[105] = x, t[106] = o, t[107] = Q) : Q = t[107];
|
|
2422
|
+
let Kt;
|
|
2423
|
+
t[108] !== ce || t[109] !== P?.controller || t[110] !== F || t[111] !== S ? (Kt = F && P?.controller === "you" ? /* @__PURE__ */ X("div", {
|
|
2424
2424
|
className: "absolute inset-x-2 top-2 z-10 flex flex-col gap-2 rounded-lg border border-border bg-background p-3 shadow-lg",
|
|
2425
2425
|
role: "dialog",
|
|
2426
|
-
"aria-label":
|
|
2426
|
+
"aria-label": S("Choose files for the page"),
|
|
2427
2427
|
children: [
|
|
2428
|
-
/* @__PURE__ */
|
|
2428
|
+
/* @__PURE__ */ Y("p", {
|
|
2429
2429
|
className: "text-sm",
|
|
2430
|
-
children:
|
|
2430
|
+
children: F.multiple ? /* @__PURE__ */ Y(O, { children: "The page asks for files." }) : /* @__PURE__ */ Y(O, { children: "The page asks for a file." })
|
|
2431
2431
|
}),
|
|
2432
|
-
/* @__PURE__ */
|
|
2432
|
+
/* @__PURE__ */ Y("input", {
|
|
2433
2433
|
ref: se,
|
|
2434
2434
|
type: "file",
|
|
2435
2435
|
className: "hidden",
|
|
2436
|
-
multiple:
|
|
2437
|
-
accept:
|
|
2436
|
+
multiple: F.multiple,
|
|
2437
|
+
accept: F.accept,
|
|
2438
2438
|
onChange: (e) => {
|
|
2439
2439
|
let t = [...e.currentTarget.files ?? []];
|
|
2440
|
-
e.currentTarget.value = "", t.length > 0 &&
|
|
2440
|
+
e.currentTarget.value = "", t.length > 0 && ce(t);
|
|
2441
2441
|
}
|
|
2442
2442
|
}),
|
|
2443
|
-
/* @__PURE__ */
|
|
2443
|
+
/* @__PURE__ */ X("div", {
|
|
2444
2444
|
className: "flex justify-end gap-2",
|
|
2445
|
-
children: [/* @__PURE__ */
|
|
2445
|
+
children: [/* @__PURE__ */ Y(j, {
|
|
2446
2446
|
variant: "outline",
|
|
2447
2447
|
size: "sm",
|
|
2448
|
-
onClick: () =>
|
|
2449
|
-
children: /* @__PURE__ */
|
|
2450
|
-
}), /* @__PURE__ */
|
|
2448
|
+
onClick: () => ce([]),
|
|
2449
|
+
children: /* @__PURE__ */ Y(O, { children: "Cancel" })
|
|
2450
|
+
}), /* @__PURE__ */ Y(j, {
|
|
2451
2451
|
size: "sm",
|
|
2452
2452
|
onClick: () => se.current?.click(),
|
|
2453
|
-
children:
|
|
2453
|
+
children: F.multiple ? /* @__PURE__ */ Y(O, { children: "Choose files" }) : /* @__PURE__ */ Y(O, { children: "Choose file" })
|
|
2454
2454
|
})]
|
|
2455
2455
|
})
|
|
2456
2456
|
]
|
|
2457
|
-
}) : null, t[108] =
|
|
2458
|
-
let
|
|
2459
|
-
t[113] !==
|
|
2457
|
+
}) : null, t[108] = ce, t[109] = P?.controller, t[110] = F, t[111] = S, t[112] = Kt) : Kt = t[112];
|
|
2458
|
+
let qt;
|
|
2459
|
+
t[113] !== P || t[114] !== S || t[115] !== ne ? (qt = P?.dialog ? /* @__PURE__ */ X("div", {
|
|
2460
2460
|
className: "absolute inset-x-2 top-2 z-10 flex flex-col gap-2 rounded-lg border border-border bg-background p-3 shadow-lg",
|
|
2461
2461
|
role: "dialog",
|
|
2462
|
-
"aria-label":
|
|
2463
|
-
children: [/* @__PURE__ */
|
|
2462
|
+
"aria-label": S("Browser dialog"),
|
|
2463
|
+
children: [/* @__PURE__ */ Y("p", {
|
|
2464
2464
|
className: "break-words text-sm",
|
|
2465
|
-
children:
|
|
2466
|
-
}),
|
|
2467
|
-
"aria-label":
|
|
2468
|
-
value:
|
|
2469
|
-
onChange: (e) =>
|
|
2470
|
-
}) : null, /* @__PURE__ */
|
|
2465
|
+
children: P.dialog.message
|
|
2466
|
+
}), P.controller === "you" ? /* @__PURE__ */ X(ht, { children: [P.dialog.type === "prompt" ? /* @__PURE__ */ Y(h, {
|
|
2467
|
+
"aria-label": S("Dialog response"),
|
|
2468
|
+
value: ne,
|
|
2469
|
+
onChange: (e) => re(e.target.value)
|
|
2470
|
+
}) : null, /* @__PURE__ */ X("div", {
|
|
2471
2471
|
className: "flex justify-end gap-2",
|
|
2472
|
-
children: [/* @__PURE__ */
|
|
2472
|
+
children: [/* @__PURE__ */ Y(j, {
|
|
2473
2473
|
variant: "outline",
|
|
2474
2474
|
size: "sm",
|
|
2475
|
-
onClick: () =>
|
|
2475
|
+
onClick: () => G({
|
|
2476
2476
|
type: "dialog",
|
|
2477
2477
|
accept: !1
|
|
2478
2478
|
}),
|
|
2479
|
-
children: /* @__PURE__ */
|
|
2480
|
-
}), /* @__PURE__ */
|
|
2479
|
+
children: /* @__PURE__ */ Y(O, { children: "Dismiss" })
|
|
2480
|
+
}), /* @__PURE__ */ Y(j, {
|
|
2481
2481
|
size: "sm",
|
|
2482
|
-
onClick: () =>
|
|
2482
|
+
onClick: () => G({
|
|
2483
2483
|
type: "dialog",
|
|
2484
2484
|
accept: !0,
|
|
2485
|
-
...
|
|
2485
|
+
...P.dialog?.type === "prompt" ? { promptText: ne } : {}
|
|
2486
2486
|
}),
|
|
2487
|
-
children: /* @__PURE__ */
|
|
2487
|
+
children: /* @__PURE__ */ Y(O, { children: "Accept" })
|
|
2488
2488
|
})]
|
|
2489
|
-
})] }) : /* @__PURE__ */
|
|
2489
|
+
})] }) : /* @__PURE__ */ Y("p", {
|
|
2490
2490
|
className: "text-xs text-muted-foreground",
|
|
2491
|
-
children: /* @__PURE__ */
|
|
2491
|
+
children: /* @__PURE__ */ Y(O, { children: "Take control to respond." })
|
|
2492
2492
|
})]
|
|
2493
|
-
}) : null, t[113] =
|
|
2494
|
-
let
|
|
2495
|
-
t[117] !==
|
|
2493
|
+
}) : null, t[113] = P, t[114] = S, t[115] = ne, t[116] = qt) : qt = t[116];
|
|
2494
|
+
let Jt;
|
|
2495
|
+
t[117] !== Mt || t[118] !== Pt || t[119] !== Gt || t[120] !== Q || t[121] !== Kt || t[122] !== qt ? (Jt = /* @__PURE__ */ X("div", {
|
|
2496
2496
|
className: "relative min-h-0 flex-1",
|
|
2497
2497
|
children: [
|
|
2498
|
-
jt,
|
|
2499
2498
|
Mt,
|
|
2500
2499
|
Nt,
|
|
2501
|
-
|
|
2502
|
-
$,
|
|
2500
|
+
Pt,
|
|
2503
2501
|
Gt,
|
|
2504
|
-
|
|
2502
|
+
Q,
|
|
2503
|
+
Kt,
|
|
2504
|
+
qt
|
|
2505
2505
|
]
|
|
2506
|
-
}), t[117] =
|
|
2507
|
-
let
|
|
2508
|
-
t[124] !==
|
|
2506
|
+
}), t[117] = Mt, t[118] = Pt, t[119] = Gt, t[120] = Q, t[121] = Kt, t[122] = qt, t[123] = Jt) : Jt = t[123];
|
|
2507
|
+
let Yt;
|
|
2508
|
+
t[124] !== z || t[125] !== C || t[126] !== o ? (Yt = o && z ? /* @__PURE__ */ X("div", {
|
|
2509
2509
|
className: "visible absolute inset-0 z-20 flex flex-col items-center justify-center gap-3 bg-background p-4 text-center",
|
|
2510
2510
|
children: [
|
|
2511
|
-
/* @__PURE__ */
|
|
2511
|
+
/* @__PURE__ */ Y("p", {
|
|
2512
2512
|
role: "alert",
|
|
2513
2513
|
className: "max-w-sm text-sm text-muted-foreground",
|
|
2514
|
-
children: yr(
|
|
2514
|
+
children: yr(z, C)
|
|
2515
2515
|
}),
|
|
2516
|
-
/* @__PURE__ */
|
|
2517
|
-
command:
|
|
2516
|
+
/* @__PURE__ */ Y(ar, {
|
|
2517
|
+
command: z.command,
|
|
2518
2518
|
className: "w-full max-w-md text-left"
|
|
2519
2519
|
}),
|
|
2520
|
-
/* @__PURE__ */
|
|
2520
|
+
/* @__PURE__ */ Y(j, {
|
|
2521
2521
|
variant: "outline",
|
|
2522
2522
|
size: "sm",
|
|
2523
|
-
onClick: () =>
|
|
2524
|
-
children: /* @__PURE__ */
|
|
2523
|
+
onClick: () => me(null),
|
|
2524
|
+
children: /* @__PURE__ */ Y(O, { children: "Try again" })
|
|
2525
2525
|
})
|
|
2526
2526
|
]
|
|
2527
|
-
}) : null, t[124] =
|
|
2528
|
-
let
|
|
2529
|
-
t[128] !==
|
|
2527
|
+
}) : null, t[124] = z, t[125] = C, t[126] = o, t[127] = Yt) : Yt = t[127];
|
|
2528
|
+
let Xt;
|
|
2529
|
+
t[128] !== R || t[129] !== n || t[130] !== o ? (Xt = o && R ? /* @__PURE__ */ X("div", {
|
|
2530
2530
|
className: "visible absolute inset-0 z-20 flex flex-col items-center justify-center gap-2 bg-background p-3 text-center",
|
|
2531
|
-
children: [/* @__PURE__ */
|
|
2531
|
+
children: [/* @__PURE__ */ Y("p", {
|
|
2532
2532
|
role: "alert",
|
|
2533
2533
|
className: "text-xs text-muted-foreground",
|
|
2534
|
-
children: /* @__PURE__ */
|
|
2535
|
-
}), /* @__PURE__ */
|
|
2534
|
+
children: /* @__PURE__ */ Y(O, { children: "Browser connection was refused." })
|
|
2535
|
+
}), /* @__PURE__ */ Y(j, {
|
|
2536
2536
|
variant: "outline",
|
|
2537
2537
|
size: "sm",
|
|
2538
2538
|
onClick: () => {
|
|
2539
|
-
|
|
2539
|
+
L.current = 0, ue(!1), kr(n);
|
|
2540
2540
|
},
|
|
2541
|
-
children: /* @__PURE__ */
|
|
2541
|
+
children: /* @__PURE__ */ Y(O, { children: "Reconnect" })
|
|
2542
2542
|
})]
|
|
2543
|
-
}) : null, t[128] =
|
|
2544
|
-
let
|
|
2545
|
-
return t[132] !==
|
|
2546
|
-
className:
|
|
2543
|
+
}) : null, t[128] = R, t[129] = n, t[130] = o, t[131] = Xt) : Xt = t[131];
|
|
2544
|
+
let Zt;
|
|
2545
|
+
return t[132] !== Tt || t[133] !== jt || t[134] !== Jt || t[135] !== Yt || t[136] !== Xt || t[137] !== a ? (Zt = /* @__PURE__ */ X("div", {
|
|
2546
|
+
className: Tt,
|
|
2547
2547
|
"data-server-browser-surface": a,
|
|
2548
|
-
onMouseUp:
|
|
2548
|
+
onMouseUp: mt,
|
|
2549
2549
|
children: [
|
|
2550
|
-
|
|
2551
|
-
qt,
|
|
2550
|
+
jt,
|
|
2552
2551
|
Jt,
|
|
2553
|
-
Yt
|
|
2552
|
+
Yt,
|
|
2553
|
+
Xt
|
|
2554
2554
|
]
|
|
2555
|
-
}), t[132] =
|
|
2555
|
+
}), t[132] = Tt, t[133] = jt, t[134] = Jt, t[135] = Yt, t[136] = Xt, t[137] = a, t[138] = Zt) : Zt = t[138], Zt;
|
|
2556
2556
|
}
|
|
2557
2557
|
function Qr(e) {
|
|
2558
2558
|
return e.preventDefault();
|
|
@@ -2578,31 +2578,31 @@ function ti(e, t, n) {
|
|
|
2578
2578
|
}
|
|
2579
2579
|
// src/components/preview/errorCodeMessages.ts
|
|
2580
2580
|
function ni(e, t = i) {
|
|
2581
|
-
let n =
|
|
2581
|
+
let n = F[e];
|
|
2582
2582
|
return n ? t(n) : e.length > 0 ? e : t(r("Network error"));
|
|
2583
2583
|
}
|
|
2584
2584
|
// src/components/preview/PreviewUnreachable.tsx
|
|
2585
2585
|
function ri(e) {
|
|
2586
|
-
let t =
|
|
2586
|
+
let t = J(24), { url: n, fileName: r, downloadUrl: i, onOpen: a } = e, o;
|
|
2587
2587
|
t[0] === n ? o = t[1] : (o = si(n) ?? n, t[0] = n, t[1] = o);
|
|
2588
2588
|
let s = o, c;
|
|
2589
|
-
t[2] === Symbol.for("react.memo_cache_sentinel") ? (c = /* @__PURE__ */
|
|
2589
|
+
t[2] === Symbol.for("react.memo_cache_sentinel") ? (c = /* @__PURE__ */ Y(oi, { className: "mb-6 size-12 text-muted-foreground/70" }), t[2] = c) : c = t[2];
|
|
2590
2590
|
let l;
|
|
2591
|
-
t[3] === Symbol.for("react.memo_cache_sentinel") ? (l = /* @__PURE__ */
|
|
2591
|
+
t[3] === Symbol.for("react.memo_cache_sentinel") ? (l = /* @__PURE__ */ Y("h1", {
|
|
2592
2592
|
className: "mb-3 text-2xl font-semibold leading-tight text-foreground",
|
|
2593
|
-
children: /* @__PURE__ */
|
|
2593
|
+
children: /* @__PURE__ */ Y(O, { children: "This file can’t be shown here" })
|
|
2594
2594
|
}), t[3] = l) : l = t[3];
|
|
2595
2595
|
let u;
|
|
2596
|
-
t[4] === r ? u = t[5] : (u = /* @__PURE__ */
|
|
2596
|
+
t[4] === r ? u = t[5] : (u = /* @__PURE__ */ Y("span", {
|
|
2597
2597
|
className: "font-semibold text-foreground",
|
|
2598
|
-
children: /* @__PURE__ */
|
|
2598
|
+
children: /* @__PURE__ */ Y(L, { children: r })
|
|
2599
2599
|
}), t[4] = r, t[5] = u);
|
|
2600
2600
|
let d;
|
|
2601
|
-
t[6] === s ? d = t[7] : (d = /* @__PURE__ */
|
|
2601
|
+
t[6] === s ? d = t[7] : (d = /* @__PURE__ */ Y(L, { children: s }), t[6] = s, t[7] = d);
|
|
2602
2602
|
let f;
|
|
2603
|
-
t[8] !== u || t[9] !== d ? (f = /* @__PURE__ */
|
|
2603
|
+
t[8] !== u || t[9] !== d ? (f = /* @__PURE__ */ Y("p", {
|
|
2604
2604
|
className: "text-sm leading-relaxed text-muted-foreground",
|
|
2605
|
-
children: /* @__PURE__ */
|
|
2605
|
+
children: /* @__PURE__ */ X(O, { children: [
|
|
2606
2606
|
u,
|
|
2607
2607
|
" ",
|
|
2608
2608
|
"from ",
|
|
@@ -2611,11 +2611,11 @@ function ri(e) {
|
|
|
2611
2611
|
] })
|
|
2612
2612
|
}), t[8] = u, t[9] = d, t[10] = f) : f = t[10];
|
|
2613
2613
|
let p;
|
|
2614
|
-
t[11] === Symbol.for("react.memo_cache_sentinel") ? (p = /* @__PURE__ */
|
|
2614
|
+
t[11] === Symbol.for("react.memo_cache_sentinel") ? (p = /* @__PURE__ */ Y("div", { className: "flex-1" }), t[11] = p) : p = t[11];
|
|
2615
2615
|
let m;
|
|
2616
|
-
t[12] === Symbol.for("react.memo_cache_sentinel") ? (m = /* @__PURE__ */
|
|
2616
|
+
t[12] === Symbol.for("react.memo_cache_sentinel") ? (m = /* @__PURE__ */ Y(O, { children: "Open in browser" }), t[12] = m) : m = t[12];
|
|
2617
2617
|
let h;
|
|
2618
|
-
t[13] === a ? h = t[14] : (h = /* @__PURE__ */
|
|
2618
|
+
t[13] === a ? h = t[14] : (h = /* @__PURE__ */ Y(j, {
|
|
2619
2619
|
type: "button",
|
|
2620
2620
|
variant: "outline",
|
|
2621
2621
|
size: "sm",
|
|
@@ -2623,20 +2623,20 @@ function ri(e) {
|
|
|
2623
2623
|
children: m
|
|
2624
2624
|
}), t[13] = a, t[14] = h);
|
|
2625
2625
|
let g;
|
|
2626
|
-
t[15] !== i || t[16] !== r ? (g = i ? /* @__PURE__ */
|
|
2626
|
+
t[15] !== i || t[16] !== r ? (g = i ? /* @__PURE__ */ Y(j, {
|
|
2627
2627
|
type: "button",
|
|
2628
2628
|
size: "sm",
|
|
2629
|
-
render: /* @__PURE__ */
|
|
2629
|
+
render: /* @__PURE__ */ Y("a", {
|
|
2630
2630
|
href: i,
|
|
2631
2631
|
download: r
|
|
2632
2632
|
}),
|
|
2633
|
-
children: /* @__PURE__ */
|
|
2633
|
+
children: /* @__PURE__ */ Y(O, {
|
|
2634
2634
|
context: "verb",
|
|
2635
2635
|
children: "Download"
|
|
2636
2636
|
})
|
|
2637
2637
|
}) : null, t[15] = i, t[16] = r, t[17] = g) : g = t[17];
|
|
2638
2638
|
let _;
|
|
2639
|
-
t[18] !== g || t[19] !== h ? (_ = /* @__PURE__ */
|
|
2639
|
+
t[18] !== g || t[19] !== h ? (_ = /* @__PURE__ */ X("div", {
|
|
2640
2640
|
className: "mt-auto flex items-center gap-2 pt-8",
|
|
2641
2641
|
children: [
|
|
2642
2642
|
p,
|
|
@@ -2645,9 +2645,9 @@ function ri(e) {
|
|
|
2645
2645
|
]
|
|
2646
2646
|
}), t[18] = g, t[19] = h, t[20] = _) : _ = t[20];
|
|
2647
2647
|
let v;
|
|
2648
|
-
return t[21] !== _ || t[22] !== f ? (v = /* @__PURE__ */
|
|
2648
|
+
return t[21] !== _ || t[22] !== f ? (v = /* @__PURE__ */ Y("div", {
|
|
2649
2649
|
className: "scrollbar-gutter-both relative flex h-full min-h-0 w-full overflow-y-auto bg-background",
|
|
2650
|
-
children: /* @__PURE__ */
|
|
2650
|
+
children: /* @__PURE__ */ X("div", {
|
|
2651
2651
|
className: "mx-auto flex w-full max-w-xl flex-1 flex-col px-8 py-12 sm:py-16",
|
|
2652
2652
|
children: [
|
|
2653
2653
|
c,
|
|
@@ -2659,128 +2659,128 @@ function ri(e) {
|
|
|
2659
2659
|
}), t[21] = _, t[22] = f, t[23] = v) : v = t[23], v;
|
|
2660
2660
|
}
|
|
2661
2661
|
function ii(e) {
|
|
2662
|
-
let t =
|
|
2663
|
-
t[0] === n ?
|
|
2664
|
-
let
|
|
2665
|
-
t[2] !== i || t[3] !==
|
|
2666
|
-
let
|
|
2667
|
-
t[5] !== r || t[6] !== i ? (
|
|
2668
|
-
let
|
|
2669
|
-
t[8] === Symbol.for("react.memo_cache_sentinel") ? (
|
|
2670
|
-
let v;
|
|
2671
|
-
t[9] === Symbol.for("react.memo_cache_sentinel") ? (v = /* @__PURE__ */ X("h1", {
|
|
2672
|
-
className: "mb-3 text-2xl font-semibold leading-tight text-foreground",
|
|
2673
|
-
children: /* @__PURE__ */ X(I, { children: "This site can’t be reached" })
|
|
2674
|
-
}), t[9] = v) : v = t[9];
|
|
2662
|
+
let t = J(43), { url: n, code: r, description: i, onReload: a, move: o } = e, s = c(), l = ee(), [u, d] = q(!1), f;
|
|
2663
|
+
t[0] === n ? f = t[1] : (f = si(n) ?? n, t[0] = n, t[1] = f);
|
|
2664
|
+
let p = f, m;
|
|
2665
|
+
t[2] !== i || t[3] !== l ? (m = ni(i, l), t[2] = i, t[3] = l, t[4] = m) : m = t[4];
|
|
2666
|
+
let h = m, g;
|
|
2667
|
+
t[5] !== r || t[6] !== i ? (g = i.length > 0 ? i : `ERR_${Math.abs(r) || "FAILED"}`, t[5] = r, t[6] = i, t[7] = g) : g = t[7];
|
|
2668
|
+
let _ = g, v;
|
|
2669
|
+
t[8] === Symbol.for("react.memo_cache_sentinel") ? (v = /* @__PURE__ */ Y(oi, { className: "mb-6 size-12 text-muted-foreground/70" }), t[8] = v) : v = t[8];
|
|
2675
2670
|
let y;
|
|
2676
|
-
t[
|
|
2677
|
-
className: "font-semibold text-foreground",
|
|
2678
|
-
children: /* @__PURE__ */
|
|
2679
|
-
}), t[
|
|
2671
|
+
t[9] === Symbol.for("react.memo_cache_sentinel") ? (y = /* @__PURE__ */ Y("h1", {
|
|
2672
|
+
className: "mb-3 text-2xl font-semibold leading-tight text-foreground",
|
|
2673
|
+
children: /* @__PURE__ */ Y(O, { children: "This site can’t be reached" })
|
|
2674
|
+
}), t[9] = y) : y = t[9];
|
|
2680
2675
|
let b;
|
|
2681
|
-
t[
|
|
2676
|
+
t[10] === p ? b = t[11] : (b = /* @__PURE__ */ Y("span", {
|
|
2677
|
+
className: "font-semibold text-foreground",
|
|
2678
|
+
children: /* @__PURE__ */ Y(L, { children: p })
|
|
2679
|
+
}), t[10] = p, t[11] = b);
|
|
2682
2680
|
let x;
|
|
2683
|
-
t[
|
|
2681
|
+
t[12] === h ? x = t[13] : (x = /* @__PURE__ */ Y(L, { children: h }), t[12] = h, t[13] = x);
|
|
2682
|
+
let S;
|
|
2683
|
+
t[14] !== b || t[15] !== x ? (S = /* @__PURE__ */ Y("p", {
|
|
2684
2684
|
className: "text-sm leading-relaxed text-muted-foreground",
|
|
2685
|
-
children: /* @__PURE__ */
|
|
2686
|
-
y,
|
|
2687
|
-
": ",
|
|
2685
|
+
children: /* @__PURE__ */ X(O, { children: [
|
|
2688
2686
|
b,
|
|
2687
|
+
": ",
|
|
2688
|
+
x,
|
|
2689
2689
|
"."
|
|
2690
2690
|
] })
|
|
2691
|
-
}), t[14] =
|
|
2692
|
-
let
|
|
2693
|
-
t[17] !== o || t[18] !==
|
|
2691
|
+
}), t[14] = b, t[15] = x, t[16] = S) : S = t[16];
|
|
2692
|
+
let C;
|
|
2693
|
+
t[17] !== o || t[18] !== u ? (C = u ? /* @__PURE__ */ X("div", {
|
|
2694
2694
|
className: "mt-6 rounded-lg border border-border bg-muted/40 p-4 text-sm",
|
|
2695
|
-
children: [/* @__PURE__ */
|
|
2695
|
+
children: [/* @__PURE__ */ Y("p", {
|
|
2696
2696
|
className: "mb-2 font-medium text-foreground",
|
|
2697
|
-
children: /* @__PURE__ */
|
|
2698
|
-
}), /* @__PURE__ */
|
|
2697
|
+
children: /* @__PURE__ */ Y(O, { children: "Try:" })
|
|
2698
|
+
}), /* @__PURE__ */ X("ul", {
|
|
2699
2699
|
className: "list-disc space-y-1 pl-5 text-muted-foreground",
|
|
2700
2700
|
children: [
|
|
2701
|
-
/* @__PURE__ */
|
|
2702
|
-
/* @__PURE__ */
|
|
2703
|
-
o ? /* @__PURE__ */
|
|
2704
|
-
/* @__PURE__ */
|
|
2701
|
+
/* @__PURE__ */ Y("li", { children: /* @__PURE__ */ Y(O, { children: "Checking your connection" }) }),
|
|
2702
|
+
/* @__PURE__ */ Y("li", { children: /* @__PURE__ */ Y(O, { children: "Confirming the dev server is running" }) }),
|
|
2703
|
+
o ? /* @__PURE__ */ Y("li", { children: /* @__PURE__ */ Y(O, { children: "Opening it in the environment’s browser, which reaches its network" }) }) : null,
|
|
2704
|
+
/* @__PURE__ */ Y("li", { children: /* @__PURE__ */ Y(O, { children: "Checking the proxy and the firewall" }) })
|
|
2705
2705
|
]
|
|
2706
2706
|
})]
|
|
2707
|
-
}) : null, t[17] = o, t[18] =
|
|
2708
|
-
let C;
|
|
2709
|
-
t[20] === g ? C = t[21] : (C = /* @__PURE__ */ X("div", {
|
|
2710
|
-
className: "mt-8 text-xs uppercase tracking-wide text-muted-foreground/70",
|
|
2711
|
-
children: g
|
|
2712
|
-
}), t[20] = g, t[21] = C);
|
|
2707
|
+
}) : null, t[17] = o, t[18] = u, t[19] = C) : C = t[19];
|
|
2713
2708
|
let w;
|
|
2714
|
-
t[
|
|
2709
|
+
t[20] === _ ? w = t[21] : (w = /* @__PURE__ */ Y("div", {
|
|
2710
|
+
className: "mt-8 text-xs uppercase tracking-wide text-muted-foreground/70",
|
|
2711
|
+
children: _
|
|
2712
|
+
}), t[20] = _, t[21] = w);
|
|
2715
2713
|
let T;
|
|
2716
|
-
t[
|
|
2714
|
+
t[22] === Symbol.for("react.memo_cache_sentinel") ? (T = () => d(ai), t[22] = T) : T = t[22];
|
|
2717
2715
|
let E;
|
|
2718
|
-
t[
|
|
2716
|
+
t[23] !== s || t[24] !== u ? (E = s(u ? "Hide details" : "Details"), t[23] = s, t[24] = u, t[25] = E) : E = t[25];
|
|
2717
|
+
let D;
|
|
2718
|
+
t[26] === E ? D = t[27] : (D = /* @__PURE__ */ Y(j, {
|
|
2719
2719
|
type: "button",
|
|
2720
2720
|
variant: "outline",
|
|
2721
2721
|
size: "sm",
|
|
2722
|
-
onClick:
|
|
2723
|
-
children:
|
|
2724
|
-
}), t[26] =
|
|
2725
|
-
let
|
|
2726
|
-
t[28] === Symbol.for("react.memo_cache_sentinel") ? (
|
|
2727
|
-
let
|
|
2728
|
-
t[29] === o ?
|
|
2722
|
+
onClick: T,
|
|
2723
|
+
children: E
|
|
2724
|
+
}), t[26] = E, t[27] = D);
|
|
2725
|
+
let k;
|
|
2726
|
+
t[28] === Symbol.for("react.memo_cache_sentinel") ? (k = /* @__PURE__ */ Y("div", { className: "flex-1" }), t[28] = k) : k = t[28];
|
|
2727
|
+
let A;
|
|
2728
|
+
t[29] === o ? A = t[30] : (A = o ? /* @__PURE__ */ Y(j, {
|
|
2729
2729
|
type: "button",
|
|
2730
2730
|
variant: "outline",
|
|
2731
2731
|
size: "sm",
|
|
2732
2732
|
onClick: o.onMove,
|
|
2733
2733
|
children: o.label
|
|
2734
|
-
}) : null, t[29] = o, t[30] =
|
|
2735
|
-
let
|
|
2736
|
-
t[31] === Symbol.for("react.memo_cache_sentinel") ? (
|
|
2737
|
-
let
|
|
2738
|
-
t[32] === a ?
|
|
2734
|
+
}) : null, t[29] = o, t[30] = A);
|
|
2735
|
+
let M;
|
|
2736
|
+
t[31] === Symbol.for("react.memo_cache_sentinel") ? (M = /* @__PURE__ */ Y(O, { children: "Reload" }), t[31] = M) : M = t[31];
|
|
2737
|
+
let N;
|
|
2738
|
+
t[32] === a ? N = t[33] : (N = /* @__PURE__ */ Y(j, {
|
|
2739
2739
|
type: "button",
|
|
2740
2740
|
size: "sm",
|
|
2741
2741
|
onClick: a,
|
|
2742
|
-
children:
|
|
2743
|
-
}), t[32] = a, t[33] =
|
|
2744
|
-
let
|
|
2745
|
-
t[34] !==
|
|
2742
|
+
children: M
|
|
2743
|
+
}), t[32] = a, t[33] = N);
|
|
2744
|
+
let P;
|
|
2745
|
+
t[34] !== D || t[35] !== A || t[36] !== N ? (P = /* @__PURE__ */ X("div", {
|
|
2746
2746
|
className: "mt-auto flex items-center gap-2 pt-8",
|
|
2747
2747
|
children: [
|
|
2748
|
-
E,
|
|
2749
2748
|
D,
|
|
2750
|
-
|
|
2751
|
-
|
|
2749
|
+
k,
|
|
2750
|
+
A,
|
|
2751
|
+
N
|
|
2752
2752
|
]
|
|
2753
|
-
}), t[34] =
|
|
2753
|
+
}), t[34] = D, t[35] = A, t[36] = N, t[37] = P) : P = t[37];
|
|
2754
2754
|
let te;
|
|
2755
|
-
return t[38] !==
|
|
2755
|
+
return t[38] !== w || t[39] !== P || t[40] !== S || t[41] !== C ? (te = /* @__PURE__ */ Y("div", {
|
|
2756
2756
|
className: "scrollbar-gutter-both relative flex h-full min-h-0 w-full overflow-y-auto bg-background",
|
|
2757
|
-
children: /* @__PURE__ */
|
|
2757
|
+
children: /* @__PURE__ */ X("div", {
|
|
2758
2758
|
className: "mx-auto flex w-full max-w-xl flex-1 flex-col px-8 py-12 sm:py-16",
|
|
2759
2759
|
children: [
|
|
2760
|
-
_,
|
|
2761
2760
|
v,
|
|
2762
|
-
|
|
2761
|
+
y,
|
|
2763
2762
|
S,
|
|
2764
2763
|
C,
|
|
2765
|
-
|
|
2764
|
+
w,
|
|
2765
|
+
P
|
|
2766
2766
|
]
|
|
2767
2767
|
})
|
|
2768
|
-
}), t[38] =
|
|
2768
|
+
}), t[38] = w, t[39] = P, t[40] = S, t[41] = C, t[42] = te) : te = t[42], te;
|
|
2769
2769
|
}
|
|
2770
2770
|
function ai(e) {
|
|
2771
2771
|
return !e;
|
|
2772
2772
|
}
|
|
2773
2773
|
function oi(e) {
|
|
2774
|
-
let t =
|
|
2775
|
-
t[0] === Symbol.for("react.memo_cache_sentinel") ? (r = /* @__PURE__ */
|
|
2774
|
+
let t = J(5), { className: n } = e, r, i, a;
|
|
2775
|
+
t[0] === Symbol.for("react.memo_cache_sentinel") ? (r = /* @__PURE__ */ Y("path", { d: "M16 12 L48 12 L48 52 L16 52 Z" }), i = /* @__PURE__ */ Y("path", {
|
|
2776
2776
|
d: "M22 22 L42 22 M22 30 L36 30 M22 38 L40 38",
|
|
2777
2777
|
strokeLinecap: "round"
|
|
2778
|
-
}), a = /* @__PURE__ */
|
|
2778
|
+
}), a = /* @__PURE__ */ Y("path", {
|
|
2779
2779
|
d: "M52 8 L12 56",
|
|
2780
2780
|
strokeLinecap: "round"
|
|
2781
2781
|
}), t[0] = r, t[1] = i, t[2] = a) : (r = t[0], i = t[1], a = t[2]);
|
|
2782
2782
|
let o;
|
|
2783
|
-
return t[3] === n ? o = t[4] : (o = /* @__PURE__ */
|
|
2783
|
+
return t[3] === n ? o = t[4] : (o = /* @__PURE__ */ X("svg", {
|
|
2784
2784
|
viewBox: "0 0 64 64",
|
|
2785
2785
|
fill: "none",
|
|
2786
2786
|
stroke: "currentColor",
|
|
@@ -2802,8 +2802,8 @@ function si(e) {
|
|
|
2802
2802
|
}
|
|
2803
2803
|
// src/components/preview/showPreviewPopup.ts
|
|
2804
2804
|
function ci(e, t, n) {
|
|
2805
|
-
|
|
2806
|
-
n === "floating" ?
|
|
2805
|
+
N(e, t, () => {
|
|
2806
|
+
n === "floating" ? nt.getState().open(e, tt(t)) : at.getState().openBrowser(e, t);
|
|
2807
2807
|
});
|
|
2808
2808
|
}
|
|
2809
2809
|
// src/portDiscoveryState.ts
|
|
@@ -2812,7 +2812,7 @@ function ui(e) {
|
|
|
2812
2812
|
let t = [], n = /* @__PURE__ */ new Set();
|
|
2813
2813
|
for (let r of e ?? []) if (!(r.length === 0 || r.length > 2048 || r.trim().length !== r.length)) try {
|
|
2814
2814
|
let e = new URL(r);
|
|
2815
|
-
if (e.protocol !== "http:" && e.protocol !== "https:" || !
|
|
2815
|
+
if (e.protocol !== "http:" && e.protocol !== "https:" || !Ie(e.hostname) || e.href.length > 2048) continue;
|
|
2816
2816
|
let i = new URL(e.href);
|
|
2817
2817
|
if (i.hash = "", n.has(i.href)) continue;
|
|
2818
2818
|
if (n.add(i.href), t.push(e.href), t.length >= 32) break;
|
|
@@ -2823,10 +2823,10 @@ function di(e, t) {
|
|
|
2823
2823
|
return fi(e, t).servers;
|
|
2824
2824
|
}
|
|
2825
2825
|
function fi(e, t) {
|
|
2826
|
-
let n =
|
|
2826
|
+
let n = J(7), r, i;
|
|
2827
2827
|
if (n[0] !== t || n[1] !== e) {
|
|
2828
2828
|
let a = ui(t);
|
|
2829
|
-
r =
|
|
2829
|
+
r = it, i = e === null ? null : W.discoveredServers({
|
|
2830
2830
|
environmentId: e,
|
|
2831
2831
|
input: a.length ? { configuredUrls: a } : {}
|
|
2832
2832
|
}), n[0] = t, n[1] = e, n[2] = r, n[3] = i;
|
|
@@ -2838,13 +2838,13 @@ function fi(e, t) {
|
|
|
2838
2838
|
}, n[4] = o, n[5] = s, n[6] = c) : c = n[6], c;
|
|
2839
2839
|
}
|
|
2840
2840
|
function pi(e) {
|
|
2841
|
-
let t =
|
|
2841
|
+
let t = J(3), n = di(e.environmentId), r;
|
|
2842
2842
|
return t[0] !== e.threadId || t[1] !== n ? (r = e.threadId ? n.filter((t) => t.terminal?.threadId === e.threadId || t.agent?.threadId === e.threadId) : li, t[0] = e.threadId, t[1] = n, t[2] = r) : r = t[2], r;
|
|
2843
2843
|
}
|
|
2844
2844
|
// src/components/preview/closePreviewSession.ts
|
|
2845
2845
|
async function mi(e) {
|
|
2846
|
-
let t =
|
|
2847
|
-
t ||
|
|
2846
|
+
let t = G(e.threadRef.environmentId, I.get(ke), e.snapshot);
|
|
2847
|
+
t || S(e.threadRef, e.tabId);
|
|
2848
2848
|
let n = await e.closePreview({
|
|
2849
2849
|
environmentId: e.threadRef.environmentId,
|
|
2850
2850
|
input: {
|
|
@@ -2852,7 +2852,7 @@ async function mi(e) {
|
|
|
2852
2852
|
tabId: e.tabId
|
|
2853
2853
|
}
|
|
2854
2854
|
});
|
|
2855
|
-
return n._tag === "Failure" ? (m(e.threadRef, e.snapshot, e.tabId), n) : (t &&
|
|
2855
|
+
return n._tag === "Failure" ? (m(e.threadRef, e.snapshot, e.tabId), n) : (t && S(e.threadRef, e.tabId), e.snapshot && ot.getState().remember({
|
|
2856
2856
|
kind: "browser",
|
|
2857
2857
|
threadRef: e.threadRef,
|
|
2858
2858
|
snapshot: e.snapshot
|
|
@@ -2860,24 +2860,24 @@ async function mi(e) {
|
|
|
2860
2860
|
}
|
|
2861
2861
|
// src/components/preview/BrowserMockup.tsx
|
|
2862
2862
|
function hi(e) {
|
|
2863
|
-
let t =
|
|
2864
|
-
t[0] === n ? r = t[1] : (r =
|
|
2863
|
+
let t = J(6), { className: n } = e, r;
|
|
2864
|
+
t[0] === n ? r = t[1] : (r = le("relative flex flex-col gap-0.5 overflow-hidden rounded-sm border border-border/60 bg-card p-1 shadow-xs/5", n), t[0] = n, t[1] = r);
|
|
2865
2865
|
let i;
|
|
2866
|
-
t[2] === Symbol.for("react.memo_cache_sentinel") ? (i = /* @__PURE__ */
|
|
2866
|
+
t[2] === Symbol.for("react.memo_cache_sentinel") ? (i = /* @__PURE__ */ X("div", {
|
|
2867
2867
|
className: "flex gap-0.5",
|
|
2868
2868
|
children: [
|
|
2869
|
-
/* @__PURE__ */
|
|
2870
|
-
/* @__PURE__ */
|
|
2871
|
-
/* @__PURE__ */
|
|
2869
|
+
/* @__PURE__ */ Y("span", { className: "size-[3px] rounded-full bg-destructive/80" }),
|
|
2870
|
+
/* @__PURE__ */ Y("span", { className: "size-[3px] rounded-full bg-warning/80" }),
|
|
2871
|
+
/* @__PURE__ */ Y("span", { className: "size-[3px] rounded-full bg-success/80" })
|
|
2872
2872
|
]
|
|
2873
2873
|
}), t[2] = i) : i = t[2];
|
|
2874
2874
|
let a;
|
|
2875
|
-
t[3] === Symbol.for("react.memo_cache_sentinel") ? (a = /* @__PURE__ */
|
|
2875
|
+
t[3] === Symbol.for("react.memo_cache_sentinel") ? (a = /* @__PURE__ */ X("div", {
|
|
2876
2876
|
className: "mt-[1px] flex flex-1 flex-col gap-0.5",
|
|
2877
|
-
children: [/* @__PURE__ */
|
|
2877
|
+
children: [/* @__PURE__ */ Y("span", { className: "h-[2px] w-full rounded-full bg-muted-foreground/30" }), /* @__PURE__ */ Y("span", { className: "h-[2px] w-3/5 rounded-full bg-muted-foreground/20" })]
|
|
2878
2878
|
}), t[3] = a) : a = t[3];
|
|
2879
2879
|
let o;
|
|
2880
|
-
return t[4] === r ? o = t[5] : (o = /* @__PURE__ */
|
|
2880
|
+
return t[4] === r ? o = t[5] : (o = /* @__PURE__ */ X("div", {
|
|
2881
2881
|
"aria-hidden": !0,
|
|
2882
2882
|
className: r,
|
|
2883
2883
|
children: [i, a]
|
|
@@ -2885,10 +2885,10 @@ function hi(e) {
|
|
|
2885
2885
|
}
|
|
2886
2886
|
// src/components/preview/PreviewFaviconIcon.tsx
|
|
2887
2887
|
function gi(e) {
|
|
2888
|
-
let t =
|
|
2888
|
+
let t = J(10), n, r, i;
|
|
2889
2889
|
t[0] === e.sources ? (n = t[1], r = t[2], i = t[3]) : (r = e.sources.filter(_i), n = vi, i = r.join("\0"), t[0] = e.sources, t[1] = n, t[2] = r, t[3] = i);
|
|
2890
2890
|
let a;
|
|
2891
|
-
return t[4] !== n || t[5] !== e.className || t[6] !== e.fallback || t[7] !== r || t[8] !== i ? (a = /* @__PURE__ */
|
|
2891
|
+
return t[4] !== n || t[5] !== e.className || t[6] !== e.fallback || t[7] !== r || t[8] !== i ? (a = /* @__PURE__ */ Y(n, {
|
|
2892
2892
|
sources: r,
|
|
2893
2893
|
fallback: e.fallback,
|
|
2894
2894
|
className: e.className
|
|
@@ -2898,7 +2898,7 @@ function _i(e) {
|
|
|
2898
2898
|
return !!e;
|
|
2899
2899
|
}
|
|
2900
2900
|
function vi(e) {
|
|
2901
|
-
let t =
|
|
2901
|
+
let t = J(11), [n, r] = q(yi), i;
|
|
2902
2902
|
if (t[0] !== n || t[1] !== e.sources) {
|
|
2903
2903
|
let r;
|
|
2904
2904
|
t[3] === n ? r = t[4] : (r = (e) => !n.has(e), t[3] = n, t[4] = r), i = e.sources.find(r), t[0] = n, t[1] = e.sources, t[2] = i;
|
|
@@ -2908,7 +2908,7 @@ function vi(e) {
|
|
|
2908
2908
|
let o;
|
|
2909
2909
|
t[5] === a ? o = t[6] : (o = () => r((e) => new Set(e).add(a)), t[5] = a, t[6] = o);
|
|
2910
2910
|
let s;
|
|
2911
|
-
return t[7] !== e.className || t[8] !== a || t[9] !== o ? (s = /* @__PURE__ */
|
|
2911
|
+
return t[7] !== e.className || t[8] !== a || t[9] !== o ? (s = /* @__PURE__ */ Y("img", {
|
|
2912
2912
|
src: a,
|
|
2913
2913
|
alt: "",
|
|
2914
2914
|
"aria-hidden": "true",
|
|
@@ -2921,19 +2921,19 @@ function yi() {
|
|
|
2921
2921
|
return /* @__PURE__ */ new Set();
|
|
2922
2922
|
}
|
|
2923
2923
|
function bi(e) {
|
|
2924
|
-
let t =
|
|
2925
|
-
t[0] === e.className ? r = t[1] : (r =
|
|
2924
|
+
let t = J(12), n = Ht(e.threadRef, e.url), r;
|
|
2925
|
+
t[0] === e.className ? r = t[1] : (r = le("size-7 shrink-0", e.className), t[0] = e.className, t[1] = r);
|
|
2926
2926
|
let i;
|
|
2927
|
-
t[2] === r ? i = t[3] : (i = /* @__PURE__ */
|
|
2927
|
+
t[2] === r ? i = t[3] : (i = /* @__PURE__ */ Y(hi, { className: r }), t[2] = r, t[3] = i);
|
|
2928
2928
|
let a = i, o;
|
|
2929
2929
|
t[4] === n ? o = t[5] : (o = [n], t[4] = n, t[5] = o);
|
|
2930
2930
|
let s;
|
|
2931
|
-
t[6] === e.className ? s = t[7] : (s =
|
|
2931
|
+
t[6] === e.className ? s = t[7] : (s = le("size-7 shrink-0 rounded object-contain", e.className), t[6] = e.className, t[7] = s);
|
|
2932
2932
|
let c;
|
|
2933
|
-
return t[8] !== a || t[9] !== o || t[10] !== s ? (c = /* @__PURE__ */
|
|
2933
|
+
return t[8] !== a || t[9] !== o || t[10] !== s ? (c = /* @__PURE__ */ Y(gi, {
|
|
2934
2934
|
sources: o,
|
|
2935
2935
|
fallback: a,
|
|
2936
2936
|
className: s
|
|
2937
2937
|
}), t[8] = a, t[9] = o, t[10] = s, t[11] = c) : c = t[11], c;
|
|
2938
2938
|
}
|
|
2939
|
-
export {
|
|
2939
|
+
export { Q as A, Vn as C, Nn as D, an as E, bt as M, yt as N, In as O, vt as P, Wn as S, _n as T, or as _, pi as a, rr as b, ii as c, Or as d, Sr as f, sr as g, pr as h, fi as i, wt as j, sn as k, Zr as l, gr as m, bi as n, ci as o, _r as p, mi as r, ri as s, gi as t, Ar as u, ar as v, Rn as w, Yn as x, ir as y };
|