@motiadev/plugin-logs 0.9.4-beta.151-154330 → 0.9.4-beta.151-307192

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -1,49 +1,58 @@
1
- import { Stream as pt } from "@motiadev/stream-client-browser";
2
- import * as k from "react";
3
- import K, { forwardRef as rt, createElement as ue, useState as H, useCallback as re, useEffect as we, createContext as gt, useContext as J, isValidElement as mt, useRef as xe, useMemo as se } from "react";
4
- import { Sidebar as vt, LevelDot as nt, Input as ht, Button as jt, Table as bt, TableBody as yt, TableRow as wt, cn as xt, TableCell as ne } from "@motiadev/ui";
5
- const Oe = (e) => {
1
+ import { Stream as gt } from "@motiadev/stream-client-browser";
2
+ import * as _ from "react";
3
+ import K, { forwardRef as rt, createElement as fe, useState as F, useCallback as ne, useEffect as xe, createContext as mt, useContext as J, isValidElement as vt, useRef as Ce, useMemo as se } from "react";
4
+ import { Sidebar as ht, LevelDot as at, Input as jt, Button as bt, Table as yt, TableBody as wt, TableRow as xt, cn as Ct, TableCell as re } from "@motiadev/ui";
5
+ const Re = (e) => {
6
6
  let t;
7
- const r = /* @__PURE__ */ new Set(), n = (d, p) => {
8
- const v = typeof d == "function" ? d(t) : d;
9
- if (!Object.is(v, t)) {
7
+ const n = /* @__PURE__ */ new Set(), r = (d, g) => {
8
+ const m = typeof d == "function" ? d(t) : d;
9
+ if (!Object.is(m, t)) {
10
10
  const y = t;
11
- t = p ?? (typeof v != "object" || v === null) ? v : Object.assign({}, t, v), r.forEach((w) => w(t, y));
11
+ t = g ?? (typeof m != "object" || m === null) ? m : Object.assign({}, t, m), n.forEach((E) => E(t, y));
12
12
  }
13
- }, l = () => t, c = { setState: n, getState: l, getInitialState: () => u, subscribe: (d) => (r.add(d), () => r.delete(d)) }, u = t = e(n, l, c);
13
+ }, l = () => t, c = { setState: r, getState: l, getInitialState: () => u, subscribe: (d) => (n.add(d), () => n.delete(d)) }, u = t = e(r, l, c);
14
14
  return c;
15
- }, Ct = ((e) => e ? Oe(e) : Oe), Et = (e) => e;
16
- function At(e, t = Et) {
17
- const r = K.useSyncExternalStore(
15
+ }, Et = (e) => e ? Re(e) : Re, At = (e) => e;
16
+ function St(e, t = At) {
17
+ const n = K.useSyncExternalStore(
18
18
  e.subscribe,
19
19
  K.useCallback(() => t(e.getState()), [e, t]),
20
20
  K.useCallback(() => t(e.getInitialState()), [e, t])
21
21
  );
22
- return K.useDebugValue(r), r;
22
+ return K.useDebugValue(n), n;
23
23
  }
24
- const St = (e) => {
25
- const t = Ct(e), r = (n) => At(t, n);
26
- return Object.assign(r, t), r;
27
- }, _t = ((e) => St), ee = _t()((e) => ({
24
+ const kt = (e) => {
25
+ const t = Et(e), n = (r) => St(t, r);
26
+ return Object.assign(n, t), n;
27
+ }, _t = (e) => kt, ee = _t()((e) => ({
28
28
  logs: [],
29
29
  selectedLogId: void 0,
30
- addLog: (t) => e((r) => ({
31
- logs: [t, ...r.logs]
30
+ addLog: (t) => e((n) => ({
31
+ logs: [t, ...n.logs]
32
32
  })),
33
33
  resetLogs: () => {
34
34
  e({ logs: [] });
35
35
  },
36
36
  selectLogId: (t) => e({ selectedLogId: t })
37
- })), kt = "__motia.logs", Tt = "default", Nt = "log", Ot = () => {
38
- new pt(window.location.origin.replace("http", "ws")).subscribeGroup(kt, Tt).onEvent(Nt, ee.getState().addLog);
37
+ })), Tt = "__motia.logs", Nt = "default", Ot = "log", Rt = () => {
38
+ new gt(window.location.origin.replace("http", "ws")).subscribeGroup(Tt, Nt).onEvent(Ot, ee.getState().addLog);
39
39
  };
40
40
  var ae = { exports: {} }, X = {};
41
- var Re;
42
- function Rt() {
43
- if (Re) return X;
44
- Re = 1;
41
+ /**
42
+ * @license React
43
+ * react-jsx-runtime.production.js
44
+ *
45
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
46
+ *
47
+ * This source code is licensed under the MIT license found in the
48
+ * LICENSE file in the root directory of this source tree.
49
+ */
50
+ var Le;
51
+ function Lt() {
52
+ if (Le) return X;
53
+ Le = 1;
45
54
  var e = Symbol.for("react.transitional.element"), t = Symbol.for("react.fragment");
46
- function r(n, l, i) {
55
+ function n(r, l, i) {
47
56
  var o = null;
48
57
  if (i !== void 0 && (o = "" + i), l.key !== void 0 && (o = "" + l.key), "key" in l) {
49
58
  i = {};
@@ -52,56 +61,65 @@ function Rt() {
52
61
  } else i = l;
53
62
  return l = i.ref, {
54
63
  $$typeof: e,
55
- type: n,
64
+ type: r,
56
65
  key: o,
57
66
  ref: l !== void 0 ? l : null,
58
67
  props: i
59
68
  };
60
69
  }
61
- return X.Fragment = t, X.jsx = r, X.jsxs = r, X;
70
+ return X.Fragment = t, X.jsx = n, X.jsxs = n, X;
62
71
  }
63
72
  var Q = {};
64
- var Le;
65
- function Lt() {
66
- return Le || (Le = 1, process.env.NODE_ENV !== "production" && (function() {
73
+ /**
74
+ * @license React
75
+ * react-jsx-runtime.development.js
76
+ *
77
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
78
+ *
79
+ * This source code is licensed under the MIT license found in the
80
+ * LICENSE file in the root directory of this source tree.
81
+ */
82
+ var De;
83
+ function Dt() {
84
+ return De || (De = 1, process.env.NODE_ENV !== "production" && function() {
67
85
  function e(s) {
68
86
  if (s == null) return null;
69
87
  if (typeof s == "function")
70
- return s.$$typeof === P ? null : s.displayName || s.name || null;
88
+ return s.$$typeof === Y ? null : s.displayName || s.name || null;
71
89
  if (typeof s == "string") return s;
72
90
  switch (s) {
73
- case N:
91
+ case C:
74
92
  return "Fragment";
75
- case D:
93
+ case A:
76
94
  return "Profiler";
77
- case E:
95
+ case N:
78
96
  return "StrictMode";
79
- case A:
97
+ case h:
80
98
  return "Suspense";
81
- case x:
99
+ case S:
82
100
  return "SuspenseList";
83
- case V:
101
+ case O:
84
102
  return "Activity";
85
103
  }
86
104
  if (typeof s == "object")
87
105
  switch (typeof s.tag == "number" && console.error(
88
106
  "Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."
89
107
  ), s.$$typeof) {
90
- case C:
108
+ case w:
91
109
  return "Portal";
92
- case h:
93
- return s.displayName || "Context";
94
- case I:
110
+ case P:
111
+ return (s.displayName || "Context") + ".Provider";
112
+ case D:
95
113
  return (s._context.displayName || "Context") + ".Consumer";
96
- case j:
97
- var g = s.render;
98
- return s = s.displayName, s || (s = g.displayName || g.name || "", s = s !== "" ? "ForwardRef(" + s + ")" : "ForwardRef"), s;
99
- case Z:
100
- return g = s.displayName || null, g !== null ? g : e(s.type) || "Memo";
101
- case O:
102
- g = s._payload, s = s._init;
114
+ case v:
115
+ var p = s.render;
116
+ return s = s.displayName, s || (s = p.displayName || p.name || "", s = s !== "" ? "ForwardRef(" + s + ")" : "ForwardRef"), s;
117
+ case x:
118
+ return p = s.displayName || null, p !== null ? p : e(s.type) || "Memo";
119
+ case H:
120
+ p = s._payload, s = s._init;
103
121
  try {
104
- return e(s(g));
122
+ return e(s(p));
105
123
  } catch {
106
124
  }
107
125
  }
@@ -110,75 +128,74 @@ function Lt() {
110
128
  function t(s) {
111
129
  return "" + s;
112
130
  }
113
- function r(s) {
131
+ function n(s) {
114
132
  try {
115
133
  t(s);
116
- var g = !1;
134
+ var p = !1;
117
135
  } catch {
118
- g = !0;
136
+ p = !0;
119
137
  }
120
- if (g) {
121
- g = console;
122
- var f = g.error, m = typeof Symbol == "function" && Symbol.toStringTag && s[Symbol.toStringTag] || s.constructor.name || "Object";
123
- return f.call(
124
- g,
138
+ if (p) {
139
+ p = console;
140
+ var b = p.error, f = typeof Symbol == "function" && Symbol.toStringTag && s[Symbol.toStringTag] || s.constructor.name || "Object";
141
+ return b.call(
142
+ p,
125
143
  "The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",
126
- m
144
+ f
127
145
  ), t(s);
128
146
  }
129
147
  }
130
- function n(s) {
131
- if (s === N) return "<>";
132
- if (typeof s == "object" && s !== null && s.$$typeof === O)
148
+ function r(s) {
149
+ if (s === C) return "<>";
150
+ if (typeof s == "object" && s !== null && s.$$typeof === H)
133
151
  return "<...>";
134
152
  try {
135
- var g = e(s);
136
- return g ? "<" + g + ">" : "<...>";
153
+ var p = e(s);
154
+ return p ? "<" + p + ">" : "<...>";
137
155
  } catch {
138
156
  return "<...>";
139
157
  }
140
158
  }
141
159
  function l() {
142
- var s = L.A;
160
+ var s = R.A;
143
161
  return s === null ? null : s.getOwner();
144
162
  }
145
163
  function i() {
146
164
  return Error("react-stack-top-frame");
147
165
  }
148
166
  function o(s) {
149
- if ($.call(s, "key")) {
150
- var g = Object.getOwnPropertyDescriptor(s, "key").get;
151
- if (g && g.isReactWarning) return !1;
167
+ if (L.call(s, "key")) {
168
+ var p = Object.getOwnPropertyDescriptor(s, "key").get;
169
+ if (p && p.isReactWarning) return !1;
152
170
  }
153
171
  return s.key !== void 0;
154
172
  }
155
- function c(s, g) {
156
- function f() {
157
- M || (M = !0, console.error(
173
+ function c(s, p) {
174
+ function b() {
175
+ T || (T = !0, console.error(
158
176
  "%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",
159
- g
177
+ p
160
178
  ));
161
179
  }
162
- f.isReactWarning = !0, Object.defineProperty(s, "key", {
163
- get: f,
180
+ b.isReactWarning = !0, Object.defineProperty(s, "key", {
181
+ get: b,
164
182
  configurable: !0
165
183
  });
166
184
  }
167
185
  function u() {
168
186
  var s = e(this.type);
169
- return _[s] || (_[s] = !0, console.error(
187
+ return $[s] || ($[s] = !0, console.error(
170
188
  "Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release."
171
189
  )), s = this.props.ref, s !== void 0 ? s : null;
172
190
  }
173
- function d(s, g, f, m, Y, le) {
174
- var R = f.ref;
175
- return s = {
176
- $$typeof: b,
191
+ function d(s, p, b, f, j, z, le, ce) {
192
+ return b = z.ref, s = {
193
+ $$typeof: E,
177
194
  type: s,
178
- key: g,
179
- props: f,
180
- _owner: m
181
- }, (R !== void 0 ? R : null) !== null ? Object.defineProperty(s, "ref", {
195
+ key: p,
196
+ props: z,
197
+ _owner: j
198
+ }, (b !== void 0 ? b : null) !== null ? Object.defineProperty(s, "ref", {
182
199
  enumerable: !1,
183
200
  get: u
184
201
  }) : Object.defineProperty(s, "ref", { enumerable: !1, value: null }), s._store = {}, Object.defineProperty(s._store, "validated", {
@@ -195,120 +212,135 @@ function Lt() {
195
212
  configurable: !1,
196
213
  enumerable: !1,
197
214
  writable: !0,
198
- value: Y
215
+ value: le
199
216
  }), Object.defineProperty(s, "_debugTask", {
200
217
  configurable: !1,
201
218
  enumerable: !1,
202
219
  writable: !0,
203
- value: le
220
+ value: ce
204
221
  }), Object.freeze && (Object.freeze(s.props), Object.freeze(s)), s;
205
222
  }
206
- function p(s, g, f, m, Y, le) {
207
- var R = g.children;
208
- if (R !== void 0)
209
- if (m)
210
- if (z(R)) {
211
- for (m = 0; m < R.length; m++)
212
- v(R[m]);
213
- Object.freeze && Object.freeze(R);
223
+ function g(s, p, b, f, j, z, le, ce) {
224
+ var I = p.children;
225
+ if (I !== void 0)
226
+ if (f)
227
+ if (U(I)) {
228
+ for (f = 0; f < I.length; f++)
229
+ m(I[f]);
230
+ Object.freeze && Object.freeze(I);
214
231
  } else
215
232
  console.error(
216
233
  "React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead."
217
234
  );
218
- else v(R);
219
- if ($.call(g, "key")) {
220
- R = e(s);
221
- var q = Object.keys(g).filter(function(dt) {
222
- return dt !== "key";
235
+ else m(I);
236
+ if (L.call(p, "key")) {
237
+ I = e(s);
238
+ var q = Object.keys(p).filter(function(pt) {
239
+ return pt !== "key";
223
240
  });
224
- m = 0 < q.length ? "{key: someKey, " + q.join(": ..., ") + ": ...}" : "{key: someKey}", S[R + m] || (q = 0 < q.length ? "{" + q.join(": ..., ") + ": ...}" : "{}", console.error(
241
+ f = 0 < q.length ? "{key: someKey, " + q.join(": ..., ") + ": ...}" : "{key: someKey}", M[I + f] || (q = 0 < q.length ? "{" + q.join(": ..., ") + ": ...}" : "{}", console.error(
225
242
  `A props object containing a "key" prop is being spread into JSX:
226
243
  let props = %s;
227
244
  <%s {...props} />
228
245
  React keys must be passed directly to JSX without using spread:
229
246
  let props = %s;
230
247
  <%s key={someKey} {...props} />`,
231
- m,
232
- R,
248
+ f,
249
+ I,
233
250
  q,
234
- R
235
- ), S[R + m] = !0);
251
+ I
252
+ ), M[I + f] = !0);
236
253
  }
237
- if (R = null, f !== void 0 && (r(f), R = "" + f), o(g) && (r(g.key), R = "" + g.key), "key" in g) {
238
- f = {};
239
- for (var ce in g)
240
- ce !== "key" && (f[ce] = g[ce]);
241
- } else f = g;
242
- return R && c(
243
- f,
254
+ if (I = null, b !== void 0 && (n(b), I = "" + b), o(p) && (n(p.key), I = "" + p.key), "key" in p) {
255
+ b = {};
256
+ for (var ue in p)
257
+ ue !== "key" && (b[ue] = p[ue]);
258
+ } else b = p;
259
+ return I && c(
260
+ b,
244
261
  typeof s == "function" ? s.displayName || s.name || "Unknown" : s
245
262
  ), d(
246
263
  s,
247
- R,
248
- f,
264
+ I,
265
+ z,
266
+ j,
249
267
  l(),
250
- Y,
251
- le
268
+ b,
269
+ le,
270
+ ce
252
271
  );
253
272
  }
254
- function v(s) {
255
- y(s) ? s._store && (s._store.validated = 1) : typeof s == "object" && s !== null && s.$$typeof === O && (s._payload.status === "fulfilled" ? y(s._payload.value) && s._payload.value._store && (s._payload.value._store.validated = 1) : s._store && (s._store.validated = 1));
256
- }
257
- function y(s) {
258
- return typeof s == "object" && s !== null && s.$$typeof === b;
273
+ function m(s) {
274
+ typeof s == "object" && s !== null && s.$$typeof === E && s._store && (s._store.validated = 1);
259
275
  }
260
- var w = K, b = Symbol.for("react.transitional.element"), C = Symbol.for("react.portal"), N = Symbol.for("react.fragment"), E = Symbol.for("react.strict_mode"), D = Symbol.for("react.profiler"), I = Symbol.for("react.consumer"), h = Symbol.for("react.context"), j = Symbol.for("react.forward_ref"), A = Symbol.for("react.suspense"), x = Symbol.for("react.suspense_list"), Z = Symbol.for("react.memo"), O = Symbol.for("react.lazy"), V = Symbol.for("react.activity"), P = Symbol.for("react.client.reference"), L = w.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, $ = Object.prototype.hasOwnProperty, z = Array.isArray, T = console.createTask ? console.createTask : function() {
276
+ var y = K, E = Symbol.for("react.transitional.element"), w = Symbol.for("react.portal"), C = Symbol.for("react.fragment"), N = Symbol.for("react.strict_mode"), A = Symbol.for("react.profiler"), D = Symbol.for("react.consumer"), P = Symbol.for("react.context"), v = Symbol.for("react.forward_ref"), h = Symbol.for("react.suspense"), S = Symbol.for("react.suspense_list"), x = Symbol.for("react.memo"), H = Symbol.for("react.lazy"), O = Symbol.for("react.activity"), Y = Symbol.for("react.client.reference"), R = y.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, L = Object.prototype.hasOwnProperty, U = Array.isArray, Z = console.createTask ? console.createTask : function() {
261
277
  return null;
262
278
  };
263
- w = {
279
+ y = {
264
280
  react_stack_bottom_frame: function(s) {
265
281
  return s();
266
282
  }
267
283
  };
268
- var M, _ = {}, U = w.react_stack_bottom_frame.bind(
269
- w,
284
+ var T, $ = {}, k = y.react_stack_bottom_frame.bind(
285
+ y,
270
286
  i
271
- )(), F = T(n(i)), S = {};
272
- Q.Fragment = N, Q.jsx = function(s, g, f) {
273
- var m = 1e4 > L.recentlyCreatedOwnerStacks++;
274
- return p(
287
+ )(), V = Z(r(i)), M = {};
288
+ Q.Fragment = C, Q.jsx = function(s, p, b, f, j) {
289
+ var z = 1e4 > R.recentlyCreatedOwnerStacks++;
290
+ return g(
275
291
  s,
276
- g,
277
- f,
292
+ p,
293
+ b,
278
294
  !1,
279
- m ? Error("react-stack-top-frame") : U,
280
- m ? T(n(s)) : F
295
+ f,
296
+ j,
297
+ z ? Error("react-stack-top-frame") : k,
298
+ z ? Z(r(s)) : V
281
299
  );
282
- }, Q.jsxs = function(s, g, f) {
283
- var m = 1e4 > L.recentlyCreatedOwnerStacks++;
284
- return p(
300
+ }, Q.jsxs = function(s, p, b, f, j) {
301
+ var z = 1e4 > R.recentlyCreatedOwnerStacks++;
302
+ return g(
285
303
  s,
286
- g,
287
- f,
304
+ p,
305
+ b,
288
306
  !0,
289
- m ? Error("react-stack-top-frame") : U,
290
- m ? T(n(s)) : F
307
+ f,
308
+ j,
309
+ z ? Error("react-stack-top-frame") : k,
310
+ z ? Z(r(s)) : V
291
311
  );
292
312
  };
293
- })()), Q;
313
+ }()), Q;
294
314
  }
295
- var De;
296
- function Dt() {
297
- return De || (De = 1, process.env.NODE_ENV === "production" ? ae.exports = Rt() : ae.exports = Lt()), ae.exports;
315
+ var Ie;
316
+ function It() {
317
+ return Ie || (Ie = 1, process.env.NODE_ENV === "production" ? ae.exports = Lt() : ae.exports = Dt()), ae.exports;
298
318
  }
299
- var a = Dt();
300
- const It = (e) => e.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase(), Pt = (e) => e.replace(
319
+ var a = It();
320
+ /**
321
+ * @license lucide-react v0.545.0 - ISC
322
+ *
323
+ * This source code is licensed under the ISC license.
324
+ * See the LICENSE file in the root directory of this source tree.
325
+ */
326
+ const Pt = (e) => e.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase(), $t = (e) => e.replace(
301
327
  /^([A-Z])|[\s-_]+(\w)/g,
302
- (t, r, n) => n ? n.toUpperCase() : r.toLowerCase()
303
- ), Ie = (e) => {
304
- const t = Pt(e);
328
+ (t, n, r) => r ? r.toUpperCase() : n.toLowerCase()
329
+ ), Pe = (e) => {
330
+ const t = $t(e);
305
331
  return t.charAt(0).toUpperCase() + t.slice(1);
306
- }, at = (...e) => e.filter((t, r, n) => !!t && t.trim() !== "" && n.indexOf(t) === r).join(" ").trim(), $t = (e) => {
332
+ }, st = (...e) => e.filter((t, n, r) => !!t && t.trim() !== "" && r.indexOf(t) === n).join(" ").trim(), Mt = (e) => {
307
333
  for (const t in e)
308
334
  if (t.startsWith("aria-") || t === "role" || t === "title")
309
335
  return !0;
310
336
  };
311
- var Mt = {
337
+ /**
338
+ * @license lucide-react v0.545.0 - ISC
339
+ *
340
+ * This source code is licensed under the ISC license.
341
+ * See the LICENSE file in the root directory of this source tree.
342
+ */
343
+ var Ft = {
312
344
  xmlns: "http://www.w3.org/2000/svg",
313
345
  width: 24,
314
346
  height: 24,
@@ -319,100 +351,130 @@ var Mt = {
319
351
  strokeLinecap: "round",
320
352
  strokeLinejoin: "round"
321
353
  };
322
- const Ft = rt(
354
+ /**
355
+ * @license lucide-react v0.545.0 - ISC
356
+ *
357
+ * This source code is licensed under the ISC license.
358
+ * See the LICENSE file in the root directory of this source tree.
359
+ */
360
+ const Ht = rt(
323
361
  ({
324
362
  color: e = "currentColor",
325
363
  size: t = 24,
326
- strokeWidth: r = 2,
327
- absoluteStrokeWidth: n,
364
+ strokeWidth: n = 2,
365
+ absoluteStrokeWidth: r,
328
366
  className: l = "",
329
367
  children: i,
330
368
  iconNode: o,
331
369
  ...c
332
- }, u) => ue(
370
+ }, u) => fe(
333
371
  "svg",
334
372
  {
335
373
  ref: u,
336
- ...Mt,
374
+ ...Ft,
337
375
  width: t,
338
376
  height: t,
339
377
  stroke: e,
340
- strokeWidth: n ? Number(r) * 24 / Number(t) : r,
341
- className: at("lucide", l),
342
- ...!i && !$t(c) && { "aria-hidden": "true" },
378
+ strokeWidth: r ? Number(n) * 24 / Number(t) : n,
379
+ className: st("lucide", l),
380
+ ...!i && !Mt(c) && { "aria-hidden": "true" },
343
381
  ...c
344
382
  },
345
383
  [
346
- ...o.map(([d, p]) => ue(d, p)),
384
+ ...o.map(([d, g]) => fe(d, g)),
347
385
  ...Array.isArray(i) ? i : [i]
348
386
  ]
349
387
  )
350
388
  );
351
- const Ce = (e, t) => {
352
- const r = rt(
353
- ({ className: n, ...l }, i) => ue(Ft, {
389
+ /**
390
+ * @license lucide-react v0.545.0 - ISC
391
+ *
392
+ * This source code is licensed under the ISC license.
393
+ * See the LICENSE file in the root directory of this source tree.
394
+ */
395
+ const Ee = (e, t) => {
396
+ const n = rt(
397
+ ({ className: r, ...l }, i) => fe(Ht, {
354
398
  ref: i,
355
399
  iconNode: t,
356
- className: at(
357
- `lucide-${It(Ie(e))}`,
400
+ className: st(
401
+ `lucide-${Pt(Pe(e))}`,
358
402
  `lucide-${e}`,
359
- n
403
+ r
360
404
  ),
361
405
  ...l
362
406
  })
363
407
  );
364
- return r.displayName = Ie(e), r;
408
+ return n.displayName = Pe(e), n;
365
409
  };
366
- const Ht = [
410
+ /**
411
+ * @license lucide-react v0.545.0 - ISC
412
+ *
413
+ * This source code is licensed under the ISC license.
414
+ * See the LICENSE file in the root directory of this source tree.
415
+ */
416
+ const Ut = [
367
417
  ["path", { d: "m21 21-4.34-4.34", key: "14j7rj" }],
368
418
  ["circle", { cx: "11", cy: "11", r: "8", key: "4ej97u" }]
369
- ], Ut = Ce("search", Ht);
370
- const Zt = [
419
+ ], Zt = Ee("search", Ut);
420
+ /**
421
+ * @license lucide-react v0.545.0 - ISC
422
+ *
423
+ * This source code is licensed under the ISC license.
424
+ * See the LICENSE file in the root directory of this source tree.
425
+ */
426
+ const Vt = [
371
427
  ["path", { d: "M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6", key: "miytrc" }],
372
428
  ["path", { d: "M3 6h18", key: "d0wm0j" }],
373
429
  ["path", { d: "M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2", key: "e791ji" }]
374
- ], Vt = Ce("trash", Zt);
375
- const zt = [
430
+ ], zt = Ee("trash", Vt);
431
+ /**
432
+ * @license lucide-react v0.545.0 - ISC
433
+ *
434
+ * This source code is licensed under the ISC license.
435
+ * See the LICENSE file in the root directory of this source tree.
436
+ */
437
+ const Yt = [
376
438
  ["path", { d: "M18 6 6 18", key: "1bl5f8" }],
377
439
  ["path", { d: "m6 6 12 12", key: "d8bk6v" }]
378
- ], st = Ce("x", zt), ot = (e) => {
440
+ ], ot = Ee("x", Yt), it = (e) => {
379
441
  const t = new Date(Number(e));
380
442
  return `${t.toLocaleDateString("en-US", { year: void 0, month: "short", day: "2-digit" })}, ${t.toLocaleTimeString("en-US", { hour: "2-digit", minute: "2-digit", second: "2-digit", hourCycle: "h24" })}.${t.getMilliseconds().toString().padStart(3, "0")}`;
381
443
  };
382
- function Yt(e, t, r, n) {
444
+ function Bt(e, t, n, r) {
383
445
  function l(i) {
384
- return i instanceof r ? i : new r(function(o) {
446
+ return i instanceof n ? i : new n(function(o) {
385
447
  o(i);
386
448
  });
387
449
  }
388
- return new (r || (r = Promise))(function(i, o) {
389
- function c(p) {
450
+ return new (n || (n = Promise))(function(i, o) {
451
+ function c(g) {
390
452
  try {
391
- d(n.next(p));
392
- } catch (v) {
393
- o(v);
453
+ d(r.next(g));
454
+ } catch (m) {
455
+ o(m);
394
456
  }
395
457
  }
396
- function u(p) {
458
+ function u(g) {
397
459
  try {
398
- d(n.throw(p));
399
- } catch (v) {
400
- o(v);
460
+ d(r.throw(g));
461
+ } catch (m) {
462
+ o(m);
401
463
  }
402
464
  }
403
- function d(p) {
404
- p.done ? i(p.value) : l(p.value).then(c, u);
465
+ function d(g) {
466
+ g.done ? i(g.value) : l(g.value).then(c, u);
405
467
  }
406
- d((n = n.apply(e, [])).next());
468
+ d((r = r.apply(e, [])).next());
407
469
  });
408
470
  }
409
- var Bt = function() {
471
+ var Wt = function() {
410
472
  var e = document.getSelection();
411
473
  if (!e.rangeCount)
412
474
  return function() {
413
475
  };
414
- for (var t = document.activeElement, r = [], n = 0; n < e.rangeCount; n++)
415
- r.push(e.getRangeAt(n));
476
+ for (var t = document.activeElement, n = [], r = 0; r < e.rangeCount; r++)
477
+ n.push(e.getRangeAt(r));
416
478
  switch (t.tagName.toUpperCase()) {
417
479
  // .toUpperCase handles XHTML
418
480
  case "INPUT":
@@ -424,601 +486,601 @@ var Bt = function() {
424
486
  break;
425
487
  }
426
488
  return e.removeAllRanges(), function() {
427
- e.type === "Caret" && e.removeAllRanges(), e.rangeCount || r.forEach(function(l) {
489
+ e.type === "Caret" && e.removeAllRanges(), e.rangeCount || n.forEach(function(l) {
428
490
  e.addRange(l);
429
491
  }), t && t.focus();
430
492
  };
431
- }, Wt = Bt, Pe = {
493
+ }, Jt = Wt, $e = {
432
494
  "text/plain": "Text",
433
495
  "text/html": "Url",
434
496
  default: "Text"
435
- }, Jt = "Copy to clipboard: #{key}, Enter";
436
- function qt(e) {
497
+ }, qt = "Copy to clipboard: #{key}, Enter";
498
+ function Kt(e) {
437
499
  var t = (/mac os x/i.test(navigator.userAgent) ? "⌘" : "Ctrl") + "+C";
438
500
  return e.replace(/#{\s*key\s*}/g, t);
439
501
  }
440
- function Kt(e, t) {
441
- var r, n, l, i, o, c, u = !1;
442
- t || (t = {}), r = t.debug || !1;
502
+ function Gt(e, t) {
503
+ var n, r, l, i, o, c, u = !1;
504
+ t || (t = {}), n = t.debug || !1;
443
505
  try {
444
- l = Wt(), i = document.createRange(), o = document.getSelection(), c = document.createElement("span"), c.textContent = e, c.ariaHidden = "true", c.style.all = "unset", c.style.position = "fixed", c.style.top = 0, c.style.clip = "rect(0, 0, 0, 0)", c.style.whiteSpace = "pre", c.style.webkitUserSelect = "text", c.style.MozUserSelect = "text", c.style.msUserSelect = "text", c.style.userSelect = "text", c.addEventListener("copy", function(p) {
445
- if (p.stopPropagation(), t.format)
446
- if (p.preventDefault(), typeof p.clipboardData > "u") {
447
- r && console.warn("unable to use e.clipboardData"), r && console.warn("trying IE specific stuff"), window.clipboardData.clearData();
448
- var v = Pe[t.format] || Pe.default;
449
- window.clipboardData.setData(v, e);
506
+ l = Jt(), i = document.createRange(), o = document.getSelection(), c = document.createElement("span"), c.textContent = e, c.ariaHidden = "true", c.style.all = "unset", c.style.position = "fixed", c.style.top = 0, c.style.clip = "rect(0, 0, 0, 0)", c.style.whiteSpace = "pre", c.style.webkitUserSelect = "text", c.style.MozUserSelect = "text", c.style.msUserSelect = "text", c.style.userSelect = "text", c.addEventListener("copy", function(g) {
507
+ if (g.stopPropagation(), t.format)
508
+ if (g.preventDefault(), typeof g.clipboardData > "u") {
509
+ n && console.warn("unable to use e.clipboardData"), n && console.warn("trying IE specific stuff"), window.clipboardData.clearData();
510
+ var m = $e[t.format] || $e.default;
511
+ window.clipboardData.setData(m, e);
450
512
  } else
451
- p.clipboardData.clearData(), p.clipboardData.setData(t.format, e);
452
- t.onCopy && (p.preventDefault(), t.onCopy(p.clipboardData));
513
+ g.clipboardData.clearData(), g.clipboardData.setData(t.format, e);
514
+ t.onCopy && (g.preventDefault(), t.onCopy(g.clipboardData));
453
515
  }), document.body.appendChild(c), i.selectNodeContents(c), o.addRange(i);
454
516
  var d = document.execCommand("copy");
455
517
  if (!d)
456
518
  throw new Error("copy command was unsuccessful");
457
519
  u = !0;
458
- } catch (p) {
459
- r && console.error("unable to copy using execCommand: ", p), r && console.warn("trying IE specific stuff");
520
+ } catch (g) {
521
+ n && console.error("unable to copy using execCommand: ", g), n && console.warn("trying IE specific stuff");
460
522
  try {
461
523
  window.clipboardData.setData(t.format || "text", e), t.onCopy && t.onCopy(window.clipboardData), u = !0;
462
- } catch (v) {
463
- r && console.error("unable to copy using clipboardData: ", v), r && console.error("falling back to prompt"), n = qt("message" in t ? t.message : Jt), window.prompt(n, e);
524
+ } catch (m) {
525
+ n && console.error("unable to copy using clipboardData: ", m), n && console.error("falling back to prompt"), r = Kt("message" in t ? t.message : qt), window.prompt(r, e);
464
526
  }
465
527
  } finally {
466
528
  o && (typeof o.removeRange == "function" ? o.removeRange(i) : o.removeAllRanges()), c && document.body.removeChild(c), l();
467
529
  }
468
530
  return u;
469
531
  }
470
- var Gt = Kt;
532
+ var Xt = Gt;
471
533
  function B(e) {
472
534
  return Object.prototype.toString.call(e) === "[object Object]";
473
535
  }
474
536
  function te(e) {
475
537
  return Array.isArray(e) ? e.length : B(e) ? Object.keys(e).length : 0;
476
538
  }
477
- function Xt(e, t) {
539
+ function Qt(e, t) {
478
540
  if (typeof e == "string")
479
541
  return e;
480
542
  try {
481
- return JSON.stringify(e, (r, n) => {
482
- switch (typeof n) {
543
+ return JSON.stringify(e, (n, r) => {
544
+ switch (typeof r) {
483
545
  case "bigint":
484
- return String(n) + "n";
546
+ return String(r) + "n";
485
547
  case "number":
486
548
  case "boolean":
487
549
  case "object":
488
550
  case "string":
489
- return n;
551
+ return r;
490
552
  default:
491
- return String(n);
553
+ return String(r);
492
554
  }
493
555
  }, t);
494
- } catch (r) {
495
- return `${r.name}: ${r.message}` || "JSON.stringify failed";
556
+ } catch (n) {
557
+ return `${n.name}: ${n.message}` || "JSON.stringify failed";
496
558
  }
497
559
  }
498
- function Qt(e) {
499
- return Yt(this, void 0, void 0, function* () {
560
+ function en(e) {
561
+ return Bt(this, void 0, void 0, function* () {
500
562
  try {
501
563
  yield navigator.clipboard.writeText(e);
502
564
  } catch {
503
- Gt(e);
565
+ Xt(e);
504
566
  }
505
567
  });
506
568
  }
507
- function $e(e, t, r, n, l, i) {
569
+ function Me(e, t, n, r, l, i) {
508
570
  if (i && i.collapsed !== void 0)
509
571
  return !!i.collapsed;
510
- if (typeof n == "boolean")
511
- return n;
512
- if (typeof n == "number" && t > n)
572
+ if (typeof r == "boolean")
573
+ return r;
574
+ if (typeof r == "number" && t > r)
513
575
  return !0;
514
576
  const o = te(e);
515
- if (typeof n == "function") {
516
- const c = Ee(n, [{ node: e, depth: t, indexOrName: r, size: o }]);
577
+ if (typeof r == "function") {
578
+ const c = Ae(r, [{ node: e, depth: t, indexOrName: n, size: o }]);
517
579
  if (typeof c == "boolean")
518
580
  return c;
519
581
  }
520
582
  return !!(Array.isArray(e) && o > l || B(e) && o > l);
521
583
  }
522
- function Me(e, t, r, n, l, i) {
584
+ function Fe(e, t, n, r, l, i) {
523
585
  if (i && i.collapsed !== void 0)
524
586
  return !!i.collapsed;
525
- if (typeof n == "boolean")
526
- return n;
527
- if (typeof n == "number" && t > n)
587
+ if (typeof r == "boolean")
588
+ return r;
589
+ if (typeof r == "number" && t > r)
528
590
  return !0;
529
591
  const o = Math.ceil(e.length / 100);
530
- if (typeof n == "function") {
531
- const c = Ee(n, [{ node: e, depth: t, indexOrName: r, size: o }]);
592
+ if (typeof r == "function") {
593
+ const c = Ae(r, [{ node: e, depth: t, indexOrName: n, size: o }]);
532
594
  if (typeof c == "boolean")
533
595
  return c;
534
596
  }
535
597
  return !!(Array.isArray(e) && o > l || B(e) && o > l);
536
598
  }
537
- function G(e, t, r) {
538
- return typeof e == "boolean" ? e : !!(typeof e == "number" && t > e || e === "collapsed" && r || e === "expanded" && !r);
599
+ function G(e, t, n) {
600
+ return typeof e == "boolean" ? e : !!(typeof e == "number" && t > e || e === "collapsed" && n || e === "expanded" && !n);
539
601
  }
540
- function Ee(e, t) {
602
+ function Ae(e, t) {
541
603
  try {
542
604
  return e(...t);
543
- } catch (r) {
544
- reportError(r);
605
+ } catch (n) {
606
+ reportError(n);
545
607
  }
546
608
  }
547
- function it(e) {
609
+ function lt(e) {
548
610
  if (e === !0 || B(e) && e.add === !0)
549
611
  return !0;
550
612
  }
551
- function Fe(e) {
613
+ function He(e) {
552
614
  if (e === !0 || B(e) && e.edit === !0)
553
615
  return !0;
554
616
  }
555
- function Ae(e) {
617
+ function Se(e) {
556
618
  if (e === !0 || B(e) && e.delete === !0)
557
619
  return !0;
558
620
  }
559
- function er(e) {
621
+ function tn(e) {
560
622
  return typeof e == "function";
561
623
  }
562
- function lt(e) {
624
+ function ct(e) {
563
625
  return !e || e.add === void 0 || !!e.add;
564
626
  }
565
- function He(e) {
627
+ function Ue(e) {
566
628
  return !e || e.edit === void 0 || !!e.edit;
567
629
  }
568
- function Se(e) {
630
+ function ke(e) {
569
631
  return !e || e.delete === void 0 || !!e.delete;
570
632
  }
571
633
  function oe(e) {
572
634
  return !e || e.enableClipboard === void 0 || !!e.enableClipboard;
573
635
  }
574
- function tr(e) {
636
+ function nn(e) {
575
637
  return !e || e.matchesURL === void 0 || !!e.matchesURL;
576
638
  }
577
- function rr(e, t) {
639
+ function rn(e, t) {
578
640
  return e === "string" ? t.trim().replace(/^\"([\s\S]+?)\"$/, "$1") : t;
579
641
  }
580
- var Ue;
581
- function fe() {
582
- return fe = Object.assign ? Object.assign.bind() : function(e) {
642
+ var Ze;
643
+ function de() {
644
+ return de = Object.assign ? Object.assign.bind() : function(e) {
583
645
  for (var t = 1; t < arguments.length; t++) {
584
- var r = arguments[t];
585
- for (var n in r)
586
- Object.prototype.hasOwnProperty.call(r, n) && (e[n] = r[n]);
646
+ var n = arguments[t];
647
+ for (var r in n)
648
+ Object.prototype.hasOwnProperty.call(n, r) && (e[r] = n[r]);
587
649
  }
588
650
  return e;
589
- }, fe.apply(this, arguments);
651
+ }, de.apply(this, arguments);
590
652
  }
591
653
  var _e = function(t) {
592
- return /* @__PURE__ */ k.createElement("svg", fe({
654
+ return /* @__PURE__ */ _.createElement("svg", de({
593
655
  xmlns: "http://www.w3.org/2000/svg",
594
656
  width: 16,
595
657
  height: 16,
596
658
  fill: "none",
597
659
  viewBox: "0 0 16 16"
598
- }, t), Ue || (Ue = /* @__PURE__ */ k.createElement("path", {
660
+ }, t), Ze || (Ze = /* @__PURE__ */ _.createElement("path", {
599
661
  fill: "currentColor",
600
662
  d: "M12.473 5.806a.666.666 0 0 0-.946 0L8.473 8.86a.667.667 0 0 1-.946 0L4.473 5.806a.667.667 0 1 0-.946.94l3.06 3.06a2 2 0 0 0 2.826 0l3.06-3.06a.667.667 0 0 0 0-.94Z"
601
663
  })));
602
- }, Ze;
603
- function de() {
604
- return de = Object.assign ? Object.assign.bind() : function(e) {
664
+ }, Ve;
665
+ function pe() {
666
+ return pe = Object.assign ? Object.assign.bind() : function(e) {
605
667
  for (var t = 1; t < arguments.length; t++) {
606
- var r = arguments[t];
607
- for (var n in r)
608
- Object.prototype.hasOwnProperty.call(r, n) && (e[n] = r[n]);
668
+ var n = arguments[t];
669
+ for (var r in n)
670
+ Object.prototype.hasOwnProperty.call(n, r) && (e[r] = n[r]);
609
671
  }
610
672
  return e;
611
- }, de.apply(this, arguments);
673
+ }, pe.apply(this, arguments);
612
674
  }
613
- var nr = function(t) {
614
- return /* @__PURE__ */ k.createElement("svg", de({
675
+ var an = function(t) {
676
+ return /* @__PURE__ */ _.createElement("svg", pe({
615
677
  xmlns: "http://www.w3.org/2000/svg",
616
678
  width: 24,
617
679
  height: 24,
618
680
  fill: "none",
619
681
  viewBox: "0 0 24 24"
620
- }, t), Ze || (Ze = /* @__PURE__ */ k.createElement("path", {
682
+ }, t), Ve || (Ve = /* @__PURE__ */ _.createElement("path", {
621
683
  fill: "currentColor",
622
684
  d: "M17.542 2.5h-4.75a3.963 3.963 0 0 0-3.959 3.958v4.75a3.963 3.963 0 0 0 3.959 3.959h4.75a3.963 3.963 0 0 0 3.958-3.959v-4.75A3.963 3.963 0 0 0 17.542 2.5Zm2.375 8.708a2.378 2.378 0 0 1-2.375 2.375h-4.75a2.378 2.378 0 0 1-2.375-2.375v-4.75a2.378 2.378 0 0 1 2.375-2.375h4.75a2.378 2.378 0 0 1 2.375 2.375v4.75Zm-4.75 6.334a3.963 3.963 0 0 1-3.959 3.958h-4.75A3.963 3.963 0 0 1 2.5 17.542v-4.75a3.963 3.963 0 0 1 3.958-3.959.791.791 0 1 1 0 1.584 2.378 2.378 0 0 0-2.375 2.375v4.75a2.378 2.378 0 0 0 2.375 2.375h4.75a2.378 2.378 0 0 0 2.375-2.375.792.792 0 1 1 1.584 0Z"
623
685
  })));
624
- }, Ve, ze;
625
- function pe() {
626
- return pe = Object.assign ? Object.assign.bind() : function(e) {
686
+ }, ze, Ye;
687
+ function ge() {
688
+ return ge = Object.assign ? Object.assign.bind() : function(e) {
627
689
  for (var t = 1; t < arguments.length; t++) {
628
- var r = arguments[t];
629
- for (var n in r)
630
- Object.prototype.hasOwnProperty.call(r, n) && (e[n] = r[n]);
690
+ var n = arguments[t];
691
+ for (var r in n)
692
+ Object.prototype.hasOwnProperty.call(n, r) && (e[r] = n[r]);
631
693
  }
632
694
  return e;
633
- }, pe.apply(this, arguments);
695
+ }, ge.apply(this, arguments);
634
696
  }
635
- var ar = function(t) {
636
- return /* @__PURE__ */ k.createElement("svg", pe({
697
+ var sn = function(t) {
698
+ return /* @__PURE__ */ _.createElement("svg", ge({
637
699
  xmlns: "http://www.w3.org/2000/svg",
638
700
  width: 24,
639
701
  height: 24,
640
702
  fill: "none",
641
703
  viewBox: "0 0 24 24"
642
- }, t), Ve || (Ve = /* @__PURE__ */ k.createElement("path", {
704
+ }, t), ze || (ze = /* @__PURE__ */ _.createElement("path", {
643
705
  fill: "currentColor",
644
706
  d: "M17.25 3H6.75A3.755 3.755 0 0 0 3 6.75v10.5A3.754 3.754 0 0 0 6.75 21h10.5A3.754 3.754 0 0 0 21 17.25V6.75A3.755 3.755 0 0 0 17.25 3Zm2.25 14.25a2.25 2.25 0 0 1-2.25 2.25H6.75a2.25 2.25 0 0 1-2.25-2.25V6.75A2.25 2.25 0 0 1 6.75 4.5h10.5a2.25 2.25 0 0 1 2.25 2.25v10.5Z"
645
- })), ze || (ze = /* @__PURE__ */ k.createElement("path", {
707
+ })), Ye || (Ye = /* @__PURE__ */ _.createElement("path", {
646
708
  fill: "#14C786",
647
709
  d: "M10.312 14.45 7.83 11.906a.625.625 0 0 0-.896 0 .659.659 0 0 0 0 .918l2.481 2.546a1.264 1.264 0 0 0 .896.381 1.237 1.237 0 0 0 .895-.38l5.858-6.011a.658.658 0 0 0 0-.919.625.625 0 0 0-.896 0l-5.857 6.01Z"
648
710
  })));
649
711
  };
650
712
  function ie({ node: e, nodeMeta: t }) {
651
- const { customizeCopy: r, CopyComponent: n, CopiedComponent: l } = J(W), [i, o] = H(!1), c = (u) => {
713
+ const { customizeCopy: n, CopyComponent: r, CopiedComponent: l } = J(W), [i, o] = F(!1), c = (u) => {
652
714
  u.stopPropagation();
653
- const d = r(e, t);
654
- typeof d == "string" && d && Qt(d), o(!0), setTimeout(() => o(!1), 3e3);
715
+ const d = n(e, t);
716
+ typeof d == "string" && d && en(d), o(!0), setTimeout(() => o(!1), 3e3);
655
717
  };
656
- return i ? typeof l == "function" ? a.jsx(l, { className: "json-view--copy", style: { display: "inline-block" } }) : a.jsx(ar, { className: "json-view--copy", style: { display: "inline-block" } }) : typeof n == "function" ? a.jsx(n, { onClick: c, className: "json-view--copy" }) : a.jsx(nr, { onClick: c, className: "json-view--copy" });
718
+ return i ? typeof l == "function" ? a.jsx(l, { className: "json-view--copy", style: { display: "inline-block" } }) : a.jsx(sn, { className: "json-view--copy", style: { display: "inline-block" } }) : typeof r == "function" ? a.jsx(r, { onClick: c, className: "json-view--copy" }) : a.jsx(an, { onClick: c, className: "json-view--copy" });
657
719
  }
658
- function ge({ indexOrName: e, value: t, depth: r, deleteHandle: n, editHandle: l, parent: i, parentPath: o }) {
720
+ function me({ indexOrName: e, value: t, depth: n, deleteHandle: r, editHandle: l, parent: i, parentPath: o }) {
659
721
  const { displayArrayIndex: c } = J(W), u = Array.isArray(i);
660
- return a.jsxs("div", Object.assign({ className: "json-view--pair" }, { children: [!u || u && c ? a.jsxs(a.Fragment, { children: [a.jsx("span", Object.assign({ className: typeof e == "number" ? "json-view--index" : "json-view--property" }, { children: e })), ":", " "] }) : a.jsx(a.Fragment, {}), a.jsx(ut, { node: t, depth: r + 1, deleteHandle: (d, p) => n(d, p), editHandle: (d, p, v, y) => l(d, p, v, y), parent: i, indexOrName: e, parentPath: o })] }));
722
+ return a.jsxs("div", Object.assign({ className: "json-view--pair" }, { children: [!u || u && c ? a.jsxs(a.Fragment, { children: [a.jsx("span", Object.assign({ className: typeof e == "number" ? "json-view--index" : "json-view--property" }, { children: e })), ":", " "] }) : a.jsx(a.Fragment, {}), a.jsx(ft, { node: t, depth: n + 1, deleteHandle: (d, g) => r(d, g), editHandle: (d, g, m, y) => l(d, g, m, y), parent: i, indexOrName: e, parentPath: o })] }));
661
723
  }
662
- var Ye, Be;
663
- function me() {
664
- return me = Object.assign ? Object.assign.bind() : function(e) {
724
+ var Be, We;
725
+ function ve() {
726
+ return ve = Object.assign ? Object.assign.bind() : function(e) {
665
727
  for (var t = 1; t < arguments.length; t++) {
666
- var r = arguments[t];
667
- for (var n in r)
668
- Object.prototype.hasOwnProperty.call(r, n) && (e[n] = r[n]);
728
+ var n = arguments[t];
729
+ for (var r in n)
730
+ Object.prototype.hasOwnProperty.call(n, r) && (e[r] = n[r]);
669
731
  }
670
732
  return e;
671
- }, me.apply(this, arguments);
733
+ }, ve.apply(this, arguments);
672
734
  }
673
- var ke = function(t) {
674
- return /* @__PURE__ */ k.createElement("svg", me({
735
+ var Te = function(t) {
736
+ return /* @__PURE__ */ _.createElement("svg", ve({
675
737
  xmlns: "http://www.w3.org/2000/svg",
676
738
  width: 24,
677
739
  height: 24,
678
740
  fill: "none",
679
741
  viewBox: "0 0 24 24"
680
- }, t), Ye || (Ye = /* @__PURE__ */ k.createElement("path", {
742
+ }, t), Be || (Be = /* @__PURE__ */ _.createElement("path", {
681
743
  fill: "currentColor",
682
744
  d: "M18.75 6h-2.325a3.757 3.757 0 0 0-3.675-3h-1.5a3.757 3.757 0 0 0-3.675 3H5.25a.75.75 0 0 0 0 1.5H6v9.75A3.754 3.754 0 0 0 9.75 21h4.5A3.754 3.754 0 0 0 18 17.25V7.5h.75a.75.75 0 1 0 0-1.5Zm-7.5-1.5h1.5A2.255 2.255 0 0 1 14.872 6H9.128a2.255 2.255 0 0 1 2.122-1.5Zm5.25 12.75a2.25 2.25 0 0 1-2.25 2.25h-4.5a2.25 2.25 0 0 1-2.25-2.25V7.5h9v9.75Z"
683
- })), Be || (Be = /* @__PURE__ */ k.createElement("path", {
745
+ })), We || (We = /* @__PURE__ */ _.createElement("path", {
684
746
  fill: "#DA0000",
685
747
  d: "M10.5 16.5a.75.75 0 0 0 .75-.75v-4.5a.75.75 0 1 0-1.5 0v4.5a.75.75 0 0 0 .75.75ZM13.5 16.5a.75.75 0 0 0 .75-.75v-4.5a.75.75 0 1 0-1.5 0v4.5a.75.75 0 0 0 .75.75Z"
686
748
  })));
687
- }, We, Je;
688
- function ve() {
689
- return ve = Object.assign ? Object.assign.bind() : function(e) {
749
+ }, Je, qe;
750
+ function he() {
751
+ return he = Object.assign ? Object.assign.bind() : function(e) {
690
752
  for (var t = 1; t < arguments.length; t++) {
691
- var r = arguments[t];
692
- for (var n in r)
693
- Object.prototype.hasOwnProperty.call(r, n) && (e[n] = r[n]);
753
+ var n = arguments[t];
754
+ for (var r in n)
755
+ Object.prototype.hasOwnProperty.call(n, r) && (e[r] = n[r]);
694
756
  }
695
757
  return e;
696
- }, ve.apply(this, arguments);
758
+ }, he.apply(this, arguments);
697
759
  }
698
- var ct = function(t) {
699
- return /* @__PURE__ */ k.createElement("svg", ve({
760
+ var ut = function(t) {
761
+ return /* @__PURE__ */ _.createElement("svg", he({
700
762
  xmlns: "http://www.w3.org/2000/svg",
701
763
  width: 24,
702
764
  height: 24,
703
765
  fill: "none",
704
766
  viewBox: "0 0 24 24"
705
- }, t), We || (We = /* @__PURE__ */ k.createElement("path", {
767
+ }, t), Je || (Je = /* @__PURE__ */ _.createElement("path", {
706
768
  fill: "currentColor",
707
769
  d: "M21 6.75v10.5A3.754 3.754 0 0 1 17.25 21H6.75A3.754 3.754 0 0 1 3 17.25V6.75A3.754 3.754 0 0 1 6.75 3h10.5A3.754 3.754 0 0 1 21 6.75Zm-1.5 0c0-1.24-1.01-2.25-2.25-2.25H6.75C5.51 4.5 4.5 5.51 4.5 6.75v10.5c0 1.24 1.01 2.25 2.25 2.25h10.5c1.24 0 2.25-1.01 2.25-2.25V6.75Z"
708
- })), Je || (Je = /* @__PURE__ */ k.createElement("path", {
770
+ })), qe || (qe = /* @__PURE__ */ _.createElement("path", {
709
771
  fill: "#14C786",
710
772
  d: "M15 12.75a.75.75 0 1 0 0-1.5h-2.25V9a.75.75 0 1 0-1.5 0v2.25H9a.75.75 0 1 0 0 1.5h2.25V15a.75.75 0 1 0 1.5 0v-2.25H15Z"
711
773
  })));
712
- }, qe, Ke;
713
- function he() {
714
- return he = Object.assign ? Object.assign.bind() : function(e) {
774
+ }, Ke, Ge;
775
+ function je() {
776
+ return je = Object.assign ? Object.assign.bind() : function(e) {
715
777
  for (var t = 1; t < arguments.length; t++) {
716
- var r = arguments[t];
717
- for (var n in r)
718
- Object.prototype.hasOwnProperty.call(r, n) && (e[n] = r[n]);
778
+ var n = arguments[t];
779
+ for (var r in n)
780
+ Object.prototype.hasOwnProperty.call(n, r) && (e[r] = n[r]);
719
781
  }
720
782
  return e;
721
- }, he.apply(this, arguments);
783
+ }, je.apply(this, arguments);
722
784
  }
723
- var Te = function(t) {
724
- return /* @__PURE__ */ k.createElement("svg", he({
785
+ var Ne = function(t) {
786
+ return /* @__PURE__ */ _.createElement("svg", je({
725
787
  xmlns: "http://www.w3.org/2000/svg",
726
788
  width: 24,
727
789
  height: 24,
728
790
  fill: "none",
729
791
  viewBox: "0 0 24 24"
730
- }, t), qe || (qe = /* @__PURE__ */ k.createElement("path", {
792
+ }, t), Ke || (Ke = /* @__PURE__ */ _.createElement("path", {
731
793
  fill: "currentColor",
732
794
  d: "M12 3a9 9 0 1 0 9 9 9.01 9.01 0 0 0-9-9Zm0 16.5a7.5 7.5 0 1 1 7.5-7.5 7.509 7.509 0 0 1-7.5 7.5Z"
733
- })), Ke || (Ke = /* @__PURE__ */ k.createElement("path", {
795
+ })), Ge || (Ge = /* @__PURE__ */ _.createElement("path", {
734
796
  fill: "#14C786",
735
797
  d: "m10.85 13.96-1.986-2.036a.5.5 0 0 0-.716 0 .527.527 0 0 0 0 .735l1.985 2.036a1.01 1.01 0 0 0 .717.305.99.99 0 0 0 .716-.305l4.686-4.808a.526.526 0 0 0 0-.735.5.5 0 0 0-.716 0l-4.687 4.809Z"
736
798
  })));
737
- }, Ge, Xe;
738
- function je() {
739
- return je = Object.assign ? Object.assign.bind() : function(e) {
799
+ }, Xe, Qe;
800
+ function be() {
801
+ return be = Object.assign ? Object.assign.bind() : function(e) {
740
802
  for (var t = 1; t < arguments.length; t++) {
741
- var r = arguments[t];
742
- for (var n in r)
743
- Object.prototype.hasOwnProperty.call(r, n) && (e[n] = r[n]);
803
+ var n = arguments[t];
804
+ for (var r in n)
805
+ Object.prototype.hasOwnProperty.call(n, r) && (e[r] = n[r]);
744
806
  }
745
807
  return e;
746
- }, je.apply(this, arguments);
808
+ }, be.apply(this, arguments);
747
809
  }
748
- var Ne = function(t) {
749
- return /* @__PURE__ */ k.createElement("svg", je({
810
+ var Oe = function(t) {
811
+ return /* @__PURE__ */ _.createElement("svg", be({
750
812
  xmlns: "http://www.w3.org/2000/svg",
751
813
  width: 24,
752
814
  height: 24,
753
815
  fill: "none",
754
816
  viewBox: "0 0 24 24"
755
- }, t), Ge || (Ge = /* @__PURE__ */ k.createElement("path", {
817
+ }, t), Xe || (Xe = /* @__PURE__ */ _.createElement("path", {
756
818
  fill: "#DA0000",
757
819
  d: "M15 9a.75.75 0 0 0-1.06 0L12 10.94 10.06 9A.75.75 0 0 0 9 10.06L10.94 12 9 13.94A.75.75 0 0 0 10.06 15L12 13.06 13.94 15A.75.75 0 0 0 15 13.94L13.06 12 15 10.06A.75.75 0 0 0 15 9Z"
758
- })), Xe || (Xe = /* @__PURE__ */ k.createElement("path", {
820
+ })), Qe || (Qe = /* @__PURE__ */ _.createElement("path", {
759
821
  fill: "currentColor",
760
822
  d: "M12 3a9 9 0 1 0 9 9 9.01 9.01 0 0 0-9-9Zm0 16.5a7.5 7.5 0 1 1 7.5-7.5 7.509 7.509 0 0 1-7.5 7.5Z"
761
823
  })));
762
824
  };
763
- function sr({ originNode: e, node: t, depth: r, index: n, deleteHandle: l, customOptions: i, startIndex: o, parent: c, parentPath: u }) {
764
- const { enableClipboard: d, src: p, onEdit: v, onChange: y, forceUpdate: w, displaySize: b, CustomOperation: C } = J(W), N = [...u, String(n)], [E, D] = H(!0), I = re((A, x, Z) => {
765
- e[A] = x, v && v({
825
+ function on({ originNode: e, node: t, depth: n, index: r, deleteHandle: l, customOptions: i, startIndex: o, parent: c, parentPath: u }) {
826
+ const { enableClipboard: d, src: g, onEdit: m, onChange: y, forceUpdate: E, displaySize: w, CustomOperation: C } = J(W), N = [...u, String(r)], [A, D] = F(!0), P = ne((S, x, H) => {
827
+ e[S] = x, m && m({
766
828
  newValue: x,
767
- oldValue: Z,
768
- depth: r,
769
- src: p,
770
- indexOrName: A,
829
+ oldValue: H,
830
+ depth: n,
831
+ src: g,
832
+ indexOrName: S,
771
833
  parentType: "array",
772
834
  parentPath: u
773
- }), y && y({ type: "edit", depth: r, src: p, indexOrName: A, parentType: "array", parentPath: u }), w();
774
- }, [t, v, y, w]), h = (A) => {
775
- e.splice(A, 1), l && l(A, u), w();
776
- }, j = a.jsxs(a.Fragment, { children: [!E && a.jsxs("span", Object.assign({ onClick: () => D(!0), className: "jv-size-chevron" }, { children: [G(b, r, E) && a.jsxs("span", Object.assign({ className: "jv-size" }, { children: [te(t), " Items"] })), a.jsx(_e, { className: "jv-chevron" })] })), !E && d && oe(i) && a.jsx(ie, { node: t, nodeMeta: { depth: r, indexOrName: n, parent: c, parentPath: u, currentPath: N } }), typeof C == "function" ? a.jsx(C, { node: t }) : null] });
777
- return a.jsxs("div", { children: [a.jsx("span", { children: "[" }), j, E ? a.jsxs("button", Object.assign({ onClick: () => D(!1), className: "jv-button" }, { children: [o, " ... ", o + t.length - 1] })) : a.jsx("div", Object.assign({ className: "jv-indent" }, { children: t.map((A, x) => a.jsx(ge, { indexOrName: x + o, value: A, depth: r, parent: t, deleteHandle: h, editHandle: I, parentPath: u }, String(n) + String(x))) })), a.jsx("span", { children: "]" })] });
835
+ }), y && y({ type: "edit", depth: n, src: g, indexOrName: S, parentType: "array", parentPath: u }), E();
836
+ }, [t, m, y, E]), v = (S) => {
837
+ e.splice(S, 1), l && l(S, u), E();
838
+ }, h = a.jsxs(a.Fragment, { children: [!A && a.jsxs("span", Object.assign({ onClick: () => D(!0), className: "jv-size-chevron" }, { children: [G(w, n, A) && a.jsxs("span", Object.assign({ className: "jv-size" }, { children: [te(t), " Items"] })), a.jsx(_e, { className: "jv-chevron" })] })), !A && d && oe(i) && a.jsx(ie, { node: t, nodeMeta: { depth: n, indexOrName: r, parent: c, parentPath: u, currentPath: N } }), typeof C == "function" ? a.jsx(C, { node: t }) : null] });
839
+ return a.jsxs("div", { children: [a.jsx("span", { children: "[" }), h, A ? a.jsxs("button", Object.assign({ onClick: () => D(!1), className: "jv-button" }, { children: [o, " ... ", o + t.length - 1] })) : a.jsx("div", Object.assign({ className: "jv-indent" }, { children: t.map((S, x) => a.jsx(me, { indexOrName: x + o, value: S, depth: n, parent: t, deleteHandle: v, editHandle: P, parentPath: u }, String(r) + String(x))) })), a.jsx("span", { children: "]" })] });
778
840
  }
779
- function or({ node: e, depth: t, deleteHandle: r, indexOrName: n, customOptions: l, parent: i, parentPath: o }) {
780
- const c = typeof n < "u" ? [...o, String(n)] : o, u = [];
841
+ function ln({ node: e, depth: t, deleteHandle: n, indexOrName: r, customOptions: l, parent: i, parentPath: o }) {
842
+ const c = typeof r < "u" ? [...o, String(r)] : o, u = [];
781
843
  for (let T = 0; T < e.length; T += 100)
782
844
  u.push(e.slice(T, T + 100));
783
- const { collapsed: d, enableClipboard: p, collapseObjectsAfterLength: v, editable: y, onDelete: w, src: b, onAdd: C, CustomOperation: N, onChange: E, forceUpdate: D, displaySize: I } = J(W), [h, j] = H(Me(e, t, n, d, v, l));
784
- we(() => {
785
- j(Me(e, t, n, d, v, l));
786
- }, [d, v]);
787
- const [A, x] = H(!1), Z = () => {
788
- x(!1), r && r(n, o), w && w({ value: e, depth: t, src: b, indexOrName: n, parentType: "array", parentPath: o }), E && E({
845
+ const { collapsed: d, enableClipboard: g, collapseObjectsAfterLength: m, editable: y, onDelete: E, src: w, onAdd: C, CustomOperation: N, onChange: A, forceUpdate: D, displaySize: P } = J(W), [v, h] = F(Fe(e, t, r, d, m, l));
846
+ xe(() => {
847
+ h(Fe(e, t, r, d, m, l));
848
+ }, [d, m]);
849
+ const [S, x] = F(!1), H = () => {
850
+ x(!1), n && n(r, o), E && E({ value: e, depth: t, src: w, indexOrName: r, parentType: "array", parentPath: o }), A && A({
789
851
  type: "delete",
790
852
  depth: t,
791
- src: b,
792
- indexOrName: n,
853
+ src: w,
854
+ indexOrName: r,
793
855
  parentType: "array",
794
856
  parentPath: o
795
857
  });
796
- }, [O, V] = H(!1), P = () => {
858
+ }, [O, Y] = F(!1), R = () => {
797
859
  const T = e;
798
- T.push(null), C && C({ indexOrName: T.length - 1, depth: t, src: b, parentType: "array", parentPath: o }), E && E({ type: "add", indexOrName: T.length - 1, depth: t, src: b, parentType: "array", parentPath: o }), D();
799
- }, L = A || O, $ = () => {
800
- x(!1), V(!1);
801
- }, z = a.jsxs(a.Fragment, { children: [!h && !L && a.jsxs("span", Object.assign({ onClick: () => j(!0), className: "jv-size-chevron" }, { children: [G(I, t, h) && a.jsxs("span", Object.assign({ className: "jv-size" }, { children: [e.length, " Items"] })), a.jsx(_e, { className: "jv-chevron" })] })), L && a.jsx(Te, { className: "json-view--edit", style: { display: "inline-block" }, onClick: O ? P : Z }), L && a.jsx(Ne, { className: "json-view--edit", style: { display: "inline-block" }, onClick: $ }), !h && !L && p && oe(l) && a.jsx(ie, { node: e, nodeMeta: { depth: t, indexOrName: n, parent: i, parentPath: o, currentPath: c } }), !h && !L && it(y) && lt(l) && a.jsx(ct, { className: "json-view--edit", onClick: () => {
802
- P();
803
- } }), !h && !L && Ae(y) && Se(l) && r && a.jsx(ke, { className: "json-view--edit", onClick: () => x(!0) }), typeof N == "function" ? a.jsx(N, { node: e }) : null] });
804
- return a.jsxs(a.Fragment, { children: [a.jsx("span", { children: "[" }), z, h ? a.jsx("button", Object.assign({ onClick: () => j(!1), className: "jv-button" }, { children: "..." })) : a.jsx("div", Object.assign({ className: "jv-indent" }, { children: u.map((T, M) => a.jsx(sr, { originNode: e, node: T, depth: t, index: M, startIndex: M * 100, deleteHandle: r, customOptions: l, parentPath: o }, String(n) + String(M))) })), a.jsx("span", { children: "]" }), h && G(I, t, h) && a.jsxs("span", Object.assign({ onClick: () => j(!1), className: "jv-size" }, { children: [e.length, " Items"] }))] });
860
+ T.push(null), C && C({ indexOrName: T.length - 1, depth: t, src: w, parentType: "array", parentPath: o }), A && A({ type: "add", indexOrName: T.length - 1, depth: t, src: w, parentType: "array", parentPath: o }), D();
861
+ }, L = S || O, U = () => {
862
+ x(!1), Y(!1);
863
+ }, Z = a.jsxs(a.Fragment, { children: [!v && !L && a.jsxs("span", Object.assign({ onClick: () => h(!0), className: "jv-size-chevron" }, { children: [G(P, t, v) && a.jsxs("span", Object.assign({ className: "jv-size" }, { children: [e.length, " Items"] })), a.jsx(_e, { className: "jv-chevron" })] })), L && a.jsx(Ne, { className: "json-view--edit", style: { display: "inline-block" }, onClick: O ? R : H }), L && a.jsx(Oe, { className: "json-view--edit", style: { display: "inline-block" }, onClick: U }), !v && !L && g && oe(l) && a.jsx(ie, { node: e, nodeMeta: { depth: t, indexOrName: r, parent: i, parentPath: o, currentPath: c } }), !v && !L && lt(y) && ct(l) && a.jsx(ut, { className: "json-view--edit", onClick: () => {
864
+ R();
865
+ } }), !v && !L && Se(y) && ke(l) && n && a.jsx(Te, { className: "json-view--edit", onClick: () => x(!0) }), typeof N == "function" ? a.jsx(N, { node: e }) : null] });
866
+ return a.jsxs(a.Fragment, { children: [a.jsx("span", { children: "[" }), Z, v ? a.jsx("button", Object.assign({ onClick: () => h(!1), className: "jv-button" }, { children: "..." })) : a.jsx("div", Object.assign({ className: "jv-indent" }, { children: u.map((T, $) => a.jsx(on, { originNode: e, node: T, depth: t, index: $, startIndex: $ * 100, deleteHandle: n, customOptions: l, parentPath: o }, String(r) + String($))) })), a.jsx("span", { children: "]" }), v && G(P, t, v) && a.jsxs("span", Object.assign({ onClick: () => h(!1), className: "jv-size" }, { children: [e.length, " Items"] }))] });
805
867
  }
806
- function ir({ node: e, depth: t, indexOrName: r, deleteHandle: n, customOptions: l, parent: i, parentPath: o }) {
807
- const { collapsed: c, onCollapse: u, enableClipboard: d, ignoreLargeArray: p, collapseObjectsAfterLength: v, editable: y, onDelete: w, src: b, onAdd: C, onEdit: N, onChange: E, forceUpdate: D, displaySize: I, CustomOperation: h } = J(W), j = typeof r < "u" ? [...o, String(r)] : o;
808
- if (!p && Array.isArray(e) && e.length > 100)
809
- return a.jsx(or, { node: e, depth: t, indexOrName: r, deleteHandle: n, customOptions: l, parentPath: j });
810
- const A = B(e), [x, Z] = H($e(e, t, r, c, v, l)), O = (f) => {
811
- u?.({ isCollapsing: !f, node: e, depth: t, indexOrName: r }), Z(f);
868
+ function cn({ node: e, depth: t, indexOrName: n, deleteHandle: r, customOptions: l, parent: i, parentPath: o }) {
869
+ const { collapsed: c, onCollapse: u, enableClipboard: d, ignoreLargeArray: g, collapseObjectsAfterLength: m, editable: y, onDelete: E, src: w, onAdd: C, onEdit: N, onChange: A, forceUpdate: D, displaySize: P, CustomOperation: v } = J(W), h = typeof n < "u" ? [...o, String(n)] : o;
870
+ if (!g && Array.isArray(e) && e.length > 100)
871
+ return a.jsx(ln, { node: e, depth: t, indexOrName: n, deleteHandle: r, customOptions: l, parentPath: h });
872
+ const S = B(e), [x, H] = F(Me(e, t, n, c, m, l)), O = (f) => {
873
+ u?.({ isCollapsing: !f, node: e, depth: t, indexOrName: n }), H(f);
812
874
  };
813
- we(() => {
814
- O($e(e, t, r, c, v, l));
815
- }, [c, v]);
816
- const V = re((f, m, Y) => {
817
- Array.isArray(e) ? e[+f] = m : e && (e[f] = m), N && N({
818
- newValue: m,
819
- oldValue: Y,
875
+ xe(() => {
876
+ O(Me(e, t, n, c, m, l));
877
+ }, [c, m]);
878
+ const Y = ne((f, j, z) => {
879
+ Array.isArray(e) ? e[+f] = j : e && (e[f] = j), N && N({
880
+ newValue: j,
881
+ oldValue: z,
820
882
  depth: t,
821
- src: b,
883
+ src: w,
822
884
  indexOrName: f,
823
- parentType: A ? "object" : "array",
824
- parentPath: j
825
- }), E && E({ type: "edit", depth: t, src: b, indexOrName: f, parentType: A ? "object" : "array", parentPath: j }), D();
826
- }, [e, N, E, D]), P = (f) => {
885
+ parentType: S ? "object" : "array",
886
+ parentPath: h
887
+ }), A && A({ type: "edit", depth: t, src: w, indexOrName: f, parentType: S ? "object" : "array", parentPath: h }), D();
888
+ }, [e, N, A, D]), R = (f) => {
827
889
  Array.isArray(e) ? e.splice(+f, 1) : e && delete e[f], D();
828
- }, [L, $] = H(!1), z = () => {
829
- $(!1), n && n(r, j), w && w({ value: e, depth: t, src: b, indexOrName: r, parentType: A ? "object" : "array", parentPath: j }), E && E({
890
+ }, [L, U] = F(!1), Z = () => {
891
+ U(!1), r && r(n, h), E && E({ value: e, depth: t, src: w, indexOrName: n, parentType: S ? "object" : "array", parentPath: h }), A && A({
830
892
  type: "delete",
831
893
  depth: t,
832
- src: b,
833
- indexOrName: r,
834
- parentType: A ? "object" : "array",
835
- parentPath: j
894
+ src: w,
895
+ indexOrName: n,
896
+ parentType: S ? "object" : "array",
897
+ parentPath: h
836
898
  });
837
- }, [T, M] = H(!1), _ = xe(null), U = () => {
899
+ }, [T, $] = F(!1), k = Ce(null), V = () => {
838
900
  var f;
839
- if (A) {
840
- const m = (f = _.current) === null || f === void 0 ? void 0 : f.value;
841
- m && (e[m] = null, _.current && (_.current.value = ""), M(!1), C && C({ indexOrName: m, depth: t, src: b, parentType: "object", parentPath: j }), E && E({ type: "add", indexOrName: m, depth: t, src: b, parentType: "object", parentPath: j }));
901
+ if (S) {
902
+ const j = (f = k.current) === null || f === void 0 ? void 0 : f.value;
903
+ j && (e[j] = null, k.current && (k.current.value = ""), $(!1), C && C({ indexOrName: j, depth: t, src: w, parentType: "object", parentPath: h }), A && A({ type: "add", indexOrName: j, depth: t, src: w, parentType: "object", parentPath: h }));
842
904
  } else if (Array.isArray(e)) {
843
- const m = e;
844
- m.push(null), C && C({ indexOrName: m.length - 1, depth: t, src: b, parentType: "array", parentPath: j }), E && E({ type: "add", indexOrName: m.length - 1, depth: t, src: b, parentType: "array", parentPath: j });
905
+ const j = e;
906
+ j.push(null), C && C({ indexOrName: j.length - 1, depth: t, src: w, parentType: "array", parentPath: h }), A && A({ type: "add", indexOrName: j.length - 1, depth: t, src: w, parentType: "array", parentPath: h });
845
907
  }
846
908
  D();
847
- }, F = (f) => {
848
- f.key === "Enter" ? (f.preventDefault(), U()) : f.key === "Escape" && s();
849
- }, S = L || T, s = () => {
850
- $(!1), M(!1);
851
- }, g = a.jsxs(a.Fragment, { children: [!x && !S && a.jsxs("span", Object.assign({ onClick: () => O(!0), className: "jv-size-chevron" }, { children: [G(I, t, x) && a.jsxs("span", Object.assign({ className: "jv-size" }, { children: [te(e), " Items"] })), a.jsx(_e, { className: "jv-chevron" })] })), T && A && a.jsx("input", { className: "json-view--input", placeholder: "property", ref: _, onKeyDown: F }), S && a.jsx(Te, { className: "json-view--edit", style: { display: "inline-block" }, onClick: T ? U : z }), S && a.jsx(Ne, { className: "json-view--edit", style: { display: "inline-block" }, onClick: s }), !x && !S && d && oe(l) && a.jsx(ie, { node: e, nodeMeta: { depth: t, indexOrName: r, parent: i, parentPath: o, currentPath: j } }), !x && !S && it(y) && lt(l) && a.jsx(ct, { className: "json-view--edit", onClick: () => {
852
- A ? (M(!0), setTimeout(() => {
909
+ }, M = (f) => {
910
+ f.key === "Enter" ? (f.preventDefault(), V()) : f.key === "Escape" && p();
911
+ }, s = L || T, p = () => {
912
+ U(!1), $(!1);
913
+ }, b = a.jsxs(a.Fragment, { children: [!x && !s && a.jsxs("span", Object.assign({ onClick: () => O(!0), className: "jv-size-chevron" }, { children: [G(P, t, x) && a.jsxs("span", Object.assign({ className: "jv-size" }, { children: [te(e), " Items"] })), a.jsx(_e, { className: "jv-chevron" })] })), T && S && a.jsx("input", { className: "json-view--input", placeholder: "property", ref: k, onKeyDown: M }), s && a.jsx(Ne, { className: "json-view--edit", style: { display: "inline-block" }, onClick: T ? V : Z }), s && a.jsx(Oe, { className: "json-view--edit", style: { display: "inline-block" }, onClick: p }), !x && !s && d && oe(l) && a.jsx(ie, { node: e, nodeMeta: { depth: t, indexOrName: n, parent: i, parentPath: o, currentPath: h } }), !x && !s && lt(y) && ct(l) && a.jsx(ut, { className: "json-view--edit", onClick: () => {
914
+ S ? ($(!0), setTimeout(() => {
853
915
  var f;
854
- return (f = _.current) === null || f === void 0 ? void 0 : f.focus();
855
- })) : U();
856
- } }), !x && !S && Ae(y) && Se(l) && n && a.jsx(ke, { className: "json-view--edit", onClick: () => $(!0) }), typeof h == "function" ? a.jsx(h, { node: e }) : null] });
857
- return Array.isArray(e) ? a.jsxs(a.Fragment, { children: [a.jsx("span", { children: "[" }), g, x ? a.jsx("button", Object.assign({ onClick: () => O(!1), className: "jv-button" }, { children: "..." })) : a.jsx("div", Object.assign({ className: "jv-indent" }, { children: e.map((f, m) => a.jsx(ge, { indexOrName: m, value: f, depth: t, parent: e, deleteHandle: P, editHandle: V, parentPath: j }, String(r) + String(m))) })), a.jsx("span", { children: "]" }), x && G(I, t, x) && a.jsxs("span", Object.assign({ onClick: () => O(!1), className: "jv-size" }, { children: [te(e), " Items"] }))] }) : A ? a.jsxs(a.Fragment, { children: [a.jsx("span", { children: "{" }), g, x ? a.jsx("button", Object.assign({ onClick: () => O(!1), className: "jv-button" }, { children: "..." })) : a.jsx("div", Object.assign({ className: "jv-indent" }, { children: Object.entries(e).map(([f, m]) => a.jsx(ge, { indexOrName: f, value: m, depth: t, parent: e, deleteHandle: P, editHandle: V, parentPath: j }, String(r) + String(f))) })), a.jsx("span", { children: "}" }), x && G(I, t, x) && a.jsxs("span", Object.assign({ onClick: () => O(!1), className: "jv-size" }, { children: [te(e), " Items"] }))] }) : a.jsx("span", { children: String(e) });
916
+ return (f = k.current) === null || f === void 0 ? void 0 : f.focus();
917
+ })) : V();
918
+ } }), !x && !s && Se(y) && ke(l) && r && a.jsx(Te, { className: "json-view--edit", onClick: () => U(!0) }), typeof v == "function" ? a.jsx(v, { node: e }) : null] });
919
+ return Array.isArray(e) ? a.jsxs(a.Fragment, { children: [a.jsx("span", { children: "[" }), b, x ? a.jsx("button", Object.assign({ onClick: () => O(!1), className: "jv-button" }, { children: "..." })) : a.jsx("div", Object.assign({ className: "jv-indent" }, { children: e.map((f, j) => a.jsx(me, { indexOrName: j, value: f, depth: t, parent: e, deleteHandle: R, editHandle: Y, parentPath: h }, String(n) + String(j))) })), a.jsx("span", { children: "]" }), x && G(P, t, x) && a.jsxs("span", Object.assign({ onClick: () => O(!1), className: "jv-size" }, { children: [te(e), " Items"] }))] }) : S ? a.jsxs(a.Fragment, { children: [a.jsx("span", { children: "{" }), b, x ? a.jsx("button", Object.assign({ onClick: () => O(!1), className: "jv-button" }, { children: "..." })) : a.jsx("div", Object.assign({ className: "jv-indent" }, { children: Object.entries(e).map(([f, j]) => a.jsx(me, { indexOrName: f, value: j, depth: t, parent: e, deleteHandle: R, editHandle: Y, parentPath: h }, String(n) + String(f))) })), a.jsx("span", { children: "}" }), x && G(P, t, x) && a.jsxs("span", Object.assign({ onClick: () => O(!1), className: "jv-size" }, { children: [te(e), " Items"] }))] }) : a.jsx("span", { children: String(e) });
858
920
  }
859
- const lr = K.forwardRef(({ str: e, className: t, ctrlClick: r }, n) => {
921
+ const un = K.forwardRef(({ str: e, className: t, ctrlClick: n }, r) => {
860
922
  let { collapseStringMode: l, collapseStringsAfterLength: i, customizeCollapseStringUI: o } = J(W);
861
- const [c, u] = H(!0), d = xe(null);
923
+ const [c, u] = F(!0), d = Ce(null);
862
924
  i = i > 0 ? i : 0;
863
- const p = e.replace(/\s+/g, " "), v = typeof o == "function" ? o(p, c) : typeof o == "string" ? o : "...", y = (w) => {
864
- var b;
865
- if ((w.ctrlKey || w.metaKey) && r)
866
- r(w);
925
+ const g = e.replace(/\s+/g, " "), m = typeof o == "function" ? o(g, c) : typeof o == "string" ? o : "...", y = (E) => {
926
+ var w;
927
+ if ((E.ctrlKey || E.metaKey) && n)
928
+ n(E);
867
929
  else {
868
930
  const C = window.getSelection();
869
- if (C && C.anchorOffset !== C.focusOffset && ((b = C.anchorNode) === null || b === void 0 ? void 0 : b.parentElement) === d.current)
931
+ if (C && C.anchorOffset !== C.focusOffset && ((w = C.anchorNode) === null || w === void 0 ? void 0 : w.parentElement) === d.current)
870
932
  return;
871
933
  u(!c);
872
934
  }
873
935
  };
874
936
  if (e.length <= i)
875
- return a.jsxs("span", Object.assign({ ref: d, className: t, onClick: r }, { children: ['"', e, '"'] }));
937
+ return a.jsxs("span", Object.assign({ ref: d, className: t, onClick: n }, { children: ['"', e, '"'] }));
876
938
  if (l === "address")
877
- return e.length <= 10 ? a.jsxs("span", Object.assign({ ref: d, className: t, onClick: r }, { children: ['"', e, '"'] })) : a.jsxs("span", Object.assign({ ref: d, onClick: y, className: t + " cursor-pointer" }, { children: ['"', c ? [p.slice(0, 6), v, p.slice(-4)] : e, '"'] }));
939
+ return e.length <= 10 ? a.jsxs("span", Object.assign({ ref: d, className: t, onClick: n }, { children: ['"', e, '"'] })) : a.jsxs("span", Object.assign({ ref: d, onClick: y, className: t + " cursor-pointer" }, { children: ['"', c ? [g.slice(0, 6), m, g.slice(-4)] : e, '"'] }));
878
940
  if (l === "directly")
879
- return a.jsxs("span", Object.assign({ ref: d, onClick: y, className: t + " cursor-pointer" }, { children: ['"', c ? [p.slice(0, i), v] : e, '"'] }));
941
+ return a.jsxs("span", Object.assign({ ref: d, onClick: y, className: t + " cursor-pointer" }, { children: ['"', c ? [g.slice(0, i), m] : e, '"'] }));
880
942
  if (l === "word") {
881
- let w = i, b = i + 1, C = p, N = 1;
943
+ let E = i, w = i + 1, C = g, N = 1;
882
944
  for (; ; ) {
883
- if (/\W/.test(e[w])) {
884
- C = e.slice(0, w);
945
+ if (/\W/.test(e[E])) {
946
+ C = e.slice(0, E);
885
947
  break;
886
948
  }
887
- if (/\W/.test(e[b])) {
888
- C = e.slice(0, b);
949
+ if (/\W/.test(e[w])) {
950
+ C = e.slice(0, w);
889
951
  break;
890
952
  }
891
953
  if (N === 6) {
892
954
  C = e.slice(0, i);
893
955
  break;
894
956
  }
895
- N++, w--, b++;
957
+ N++, E--, w++;
896
958
  }
897
- return a.jsxs("span", Object.assign({ ref: d, onClick: y, className: t + " cursor-pointer" }, { children: ['"', c ? [C, v] : e, '"'] }));
959
+ return a.jsxs("span", Object.assign({ ref: d, onClick: y, className: t + " cursor-pointer" }, { children: ['"', c ? [C, m] : e, '"'] }));
898
960
  }
899
961
  return a.jsxs("span", Object.assign({ ref: d, className: t }, { children: ['"', e, '"'] }));
900
962
  });
901
- var Qe;
902
- function be() {
903
- return be = Object.assign ? Object.assign.bind() : function(e) {
963
+ var et;
964
+ function ye() {
965
+ return ye = Object.assign ? Object.assign.bind() : function(e) {
904
966
  for (var t = 1; t < arguments.length; t++) {
905
- var r = arguments[t];
906
- for (var n in r)
907
- Object.prototype.hasOwnProperty.call(r, n) && (e[n] = r[n]);
967
+ var n = arguments[t];
968
+ for (var r in n)
969
+ Object.prototype.hasOwnProperty.call(n, r) && (e[r] = n[r]);
908
970
  }
909
971
  return e;
910
- }, be.apply(this, arguments);
972
+ }, ye.apply(this, arguments);
911
973
  }
912
- var cr = function(t) {
913
- return /* @__PURE__ */ k.createElement("svg", be({
974
+ var fn = function(t) {
975
+ return /* @__PURE__ */ _.createElement("svg", ye({
914
976
  xmlns: "http://www.w3.org/2000/svg",
915
977
  width: 24,
916
978
  height: 24,
917
979
  fill: "none",
918
980
  viewBox: "0 0 24 24"
919
- }, t), Qe || (Qe = /* @__PURE__ */ k.createElement("path", {
981
+ }, t), et || (et = /* @__PURE__ */ _.createElement("path", {
920
982
  fill: "currentColor",
921
983
  d: "M17.25 3H6.75A3.754 3.754 0 0 0 3 6.75v10.5A3.754 3.754 0 0 0 6.75 21h10.5A3.754 3.754 0 0 0 21 17.25V6.75A3.754 3.754 0 0 0 17.25 3Zm2.25 14.25c0 1.24-1.01 2.25-2.25 2.25H6.75c-1.24 0-2.25-1.01-2.25-2.25V6.75c0-1.24 1.01-2.25 2.25-2.25h10.5c1.24 0 2.25 1.01 2.25 2.25v10.5Zm-6.09-9.466-5.031 5.03a2.981 2.981 0 0 0-.879 2.121v1.19c0 .415.336.75.75.75h1.19c.8 0 1.554-.312 2.12-.879l5.03-5.03a2.252 2.252 0 0 0 0-3.182c-.85-.85-2.331-.85-3.18 0Zm-2.91 7.151c-.28.28-.666.44-1.06.44H9v-.44c0-.4.156-.777.44-1.06l3.187-3.188 1.06 1.061-3.187 3.188Zm5.03-5.03-.782.783-1.06-1.061.782-.782a.766.766 0 0 1 1.06 0 .75.75 0 0 1 0 1.06Z"
922
984
  })));
923
- }, et, tt;
924
- function ye() {
925
- return ye = Object.assign ? Object.assign.bind() : function(e) {
985
+ }, tt, nt;
986
+ function we() {
987
+ return we = Object.assign ? Object.assign.bind() : function(e) {
926
988
  for (var t = 1; t < arguments.length; t++) {
927
- var r = arguments[t];
928
- for (var n in r)
929
- Object.prototype.hasOwnProperty.call(r, n) && (e[n] = r[n]);
989
+ var n = arguments[t];
990
+ for (var r in n)
991
+ Object.prototype.hasOwnProperty.call(n, r) && (e[r] = n[r]);
930
992
  }
931
993
  return e;
932
- }, ye.apply(this, arguments);
994
+ }, we.apply(this, arguments);
933
995
  }
934
- var ur = function(t) {
935
- return /* @__PURE__ */ k.createElement("svg", ye({
996
+ var dn = function(t) {
997
+ return /* @__PURE__ */ _.createElement("svg", we({
936
998
  xmlns: "http://www.w3.org/2000/svg",
937
999
  width: 24,
938
1000
  height: 24,
939
1001
  fill: "none",
940
1002
  viewBox: "0 0 24 24"
941
- }, t), et || (et = /* @__PURE__ */ k.createElement("path", {
1003
+ }, t), tt || (tt = /* @__PURE__ */ _.createElement("path", {
942
1004
  fill: "currentColor",
943
1005
  d: "M6.75 3h5.5v1.5h-5.5C5.51 4.5 4.5 5.51 4.5 6.75v10.5c0 1.24 1.01 2.25 2.25 2.25h10.5c1.24 0 2.25-1.01 2.25-2.25v-5.5H21v5.5A3.754 3.754 0 0 1 17.25 21H6.75A3.754 3.754 0 0 1 3 17.25V6.75A3.754 3.754 0 0 1 6.75 3Z"
944
- })), tt || (tt = /* @__PURE__ */ k.createElement("path", {
1006
+ })), nt || (nt = /* @__PURE__ */ _.createElement("path", {
945
1007
  fill: "currentColor",
946
1008
  d: "M20.013 3h-3.946a.987.987 0 0 0 0 1.973h1.564l-6.342 6.342a1.004 1.004 0 0 0 0 1.396 1.004 1.004 0 0 0 1.396 0l6.342-6.342v1.564a.987.987 0 0 0 1.973 0V3.987A.987.987 0 0 0 20.013 3Z"
947
1009
  })));
948
1010
  };
949
- function ut({ node: e, depth: t, deleteHandle: r, indexOrName: n, parent: l, editHandle: i, parentPath: o }) {
950
- const { collapseStringsAfterLength: c, enableClipboard: u, editable: d, src: p, onDelete: v, onChange: y, customizeNode: w, matchesURL: b, urlRegExp: C, EditComponent: N, DoneComponent: E, CancelComponent: D, CustomOperation: I } = J(W);
951
- let h;
952
- if (typeof w == "function" && (h = Ee(w, [{ node: e, depth: t, indexOrName: n }])), h) {
953
- if (mt(h))
954
- return h;
955
- if (er(h)) {
956
- const j = h;
957
- return a.jsx(j, { node: e, depth: t, indexOrName: n });
1011
+ function ft({ node: e, depth: t, deleteHandle: n, indexOrName: r, parent: l, editHandle: i, parentPath: o }) {
1012
+ const { collapseStringsAfterLength: c, enableClipboard: u, editable: d, src: g, onDelete: m, onChange: y, customizeNode: E, matchesURL: w, urlRegExp: C, EditComponent: N, DoneComponent: A, CancelComponent: D, CustomOperation: P } = J(W);
1013
+ let v;
1014
+ if (typeof E == "function" && (v = Ae(E, [{ node: e, depth: t, indexOrName: r }])), v) {
1015
+ if (vt(v))
1016
+ return v;
1017
+ if (tn(v)) {
1018
+ const h = v;
1019
+ return a.jsx(h, { node: e, depth: t, indexOrName: r });
958
1020
  }
959
1021
  }
960
1022
  if (Array.isArray(e) || B(e))
961
- return a.jsx(ir, { parent: l, node: e, depth: t, indexOrName: n, deleteHandle: r, parentPath: o, customOptions: typeof h == "object" ? h : void 0 });
1023
+ return a.jsx(cn, { parent: l, node: e, depth: t, indexOrName: r, deleteHandle: n, parentPath: o, customOptions: typeof v == "object" ? v : void 0 });
962
1024
  {
963
- const j = typeof e, A = typeof n < "u" ? [...o, String(n)] : o, [x, Z] = H(!1), [O, V] = H(!1), P = xe(null), L = () => {
964
- Z(!0), setTimeout(() => {
965
- var f, m;
966
- (f = window.getSelection()) === null || f === void 0 || f.selectAllChildren(P.current), (m = P.current) === null || m === void 0 || m.focus();
1025
+ const h = typeof e, S = typeof r < "u" ? [...o, String(r)] : o, [x, H] = F(!1), [O, Y] = F(!1), R = Ce(null), L = () => {
1026
+ H(!0), setTimeout(() => {
1027
+ var f, j;
1028
+ (f = window.getSelection()) === null || f === void 0 || f.selectAllChildren(R.current), (j = R.current) === null || j === void 0 || j.focus();
967
1029
  });
968
- }, $ = re(() => {
969
- let f = P.current.innerText;
1030
+ }, U = ne(() => {
1031
+ let f = R.current.innerText;
970
1032
  try {
971
- const m = JSON.parse(f);
972
- i && i(n, m, e, o);
1033
+ const j = JSON.parse(f);
1034
+ i && i(r, j, e, o);
973
1035
  } catch {
974
- const Y = rr(j, f);
975
- i && i(n, Y, e, o);
1036
+ const z = rn(h, f);
1037
+ i && i(r, z, e, o);
976
1038
  }
977
- Z(!1);
978
- }, [i, n, e, o, j]), z = () => {
979
- Z(!1), V(!1);
1039
+ H(!1);
1040
+ }, [i, r, e, o, h]), Z = () => {
1041
+ H(!1), Y(!1);
980
1042
  }, T = () => {
981
- V(!1), r && r(n, o), v && v({
1043
+ Y(!1), n && n(r, o), m && m({
982
1044
  value: e,
983
1045
  depth: t,
984
- src: p,
985
- indexOrName: n,
1046
+ src: g,
1047
+ indexOrName: r,
986
1048
  parentType: Array.isArray(l) ? "array" : "object",
987
1049
  parentPath: o
988
1050
  }), y && y({
989
1051
  depth: t,
990
- src: p,
991
- indexOrName: n,
1052
+ src: g,
1053
+ indexOrName: r,
992
1054
  parentType: Array.isArray(l) ? "array" : "object",
993
1055
  type: "delete",
994
1056
  parentPath: o
995
1057
  });
996
- }, M = re((f) => {
997
- f.key === "Enter" ? (f.preventDefault(), $()) : f.key === "Escape" && z();
998
- }, [$]), _ = x || O, U = !_ && Fe(d) && He(h) && i ? (f) => {
1058
+ }, $ = ne((f) => {
1059
+ f.key === "Enter" ? (f.preventDefault(), U()) : f.key === "Escape" && Z();
1060
+ }, [U]), k = x || O, V = !k && He(d) && Ue(v) && i ? (f) => {
999
1061
  (f.ctrlKey || f.metaKey) && L();
1000
- } : void 0, F = a.jsxs(a.Fragment, { children: [_ && (typeof E == "function" ? a.jsx(E, { className: "json-view--edit", style: { display: "inline-block" }, onClick: O ? T : $ }) : a.jsx(Te, { className: "json-view--edit", style: { display: "inline-block" }, onClick: O ? T : $ })), _ && (typeof D == "function" ? a.jsx(D, { className: "json-view--edit", style: { display: "inline-block" }, onClick: z }) : a.jsx(Ne, { className: "json-view--edit", style: { display: "inline-block" }, onClick: z })), !_ && u && oe(h) && a.jsx(ie, { node: e, nodeMeta: { depth: t, indexOrName: n, parent: l, parentPath: o, currentPath: A } }), !_ && b && j === "string" && C.test(e) && tr(h) && a.jsx("a", Object.assign({ href: e, target: "_blank", className: "json-view--link" }, { children: a.jsx(ur, {}) })), !_ && Fe(d) && He(h) && i && (typeof N == "function" ? a.jsx(N, { className: "json-view--edit", onClick: L }) : a.jsx(cr, { className: "json-view--edit", onClick: L })), !_ && Ae(d) && Se(h) && r && a.jsx(ke, { className: "json-view--edit", onClick: () => V(!0) }), typeof I == "function" ? a.jsx(I, { node: e }) : null] });
1001
- let S = "json-view--string";
1002
- switch (j) {
1062
+ } : void 0, M = a.jsxs(a.Fragment, { children: [k && (typeof A == "function" ? a.jsx(A, { className: "json-view--edit", style: { display: "inline-block" }, onClick: O ? T : U }) : a.jsx(Ne, { className: "json-view--edit", style: { display: "inline-block" }, onClick: O ? T : U })), k && (typeof D == "function" ? a.jsx(D, { className: "json-view--edit", style: { display: "inline-block" }, onClick: Z }) : a.jsx(Oe, { className: "json-view--edit", style: { display: "inline-block" }, onClick: Z })), !k && u && oe(v) && a.jsx(ie, { node: e, nodeMeta: { depth: t, indexOrName: r, parent: l, parentPath: o, currentPath: S } }), !k && w && h === "string" && C.test(e) && nn(v) && a.jsx("a", Object.assign({ href: e, target: "_blank", className: "json-view--link" }, { children: a.jsx(dn, {}) })), !k && He(d) && Ue(v) && i && (typeof N == "function" ? a.jsx(N, { className: "json-view--edit", onClick: L }) : a.jsx(fn, { className: "json-view--edit", onClick: L })), !k && Se(d) && ke(v) && n && a.jsx(Te, { className: "json-view--edit", onClick: () => Y(!0) }), typeof P == "function" ? a.jsx(P, { node: e }) : null] });
1063
+ let s = "json-view--string";
1064
+ switch (h) {
1003
1065
  case "number":
1004
1066
  case "bigint":
1005
- S = "json-view--number";
1067
+ s = "json-view--number";
1006
1068
  break;
1007
1069
  case "boolean":
1008
- S = "json-view--boolean";
1070
+ s = "json-view--boolean";
1009
1071
  break;
1010
1072
  case "object":
1011
- S = "json-view--null";
1073
+ s = "json-view--null";
1012
1074
  break;
1013
1075
  }
1014
- typeof h?.className == "string" && (S += " " + h.className), O && (S += " json-view--deleting");
1015
- let s = String(e);
1016
- j === "bigint" && (s += "n");
1017
- const g = se(() => a.jsx("span", { contentEditable: !0, className: S, dangerouslySetInnerHTML: { __html: j === "string" ? `"${s}"` : s }, ref: P, onKeyDown: M }), [s, j, M]);
1018
- return j === "string" ? a.jsxs(a.Fragment, { children: [x ? g : e.length > c ? a.jsx(lr, { str: e, ref: P, className: S, ctrlClick: U }) : a.jsxs("span", Object.assign({ className: S, onClick: U }, { children: ['"', s, '"'] })), F] }) : a.jsxs(a.Fragment, { children: [x ? g : a.jsx("span", Object.assign({ className: S, onClick: U }, { children: s })), F] });
1076
+ typeof v?.className == "string" && (s += " " + v.className), O && (s += " json-view--deleting");
1077
+ let p = String(e);
1078
+ h === "bigint" && (p += "n");
1079
+ const b = se(() => a.jsx("span", { contentEditable: !0, className: s, dangerouslySetInnerHTML: { __html: h === "string" ? `"${p}"` : p }, ref: R, onKeyDown: $ }), [p, h, $]);
1080
+ return h === "string" ? a.jsxs(a.Fragment, { children: [x ? b : e.length > c ? a.jsx(un, { str: e, ref: R, className: s, ctrlClick: V }) : a.jsxs("span", Object.assign({ className: s, onClick: V }, { children: ['"', p, '"'] })), M] }) : a.jsxs(a.Fragment, { children: [x ? b : a.jsx("span", Object.assign({ className: s, onClick: V }, { children: p })), M] });
1019
1081
  }
1020
1082
  }
1021
- const ft = /^(((ht|f)tps?):\/\/)?([^!@#$%^&*?.\s-]([^!@#$%^&*?.\s]{0,63}[^!@#$%^&*?.\s])?\.)+[a-z]{2,6}\/?/, W = gt({
1083
+ const dt = /^(((ht|f)tps?):\/\/)?([^!@#$%^&*?.\s-]([^!@#$%^&*?.\s]{0,63}[^!@#$%^&*?.\s])?\.)+[a-z]{2,6}\/?/, W = mt({
1022
1084
  src: void 0,
1023
1085
  collapseStringsAfterLength: 99,
1024
1086
  collapseStringMode: "directly",
@@ -1035,12 +1097,12 @@ const ft = /^(((ht|f)tps?):\/\/)?([^!@#$%^&*?.\s-]([^!@#$%^&*?.\s]{0,63}[^!@#$%^
1035
1097
  forceUpdate: () => {
1036
1098
  },
1037
1099
  customizeNode: void 0,
1038
- customizeCopy: (() => {
1039
- }),
1100
+ customizeCopy: () => {
1101
+ },
1040
1102
  displaySize: void 0,
1041
1103
  displayArrayIndex: !0,
1042
1104
  matchesURL: !1,
1043
- urlRegExp: ft,
1105
+ urlRegExp: dt,
1044
1106
  ignoreLargeArray: !1,
1045
1107
  CopyComponent: void 0,
1046
1108
  CopiedComponent: void 0,
@@ -1049,108 +1111,108 @@ const ft = /^(((ht|f)tps?):\/\/)?([^!@#$%^&*?.\s-]([^!@#$%^&*?.\s]{0,63}[^!@#$%^
1049
1111
  DoneComponent: void 0,
1050
1112
  CustomOperation: void 0
1051
1113
  });
1052
- function fr({ src: e, collapseStringsAfterLength: t = 99, collapseStringMode: r = "directly", customizeCollapseStringUI: n, collapseObjectsAfterLength: l = 99, collapsed: i, onCollapse: o, enableClipboard: c = !0, editable: u = !1, onEdit: d, onDelete: p, onAdd: v, onChange: y, dark: w = !1, theme: b = "default", customizeNode: C, customizeCopy: N = (z) => Xt(z), displaySize: E, displayArrayIndex: D = !0, style: I, className: h, matchesURL: j = !1, urlRegExp: A = ft, ignoreLargeArray: x = !1, CopyComponent: Z, CopiedComponent: O, EditComponent: V, CancelComponent: P, DoneComponent: L, CustomOperation: $ }) {
1053
- const [z, T] = H(0), M = re(() => T((F) => ++F), []), [_, U] = H(e);
1054
- return we(() => U(e), [e]), a.jsx(W.Provider, Object.assign({ value: {
1055
- src: _,
1114
+ function pn({ src: e, collapseStringsAfterLength: t = 99, collapseStringMode: n = "directly", customizeCollapseStringUI: r, collapseObjectsAfterLength: l = 99, collapsed: i, onCollapse: o, enableClipboard: c = !0, editable: u = !1, onEdit: d, onDelete: g, onAdd: m, onChange: y, dark: E = !1, theme: w = "default", customizeNode: C, customizeCopy: N = (Z) => Qt(Z), displaySize: A, displayArrayIndex: D = !0, style: P, className: v, matchesURL: h = !1, urlRegExp: S = dt, ignoreLargeArray: x = !1, CopyComponent: H, CopiedComponent: O, EditComponent: Y, CancelComponent: R, DoneComponent: L, CustomOperation: U }) {
1115
+ const [Z, T] = F(0), $ = ne(() => T((M) => ++M), []), [k, V] = F(e);
1116
+ return xe(() => V(e), [e]), a.jsx(W.Provider, Object.assign({ value: {
1117
+ src: k,
1056
1118
  collapseStringsAfterLength: t,
1057
- collapseStringMode: r,
1058
- customizeCollapseStringUI: n,
1119
+ collapseStringMode: n,
1120
+ customizeCollapseStringUI: r,
1059
1121
  collapseObjectsAfterLength: l,
1060
1122
  collapsed: i,
1061
1123
  onCollapse: o,
1062
1124
  enableClipboard: c,
1063
1125
  editable: u,
1064
1126
  onEdit: d,
1065
- onDelete: p,
1066
- onAdd: v,
1127
+ onDelete: g,
1128
+ onAdd: m,
1067
1129
  onChange: y,
1068
- forceUpdate: M,
1130
+ forceUpdate: $,
1069
1131
  customizeNode: C,
1070
1132
  customizeCopy: N,
1071
- displaySize: E,
1133
+ displaySize: A,
1072
1134
  displayArrayIndex: D,
1073
- matchesURL: j,
1074
- urlRegExp: A,
1135
+ matchesURL: h,
1136
+ urlRegExp: S,
1075
1137
  ignoreLargeArray: x,
1076
- CopyComponent: Z,
1138
+ CopyComponent: H,
1077
1139
  CopiedComponent: O,
1078
- EditComponent: V,
1079
- CancelComponent: P,
1140
+ EditComponent: Y,
1141
+ CancelComponent: R,
1080
1142
  DoneComponent: L,
1081
- CustomOperation: $
1082
- } }, { children: a.jsx("code", Object.assign({ className: "json-view" + (w ? " dark" : "") + (b && b !== "default" ? " json-view_" + b : "") + (h ? " " + h : ""), style: I }, { children: a.jsx(ut, { node: _, depth: 1, editHandle: (F, S, s, g) => {
1083
- U(S), d && d({
1084
- newValue: S,
1085
- oldValue: s,
1143
+ CustomOperation: U
1144
+ } }, { children: a.jsx("code", Object.assign({ className: "json-view" + (E ? " dark" : "") + (w && w !== "default" ? " json-view_" + w : "") + (v ? " " + v : ""), style: P }, { children: a.jsx(ft, { node: k, depth: 1, editHandle: (M, s, p, b) => {
1145
+ V(s), d && d({
1146
+ newValue: s,
1147
+ oldValue: p,
1086
1148
  depth: 1,
1087
- src: _,
1088
- indexOrName: F,
1149
+ src: k,
1150
+ indexOrName: M,
1089
1151
  parentType: null,
1090
- parentPath: g
1091
- }), y && y({ type: "edit", depth: 1, src: _, indexOrName: F, parentType: null, parentPath: g });
1092
- }, deleteHandle: (F, S) => {
1093
- U(void 0), p && p({
1094
- value: _,
1152
+ parentPath: b
1153
+ }), y && y({ type: "edit", depth: 1, src: k, indexOrName: M, parentType: null, parentPath: b });
1154
+ }, deleteHandle: (M, s) => {
1155
+ V(void 0), g && g({
1156
+ value: k,
1095
1157
  depth: 1,
1096
- src: _,
1097
- indexOrName: F,
1158
+ src: k,
1159
+ indexOrName: M,
1098
1160
  parentType: null,
1099
- parentPath: S
1161
+ parentPath: s
1100
1162
  }), y && y({
1101
1163
  depth: 1,
1102
- src: _,
1103
- indexOrName: F,
1164
+ src: k,
1165
+ indexOrName: M,
1104
1166
  parentType: null,
1105
1167
  type: "delete",
1106
- parentPath: S
1168
+ parentPath: s
1107
1169
  });
1108
1170
  }, parentPath: [] }) })) }));
1109
1171
  }
1110
- const dr = ["id", "msg", "time", "level", "step", "flows", "traceId"], pr = ({ log: e, onClose: t }) => {
1111
- const [r, n] = H(!1), l = se(() => {
1172
+ const gn = ["id", "msg", "time", "level", "step", "flows", "traceId"], mn = ({ log: e, onClose: t }) => {
1173
+ const [n, r] = F(!1), l = se(() => {
1112
1174
  if (!e)
1113
1175
  return null;
1114
- const i = Object.keys(e ?? {}).filter((o) => !dr.includes(o));
1115
- return n(i.length > 0), i.reduce(
1176
+ const i = Object.keys(e ?? {}).filter((o) => !gn.includes(o));
1177
+ return r(i.length > 0), i.reduce(
1116
1178
  (o, c) => (o[c] = e[c], o),
1117
1179
  {}
1118
1180
  );
1119
1181
  }, [e]);
1120
1182
  return e ? /* @__PURE__ */ a.jsx(
1121
- vt,
1183
+ ht,
1122
1184
  {
1123
1185
  onClose: t,
1124
1186
  title: "Logs Details",
1125
1187
  subtitle: "Details including custom properties",
1126
- actions: [{ icon: /* @__PURE__ */ a.jsx(st, {}), onClick: t, label: "Close" }],
1188
+ actions: [{ icon: /* @__PURE__ */ a.jsx(ot, {}), onClick: t, label: "Close" }],
1127
1189
  details: [
1128
1190
  {
1129
1191
  label: "Level",
1130
1192
  value: /* @__PURE__ */ a.jsxs("div", { className: "flex items-center gap-2", children: [
1131
- /* @__PURE__ */ a.jsx(nt, { level: e.level }),
1193
+ /* @__PURE__ */ a.jsx(at, { level: e.level }),
1132
1194
  /* @__PURE__ */ a.jsx("div", { className: "capitalize", children: e.level })
1133
1195
  ] })
1134
1196
  },
1135
- { label: "Time", value: ot(e.time) },
1197
+ { label: "Time", value: it(e.time) },
1136
1198
  { label: "Step", value: e.step },
1137
1199
  { label: "Flows", value: e.flows.join(", ") },
1138
1200
  { label: "Trace ID", value: e.traceId }
1139
1201
  ],
1140
- children: r && /* @__PURE__ */ a.jsx(fr, { src: l, theme: "default", enableClipboard: !0 })
1202
+ children: n && /* @__PURE__ */ a.jsx(pn, { src: l, theme: "default", enableClipboard: !0 })
1141
1203
  }
1142
1204
  ) : null;
1143
- }, hr = () => {
1144
- const e = ee((u) => u.logs), t = ee((u) => u.resetLogs), r = ee((u) => u.selectedLogId), n = ee((u) => u.selectLogId), l = se(
1145
- () => r ? e.find((u) => u.id === r) : void 0,
1146
- [e, r]
1147
- ), [i, o] = H(""), c = se(() => e.filter((u) => u.msg.toLowerCase().includes(i.toLowerCase()) || u.traceId.toLowerCase().includes(i.toLowerCase()) || u.step.toLowerCase().includes(i.toLowerCase())), [e, i]);
1205
+ }, bn = () => {
1206
+ const e = ee((u) => u.logs), t = ee((u) => u.resetLogs), n = ee((u) => u.selectedLogId), r = ee((u) => u.selectLogId), l = se(
1207
+ () => n ? e.find((u) => u.id === n) : void 0,
1208
+ [e, n]
1209
+ ), [i, o] = F(""), c = se(() => e.filter((u) => u.msg.toLowerCase().includes(i.toLowerCase()) || u.traceId.toLowerCase().includes(i.toLowerCase()) || u.step.toLowerCase().includes(i.toLowerCase())), [e, i]);
1148
1210
  return /* @__PURE__ */ a.jsxs(a.Fragment, { children: [
1149
1211
  /* @__PURE__ */ a.jsxs("div", { className: "grid grid-rows-[auto_1fr] h-full", "data-testid": "logs-container", children: [
1150
1212
  /* @__PURE__ */ a.jsxs("div", { className: "flex p-2 border-b gap-2", "data-testid": "logs-search-container", children: [
1151
1213
  /* @__PURE__ */ a.jsxs("div", { className: "flex-1 relative", children: [
1152
1214
  /* @__PURE__ */ a.jsx(
1153
- ht,
1215
+ jt,
1154
1216
  {
1155
1217
  variant: "shade",
1156
1218
  value: i,
@@ -1159,43 +1221,43 @@ const dr = ["id", "msg", "time", "level", "step", "flows", "traceId"], pr = ({ l
1159
1221
  placeholder: "Search by Trace ID or Message"
1160
1222
  }
1161
1223
  ),
1162
- /* @__PURE__ */ a.jsx(Ut, { className: "absolute left-3 top-1/2 -translate-y-1/2 w-4 h-4 text-muted-foreground/50" }),
1224
+ /* @__PURE__ */ a.jsx(Zt, { className: "absolute left-3 top-1/2 -translate-y-1/2 w-4 h-4 text-muted-foreground/50" }),
1163
1225
  /* @__PURE__ */ a.jsx(
1164
- st,
1226
+ ot,
1165
1227
  {
1166
1228
  className: "cursor-pointer absolute right-3 top-1/2 -translate-y-1/2 w-4 h-4 text-muted-foreground/50 hover:text-muted-foreground",
1167
1229
  onClick: () => o("")
1168
1230
  }
1169
1231
  )
1170
1232
  ] }),
1171
- /* @__PURE__ */ a.jsxs(jt, { variant: "default", onClick: t, className: "h-[34px]", children: [
1172
- /* @__PURE__ */ a.jsx(Vt, {}),
1233
+ /* @__PURE__ */ a.jsxs(bt, { variant: "default", onClick: t, className: "h-[34px]", children: [
1234
+ /* @__PURE__ */ a.jsx(zt, {}),
1173
1235
  " Clear"
1174
1236
  ] })
1175
1237
  ] }),
1176
- /* @__PURE__ */ a.jsx(bt, { children: /* @__PURE__ */ a.jsx(yt, { className: "font-mono font-medium", children: c.map((u, d) => /* @__PURE__ */ a.jsxs(
1177
- wt,
1238
+ /* @__PURE__ */ a.jsx(yt, { children: /* @__PURE__ */ a.jsx(wt, { className: "font-mono font-medium", children: c.map((u, d) => /* @__PURE__ */ a.jsxs(
1239
+ xt,
1178
1240
  {
1179
1241
  "data-testid": "log-row",
1180
- className: xt("font-mono font-semibold cursor-pointer border-0", {
1181
- "bg-muted-foreground/10 hover:bg-muted-foreground/20": r === u.id,
1182
- "hover:bg-muted-foreground/10": r !== u.id
1242
+ className: Ct("font-mono font-semibold cursor-pointer border-0", {
1243
+ "bg-muted-foreground/10 hover:bg-muted-foreground/20": n === u.id,
1244
+ "hover:bg-muted-foreground/10": n !== u.id
1183
1245
  }),
1184
- onClick: () => n(u.id),
1246
+ onClick: () => r(u.id),
1185
1247
  children: [
1186
1248
  /* @__PURE__ */ a.jsxs(
1187
- ne,
1249
+ re,
1188
1250
  {
1189
1251
  "data-testid": `time-${d}`,
1190
1252
  className: "whitespace-nowrap flex items-center gap-2 text-muted-foreground",
1191
1253
  children: [
1192
- /* @__PURE__ */ a.jsx(nt, { level: u.level }),
1193
- ot(u.time)
1254
+ /* @__PURE__ */ a.jsx(at, { level: u.level }),
1255
+ it(u.time)
1194
1256
  ]
1195
1257
  }
1196
1258
  ),
1197
1259
  /* @__PURE__ */ a.jsx(
1198
- ne,
1260
+ re,
1199
1261
  {
1200
1262
  "data-testid": `trace-${u.traceId}`,
1201
1263
  className: "whitespace-nowrap cursor-pointer hover:text-primary text-muted-foreground",
@@ -1203,9 +1265,9 @@ const dr = ["id", "msg", "time", "level", "step", "flows", "traceId"], pr = ({ l
1203
1265
  children: u.traceId
1204
1266
  }
1205
1267
  ),
1206
- /* @__PURE__ */ a.jsx(ne, { "data-testid": `step-${d}`, "aria-label": u.step, className: "whitespace-nowrap", children: u.step }),
1268
+ /* @__PURE__ */ a.jsx(re, { "data-testid": `step-${d}`, "aria-label": u.step, className: "whitespace-nowrap", children: u.step }),
1207
1269
  /* @__PURE__ */ a.jsx(
1208
- ne,
1270
+ re,
1209
1271
  {
1210
1272
  "data-testid": `msg-${d}`,
1211
1273
  "aria-label": u.msg,
@@ -1218,10 +1280,10 @@ const dr = ["id", "msg", "time", "level", "step", "flows", "traceId"], pr = ({ l
1218
1280
  d
1219
1281
  )) }) })
1220
1282
  ] }),
1221
- /* @__PURE__ */ a.jsx(pr, { log: l, onClose: () => n(void 0) })
1283
+ /* @__PURE__ */ a.jsx(mn, { log: l, onClose: () => r(void 0) })
1222
1284
  ] });
1223
1285
  };
1224
- Ot();
1286
+ Rt();
1225
1287
  export {
1226
- hr as LogsPage
1288
+ bn as LogsPage
1227
1289
  };