@iteraai/react-component-inspector 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +168 -0
- package/dist/adapters/base/baseAdapter.d.ts +24 -0
- package/dist/adapters/base/createReactInspectorAdapter.d.ts +6 -0
- package/dist/adapters/base/index.d.ts +4 -0
- package/dist/adapters/base/runtimeConfig.d.ts +4 -0
- package/dist/adapters/base/sourceMetadata.d.ts +3 -0
- package/dist/adapters/base/types.d.ts +23 -0
- package/dist/adapters/cra/craAdapter.d.ts +6 -0
- package/dist/adapters/cra/index.d.ts +3 -0
- package/dist/adapters/fiber/fiberAdapter.d.ts +9 -0
- package/dist/adapters/fiber/highlightTarget.d.ts +2 -0
- package/dist/adapters/fiber/index.d.ts +3 -0
- package/dist/adapters/fiber/nodeIdentity.d.ts +14 -0
- package/dist/adapters/fiber/nodeLookup.d.ts +23 -0
- package/dist/adapters/fiber/props.d.ts +2 -0
- package/dist/adapters/fiber/rootDiscovery.d.ts +2 -0
- package/dist/adapters/fiber/source.d.ts +2 -0
- package/dist/adapters/fiber/spike/devtoolsProbe.d.ts +2 -0
- package/dist/adapters/fiber/spike/displayName.d.ts +1 -0
- package/dist/adapters/fiber/spike/fallbackDecision.d.ts +26 -0
- package/dist/adapters/fiber/spike/fiberTraversal.d.ts +12 -0
- package/dist/adapters/fiber/spike/types.d.ts +35 -0
- package/dist/adapters/fiber/traversal.d.ts +31 -0
- package/dist/adapters/fiber/treeMapping.d.ts +8 -0
- package/dist/adapters/fiber/types.d.ts +35 -0
- package/dist/adapters/next/index.d.ts +3 -0
- package/dist/adapters/next/nextAdapter.d.ts +6 -0
- package/dist/adapters/vite/index.d.ts +3 -0
- package/dist/adapters/vite/viteAdapter.d.ts +6 -0
- package/dist/bridgeRuntime.d.ts +37 -0
- package/dist/bridgeRuntime.js +7 -0
- package/dist/bridgeRuntime.js.map +1 -0
- package/dist/chunks/bridgeRuntime-Da4khSK2.js +2278 -0
- package/dist/chunks/bridgeRuntime-Da4khSK2.js.map +1 -0
- package/dist/chunks/embeddedBootstrap-v-MS8cPB.js +358 -0
- package/dist/chunks/embeddedBootstrap-v-MS8cPB.js.map +1 -0
- package/dist/devtoolsInlineBackendHook.d.ts +5 -0
- package/dist/embeddedBootstrap.d.ts +24 -0
- package/dist/embeddedBootstrap.js +7 -0
- package/dist/embeddedBootstrap.js.map +1 -0
- package/dist/embeddedRuntimeTelemetry.d.ts +34 -0
- package/dist/highlighter.d.ts +6 -0
- package/dist/index.d.ts +13 -0
- package/dist/index.js +49 -0
- package/dist/index.js.map +1 -0
- package/dist/iterationInspector/index.d.ts +2 -0
- package/dist/iterationInspector/runtime.d.ts +23 -0
- package/dist/iterationInspector/types.d.ts +74 -0
- package/dist/iterationInspector.js +708 -0
- package/dist/iterationInspector.js.map +1 -0
- package/dist/reactDevtoolsInlineBackend.d.ts +7 -0
- package/dist/reactTreeAdapter.d.ts +3 -0
- package/dist/security/bridgeTelemetry.d.ts +50 -0
- package/dist/security/inspectorSecurityEvents.d.ts +18 -0
- package/dist/security/messageSizePolicy.d.ts +19 -0
- package/dist/security/redactionPolicy.d.ts +2 -0
- package/dist/security/tokenValidation.d.ts +15 -0
- package/dist/serializer.d.ts +10 -0
- package/package.json +77 -0
|
@@ -0,0 +1,2278 @@
|
|
|
1
|
+
import { INSPECTOR_SECURITY_EVENT_NAME_MESSAGE_REJECTED as gt, INSPECTOR_SECURITY_EVENT_SCHEMA_VERSION as mt, isOriginTrusted as It, INSPECTOR_CHANNEL as Et, createInspectorProtocolError as L, mapOversizeRejectionReasonToSecurityReasonCode as Rt, buildMessage as N, parseMessage as bt } from "@iteraai/inspector-protocol";
|
|
2
|
+
const Nt = 200, $e = (e) => {
|
|
3
|
+
const t = /* @__PURE__ */ new Map();
|
|
4
|
+
return e.forEach((r) => {
|
|
5
|
+
t.has(r.id) || t.set(r.id, r);
|
|
6
|
+
}), t;
|
|
7
|
+
}, Tt = (e, t) => {
|
|
8
|
+
const r = [], n = /* @__PURE__ */ new Set(), i = (o) => {
|
|
9
|
+
o == null || n.has(o) || !t.has(o) || (n.add(o), r.push(o));
|
|
10
|
+
};
|
|
11
|
+
return e.rootIds.forEach((o) => {
|
|
12
|
+
i(o);
|
|
13
|
+
}), e.nodes.forEach((o) => {
|
|
14
|
+
o.parentId === null && i(o.id);
|
|
15
|
+
}), e.nodes.forEach((o) => {
|
|
16
|
+
i(o.id);
|
|
17
|
+
}), r;
|
|
18
|
+
}, St = (e, t) => {
|
|
19
|
+
const r = /* @__PURE__ */ new Set();
|
|
20
|
+
return e.nodes.flatMap((n) => !t.has(n.id) || r.has(n.id) ? [] : (r.add(n.id), [
|
|
21
|
+
{
|
|
22
|
+
...n,
|
|
23
|
+
parentId: n.parentId !== null && t.has(n.parentId) ? n.parentId : null,
|
|
24
|
+
childrenIds: n.childrenIds.filter(
|
|
25
|
+
(i) => t.has(i)
|
|
26
|
+
)
|
|
27
|
+
}
|
|
28
|
+
]));
|
|
29
|
+
}, vt = (e, t) => {
|
|
30
|
+
const r = new Map(
|
|
31
|
+
t.map((o) => [o.id, o])
|
|
32
|
+
), n = [], i = /* @__PURE__ */ new Set();
|
|
33
|
+
return e.rootIds.forEach((o) => {
|
|
34
|
+
if (i.has(o))
|
|
35
|
+
return;
|
|
36
|
+
const s = r.get(o);
|
|
37
|
+
s === void 0 || s.parentId !== null || (i.add(o), n.push(o));
|
|
38
|
+
}), t.forEach((o) => {
|
|
39
|
+
o.parentId !== null || i.has(o.id) || (i.add(o.id), n.push(o.id));
|
|
40
|
+
}), n;
|
|
41
|
+
}, X = (e, t = Nt) => {
|
|
42
|
+
const r = e.nodes.length;
|
|
43
|
+
if (t <= 0)
|
|
44
|
+
return {
|
|
45
|
+
nodes: [],
|
|
46
|
+
rootIds: [],
|
|
47
|
+
meta: {
|
|
48
|
+
truncated: !0,
|
|
49
|
+
totalNodeCount: r,
|
|
50
|
+
includedNodeCount: 0,
|
|
51
|
+
truncatedNodeCount: r
|
|
52
|
+
}
|
|
53
|
+
};
|
|
54
|
+
if (r <= t)
|
|
55
|
+
return e;
|
|
56
|
+
const n = $e(e.nodes), i = Tt(e, n), o = /* @__PURE__ */ new Set(), s = [];
|
|
57
|
+
let d = 0;
|
|
58
|
+
for (; d < i.length && s.length < t; ) {
|
|
59
|
+
const l = i[d];
|
|
60
|
+
if (d += 1, o.has(l))
|
|
61
|
+
continue;
|
|
62
|
+
const m = n.get(l);
|
|
63
|
+
m !== void 0 && (o.add(l), s.push(l), m.childrenIds.forEach((p) => {
|
|
64
|
+
!o.has(p) && n.has(p) && i.push(p);
|
|
65
|
+
}));
|
|
66
|
+
}
|
|
67
|
+
s.length < t && e.nodes.forEach((l) => {
|
|
68
|
+
s.length >= t || o.has(l.id) || n.has(l.id) && (o.add(l.id), s.push(l.id));
|
|
69
|
+
});
|
|
70
|
+
const a = new Set(s), c = St(e, a), u = vt(e, c), f = c.length;
|
|
71
|
+
return {
|
|
72
|
+
nodes: c,
|
|
73
|
+
rootIds: u,
|
|
74
|
+
meta: {
|
|
75
|
+
truncated: !0,
|
|
76
|
+
totalNodeCount: r,
|
|
77
|
+
includedNodeCount: f,
|
|
78
|
+
truncatedNodeCount: r - f
|
|
79
|
+
}
|
|
80
|
+
};
|
|
81
|
+
}, me = (e, t) => {
|
|
82
|
+
const r = $e(e.nodes), n = r.get(t);
|
|
83
|
+
if (n !== void 0)
|
|
84
|
+
return {
|
|
85
|
+
node: n,
|
|
86
|
+
nodeById: r,
|
|
87
|
+
snapshot: e
|
|
88
|
+
};
|
|
89
|
+
}, F = (e) => ({
|
|
90
|
+
getTreeSnapshot: () => e.getTreeSnapshot(),
|
|
91
|
+
getNodeProps: (t) => {
|
|
92
|
+
if (e.getNodeProps === void 0)
|
|
93
|
+
return;
|
|
94
|
+
const r = e.getTreeSnapshot(), n = me(r, t);
|
|
95
|
+
if (n !== void 0)
|
|
96
|
+
return e.getNodeProps(n);
|
|
97
|
+
},
|
|
98
|
+
getDomElement: (t) => {
|
|
99
|
+
if (e.getDomElement === void 0)
|
|
100
|
+
return null;
|
|
101
|
+
const r = e.getTreeSnapshot(), n = me(r, t);
|
|
102
|
+
return n === void 0 ? null : e.getDomElement(n);
|
|
103
|
+
},
|
|
104
|
+
getReactComponentPathForElement: e.getReactComponentPathForElement
|
|
105
|
+
}), C = Object.freeze({
|
|
106
|
+
tree: !0,
|
|
107
|
+
props: !0,
|
|
108
|
+
highlight: !0
|
|
109
|
+
}), _t = Object.freeze({
|
|
110
|
+
adapter: "auto",
|
|
111
|
+
capabilities: C
|
|
112
|
+
}), At = (e) => ({
|
|
113
|
+
tree: (e == null ? void 0 : e.tree) ?? C.tree,
|
|
114
|
+
props: (e == null ? void 0 : e.props) ?? C.props,
|
|
115
|
+
highlight: (e == null ? void 0 : e.highlight) ?? C.highlight
|
|
116
|
+
}), wt = (e) => ({
|
|
117
|
+
adapter: (e == null ? void 0 : e.adapter) ?? _t.adapter,
|
|
118
|
+
capabilities: At(e == null ? void 0 : e.capabilities)
|
|
119
|
+
}), Pt = "data-inspector-source", Ft = "data-inspector-source-file", Bt = "data-inspector-source-line", Ot = "data-inspector-source-column", Mt = /^(.*?):(\d+)(?::(\d+))?$/, Ct = (e) => typeof e == "object" && e !== null, Dt = (e) => {
|
|
120
|
+
if (typeof e != "string")
|
|
121
|
+
return;
|
|
122
|
+
const t = e.trim();
|
|
123
|
+
if (t.length !== 0)
|
|
124
|
+
return t;
|
|
125
|
+
}, Ie = (e) => {
|
|
126
|
+
if (typeof e == "number")
|
|
127
|
+
return Number.isInteger(e) && e >= 1 ? e : void 0;
|
|
128
|
+
if (typeof e != "string")
|
|
129
|
+
return;
|
|
130
|
+
const t = e.trim();
|
|
131
|
+
if (!/^\d+$/.test(t))
|
|
132
|
+
return;
|
|
133
|
+
const r = Number(t);
|
|
134
|
+
return Number.isInteger(r) && r >= 1 ? r : void 0;
|
|
135
|
+
}, Lt = (e) => {
|
|
136
|
+
const t = e.trim().match(Mt);
|
|
137
|
+
if (t === null)
|
|
138
|
+
return;
|
|
139
|
+
const [, r, n, i] = t;
|
|
140
|
+
return W({
|
|
141
|
+
file: r,
|
|
142
|
+
line: n,
|
|
143
|
+
...i !== void 0 && {
|
|
144
|
+
column: i
|
|
145
|
+
}
|
|
146
|
+
});
|
|
147
|
+
}, xt = (e) => {
|
|
148
|
+
const t = e.trim();
|
|
149
|
+
if (t.length !== 0) {
|
|
150
|
+
if (t.startsWith("{"))
|
|
151
|
+
try {
|
|
152
|
+
const r = JSON.parse(t);
|
|
153
|
+
return W(r);
|
|
154
|
+
} catch {
|
|
155
|
+
return;
|
|
156
|
+
}
|
|
157
|
+
return Lt(t);
|
|
158
|
+
}
|
|
159
|
+
}, W = (e) => {
|
|
160
|
+
if (!Ct(e))
|
|
161
|
+
return;
|
|
162
|
+
const t = e, r = Dt(t.file), n = Ie(t.line);
|
|
163
|
+
if (r === void 0 || n === void 0)
|
|
164
|
+
return;
|
|
165
|
+
const i = Ie(t.column);
|
|
166
|
+
return i === void 0 ? {
|
|
167
|
+
file: r,
|
|
168
|
+
line: n
|
|
169
|
+
} : {
|
|
170
|
+
file: r,
|
|
171
|
+
line: n,
|
|
172
|
+
column: i
|
|
173
|
+
};
|
|
174
|
+
}, Q = (e) => {
|
|
175
|
+
const t = e.getAttribute(Pt);
|
|
176
|
+
if (t !== null) {
|
|
177
|
+
const o = xt(t);
|
|
178
|
+
if (o !== void 0)
|
|
179
|
+
return o;
|
|
180
|
+
}
|
|
181
|
+
const r = e.getAttribute(Ft), n = e.getAttribute(Bt), i = e.getAttribute(Ot);
|
|
182
|
+
if (!(r === null && n === null && i === null))
|
|
183
|
+
return W({
|
|
184
|
+
...r !== null && {
|
|
185
|
+
file: r
|
|
186
|
+
},
|
|
187
|
+
...n !== null && {
|
|
188
|
+
line: n
|
|
189
|
+
},
|
|
190
|
+
...i !== null && {
|
|
191
|
+
column: i
|
|
192
|
+
}
|
|
193
|
+
});
|
|
194
|
+
}, Z = "data-inspector-node-id", $t = "data-inspector-display-name", J = "root", ee = "data-reactroot", Ee = "cra-root", kt = "cra-legacy-root", Re = 120, Kt = (e, t) => {
|
|
195
|
+
var i;
|
|
196
|
+
const r = (i = e.getAttribute($t)) == null ? void 0 : i.trim();
|
|
197
|
+
if (r !== void 0 && r.length > 0)
|
|
198
|
+
return r;
|
|
199
|
+
const n = t.split(/[\s_-]+/).filter((o) => o.length > 0).map((o) => o[0].toUpperCase() + o.slice(1)).join("");
|
|
200
|
+
return n.length > 0 ? n : e.tagName.toLowerCase();
|
|
201
|
+
}, x = (e) => {
|
|
202
|
+
var r;
|
|
203
|
+
const t = (r = e.getAttribute(Z)) == null ? void 0 : r.trim();
|
|
204
|
+
if (!(t === void 0 || t.length === 0))
|
|
205
|
+
return t;
|
|
206
|
+
}, Ht = (e) => {
|
|
207
|
+
const t = Array.from(
|
|
208
|
+
e.querySelectorAll(`[${Z}]`)
|
|
209
|
+
).filter((i) => x(i) !== void 0);
|
|
210
|
+
if (t.length > 0)
|
|
211
|
+
return t;
|
|
212
|
+
const r = e.getElementById(J);
|
|
213
|
+
if (r !== null)
|
|
214
|
+
return [r];
|
|
215
|
+
const n = e.querySelector(`[${ee}]`);
|
|
216
|
+
return n !== null ? [n] : [];
|
|
217
|
+
}, jt = (e) => {
|
|
218
|
+
const t = x(e);
|
|
219
|
+
return t !== void 0 ? t : (e.getAttribute("id") ?? "").trim() === J ? Ee : e.hasAttribute(ee) ? kt : Ee;
|
|
220
|
+
}, zt = (e) => {
|
|
221
|
+
const t = /* @__PURE__ */ new Map();
|
|
222
|
+
Ht(e).forEach((o) => {
|
|
223
|
+
const s = jt(o);
|
|
224
|
+
t.has(s) || t.set(s, o);
|
|
225
|
+
});
|
|
226
|
+
const r = /* @__PURE__ */ new Map();
|
|
227
|
+
t.forEach((o, s) => {
|
|
228
|
+
const d = Q(o);
|
|
229
|
+
r.set(s, {
|
|
230
|
+
id: s,
|
|
231
|
+
displayName: Kt(o, s),
|
|
232
|
+
parentId: null,
|
|
233
|
+
childrenIds: [],
|
|
234
|
+
tags: [o.tagName.toLowerCase()],
|
|
235
|
+
...d && { source: d }
|
|
236
|
+
});
|
|
237
|
+
}), t.forEach((o, s) => {
|
|
238
|
+
var f;
|
|
239
|
+
const d = r.get(s);
|
|
240
|
+
if (d === void 0)
|
|
241
|
+
return;
|
|
242
|
+
const a = (f = o.parentElement) == null ? void 0 : f.closest(
|
|
243
|
+
`[${Z}]`
|
|
244
|
+
), c = a == null ? void 0 : x(a);
|
|
245
|
+
if (c === void 0 || c === s || !r.has(c))
|
|
246
|
+
return;
|
|
247
|
+
d.parentId = c;
|
|
248
|
+
const u = r.get(c);
|
|
249
|
+
u !== void 0 && u.childrenIds.push(s);
|
|
250
|
+
});
|
|
251
|
+
const n = Array.from(r.values()), i = n.filter((o) => o.parentId === null).map((o) => o.id);
|
|
252
|
+
return {
|
|
253
|
+
snapshot: {
|
|
254
|
+
nodes: n,
|
|
255
|
+
rootIds: i
|
|
256
|
+
},
|
|
257
|
+
nodeElementById: t
|
|
258
|
+
};
|
|
259
|
+
}, Ut = (e) => {
|
|
260
|
+
var r;
|
|
261
|
+
const t = (r = e.textContent) == null ? void 0 : r.replace(/\s+/g, " ").trim();
|
|
262
|
+
if (!(t === void 0 || t.length === 0))
|
|
263
|
+
return t.length <= Re ? t : `${t.slice(0, Re - 3)}...`;
|
|
264
|
+
}, Gt = (e, t) => {
|
|
265
|
+
const r = {
|
|
266
|
+
nodeId: e,
|
|
267
|
+
tagName: t.tagName.toLowerCase()
|
|
268
|
+
}, n = Array.from(t.classList), i = Ut(t), o = t.getAttribute("role"), s = t.getAttribute("aria-label"), d = x(t) !== void 0;
|
|
269
|
+
return t.id.length > 0 && (r.elementId = t.id), n.length > 0 && (r.classList = n), d || (r.runtimeMode = "cra-like", r.introspection = "fallback-root", (t.getAttribute("id") ?? "").trim() === J ? r.fallbackReason = "root-container" : t.hasAttribute(ee) && (r.fallbackReason = "legacy-reactroot")), o !== null && o.length > 0 && (r.role = o), s !== null && s.length > 0 && (r.ariaLabel = s), i !== void 0 && (r.textPreview = i), t instanceof HTMLIFrameElement && t.src.length > 0 && (r.src = t.src), r;
|
|
270
|
+
}, ke = (e = {}) => {
|
|
271
|
+
const t = e.doc ?? document;
|
|
272
|
+
let r;
|
|
273
|
+
const n = () => (r = zt(t), r.snapshot), i = (o) => r == null ? void 0 : r.nodeElementById.get(o);
|
|
274
|
+
return F({
|
|
275
|
+
getTreeSnapshot: n,
|
|
276
|
+
getNodeProps: ({ node: o }) => {
|
|
277
|
+
const s = i(o.id);
|
|
278
|
+
if (s !== void 0)
|
|
279
|
+
return Gt(o.id, s);
|
|
280
|
+
},
|
|
281
|
+
getDomElement: ({ node: o }) => i(o.id) ?? null
|
|
282
|
+
});
|
|
283
|
+
}, Vt = 5, qt = (e) => typeof e == "object" && e !== null, $ = (e, t) => {
|
|
284
|
+
try {
|
|
285
|
+
return e[t];
|
|
286
|
+
} catch {
|
|
287
|
+
return;
|
|
288
|
+
}
|
|
289
|
+
}, te = (e) => {
|
|
290
|
+
if (qt(e))
|
|
291
|
+
return e;
|
|
292
|
+
}, Yt = (e) => {
|
|
293
|
+
const t = $(e, "tag");
|
|
294
|
+
if (!(typeof t != "number" || !Number.isInteger(t)))
|
|
295
|
+
return t;
|
|
296
|
+
}, Xt = (e) => {
|
|
297
|
+
if (!(typeof Element > "u") && e instanceof Element)
|
|
298
|
+
return e;
|
|
299
|
+
}, Ke = (e) => {
|
|
300
|
+
if (Yt(e) === Vt)
|
|
301
|
+
return Xt($(e, "stateNode"));
|
|
302
|
+
}, be = (e) => te($(e, "child")), Wt = (e) => te($(e, "sibling")), Qt = (e) => {
|
|
303
|
+
const t = be(e);
|
|
304
|
+
if (t === void 0)
|
|
305
|
+
return;
|
|
306
|
+
const r = [t], n = /* @__PURE__ */ new Set();
|
|
307
|
+
for (; r.length > 0; ) {
|
|
308
|
+
const i = r.pop();
|
|
309
|
+
if (i === void 0 || n.has(i))
|
|
310
|
+
continue;
|
|
311
|
+
n.add(i);
|
|
312
|
+
const o = Ke(i);
|
|
313
|
+
if (o !== void 0)
|
|
314
|
+
return o;
|
|
315
|
+
const s = Wt(i);
|
|
316
|
+
s !== void 0 && r.push(s);
|
|
317
|
+
const d = be(i);
|
|
318
|
+
d !== void 0 && r.push(d);
|
|
319
|
+
}
|
|
320
|
+
}, Zt = (e) => {
|
|
321
|
+
const t = te(e.fiber);
|
|
322
|
+
if (t === void 0)
|
|
323
|
+
return null;
|
|
324
|
+
const r = Ke(t);
|
|
325
|
+
return r !== void 0 ? r : Qt(t) ?? null;
|
|
326
|
+
}, Jt = 2166136261, er = 16777619, tr = "fiber-node", Ne = "~", rr = () => ({
|
|
327
|
+
nodeIdByFiberRef: /* @__PURE__ */ new WeakMap(),
|
|
328
|
+
nodeIdByRecordKey: /* @__PURE__ */ new Map(),
|
|
329
|
+
allocatedNodeIds: /* @__PURE__ */ new Set(),
|
|
330
|
+
nextCollisionIndexByBaseId: /* @__PURE__ */ new Map()
|
|
331
|
+
}), re = (e) => {
|
|
332
|
+
if (!(typeof e != "object" || e === null))
|
|
333
|
+
return e;
|
|
334
|
+
}, nr = (e, t) => {
|
|
335
|
+
try {
|
|
336
|
+
return e[t];
|
|
337
|
+
} catch {
|
|
338
|
+
return;
|
|
339
|
+
}
|
|
340
|
+
}, He = (e) => re(nr(e, "alternate")), or = (e) => {
|
|
341
|
+
let t = Jt;
|
|
342
|
+
for (let r = 0; r < e.length; r += 1)
|
|
343
|
+
t ^= e.charCodeAt(r), t = Math.imul(t, er);
|
|
344
|
+
return (t >>> 0).toString(36);
|
|
345
|
+
}, sr = (e) => ({
|
|
346
|
+
rendererId: e.rendererId,
|
|
347
|
+
rendererRootIndex: e.rendererRootIndex,
|
|
348
|
+
parentKey: e.parentKey ?? "root",
|
|
349
|
+
tag: e.tag
|
|
350
|
+
}), ir = (e) => {
|
|
351
|
+
const t = sr(e), r = or(t.parentKey);
|
|
352
|
+
return `${tr}-r${t.rendererId}-root${t.rendererRootIndex}-p${r}-t${t.tag}`;
|
|
353
|
+
}, dr = (e, t) => {
|
|
354
|
+
let n = e.nextCollisionIndexByBaseId.get(t) ?? 1, i = n === 1 ? t : `${t}${Ne}${n}`;
|
|
355
|
+
for (; e.allocatedNodeIds.has(i); )
|
|
356
|
+
n += 1, i = n === 1 ? t : `${t}${Ne}${n}`;
|
|
357
|
+
return e.nextCollisionIndexByBaseId.set(t, n + 1), e.allocatedNodeIds.add(i), i;
|
|
358
|
+
}, j = (e, t, r) => {
|
|
359
|
+
const n = re(t.fiber);
|
|
360
|
+
if (n !== void 0) {
|
|
361
|
+
e.nodeIdByFiberRef.set(n, r);
|
|
362
|
+
const i = He(n);
|
|
363
|
+
i !== void 0 && e.nodeIdByFiberRef.set(i, r);
|
|
364
|
+
}
|
|
365
|
+
e.nodeIdByRecordKey.set(t.key, r);
|
|
366
|
+
}, Te = (e, t) => {
|
|
367
|
+
const r = re(t);
|
|
368
|
+
if (r === void 0)
|
|
369
|
+
return;
|
|
370
|
+
const n = e.nodeIdByFiberRef.get(r);
|
|
371
|
+
if (n !== void 0)
|
|
372
|
+
return n;
|
|
373
|
+
const i = He(r);
|
|
374
|
+
if (i !== void 0)
|
|
375
|
+
return e.nodeIdByFiberRef.get(i);
|
|
376
|
+
}, ar = () => {
|
|
377
|
+
const e = rr();
|
|
378
|
+
return {
|
|
379
|
+
allocateNodeIds: (t) => {
|
|
380
|
+
const r = /* @__PURE__ */ new Map(), n = /* @__PURE__ */ new Set(), i = /* @__PURE__ */ new Set();
|
|
381
|
+
t.forEach((s) => {
|
|
382
|
+
const d = Te(
|
|
383
|
+
e,
|
|
384
|
+
s.fiber
|
|
385
|
+
);
|
|
386
|
+
d !== void 0 && i.add(d);
|
|
387
|
+
});
|
|
388
|
+
const o = (s) => {
|
|
389
|
+
if (!(s === void 0 || n.has(s)))
|
|
390
|
+
return n.add(s), e.allocatedNodeIds.add(s), s;
|
|
391
|
+
};
|
|
392
|
+
return t.forEach((s) => {
|
|
393
|
+
const d = Te(
|
|
394
|
+
e,
|
|
395
|
+
s.fiber
|
|
396
|
+
), a = o(
|
|
397
|
+
d
|
|
398
|
+
);
|
|
399
|
+
if (a !== void 0) {
|
|
400
|
+
r.set(s.key, a), j(e, s, a);
|
|
401
|
+
return;
|
|
402
|
+
}
|
|
403
|
+
const c = e.nodeIdByRecordKey.get(s.key), f = c !== void 0 && i.has(c) ? void 0 : o(c);
|
|
404
|
+
if (f !== void 0) {
|
|
405
|
+
r.set(s.key, f), j(e, s, f);
|
|
406
|
+
return;
|
|
407
|
+
}
|
|
408
|
+
const l = ir(s), m = dr(e, l);
|
|
409
|
+
n.add(m), r.set(s.key, m), j(e, s, m);
|
|
410
|
+
}), {
|
|
411
|
+
nodeIdByRecordKey: r
|
|
412
|
+
};
|
|
413
|
+
}
|
|
414
|
+
};
|
|
415
|
+
}, cr = [
|
|
416
|
+
"__reactFiber$",
|
|
417
|
+
"__reactInternalInstance$"
|
|
418
|
+
], ur = (e, t, r) => {
|
|
419
|
+
const n = [], i = /* @__PURE__ */ new Set();
|
|
420
|
+
return e.forEach((o) => {
|
|
421
|
+
const s = t.get(o);
|
|
422
|
+
s === void 0 || !r.has(s) || i.has(s) || (i.add(s), n.push(s));
|
|
423
|
+
}), n;
|
|
424
|
+
}, lr = (e, t, r) => {
|
|
425
|
+
if (e.parentKey === null)
|
|
426
|
+
return null;
|
|
427
|
+
const n = t.get(e.parentKey);
|
|
428
|
+
return n === void 0 || !r.has(n) ? null : n;
|
|
429
|
+
}, fr = (e) => typeof e == "object" && e !== null, je = (e, t) => {
|
|
430
|
+
try {
|
|
431
|
+
return e[t];
|
|
432
|
+
} catch {
|
|
433
|
+
return;
|
|
434
|
+
}
|
|
435
|
+
}, k = (e) => {
|
|
436
|
+
if (fr(e))
|
|
437
|
+
return e;
|
|
438
|
+
}, pr = (e) => k(je(e, "alternate")), yr = (e) => k(je(e, "return")), hr = (e) => {
|
|
439
|
+
for (const t of Reflect.ownKeys(e)) {
|
|
440
|
+
if (typeof t != "string" || !cr.some((n) => t.startsWith(n)))
|
|
441
|
+
continue;
|
|
442
|
+
const r = k(e[t]);
|
|
443
|
+
if (r !== void 0)
|
|
444
|
+
return r;
|
|
445
|
+
}
|
|
446
|
+
}, gr = (e) => {
|
|
447
|
+
let t = e;
|
|
448
|
+
for (; t !== null; ) {
|
|
449
|
+
const r = hr(t);
|
|
450
|
+
if (r !== void 0)
|
|
451
|
+
return r;
|
|
452
|
+
t = t.parentElement;
|
|
453
|
+
}
|
|
454
|
+
}, mr = (e, t) => {
|
|
455
|
+
const r = [], n = /* @__PURE__ */ new Set();
|
|
456
|
+
let i = e;
|
|
457
|
+
for (; i !== null && !n.has(i); ) {
|
|
458
|
+
n.add(i);
|
|
459
|
+
const o = t.get(i);
|
|
460
|
+
if (o === void 0)
|
|
461
|
+
break;
|
|
462
|
+
r.unshift(o.displayName), i = o.parentId;
|
|
463
|
+
}
|
|
464
|
+
return r.length > 0 ? r : void 0;
|
|
465
|
+
}, Ir = () => {
|
|
466
|
+
let e = /* @__PURE__ */ new Map(), t = /* @__PURE__ */ new WeakMap(), r = /* @__PURE__ */ new Map();
|
|
467
|
+
return {
|
|
468
|
+
refreshFromSnapshot: (n) => {
|
|
469
|
+
const i = /* @__PURE__ */ new Map(), o = /* @__PURE__ */ new WeakMap(), s = new Map(
|
|
470
|
+
n.snapshot.nodes.map((a) => [a.id, a])
|
|
471
|
+
), d = new Set(
|
|
472
|
+
n.snapshot.nodes.map((a) => a.id)
|
|
473
|
+
);
|
|
474
|
+
n.traversalResult.records.forEach((a) => {
|
|
475
|
+
const c = n.nodeIdByRecordKey.get(a.key);
|
|
476
|
+
if (c === void 0 || !d.has(c) || i.has(c))
|
|
477
|
+
return;
|
|
478
|
+
i.set(c, {
|
|
479
|
+
nodeId: c,
|
|
480
|
+
recordKey: a.key,
|
|
481
|
+
fiber: a.fiber,
|
|
482
|
+
tag: a.tag,
|
|
483
|
+
rendererId: a.rendererId,
|
|
484
|
+
rendererRootIndex: a.rendererRootIndex,
|
|
485
|
+
path: a.path,
|
|
486
|
+
parentNodeId: lr(
|
|
487
|
+
a,
|
|
488
|
+
n.nodeIdByRecordKey,
|
|
489
|
+
d
|
|
490
|
+
),
|
|
491
|
+
childNodeIds: ur(
|
|
492
|
+
a.childKeys,
|
|
493
|
+
n.nodeIdByRecordKey,
|
|
494
|
+
d
|
|
495
|
+
)
|
|
496
|
+
});
|
|
497
|
+
const u = k(a.fiber);
|
|
498
|
+
if (u !== void 0) {
|
|
499
|
+
o.set(u, c);
|
|
500
|
+
const f = pr(u);
|
|
501
|
+
f !== void 0 && o.set(f, c);
|
|
502
|
+
}
|
|
503
|
+
}), e = i, t = o, r = s;
|
|
504
|
+
},
|
|
505
|
+
resolveByNodeId: (n) => e.get(n),
|
|
506
|
+
resolveClosestComponentPathForElement: (n) => {
|
|
507
|
+
const i = gr(n);
|
|
508
|
+
if (i === void 0)
|
|
509
|
+
return;
|
|
510
|
+
const o = /* @__PURE__ */ new Set();
|
|
511
|
+
let s = i;
|
|
512
|
+
for (; s !== void 0 && !o.has(s); ) {
|
|
513
|
+
o.add(s);
|
|
514
|
+
const d = t.get(s);
|
|
515
|
+
if (d !== void 0)
|
|
516
|
+
return mr(d, r);
|
|
517
|
+
s = yr(s);
|
|
518
|
+
}
|
|
519
|
+
}
|
|
520
|
+
};
|
|
521
|
+
}, Er = (e) => typeof e == "object" && e !== null, Rr = (e, t) => {
|
|
522
|
+
try {
|
|
523
|
+
return e[t];
|
|
524
|
+
} catch {
|
|
525
|
+
return;
|
|
526
|
+
}
|
|
527
|
+
}, br = (e) => {
|
|
528
|
+
if (Er(e))
|
|
529
|
+
return e;
|
|
530
|
+
}, Nr = (e) => {
|
|
531
|
+
const t = br(e.fiber);
|
|
532
|
+
if (t === void 0)
|
|
533
|
+
return;
|
|
534
|
+
const r = Rr(t, "memoizedProps");
|
|
535
|
+
if (r !== void 0)
|
|
536
|
+
return r;
|
|
537
|
+
}, K = (e) => typeof e == "object" && e !== null, ze = (e, t) => Object.prototype.toString.call(e) === `[object ${t}]`, Tr = (e) => !ze(e, "Map") || !K(e) ? !1 : typeof e.forEach == "function" && typeof e.entries == "function", Sr = (e) => Array.isArray(e), vr = (e) => !ze(e, "Set") || !K(e) ? !1 : typeof e.forEach == "function" && typeof e.values == "function", _r = (e) => e !== null && typeof e == "object" && Object.getPrototypeOf(e) === Object.prototype, Ue = (e, t) => {
|
|
538
|
+
try {
|
|
539
|
+
return e[t];
|
|
540
|
+
} catch {
|
|
541
|
+
return;
|
|
542
|
+
}
|
|
543
|
+
}, Ar = (e) => {
|
|
544
|
+
try {
|
|
545
|
+
return Object.keys(e).flatMap((t) => {
|
|
546
|
+
const r = Ue(e, t);
|
|
547
|
+
return r === void 0 ? [] : [r];
|
|
548
|
+
});
|
|
549
|
+
} catch {
|
|
550
|
+
return [];
|
|
551
|
+
}
|
|
552
|
+
}, wr = (e) => {
|
|
553
|
+
try {
|
|
554
|
+
return Object.keys(e).flatMap((t) => {
|
|
555
|
+
const r = Ue(e, t);
|
|
556
|
+
return r === void 0 ? [] : [[t, r]];
|
|
557
|
+
});
|
|
558
|
+
} catch {
|
|
559
|
+
return [];
|
|
560
|
+
}
|
|
561
|
+
}, Pr = (e) => {
|
|
562
|
+
if (!(typeof window > "u"))
|
|
563
|
+
return window;
|
|
564
|
+
}, Fr = (e) => {
|
|
565
|
+
var t;
|
|
566
|
+
return (t = Pr()) == null ? void 0 : t.__REACT_DEVTOOLS_GLOBAL_HOOK__;
|
|
567
|
+
}, Se = (e) => {
|
|
568
|
+
if (typeof e == "number")
|
|
569
|
+
return Number.isInteger(e) ? e : void 0;
|
|
570
|
+
if (typeof e != "string" || e.trim().length === 0)
|
|
571
|
+
return;
|
|
572
|
+
const t = Number(e);
|
|
573
|
+
if (Number.isInteger(t))
|
|
574
|
+
return t;
|
|
575
|
+
}, Br = (e) => Tr(e) ? Array.from(e.entries()).flatMap(
|
|
576
|
+
([t, r]) => {
|
|
577
|
+
const n = Se(t);
|
|
578
|
+
return n === void 0 ? [] : [[n, r]];
|
|
579
|
+
}
|
|
580
|
+
) : K(e) ? wr(e).flatMap(([t, r]) => {
|
|
581
|
+
const n = Se(t);
|
|
582
|
+
return n === void 0 ? [] : [[n, r]];
|
|
583
|
+
}) : [], Or = (e) => {
|
|
584
|
+
const t = [];
|
|
585
|
+
return Br(e).forEach(([r, n]) => {
|
|
586
|
+
t.push({
|
|
587
|
+
rendererId: r,
|
|
588
|
+
renderer: n
|
|
589
|
+
});
|
|
590
|
+
}), t.sort((r, n) => r.rendererId - n.rendererId);
|
|
591
|
+
}, Mr = (e) => vr(e), Cr = (e) => {
|
|
592
|
+
if (Mr(e))
|
|
593
|
+
return Array.from(e);
|
|
594
|
+
if (Sr(e))
|
|
595
|
+
return e;
|
|
596
|
+
if (_r(e))
|
|
597
|
+
return Ar(e);
|
|
598
|
+
}, Dr = (e) => {
|
|
599
|
+
try {
|
|
600
|
+
const t = Fr(e);
|
|
601
|
+
if (t === void 0)
|
|
602
|
+
return {
|
|
603
|
+
status: "unsupported",
|
|
604
|
+
reason: "hook-missing"
|
|
605
|
+
};
|
|
606
|
+
if (!K(t))
|
|
607
|
+
return {
|
|
608
|
+
status: "unsupported",
|
|
609
|
+
reason: "hook-malformed"
|
|
610
|
+
};
|
|
611
|
+
const r = t;
|
|
612
|
+
if (r.renderers === void 0)
|
|
613
|
+
return {
|
|
614
|
+
status: "unsupported",
|
|
615
|
+
reason: "renderers-malformed"
|
|
616
|
+
};
|
|
617
|
+
const n = Or(r.renderers);
|
|
618
|
+
if (n.length === 0)
|
|
619
|
+
return {
|
|
620
|
+
status: "empty",
|
|
621
|
+
reason: "renderer-empty",
|
|
622
|
+
renderers: []
|
|
623
|
+
};
|
|
624
|
+
if (typeof r.getFiberRoots != "function")
|
|
625
|
+
return {
|
|
626
|
+
status: "unsupported",
|
|
627
|
+
reason: "fiber-roots-reader-missing"
|
|
628
|
+
};
|
|
629
|
+
const i = r.getFiberRoots, o = [];
|
|
630
|
+
for (const s of n)
|
|
631
|
+
try {
|
|
632
|
+
const d = i.call(
|
|
633
|
+
r,
|
|
634
|
+
s.rendererId
|
|
635
|
+
), a = Cr(d);
|
|
636
|
+
if (a === void 0)
|
|
637
|
+
return {
|
|
638
|
+
status: "unsupported",
|
|
639
|
+
reason: "fiber-roots-malformed"
|
|
640
|
+
};
|
|
641
|
+
a.forEach((c) => {
|
|
642
|
+
o.push({
|
|
643
|
+
rendererId: s.rendererId,
|
|
644
|
+
root: c
|
|
645
|
+
});
|
|
646
|
+
});
|
|
647
|
+
} catch (d) {
|
|
648
|
+
return {
|
|
649
|
+
status: "error",
|
|
650
|
+
reason: "fiber-roots-read-failed",
|
|
651
|
+
rendererId: s.rendererId,
|
|
652
|
+
details: d
|
|
653
|
+
};
|
|
654
|
+
}
|
|
655
|
+
return o.length === 0 ? {
|
|
656
|
+
status: "empty",
|
|
657
|
+
reason: "root-empty",
|
|
658
|
+
renderers: n
|
|
659
|
+
} : {
|
|
660
|
+
status: "ok",
|
|
661
|
+
renderers: n,
|
|
662
|
+
roots: o
|
|
663
|
+
};
|
|
664
|
+
} catch (t) {
|
|
665
|
+
return {
|
|
666
|
+
status: "error",
|
|
667
|
+
reason: "probe-failed",
|
|
668
|
+
details: t
|
|
669
|
+
};
|
|
670
|
+
}
|
|
671
|
+
}, Ge = (e) => typeof e == "object" && e !== null, _ = (e, t) => {
|
|
672
|
+
try {
|
|
673
|
+
return e[t];
|
|
674
|
+
} catch {
|
|
675
|
+
return;
|
|
676
|
+
}
|
|
677
|
+
}, Lr = (e) => {
|
|
678
|
+
if (Ge(e))
|
|
679
|
+
return e;
|
|
680
|
+
}, xr = (e) => {
|
|
681
|
+
const t = _(e, "_debugSource");
|
|
682
|
+
if (Ge(t))
|
|
683
|
+
return t;
|
|
684
|
+
}, ve = (e) => {
|
|
685
|
+
if (typeof e != "string")
|
|
686
|
+
return;
|
|
687
|
+
const t = e.trim();
|
|
688
|
+
if (t.length !== 0)
|
|
689
|
+
return t;
|
|
690
|
+
}, D = (e) => {
|
|
691
|
+
if (typeof e == "number")
|
|
692
|
+
return Number.isInteger(e) && e >= 1 ? e : void 0;
|
|
693
|
+
if (typeof e != "string")
|
|
694
|
+
return;
|
|
695
|
+
const t = e.trim();
|
|
696
|
+
if (!/^\d+$/.test(t))
|
|
697
|
+
return;
|
|
698
|
+
const r = Number(t);
|
|
699
|
+
return Number.isInteger(r) && r >= 1 ? r : void 0;
|
|
700
|
+
}, $r = (e) => ve(_(e, "fileName")) ?? ve(_(e, "file")), kr = (e) => D(_(e, "lineNumber")) ?? D(_(e, "line")), Kr = (e) => D(_(e, "columnNumber")) ?? D(_(e, "column")), Hr = (e) => {
|
|
701
|
+
const t = Lr(e);
|
|
702
|
+
if (t === void 0)
|
|
703
|
+
return;
|
|
704
|
+
const r = xr(t);
|
|
705
|
+
if (r === void 0)
|
|
706
|
+
return;
|
|
707
|
+
const n = $r(r), i = kr(r);
|
|
708
|
+
if (n === void 0 || i === void 0)
|
|
709
|
+
return;
|
|
710
|
+
const o = Kr(r);
|
|
711
|
+
return o === void 0 ? {
|
|
712
|
+
file: n,
|
|
713
|
+
line: i
|
|
714
|
+
} : {
|
|
715
|
+
file: n,
|
|
716
|
+
line: i,
|
|
717
|
+
column: o
|
|
718
|
+
};
|
|
719
|
+
}, jr = Symbol.for("react.forward_ref"), zr = Symbol.for("react.memo"), Ur = "fiber", Ve = (e) => typeof e == "object" && e !== null, v = (e, t) => {
|
|
720
|
+
try {
|
|
721
|
+
return e[t];
|
|
722
|
+
} catch {
|
|
723
|
+
return;
|
|
724
|
+
}
|
|
725
|
+
}, P = (e) => {
|
|
726
|
+
if (typeof e != "string")
|
|
727
|
+
return;
|
|
728
|
+
const t = e.trim();
|
|
729
|
+
if (t.length !== 0)
|
|
730
|
+
return t;
|
|
731
|
+
}, _e = (e) => {
|
|
732
|
+
if (typeof e != "function")
|
|
733
|
+
return;
|
|
734
|
+
const t = e;
|
|
735
|
+
return P(v(t, "displayName")) ?? P(v(t, "name"));
|
|
736
|
+
}, qe = (e, t) => {
|
|
737
|
+
if (e == null)
|
|
738
|
+
return;
|
|
739
|
+
if (typeof e == "string")
|
|
740
|
+
return P(e);
|
|
741
|
+
const r = _e(e);
|
|
742
|
+
if (r !== void 0)
|
|
743
|
+
return r;
|
|
744
|
+
if (!Ve(e) || t.has(e))
|
|
745
|
+
return;
|
|
746
|
+
t.add(e);
|
|
747
|
+
const n = e, i = P(
|
|
748
|
+
v(n, "displayName")
|
|
749
|
+
), o = v(n, "$$typeof");
|
|
750
|
+
if (i !== void 0)
|
|
751
|
+
return i;
|
|
752
|
+
if (o === jr) {
|
|
753
|
+
const s = _e(
|
|
754
|
+
v(n, "render")
|
|
755
|
+
);
|
|
756
|
+
return s !== void 0 ? `ForwardRef(${s})` : "ForwardRef";
|
|
757
|
+
}
|
|
758
|
+
if (o === zr) {
|
|
759
|
+
const s = qe(
|
|
760
|
+
v(n, "type"),
|
|
761
|
+
t
|
|
762
|
+
);
|
|
763
|
+
return s !== void 0 ? `Memo(${s})` : "Memo";
|
|
764
|
+
}
|
|
765
|
+
return P(v(n, "name"));
|
|
766
|
+
}, Gr = (e) => {
|
|
767
|
+
if (!Ve(e))
|
|
768
|
+
return "Anonymous";
|
|
769
|
+
const r = qe(
|
|
770
|
+
v(e, "type"),
|
|
771
|
+
/* @__PURE__ */ new Set()
|
|
772
|
+
);
|
|
773
|
+
return r !== void 0 ? r : "Anonymous";
|
|
774
|
+
}, Vr = (e) => {
|
|
775
|
+
switch (e) {
|
|
776
|
+
case 0:
|
|
777
|
+
return "fiber-kind:function";
|
|
778
|
+
case 1:
|
|
779
|
+
return "fiber-kind:class";
|
|
780
|
+
case 2:
|
|
781
|
+
return "fiber-kind:indeterminate";
|
|
782
|
+
case 11:
|
|
783
|
+
return "fiber-kind:forward-ref";
|
|
784
|
+
case 14:
|
|
785
|
+
return "fiber-kind:memo";
|
|
786
|
+
case 15:
|
|
787
|
+
return "fiber-kind:simple-memo";
|
|
788
|
+
default:
|
|
789
|
+
return "fiber-kind:unknown";
|
|
790
|
+
}
|
|
791
|
+
}, qr = (e) => [
|
|
792
|
+
Ur,
|
|
793
|
+
Vr(e.tag),
|
|
794
|
+
`fiber-tag:${e.tag}`
|
|
795
|
+
], Yr = (e) => {
|
|
796
|
+
const t = [], r = /* @__PURE__ */ new Map(), n = /* @__PURE__ */ new Map(), i = /* @__PURE__ */ new Set();
|
|
797
|
+
return e.traversalResult.records.forEach((o) => {
|
|
798
|
+
const s = e.nodeIdByRecordKey.get(o.key);
|
|
799
|
+
s === void 0 || r.has(o.key) || i.has(s) || (t.push(o), r.set(o.key, o), n.set(o.key, s), i.add(s));
|
|
800
|
+
}), {
|
|
801
|
+
includedRecords: t,
|
|
802
|
+
includedRecordByKey: r,
|
|
803
|
+
includedNodeIdByRecordKey: n
|
|
804
|
+
};
|
|
805
|
+
}, Xr = (e, t) => {
|
|
806
|
+
const r = /* @__PURE__ */ new Map();
|
|
807
|
+
return e.forEach((n) => {
|
|
808
|
+
const i = n.parentKey;
|
|
809
|
+
if (i === null || !t.has(i)) {
|
|
810
|
+
r.set(n.key, null);
|
|
811
|
+
return;
|
|
812
|
+
}
|
|
813
|
+
r.set(n.key, i);
|
|
814
|
+
}), r;
|
|
815
|
+
}, Wr = (e, t, r) => {
|
|
816
|
+
const n = /* @__PURE__ */ new Map(), i = (o, s) => {
|
|
817
|
+
const d = n.get(o);
|
|
818
|
+
if (d === void 0) {
|
|
819
|
+
n.set(o, [s]);
|
|
820
|
+
return;
|
|
821
|
+
}
|
|
822
|
+
d.includes(s) || d.push(s);
|
|
823
|
+
};
|
|
824
|
+
return e.forEach((o) => {
|
|
825
|
+
o.childKeys.forEach((s) => {
|
|
826
|
+
!t.has(s) || r.get(s) !== o.key || i(o.key, s);
|
|
827
|
+
});
|
|
828
|
+
}), e.forEach((o) => {
|
|
829
|
+
const s = r.get(o.key);
|
|
830
|
+
s != null && i(s, o.key);
|
|
831
|
+
}), n;
|
|
832
|
+
}, Qr = (e, t, r, n) => e.map((i) => {
|
|
833
|
+
var u;
|
|
834
|
+
const o = t.get(i.key), s = r.get(i.key), d = s == null ? null : t.get(s) ?? null, a = ((u = n.get(i.key)) == null ? void 0 : u.flatMap((f) => {
|
|
835
|
+
const l = t.get(f);
|
|
836
|
+
return l === void 0 ? [] : [l];
|
|
837
|
+
})) ?? [], c = Hr(i.fiber);
|
|
838
|
+
return {
|
|
839
|
+
id: o,
|
|
840
|
+
displayName: Gr(i.fiber),
|
|
841
|
+
parentId: d,
|
|
842
|
+
childrenIds: a,
|
|
843
|
+
...c !== void 0 && {
|
|
844
|
+
source: c
|
|
845
|
+
},
|
|
846
|
+
tags: qr(i)
|
|
847
|
+
};
|
|
848
|
+
}), Zr = (e, t, r, n) => {
|
|
849
|
+
const i = [], o = /* @__PURE__ */ new Set(), s = (d) => {
|
|
850
|
+
const a = r.get(d);
|
|
851
|
+
a === void 0 || o.has(a) || n.get(d) !== null || (o.add(a), i.push(a));
|
|
852
|
+
};
|
|
853
|
+
return e.rootRecordKeys.forEach((d) => {
|
|
854
|
+
s(d);
|
|
855
|
+
}), t.forEach((d) => {
|
|
856
|
+
s(d.key);
|
|
857
|
+
}), i;
|
|
858
|
+
}, Jr = (e, t) => {
|
|
859
|
+
var r;
|
|
860
|
+
if (((r = e.meta) == null ? void 0 : r.truncated) === !0)
|
|
861
|
+
return {
|
|
862
|
+
truncated: !0,
|
|
863
|
+
includedNodeCount: t
|
|
864
|
+
};
|
|
865
|
+
}, en = (e) => {
|
|
866
|
+
const { includedRecords: t, includedRecordByKey: r, includedNodeIdByRecordKey: n } = Yr(e), i = Xr(
|
|
867
|
+
t,
|
|
868
|
+
r
|
|
869
|
+
), o = Wr(
|
|
870
|
+
t,
|
|
871
|
+
r,
|
|
872
|
+
i
|
|
873
|
+
), s = Qr(
|
|
874
|
+
t,
|
|
875
|
+
n,
|
|
876
|
+
i,
|
|
877
|
+
o
|
|
878
|
+
), d = Zr(
|
|
879
|
+
e.traversalResult,
|
|
880
|
+
t,
|
|
881
|
+
n,
|
|
882
|
+
i
|
|
883
|
+
), a = Jr(e.traversalResult, s.length);
|
|
884
|
+
return {
|
|
885
|
+
nodes: s,
|
|
886
|
+
rootIds: d,
|
|
887
|
+
...a !== void 0 && {
|
|
888
|
+
meta: a
|
|
889
|
+
}
|
|
890
|
+
};
|
|
891
|
+
}, tn = /* @__PURE__ */ new Set([0, 1, 2, 11, 14, 15]), rn = 8, nn = [
|
|
892
|
+
"_internalRoot",
|
|
893
|
+
"childRoot",
|
|
894
|
+
"containerInfo",
|
|
895
|
+
"current",
|
|
896
|
+
"root",
|
|
897
|
+
"rootNode",
|
|
898
|
+
"stateNode"
|
|
899
|
+
], w = {
|
|
900
|
+
maxRecords: 2e3,
|
|
901
|
+
maxTraversalSteps: 2e4
|
|
902
|
+
}, Ae = (e, t) => !Number.isFinite(e) || !Number.isInteger(e) || e < 0 ? t : e, Ye = (e) => ({
|
|
903
|
+
maxRecords: Ae(
|
|
904
|
+
(e == null ? void 0 : e.maxRecords) ?? w.maxRecords,
|
|
905
|
+
w.maxRecords
|
|
906
|
+
),
|
|
907
|
+
maxTraversalSteps: Ae(
|
|
908
|
+
(e == null ? void 0 : e.maxTraversalSteps) ?? w.maxTraversalSteps,
|
|
909
|
+
w.maxTraversalSteps
|
|
910
|
+
)
|
|
911
|
+
}), Xe = (e, t, r, n) => ({
|
|
912
|
+
truncated: n !== null,
|
|
913
|
+
exhaustedBy: n,
|
|
914
|
+
includedRecordCount: e.length,
|
|
915
|
+
traversalStepCount: t,
|
|
916
|
+
budget: r
|
|
917
|
+
}), on = (e = w) => ({
|
|
918
|
+
records: [],
|
|
919
|
+
rootRecordKeys: [],
|
|
920
|
+
meta: Xe([], 0, e, null)
|
|
921
|
+
}), ne = (e) => typeof e == "object" && e !== null, U = (e) => {
|
|
922
|
+
if (ne(e))
|
|
923
|
+
return e;
|
|
924
|
+
}, S = (e, t) => {
|
|
925
|
+
try {
|
|
926
|
+
return e[t];
|
|
927
|
+
} catch {
|
|
928
|
+
return;
|
|
929
|
+
}
|
|
930
|
+
}, sn = (e) => {
|
|
931
|
+
try {
|
|
932
|
+
return Object.keys(e).flatMap((t) => {
|
|
933
|
+
const r = S(e, t);
|
|
934
|
+
return r === void 0 ? [] : [r];
|
|
935
|
+
});
|
|
936
|
+
} catch {
|
|
937
|
+
return [];
|
|
938
|
+
}
|
|
939
|
+
}, oe = (e) => {
|
|
940
|
+
const t = S(e, "tag");
|
|
941
|
+
if (typeof t == "number" && Number.isInteger(t))
|
|
942
|
+
return t;
|
|
943
|
+
}, dn = (e) => S(e, "child") !== void 0 || S(e, "sibling") !== void 0 || S(e, "return") !== void 0 || S(e, "alternate") !== void 0, We = (e) => ne(e) ? oe(e) !== void 0 && dn(e) : !1, an = (e, t, r) => {
|
|
944
|
+
if (!(r >= rn)) {
|
|
945
|
+
if (We(e))
|
|
946
|
+
return e;
|
|
947
|
+
if (!t.has(e)) {
|
|
948
|
+
t.add(e);
|
|
949
|
+
for (const n of nn) {
|
|
950
|
+
const i = S(e, n), o = G(i, t, r + 1);
|
|
951
|
+
if (o !== void 0)
|
|
952
|
+
return o;
|
|
953
|
+
}
|
|
954
|
+
for (const n of sn(e)) {
|
|
955
|
+
const i = G(n, t, r + 1);
|
|
956
|
+
if (i !== void 0)
|
|
957
|
+
return i;
|
|
958
|
+
}
|
|
959
|
+
}
|
|
960
|
+
}
|
|
961
|
+
}, cn = (e) => {
|
|
962
|
+
const t = oe(e);
|
|
963
|
+
return t !== void 0 && tn.has(t);
|
|
964
|
+
}, G = (e, t, r) => {
|
|
965
|
+
if (We(e))
|
|
966
|
+
return e;
|
|
967
|
+
if (ne(e))
|
|
968
|
+
return an(e, t, r);
|
|
969
|
+
}, un = (e) => {
|
|
970
|
+
const t = U(e.root);
|
|
971
|
+
if (t !== void 0)
|
|
972
|
+
return G(t, /* @__PURE__ */ new Set(), 0);
|
|
973
|
+
}, ln = (e) => e.map((t, r) => ({
|
|
974
|
+
rootRef: t,
|
|
975
|
+
sourceIndex: r
|
|
976
|
+
})).sort((t, r) => t.rootRef.rendererId !== r.rootRef.rendererId ? t.rootRef.rendererId - r.rootRef.rendererId : t.sourceIndex - r.sourceIndex).map((t) => t.rootRef), fn = (e) => `fiber:${e.rendererId}:${e.rendererRootIndex}:${e.path}`, pn = (e) => {
|
|
977
|
+
const t = [], r = /* @__PURE__ */ new Set();
|
|
978
|
+
let n = U(S(e, "child"));
|
|
979
|
+
for (; n !== void 0 && !r.has(n); )
|
|
980
|
+
r.add(n), t.push(n), n = U(S(n, "sibling"));
|
|
981
|
+
return t;
|
|
982
|
+
}, yn = (e, t) => {
|
|
983
|
+
const r = [], n = /* @__PURE__ */ new Map(), i = [], o = /* @__PURE__ */ new Set(), s = Ye(t), d = ln(e), a = /* @__PURE__ */ new Map(), c = /* @__PURE__ */ new Set();
|
|
984
|
+
let u = 0, f = null;
|
|
985
|
+
for (const l of d) {
|
|
986
|
+
if (f !== null)
|
|
987
|
+
break;
|
|
988
|
+
const m = un(l);
|
|
989
|
+
if (m === void 0)
|
|
990
|
+
continue;
|
|
991
|
+
const p = a.get(l.rendererId) ?? 0;
|
|
992
|
+
a.set(l.rendererId, p + 1);
|
|
993
|
+
const R = [
|
|
994
|
+
{
|
|
995
|
+
fiber: m,
|
|
996
|
+
rendererId: l.rendererId,
|
|
997
|
+
rendererRootIndex: p,
|
|
998
|
+
path: "0",
|
|
999
|
+
parentRecordKey: null
|
|
1000
|
+
}
|
|
1001
|
+
];
|
|
1002
|
+
for (; R.length > 0; ) {
|
|
1003
|
+
if (u >= s.maxTraversalSteps) {
|
|
1004
|
+
f = "step-limit";
|
|
1005
|
+
break;
|
|
1006
|
+
}
|
|
1007
|
+
if (r.length >= s.maxRecords) {
|
|
1008
|
+
f = "record-limit";
|
|
1009
|
+
break;
|
|
1010
|
+
}
|
|
1011
|
+
const y = R.pop();
|
|
1012
|
+
if (u += 1, y === void 0 || c.has(y.fiber))
|
|
1013
|
+
continue;
|
|
1014
|
+
c.add(y.fiber);
|
|
1015
|
+
let A = y.parentRecordKey;
|
|
1016
|
+
if (cn(y.fiber)) {
|
|
1017
|
+
const I = oe(y.fiber);
|
|
1018
|
+
if (I !== void 0) {
|
|
1019
|
+
const E = fn(y), he = {
|
|
1020
|
+
key: E,
|
|
1021
|
+
rendererId: y.rendererId,
|
|
1022
|
+
rendererRootIndex: y.rendererRootIndex,
|
|
1023
|
+
path: y.path,
|
|
1024
|
+
tag: I,
|
|
1025
|
+
fiber: y.fiber,
|
|
1026
|
+
parentKey: y.parentRecordKey,
|
|
1027
|
+
childKeys: []
|
|
1028
|
+
};
|
|
1029
|
+
if (n.set(E, he), r.push(he), A = E, y.parentRecordKey === null)
|
|
1030
|
+
o.has(E) || (o.add(E), i.push(E));
|
|
1031
|
+
else {
|
|
1032
|
+
const ge = n.get(y.parentRecordKey);
|
|
1033
|
+
ge !== void 0 && ge.childKeys.push(E);
|
|
1034
|
+
}
|
|
1035
|
+
}
|
|
1036
|
+
}
|
|
1037
|
+
const h = pn(y.fiber);
|
|
1038
|
+
for (let I = h.length - 1; I >= 0; I -= 1) {
|
|
1039
|
+
const E = h[I];
|
|
1040
|
+
R.push({
|
|
1041
|
+
fiber: E,
|
|
1042
|
+
rendererId: y.rendererId,
|
|
1043
|
+
rendererRootIndex: y.rendererRootIndex,
|
|
1044
|
+
path: `${y.path}.${I}`,
|
|
1045
|
+
parentRecordKey: A
|
|
1046
|
+
});
|
|
1047
|
+
}
|
|
1048
|
+
}
|
|
1049
|
+
}
|
|
1050
|
+
return {
|
|
1051
|
+
records: r,
|
|
1052
|
+
rootRecordKeys: i,
|
|
1053
|
+
meta: Xe(r, u, s, f)
|
|
1054
|
+
};
|
|
1055
|
+
}, hn = (e, t) => {
|
|
1056
|
+
const r = Ye(t);
|
|
1057
|
+
return e.status !== "ok" ? on(r) : yn(e.roots, r);
|
|
1058
|
+
}, gn = (e, t) => {
|
|
1059
|
+
if (t !== void 0)
|
|
1060
|
+
try {
|
|
1061
|
+
t(e);
|
|
1062
|
+
} catch {
|
|
1063
|
+
}
|
|
1064
|
+
}, mn = (e) => {
|
|
1065
|
+
const t = ar(), r = Ir(), n = () => {
|
|
1066
|
+
const o = Dr(), s = hn(o), d = t.allocateNodeIds(
|
|
1067
|
+
s.records
|
|
1068
|
+
), a = en({
|
|
1069
|
+
traversalResult: s,
|
|
1070
|
+
nodeIdByRecordKey: d.nodeIdByRecordKey
|
|
1071
|
+
});
|
|
1072
|
+
return r.refreshFromSnapshot({
|
|
1073
|
+
traversalResult: s,
|
|
1074
|
+
nodeIdByRecordKey: d.nodeIdByRecordKey,
|
|
1075
|
+
snapshot: a
|
|
1076
|
+
}), gn(
|
|
1077
|
+
{
|
|
1078
|
+
discoveryResult: o
|
|
1079
|
+
},
|
|
1080
|
+
e == null ? void 0 : e.onSnapshotDiagnostics
|
|
1081
|
+
), a;
|
|
1082
|
+
}, i = (o) => {
|
|
1083
|
+
try {
|
|
1084
|
+
return r.resolveByNodeId(o);
|
|
1085
|
+
} catch {
|
|
1086
|
+
return;
|
|
1087
|
+
}
|
|
1088
|
+
};
|
|
1089
|
+
return F({
|
|
1090
|
+
getTreeSnapshot: () => n(),
|
|
1091
|
+
getNodeProps: ({ node: o }) => {
|
|
1092
|
+
const s = i(o.id);
|
|
1093
|
+
if (s !== void 0)
|
|
1094
|
+
try {
|
|
1095
|
+
return Nr(s);
|
|
1096
|
+
} catch {
|
|
1097
|
+
return;
|
|
1098
|
+
}
|
|
1099
|
+
},
|
|
1100
|
+
getDomElement: ({ node: o }) => {
|
|
1101
|
+
const s = i(o.id);
|
|
1102
|
+
if (s === void 0)
|
|
1103
|
+
return null;
|
|
1104
|
+
try {
|
|
1105
|
+
return Zt(s);
|
|
1106
|
+
} catch {
|
|
1107
|
+
return null;
|
|
1108
|
+
}
|
|
1109
|
+
},
|
|
1110
|
+
getReactComponentPathForElement: (o) => {
|
|
1111
|
+
try {
|
|
1112
|
+
return n(), r.resolveClosestComponentPathForElement(o);
|
|
1113
|
+
} catch {
|
|
1114
|
+
return;
|
|
1115
|
+
}
|
|
1116
|
+
}
|
|
1117
|
+
});
|
|
1118
|
+
}, se = "data-inspector-node-id", In = "data-inspector-display-name", Qe = "data-nextjs-scroll-focus-boundary", ie = "__next", En = "next-pages-root", Rn = "next-app-router-root", we = 120, Pe = "next-node", bn = () => ({
|
|
1119
|
+
generatedNodeIdByPath: /* @__PURE__ */ new Map(),
|
|
1120
|
+
nextGeneratedNodeId: 1
|
|
1121
|
+
}), Nn = (e, t) => {
|
|
1122
|
+
var i;
|
|
1123
|
+
const r = (i = e.getAttribute(In)) == null ? void 0 : i.trim();
|
|
1124
|
+
if (r !== void 0 && r.length > 0)
|
|
1125
|
+
return r;
|
|
1126
|
+
const n = t.split(/[\s_-]+/).filter((o) => o.length > 0).map((o) => o[0].toUpperCase() + o.slice(1)).join("");
|
|
1127
|
+
return n.length > 0 ? n : e.tagName.toLowerCase();
|
|
1128
|
+
}, de = (e) => {
|
|
1129
|
+
var r;
|
|
1130
|
+
const t = (r = e.getAttribute(se)) == null ? void 0 : r.trim();
|
|
1131
|
+
if (!(t === void 0 || t.length === 0))
|
|
1132
|
+
return t;
|
|
1133
|
+
}, Ze = (e) => e.hasAttribute(Qe), Tn = (e) => {
|
|
1134
|
+
const t = [];
|
|
1135
|
+
let r = e;
|
|
1136
|
+
for (; r !== null; ) {
|
|
1137
|
+
const n = r.parentElement, i = n === null ? 0 : Array.from(n.children).findIndex(
|
|
1138
|
+
(o) => o === r
|
|
1139
|
+
);
|
|
1140
|
+
t.push(`${r.tagName.toLowerCase()}:${i}`), r = n;
|
|
1141
|
+
}
|
|
1142
|
+
return t.reverse().join("/");
|
|
1143
|
+
}, Sn = (e, t, r) => {
|
|
1144
|
+
const n = Tn(t), i = e.generatedNodeIdByPath.get(n);
|
|
1145
|
+
if (i !== void 0 && !r.has(i))
|
|
1146
|
+
return i;
|
|
1147
|
+
let o = `${Pe}-${e.nextGeneratedNodeId}`;
|
|
1148
|
+
for (; r.has(o); )
|
|
1149
|
+
e.nextGeneratedNodeId += 1, o = `${Pe}-${e.nextGeneratedNodeId}`;
|
|
1150
|
+
return e.generatedNodeIdByPath.set(n, o), e.nextGeneratedNodeId += 1, o;
|
|
1151
|
+
}, vn = (e) => {
|
|
1152
|
+
const t = Array.from(
|
|
1153
|
+
e.querySelectorAll(`[${se}]`)
|
|
1154
|
+
).filter((i) => de(i) !== void 0);
|
|
1155
|
+
if (t.length > 0)
|
|
1156
|
+
return t;
|
|
1157
|
+
const r = e.getElementById(ie);
|
|
1158
|
+
if (r !== null)
|
|
1159
|
+
return [r];
|
|
1160
|
+
const n = e.querySelector(
|
|
1161
|
+
`[${Qe}]`
|
|
1162
|
+
);
|
|
1163
|
+
return n !== null ? [n] : [];
|
|
1164
|
+
}, _n = (e, t, r) => {
|
|
1165
|
+
const n = de(t);
|
|
1166
|
+
return n !== void 0 ? n : (t.getAttribute("id") ?? "").trim() === ie ? En : Ze(t) ? Rn : Sn(e, t, r);
|
|
1167
|
+
}, An = (e, t) => {
|
|
1168
|
+
const r = /* @__PURE__ */ new Map();
|
|
1169
|
+
vn(e).forEach((s) => {
|
|
1170
|
+
const d = new Set(r.keys()), a = _n(t, s, d);
|
|
1171
|
+
r.has(a) || r.set(a, s);
|
|
1172
|
+
});
|
|
1173
|
+
const n = /* @__PURE__ */ new Map();
|
|
1174
|
+
r.forEach((s, d) => {
|
|
1175
|
+
const a = Q(s);
|
|
1176
|
+
n.set(d, {
|
|
1177
|
+
id: d,
|
|
1178
|
+
displayName: Nn(s, d),
|
|
1179
|
+
parentId: null,
|
|
1180
|
+
childrenIds: [],
|
|
1181
|
+
tags: [s.tagName.toLowerCase()],
|
|
1182
|
+
...a && { source: a }
|
|
1183
|
+
});
|
|
1184
|
+
}), r.forEach((s, d) => {
|
|
1185
|
+
var l;
|
|
1186
|
+
const a = n.get(d);
|
|
1187
|
+
if (a === void 0)
|
|
1188
|
+
return;
|
|
1189
|
+
const c = (l = s.parentElement) == null ? void 0 : l.closest(
|
|
1190
|
+
`[${se}]`
|
|
1191
|
+
), u = c == null ? void 0 : de(c);
|
|
1192
|
+
if (u === void 0 || u === d || !n.has(u))
|
|
1193
|
+
return;
|
|
1194
|
+
a.parentId = u;
|
|
1195
|
+
const f = n.get(u);
|
|
1196
|
+
f !== void 0 && f.childrenIds.push(d);
|
|
1197
|
+
});
|
|
1198
|
+
const i = Array.from(n.values()), o = i.filter((s) => s.parentId === null).map((s) => s.id);
|
|
1199
|
+
return {
|
|
1200
|
+
snapshot: {
|
|
1201
|
+
nodes: i,
|
|
1202
|
+
rootIds: o
|
|
1203
|
+
},
|
|
1204
|
+
nodeElementById: r
|
|
1205
|
+
};
|
|
1206
|
+
}, wn = (e) => {
|
|
1207
|
+
var r;
|
|
1208
|
+
const t = (r = e.textContent) == null ? void 0 : r.replace(/\s+/g, " ").trim();
|
|
1209
|
+
if (!(t === void 0 || t.length === 0))
|
|
1210
|
+
return t.length <= we ? t : `${t.slice(0, we - 3)}...`;
|
|
1211
|
+
}, Pn = (e, t) => {
|
|
1212
|
+
const r = {
|
|
1213
|
+
nodeId: e,
|
|
1214
|
+
tagName: t.tagName.toLowerCase()
|
|
1215
|
+
}, n = Array.from(t.classList), i = wn(t), o = t.getAttribute("role"), s = t.getAttribute("aria-label");
|
|
1216
|
+
return t.id.length > 0 && (r.elementId = t.id), n.length > 0 && (r.classList = n), (t.getAttribute("id") ?? "").trim() === ie ? r.routerMode = "pages" : Ze(t) && (r.routerMode = "app"), o !== null && o.length > 0 && (r.role = o), s !== null && s.length > 0 && (r.ariaLabel = s), i !== void 0 && (r.textPreview = i), t instanceof HTMLIFrameElement && t.src.length > 0 && (r.src = t.src), r;
|
|
1217
|
+
}, Je = (e = {}) => {
|
|
1218
|
+
const t = e.doc ?? document, r = bn();
|
|
1219
|
+
let n;
|
|
1220
|
+
const i = () => (n = An(t, r), n.snapshot), o = (s) => n == null ? void 0 : n.nodeElementById.get(s);
|
|
1221
|
+
return F({
|
|
1222
|
+
getTreeSnapshot: i,
|
|
1223
|
+
getNodeProps: ({ node: s }) => {
|
|
1224
|
+
const d = o(s.id);
|
|
1225
|
+
if (d !== void 0)
|
|
1226
|
+
return Pn(s.id, d);
|
|
1227
|
+
},
|
|
1228
|
+
getDomElement: ({ node: s }) => o(s.id) ?? null
|
|
1229
|
+
});
|
|
1230
|
+
}, ae = "data-inspector-node-id", Fn = "data-inspector-display-name", Bn = "itera-app-root", Fe = 120, Be = "vite-node", On = () => ({
|
|
1231
|
+
generatedNodeIdByPath: /* @__PURE__ */ new Map(),
|
|
1232
|
+
nextGeneratedNodeId: 1
|
|
1233
|
+
}), Mn = (e, t) => {
|
|
1234
|
+
var i;
|
|
1235
|
+
const r = (i = e.getAttribute(Fn)) == null ? void 0 : i.trim();
|
|
1236
|
+
if (r !== void 0 && r.length > 0)
|
|
1237
|
+
return r;
|
|
1238
|
+
const n = t.split(/[\s_-]+/).filter((o) => o.length > 0).map((o) => o[0].toUpperCase() + o.slice(1)).join("");
|
|
1239
|
+
return n.length > 0 ? n : e.tagName.toLowerCase();
|
|
1240
|
+
}, ce = (e) => {
|
|
1241
|
+
var r;
|
|
1242
|
+
const t = (r = e.getAttribute(ae)) == null ? void 0 : r.trim();
|
|
1243
|
+
if (!(t === void 0 || t.length === 0))
|
|
1244
|
+
return t;
|
|
1245
|
+
}, Cn = (e) => {
|
|
1246
|
+
const t = [];
|
|
1247
|
+
let r = e;
|
|
1248
|
+
for (; r !== null; ) {
|
|
1249
|
+
const n = r.parentElement, i = n === null ? 0 : Array.from(n.children).findIndex(
|
|
1250
|
+
(o) => o === r
|
|
1251
|
+
);
|
|
1252
|
+
t.push(`${r.tagName.toLowerCase()}:${i}`), r = n;
|
|
1253
|
+
}
|
|
1254
|
+
return t.reverse().join("/");
|
|
1255
|
+
}, Dn = (e, t, r) => {
|
|
1256
|
+
const n = Cn(t), i = e.generatedNodeIdByPath.get(n);
|
|
1257
|
+
if (i !== void 0 && !r.has(i))
|
|
1258
|
+
return i;
|
|
1259
|
+
let o = `${Be}-${e.nextGeneratedNodeId}`;
|
|
1260
|
+
for (; r.has(o); )
|
|
1261
|
+
e.nextGeneratedNodeId += 1, o = `${Be}-${e.nextGeneratedNodeId}`;
|
|
1262
|
+
return e.generatedNodeIdByPath.set(n, o), e.nextGeneratedNodeId += 1, o;
|
|
1263
|
+
}, Ln = (e) => {
|
|
1264
|
+
const t = Array.from(
|
|
1265
|
+
e.querySelectorAll(`[${ae}]`)
|
|
1266
|
+
).filter((n) => ce(n) !== void 0);
|
|
1267
|
+
if (t.length > 0)
|
|
1268
|
+
return t;
|
|
1269
|
+
const r = e.getElementById("root") ?? e.body;
|
|
1270
|
+
return r === null ? [] : [r];
|
|
1271
|
+
}, xn = (e, t, r) => {
|
|
1272
|
+
const n = ce(t);
|
|
1273
|
+
return n !== void 0 ? n : (t.getAttribute("id") ?? "").trim() === "root" ? Bn : Dn(e, t, r);
|
|
1274
|
+
}, $n = (e, t) => {
|
|
1275
|
+
const r = /* @__PURE__ */ new Map();
|
|
1276
|
+
Ln(e).forEach((s) => {
|
|
1277
|
+
const d = new Set(r.keys()), a = xn(t, s, d);
|
|
1278
|
+
r.has(a) || r.set(a, s);
|
|
1279
|
+
});
|
|
1280
|
+
const n = /* @__PURE__ */ new Map();
|
|
1281
|
+
r.forEach((s, d) => {
|
|
1282
|
+
const a = Q(s);
|
|
1283
|
+
n.set(d, {
|
|
1284
|
+
id: d,
|
|
1285
|
+
displayName: Mn(s, d),
|
|
1286
|
+
parentId: null,
|
|
1287
|
+
childrenIds: [],
|
|
1288
|
+
tags: [s.tagName.toLowerCase()],
|
|
1289
|
+
...a && { source: a }
|
|
1290
|
+
});
|
|
1291
|
+
}), r.forEach((s, d) => {
|
|
1292
|
+
var l;
|
|
1293
|
+
const a = n.get(d);
|
|
1294
|
+
if (a === void 0)
|
|
1295
|
+
return;
|
|
1296
|
+
const c = (l = s.parentElement) == null ? void 0 : l.closest(
|
|
1297
|
+
`[${ae}]`
|
|
1298
|
+
), u = c == null ? void 0 : ce(c);
|
|
1299
|
+
if (u === void 0 || u === d || !n.has(u))
|
|
1300
|
+
return;
|
|
1301
|
+
a.parentId = u;
|
|
1302
|
+
const f = n.get(u);
|
|
1303
|
+
f !== void 0 && f.childrenIds.push(d);
|
|
1304
|
+
});
|
|
1305
|
+
const i = Array.from(n.values()), o = i.filter((s) => s.parentId === null).map((s) => s.id);
|
|
1306
|
+
return {
|
|
1307
|
+
snapshot: {
|
|
1308
|
+
nodes: i,
|
|
1309
|
+
rootIds: o
|
|
1310
|
+
},
|
|
1311
|
+
nodeElementById: r
|
|
1312
|
+
};
|
|
1313
|
+
}, kn = (e) => {
|
|
1314
|
+
var r;
|
|
1315
|
+
const t = (r = e.textContent) == null ? void 0 : r.replace(/\s+/g, " ").trim();
|
|
1316
|
+
if (!(t === void 0 || t.length === 0))
|
|
1317
|
+
return t.length <= Fe ? t : `${t.slice(0, Fe - 3)}...`;
|
|
1318
|
+
}, Kn = (e, t) => {
|
|
1319
|
+
const r = {
|
|
1320
|
+
nodeId: e,
|
|
1321
|
+
tagName: t.tagName.toLowerCase()
|
|
1322
|
+
}, n = Array.from(t.classList), i = kn(t), o = t.getAttribute("role"), s = t.getAttribute("aria-label");
|
|
1323
|
+
return t.id.length > 0 && (r.elementId = t.id), n.length > 0 && (r.classList = n), o !== null && o.length > 0 && (r.role = o), s !== null && s.length > 0 && (r.ariaLabel = s), i !== void 0 && (r.textPreview = i), t instanceof HTMLIFrameElement && t.src.length > 0 && (r.src = t.src), r;
|
|
1324
|
+
}, et = (e = {}) => {
|
|
1325
|
+
const t = e.doc ?? document, r = On();
|
|
1326
|
+
let n;
|
|
1327
|
+
const i = () => (n = $n(t, r), n.snapshot), o = (s) => n == null ? void 0 : n.nodeElementById.get(s);
|
|
1328
|
+
return F({
|
|
1329
|
+
getTreeSnapshot: i,
|
|
1330
|
+
getNodeProps: ({ node: s }) => {
|
|
1331
|
+
const d = o(s.id);
|
|
1332
|
+
if (d !== void 0)
|
|
1333
|
+
return Kn(s.id, d);
|
|
1334
|
+
},
|
|
1335
|
+
getDomElement: ({ node: s }) => o(s.id) ?? null
|
|
1336
|
+
});
|
|
1337
|
+
}, ue = 1, tt = "itera.inspector.embedded.lifecycle_event_total", rt = "itera.inspector.embedded.rejection_total", nt = "itera.inspector.embedded.fiber_fallback_total", Uo = [
|
|
1338
|
+
tt,
|
|
1339
|
+
rt,
|
|
1340
|
+
nt
|
|
1341
|
+
], Go = [
|
|
1342
|
+
"connect",
|
|
1343
|
+
"ready",
|
|
1344
|
+
"error"
|
|
1345
|
+
], Vo = [
|
|
1346
|
+
"origin-reject",
|
|
1347
|
+
"token-reject",
|
|
1348
|
+
"oversize-reject",
|
|
1349
|
+
"invalid-payload-reject"
|
|
1350
|
+
], qo = [
|
|
1351
|
+
"hook-missing",
|
|
1352
|
+
"hook-malformed",
|
|
1353
|
+
"renderers-malformed",
|
|
1354
|
+
"fiber-roots-reader-missing",
|
|
1355
|
+
"fiber-roots-malformed",
|
|
1356
|
+
"renderer-empty",
|
|
1357
|
+
"root-empty",
|
|
1358
|
+
"fiber-roots-read-failed",
|
|
1359
|
+
"probe-failed",
|
|
1360
|
+
"snapshot-empty",
|
|
1361
|
+
"snapshot-read-failed"
|
|
1362
|
+
], Yo = [
|
|
1363
|
+
"vite",
|
|
1364
|
+
"next",
|
|
1365
|
+
"cra",
|
|
1366
|
+
"noop"
|
|
1367
|
+
], le = (e, t) => {
|
|
1368
|
+
if (t !== void 0)
|
|
1369
|
+
try {
|
|
1370
|
+
t(e);
|
|
1371
|
+
} catch {
|
|
1372
|
+
}
|
|
1373
|
+
}, fe = (e, t) => {
|
|
1374
|
+
const r = {
|
|
1375
|
+
schemaVersion: ue,
|
|
1376
|
+
metricName: tt,
|
|
1377
|
+
count: 1,
|
|
1378
|
+
...e
|
|
1379
|
+
};
|
|
1380
|
+
return le(r, t == null ? void 0 : t.onLifecycleMetric), r;
|
|
1381
|
+
}, Hn = (e, t) => {
|
|
1382
|
+
const r = {
|
|
1383
|
+
schemaVersion: ue,
|
|
1384
|
+
metricName: rt,
|
|
1385
|
+
count: 1,
|
|
1386
|
+
...e
|
|
1387
|
+
};
|
|
1388
|
+
return le(r, t == null ? void 0 : t.onRejectionMetric), r;
|
|
1389
|
+
}, jn = (e, t) => {
|
|
1390
|
+
const r = {
|
|
1391
|
+
schemaVersion: ue,
|
|
1392
|
+
metricName: nt,
|
|
1393
|
+
count: 1,
|
|
1394
|
+
...e
|
|
1395
|
+
};
|
|
1396
|
+
return le(r, t == null ? void 0 : t.onFiberFallbackMetric), r;
|
|
1397
|
+
}, ot = {
|
|
1398
|
+
nodes: [],
|
|
1399
|
+
rootIds: []
|
|
1400
|
+
}, V = () => F({
|
|
1401
|
+
getTreeSnapshot: () => ot
|
|
1402
|
+
}), st = (e) => e.nodes.length > 0, zn = () => typeof document > "u" ? "vite" : document.getElementById("__next") !== null || document.querySelector("[data-nextjs-scroll-focus-boundary]") !== null ? "next" : document.querySelector("[data-reactroot]") !== null ? "cra" : "vite", Un = (e) => e === "vite" ? et() : e === "next" ? Je() : ke(), Gn = (e) => {
|
|
1403
|
+
const t = [], r = ["vite", "next", "cra"];
|
|
1404
|
+
return t.push(e), r.forEach((n) => {
|
|
1405
|
+
n !== e && t.push(n);
|
|
1406
|
+
}), t;
|
|
1407
|
+
}, it = (e) => {
|
|
1408
|
+
try {
|
|
1409
|
+
return e.getTreeSnapshot();
|
|
1410
|
+
} catch {
|
|
1411
|
+
return;
|
|
1412
|
+
}
|
|
1413
|
+
}, Vn = () => {
|
|
1414
|
+
const e = zn();
|
|
1415
|
+
for (const t of Gn(e)) {
|
|
1416
|
+
let r;
|
|
1417
|
+
try {
|
|
1418
|
+
r = Un(t);
|
|
1419
|
+
} catch {
|
|
1420
|
+
continue;
|
|
1421
|
+
}
|
|
1422
|
+
const n = it(r);
|
|
1423
|
+
if (n !== void 0 && st(n))
|
|
1424
|
+
return {
|
|
1425
|
+
adapter: r,
|
|
1426
|
+
snapshot: n,
|
|
1427
|
+
target: t
|
|
1428
|
+
};
|
|
1429
|
+
}
|
|
1430
|
+
return {
|
|
1431
|
+
adapter: V(),
|
|
1432
|
+
snapshot: ot,
|
|
1433
|
+
target: "noop"
|
|
1434
|
+
};
|
|
1435
|
+
}, qn = (e, t) => e === void 0 ? "snapshot-read-failed" : t === void 0 || t.discoveryResult.status === "ok" ? "snapshot-empty" : t.discoveryResult.reason, Yn = (e) => {
|
|
1436
|
+
let t, r;
|
|
1437
|
+
const n = mn({
|
|
1438
|
+
onSnapshotDiagnostics: (a) => {
|
|
1439
|
+
t = a;
|
|
1440
|
+
}
|
|
1441
|
+
});
|
|
1442
|
+
let i = n, o;
|
|
1443
|
+
const s = (a, c) => {
|
|
1444
|
+
const u = `${a}:${c}`;
|
|
1445
|
+
u !== r && (r = u, jn(
|
|
1446
|
+
{
|
|
1447
|
+
reasonCode: a,
|
|
1448
|
+
fallbackAdapterTarget: c
|
|
1449
|
+
},
|
|
1450
|
+
e == null ? void 0 : e.telemetry
|
|
1451
|
+
));
|
|
1452
|
+
}, d = () => {
|
|
1453
|
+
const a = it(n);
|
|
1454
|
+
if (a !== void 0 && st(a))
|
|
1455
|
+
return r = void 0, i = n, o = a, i;
|
|
1456
|
+
const c = Vn(), u = qn(
|
|
1457
|
+
a,
|
|
1458
|
+
t
|
|
1459
|
+
);
|
|
1460
|
+
return s(u, c.target), i = c.adapter, o = c.snapshot, i;
|
|
1461
|
+
};
|
|
1462
|
+
return {
|
|
1463
|
+
getTreeSnapshot: () => {
|
|
1464
|
+
const a = d();
|
|
1465
|
+
if (o !== void 0) {
|
|
1466
|
+
const c = o;
|
|
1467
|
+
return o = void 0, c;
|
|
1468
|
+
}
|
|
1469
|
+
return a.getTreeSnapshot();
|
|
1470
|
+
},
|
|
1471
|
+
getNodeProps: (a) => i.getNodeProps(a),
|
|
1472
|
+
getDomElement: (a) => i.getDomElement(a),
|
|
1473
|
+
getReactComponentPathForElement: (a) => {
|
|
1474
|
+
var c;
|
|
1475
|
+
return (c = n.getReactComponentPathForElement) == null ? void 0 : c.call(n, a);
|
|
1476
|
+
}
|
|
1477
|
+
};
|
|
1478
|
+
}, Xn = (e, t) => {
|
|
1479
|
+
const r = wt(e);
|
|
1480
|
+
return r.adapter === "auto" ? V() : r.adapter === "vite" ? et() : r.adapter === "next" ? Je() : r.adapter === "cra" ? ke() : r.adapter === "fiber" ? Yn(t) : V();
|
|
1481
|
+
}, Wn = "data-itera-inspector-highlight", B = (e) => `${Math.max(0, e)}px`, Qn = () => {
|
|
1482
|
+
const e = document.createElement("div");
|
|
1483
|
+
return e.setAttribute(Wn, "true"), e.style.position = "fixed", e.style.pointerEvents = "none", e.style.boxSizing = "border-box", e.style.border = "2px solid #2563eb", e.style.background = "rgba(37, 99, 235, 0.1)", e.style.borderRadius = "4px", e.style.zIndex = "2147483647", e.style.display = "none", e;
|
|
1484
|
+
}, Zn = () => {
|
|
1485
|
+
let e;
|
|
1486
|
+
const t = () => (e !== void 0 || (e = Qn(), document.body.append(e)), e);
|
|
1487
|
+
return {
|
|
1488
|
+
clearHighlight: () => {
|
|
1489
|
+
e !== void 0 && (e.style.display = "none");
|
|
1490
|
+
},
|
|
1491
|
+
highlightElement: (o) => {
|
|
1492
|
+
const s = o.getBoundingClientRect(), d = t();
|
|
1493
|
+
d.style.left = B(s.left), d.style.top = B(s.top), d.style.width = B(s.width), d.style.height = B(s.height), d.style.display = "block";
|
|
1494
|
+
},
|
|
1495
|
+
destroy: () => {
|
|
1496
|
+
e !== void 0 && (e.remove(), e = void 0);
|
|
1497
|
+
}
|
|
1498
|
+
};
|
|
1499
|
+
}, Jn = (e) => {
|
|
1500
|
+
console.warn("[react-inspector-bridge/security]", e);
|
|
1501
|
+
}, eo = {
|
|
1502
|
+
"missing-auth": "unauthorized-missing-auth",
|
|
1503
|
+
"invalid-token": "unauthorized-invalid-token",
|
|
1504
|
+
"expired-token": "unauthorized-expired-token"
|
|
1505
|
+
}, to = (e) => eo[e], dt = (e, t = Jn) => {
|
|
1506
|
+
const r = {
|
|
1507
|
+
...e,
|
|
1508
|
+
schemaVersion: mt,
|
|
1509
|
+
eventName: gt,
|
|
1510
|
+
rejectedBy: "embedded"
|
|
1511
|
+
};
|
|
1512
|
+
return t(r), r;
|
|
1513
|
+
}, ro = 128 * 1024, no = "embedded-inbound-message-too-large", oo = {
|
|
1514
|
+
maxInboundMessageBytes: ro,
|
|
1515
|
+
reason: no
|
|
1516
|
+
}, Oe = new TextEncoder(), so = 64, io = (e) => {
|
|
1517
|
+
if (typeof e != "object" || e === null)
|
|
1518
|
+
return !1;
|
|
1519
|
+
const t = Object.getPrototypeOf(e);
|
|
1520
|
+
return t === Object.prototype || t === null;
|
|
1521
|
+
}, q = (e, t, r) => {
|
|
1522
|
+
if (r > so)
|
|
1523
|
+
return;
|
|
1524
|
+
if (e === null)
|
|
1525
|
+
return 1;
|
|
1526
|
+
if (typeof e == "string")
|
|
1527
|
+
return Oe.encode(e).byteLength;
|
|
1528
|
+
if (typeof e == "number")
|
|
1529
|
+
return 8;
|
|
1530
|
+
if (typeof e == "boolean" || e === void 0)
|
|
1531
|
+
return 1;
|
|
1532
|
+
if (typeof e == "bigint" || typeof e == "symbol" || typeof e == "function" || typeof e != "object" || t.has(e))
|
|
1533
|
+
return;
|
|
1534
|
+
if (e instanceof ArrayBuffer || typeof SharedArrayBuffer < "u" && e instanceof SharedArrayBuffer || ArrayBuffer.isView(e))
|
|
1535
|
+
return e.byteLength;
|
|
1536
|
+
if (typeof Blob < "u" && e instanceof Blob)
|
|
1537
|
+
return e.size;
|
|
1538
|
+
if (t.add(e), Array.isArray(e)) {
|
|
1539
|
+
let i = 0;
|
|
1540
|
+
for (const o of e) {
|
|
1541
|
+
const s = q(
|
|
1542
|
+
o,
|
|
1543
|
+
t,
|
|
1544
|
+
r + 1
|
|
1545
|
+
);
|
|
1546
|
+
if (s === void 0) {
|
|
1547
|
+
t.delete(e);
|
|
1548
|
+
return;
|
|
1549
|
+
}
|
|
1550
|
+
i += s;
|
|
1551
|
+
}
|
|
1552
|
+
return t.delete(e), i;
|
|
1553
|
+
}
|
|
1554
|
+
if (!io(e)) {
|
|
1555
|
+
t.delete(e);
|
|
1556
|
+
return;
|
|
1557
|
+
}
|
|
1558
|
+
let n = 0;
|
|
1559
|
+
for (const [i, o] of Object.entries(e)) {
|
|
1560
|
+
const s = q(
|
|
1561
|
+
o,
|
|
1562
|
+
t,
|
|
1563
|
+
r + 1
|
|
1564
|
+
);
|
|
1565
|
+
if (s === void 0) {
|
|
1566
|
+
t.delete(e);
|
|
1567
|
+
return;
|
|
1568
|
+
}
|
|
1569
|
+
n += Oe.encode(i).byteLength + s;
|
|
1570
|
+
}
|
|
1571
|
+
return t.delete(e), n;
|
|
1572
|
+
}, Y = (e) => q(e, /* @__PURE__ */ new WeakSet(), 0), ao = (e, t = oo) => {
|
|
1573
|
+
const r = Y(e);
|
|
1574
|
+
return r === void 0 ? {
|
|
1575
|
+
ok: !1,
|
|
1576
|
+
maxInboundMessageBytes: t.maxInboundMessageBytes,
|
|
1577
|
+
reason: t.reason
|
|
1578
|
+
} : r <= t.maxInboundMessageBytes ? {
|
|
1579
|
+
ok: !0,
|
|
1580
|
+
sizeInBytes: r
|
|
1581
|
+
} : {
|
|
1582
|
+
ok: !1,
|
|
1583
|
+
sizeInBytes: r,
|
|
1584
|
+
maxInboundMessageBytes: t.maxInboundMessageBytes,
|
|
1585
|
+
reason: t.reason
|
|
1586
|
+
};
|
|
1587
|
+
}, co = 1e12, uo = (e) => Number.isFinite(e) ? e >= co ? e : e * 1e3 : Number.NaN, lo = (e) => {
|
|
1588
|
+
var r;
|
|
1589
|
+
if (e === void 0)
|
|
1590
|
+
return {
|
|
1591
|
+
ok: !1,
|
|
1592
|
+
reason: "missing-auth",
|
|
1593
|
+
message: "HELLO auth payload is required in secure mode."
|
|
1594
|
+
};
|
|
1595
|
+
if (e.sessionToken.trim().length === 0)
|
|
1596
|
+
return {
|
|
1597
|
+
ok: !1,
|
|
1598
|
+
reason: "invalid-token",
|
|
1599
|
+
message: "HELLO auth session token must be a non-empty string."
|
|
1600
|
+
};
|
|
1601
|
+
const t = (r = e.metadata) == null ? void 0 : r.expiresAt;
|
|
1602
|
+
return t !== void 0 && uo(t) <= Date.now() ? {
|
|
1603
|
+
ok: !1,
|
|
1604
|
+
reason: "expired-token",
|
|
1605
|
+
message: "HELLO auth session token is expired."
|
|
1606
|
+
} : {
|
|
1607
|
+
ok: !0
|
|
1608
|
+
};
|
|
1609
|
+
}, fo = [
|
|
1610
|
+
"token",
|
|
1611
|
+
"password",
|
|
1612
|
+
"secret",
|
|
1613
|
+
"authorization"
|
|
1614
|
+
], po = new RegExp(fo.join("|"), "i"), yo = "Sensitive value redacted", ho = (e) => po.test(e), go = 5, mo = 50, at = (e) => typeof e == "object" && e !== null && !Array.isArray(e), ct = (e) => {
|
|
1615
|
+
if (!at(e))
|
|
1616
|
+
return !1;
|
|
1617
|
+
const t = Object.getPrototypeOf(e);
|
|
1618
|
+
return t === Object.prototype || t === null;
|
|
1619
|
+
}, ut = (e) => typeof Node < "u" && e instanceof Node, g = (e, t) => t === void 0 ? {
|
|
1620
|
+
__iteraType: e
|
|
1621
|
+
} : {
|
|
1622
|
+
__iteraType: e,
|
|
1623
|
+
preview: t
|
|
1624
|
+
}, Me = (e, t) => e === "" ? t : `${e}.${t}`, Ce = (e, t) => e === "" ? `[${t}]` : `${e}[${t}]`, De = (e, t) => {
|
|
1625
|
+
e.truncated = !0, !(e.droppedKeys.length >= e.maxKeys) && e.droppedKeys.push(t);
|
|
1626
|
+
}, Io = (e, t) => {
|
|
1627
|
+
e.redactedCount += 1, !(e.redactedPaths.length >= e.maxKeys) && e.redactedPaths.push(t);
|
|
1628
|
+
}, Eo = (e) => Number.isNaN(e.getTime()) ? "Invalid Date" : e.toISOString(), Ro = (e) => e.message === "" ? e.name : `${e.name}: ${e.message}`, bo = (e) => e instanceof Element ? `<${e.tagName.toLowerCase()}>` : e.nodeName, No = (e) => {
|
|
1629
|
+
var r;
|
|
1630
|
+
const t = (r = e.constructor) == null ? void 0 : r.name;
|
|
1631
|
+
if (typeof t == "string" && t !== "" && t !== "Object")
|
|
1632
|
+
return t;
|
|
1633
|
+
}, To = (e) => e instanceof Date || e instanceof RegExp || e instanceof Map || e instanceof Set || e instanceof Error || ut(e), lt = (e, t, r) => {
|
|
1634
|
+
const n = t.slice(0, e.maxKeys);
|
|
1635
|
+
for (const i of n)
|
|
1636
|
+
De(e, i);
|
|
1637
|
+
t.length > n.length && De(e, `${r}.__remaining`);
|
|
1638
|
+
}, ft = (e, t, r, n) => {
|
|
1639
|
+
n.objectStack.add(e);
|
|
1640
|
+
try {
|
|
1641
|
+
const i = {}, o = Object.keys(e), s = o.slice(0, n.maxKeys), d = o.slice(n.maxKeys).map((a) => Me(r, a));
|
|
1642
|
+
lt(n, d, r === "" ? "root" : r);
|
|
1643
|
+
for (const a of s) {
|
|
1644
|
+
const c = Me(r, a);
|
|
1645
|
+
if (ho(a)) {
|
|
1646
|
+
Io(n, c), i[a] = g("redacted", yo);
|
|
1647
|
+
continue;
|
|
1648
|
+
}
|
|
1649
|
+
try {
|
|
1650
|
+
i[a] = pe(e[a], t + 1, c, n);
|
|
1651
|
+
} catch {
|
|
1652
|
+
n.truncated = !0, i[a] = g(
|
|
1653
|
+
"unserializable",
|
|
1654
|
+
"Property access threw"
|
|
1655
|
+
);
|
|
1656
|
+
}
|
|
1657
|
+
}
|
|
1658
|
+
return i;
|
|
1659
|
+
} finally {
|
|
1660
|
+
n.objectStack.delete(e);
|
|
1661
|
+
}
|
|
1662
|
+
}, So = (e, t, r, n) => {
|
|
1663
|
+
n.objectStack.add(e);
|
|
1664
|
+
try {
|
|
1665
|
+
const i = e.slice(0, n.maxKeys), o = e.slice(n.maxKeys).map((s, d) => Ce(r, n.maxKeys + d));
|
|
1666
|
+
return lt(n, o, r === "" ? "root" : r), i.map(
|
|
1667
|
+
(s, d) => pe(s, t + 1, Ce(r, d), n)
|
|
1668
|
+
);
|
|
1669
|
+
} finally {
|
|
1670
|
+
n.objectStack.delete(e);
|
|
1671
|
+
}
|
|
1672
|
+
}, pe = (e, t, r, n) => {
|
|
1673
|
+
if (e === null)
|
|
1674
|
+
return null;
|
|
1675
|
+
if (typeof e == "string" || typeof e == "number" || typeof e == "boolean")
|
|
1676
|
+
return e;
|
|
1677
|
+
if (typeof e > "u")
|
|
1678
|
+
return g("undefined");
|
|
1679
|
+
if (typeof e == "function") {
|
|
1680
|
+
const i = e.name === "" ? "anonymous" : e.name;
|
|
1681
|
+
return g("function", i);
|
|
1682
|
+
}
|
|
1683
|
+
return typeof e == "symbol" ? g("symbol", String(e)) : typeof e == "bigint" ? g("bigint", `${e.toString()}n`) : e instanceof Date ? g("date", Eo(e)) : e instanceof RegExp ? g("regexp", e.toString()) : e instanceof Map ? g("map", `Map(${e.size})`) : e instanceof Set ? g("set", `Set(${e.size})`) : e instanceof Error ? g("error", Ro(e)) : ut(e) ? g("dom-node", bo(e)) : Array.isArray(e) ? t >= n.maxDepth ? (n.truncated = !0, g("unserializable", "Depth limit reached")) : n.objectStack.has(e) ? (n.truncated = !0, g("unserializable", "Circular reference")) : So(e, t, r, n) : at(e) ? ct(e) ? t >= n.maxDepth ? (n.truncated = !0, g("unserializable", "Depth limit reached")) : n.objectStack.has(e) ? (n.truncated = !0, g("unserializable", "Circular reference")) : ft(e, t, r, n) : g(
|
|
1684
|
+
"unserializable",
|
|
1685
|
+
No(e)
|
|
1686
|
+
) : g("unserializable");
|
|
1687
|
+
}, z = (e) => {
|
|
1688
|
+
const t = {};
|
|
1689
|
+
return e.truncated && (t.truncated = !0), e.droppedKeys.length > 0 && (t.droppedKeys = e.droppedKeys), e.redactedCount > 0 && (t.redactedCount = e.redactedCount), e.redactedPaths.length > 0 && (t.redactedPaths = e.redactedPaths), t;
|
|
1690
|
+
}, vo = (e) => {
|
|
1691
|
+
const t = e.maxDepth ?? go, r = e.maxKeys ?? mo;
|
|
1692
|
+
return {
|
|
1693
|
+
maxDepth: Math.max(1, t),
|
|
1694
|
+
maxKeys: Math.max(1, r),
|
|
1695
|
+
objectStack: /* @__PURE__ */ new WeakSet(),
|
|
1696
|
+
droppedKeys: [],
|
|
1697
|
+
redactedCount: 0,
|
|
1698
|
+
redactedPaths: [],
|
|
1699
|
+
truncated: !1
|
|
1700
|
+
};
|
|
1701
|
+
}, _o = (e, t = {}) => {
|
|
1702
|
+
const r = vo(t);
|
|
1703
|
+
try {
|
|
1704
|
+
return ct(e) && !To(e) ? {
|
|
1705
|
+
props: ft(e, 0, "", r),
|
|
1706
|
+
meta: z(r)
|
|
1707
|
+
} : {
|
|
1708
|
+
props: {
|
|
1709
|
+
value: pe(e, 0, "value", r)
|
|
1710
|
+
},
|
|
1711
|
+
meta: z(r)
|
|
1712
|
+
};
|
|
1713
|
+
} catch {
|
|
1714
|
+
return r.truncated = !0, {
|
|
1715
|
+
props: {
|
|
1716
|
+
value: g("unserializable", "Unable to serialize props")
|
|
1717
|
+
},
|
|
1718
|
+
meta: z(r)
|
|
1719
|
+
};
|
|
1720
|
+
}
|
|
1721
|
+
}, Ao = "itera-preview-path", wo = "PATH_UPDATED", Po = 120, Fo = 1200, Bo = /* @__PURE__ */ new Set([
|
|
1722
|
+
"HELLO",
|
|
1723
|
+
"REQUEST_TREE",
|
|
1724
|
+
"REQUEST_NODE_PROPS",
|
|
1725
|
+
"REQUEST_SNAPSHOT",
|
|
1726
|
+
"HIGHLIGHT_NODE",
|
|
1727
|
+
"CLEAR_HIGHLIGHT",
|
|
1728
|
+
"PING"
|
|
1729
|
+
]);
|
|
1730
|
+
let b;
|
|
1731
|
+
const Oo = (e) => Bo.has(e.type), Mo = (e) => {
|
|
1732
|
+
if (e !== null && typeof e.postMessage == "function")
|
|
1733
|
+
return e;
|
|
1734
|
+
}, pt = (e, t, r) => {
|
|
1735
|
+
const n = Mo(e);
|
|
1736
|
+
if (n !== void 0) {
|
|
1737
|
+
n.postMessage(r, t);
|
|
1738
|
+
return;
|
|
1739
|
+
}
|
|
1740
|
+
window.parent.postMessage(r, t);
|
|
1741
|
+
}, T = (e, t, r) => {
|
|
1742
|
+
pt(e, t, r);
|
|
1743
|
+
}, O = (e, t, r, n) => {
|
|
1744
|
+
const i = L("ERR_NODE_NOT_FOUND");
|
|
1745
|
+
T(
|
|
1746
|
+
e.source,
|
|
1747
|
+
e.origin,
|
|
1748
|
+
N(
|
|
1749
|
+
"ERROR",
|
|
1750
|
+
{
|
|
1751
|
+
code: i.code,
|
|
1752
|
+
message: i.message,
|
|
1753
|
+
details: {
|
|
1754
|
+
nodeId: t
|
|
1755
|
+
}
|
|
1756
|
+
},
|
|
1757
|
+
{
|
|
1758
|
+
requestId: r,
|
|
1759
|
+
sessionId: n
|
|
1760
|
+
}
|
|
1761
|
+
)
|
|
1762
|
+
);
|
|
1763
|
+
}, M = 112 * 1024, yt = "image/svg+xml", Co = () => {
|
|
1764
|
+
const e = '<svg xmlns="http://www.w3.org/2000/svg" width="1" height="1" viewBox="0 0 1 1"></svg>';
|
|
1765
|
+
return {
|
|
1766
|
+
blob: new Blob([e], {
|
|
1767
|
+
type: yt
|
|
1768
|
+
}),
|
|
1769
|
+
width: 1,
|
|
1770
|
+
height: 1
|
|
1771
|
+
};
|
|
1772
|
+
}, Do = () => ({
|
|
1773
|
+
html: document.documentElement.outerHTML,
|
|
1774
|
+
htmlTruncated: !1
|
|
1775
|
+
}), Lo = (e, t, r, n, i) => {
|
|
1776
|
+
const o = L(
|
|
1777
|
+
"ERR_UNAUTHORIZED_SESSION",
|
|
1778
|
+
r.message
|
|
1779
|
+
);
|
|
1780
|
+
dt({
|
|
1781
|
+
reasonCode: to(
|
|
1782
|
+
r.reason
|
|
1783
|
+
),
|
|
1784
|
+
messageType: "HELLO",
|
|
1785
|
+
requestId: n,
|
|
1786
|
+
sessionId: i,
|
|
1787
|
+
errorCode: o.code
|
|
1788
|
+
}), H(
|
|
1789
|
+
t,
|
|
1790
|
+
"token-reject",
|
|
1791
|
+
{
|
|
1792
|
+
type: "HELLO",
|
|
1793
|
+
requestId: n,
|
|
1794
|
+
sessionId: i
|
|
1795
|
+
},
|
|
1796
|
+
o.code
|
|
1797
|
+
), T(
|
|
1798
|
+
e.source,
|
|
1799
|
+
e.origin,
|
|
1800
|
+
N(
|
|
1801
|
+
"ERROR",
|
|
1802
|
+
{
|
|
1803
|
+
code: o.code,
|
|
1804
|
+
message: o.message,
|
|
1805
|
+
details: {
|
|
1806
|
+
reason: r.reason
|
|
1807
|
+
}
|
|
1808
|
+
},
|
|
1809
|
+
{
|
|
1810
|
+
requestId: n,
|
|
1811
|
+
sessionId: i
|
|
1812
|
+
}
|
|
1813
|
+
)
|
|
1814
|
+
);
|
|
1815
|
+
}, Le = (e) => typeof e == "object" && e !== null, ht = (e) => {
|
|
1816
|
+
if (typeof e == "string")
|
|
1817
|
+
try {
|
|
1818
|
+
const t = JSON.parse(e);
|
|
1819
|
+
return Le(t) ? t : void 0;
|
|
1820
|
+
} catch {
|
|
1821
|
+
return;
|
|
1822
|
+
}
|
|
1823
|
+
return Le(e) ? e : void 0;
|
|
1824
|
+
}, ye = (e) => {
|
|
1825
|
+
const t = ht(e);
|
|
1826
|
+
return t === void 0 ? {} : {
|
|
1827
|
+
type: typeof t.type == "string" ? t.type : void 0,
|
|
1828
|
+
requestId: typeof t.requestId == "string" ? t.requestId : void 0,
|
|
1829
|
+
sessionId: typeof t.sessionId == "string" ? t.sessionId : void 0
|
|
1830
|
+
};
|
|
1831
|
+
}, xo = (e, t, r) => {
|
|
1832
|
+
const n = ye(e.data), i = {
|
|
1833
|
+
requestId: n.requestId,
|
|
1834
|
+
sessionId: n.sessionId
|
|
1835
|
+
}, o = r.sizeInBytes === void 0 ? "unavailable" : r.sizeInBytes, s = L(
|
|
1836
|
+
"ERR_OVERSIZE_MESSAGE",
|
|
1837
|
+
`Rejected inbound host message: reason=${r.reason}, maxBytes=${r.maxInboundMessageBytes}, actualBytes=${o}.`
|
|
1838
|
+
);
|
|
1839
|
+
dt({
|
|
1840
|
+
reasonCode: Rt(r.reason),
|
|
1841
|
+
messageType: n.type,
|
|
1842
|
+
requestId: n.requestId,
|
|
1843
|
+
sessionId: n.sessionId,
|
|
1844
|
+
errorCode: s.code
|
|
1845
|
+
}), H(
|
|
1846
|
+
t,
|
|
1847
|
+
"oversize-reject",
|
|
1848
|
+
n,
|
|
1849
|
+
s.code
|
|
1850
|
+
), T(
|
|
1851
|
+
e.source,
|
|
1852
|
+
e.origin,
|
|
1853
|
+
N(
|
|
1854
|
+
"ERROR",
|
|
1855
|
+
{
|
|
1856
|
+
code: s.code,
|
|
1857
|
+
message: s.message,
|
|
1858
|
+
details: {
|
|
1859
|
+
reason: r.reason,
|
|
1860
|
+
maxBytes: r.maxInboundMessageBytes,
|
|
1861
|
+
actualBytes: o
|
|
1862
|
+
}
|
|
1863
|
+
},
|
|
1864
|
+
i
|
|
1865
|
+
)
|
|
1866
|
+
);
|
|
1867
|
+
}, xe = (e) => {
|
|
1868
|
+
const t = ht(e);
|
|
1869
|
+
return (t == null ? void 0 : t.channel) === Et;
|
|
1870
|
+
}, H = (e, t, r, n) => {
|
|
1871
|
+
Hn(
|
|
1872
|
+
{
|
|
1873
|
+
reasonCode: t,
|
|
1874
|
+
messageType: r.type,
|
|
1875
|
+
requestId: r.requestId,
|
|
1876
|
+
sessionId: r.sessionId,
|
|
1877
|
+
errorCode: n
|
|
1878
|
+
},
|
|
1879
|
+
e.telemetry
|
|
1880
|
+
), fe(
|
|
1881
|
+
{
|
|
1882
|
+
stage: "error",
|
|
1883
|
+
messageType: r.type,
|
|
1884
|
+
requestId: r.requestId,
|
|
1885
|
+
sessionId: r.sessionId,
|
|
1886
|
+
errorCode: n
|
|
1887
|
+
},
|
|
1888
|
+
e.telemetry
|
|
1889
|
+
);
|
|
1890
|
+
}, $o = (e) => {
|
|
1891
|
+
if (e.treeAdapter !== void 0)
|
|
1892
|
+
return e.treeAdapter;
|
|
1893
|
+
if (e.adapterFactory !== void 0)
|
|
1894
|
+
return e.adapterFactory(e.runtimeConfig);
|
|
1895
|
+
if (e.runtimeConfig !== void 0)
|
|
1896
|
+
return Xn(e.runtimeConfig, {
|
|
1897
|
+
telemetry: e.telemetry
|
|
1898
|
+
});
|
|
1899
|
+
}, ko = (e) => ({
|
|
1900
|
+
...e,
|
|
1901
|
+
treeAdapter: $o(e)
|
|
1902
|
+
}), Ko = (e, t, r, n) => {
|
|
1903
|
+
const i = n.includeTree !== !1, o = n.includeHtml !== !1, s = Co(), d = i ? t.treeAdapter === void 0 ? {
|
|
1904
|
+
nodes: [],
|
|
1905
|
+
rootIds: []
|
|
1906
|
+
} : X(t.treeAdapter.getTreeSnapshot()) : {
|
|
1907
|
+
nodes: [],
|
|
1908
|
+
rootIds: []
|
|
1909
|
+
}, a = o ? Do() : void 0;
|
|
1910
|
+
let c = {
|
|
1911
|
+
capture: s.blob,
|
|
1912
|
+
captureMimeType: yt,
|
|
1913
|
+
width: s.width,
|
|
1914
|
+
height: s.height,
|
|
1915
|
+
capturedAt: Date.now(),
|
|
1916
|
+
treeSnapshot: {
|
|
1917
|
+
nodes: d.nodes,
|
|
1918
|
+
rootIds: d.rootIds,
|
|
1919
|
+
...d.meta !== void 0 && {
|
|
1920
|
+
meta: d.meta
|
|
1921
|
+
}
|
|
1922
|
+
},
|
|
1923
|
+
...a !== void 0 && {
|
|
1924
|
+
html: a.html,
|
|
1925
|
+
htmlTruncated: a.htmlTruncated
|
|
1926
|
+
}
|
|
1927
|
+
}, u = N(
|
|
1928
|
+
"SNAPSHOT",
|
|
1929
|
+
c,
|
|
1930
|
+
r
|
|
1931
|
+
);
|
|
1932
|
+
const f = Y(u);
|
|
1933
|
+
c.html !== void 0 && (f === void 0 || f > M) && (c = {
|
|
1934
|
+
...c,
|
|
1935
|
+
html: void 0,
|
|
1936
|
+
htmlTruncated: !0
|
|
1937
|
+
}, u = N(
|
|
1938
|
+
"SNAPSHOT",
|
|
1939
|
+
c,
|
|
1940
|
+
r
|
|
1941
|
+
));
|
|
1942
|
+
const l = Y(u);
|
|
1943
|
+
if (l === void 0 || l > M) {
|
|
1944
|
+
const m = L(
|
|
1945
|
+
"ERR_OVERSIZE_MESSAGE",
|
|
1946
|
+
`Snapshot response exceeded size budget: maxBytes=${M}, actualBytes=${l ?? "unavailable"}.`
|
|
1947
|
+
);
|
|
1948
|
+
T(
|
|
1949
|
+
e.source,
|
|
1950
|
+
e.origin,
|
|
1951
|
+
N(
|
|
1952
|
+
"ERROR",
|
|
1953
|
+
{
|
|
1954
|
+
code: m.code,
|
|
1955
|
+
message: m.message,
|
|
1956
|
+
details: {
|
|
1957
|
+
reason: "snapshot-response-too-large",
|
|
1958
|
+
maxBytes: M,
|
|
1959
|
+
actualBytes: l === void 0 ? "unavailable" : l
|
|
1960
|
+
}
|
|
1961
|
+
},
|
|
1962
|
+
r
|
|
1963
|
+
)
|
|
1964
|
+
);
|
|
1965
|
+
return;
|
|
1966
|
+
}
|
|
1967
|
+
T(e.source, e.origin, u);
|
|
1968
|
+
}, Ho = (e, t, r, n, i) => {
|
|
1969
|
+
var d, a, c, u, f, l, m;
|
|
1970
|
+
const o = bt(e.data, {
|
|
1971
|
+
sourceOrigin: e.origin,
|
|
1972
|
+
trustedOrigins: t.hostOrigins
|
|
1973
|
+
});
|
|
1974
|
+
if (!o.ok) {
|
|
1975
|
+
if (o.error.code === "ERR_INVALID_PAYLOAD") {
|
|
1976
|
+
const p = ye(e.data);
|
|
1977
|
+
H(
|
|
1978
|
+
t,
|
|
1979
|
+
"invalid-payload-reject",
|
|
1980
|
+
p,
|
|
1981
|
+
o.error.code
|
|
1982
|
+
);
|
|
1983
|
+
}
|
|
1984
|
+
return;
|
|
1985
|
+
}
|
|
1986
|
+
if (!Oo(o.message))
|
|
1987
|
+
return;
|
|
1988
|
+
const s = {
|
|
1989
|
+
requestId: o.message.requestId,
|
|
1990
|
+
sessionId: o.message.sessionId
|
|
1991
|
+
};
|
|
1992
|
+
if (o.message.type === "HELLO") {
|
|
1993
|
+
if (((d = t.security) == null ? void 0 : d.enabled) === !0) {
|
|
1994
|
+
const p = (t.security.tokenValidator ?? lo)(o.message.payload.auth);
|
|
1995
|
+
if (!p.ok) {
|
|
1996
|
+
Lo(
|
|
1997
|
+
e,
|
|
1998
|
+
t,
|
|
1999
|
+
p,
|
|
2000
|
+
s.requestId,
|
|
2001
|
+
s.sessionId
|
|
2002
|
+
);
|
|
2003
|
+
return;
|
|
2004
|
+
}
|
|
2005
|
+
}
|
|
2006
|
+
T(
|
|
2007
|
+
e.source,
|
|
2008
|
+
e.origin,
|
|
2009
|
+
N(
|
|
2010
|
+
"READY",
|
|
2011
|
+
{
|
|
2012
|
+
capabilities: t.capabilities
|
|
2013
|
+
},
|
|
2014
|
+
s
|
|
2015
|
+
)
|
|
2016
|
+
), fe(
|
|
2017
|
+
{
|
|
2018
|
+
stage: "ready",
|
|
2019
|
+
messageType: "HELLO",
|
|
2020
|
+
requestId: s.requestId,
|
|
2021
|
+
sessionId: s.sessionId
|
|
2022
|
+
},
|
|
2023
|
+
t.telemetry
|
|
2024
|
+
), (a = i == null ? void 0 : i.onReady) == null || a.call(i, {
|
|
2025
|
+
target: e.source,
|
|
2026
|
+
origin: e.origin,
|
|
2027
|
+
sessionId: s.sessionId
|
|
2028
|
+
});
|
|
2029
|
+
return;
|
|
2030
|
+
}
|
|
2031
|
+
if (o.message.type === "PING") {
|
|
2032
|
+
T(
|
|
2033
|
+
e.source,
|
|
2034
|
+
e.origin,
|
|
2035
|
+
N(
|
|
2036
|
+
"PONG",
|
|
2037
|
+
{
|
|
2038
|
+
sentAt: (c = o.message.payload) == null ? void 0 : c.sentAt
|
|
2039
|
+
},
|
|
2040
|
+
s
|
|
2041
|
+
)
|
|
2042
|
+
);
|
|
2043
|
+
return;
|
|
2044
|
+
}
|
|
2045
|
+
if (o.message.type === "REQUEST_TREE") {
|
|
2046
|
+
if (t.treeAdapter === void 0)
|
|
2047
|
+
return;
|
|
2048
|
+
const p = X(t.treeAdapter.getTreeSnapshot());
|
|
2049
|
+
T(
|
|
2050
|
+
e.source,
|
|
2051
|
+
e.origin,
|
|
2052
|
+
N(
|
|
2053
|
+
"TREE_SNAPSHOT",
|
|
2054
|
+
{
|
|
2055
|
+
nodes: p.nodes,
|
|
2056
|
+
rootIds: p.rootIds,
|
|
2057
|
+
...p.meta !== void 0 && {
|
|
2058
|
+
meta: p.meta
|
|
2059
|
+
}
|
|
2060
|
+
},
|
|
2061
|
+
s
|
|
2062
|
+
)
|
|
2063
|
+
);
|
|
2064
|
+
return;
|
|
2065
|
+
}
|
|
2066
|
+
if (o.message.type === "REQUEST_NODE_PROPS") {
|
|
2067
|
+
const p = o.message.payload.nodeId;
|
|
2068
|
+
if (t.treeAdapter === void 0) {
|
|
2069
|
+
O(
|
|
2070
|
+
e,
|
|
2071
|
+
p,
|
|
2072
|
+
s.requestId,
|
|
2073
|
+
s.sessionId
|
|
2074
|
+
);
|
|
2075
|
+
return;
|
|
2076
|
+
}
|
|
2077
|
+
const R = t.treeAdapter.getNodeProps(p);
|
|
2078
|
+
if (R === void 0) {
|
|
2079
|
+
O(
|
|
2080
|
+
e,
|
|
2081
|
+
p,
|
|
2082
|
+
s.requestId,
|
|
2083
|
+
s.sessionId
|
|
2084
|
+
);
|
|
2085
|
+
return;
|
|
2086
|
+
}
|
|
2087
|
+
const y = _o(R);
|
|
2088
|
+
T(
|
|
2089
|
+
e.source,
|
|
2090
|
+
e.origin,
|
|
2091
|
+
N(
|
|
2092
|
+
"NODE_PROPS",
|
|
2093
|
+
{
|
|
2094
|
+
nodeId: p,
|
|
2095
|
+
props: y.props,
|
|
2096
|
+
meta: y.meta
|
|
2097
|
+
},
|
|
2098
|
+
s
|
|
2099
|
+
)
|
|
2100
|
+
);
|
|
2101
|
+
return;
|
|
2102
|
+
}
|
|
2103
|
+
if (o.message.type === "REQUEST_SNAPSHOT") {
|
|
2104
|
+
Ko(
|
|
2105
|
+
e,
|
|
2106
|
+
t,
|
|
2107
|
+
s,
|
|
2108
|
+
o.message.payload ?? {}
|
|
2109
|
+
);
|
|
2110
|
+
return;
|
|
2111
|
+
}
|
|
2112
|
+
if (o.message.type === "HIGHLIGHT_NODE") {
|
|
2113
|
+
const p = o.message.payload.nodeId;
|
|
2114
|
+
if (t.treeAdapter === void 0) {
|
|
2115
|
+
n(), O(
|
|
2116
|
+
e,
|
|
2117
|
+
p,
|
|
2118
|
+
s.requestId,
|
|
2119
|
+
s.sessionId
|
|
2120
|
+
);
|
|
2121
|
+
return;
|
|
2122
|
+
}
|
|
2123
|
+
const R = t.treeAdapter.getDomElement(p);
|
|
2124
|
+
if (R === null) {
|
|
2125
|
+
n(), O(
|
|
2126
|
+
e,
|
|
2127
|
+
p,
|
|
2128
|
+
s.requestId,
|
|
2129
|
+
s.sessionId
|
|
2130
|
+
);
|
|
2131
|
+
return;
|
|
2132
|
+
}
|
|
2133
|
+
r(R), (f = (u = t.handlers) == null ? void 0 : u.onHighlightNode) == null || f.call(u, o.message);
|
|
2134
|
+
return;
|
|
2135
|
+
}
|
|
2136
|
+
o.message.type === "CLEAR_HIGHLIGHT" && (n(), (m = (l = t.handlers) == null ? void 0 : l.onClearHighlight) == null || m.call(l, o.message));
|
|
2137
|
+
}, jo = (e) => e.killSwitchActive === !0 || !e.enabled || e.mode === "production" ? !1 : e.hostOrigins.length > 0, Xo = (e) => {
|
|
2138
|
+
if (b !== void 0 && b.destroy(), !jo(e))
|
|
2139
|
+
return e.killSwitchActive === !0 && console.warn(
|
|
2140
|
+
"[react-inspector-bridge] Embedded inspector bridge disabled by kill switch."
|
|
2141
|
+
), b = {
|
|
2142
|
+
destroy: () => {
|
|
2143
|
+
b = void 0;
|
|
2144
|
+
}
|
|
2145
|
+
}, b;
|
|
2146
|
+
const t = ko(e), r = Zn(), n = {
|
|
2147
|
+
getReactComponentPathForElement: (h) => {
|
|
2148
|
+
var I, E;
|
|
2149
|
+
return (E = (I = t.treeAdapter) == null ? void 0 : I.getReactComponentPathForElement) == null ? void 0 : E.call(
|
|
2150
|
+
I,
|
|
2151
|
+
h
|
|
2152
|
+
);
|
|
2153
|
+
}
|
|
2154
|
+
};
|
|
2155
|
+
let i, o, s;
|
|
2156
|
+
const d = () => {
|
|
2157
|
+
if (i === void 0)
|
|
2158
|
+
return;
|
|
2159
|
+
const I = `${window.location.pathname.length > 0 ? window.location.pathname : "/"}${window.location.search}${window.location.hash}`;
|
|
2160
|
+
pt(i.target, i.origin, {
|
|
2161
|
+
channel: Ao,
|
|
2162
|
+
type: wo,
|
|
2163
|
+
path: I
|
|
2164
|
+
});
|
|
2165
|
+
}, a = () => {
|
|
2166
|
+
o !== void 0 && (clearTimeout(o), o = void 0);
|
|
2167
|
+
}, c = () => {
|
|
2168
|
+
s !== void 0 && (clearTimeout(s), s = void 0);
|
|
2169
|
+
}, u = () => {
|
|
2170
|
+
if (t.treeAdapter === void 0 || i === void 0)
|
|
2171
|
+
return;
|
|
2172
|
+
const h = X(
|
|
2173
|
+
t.treeAdapter.getTreeSnapshot()
|
|
2174
|
+
);
|
|
2175
|
+
T(
|
|
2176
|
+
i.target,
|
|
2177
|
+
i.origin,
|
|
2178
|
+
N(
|
|
2179
|
+
"TREE_SNAPSHOT",
|
|
2180
|
+
{
|
|
2181
|
+
nodes: h.nodes,
|
|
2182
|
+
rootIds: h.rootIds,
|
|
2183
|
+
...h.meta !== void 0 && {
|
|
2184
|
+
meta: h.meta
|
|
2185
|
+
}
|
|
2186
|
+
},
|
|
2187
|
+
{
|
|
2188
|
+
sessionId: i.sessionId
|
|
2189
|
+
}
|
|
2190
|
+
)
|
|
2191
|
+
);
|
|
2192
|
+
}, f = () => {
|
|
2193
|
+
t.treeAdapter === void 0 || i === void 0 || (a(), c(), o = setTimeout(() => {
|
|
2194
|
+
o = void 0, u();
|
|
2195
|
+
}, Po), s = setTimeout(() => {
|
|
2196
|
+
s = void 0, u();
|
|
2197
|
+
}, Fo));
|
|
2198
|
+
}, l = () => {
|
|
2199
|
+
d(), f();
|
|
2200
|
+
}, m = window.history.pushState.bind(window.history), p = window.history.replaceState.bind(window.history), R = (...h) => {
|
|
2201
|
+
m(...h), l();
|
|
2202
|
+
}, y = (...h) => {
|
|
2203
|
+
p(...h), l();
|
|
2204
|
+
};
|
|
2205
|
+
window.history.pushState = R, window.history.replaceState = y, window.addEventListener("popstate", l), window.addEventListener("hashchange", l), window.__ARA_EMBEDDED_REACT_INSPECTOR_SELECTION__ = n;
|
|
2206
|
+
const A = (h) => {
|
|
2207
|
+
if (!It(h.origin, t.hostOrigins)) {
|
|
2208
|
+
if (xe(h.data)) {
|
|
2209
|
+
const E = ye(h.data);
|
|
2210
|
+
H(
|
|
2211
|
+
t,
|
|
2212
|
+
"origin-reject",
|
|
2213
|
+
E,
|
|
2214
|
+
"ERR_INVALID_ORIGIN"
|
|
2215
|
+
);
|
|
2216
|
+
}
|
|
2217
|
+
return;
|
|
2218
|
+
}
|
|
2219
|
+
if (!xe(h.data))
|
|
2220
|
+
return;
|
|
2221
|
+
const I = ao(
|
|
2222
|
+
h.data
|
|
2223
|
+
);
|
|
2224
|
+
if (!I.ok) {
|
|
2225
|
+
xo(
|
|
2226
|
+
h,
|
|
2227
|
+
t,
|
|
2228
|
+
I
|
|
2229
|
+
);
|
|
2230
|
+
return;
|
|
2231
|
+
}
|
|
2232
|
+
Ho(
|
|
2233
|
+
h,
|
|
2234
|
+
t,
|
|
2235
|
+
r.highlightElement,
|
|
2236
|
+
r.clearHighlight,
|
|
2237
|
+
{
|
|
2238
|
+
onReady: (E) => {
|
|
2239
|
+
i = E, d();
|
|
2240
|
+
}
|
|
2241
|
+
}
|
|
2242
|
+
);
|
|
2243
|
+
};
|
|
2244
|
+
return window.addEventListener("message", A), fe(
|
|
2245
|
+
{
|
|
2246
|
+
stage: "connect"
|
|
2247
|
+
},
|
|
2248
|
+
t.telemetry
|
|
2249
|
+
), b = {
|
|
2250
|
+
destroy: () => {
|
|
2251
|
+
window.removeEventListener("message", A), window.removeEventListener("popstate", l), window.removeEventListener("hashchange", l), window.history.pushState = m, window.history.replaceState = p, a(), c(), i = void 0, r.destroy(), window.__ARA_EMBEDDED_REACT_INSPECTOR_SELECTION__ === n && delete window.__ARA_EMBEDDED_REACT_INSPECTOR_SELECTION__, b !== void 0 && (b = void 0);
|
|
2252
|
+
}
|
|
2253
|
+
}, b;
|
|
2254
|
+
}, Wo = () => {
|
|
2255
|
+
b !== void 0 && b.destroy();
|
|
2256
|
+
};
|
|
2257
|
+
export {
|
|
2258
|
+
nt as E,
|
|
2259
|
+
tt as a,
|
|
2260
|
+
rt as b,
|
|
2261
|
+
ue as c,
|
|
2262
|
+
Xn as d,
|
|
2263
|
+
C as e,
|
|
2264
|
+
_t as f,
|
|
2265
|
+
Wo as g,
|
|
2266
|
+
Yo as h,
|
|
2267
|
+
Xo as i,
|
|
2268
|
+
qo as j,
|
|
2269
|
+
Go as k,
|
|
2270
|
+
Vo as l,
|
|
2271
|
+
Uo as m,
|
|
2272
|
+
jn as n,
|
|
2273
|
+
fe as o,
|
|
2274
|
+
Hn as p,
|
|
2275
|
+
wt as r,
|
|
2276
|
+
lo as v
|
|
2277
|
+
};
|
|
2278
|
+
//# sourceMappingURL=bridgeRuntime-Da4khSK2.js.map
|