@bitux/review-layer-react 0.1.7 → 0.1.8

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.
@@ -1,6 +1,6 @@
1
- import dr, { memo as Ce, useState as N, useEffect as O, useCallback as I, useRef as pe, useMemo as We, createContext as Yr, useContext as Hr } from "react";
2
- import { createPortal as fr } from "react-dom";
3
- var Ne = { exports: {} }, fe = {};
1
+ import fr, { memo as ke, useState as W, useEffect as L, useCallback as D, useRef as ne, useMemo as Be, createContext as Hr, useContext as Gr } from "react";
2
+ import { createPortal as vr } from "react-dom";
3
+ var Me = { exports: {} }, ge = {};
4
4
  /**
5
5
  * @license React
6
6
  * react-jsx-runtime.production.min.js
@@ -10,21 +10,21 @@ var Ne = { exports: {} }, fe = {};
10
10
  * This source code is licensed under the MIT license found in the
11
11
  * LICENSE file in the root directory of this source tree.
12
12
  */
13
- var nr;
14
- function Gr() {
15
- if (nr) return fe;
16
- nr = 1;
17
- var r = dr, t = Symbol.for("react.element"), o = Symbol.for("react.fragment"), n = Object.prototype.hasOwnProperty, i = r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, s = { key: !0, ref: !0, __self: !0, __source: !0 };
18
- function u(v, f, m) {
19
- var h, w = {}, j = null, k = null;
20
- m !== void 0 && (j = "" + m), f.key !== void 0 && (j = "" + f.key), f.ref !== void 0 && (k = f.ref);
21
- for (h in f) n.call(f, h) && !s.hasOwnProperty(h) && (w[h] = f[h]);
22
- if (v && v.defaultProps) for (h in f = v.defaultProps, f) w[h] === void 0 && (w[h] = f[h]);
23
- return { $$typeof: t, type: v, key: j, ref: k, props: w, _owner: i.current };
13
+ var ir;
14
+ function Xr() {
15
+ if (ir) return ge;
16
+ ir = 1;
17
+ var r = fr, n = Symbol.for("react.element"), t = Symbol.for("react.fragment"), o = Object.prototype.hasOwnProperty, s = r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, i = { key: !0, ref: !0, __self: !0, __source: !0 };
18
+ function u(d, f, g) {
19
+ var y, S = {}, m = null, A = null;
20
+ g !== void 0 && (m = "" + g), f.key !== void 0 && (m = "" + f.key), f.ref !== void 0 && (A = f.ref);
21
+ for (y in f) o.call(f, y) && !i.hasOwnProperty(y) && (S[y] = f[y]);
22
+ if (d && d.defaultProps) for (y in f = d.defaultProps, f) S[y] === void 0 && (S[y] = f[y]);
23
+ return { $$typeof: n, type: d, key: m, ref: A, props: S, _owner: s.current };
24
24
  }
25
- return fe.Fragment = o, fe.jsx = u, fe.jsxs = u, fe;
25
+ return ge.Fragment = t, ge.jsx = u, ge.jsxs = u, ge;
26
26
  }
27
- var ve = {};
27
+ var he = {};
28
28
  /**
29
29
  * @license React
30
30
  * react-jsx-runtime.development.js
@@ -34,91 +34,91 @@ var ve = {};
34
34
  * This source code is licensed under the MIT license found in the
35
35
  * LICENSE file in the root directory of this source tree.
36
36
  */
37
- var ir;
38
- function Xr() {
39
- return ir || (ir = 1, process.env.NODE_ENV !== "production" && function() {
40
- var r = dr, t = Symbol.for("react.element"), o = Symbol.for("react.portal"), n = Symbol.for("react.fragment"), i = Symbol.for("react.strict_mode"), s = Symbol.for("react.profiler"), u = Symbol.for("react.provider"), v = Symbol.for("react.context"), f = Symbol.for("react.forward_ref"), m = Symbol.for("react.suspense"), h = Symbol.for("react.suspense_list"), w = Symbol.for("react.memo"), j = Symbol.for("react.lazy"), k = Symbol.for("react.offscreen"), D = Symbol.iterator, M = "@@iterator";
41
- function z(e) {
37
+ var ar;
38
+ function qr() {
39
+ return ar || (ar = 1, process.env.NODE_ENV !== "production" && function() {
40
+ var r = fr, n = Symbol.for("react.element"), t = Symbol.for("react.portal"), o = Symbol.for("react.fragment"), s = Symbol.for("react.strict_mode"), i = Symbol.for("react.profiler"), u = Symbol.for("react.provider"), d = Symbol.for("react.context"), f = Symbol.for("react.forward_ref"), g = Symbol.for("react.suspense"), y = Symbol.for("react.suspense_list"), S = Symbol.for("react.memo"), m = Symbol.for("react.lazy"), A = Symbol.for("react.offscreen"), z = Symbol.iterator, M = "@@iterator";
41
+ function P(e) {
42
42
  if (e === null || typeof e != "object")
43
43
  return null;
44
- var a = D && e[D] || e[M];
44
+ var a = z && e[z] || e[M];
45
45
  return typeof a == "function" ? a : null;
46
46
  }
47
- var g = r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
48
- function c(e) {
47
+ var $ = r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
48
+ function v(e) {
49
49
  {
50
50
  for (var a = arguments.length, l = new Array(a > 1 ? a - 1 : 0), p = 1; p < a; p++)
51
51
  l[p - 1] = arguments[p];
52
- x("error", e, l);
52
+ k("error", e, l);
53
53
  }
54
54
  }
55
- function x(e, a, l) {
55
+ function k(e, a, l) {
56
56
  {
57
- var p = g.ReactDebugCurrentFrame, S = p.getStackAddendum();
58
- S !== "" && (a += "%s", l = l.concat([S]));
59
- var C = l.map(function(E) {
60
- return String(E);
57
+ var p = $.ReactDebugCurrentFrame, C = p.getStackAddendum();
58
+ C !== "" && (a += "%s", l = l.concat([C]));
59
+ var T = l.map(function(_) {
60
+ return String(_);
61
61
  });
62
- C.unshift("Warning: " + a), Function.prototype.apply.call(console[e], console, C);
62
+ T.unshift("Warning: " + a), Function.prototype.apply.call(console[e], console, T);
63
63
  }
64
64
  }
65
- var A = !1, $ = !1, ae = !1, se = !1, le = !1, ee;
66
- ee = Symbol.for("react.module.reference");
67
- function re(e) {
68
- return !!(typeof e == "string" || typeof e == "function" || e === n || e === s || le || e === i || e === m || e === h || se || e === k || A || $ || ae || typeof e == "object" && e !== null && (e.$$typeof === j || e.$$typeof === w || e.$$typeof === u || e.$$typeof === v || e.$$typeof === f || // This needs to include all possible module reference object
65
+ var Y = !1, E = !1, R = !1, V = !1, q = !1, H;
66
+ H = Symbol.for("react.module.reference");
67
+ function Q(e) {
68
+ return !!(typeof e == "string" || typeof e == "function" || e === o || e === i || q || e === s || e === g || e === y || V || e === A || Y || E || R || typeof e == "object" && e !== null && (e.$$typeof === m || e.$$typeof === S || e.$$typeof === u || e.$$typeof === d || e.$$typeof === f || // This needs to include all possible module reference object
69
69
  // types supported by any Flight configuration anywhere since
70
70
  // we don't know which Flight build this will end up being used
71
71
  // with.
72
- e.$$typeof === ee || e.getModuleId !== void 0));
72
+ e.$$typeof === H || e.getModuleId !== void 0));
73
73
  }
74
- function y(e, a, l) {
74
+ function ie(e, a, l) {
75
75
  var p = e.displayName;
76
76
  if (p)
77
77
  return p;
78
- var S = a.displayName || a.name || "";
79
- return S !== "" ? l + "(" + S + ")" : l;
78
+ var C = a.displayName || a.name || "";
79
+ return C !== "" ? l + "(" + C + ")" : l;
80
80
  }
81
- function R(e) {
81
+ function h(e) {
82
82
  return e.displayName || "Context";
83
83
  }
84
- function P(e) {
84
+ function b(e) {
85
85
  if (e == null)
86
86
  return null;
87
- if (typeof e.tag == "number" && c("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."), typeof e == "function")
87
+ if (typeof e.tag == "number" && v("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."), typeof e == "function")
88
88
  return e.displayName || e.name || null;
89
89
  if (typeof e == "string")
90
90
  return e;
91
91
  switch (e) {
92
- case n:
93
- return "Fragment";
94
92
  case o:
93
+ return "Fragment";
94
+ case t:
95
95
  return "Portal";
96
- case s:
97
- return "Profiler";
98
96
  case i:
97
+ return "Profiler";
98
+ case s:
99
99
  return "StrictMode";
100
- case m:
100
+ case g:
101
101
  return "Suspense";
102
- case h:
102
+ case y:
103
103
  return "SuspenseList";
104
104
  }
105
105
  if (typeof e == "object")
106
106
  switch (e.$$typeof) {
107
- case v:
107
+ case d:
108
108
  var a = e;
109
- return R(a) + ".Consumer";
109
+ return h(a) + ".Consumer";
110
110
  case u:
111
111
  var l = e;
112
- return R(l._context) + ".Provider";
112
+ return h(l._context) + ".Provider";
113
113
  case f:
114
- return y(e, e.render, "ForwardRef");
115
- case w:
114
+ return ie(e, e.render, "ForwardRef");
115
+ case S:
116
116
  var p = e.displayName || null;
117
- return p !== null ? p : P(e.type) || "Memo";
118
- case j: {
119
- var S = e, C = S._payload, E = S._init;
117
+ return p !== null ? p : b(e.type) || "Memo";
118
+ case m: {
119
+ var C = e, T = C._payload, _ = C._init;
120
120
  try {
121
- return P(E(C));
121
+ return b(_(T));
122
122
  } catch {
123
123
  return null;
124
124
  }
@@ -126,18 +126,18 @@ function Xr() {
126
126
  }
127
127
  return null;
128
128
  }
129
- var V = Object.assign, H = 0, Z, oe, he, ue, ce, _, J;
130
- function Q() {
129
+ var O = Object.assign, I = 0, re, ae, se, fe, ve, w, ee;
130
+ function te() {
131
131
  }
132
- Q.__reactDisabledLog = !0;
133
- function q() {
132
+ te.__reactDisabledLog = !0;
133
+ function K() {
134
134
  {
135
- if (H === 0) {
136
- Z = console.log, oe = console.info, he = console.warn, ue = console.error, ce = console.group, _ = console.groupCollapsed, J = console.groupEnd;
135
+ if (I === 0) {
136
+ re = console.log, ae = console.info, se = console.warn, fe = console.error, ve = console.group, w = console.groupCollapsed, ee = console.groupEnd;
137
137
  var e = {
138
138
  configurable: !0,
139
139
  enumerable: !0,
140
- value: Q,
140
+ value: te,
141
141
  writable: !0
142
142
  };
143
143
  Object.defineProperties(console, {
@@ -150,250 +150,250 @@ function Xr() {
150
150
  groupEnd: e
151
151
  });
152
152
  }
153
- H++;
153
+ I++;
154
154
  }
155
155
  }
156
- function be() {
156
+ function xe() {
157
157
  {
158
- if (H--, H === 0) {
158
+ if (I--, I === 0) {
159
159
  var e = {
160
160
  configurable: !0,
161
161
  enumerable: !0,
162
162
  writable: !0
163
163
  };
164
164
  Object.defineProperties(console, {
165
- log: V({}, e, {
166
- value: Z
165
+ log: O({}, e, {
166
+ value: re
167
167
  }),
168
- info: V({}, e, {
169
- value: oe
168
+ info: O({}, e, {
169
+ value: ae
170
170
  }),
171
- warn: V({}, e, {
172
- value: he
171
+ warn: O({}, e, {
172
+ value: se
173
173
  }),
174
- error: V({}, e, {
175
- value: ue
174
+ error: O({}, e, {
175
+ value: fe
176
176
  }),
177
- group: V({}, e, {
178
- value: ce
177
+ group: O({}, e, {
178
+ value: ve
179
179
  }),
180
- groupCollapsed: V({}, e, {
181
- value: _
180
+ groupCollapsed: O({}, e, {
181
+ value: w
182
182
  }),
183
- groupEnd: V({}, e, {
184
- value: J
183
+ groupEnd: O({}, e, {
184
+ value: ee
185
185
  })
186
186
  });
187
187
  }
188
- H < 0 && c("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
188
+ I < 0 && v("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
189
189
  }
190
190
  }
191
- var Pe = g.ReactCurrentDispatcher, Te;
192
- function xe(e, a, l) {
191
+ var Pe = $.ReactCurrentDispatcher, je;
192
+ function ye(e, a, l) {
193
193
  {
194
- if (Te === void 0)
194
+ if (je === void 0)
195
195
  try {
196
196
  throw Error();
197
- } catch (S) {
198
- var p = S.stack.trim().match(/\n( *(at )?)/);
199
- Te = p && p[1] || "";
197
+ } catch (C) {
198
+ var p = C.stack.trim().match(/\n( *(at )?)/);
199
+ je = p && p[1] || "";
200
200
  }
201
201
  return `
202
- ` + Te + e;
202
+ ` + je + e;
203
203
  }
204
204
  }
205
- var je = !1, ye;
205
+ var Ve = !1, me;
206
206
  {
207
- var mr = typeof WeakMap == "function" ? WeakMap : Map;
208
- ye = new mr();
207
+ var wr = typeof WeakMap == "function" ? WeakMap : Map;
208
+ me = new wr();
209
209
  }
210
- function Be(e, a) {
211
- if (!e || je)
210
+ function Ue(e, a) {
211
+ if (!e || Ve)
212
212
  return "";
213
213
  {
214
- var l = ye.get(e);
214
+ var l = me.get(e);
215
215
  if (l !== void 0)
216
216
  return l;
217
217
  }
218
218
  var p;
219
- je = !0;
220
- var S = Error.prepareStackTrace;
219
+ Ve = !0;
220
+ var C = Error.prepareStackTrace;
221
221
  Error.prepareStackTrace = void 0;
222
- var C;
223
- C = Pe.current, Pe.current = null, q();
222
+ var T;
223
+ T = Pe.current, Pe.current = null, K();
224
224
  try {
225
225
  if (a) {
226
- var E = function() {
226
+ var _ = function() {
227
227
  throw Error();
228
228
  };
229
- if (Object.defineProperty(E.prototype, "props", {
229
+ if (Object.defineProperty(_.prototype, "props", {
230
230
  set: function() {
231
231
  throw Error();
232
232
  }
233
233
  }), typeof Reflect == "object" && Reflect.construct) {
234
234
  try {
235
- Reflect.construct(E, []);
236
- } catch (U) {
237
- p = U;
235
+ Reflect.construct(_, []);
236
+ } catch (G) {
237
+ p = G;
238
238
  }
239
- Reflect.construct(e, [], E);
239
+ Reflect.construct(e, [], _);
240
240
  } else {
241
241
  try {
242
- E.call();
243
- } catch (U) {
244
- p = U;
242
+ _.call();
243
+ } catch (G) {
244
+ p = G;
245
245
  }
246
- e.call(E.prototype);
246
+ e.call(_.prototype);
247
247
  }
248
248
  } else {
249
249
  try {
250
250
  throw Error();
251
- } catch (U) {
252
- p = U;
251
+ } catch (G) {
252
+ p = G;
253
253
  }
254
254
  e();
255
255
  }
256
- } catch (U) {
257
- if (U && p && typeof U.stack == "string") {
258
- for (var b = U.stack.split(`
259
- `), W = p.stack.split(`
260
- `), L = b.length - 1, F = W.length - 1; L >= 1 && F >= 0 && b[L] !== W[F]; )
261
- F--;
262
- for (; L >= 1 && F >= 0; L--, F--)
263
- if (b[L] !== W[F]) {
264
- if (L !== 1 || F !== 1)
256
+ } catch (G) {
257
+ if (G && p && typeof G.stack == "string") {
258
+ for (var x = G.stack.split(`
259
+ `), B = p.stack.split(`
260
+ `), F = x.length - 1, N = B.length - 1; F >= 1 && N >= 0 && x[F] !== B[N]; )
261
+ N--;
262
+ for (; F >= 1 && N >= 0; F--, N--)
263
+ if (x[F] !== B[N]) {
264
+ if (F !== 1 || N !== 1)
265
265
  do
266
- if (L--, F--, F < 0 || b[L] !== W[F]) {
267
- var G = `
268
- ` + b[L].replace(" at new ", " at ");
269
- return e.displayName && G.includes("<anonymous>") && (G = G.replace("<anonymous>", e.displayName)), typeof e == "function" && ye.set(e, G), G;
266
+ if (F--, N--, N < 0 || x[F] !== B[N]) {
267
+ var J = `
268
+ ` + x[F].replace(" at new ", " at ");
269
+ return e.displayName && J.includes("<anonymous>") && (J = J.replace("<anonymous>", e.displayName)), typeof e == "function" && me.set(e, J), J;
270
270
  }
271
- while (L >= 1 && F >= 0);
271
+ while (F >= 1 && N >= 0);
272
272
  break;
273
273
  }
274
274
  }
275
275
  } finally {
276
- je = !1, Pe.current = C, be(), Error.prepareStackTrace = S;
276
+ Ve = !1, Pe.current = T, xe(), Error.prepareStackTrace = C;
277
277
  }
278
- var ne = e ? e.displayName || e.name : "", K = ne ? xe(ne) : "";
279
- return typeof e == "function" && ye.set(e, K), K;
278
+ var ue = e ? e.displayName || e.name : "", oe = ue ? ye(ue) : "";
279
+ return typeof e == "function" && me.set(e, oe), oe;
280
280
  }
281
- function wr(e, a, l) {
282
- return Be(e, !1);
281
+ function _r(e, a, l) {
282
+ return Ue(e, !1);
283
283
  }
284
- function _r(e) {
284
+ function Er(e) {
285
285
  var a = e.prototype;
286
286
  return !!(a && a.isReactComponent);
287
287
  }
288
- function me(e, a, l) {
288
+ function we(e, a, l) {
289
289
  if (e == null)
290
290
  return "";
291
291
  if (typeof e == "function")
292
- return Be(e, _r(e));
292
+ return Ue(e, Er(e));
293
293
  if (typeof e == "string")
294
- return xe(e);
294
+ return ye(e);
295
295
  switch (e) {
296
- case m:
297
- return xe("Suspense");
298
- case h:
299
- return xe("SuspenseList");
296
+ case g:
297
+ return ye("Suspense");
298
+ case y:
299
+ return ye("SuspenseList");
300
300
  }
301
301
  if (typeof e == "object")
302
302
  switch (e.$$typeof) {
303
303
  case f:
304
- return wr(e.render);
305
- case w:
306
- return me(e.type, a, l);
307
- case j: {
308
- var p = e, S = p._payload, C = p._init;
304
+ return _r(e.render);
305
+ case S:
306
+ return we(e.type, a, l);
307
+ case m: {
308
+ var p = e, C = p._payload, T = p._init;
309
309
  try {
310
- return me(C(S), a, l);
310
+ return we(T(C), a, l);
311
311
  } catch {
312
312
  }
313
313
  }
314
314
  }
315
315
  return "";
316
316
  }
317
- var de = Object.prototype.hasOwnProperty, Ue = {}, Ye = g.ReactDebugCurrentFrame;
318
- function we(e) {
317
+ var pe = Object.prototype.hasOwnProperty, Ye = {}, He = $.ReactDebugCurrentFrame;
318
+ function _e(e) {
319
319
  if (e) {
320
- var a = e._owner, l = me(e.type, e._source, a ? a.type : null);
321
- Ye.setExtraStackFrame(l);
320
+ var a = e._owner, l = we(e.type, e._source, a ? a.type : null);
321
+ He.setExtraStackFrame(l);
322
322
  } else
323
- Ye.setExtraStackFrame(null);
323
+ He.setExtraStackFrame(null);
324
324
  }
325
- function Er(e, a, l, p, S) {
325
+ function Rr(e, a, l, p, C) {
326
326
  {
327
- var C = Function.call.bind(de);
328
- for (var E in e)
329
- if (C(e, E)) {
330
- var b = void 0;
327
+ var T = Function.call.bind(pe);
328
+ for (var _ in e)
329
+ if (T(e, _)) {
330
+ var x = void 0;
331
331
  try {
332
- if (typeof e[E] != "function") {
333
- var W = Error((p || "React class") + ": " + l + " type `" + E + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof e[E] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
334
- throw W.name = "Invariant Violation", W;
332
+ if (typeof e[_] != "function") {
333
+ var B = Error((p || "React class") + ": " + l + " type `" + _ + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof e[_] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
334
+ throw B.name = "Invariant Violation", B;
335
335
  }
336
- b = e[E](a, E, p, l, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
337
- } catch (L) {
338
- b = L;
336
+ x = e[_](a, _, p, l, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
337
+ } catch (F) {
338
+ x = F;
339
339
  }
340
- b && !(b instanceof Error) && (we(S), c("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).", p || "React class", l, E, typeof b), we(null)), b instanceof Error && !(b.message in Ue) && (Ue[b.message] = !0, we(S), c("Failed %s type: %s", l, b.message), we(null));
340
+ x && !(x instanceof Error) && (_e(C), v("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).", p || "React class", l, _, typeof x), _e(null)), x instanceof Error && !(x.message in Ye) && (Ye[x.message] = !0, _e(C), v("Failed %s type: %s", l, x.message), _e(null));
341
341
  }
342
342
  }
343
343
  }
344
- var Rr = Array.isArray;
345
- function Ve(e) {
346
- return Rr(e);
344
+ var Sr = Array.isArray;
345
+ function Ie(e) {
346
+ return Sr(e);
347
347
  }
348
- function Sr(e) {
348
+ function Cr(e) {
349
349
  {
350
350
  var a = typeof Symbol == "function" && Symbol.toStringTag, l = a && e[Symbol.toStringTag] || e.constructor.name || "Object";
351
351
  return l;
352
352
  }
353
353
  }
354
- function Cr(e) {
354
+ function kr(e) {
355
355
  try {
356
- return He(e), !1;
356
+ return Ge(e), !1;
357
357
  } catch {
358
358
  return !0;
359
359
  }
360
360
  }
361
- function He(e) {
361
+ function Ge(e) {
362
362
  return "" + e;
363
363
  }
364
- function Ge(e) {
365
- if (Cr(e))
366
- return c("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", Sr(e)), He(e);
364
+ function Xe(e) {
365
+ if (kr(e))
366
+ return v("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", Cr(e)), Ge(e);
367
367
  }
368
- var Xe = g.ReactCurrentOwner, kr = {
368
+ var qe = $.ReactCurrentOwner, Tr = {
369
369
  key: !0,
370
370
  ref: !0,
371
371
  __self: !0,
372
372
  __source: !0
373
- }, qe, Je;
373
+ }, Je, Ze;
374
374
  function Pr(e) {
375
- if (de.call(e, "ref")) {
375
+ if (pe.call(e, "ref")) {
376
376
  var a = Object.getOwnPropertyDescriptor(e, "ref").get;
377
377
  if (a && a.isReactWarning)
378
378
  return !1;
379
379
  }
380
380
  return e.ref !== void 0;
381
381
  }
382
- function Tr(e) {
383
- if (de.call(e, "key")) {
382
+ function jr(e) {
383
+ if (pe.call(e, "key")) {
384
384
  var a = Object.getOwnPropertyDescriptor(e, "key").get;
385
385
  if (a && a.isReactWarning)
386
386
  return !1;
387
387
  }
388
388
  return e.key !== void 0;
389
389
  }
390
- function jr(e, a) {
391
- typeof e.ref == "string" && Xe.current;
392
- }
393
390
  function Vr(e, a) {
391
+ typeof e.ref == "string" && qe.current;
392
+ }
393
+ function Ir(e, a) {
394
394
  {
395
395
  var l = function() {
396
- qe || (qe = !0, c("%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://reactjs.org/link/special-props)", a));
396
+ Je || (Je = !0, v("%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://reactjs.org/link/special-props)", a));
397
397
  };
398
398
  l.isReactWarning = !0, Object.defineProperty(e, "key", {
399
399
  get: l,
@@ -401,10 +401,10 @@ function Xr() {
401
401
  });
402
402
  }
403
403
  }
404
- function Ir(e, a) {
404
+ function Dr(e, a) {
405
405
  {
406
406
  var l = function() {
407
- Je || (Je = !0, c("%s: `ref` 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://reactjs.org/link/special-props)", a));
407
+ Ze || (Ze = !0, v("%s: `ref` 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://reactjs.org/link/special-props)", a));
408
408
  };
409
409
  l.isReactWarning = !0, Object.defineProperty(e, "ref", {
410
410
  get: l,
@@ -412,70 +412,70 @@ function Xr() {
412
412
  });
413
413
  }
414
414
  }
415
- var Or = function(e, a, l, p, S, C, E) {
416
- var b = {
415
+ var Or = function(e, a, l, p, C, T, _) {
416
+ var x = {
417
417
  // This tag allows us to uniquely identify this as a React Element
418
- $$typeof: t,
418
+ $$typeof: n,
419
419
  // Built-in properties that belong on the element
420
420
  type: e,
421
421
  key: a,
422
422
  ref: l,
423
- props: E,
423
+ props: _,
424
424
  // Record the component responsible for creating this element.
425
- _owner: C
425
+ _owner: T
426
426
  };
427
- return b._store = {}, Object.defineProperty(b._store, "validated", {
427
+ return x._store = {}, Object.defineProperty(x._store, "validated", {
428
428
  configurable: !1,
429
429
  enumerable: !1,
430
430
  writable: !0,
431
431
  value: !1
432
- }), Object.defineProperty(b, "_self", {
432
+ }), Object.defineProperty(x, "_self", {
433
433
  configurable: !1,
434
434
  enumerable: !1,
435
435
  writable: !1,
436
436
  value: p
437
- }), Object.defineProperty(b, "_source", {
437
+ }), Object.defineProperty(x, "_source", {
438
438
  configurable: !1,
439
439
  enumerable: !1,
440
440
  writable: !1,
441
- value: S
442
- }), Object.freeze && (Object.freeze(b.props), Object.freeze(b)), b;
441
+ value: C
442
+ }), Object.freeze && (Object.freeze(x.props), Object.freeze(x)), x;
443
443
  };
444
- function Dr(e, a, l, p, S) {
444
+ function Lr(e, a, l, p, C) {
445
445
  {
446
- var C, E = {}, b = null, W = null;
447
- l !== void 0 && (Ge(l), b = "" + l), Tr(a) && (Ge(a.key), b = "" + a.key), Pr(a) && (W = a.ref, jr(a, S));
448
- for (C in a)
449
- de.call(a, C) && !kr.hasOwnProperty(C) && (E[C] = a[C]);
446
+ var T, _ = {}, x = null, B = null;
447
+ l !== void 0 && (Xe(l), x = "" + l), jr(a) && (Xe(a.key), x = "" + a.key), Pr(a) && (B = a.ref, Vr(a, C));
448
+ for (T in a)
449
+ pe.call(a, T) && !Tr.hasOwnProperty(T) && (_[T] = a[T]);
450
450
  if (e && e.defaultProps) {
451
- var L = e.defaultProps;
452
- for (C in L)
453
- E[C] === void 0 && (E[C] = L[C]);
451
+ var F = e.defaultProps;
452
+ for (T in F)
453
+ _[T] === void 0 && (_[T] = F[T]);
454
454
  }
455
- if (b || W) {
456
- var F = typeof e == "function" ? e.displayName || e.name || "Unknown" : e;
457
- b && Vr(E, F), W && Ir(E, F);
455
+ if (x || B) {
456
+ var N = typeof e == "function" ? e.displayName || e.name || "Unknown" : e;
457
+ x && Ir(_, N), B && Dr(_, N);
458
458
  }
459
- return Or(e, b, W, S, p, Xe.current, E);
459
+ return Or(e, x, B, C, p, qe.current, _);
460
460
  }
461
461
  }
462
- var Ie = g.ReactCurrentOwner, Ze = g.ReactDebugCurrentFrame;
463
- function te(e) {
462
+ var De = $.ReactCurrentOwner, Qe = $.ReactDebugCurrentFrame;
463
+ function le(e) {
464
464
  if (e) {
465
- var a = e._owner, l = me(e.type, e._source, a ? a.type : null);
466
- Ze.setExtraStackFrame(l);
465
+ var a = e._owner, l = we(e.type, e._source, a ? a.type : null);
466
+ Qe.setExtraStackFrame(l);
467
467
  } else
468
- Ze.setExtraStackFrame(null);
468
+ Qe.setExtraStackFrame(null);
469
469
  }
470
470
  var Oe;
471
471
  Oe = !1;
472
- function De(e) {
473
- return typeof e == "object" && e !== null && e.$$typeof === t;
472
+ function Le(e) {
473
+ return typeof e == "object" && e !== null && e.$$typeof === n;
474
474
  }
475
- function Qe() {
475
+ function Ke() {
476
476
  {
477
- if (Ie.current) {
478
- var e = P(Ie.current.type);
477
+ if (De.current) {
478
+ var e = b(De.current.type);
479
479
  if (e)
480
480
  return `
481
481
 
@@ -484,13 +484,13 @@ Check the render method of \`` + e + "`.";
484
484
  return "";
485
485
  }
486
486
  }
487
- function Lr(e) {
487
+ function Ar(e) {
488
488
  return "";
489
489
  }
490
- var Ke = {};
490
+ var er = {};
491
491
  function zr(e) {
492
492
  {
493
- var a = Qe();
493
+ var a = Ke();
494
494
  if (!a) {
495
495
  var l = typeof e == "string" ? e : e.displayName || e.name;
496
496
  l && (a = `
@@ -500,39 +500,39 @@ Check the top-level render call using <` + l + ">.");
500
500
  return a;
501
501
  }
502
502
  }
503
- function er(e, a) {
503
+ function rr(e, a) {
504
504
  {
505
505
  if (!e._store || e._store.validated || e.key != null)
506
506
  return;
507
507
  e._store.validated = !0;
508
508
  var l = zr(a);
509
- if (Ke[l])
509
+ if (er[l])
510
510
  return;
511
- Ke[l] = !0;
511
+ er[l] = !0;
512
512
  var p = "";
513
- e && e._owner && e._owner !== Ie.current && (p = " It was passed a child from " + P(e._owner.type) + "."), te(e), c('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', l, p), te(null);
513
+ e && e._owner && e._owner !== De.current && (p = " It was passed a child from " + b(e._owner.type) + "."), le(e), v('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', l, p), le(null);
514
514
  }
515
515
  }
516
- function rr(e, a) {
516
+ function tr(e, a) {
517
517
  {
518
518
  if (typeof e != "object")
519
519
  return;
520
- if (Ve(e))
520
+ if (Ie(e))
521
521
  for (var l = 0; l < e.length; l++) {
522
522
  var p = e[l];
523
- De(p) && er(p, a);
523
+ Le(p) && rr(p, a);
524
524
  }
525
- else if (De(e))
525
+ else if (Le(e))
526
526
  e._store && (e._store.validated = !0);
527
527
  else if (e) {
528
- var S = z(e);
529
- if (typeof S == "function" && S !== e.entries)
530
- for (var C = S.call(e), E; !(E = C.next()).done; )
531
- De(E.value) && er(E.value, a);
528
+ var C = P(e);
529
+ if (typeof C == "function" && C !== e.entries)
530
+ for (var T = C.call(e), _; !(_ = T.next()).done; )
531
+ Le(_.value) && rr(_.value, a);
532
532
  }
533
533
  }
534
534
  }
535
- function Ar(e) {
535
+ function Fr(e) {
536
536
  {
537
537
  var a = e.type;
538
538
  if (a == null || typeof a == "string")
@@ -542,335 +542,353 @@ Check the top-level render call using <` + l + ">.");
542
542
  l = a.propTypes;
543
543
  else if (typeof a == "object" && (a.$$typeof === f || // Note: Memo only checks outer props here.
544
544
  // Inner props are checked in the reconciler.
545
- a.$$typeof === w))
545
+ a.$$typeof === S))
546
546
  l = a.propTypes;
547
547
  else
548
548
  return;
549
549
  if (l) {
550
- var p = P(a);
551
- Er(l, e.props, "prop", p, e);
550
+ var p = b(a);
551
+ Rr(l, e.props, "prop", p, e);
552
552
  } else if (a.PropTypes !== void 0 && !Oe) {
553
553
  Oe = !0;
554
- var S = P(a);
555
- c("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", S || "Unknown");
554
+ var C = b(a);
555
+ v("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", C || "Unknown");
556
556
  }
557
- typeof a.getDefaultProps == "function" && !a.getDefaultProps.isReactClassApproved && c("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
557
+ typeof a.getDefaultProps == "function" && !a.getDefaultProps.isReactClassApproved && v("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
558
558
  }
559
559
  }
560
- function Fr(e) {
560
+ function Nr(e) {
561
561
  {
562
562
  for (var a = Object.keys(e.props), l = 0; l < a.length; l++) {
563
563
  var p = a[l];
564
564
  if (p !== "children" && p !== "key") {
565
- te(e), c("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", p), te(null);
565
+ le(e), v("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", p), le(null);
566
566
  break;
567
567
  }
568
568
  }
569
- e.ref !== null && (te(e), c("Invalid attribute `ref` supplied to `React.Fragment`."), te(null));
569
+ e.ref !== null && (le(e), v("Invalid attribute `ref` supplied to `React.Fragment`."), le(null));
570
570
  }
571
571
  }
572
572
  var or = {};
573
- function tr(e, a, l, p, S, C) {
573
+ function nr(e, a, l, p, C, T) {
574
574
  {
575
- var E = re(e);
576
- if (!E) {
577
- var b = "";
578
- (e === void 0 || typeof e == "object" && e !== null && Object.keys(e).length === 0) && (b += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");
579
- var W = Lr();
580
- W ? b += W : b += Qe();
581
- var L;
582
- e === null ? L = "null" : Ve(e) ? L = "array" : e !== void 0 && e.$$typeof === t ? (L = "<" + (P(e.type) || "Unknown") + " />", b = " Did you accidentally export a JSX literal instead of a component?") : L = typeof e, c("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", L, b);
575
+ var _ = Q(e);
576
+ if (!_) {
577
+ var x = "";
578
+ (e === void 0 || typeof e == "object" && e !== null && Object.keys(e).length === 0) && (x += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");
579
+ var B = Ar();
580
+ B ? x += B : x += Ke();
581
+ var F;
582
+ e === null ? F = "null" : Ie(e) ? F = "array" : e !== void 0 && e.$$typeof === n ? (F = "<" + (b(e.type) || "Unknown") + " />", x = " Did you accidentally export a JSX literal instead of a component?") : F = typeof e, v("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", F, x);
583
583
  }
584
- var F = Dr(e, a, l, S, C);
585
- if (F == null)
586
- return F;
587
- if (E) {
588
- var G = a.children;
589
- if (G !== void 0)
584
+ var N = Lr(e, a, l, C, T);
585
+ if (N == null)
586
+ return N;
587
+ if (_) {
588
+ var J = a.children;
589
+ if (J !== void 0)
590
590
  if (p)
591
- if (Ve(G)) {
592
- for (var ne = 0; ne < G.length; ne++)
593
- rr(G[ne], e);
594
- Object.freeze && Object.freeze(G);
591
+ if (Ie(J)) {
592
+ for (var ue = 0; ue < J.length; ue++)
593
+ tr(J[ue], e);
594
+ Object.freeze && Object.freeze(J);
595
595
  } else
596
- c("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");
596
+ v("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");
597
597
  else
598
- rr(G, e);
598
+ tr(J, e);
599
599
  }
600
- if (de.call(a, "key")) {
601
- var K = P(e), U = Object.keys(a).filter(function(Ur) {
602
- return Ur !== "key";
603
- }), Le = U.length > 0 ? "{key: someKey, " + U.join(": ..., ") + ": ...}" : "{key: someKey}";
604
- if (!or[K + Le]) {
605
- var Br = U.length > 0 ? "{" + U.join(": ..., ") + ": ...}" : "{}";
606
- c(`A props object containing a "key" prop is being spread into JSX:
600
+ if (pe.call(a, "key")) {
601
+ var oe = b(e), G = Object.keys(a).filter(function(Yr) {
602
+ return Yr !== "key";
603
+ }), Ae = G.length > 0 ? "{key: someKey, " + G.join(": ..., ") + ": ...}" : "{key: someKey}";
604
+ if (!or[oe + Ae]) {
605
+ var Ur = G.length > 0 ? "{" + G.join(": ..., ") + ": ...}" : "{}";
606
+ v(`A props object containing a "key" prop is being spread into JSX:
607
607
  let props = %s;
608
608
  <%s {...props} />
609
609
  React keys must be passed directly to JSX without using spread:
610
610
  let props = %s;
611
- <%s key={someKey} {...props} />`, Le, K, Br, K), or[K + Le] = !0;
611
+ <%s key={someKey} {...props} />`, Ae, oe, Ur, oe), or[oe + Ae] = !0;
612
612
  }
613
613
  }
614
- return e === n ? Fr(F) : Ar(F), F;
614
+ return e === o ? Nr(N) : Fr(N), N;
615
615
  }
616
616
  }
617
- function Nr(e, a, l) {
618
- return tr(e, a, l, !0);
619
- }
620
617
  function $r(e, a, l) {
621
- return tr(e, a, l, !1);
618
+ return nr(e, a, l, !0);
619
+ }
620
+ function Mr(e, a, l) {
621
+ return nr(e, a, l, !1);
622
622
  }
623
- var Mr = $r, Wr = Nr;
624
- ve.Fragment = n, ve.jsx = Mr, ve.jsxs = Wr;
625
- }()), ve;
623
+ var Wr = Mr, Br = $r;
624
+ he.Fragment = o, he.jsx = Wr, he.jsxs = Br;
625
+ }()), he;
626
626
  }
627
- process.env.NODE_ENV === "production" ? Ne.exports = Gr() : Ne.exports = Xr();
628
- var d = Ne.exports;
629
- function qr(r) {
627
+ process.env.NODE_ENV === "production" ? Me.exports = Xr() : Me.exports = qr();
628
+ var c = Me.exports;
629
+ function Jr(r) {
630
630
  if (r.id && /^[a-zA-Z][\w-]*$/.test(r.id))
631
631
  return `#${r.id}`;
632
- const t = [];
633
- let o = r;
634
- for (; o && o.nodeType === Node.ELEMENT_NODE; ) {
635
- let n = o.nodeName.toLowerCase();
636
- if (o.id && /^[a-zA-Z][\w-]*$/.test(o.id)) {
637
- t.unshift(`#${o.id}`);
632
+ const n = [];
633
+ let t = r;
634
+ for (; t && t.nodeType === Node.ELEMENT_NODE; ) {
635
+ let o = t.nodeName.toLowerCase();
636
+ if (t.id && /^[a-zA-Z][\w-]*$/.test(t.id)) {
637
+ n.unshift(`#${t.id}`);
638
638
  break;
639
639
  }
640
- if (o.className && typeof o.className == "string") {
641
- const i = o.className.trim().split(/\s+/).filter(Boolean);
642
- if (i.length > 0) {
643
- const s = i.filter((u) => /^[a-zA-Z][\w-]*$/.test(u)).slice(0, 2).map((u) => `.${u}`).join("");
644
- s && (n += s);
640
+ if (t.className && typeof t.className == "string") {
641
+ const s = t.className.trim().split(/\s+/).filter(Boolean);
642
+ if (s.length > 0) {
643
+ const i = s.filter((u) => /^[a-zA-Z][\w-]*$/.test(u)).slice(0, 2).map((u) => `.${u}`).join("");
644
+ i && (o += i);
645
645
  }
646
646
  }
647
- if (t.length > 0) {
648
- const i = o.parentElement;
649
- if (i) {
650
- const s = Array.from(i.children).filter(
651
- (u) => u.nodeName === o.nodeName
647
+ if (n.length > 0) {
648
+ const s = t.parentElement;
649
+ if (s) {
650
+ const i = Array.from(s.children).filter(
651
+ (u) => u.nodeName === t.nodeName
652
652
  );
653
- if (s.length > 1) {
654
- const u = s.indexOf(o) + 1;
655
- n += `:nth-child(${u})`;
653
+ if (i.length > 1) {
654
+ const u = i.indexOf(t) + 1;
655
+ o += `:nth-child(${u})`;
656
656
  }
657
657
  }
658
658
  }
659
- t.unshift(n), o = o.parentElement;
659
+ n.unshift(o), t = t.parentElement;
660
660
  }
661
- return t.join(" > ");
661
+ return n.join(" > ");
662
662
  }
663
- const Jr = "[data-review-layer-root]", Zr = 16;
664
- function $e(r, t, o = Zr) {
665
- if (typeof window > "u") return { x: r, y: t };
666
- const n = o, i = o, s = window.innerWidth - o, u = window.innerHeight - o;
663
+ const Zr = "[data-review-layer-root]", Qr = 16;
664
+ function We(r, n, t = Qr) {
665
+ if (typeof window > "u") return { x: r, y: n };
666
+ const o = t, s = t, i = window.innerWidth - t, u = window.innerHeight - t;
667
667
  return {
668
- x: Math.max(n, Math.min(s, r)),
669
- y: Math.max(i, Math.min(u, t))
668
+ x: Math.max(o, Math.min(i, r)),
669
+ y: Math.max(s, Math.min(u, n))
670
670
  };
671
671
  }
672
- function vr(r) {
672
+ function pr(r) {
673
673
  if (typeof document > "u" || !r) return [];
674
- const t = [];
675
- let o = r.parentElement;
676
- for (; o && o !== document.body; ) {
677
- const n = getComputedStyle(o), i = n.overflowX, s = n.overflowY;
678
- (i === "scroll" || i === "auto" || i === "overlay" || s === "scroll" || s === "auto" || s === "overlay") && (o.scrollHeight > o.clientHeight || o.scrollWidth > o.clientWidth) && t.push(o), o = o.parentElement;
674
+ const n = [];
675
+ let t = r.parentElement;
676
+ for (; t && t !== document.body; ) {
677
+ const o = getComputedStyle(t), s = o.overflowX, i = o.overflowY;
678
+ (s === "scroll" || s === "auto" || s === "overlay" || i === "scroll" || i === "auto" || i === "overlay") && (t.scrollHeight > t.clientHeight || t.scrollWidth > t.clientWidth) && n.push(t), t = t.parentElement;
679
679
  }
680
- return t;
680
+ return n;
681
681
  }
682
- function pr(r) {
683
- var t;
682
+ function gr(r) {
683
+ var n;
684
684
  if (typeof document > "u" || !(r != null && r.trim())) return null;
685
685
  try {
686
- const o = document.querySelector(r);
687
- return !o || (t = o.closest) != null && t.call(o, Jr) ? null : o.getBoundingClientRect();
686
+ const t = document.querySelector(r);
687
+ return !t || (n = t.closest) != null && n.call(t, Zr) ? null : t.getBoundingClientRect();
688
688
  } catch {
689
689
  return null;
690
690
  }
691
691
  }
692
- function Qr(r) {
692
+ function Kr(r) {
693
693
  if (typeof window > "u")
694
694
  return { relativeX: 0, relativeY: 0 };
695
- const t = window.innerWidth, o = window.innerHeight;
695
+ const n = window.innerWidth, t = window.innerHeight;
696
696
  return {
697
- relativeX: t > 0 ? r.left / t : 0,
698
- relativeY: o > 0 ? r.top / o : 0
697
+ relativeX: n > 0 ? r.left / n : 0,
698
+ relativeY: t > 0 ? r.top / t : 0
699
699
  };
700
700
  }
701
- function gr(r) {
701
+ function hr(r) {
702
702
  if (typeof window > "u")
703
703
  return {
704
704
  x: r.x ?? 0,
705
705
  y: r.y ?? 0
706
706
  };
707
- const t = r.relativeX ?? r.relative_x ?? null, o = r.relativeY ?? r.relative_y ?? null;
708
- return t != null && o != null ? {
709
- x: t * window.innerWidth,
710
- y: o * window.innerHeight
707
+ const n = r.relativeX ?? r.relative_x ?? null, t = r.relativeY ?? r.relative_y ?? null;
708
+ return n != null && t != null ? {
709
+ x: n * window.innerWidth,
710
+ y: t * window.innerHeight
711
711
  } : {
712
712
  x: r.x ?? 0,
713
713
  y: r.y ?? 0
714
714
  };
715
715
  }
716
- function Kr(r) {
717
- const { x: t, y: o } = gr(r), n = r.width ?? 100, i = r.height ?? 40;
718
- return new DOMRect(t, o, n, i);
716
+ function et(r) {
717
+ const { x: n, y: t } = hr(r), o = r.width ?? 100, s = r.height ?? 40;
718
+ return new DOMRect(n, t, o, s);
719
719
  }
720
- function Ee(r) {
720
+ function Re(r) {
721
721
  if (r.selector) {
722
- const t = pr(r.selector);
723
- if (t != null)
724
- return { x: t.left, y: t.top };
722
+ const n = gr(r.selector);
723
+ if (n != null)
724
+ return { x: n.left, y: n.top };
725
725
  }
726
- return gr(r);
726
+ return hr(r);
727
+ }
728
+ const rt = ["path"];
729
+ function tt(r) {
730
+ return r.trim().startsWith("/") ? r.trim() : `/${r.trim()}`;
727
731
  }
728
- function Me() {
732
+ function br() {
729
733
  if (typeof window > "u") return "/";
730
734
  try {
731
- const r = new URLSearchParams(window.location.search).get("path");
732
- if (r != null && r.trim() !== "")
733
- return r.startsWith("/") ? r : `/${r}`;
735
+ const r = new URLSearchParams(window.location.search);
736
+ for (const [, t] of r) {
737
+ const o = t == null ? void 0 : t.trim();
738
+ if (o !== "" && o.startsWith("/"))
739
+ return o;
740
+ }
741
+ for (const t of rt) {
742
+ const o = r.get(t);
743
+ if (o != null && o.trim() !== "")
744
+ return tt(o);
745
+ }
746
+ const n = window.location.pathname || "/";
747
+ if (n === "/iframe.html" || n.endsWith("/iframe.html")) {
748
+ const t = r.get("id");
749
+ if (t != null && t.trim() !== "")
750
+ return `/story/${t.trim()}`;
751
+ }
734
752
  } catch {
735
753
  }
736
754
  return window.location.pathname || "/";
737
755
  }
738
- const T = {
756
+ const j = {
739
757
  PENDING: "pending",
740
758
  DEV_FIXED: "dev_fixed",
741
759
  VALIDATED: "validated"
742
- }, ar = "[review-layer API]";
743
- function X(r, t, o) {
744
- if ("status" in o) {
745
- const { status: v, statusText: f, body: m = "" } = o;
746
- let h;
747
- v === 401 ? h = "No autorizado (401). Revisa que apiKey sea correcta y esté aceptada por la API." : v === 403 ? h = "Acceso denegado (403). Revisa apiKey o permisos del proyecto." : v === 404 ? h = "Recurso no encontrado (404). Revisa apiUrl y que la ruta exista en el backend." : v >= 500 ? h = "Error del servidor (5xx). El backend puede estar caído o sobrecargado." : h = `Respuesta HTTP ${v} ${f}. Revisa la API.`, console.error(ar, r, {
748
- motivo: h,
749
- url: t,
750
- status: v,
760
+ }, sr = "[review-layer API]";
761
+ function Z(r, n, t) {
762
+ if ("status" in t) {
763
+ const { status: d, statusText: f, body: g = "" } = t;
764
+ let y;
765
+ d === 401 ? y = "No autorizado (401). Revisa que apiKey sea correcta y esté aceptada por la API." : d === 403 ? y = "Acceso denegado (403). Revisa apiKey o permisos del proyecto." : d === 404 ? y = "Recurso no encontrado (404). Revisa apiUrl y que la ruta exista en el backend." : d >= 500 ? y = "Error del servidor (5xx). El backend puede estar caído o sobrecargado." : y = `Respuesta HTTP ${d} ${f}. Revisa la API.`, console.error(sr, r, {
766
+ motivo: y,
767
+ url: n,
768
+ status: d,
751
769
  statusText: f,
752
- body: m.slice(0, 300)
770
+ body: g.slice(0, 300)
753
771
  });
754
772
  return;
755
773
  }
756
- const n = o.networkError, i = n instanceof Error ? n.message : String(n), u = n instanceof TypeError || /failed to fetch|networkerror|load failed|network request failed/i.test(i) ? "Posible CORS o error de red (servidor inalcanzable, bloqueo CORS o certificado). Revisa que apiUrl sea accesible desde este origen y que el backend permita CORS." : `Error inesperado: ${i}`;
757
- console.error(ar, r, { motivo: u, url: t, error: n });
774
+ const o = t.networkError, s = o instanceof Error ? o.message : String(o), u = o instanceof TypeError || /failed to fetch|networkerror|load failed|network request failed/i.test(s) ? "Posible CORS o error de red (servidor inalcanzable, bloqueo CORS o certificado). Revisa que apiUrl sea accesible desde este origen y que el backend permita CORS." : `Error inesperado: ${s}`;
775
+ console.error(sr, r, { motivo: u, url: n, error: o });
758
776
  }
759
- function ge(r) {
777
+ function be(r) {
760
778
  return {
761
779
  "Content-Type": "application/json",
762
780
  "x-review-key": r
763
781
  };
764
782
  }
765
- async function eo(r, t, o) {
766
- const n = `${r}/reviewers`;
767
- let i;
783
+ async function ot(r, n, t) {
784
+ const o = `${r}/reviewers`;
785
+ let s;
768
786
  try {
769
- i = await fetch(n, {
770
- headers: ge(t),
771
- signal: o == null ? void 0 : o.signal
787
+ s = await fetch(o, {
788
+ headers: be(n),
789
+ signal: t == null ? void 0 : t.signal
772
790
  });
773
791
  } catch (u) {
774
- throw X("fetchReviewers (red/CORS)", n, { networkError: u }), u;
792
+ throw Z("fetchReviewers (red/CORS)", o, { networkError: u }), u;
775
793
  }
776
- if (!i.ok) {
777
- const u = await i.text();
778
- throw X("fetchReviewers", n, { status: i.status, statusText: i.statusText, body: u }), new Error("Failed to fetch reviewers");
794
+ if (!s.ok) {
795
+ const u = await s.text();
796
+ throw Z("fetchReviewers", o, { status: s.status, statusText: s.statusText, body: u }), new Error("Failed to fetch reviewers");
779
797
  }
780
- return (await i.json()).data ?? [];
798
+ return (await s.json()).data ?? [];
781
799
  }
782
- async function ro(r, t, o) {
783
- const n = `${r}/comments`;
784
- let i;
800
+ async function nt(r, n, t) {
801
+ const o = `${r}/comments`;
802
+ let s;
785
803
  try {
786
- i = await fetch(n, {
804
+ s = await fetch(o, {
787
805
  method: "POST",
788
- headers: ge(t),
789
- body: JSON.stringify(o)
806
+ headers: be(n),
807
+ body: JSON.stringify(t)
790
808
  });
791
809
  } catch (u) {
792
- throw X("createComment (red/CORS)", n, { networkError: u }), u;
810
+ throw Z("createComment (red/CORS)", o, { networkError: u }), u;
793
811
  }
794
- if (!i.ok) {
795
- const u = await i.text();
796
- let v = "Failed to create comment";
812
+ if (!s.ok) {
813
+ const u = await s.text();
814
+ let d = "Failed to create comment";
797
815
  try {
798
- v = JSON.parse(u).message ?? v;
816
+ d = JSON.parse(u).message ?? d;
799
817
  } catch {
800
818
  }
801
- throw X("createComment", n, { status: i.status, statusText: i.statusText, body: u }), new Error(v);
819
+ throw Z("createComment", o, { status: s.status, statusText: s.statusText, body: u }), new Error(d);
802
820
  }
803
- return (await i.json()).data;
821
+ return (await s.json()).data;
804
822
  }
805
- async function oo(r, t, o, n) {
806
- const i = new URLSearchParams({ url: o }), s = `${r}/comments?${i}`;
823
+ async function it(r, n, t, o) {
824
+ const s = new URLSearchParams({ url: t }), i = `${r}/comments?${s}`;
807
825
  let u;
808
826
  try {
809
- u = await fetch(s, {
810
- headers: ge(t),
811
- signal: n == null ? void 0 : n.signal
827
+ u = await fetch(i, {
828
+ headers: be(n),
829
+ signal: o == null ? void 0 : o.signal
812
830
  });
813
831
  } catch (f) {
814
- throw X("fetchComments (red/CORS)", s, { networkError: f }), f;
832
+ throw Z("fetchComments (red/CORS)", i, { networkError: f }), f;
815
833
  }
816
834
  if (!u.ok) {
817
835
  const f = await u.text();
818
- throw X("fetchComments", s, { status: u.status, statusText: u.statusText, body: f }), new Error("Failed to fetch comments");
836
+ throw Z("fetchComments", i, { status: u.status, statusText: u.statusText, body: f }), new Error("Failed to fetch comments");
819
837
  }
820
838
  return (await u.json()).data ?? [];
821
839
  }
822
- async function to(r, t, o, n) {
823
- const i = `${r}/comments/${o}/status`;
824
- let s;
840
+ async function at(r, n, t, o) {
841
+ const s = `${r}/comments/${t}/status`;
842
+ let i;
825
843
  try {
826
- s = await fetch(i, {
844
+ i = await fetch(s, {
827
845
  method: "PATCH",
828
- headers: ge(t),
829
- body: JSON.stringify({ status: n })
846
+ headers: be(n),
847
+ body: JSON.stringify({ status: o })
830
848
  });
831
- } catch (v) {
832
- throw X("updateCommentStatus (red/CORS)", i, { networkError: v }), v;
849
+ } catch (d) {
850
+ throw Z("updateCommentStatus (red/CORS)", s, { networkError: d }), d;
833
851
  }
834
- if (!s.ok) {
835
- const v = await s.text();
836
- X("updateCommentStatus", i, { status: s.status, statusText: s.statusText, body: v });
852
+ if (!i.ok) {
853
+ const d = await i.text();
854
+ Z("updateCommentStatus", s, { status: i.status, statusText: i.statusText, body: d });
837
855
  let f = "Failed to update comment status";
838
856
  try {
839
- f = JSON.parse(v).message ?? f;
857
+ f = JSON.parse(d).message ?? f;
840
858
  } catch {
841
859
  }
842
860
  throw new Error(f);
843
861
  }
844
- return (await s.json()).data;
862
+ return (await i.json()).data;
845
863
  }
846
- async function no(r, t, o) {
847
- const n = `${r}/comments/${o}`;
848
- let i;
864
+ async function st(r, n, t) {
865
+ const o = `${r}/comments/${t}`;
866
+ let s;
849
867
  try {
850
- i = await fetch(n, {
868
+ s = await fetch(o, {
851
869
  method: "DELETE",
852
- headers: ge(t)
870
+ headers: be(n)
853
871
  });
854
- } catch (s) {
855
- throw X("deleteComment (red/CORS)", n, { networkError: s }), s;
872
+ } catch (i) {
873
+ throw Z("deleteComment (red/CORS)", o, { networkError: i }), i;
856
874
  }
857
- if (!i.ok) {
858
- const s = await i.text();
859
- X("deleteComment", n, { status: i.status, statusText: i.statusText, body: s });
875
+ if (!s.ok) {
876
+ const i = await s.text();
877
+ Z("deleteComment", o, { status: s.status, statusText: s.statusText, body: i });
860
878
  let u = "Failed to delete comment";
861
879
  try {
862
- u = JSON.parse(s).message ?? u;
880
+ u = JSON.parse(i).message ?? u;
863
881
  } catch {
864
882
  }
865
883
  throw new Error(u);
866
884
  }
867
885
  }
868
- const io = {
886
+ const lt = {
869
887
  position: "fixed",
870
888
  inset: 0,
871
889
  zIndex: 999997,
872
890
  backgroundColor: "transparent"
873
- }, ao = {
891
+ }, ut = {
874
892
  position: "fixed",
875
893
  minWidth: 320,
876
894
  maxWidth: 400,
@@ -880,7 +898,7 @@ const io = {
880
898
  borderRadius: "var(--ui-radius_8, 8px)",
881
899
  boxShadow: "0 8px 24px var(--ui-color-black-alpha-20, rgba(0,0,0,0.15))",
882
900
  zIndex: 999998
883
- }, so = {
901
+ }, ct = {
884
902
  width: "100%",
885
903
  minHeight: 80,
886
904
  padding: "var(--ui-positive-Value_200, 8px) var(--ui-positive-Value_300, 12px)",
@@ -891,14 +909,14 @@ const io = {
891
909
  fontFamily: "var(--ui-font-family-ui, 'Inter', sans-serif)",
892
910
  resize: "vertical",
893
911
  boxSizing: "border-box"
894
- }, lo = {
912
+ }, dt = {
895
913
  width: "100%",
896
914
  padding: "var(--ui-positive-Value_200, 8px) var(--ui-positive-Value_300, 12px)",
897
915
  marginBottom: "var(--ui-positive-Value_300, 12px)",
898
916
  border: "1px solid var(--ui-color-border-default, #d9d9d9)",
899
917
  borderRadius: "var(--ui-radius_6, 6px)",
900
918
  fontSize: "var(--ui-font-size-sm, 14px)"
901
- }, sr = {
919
+ }, lr = {
902
920
  padding: "var(--ui-positive-Value_200, 8px) var(--ui-positive-Value_400, 16px)",
903
921
  backgroundColor: "var(--ui-color-bg-fill-danger-default, #ff4d4f)",
904
922
  color: "var(--ui-color-text-on-color, #fff)",
@@ -908,108 +926,108 @@ const io = {
908
926
  cursor: "pointer",
909
927
  fontWeight: "var(--ui-font-weight-medium, 500)"
910
928
  };
911
- function uo({
929
+ function ft({
912
930
  apiUrl: r,
913
- apiKey: t,
914
- reviewers: o,
915
- position: n,
916
- payload: i,
917
- onClose: s,
931
+ apiKey: n,
932
+ reviewers: t,
933
+ position: o,
934
+ payload: s,
935
+ onClose: i,
918
936
  onSuccess: u
919
937
  }) {
920
- var g;
921
- const [v, f] = N(""), [m, h] = N(
922
- ((g = o[0]) == null ? void 0 : g.id) ?? 0
923
- ), [w, j] = N(!1), [k, D] = N(null);
924
- O(() => {
925
- o.length > 0 && !m && h(o[0].id);
926
- }, [o, m]);
927
- const M = I(
928
- async (c) => {
929
- if (c.preventDefault(), !(!v.trim() || !m)) {
930
- j(!0), D(null);
938
+ var $;
939
+ const [d, f] = W(""), [g, y] = W(
940
+ (($ = t[0]) == null ? void 0 : $.id) ?? 0
941
+ ), [S, m] = W(!1), [A, z] = W(null);
942
+ L(() => {
943
+ t.length > 0 && !g && y(t[0].id);
944
+ }, [t, g]);
945
+ const M = D(
946
+ async (v) => {
947
+ if (v.preventDefault(), !(!d.trim() || !g)) {
948
+ m(!0), z(null);
931
949
  try {
932
- await ro(r, t, {
933
- ...i,
934
- message: v.trim(),
935
- reviewerId: m
936
- }), u(), s();
937
- } catch (x) {
938
- D(x instanceof Error ? x.message : "Failed to send comment");
950
+ await nt(r, n, {
951
+ ...s,
952
+ message: d.trim(),
953
+ reviewerId: g
954
+ }), u(), i();
955
+ } catch (k) {
956
+ z(k instanceof Error ? k.message : "Failed to send comment");
939
957
  } finally {
940
- j(!1);
958
+ m(!1);
941
959
  }
942
960
  }
943
961
  },
944
- [r, t, i, v, m, u, s]
945
- ), z = pe(null);
946
- return O(() => {
947
- const c = (x) => {
948
- x.key === "Escape" && (x.preventDefault(), s());
962
+ [r, n, s, d, g, u, i]
963
+ ), P = ne(null);
964
+ return L(() => {
965
+ const v = (k) => {
966
+ k.key === "Escape" && (k.preventDefault(), i());
949
967
  };
950
- return document.addEventListener("keydown", c, !0), () => document.removeEventListener("keydown", c, !0);
951
- }, [s]), O(() => {
952
- const c = (x) => {
953
- const A = x.target;
954
- z.current && !z.current.contains(A) && (x.preventDefault(), x.stopPropagation(), s());
968
+ return document.addEventListener("keydown", v, !0), () => document.removeEventListener("keydown", v, !0);
969
+ }, [i]), L(() => {
970
+ const v = (k) => {
971
+ const Y = k.target;
972
+ P.current && !P.current.contains(Y) && (k.preventDefault(), k.stopPropagation(), i());
955
973
  };
956
- return document.addEventListener("mousedown", c, !0), () => document.removeEventListener("mousedown", c, !0);
957
- }, [s]), O(() => {
958
- var c;
959
- (c = z.current) == null || c.focus();
960
- }, []), /* @__PURE__ */ d.jsxs(
974
+ return document.addEventListener("mousedown", v, !0), () => document.removeEventListener("mousedown", v, !0);
975
+ }, [i]), L(() => {
976
+ var v;
977
+ (v = P.current) == null || v.focus();
978
+ }, []), /* @__PURE__ */ c.jsxs(
961
979
  "div",
962
980
  {
963
- ref: z,
981
+ ref: P,
964
982
  role: "dialog",
965
983
  "aria-modal": "true",
966
984
  tabIndex: -1,
967
985
  style: { position: "fixed", inset: 0, zIndex: 999997, outline: "none" },
968
986
  children: [
969
- /* @__PURE__ */ d.jsx(
987
+ /* @__PURE__ */ c.jsx(
970
988
  "div",
971
989
  {
972
990
  role: "presentation",
973
- style: io,
974
- onClick: s
991
+ style: lt,
992
+ onClick: i
975
993
  }
976
994
  ),
977
- /* @__PURE__ */ d.jsx(
995
+ /* @__PURE__ */ c.jsx(
978
996
  "div",
979
997
  {
980
998
  style: {
981
- ...ao,
982
- left: Math.min(n.x, typeof window < "u" ? window.innerWidth - 420 : n.x),
983
- top: n.y + 12
999
+ ...ut,
1000
+ left: Math.min(o.x, typeof window < "u" ? window.innerWidth - 420 : o.x),
1001
+ top: o.y + 12
984
1002
  },
985
- onClick: (c) => c.stopPropagation(),
986
- children: /* @__PURE__ */ d.jsxs("form", { onSubmit: M, children: [
987
- /* @__PURE__ */ d.jsx(
1003
+ onClick: (v) => v.stopPropagation(),
1004
+ children: /* @__PURE__ */ c.jsxs("form", { onSubmit: M, children: [
1005
+ /* @__PURE__ */ c.jsx(
988
1006
  "textarea",
989
1007
  {
990
1008
  placeholder: "Escribe tu comentario...",
991
- value: v,
992
- onChange: (c) => f(c.target.value),
993
- style: so,
1009
+ value: d,
1010
+ onChange: (v) => f(v.target.value),
1011
+ style: ct,
994
1012
  required: !0,
995
1013
  autoFocus: !0
996
1014
  }
997
1015
  ),
998
- /* @__PURE__ */ d.jsxs(
1016
+ /* @__PURE__ */ c.jsxs(
999
1017
  "select",
1000
1018
  {
1001
- value: m,
1002
- onChange: (c) => h(Number(c.target.value)),
1003
- style: lo,
1019
+ value: g,
1020
+ onChange: (v) => y(Number(v.target.value)),
1021
+ style: dt,
1004
1022
  required: !0,
1005
- disabled: o.length === 0,
1023
+ disabled: t.length === 0,
1006
1024
  children: [
1007
- /* @__PURE__ */ d.jsx("option", { value: "", children: o.length === 0 ? "No hay revisores (ejecuta php artisan db:seed en la API)" : "Selecciona revisor" }),
1008
- o.map((c) => /* @__PURE__ */ d.jsx("option", { value: c.id, children: c.name }, c.id))
1025
+ /* @__PURE__ */ c.jsx("option", { value: "", children: t.length === 0 ? "No hay revisores (ejecuta php artisan db:seed en la API)" : "Selecciona revisor" }),
1026
+ t.map((v) => /* @__PURE__ */ c.jsx("option", { value: v.id, children: v.name }, v.id))
1009
1027
  ]
1010
1028
  }
1011
1029
  ),
1012
- k && /* @__PURE__ */ d.jsx(
1030
+ A && /* @__PURE__ */ c.jsx(
1013
1031
  "div",
1014
1032
  {
1015
1033
  style: {
@@ -1017,30 +1035,30 @@ function uo({
1017
1035
  fontSize: "var(--ui-font-size-xs, 12px)",
1018
1036
  marginBottom: "var(--ui-positive-Value_200, 8px)"
1019
1037
  },
1020
- children: k
1038
+ children: A
1021
1039
  }
1022
1040
  ),
1023
- /* @__PURE__ */ d.jsxs("div", { style: { display: "flex", justifyContent: "flex-end", gap: "var(--ui-positive-Value_200, 8px)" }, children: [
1024
- /* @__PURE__ */ d.jsx(
1041
+ /* @__PURE__ */ c.jsxs("div", { style: { display: "flex", justifyContent: "flex-end", gap: "var(--ui-positive-Value_200, 8px)" }, children: [
1042
+ /* @__PURE__ */ c.jsx(
1025
1043
  "button",
1026
1044
  {
1027
1045
  type: "button",
1028
- onClick: s,
1046
+ onClick: i,
1029
1047
  style: {
1030
- ...sr,
1048
+ ...lr,
1031
1049
  backgroundColor: "var(--ui-color-bg-fill-secondary-default, #f0f0f0)",
1032
1050
  color: "var(--ui-color-text-primary, #333)"
1033
1051
  },
1034
1052
  children: "Cancelar"
1035
1053
  }
1036
1054
  ),
1037
- /* @__PURE__ */ d.jsx(
1055
+ /* @__PURE__ */ c.jsx(
1038
1056
  "button",
1039
1057
  {
1040
1058
  type: "submit",
1041
- style: sr,
1042
- disabled: w || o.length === 0,
1043
- children: w ? "Enviando..." : "Enviar comentario"
1059
+ style: lr,
1060
+ disabled: S || t.length === 0,
1061
+ children: S ? "Enviando..." : "Enviar comentario"
1044
1062
  }
1045
1063
  )
1046
1064
  ] })
@@ -1051,8 +1069,8 @@ function uo({
1051
1069
  }
1052
1070
  );
1053
1071
  }
1054
- const co = Ce(uo), fo = "var(--ui-color-red-500, #ef4444)";
1055
- function vo(r) {
1072
+ const vt = ke(ft), pt = "var(--ui-color-red-500, #ef4444)";
1073
+ function gt(r) {
1056
1074
  return {
1057
1075
  position: "fixed",
1058
1076
  outline: `2px solid ${r}`,
@@ -1062,82 +1080,82 @@ function vo(r) {
1062
1080
  boxSizing: "border-box"
1063
1081
  };
1064
1082
  }
1065
- const po = Ce(function({
1066
- selector: t,
1067
- active: o,
1068
- fallbackComment: n,
1069
- outlineColor: i = fo
1083
+ const ht = ke(function({
1084
+ selector: n,
1085
+ active: t,
1086
+ fallbackComment: o,
1087
+ outlineColor: s = pt
1070
1088
  }) {
1071
- const [s, u] = N(null), v = I(() => {
1072
- if (!o) {
1089
+ const [i, u] = W(null), d = D(() => {
1090
+ if (!t) {
1073
1091
  u(null);
1074
1092
  return;
1075
1093
  }
1076
- const f = t != null && t.trim() ? pr(t) : null;
1094
+ const f = n != null && n.trim() ? gr(n) : null;
1077
1095
  if (f) {
1078
1096
  u(f);
1079
1097
  return;
1080
1098
  }
1081
- if (n) {
1082
- u(Kr(n));
1099
+ if (o) {
1100
+ u(et(o));
1083
1101
  return;
1084
1102
  }
1085
1103
  u(null);
1086
- }, [t, o, n]);
1087
- return O(() => {
1088
- v();
1089
- }, [v]), O(() => {
1090
- if (o)
1091
- return window.addEventListener("scroll", v, !0), window.addEventListener("resize", v), () => {
1092
- window.removeEventListener("scroll", v, !0), window.removeEventListener("resize", v);
1104
+ }, [n, t, o]);
1105
+ return L(() => {
1106
+ d();
1107
+ }, [d]), L(() => {
1108
+ if (t)
1109
+ return window.addEventListener("scroll", d, !0), window.addEventListener("resize", d), () => {
1110
+ window.removeEventListener("scroll", d, !0), window.removeEventListener("resize", d);
1093
1111
  };
1094
- }, [o, v]), !o || s == null ? null : /* @__PURE__ */ d.jsx(
1112
+ }, [t, d]), !t || i == null ? null : /* @__PURE__ */ c.jsx(
1095
1113
  "div",
1096
1114
  {
1097
1115
  "aria-hidden": !0,
1098
1116
  style: {
1099
- ...vo(i),
1100
- left: s.left,
1101
- top: s.top,
1102
- width: s.width,
1103
- height: s.height
1117
+ ...gt(s),
1118
+ left: i.left,
1119
+ top: i.top,
1120
+ width: i.width,
1121
+ height: i.height
1104
1122
  }
1105
1123
  }
1106
1124
  );
1107
- }), Re = 32, lr = 150, ze = 250, Y = {
1125
+ }), Se = 32, ur = 150, ze = 250, X = {
1108
1126
  cardBg: "var(--ui-color-bg-surface-default, #ffffff)",
1109
1127
  cardFooterBg: "var(--ui-color-bg-surface-secondary-default, #f8fafc)",
1110
1128
  textDark: "var(--ui-color-text-primary, #333333)",
1111
1129
  textMuted: "var(--ui-color-text-secondary, #888888)",
1112
1130
  border: "var(--ui-color-border-default, #cccccc)",
1113
1131
  shadow: "var(--ui-shadow-card, 0 4px 16px rgba(0, 0, 0, 0.12))"
1114
- }, go = {
1115
- [T.PENDING]: "Pendiente",
1116
- [T.DEV_FIXED]: "Corregido",
1117
- [T.VALIDATED]: "Validado"
1118
- }, ho = {
1119
- [T.PENDING]: "PENDIENTE",
1120
- [T.DEV_FIXED]: "CORREGIDO",
1121
- [T.VALIDATED]: "VALIDADO"
1122
- }, ie = {
1123
- [T.PENDING]: "var(--ui-color-red-500, rgb(240, 69, 69))",
1124
- [T.DEV_FIXED]: "var(--ui-color-yellow-500, rgb(235, 179, 8))",
1125
- [T.VALIDATED]: "var(--ui-color-green-500, rgb(33, 196, 94))"
1126
- }, ur = {
1127
- [T.PENDING]: "var(--ui-color-bg-surface-danger-default, #fef2f2)",
1128
- [T.DEV_FIXED]: "var(--ui-color-bg-surface-warning-default, #fffbeb)",
1129
- [T.VALIDATED]: "var(--ui-color-bg-surface-success-default, #f0fdf4)"
1130
- }, Se = {
1131
- [T.PENDING]: "var(--ui-color-red-500, #ef4444)",
1132
- [T.DEV_FIXED]: "var(--ui-color-orange-500, #f59e0b)",
1133
- [T.VALIDATED]: "var(--ui-color-green-500, #22c55e)"
1132
+ }, bt = {
1133
+ [j.PENDING]: "Pendiente",
1134
+ [j.DEV_FIXED]: "Corregido",
1135
+ [j.VALIDATED]: "Validado"
1136
+ }, xt = {
1137
+ [j.PENDING]: "PENDIENTE",
1138
+ [j.DEV_FIXED]: "CORREGIDO",
1139
+ [j.VALIDATED]: "VALIDADO"
1140
+ }, ce = {
1141
+ [j.PENDING]: "var(--ui-color-red-500, rgb(240, 69, 69))",
1142
+ [j.DEV_FIXED]: "var(--ui-color-yellow-500, rgb(235, 179, 8))",
1143
+ [j.VALIDATED]: "var(--ui-color-green-500, rgb(33, 196, 94))"
1144
+ }, cr = {
1145
+ [j.PENDING]: "var(--ui-color-bg-surface-danger-default, #fef2f2)",
1146
+ [j.DEV_FIXED]: "var(--ui-color-bg-surface-warning-default, #fffbeb)",
1147
+ [j.VALIDATED]: "var(--ui-color-bg-surface-success-default, #f0fdf4)"
1148
+ }, Ce = {
1149
+ [j.PENDING]: "var(--ui-color-red-500, #ef4444)",
1150
+ [j.DEV_FIXED]: "var(--ui-color-orange-500, #f59e0b)",
1151
+ [j.VALIDATED]: "var(--ui-color-green-500, #22c55e)"
1134
1152
  };
1135
- function bo(r) {
1136
- const t = r.trim().split(/\s+/);
1137
- return t.length >= 2 ? (t[0][0] + t[t.length - 1][0]).toUpperCase() : r.slice(0, 2).toUpperCase() || "?";
1153
+ function yt(r) {
1154
+ const n = r.trim().split(/\s+/);
1155
+ return n.length >= 2 ? (n[0][0] + n[n.length - 1][0]).toUpperCase() : r.slice(0, 2).toUpperCase() || "?";
1138
1156
  }
1139
- const xo = () => /* @__PURE__ */ d.jsx("svg", { width: "12", height: "12", viewBox: "0 0 12 12", fill: "none", style: { marginRight: 4, flexShrink: 0 }, children: /* @__PURE__ */ d.jsx("path", { d: "M10 3L4.5 8.5L2 6", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }) }), yo = ({ color: r }) => /* @__PURE__ */ d.jsxs("svg", { width: "20", height: "20", viewBox: "0 0 24 24", fill: "none", style: { flexShrink: 0 }, children: [
1140
- /* @__PURE__ */ d.jsx(
1157
+ const mt = () => /* @__PURE__ */ c.jsx("svg", { width: "12", height: "12", viewBox: "0 0 12 12", fill: "none", style: { marginRight: 4, flexShrink: 0 }, children: /* @__PURE__ */ c.jsx("path", { d: "M10 3L4.5 8.5L2 6", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }) }), wt = ({ color: r }) => /* @__PURE__ */ c.jsxs("svg", { width: "20", height: "20", viewBox: "0 0 24 24", fill: "none", style: { flexShrink: 0 }, children: [
1158
+ /* @__PURE__ */ c.jsx(
1141
1159
  "path",
1142
1160
  {
1143
1161
  d: "M21 11.5a8.38 8.38 0 0 1-.9 3.8 8.5 8.5 0 0 1-7.6 4.7 8.38 8.38 0 0 1-3.8-.9L3 21l1.9-5.7a8.38 8.38 0 0 1-.9-3.8 8.5 8.5 0 0 1 4.7-7.6 8.38 8.38 0 0 1 3.8-.9h.5a8.48 8.48 0 0 1 8 8v.5z",
@@ -1148,7 +1166,7 @@ const xo = () => /* @__PURE__ */ d.jsx("svg", { width: "12", height: "12", viewB
1148
1166
  fill: "none"
1149
1167
  }
1150
1168
  ),
1151
- /* @__PURE__ */ d.jsx(
1169
+ /* @__PURE__ */ c.jsx(
1152
1170
  "path",
1153
1171
  {
1154
1172
  d: "M8 10h.01M12 10h.01M16 10h.01",
@@ -1157,12 +1175,12 @@ const xo = () => /* @__PURE__ */ d.jsx("svg", { width: "12", height: "12", viewB
1157
1175
  strokeLinecap: "round"
1158
1176
  }
1159
1177
  )
1160
- ] }), mo = (r) => ({
1178
+ ] }), _t = (r) => ({
1161
1179
  position: "fixed",
1162
- width: Re,
1163
- height: Re,
1180
+ width: Se,
1181
+ height: Se,
1164
1182
  borderRadius: "50%",
1165
- backgroundColor: ie[r] ?? ie[T.PENDING],
1183
+ backgroundColor: ce[r] ?? ce[j.PENDING],
1166
1184
  color: "var(--ui-color-text-on-color, #fff)",
1167
1185
  display: "flex",
1168
1186
  alignItems: "center",
@@ -1172,31 +1190,31 @@ const xo = () => /* @__PURE__ */ d.jsx("svg", { width: "12", height: "12", viewB
1172
1190
  boxShadow: "0 2px 8px var(--ui-color-black-alpha-20, rgba(0,0,0,0.2))",
1173
1191
  zIndex: 999998,
1174
1192
  border: "2px solid var(--ui-color-white, #fff)"
1175
- }), wo = {
1193
+ }), Et = {
1176
1194
  position: "fixed",
1177
1195
  width: ze,
1178
1196
  minWidth: ze,
1179
1197
  maxWidth: ze,
1180
1198
  boxSizing: "border-box",
1181
- backgroundColor: Y.cardBg,
1199
+ backgroundColor: X.cardBg,
1182
1200
  borderRadius: "var(--ui-radius_12, 12px)",
1183
- boxShadow: Y.shadow,
1201
+ boxShadow: X.shadow,
1184
1202
  fontSize: "var(--ui-font-size-sm, 14px)",
1185
1203
  fontFamily: "var(--ui-font-family-ui, 'Inter', sans-serif)",
1186
1204
  zIndex: 999999,
1187
1205
  pointerEvents: "auto"
1188
- }, _o = {
1206
+ }, Rt = {
1189
1207
  display: "flex",
1190
1208
  alignItems: "center",
1191
1209
  justifyContent: "space-between",
1192
1210
  gap: "var(--ui-positive-Value_250, 10px)",
1193
- borderBottom: `1px solid ${Y.border}`,
1211
+ borderBottom: `1px solid ${X.border}`,
1194
1212
  padding: "var(--ui-positive-Value_300, 12px)"
1195
- }, Eo = (r) => ({
1213
+ }, St = (r) => ({
1196
1214
  width: 40,
1197
1215
  height: 40,
1198
1216
  borderRadius: "50%",
1199
- backgroundColor: ie[r] ?? ie[T.PENDING],
1217
+ backgroundColor: ce[r] ?? ce[j.PENDING],
1200
1218
  color: "var(--ui-color-text-on-color, #fff)",
1201
1219
  border: "2px solid var(--ui-color-white, #fff)",
1202
1220
  display: "flex",
@@ -1206,18 +1224,18 @@ const xo = () => /* @__PURE__ */ d.jsx("svg", { width: "12", height: "12", viewB
1206
1224
  fontWeight: "var(--ui-font-weight-bold, 700)",
1207
1225
  flexShrink: 0,
1208
1226
  overflow: "hidden"
1209
- }), Ro = Ce(function({
1210
- reviewer: t,
1211
- status: o
1227
+ }), Ct = ke(function({
1228
+ reviewer: n,
1229
+ status: t
1212
1230
  }) {
1213
- const n = t == null ? void 0 : t.image_url, i = (t == null ? void 0 : t.name) ?? "Revisor", s = Eo(o);
1214
- if (n && n.trim()) {
1215
- const u = ie[o] ?? ie[T.PENDING];
1216
- return /* @__PURE__ */ d.jsx("div", { style: { ...s, border: `2px solid ${u}` }, children: /* @__PURE__ */ d.jsx(
1231
+ const o = n == null ? void 0 : n.image_url, s = (n == null ? void 0 : n.name) ?? "Revisor", i = St(t);
1232
+ if (o && o.trim()) {
1233
+ const u = ce[t] ?? ce[j.PENDING];
1234
+ return /* @__PURE__ */ c.jsx("div", { style: { ...i, border: `2px solid ${u}` }, children: /* @__PURE__ */ c.jsx(
1217
1235
  "img",
1218
1236
  {
1219
- src: n,
1220
- alt: i,
1237
+ src: o,
1238
+ alt: s,
1221
1239
  style: {
1222
1240
  width: "100%",
1223
1241
  height: "100%",
@@ -1227,8 +1245,8 @@ const xo = () => /* @__PURE__ */ d.jsx("svg", { width: "12", height: "12", viewB
1227
1245
  }
1228
1246
  ) });
1229
1247
  }
1230
- return /* @__PURE__ */ d.jsx("div", { style: s, children: bo(i) });
1231
- }), So = {
1248
+ return /* @__PURE__ */ c.jsx("div", { style: i, children: yt(s) });
1249
+ }), kt = {
1232
1250
  flexShrink: 0,
1233
1251
  width: "var(--ui-positive-Value_600, 24px)",
1234
1252
  height: "var(--ui-positive-Value_600, 24px)",
@@ -1236,15 +1254,15 @@ const xo = () => /* @__PURE__ */ d.jsx("svg", { width: "12", height: "12", viewB
1236
1254
  border: "none",
1237
1255
  borderRadius: "var(--ui-radius_6, 6px)",
1238
1256
  backgroundColor: "transparent",
1239
- color: Y.textDark,
1257
+ color: X.textDark,
1240
1258
  cursor: "pointer",
1241
1259
  fontSize: "var(--ui-positive-Value_450, 18px)",
1242
1260
  lineHeight: 1,
1243
1261
  display: "flex",
1244
1262
  alignItems: "center",
1245
1263
  justifyContent: "center"
1246
- }, Co = (r) => {
1247
- const t = Se[r] ?? Se[T.PENDING];
1264
+ }, Tt = (r) => {
1265
+ const n = Ce[r] ?? Ce[j.PENDING];
1248
1266
  return {
1249
1267
  display: "inline-flex",
1250
1268
  alignItems: "center",
@@ -1255,42 +1273,42 @@ const xo = () => /* @__PURE__ */ d.jsx("svg", { width: "12", height: "12", viewB
1255
1273
  fontFamily: "var(--ui-font-family-ui, 'Inter', sans-serif)",
1256
1274
  textTransform: "uppercase",
1257
1275
  letterSpacing: "0.02em",
1258
- backgroundColor: ur[r] ?? ur[T.PENDING],
1259
- color: t,
1260
- border: `1px solid ${t}`
1276
+ backgroundColor: cr[r] ?? cr[j.PENDING],
1277
+ color: n,
1278
+ border: `1px solid ${n}`
1261
1279
  };
1262
- }, ko = {
1280
+ }, Pt = {
1263
1281
  display: "block",
1264
1282
  fontSize: "var(--ui-font-size-2xs, 10px)",
1265
1283
  fontWeight: "var(--ui-font-weight-semibold, 600)",
1266
1284
  fontFamily: "var(--ui-font-family-ui, 'Inter', sans-serif)",
1267
- color: Y.textMuted,
1285
+ color: X.textMuted,
1268
1286
  textTransform: "uppercase",
1269
1287
  letterSpacing: "0.04em"
1270
- }, Po = {
1288
+ }, jt = {
1271
1289
  width: "100%",
1272
1290
  padding: "var(--ui-positive-Value_200, 8px) var(--ui-positive-Value_300, 12px)",
1273
1291
  paddingRight: "var(--ui-positive-Value_800, 32px)",
1274
1292
  fontSize: "var(--ui-font-size-xs, 13px)",
1275
1293
  fontFamily: "var(--ui-font-family-ui, 'Inter', sans-serif)",
1276
1294
  borderRadius: "var(--ui-radius_8, 8px)",
1277
- border: `1px solid ${Y.border}`,
1278
- backgroundColor: Y.cardBg,
1279
- color: Y.textDark,
1295
+ border: `1px solid ${X.border}`,
1296
+ backgroundColor: X.cardBg,
1297
+ color: X.textDark,
1280
1298
  cursor: "pointer",
1281
1299
  appearance: "none",
1282
1300
  backgroundImage: `url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23333' d='M6 8L2 4h8z'/%3E%3C/svg%3E")`,
1283
1301
  backgroundRepeat: "no-repeat",
1284
1302
  backgroundPosition: "right var(--ui-positive-Value_250, 10px) center"
1285
- }, To = {
1303
+ }, Vt = {
1286
1304
  display: "flex",
1287
1305
  alignItems: "center",
1288
1306
  justifyContent: "flex-end",
1289
1307
  gap: "var(--ui-positive-Value_200, 8px)",
1290
1308
  padding: "var(--ui-positive-Value_300, 12px)",
1291
- borderTop: `1px solid ${Y.border}`,
1292
- backgroundColor: Y.cardFooterBg
1293
- }, hr = {
1309
+ borderTop: `1px solid ${X.border}`,
1310
+ backgroundColor: X.cardFooterBg
1311
+ }, xr = {
1294
1312
  minWidth: 100,
1295
1313
  padding: "var(--ui-positive-Value_200, 8px) var(--ui-positive-Value_350, 14px)",
1296
1314
  fontSize: "var(--ui-font-size-xs, 13px)",
@@ -1299,229 +1317,229 @@ const xo = () => /* @__PURE__ */ d.jsx("svg", { width: "12", height: "12", viewB
1299
1317
  borderRadius: "var(--ui-radius_8, 8px)",
1300
1318
  cursor: "pointer",
1301
1319
  border: "none"
1302
- }, jo = {
1303
- ...hr,
1320
+ }, It = {
1321
+ ...xr,
1304
1322
  backgroundColor: "transparent",
1305
- color: Y.textDark
1306
- }, _e = "review-layer-resolve-btn", Vo = [
1323
+ color: X.textDark
1324
+ }, Ee = "review-layer-resolve-btn", Dt = [
1307
1325
  "pending",
1308
1326
  "dev_fixed",
1309
1327
  "validated"
1310
- ], Io = {
1311
- ...hr,
1328
+ ], Ot = {
1329
+ ...xr,
1312
1330
  backgroundColor: "var(--ui-color-bg-fill-success-default, #22c55e)",
1313
1331
  color: "var(--ui-color-text-on-color, #fff)"
1314
1332
  };
1315
- function Oo({
1333
+ function Lt({
1316
1334
  comment: r,
1317
- offset: t = { dx: 0, dy: 0 },
1318
- apiUrl: o,
1319
- apiKey: n,
1320
- onStatusChange: i,
1321
- reviewMode: s = !1
1335
+ offset: n = { dx: 0, dy: 0 },
1336
+ apiUrl: t,
1337
+ apiKey: o,
1338
+ onStatusChange: s,
1339
+ reviewMode: i = !1
1322
1340
  }) {
1323
- var ue, ce;
1324
- const [u, v] = N(!1), [f, m] = N(!1), [h, w] = N(() => Ee(r)), [j, k] = N(!1), [D, M] = N(null), z = pe(null), g = pe(null), c = pe(null), x = I(() => {
1325
- w(Ee(r));
1341
+ var fe, ve;
1342
+ const [u, d] = W(!1), [f, g] = W(!1), [y, S] = W(() => Re(r)), [m, A] = W(!1), [z, M] = W(null), P = ne(null), $ = ne(null), v = ne(null), k = D(() => {
1343
+ S(Re(r));
1326
1344
  }, [r]);
1327
- O(() => {
1328
- x();
1329
- }, [x]), O(() => {
1345
+ L(() => {
1346
+ k();
1347
+ }, [k]), L(() => {
1330
1348
  if (!(typeof window > "u"))
1331
- return window.addEventListener("scroll", x, !0), window.addEventListener("resize", x), () => {
1332
- window.removeEventListener("scroll", x, !0), window.removeEventListener("resize", x);
1349
+ return window.addEventListener("scroll", k, !0), window.addEventListener("resize", k), () => {
1350
+ window.removeEventListener("scroll", k, !0), window.removeEventListener("resize", k);
1333
1351
  };
1334
- }, [x]), O(() => {
1352
+ }, [k]), L(() => {
1335
1353
  if (!r.selector || typeof document > "u") return;
1336
- const _ = document.querySelector(r.selector);
1337
- if (!_) return;
1338
- const Q = vr(_).map((q) => (q.addEventListener("scroll", x, !0), () => q.removeEventListener("scroll", x, !0)));
1339
- return () => Q.forEach((q) => q());
1340
- }, [r.selector, x]);
1341
- const A = I(() => {
1342
- z.current !== null && (clearTimeout(z.current), z.current = null);
1343
- }, []), $ = I(() => {
1344
- s || (A(), v(!0));
1345
- }, [s, A]), ae = I(() => {
1346
- f || (z.current = setTimeout(() => {
1347
- z.current = null, v(!1);
1348
- }, lr));
1349
- }, [f]), se = I(() => {
1350
- A(), v(!0);
1351
- }, [A]), le = I(() => {
1352
- f || (z.current = setTimeout(() => {
1353
- z.current = null, v(!1);
1354
- }, lr));
1355
- }, [f]), ee = I(() => {
1356
- if (s) {
1357
- f && (m(!1), v(!1));
1354
+ const w = document.querySelector(r.selector);
1355
+ if (!w) return;
1356
+ const te = pr(w).map((K) => (K.addEventListener("scroll", k, !0), () => K.removeEventListener("scroll", k, !0)));
1357
+ return () => te.forEach((K) => K());
1358
+ }, [r.selector, k]);
1359
+ const Y = D(() => {
1360
+ P.current !== null && (clearTimeout(P.current), P.current = null);
1361
+ }, []), E = D(() => {
1362
+ i || (Y(), d(!0));
1363
+ }, [i, Y]), R = D(() => {
1364
+ f || (P.current = setTimeout(() => {
1365
+ P.current = null, d(!1);
1366
+ }, ur));
1367
+ }, [f]), V = D(() => {
1368
+ Y(), d(!0);
1369
+ }, [Y]), q = D(() => {
1370
+ f || (P.current = setTimeout(() => {
1371
+ P.current = null, d(!1);
1372
+ }, ur));
1373
+ }, [f]), H = D(() => {
1374
+ if (i) {
1375
+ f && (g(!1), d(!1));
1358
1376
  return;
1359
1377
  }
1360
- f ? (m(!1), v(!1)) : (m(!0), v(!0));
1361
- }, [s, f]);
1362
- O(() => {
1378
+ f ? (g(!1), d(!1)) : (g(!0), d(!0));
1379
+ }, [i, f]);
1380
+ L(() => {
1363
1381
  if (!f) return;
1364
- const _ = (J) => {
1365
- var q, be;
1366
- const Q = J.target;
1367
- (q = g.current) != null && q.contains(Q) || (be = c.current) != null && be.contains(Q) || (m(!1), v(!1));
1382
+ const w = (ee) => {
1383
+ var K, xe;
1384
+ const te = ee.target;
1385
+ (K = $.current) != null && K.contains(te) || (xe = v.current) != null && xe.contains(te) || (g(!1), d(!1));
1368
1386
  };
1369
- return document.addEventListener("mousedown", _, !0), () => document.removeEventListener("mousedown", _, !0);
1370
- }, [f]), O(() => () => A(), [A]), O(() => {
1371
- s && (m(!1), v(!1));
1372
- }, [s]);
1373
- const re = h.x + t.dx, y = h.y + t.dy, { x: R, y: P } = $e(re, y, Re / 2), V = u && !f, H = I(() => {
1374
- m(!1), v(!1);
1375
- }, []), Z = I(
1376
- async (_) => {
1377
- if (_ !== r.status) {
1378
- M(null), k(!0);
1387
+ return document.addEventListener("mousedown", w, !0), () => document.removeEventListener("mousedown", w, !0);
1388
+ }, [f]), L(() => () => Y(), [Y]), L(() => {
1389
+ i && (g(!1), d(!1));
1390
+ }, [i]);
1391
+ const Q = y.x + n.dx, ie = y.y + n.dy, { x: h, y: b } = We(Q, ie, Se / 2), O = u && !f, I = D(() => {
1392
+ g(!1), d(!1);
1393
+ }, []), re = D(
1394
+ async (w) => {
1395
+ if (w !== r.status) {
1396
+ M(null), A(!0);
1379
1397
  try {
1380
- await to(o, n, r.id, _), i();
1381
- } catch (J) {
1382
- M(J instanceof Error ? J.message : "Error al actualizar");
1398
+ await at(t, o, r.id, w), s();
1399
+ } catch (ee) {
1400
+ M(ee instanceof Error ? ee.message : "Error al actualizar");
1383
1401
  } finally {
1384
- k(!1);
1402
+ A(!1);
1385
1403
  }
1386
1404
  }
1387
1405
  },
1388
- [o, n, r.id, r.status, i]
1389
- ), oe = I(async () => {
1390
- M(null), k(!0);
1406
+ [t, o, r.id, r.status, s]
1407
+ ), ae = D(async () => {
1408
+ M(null), A(!0);
1391
1409
  try {
1392
- await no(o, n, r.id), i(), H();
1393
- } catch (_) {
1394
- M(_ instanceof Error ? _.message : "Error al eliminar");
1410
+ await st(t, o, r.id), s(), I();
1411
+ } catch (w) {
1412
+ M(w instanceof Error ? w.message : "Error al eliminar");
1395
1413
  } finally {
1396
- k(!1);
1414
+ A(!1);
1397
1415
  }
1398
- }, [o, n, r.id, i, H]), he = We(
1399
- () => ({ ...mo(r.status), left: R, top: P, transform: "translate(-50%, -50%)" }),
1400
- [r.status, R, P]
1416
+ }, [t, o, r.id, s, I]), se = Be(
1417
+ () => ({ ..._t(r.status), left: h, top: b, transform: "translate(-50%, -50%)" }),
1418
+ [r.status, h, b]
1401
1419
  );
1402
- return /* @__PURE__ */ d.jsxs(d.Fragment, { children: [
1403
- /* @__PURE__ */ d.jsx(
1404
- po,
1420
+ return /* @__PURE__ */ c.jsxs(c.Fragment, { children: [
1421
+ /* @__PURE__ */ c.jsx(
1422
+ ht,
1405
1423
  {
1406
1424
  selector: r.selector,
1407
- active: V,
1425
+ active: O,
1408
1426
  fallbackComment: r,
1409
- outlineColor: Se[r.status] ?? Se[T.PENDING]
1427
+ outlineColor: Ce[r.status] ?? Ce[j.PENDING]
1410
1428
  }
1411
1429
  ),
1412
- /* @__PURE__ */ d.jsx(
1430
+ /* @__PURE__ */ c.jsx(
1413
1431
  "div",
1414
1432
  {
1415
- ref: g,
1433
+ ref: $,
1416
1434
  role: "button",
1417
1435
  tabIndex: 0,
1418
1436
  "aria-label": `Comentario: ${r.message.slice(0, 30)}...`,
1419
1437
  "aria-expanded": u,
1420
- style: he,
1421
- onMouseEnter: $,
1422
- onMouseLeave: ae,
1423
- onClick: ee,
1424
- children: /* @__PURE__ */ d.jsx(yo, { color: "var(--ui-color-white, #fff)" })
1438
+ style: se,
1439
+ onMouseEnter: E,
1440
+ onMouseLeave: R,
1441
+ onClick: H,
1442
+ children: /* @__PURE__ */ c.jsx(wt, { color: "var(--ui-color-white, #fff)" })
1425
1443
  }
1426
1444
  ),
1427
- u && /* @__PURE__ */ d.jsxs(
1445
+ u && /* @__PURE__ */ c.jsxs(
1428
1446
  "div",
1429
1447
  {
1430
- ref: c,
1448
+ ref: v,
1431
1449
  role: "dialog",
1432
1450
  "aria-label": "Detalle del comentario",
1433
1451
  style: {
1434
- ...wo,
1435
- left: R + Re / 2 + 6,
1436
- top: P
1452
+ ...Et,
1453
+ left: h + Se / 2 + 6,
1454
+ top: b
1437
1455
  },
1438
- onMouseEnter: se,
1439
- onMouseLeave: le,
1456
+ onMouseEnter: V,
1457
+ onMouseLeave: q,
1440
1458
  children: [
1441
- /* @__PURE__ */ d.jsxs("div", { style: _o, children: [
1442
- /* @__PURE__ */ d.jsxs("div", { style: { display: "flex", alignItems: "center", gap: 10, flex: 1, minWidth: 0 }, children: [
1443
- /* @__PURE__ */ d.jsx(Ro, { reviewer: r.reviewer, status: r.status }),
1444
- /* @__PURE__ */ d.jsxs("div", { children: [
1445
- /* @__PURE__ */ d.jsx("div", { style: { fontWeight: 700, fontSize: 14, color: Y.textDark }, children: ((ue = r.reviewer) == null ? void 0 : ue.name) ?? "Revisor" }),
1446
- /* @__PURE__ */ d.jsx("div", { style: { fontSize: 12, color: Y.textMuted }, children: ((ce = r.reviewer) == null ? void 0 : ce.job_title) ?? "Revisor" })
1459
+ /* @__PURE__ */ c.jsxs("div", { style: Rt, children: [
1460
+ /* @__PURE__ */ c.jsxs("div", { style: { display: "flex", alignItems: "center", gap: 10, flex: 1, minWidth: 0 }, children: [
1461
+ /* @__PURE__ */ c.jsx(Ct, { reviewer: r.reviewer, status: r.status }),
1462
+ /* @__PURE__ */ c.jsxs("div", { children: [
1463
+ /* @__PURE__ */ c.jsx("div", { style: { fontWeight: 700, fontSize: 14, color: X.textDark }, children: ((fe = r.reviewer) == null ? void 0 : fe.name) ?? "Revisor" }),
1464
+ /* @__PURE__ */ c.jsx("div", { style: { fontSize: 12, color: X.textMuted }, children: ((ve = r.reviewer) == null ? void 0 : ve.job_title) ?? "Revisor" })
1447
1465
  ] })
1448
1466
  ] }),
1449
- /* @__PURE__ */ d.jsx(
1467
+ /* @__PURE__ */ c.jsx(
1450
1468
  "button",
1451
1469
  {
1452
1470
  type: "button",
1453
- "aria-label": r.status === T.VALIDATED ? "Eliminar comentario" : "Cerrar",
1454
- style: So,
1455
- disabled: j,
1456
- onClick: (_) => {
1457
- _.stopPropagation(), r.status === T.VALIDATED ? oe() : H();
1471
+ "aria-label": r.status === j.VALIDATED ? "Eliminar comentario" : "Cerrar",
1472
+ style: kt,
1473
+ disabled: m,
1474
+ onClick: (w) => {
1475
+ w.stopPropagation(), r.status === j.VALIDATED ? ae() : I();
1458
1476
  },
1459
- onMouseDown: (_) => _.stopPropagation(),
1477
+ onMouseDown: (w) => w.stopPropagation(),
1460
1478
  children: "✕"
1461
1479
  }
1462
1480
  )
1463
1481
  ] }),
1464
- /* @__PURE__ */ d.jsxs("div", { style: { padding: 12, display: "flex", alignItems: "flex-start", flexDirection: "column", gap: 4 }, children: [
1465
- /* @__PURE__ */ d.jsxs("div", { style: Co(r.status), children: [
1466
- r.status === T.VALIDATED && /* @__PURE__ */ d.jsx(xo, {}),
1467
- ho[r.status] ?? r.status
1482
+ /* @__PURE__ */ c.jsxs("div", { style: { padding: 12, display: "flex", alignItems: "flex-start", flexDirection: "column", gap: 4 }, children: [
1483
+ /* @__PURE__ */ c.jsxs("div", { style: Tt(r.status), children: [
1484
+ r.status === j.VALIDATED && /* @__PURE__ */ c.jsx(mt, {}),
1485
+ xt[r.status] ?? r.status
1468
1486
  ] }),
1469
- /* @__PURE__ */ d.jsx("div", { style: { color: Y.textDark, lineHeight: 1.5, marginBottom: 12, marginTop: 12 }, children: r.message }),
1470
- /* @__PURE__ */ d.jsxs("div", { style: { display: "flex", flexDirection: "column", gap: 4, width: "100%" }, children: [
1471
- /* @__PURE__ */ d.jsx("label", { style: ko, htmlFor: `comment-status-${r.id}`, children: "Cambiar estado" }),
1472
- /* @__PURE__ */ d.jsx(
1487
+ /* @__PURE__ */ c.jsx("div", { style: { color: X.textDark, lineHeight: 1.5, marginBottom: 12, marginTop: 12 }, children: r.message }),
1488
+ /* @__PURE__ */ c.jsxs("div", { style: { display: "flex", flexDirection: "column", gap: 4, width: "100%" }, children: [
1489
+ /* @__PURE__ */ c.jsx("label", { style: Pt, htmlFor: `comment-status-${r.id}`, children: "Cambiar estado" }),
1490
+ /* @__PURE__ */ c.jsx(
1473
1491
  "select",
1474
1492
  {
1475
1493
  id: `comment-status-${r.id}`,
1476
- style: Po,
1494
+ style: jt,
1477
1495
  value: r.status,
1478
- disabled: j,
1479
- onChange: (_) => Z(_.target.value),
1480
- onMouseDown: (_) => _.stopPropagation(),
1496
+ disabled: m,
1497
+ onChange: (w) => re(w.target.value),
1498
+ onMouseDown: (w) => w.stopPropagation(),
1481
1499
  "aria-label": "Cambiar estado del comentario",
1482
- children: Vo.map((_) => /* @__PURE__ */ d.jsx("option", { value: _, children: go[_] }, _))
1500
+ children: Dt.map((w) => /* @__PURE__ */ c.jsx("option", { value: w, children: bt[w] }, w))
1483
1501
  }
1484
1502
  ),
1485
- D && /* @__PURE__ */ d.jsx("div", { style: { marginTop: 8, fontSize: 11, color: "var(--ui-color-text-danger-default, rgb(240, 69, 69))" }, children: D })
1503
+ z && /* @__PURE__ */ c.jsx("div", { style: { marginTop: 8, fontSize: 11, color: "var(--ui-color-text-danger-default, rgb(240, 69, 69))" }, children: z })
1486
1504
  ] })
1487
1505
  ] }),
1488
- /* @__PURE__ */ d.jsxs("div", { style: To, children: [
1489
- /* @__PURE__ */ d.jsx(
1506
+ /* @__PURE__ */ c.jsxs("div", { style: Vt, children: [
1507
+ /* @__PURE__ */ c.jsx(
1490
1508
  "button",
1491
1509
  {
1492
1510
  type: "button",
1493
- style: jo,
1494
- onMouseDown: (_) => _.stopPropagation(),
1495
- onClick: (_) => {
1496
- _.stopPropagation(), H();
1511
+ style: It,
1512
+ onMouseDown: (w) => w.stopPropagation(),
1513
+ onClick: (w) => {
1514
+ w.stopPropagation(), I();
1497
1515
  },
1498
1516
  children: "Cerrar"
1499
1517
  }
1500
1518
  ),
1501
- r.status !== T.VALIDATED && /* @__PURE__ */ d.jsxs(d.Fragment, { children: [
1502
- /* @__PURE__ */ d.jsx("style", { children: `
1503
- .${_e}:hover:not(:disabled) {
1519
+ r.status !== j.VALIDATED && /* @__PURE__ */ c.jsxs(c.Fragment, { children: [
1520
+ /* @__PURE__ */ c.jsx("style", { children: `
1521
+ .${Ee}:hover:not(:disabled) {
1504
1522
  background-color: var(--ui-color-bg-fill-success-hover, #16a34a) !important;
1505
1523
  }
1506
- .${_e}:active:not(:disabled) {
1524
+ .${Ee}:active:not(:disabled) {
1507
1525
  background-color: var(--ui-color-bg-fill-success-pressed, #15803d) !important;
1508
1526
  }
1509
- .${_e}:disabled {
1527
+ .${Ee}:disabled {
1510
1528
  background-color: var(--ui-color-bg-fill-success-default, #22c55e) !important;
1511
1529
  opacity: 0.7;
1512
1530
  cursor: not-allowed;
1513
1531
  }
1514
1532
  ` }),
1515
- /* @__PURE__ */ d.jsx(
1533
+ /* @__PURE__ */ c.jsx(
1516
1534
  "button",
1517
1535
  {
1518
1536
  type: "button",
1519
- className: _e,
1520
- style: Io,
1521
- disabled: j,
1522
- onMouseDown: (_) => _.stopPropagation(),
1523
- onClick: (_) => {
1524
- _.stopPropagation(), Z("validated");
1537
+ className: Ee,
1538
+ style: Ot,
1539
+ disabled: m,
1540
+ onMouseDown: (w) => w.stopPropagation(),
1541
+ onClick: (w) => {
1542
+ w.stopPropagation(), re("validated");
1525
1543
  },
1526
1544
  children: "Validar"
1527
1545
  }
@@ -1533,133 +1551,134 @@ function Oo({
1533
1551
  )
1534
1552
  ] });
1535
1553
  }
1536
- const Do = Ce(Oo), Lo = 25, zo = 36;
1537
- function Ao(r) {
1538
- const t = /* @__PURE__ */ new Map();
1539
- for (let o = 0; o < r.length; o++) {
1540
- const n = r[o], { x: i, y: s } = Ee(n), { x: u, y: v } = $e(i, s);
1554
+ const At = ke(Lt), zt = 25, Ft = 36;
1555
+ function Nt(r) {
1556
+ const n = /* @__PURE__ */ new Map();
1557
+ for (let t = 0; t < r.length; t++) {
1558
+ const o = r[t], { x: s, y: i } = Re(o), { x: u, y: d } = We(s, i);
1541
1559
  let f = 0;
1542
- for (let m = 0; m < o; m++) {
1543
- const { x: h, y: w } = Ee(r[m]), { x: j, y: k } = $e(h, w);
1544
- Math.hypot(u - j, v - k) < Lo && f++;
1560
+ for (let g = 0; g < t; g++) {
1561
+ const { x: y, y: S } = Re(r[g]), { x: m, y: A } = We(y, S);
1562
+ Math.hypot(u - m, d - A) < zt && f++;
1545
1563
  }
1546
- t.set(n.id, { dx: f * zo, dy: 0 });
1564
+ n.set(o.id, { dx: f * Ft, dy: 0 });
1547
1565
  }
1548
- return t;
1566
+ return n;
1549
1567
  }
1550
- function Fo() {
1568
+ function $t() {
1551
1569
  return typeof window > "u" ? "" : `${window.innerWidth}x${window.innerHeight}`;
1552
1570
  }
1553
- function No({
1571
+ function Mt({
1554
1572
  apiUrl: r,
1555
- apiKey: t,
1573
+ apiKey: n,
1574
+ getPageUrl: t,
1556
1575
  reviewMode: o,
1557
- setReviewMode: n,
1576
+ setReviewMode: s,
1558
1577
  reviewers: i,
1559
- comments: s,
1560
- loadComments: u,
1561
- commentsLoadFailed: v = !1
1578
+ comments: u,
1579
+ loadComments: d,
1580
+ commentsLoadFailed: f = !1
1562
1581
  }) {
1563
- const [f, m] = N(null), h = pe(null), [w, j] = N(null), k = I(() => {
1564
- f && (f.style.outline = "", f.style.outlineOffset = "", m(null));
1565
- }, [f]), D = I(() => {
1566
- h.current && (h.current.style.outline = "", h.current.style.outlineOffset = "", h.current = null);
1582
+ const [g, y] = W(null), S = ne(null), [m, A] = W(null), z = D(() => {
1583
+ g && (g.style.outline = "", g.style.outlineOffset = "", y(null));
1584
+ }, [g]), M = D(() => {
1585
+ S.current && (S.current.style.outline = "", S.current.style.outlineOffset = "", S.current = null);
1567
1586
  }, []);
1568
- O(() => {
1569
- o || (k(), D());
1570
- }, [o, k, D]), O(() => {
1587
+ L(() => {
1588
+ o || (z(), M());
1589
+ }, [o, z, M]), L(() => {
1571
1590
  if (typeof document > "u") return;
1572
- const y = document.body.style.cursor;
1573
- return w ? document.body.style.cursor = "default" : o && (document.body.style.cursor = "crosshair"), () => {
1574
- document.body.style.cursor = y;
1591
+ const h = document.body.style.cursor;
1592
+ return m ? document.body.style.cursor = "default" : o && (document.body.style.cursor = "crosshair"), () => {
1593
+ document.body.style.cursor = h;
1575
1594
  };
1576
- }, [o, w]);
1577
- const M = I((y) => {
1578
- var P;
1579
- if (!y || typeof document > "u" || y === document.body || y === document.documentElement) return !0;
1580
- const R = (P = y.tagName) == null ? void 0 : P.toUpperCase();
1581
- return R === "BODY" || R === "HTML" ? !0 : y.parentElement !== document.body ? !1 : y.id === "root" || y.getAttribute("data-review-layer-host") != null || document.body.children.length === 1;
1582
- }, []), z = I(
1583
- (y) => {
1584
- if (!o || w) return;
1585
- const R = y.target.nodeType === Node.ELEMENT_NODE ? y.target : y.target.parentElement;
1586
- !R || M(R) || (k(), m(R), R.style.outline = "2px solid var(--ui-color-bg-fill-danger-default, #ff4d4f)", R.style.outlineOffset = "2px");
1595
+ }, [o, m]);
1596
+ const P = D((h) => {
1597
+ var O;
1598
+ if (!h || typeof document > "u" || h === document.body || h === document.documentElement) return !0;
1599
+ const b = (O = h.tagName) == null ? void 0 : O.toUpperCase();
1600
+ return b === "BODY" || b === "HTML" ? !0 : h.parentElement !== document.body ? !1 : h.id === "root" || h.getAttribute("data-review-layer-host") != null || document.body.children.length === 1;
1601
+ }, []), $ = D(
1602
+ (h) => {
1603
+ if (!o || m) return;
1604
+ const b = h.target.nodeType === Node.ELEMENT_NODE ? h.target : h.target.parentElement;
1605
+ !b || P(b) || (z(), y(b), b.style.outline = "2px solid var(--ui-color-bg-fill-danger-default, #ff4d4f)", b.style.outlineOffset = "2px");
1587
1606
  },
1588
- [o, w, k, M]
1589
- ), g = I(
1590
- (y) => {
1591
- var P;
1592
- if (w) return;
1593
- const R = y.relatedTarget;
1594
- f && (!R || !f.contains(R)) && !(R && ((P = f.contains) != null && P.call(f, R))) && k();
1607
+ [o, m, z, P]
1608
+ ), v = D(
1609
+ (h) => {
1610
+ var O;
1611
+ if (m) return;
1612
+ const b = h.relatedTarget;
1613
+ g && (!b || !g.contains(b)) && !(b && ((O = g.contains) != null && O.call(g, b))) && z();
1595
1614
  },
1596
- [f, w, k]
1597
- ), c = I(
1598
- (y) => {
1599
- if (!o || w) return;
1600
- const R = y.target;
1601
- if (!R || M(R) || R.closest("[data-review-layer-root]")) return;
1602
- y.preventDefault(), y.stopPropagation(), k();
1603
- const P = R;
1604
- h.current = P, P.style.outline = "2px solid var(--ui-color-bg-fill-danger-default, #ff4d4f)", P.style.outlineOffset = "2px";
1605
- const V = P.getBoundingClientRect(), H = qr(R), { relativeX: Z, relativeY: oe } = Qr(V);
1606
- j({
1607
- position: { x: V.left + V.width / 2, y: V.bottom },
1615
+ [g, m, z]
1616
+ ), k = D(
1617
+ (h) => {
1618
+ if (!o || m) return;
1619
+ const b = h.target;
1620
+ if (!b || P(b) || b.closest("[data-review-layer-root]")) return;
1621
+ h.preventDefault(), h.stopPropagation(), z();
1622
+ const O = b;
1623
+ S.current = O, O.style.outline = "2px solid var(--ui-color-bg-fill-danger-default, #ff4d4f)", O.style.outlineOffset = "2px";
1624
+ const I = O.getBoundingClientRect(), re = Jr(b), { relativeX: ae, relativeY: se } = Kr(I);
1625
+ A({
1626
+ position: { x: I.left + I.width / 2, y: I.bottom },
1608
1627
  payload: {
1609
- selector: H,
1610
- x: Math.round(V.left),
1611
- y: Math.round(V.top),
1612
- relativeX: Z,
1613
- relativeY: oe,
1614
- width: Math.round(V.width),
1615
- height: Math.round(V.height),
1616
- url: typeof window < "u" ? Me() : "/",
1617
- viewport: Fo(),
1628
+ selector: re,
1629
+ x: Math.round(I.left),
1630
+ y: Math.round(I.top),
1631
+ relativeX: ae,
1632
+ relativeY: se,
1633
+ width: Math.round(I.width),
1634
+ height: Math.round(I.height),
1635
+ url: typeof window < "u" ? (t == null ? void 0 : t()) ?? br() : "/",
1636
+ viewport: $t(),
1618
1637
  userAgent: typeof navigator < "u" ? navigator.userAgent : "",
1619
1638
  pageTitle: typeof document < "u" ? document.title : ""
1620
1639
  }
1621
1640
  });
1622
1641
  },
1623
- [o, w, k, M]
1642
+ [o, m, z, P]
1624
1643
  );
1625
- O(() => {
1644
+ L(() => {
1626
1645
  if (o)
1627
- return document.addEventListener("mouseover", z, !0), document.addEventListener("mouseout", g, !0), document.addEventListener("click", c, !0), () => {
1628
- document.removeEventListener("mouseover", z, !0), document.removeEventListener("mouseout", g, !0), document.removeEventListener("click", c, !0);
1646
+ return document.addEventListener("mouseover", $, !0), document.addEventListener("mouseout", v, !0), document.addEventListener("click", k, !0), () => {
1647
+ document.removeEventListener("mouseover", $, !0), document.removeEventListener("mouseout", v, !0), document.removeEventListener("click", k, !0);
1629
1648
  };
1630
- }, [o, z, g, c]);
1631
- const [x, A] = N(0), $ = I(() => {
1632
- if (A((y) => y + 1), h.current) {
1633
- const y = h.current.getBoundingClientRect();
1634
- j(
1635
- (R) => R ? { ...R, position: { x: y.left + y.width / 2, y: y.bottom } } : null
1649
+ }, [o, $, v, k]);
1650
+ const [Y, E] = W(0), R = D(() => {
1651
+ if (E((h) => h + 1), S.current) {
1652
+ const h = S.current.getBoundingClientRect();
1653
+ A(
1654
+ (b) => b ? { ...b, position: { x: h.left + h.width / 2, y: h.bottom } } : null
1636
1655
  );
1637
1656
  }
1638
1657
  }, []);
1639
- O(() => {
1658
+ L(() => {
1640
1659
  if (!(typeof window > "u"))
1641
- return window.addEventListener("resize", $), window.addEventListener("scroll", $, !0), () => {
1642
- window.removeEventListener("resize", $), window.removeEventListener("scroll", $, !0);
1660
+ return window.addEventListener("resize", R), window.addEventListener("scroll", R, !0), () => {
1661
+ window.removeEventListener("resize", R), window.removeEventListener("scroll", R, !0);
1643
1662
  };
1644
- }, [$]), O(() => {
1645
- if (!w || !h.current) return;
1646
- const y = h.current, P = vr(y).map((V) => (V.addEventListener("scroll", $, !0), () => V.removeEventListener("scroll", $, !0)));
1647
- return () => P.forEach((V) => V());
1648
- }, [w, $]);
1649
- const ae = We(
1650
- () => Ao(s),
1651
- [s, x]
1652
- ), se = I(() => {
1653
- D(), j(null);
1654
- }, [D]), le = {
1663
+ }, [R]), L(() => {
1664
+ if (!m || !S.current) return;
1665
+ const h = S.current, O = pr(h).map((I) => (I.addEventListener("scroll", R, !0), () => I.removeEventListener("scroll", R, !0)));
1666
+ return () => O.forEach((I) => I());
1667
+ }, [m, R]);
1668
+ const V = Be(
1669
+ () => Nt(u),
1670
+ [u, Y]
1671
+ ), q = D(() => {
1672
+ M(), A(null);
1673
+ }, [M]), H = {
1655
1674
  position: "fixed",
1656
1675
  inset: 0,
1657
1676
  zIndex: 999999,
1658
1677
  pointerEvents: "none",
1659
1678
  cursor: o ? "crosshair" : void 0
1660
- }, ee = /* @__PURE__ */ d.jsxs(d.Fragment, { children: [
1661
- /* @__PURE__ */ d.jsx("div", { style: le, "aria-hidden": !0, "data-review-layer-root": !0 }),
1662
- o && /* @__PURE__ */ d.jsxs(
1679
+ }, Q = /* @__PURE__ */ c.jsxs(c.Fragment, { children: [
1680
+ /* @__PURE__ */ c.jsx("div", { style: H, "aria-hidden": !0, "data-review-layer-root": !0 }),
1681
+ o && /* @__PURE__ */ c.jsxs(
1663
1682
  "div",
1664
1683
  {
1665
1684
  "data-review-layer-root": !0,
@@ -1680,12 +1699,12 @@ function No({
1680
1699
  pointerEvents: "auto"
1681
1700
  },
1682
1701
  children: [
1683
- /* @__PURE__ */ d.jsx("span", { children: "Modo revisión (Shift+R para salir)" }),
1684
- /* @__PURE__ */ d.jsx(
1702
+ /* @__PURE__ */ c.jsx("span", { children: "Modo revisión (Shift+R para salir)" }),
1703
+ /* @__PURE__ */ c.jsx(
1685
1704
  "button",
1686
1705
  {
1687
1706
  type: "button",
1688
- onClick: () => n(!1),
1707
+ onClick: () => s(!1),
1689
1708
  "aria-label": "Salir del modo revisión",
1690
1709
  style: {
1691
1710
  padding: 0,
@@ -1709,7 +1728,7 @@ function No({
1709
1728
  ]
1710
1729
  }
1711
1730
  ),
1712
- v && /* @__PURE__ */ d.jsxs(
1731
+ f && /* @__PURE__ */ c.jsxs(
1713
1732
  "div",
1714
1733
  {
1715
1734
  style: {
@@ -1731,12 +1750,12 @@ function No({
1731
1750
  pointerEvents: "auto"
1732
1751
  },
1733
1752
  children: [
1734
- /* @__PURE__ */ d.jsx("span", { children: "No se pudo conectar. Mostrando últimos datos guardados. Reintentar no garantiza respuesta hasta que el servicio esté activo." }),
1735
- /* @__PURE__ */ d.jsx(
1753
+ /* @__PURE__ */ c.jsx("span", { children: "No se pudo conectar. Mostrando últimos datos guardados. Reintentar no garantiza respuesta hasta que el servicio esté activo." }),
1754
+ /* @__PURE__ */ c.jsx(
1736
1755
  "button",
1737
1756
  {
1738
1757
  type: "button",
1739
- onClick: () => u(),
1758
+ onClick: () => d(),
1740
1759
  style: {
1741
1760
  padding: "var(--ui-positive-Value_100, 4px) var(--ui-positive-Value_250, 10px)",
1742
1761
  fontSize: "var(--ui-font-size-xs, 12px)",
@@ -1753,33 +1772,33 @@ function No({
1753
1772
  ]
1754
1773
  }
1755
1774
  ),
1756
- s.map((y) => /* @__PURE__ */ d.jsx("div", { "data-review-layer-pin": !0, style: { pointerEvents: "auto" }, children: /* @__PURE__ */ d.jsx(
1757
- Do,
1775
+ u.map((h) => /* @__PURE__ */ c.jsx("div", { "data-review-layer-pin": !0, style: { pointerEvents: "auto" }, children: /* @__PURE__ */ c.jsx(
1776
+ At,
1758
1777
  {
1759
- comment: y,
1760
- offset: ae.get(y.id),
1778
+ comment: h,
1779
+ offset: V.get(h.id),
1761
1780
  apiUrl: r,
1762
- apiKey: t,
1763
- onStatusChange: u,
1781
+ apiKey: n,
1782
+ onStatusChange: d,
1764
1783
  reviewMode: o
1765
1784
  }
1766
- ) }, y.id)),
1767
- w && /* @__PURE__ */ d.jsx("div", { "data-review-layer-modal": !0, style: { pointerEvents: "auto" }, children: /* @__PURE__ */ d.jsx(
1768
- co,
1785
+ ) }, h.id)),
1786
+ m && /* @__PURE__ */ c.jsx("div", { "data-review-layer-modal": !0, style: { pointerEvents: "auto" }, children: /* @__PURE__ */ c.jsx(
1787
+ vt,
1769
1788
  {
1770
1789
  apiUrl: r,
1771
- apiKey: t,
1790
+ apiKey: n,
1772
1791
  reviewers: i,
1773
- position: w.position,
1774
- payload: w.payload,
1775
- onClose: se,
1776
- onSuccess: u
1792
+ position: m.position,
1793
+ payload: m.payload,
1794
+ onClose: q,
1795
+ onSuccess: d
1777
1796
  }
1778
1797
  ) })
1779
- ] }), re = typeof document < "u" ? document.body : null;
1780
- return re ? fr(ee, re) : null;
1798
+ ] }), ie = typeof document < "u" ? document.body : null;
1799
+ return ie ? vr(Q, ie) : null;
1781
1800
  }
1782
- const $o = `/**
1801
+ const Wt = `/**
1783
1802
  * Tokens de diseño UI para review-layer-react.
1784
1803
  * Las variables se inyectan en :root al montar ReviewProvider.
1785
1804
  * Puedes sobrescribirlas en tu app para adaptar el tema.
@@ -2105,196 +2124,227 @@ const $o = `/**
2105
2124
  --ui-shadow-modal: 0 var(--ui-shadow-04-y) var(--ui-shadow-04-blur) var(--ui-shadow-04-Color);
2106
2125
  }
2107
2126
  `;
2108
- function Mo(r, t, o) {
2109
- const n = I(() => {
2110
- r && o((i) => !i);
2111
- }, [r, o]);
2112
- O(() => {
2127
+ function Bt(r, n, t) {
2128
+ const o = D(() => {
2129
+ r && t((s) => !s);
2130
+ }, [r, t]);
2131
+ L(() => {
2113
2132
  if (!r) return;
2114
- const i = (s) => {
2115
- (s.key === "r" || s.key === "R" || s.code === "KeyR") && s.shiftKey && !s.ctrlKey && !s.metaKey && (s.preventDefault(), n());
2133
+ const s = (i) => {
2134
+ (i.key === "r" || i.key === "R" || i.code === "KeyR") && i.shiftKey && !i.ctrlKey && !i.metaKey && (i.preventDefault(), o());
2116
2135
  };
2117
- return window.addEventListener("keydown", i), () => window.removeEventListener("keydown", i);
2118
- }, [r, n]);
2136
+ return window.addEventListener("keydown", s), () => window.removeEventListener("keydown", s);
2137
+ }, [r, o]);
2119
2138
  }
2120
- const Wo = "review_layer:v1:";
2121
- function Bo(r, t) {
2122
- if (r == null) return t;
2139
+ const Ut = "review_layer:v1:";
2140
+ function Yt(r, n) {
2141
+ if (r == null) return n;
2123
2142
  try {
2124
- return JSON.parse(r) ?? t;
2143
+ return JSON.parse(r) ?? n;
2125
2144
  } catch {
2126
- return t;
2145
+ return n;
2127
2146
  }
2128
2147
  }
2129
- function ke(r, t, o, n) {
2130
- const i = `${Wo}${Uo(r)}:${o}`;
2131
- return n != null ? `${i}:${n}` : i;
2148
+ function de(r, n, t, o) {
2149
+ const s = `${Ut}${Ht(r)}:${t}`;
2150
+ return o != null ? `${s}:${o}` : s;
2132
2151
  }
2133
- function Uo(r) {
2152
+ function Ht(r) {
2134
2153
  return r.replace(/\/+$/, "") || "/";
2135
2154
  }
2136
- function br(r) {
2155
+ function Te(r) {
2137
2156
  if (typeof localStorage > "u") return null;
2138
- const t = localStorage.getItem(r);
2139
- return Bo(t, null);
2157
+ const n = localStorage.getItem(r);
2158
+ return Yt(n, null);
2140
2159
  }
2141
- function xr(r, t) {
2160
+ function yr(r, n) {
2142
2161
  if (!(typeof localStorage > "u"))
2143
2162
  try {
2144
- localStorage.setItem(r, JSON.stringify({ data: t, at: Date.now() }));
2163
+ localStorage.setItem(r, JSON.stringify({ data: n, at: Date.now() }));
2145
2164
  } catch {
2146
2165
  }
2147
2166
  }
2148
- function Ae(r, t, o) {
2149
- const n = br(ke(r, t, "comments", o));
2150
- return (n == null ? void 0 : n.data) ?? null;
2167
+ function Fe(r, n, t) {
2168
+ const o = Te(de(r, n, "comments", t));
2169
+ return (o == null ? void 0 : o.data) ?? null;
2151
2170
  }
2152
- function Yo(r, t, o, n) {
2153
- xr(ke(r, t, "comments", o), n);
2171
+ function Gt(r, n, t, o) {
2172
+ yr(de(r, n, "comments", t), o);
2154
2173
  }
2155
- function cr(r, t) {
2156
- const o = br(ke(r, t, "reviewers"));
2157
- return (o == null ? void 0 : o.data) ?? null;
2174
+ function Ne(r, n) {
2175
+ const t = Te(de(r, n, "reviewers"));
2176
+ return (t == null ? void 0 : t.data) ?? null;
2158
2177
  }
2159
- function Ho(r, t, o) {
2160
- xr(ke(r, t, "reviewers"), o);
2178
+ function Xt(r, n, t) {
2179
+ yr(de(r, n, "reviewers"), t);
2161
2180
  }
2162
- const Go = "https://review-layer-api.onrender.com/api", yr = Yr(null);
2163
- let Fe = null;
2164
- function Jo() {
2165
- const r = Hr(yr);
2181
+ function qt(r, n, t) {
2182
+ const o = Te(de(r, n, "comments", t));
2183
+ return (o == null ? void 0 : o.at) ?? null;
2184
+ }
2185
+ function Jt(r, n) {
2186
+ const t = Te(de(r, n, "reviewers"));
2187
+ return (t == null ? void 0 : t.at) ?? null;
2188
+ }
2189
+ const Zt = "https://review-layer-api.onrender.com/api", mr = Hr(null);
2190
+ let $e = null;
2191
+ function eo() {
2192
+ const r = Gr(mr);
2166
2193
  if (!r)
2167
2194
  throw new Error("useReview must be used within ReviewProvider");
2168
2195
  return r;
2169
2196
  }
2170
- const B = "[review-layer]";
2171
- function Zo({
2197
+ const U = "[review-layer]", dr = 2500;
2198
+ function ro({
2172
2199
  children: r,
2173
- enabled: t = !0,
2174
- apiUrl: o,
2175
- apiKey: n
2200
+ enabled: n = !0,
2201
+ apiUrl: t,
2202
+ apiKey: o,
2203
+ getPageUrl: s
2176
2204
  }) {
2177
- const i = (o == null ? void 0 : o.trim()) || Go, [s, u] = N(!1), [v, f] = N([]), [m, h] = N([]), [w, j] = N(!1);
2178
- Mo(t, s, u);
2179
- const k = I(
2180
- async (g) => {
2181
- if (!t || !i || !n) {
2182
- console.warn(B, "loadReviewers omitido: faltan enabled, apiUrl o apiKey", {
2183
- enabled: t,
2205
+ const i = (t == null ? void 0 : t.trim()) || Zt, [u, d] = W(!1), [f, g] = W([]), [y, S] = W([]), [m, A] = W(!1), z = ne(!1), M = ne(null), P = D(
2206
+ () => (s == null ? void 0 : s()) ?? br(),
2207
+ [s]
2208
+ );
2209
+ Bt(n, u, d);
2210
+ const $ = D(
2211
+ async (E) => {
2212
+ if (!n || !i || !o) {
2213
+ console.warn(U, "loadReviewers omitido: faltan enabled, apiUrl o apiKey", {
2214
+ enabled: n,
2184
2215
  apiUrl: i,
2185
- hasApiKey: !!n
2216
+ hasApiKey: !!o
2186
2217
  });
2187
2218
  return;
2188
2219
  }
2189
- console.log(B, "Cargando revisores...", { apiUrl: i });
2190
- try {
2191
- const c = await eo(i, n, { signal: g });
2192
- g != null && g.aborted || (f(c), Ho(i, n, c), console.log(B, "Revisores cargados:", c.length));
2193
- } catch (c) {
2194
- if (c instanceof Error && c.name === "AbortError") return;
2195
- if (!(g != null && g.aborted)) {
2196
- console.error(B, "Error al cargar revisores:", c);
2197
- const x = cr(i, n);
2198
- x != null && (f(x), console.log(B, "Usando revisores en caché:", x.length));
2220
+ const R = Jt(i, o);
2221
+ if (R != null && Date.now() - R < dr) {
2222
+ const V = Ne(i, o);
2223
+ if (V != null) {
2224
+ g(V);
2225
+ return;
2226
+ }
2227
+ }
2228
+ if (!z.current) {
2229
+ z.current = !0, console.log(U, "Cargando revisores...", { apiUrl: i });
2230
+ try {
2231
+ const V = await ot(i, o, { signal: E });
2232
+ E != null && E.aborted || (g(V), Xt(i, o, V), console.log(U, "Revisores cargados:", V.length));
2233
+ } catch (V) {
2234
+ if (V instanceof Error && V.name === "AbortError") return;
2235
+ if (!(E != null && E.aborted)) {
2236
+ console.error(U, "Error al cargar revisores:", V);
2237
+ const q = Ne(i, o);
2238
+ q != null && (g(q), console.log(U, "Usando revisores en caché:", q.length));
2239
+ }
2240
+ } finally {
2241
+ z.current = !1;
2199
2242
  }
2200
2243
  }
2201
2244
  },
2202
- [t, i, n]
2203
- ), D = I(
2204
- async (g) => {
2205
- if (!t || !i || !n) {
2206
- console.warn(B, "loadComments omitido: faltan enabled, apiUrl o apiKey", {
2207
- enabled: t,
2245
+ [n, i, o]
2246
+ ), v = D(
2247
+ async (E) => {
2248
+ if (!n || !i || !o) {
2249
+ console.warn(U, "loadComments omitido: faltan enabled, apiUrl o apiKey", {
2250
+ enabled: n,
2208
2251
  apiUrl: i,
2209
- hasApiKey: !!n
2252
+ hasApiKey: !!o
2210
2253
  });
2211
2254
  return;
2212
2255
  }
2213
- const c = Me(), x = Ae(i, n, c);
2214
- x != null && h(x), console.log(B, "Cargando comentarios...", { apiUrl: i, url: c });
2215
- try {
2216
- j(!1);
2217
- const A = await oo(i, n, c, { signal: g });
2218
- g != null && g.aborted || (h(A), Yo(i, n, c, A), console.log(B, "Comentarios cargados:", A.length));
2219
- } catch (A) {
2220
- if (A instanceof Error && A.name === "AbortError") return;
2221
- if (!(g != null && g.aborted)) {
2222
- j(!0), console.error(B, "Error al cargar comentarios:", A);
2223
- const $ = Ae(i, n, c);
2224
- $ != null ? (h($), console.log(B, "Usando comentarios en caché:", $.length)) : console.warn(B, "Sin caché de comentarios; la lista quedará vacía hasta que la API responda.");
2256
+ const R = P(), V = Fe(i, o, R);
2257
+ V != null && S(V);
2258
+ const q = qt(i, o, R);
2259
+ if (!(q != null && Date.now() - q < dr && V != null) && M.current !== R) {
2260
+ M.current = R, console.log(U, "Cargando comentarios...", { apiUrl: i, url: R });
2261
+ try {
2262
+ A(!1);
2263
+ const H = await it(i, o, R, { signal: E });
2264
+ E != null && E.aborted || (S(H), Gt(i, o, R, H), console.log(U, "Comentarios cargados:", H.length));
2265
+ } catch (H) {
2266
+ if (H instanceof Error && H.name === "AbortError") return;
2267
+ if (!(E != null && E.aborted)) {
2268
+ A(!0), console.error(U, "Error al cargar comentarios:", H);
2269
+ const Q = Fe(i, o, R);
2270
+ Q != null ? (S(Q), console.log(U, "Usando comentarios en caché:", Q.length)) : console.warn(U, "Sin caché de comentarios; la lista quedará vacía hasta que la API responda.");
2271
+ }
2272
+ } finally {
2273
+ M.current = null;
2225
2274
  }
2226
2275
  }
2227
2276
  },
2228
- [t, i, n]
2277
+ [n, i, o, P]
2229
2278
  );
2230
- O(() => {
2231
- if (!t || !i || !n) {
2232
- console.warn(B, "Provider activo pero sin carga: enabled, apiUrl y apiKey son requeridos.", {
2233
- enabled: t,
2279
+ L(() => {
2280
+ if (!n || !i || !o) {
2281
+ console.warn(U, "Provider activo pero sin carga: enabled, apiUrl y apiKey son requeridos.", {
2282
+ enabled: n,
2234
2283
  apiUrl: i,
2235
- hasApiKey: !!n
2284
+ hasApiKey: !!o
2236
2285
  });
2237
2286
  return;
2238
2287
  }
2239
- const g = Me(), c = cr(i, n), x = Ae(i, n, g);
2240
- c != null && (f(c), console.log(B, "Revisores desde caché (inicial):", c.length)), x != null && (h(x), console.log(B, "Comentarios desde caché (inicial):", x.length, { url: g }));
2241
- }, [t, i, n]), O(() => {
2288
+ const E = P(), R = Ne(i, o), V = Fe(i, o, E);
2289
+ R != null && (g(R), console.log(U, "Revisores desde caché (inicial):", R.length)), V != null && (S(V), console.log(U, "Comentarios desde caché (inicial):", V.length, { url: E }));
2290
+ }, [n, i, o, P]), L(() => {
2242
2291
  if (typeof document > "u") return;
2243
- const g = "review-layer-ui-variables";
2244
- if (!document.getElementById(g)) {
2245
- const c = document.createElement("style");
2246
- c.id = g, c.textContent = $o, document.head.appendChild(c);
2247
- }
2248
- }, []), O(() => {
2249
- if (!t || !i || !n) return;
2250
- const g = `${i}:${n}`;
2251
- if (Fe !== g)
2252
- return Fe = g, console.log(B, "Inicio de carga (revisores + comentarios)", { apiUrl: i, apiKey: n ? "***" : "(vacío)" }), k(), D(), () => {
2292
+ const E = "review-layer-ui-variables";
2293
+ if (!document.getElementById(E)) {
2294
+ const R = document.createElement("style");
2295
+ R.id = E, R.textContent = Wt, document.head.appendChild(R);
2296
+ }
2297
+ }, []), L(() => {
2298
+ if (!n || !i || !o) return;
2299
+ const E = `${i}:${o}`;
2300
+ if ($e !== E)
2301
+ return $e = E, console.log(U, "Inicio de carga (revisores + comentarios)", { apiUrl: i, apiKey: o ? "***" : "(vacío)" }), $(), v(), () => {
2253
2302
  setTimeout(() => {
2254
- Fe = null;
2303
+ $e = null;
2255
2304
  }, 0);
2256
2305
  };
2257
- }, [t, i, n, k, D]), O(() => {
2258
- if (!t) return;
2259
- const g = () => D();
2260
- return window.addEventListener("popstate", g), () => window.removeEventListener("popstate", g);
2261
- }, [t, D]);
2262
- const M = We(
2306
+ }, [n, i, o, $, v]), L(() => {
2307
+ if (!n) return;
2308
+ const E = () => v();
2309
+ return window.addEventListener("popstate", E), () => window.removeEventListener("popstate", E);
2310
+ }, [n, v]);
2311
+ const k = Be(
2263
2312
  () => ({
2264
2313
  apiUrl: i,
2265
- apiKey: n,
2266
- reviewMode: s,
2267
- setReviewMode: u,
2268
- reviewers: v,
2269
- comments: m,
2270
- loadComments: D,
2271
- commentsLoadFailed: w
2314
+ apiKey: o,
2315
+ reviewMode: u,
2316
+ setReviewMode: d,
2317
+ reviewers: f,
2318
+ comments: y,
2319
+ loadComments: v,
2320
+ commentsLoadFailed: m
2272
2321
  }),
2273
- [i, n, s, u, v, m, D, w]
2274
- ), z = t && typeof document < "u" ? fr(
2275
- /* @__PURE__ */ d.jsx(
2276
- No,
2322
+ [i, o, u, d, f, y, v, m]
2323
+ ), Y = n && typeof document < "u" ? vr(
2324
+ /* @__PURE__ */ c.jsx(
2325
+ Mt,
2277
2326
  {
2278
2327
  apiUrl: i,
2279
- apiKey: n,
2280
- reviewMode: s,
2281
- setReviewMode: u,
2282
- reviewers: v,
2283
- comments: m,
2284
- loadComments: D,
2285
- commentsLoadFailed: w
2328
+ apiKey: o,
2329
+ getPageUrl: P,
2330
+ reviewMode: u,
2331
+ setReviewMode: d,
2332
+ reviewers: f,
2333
+ comments: y,
2334
+ loadComments: v,
2335
+ commentsLoadFailed: m
2286
2336
  }
2287
2337
  ),
2288
2338
  document.body
2289
2339
  ) : null;
2290
- return /* @__PURE__ */ d.jsxs(yr.Provider, { value: M, children: [
2340
+ return /* @__PURE__ */ c.jsxs(mr.Provider, { value: k, children: [
2291
2341
  r,
2292
- z
2342
+ Y
2293
2343
  ] });
2294
2344
  }
2295
2345
  export {
2296
- Go as DEFAULT_API_URL,
2297
- Zo as ReviewProvider,
2298
- Jo as useReview
2346
+ Zt as DEFAULT_API_URL,
2347
+ ro as ReviewProvider,
2348
+ eo as useReview
2299
2349
  };
2300
2350
  //# sourceMappingURL=review-layer-react.js.map