aquasis-fe-components 1.0.2-a → 1.0.2-c

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.
@@ -2,7 +2,7 @@ import './index.css';var SI = Object.defineProperty;
2
2
  var xI = (e, t, n) => t in e ? SI(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
3
3
  var s3 = (e, t, n) => xI(e, typeof t != "symbol" ? t + "" : t, n);
4
4
  import * as u from "react";
5
- import ee, { version as LI, isValidElement as Xa, useContext as Ht, createContext as z2, useRef as Be, useLayoutEffect as EI, useEffect as Mt, useState as Et, forwardRef as C1, useMemo as Zt, Children as Dl, createRef as MI, useCallback as g1, useImperativeHandle as n2, cloneElement as yh, Component as Sh, createElement as j2, Fragment as wI } from "react";
5
+ import ee, { version as LI, isValidElement as Xa, useContext as Ht, createContext as z2, useRef as Be, useLayoutEffect as EI, useEffect as wt, useState as Et, forwardRef as C1, useMemo as Zt, Children as Dl, createRef as MI, useCallback as g1, useImperativeHandle as n2, cloneElement as yh, Component as Sh, createElement as j2, Fragment as wI } from "react";
6
6
  import * as zI from "react-dom";
7
7
  import hi, { createPortal as xh, unstable_batchedUpdates as Lh, flushSync as vi } from "react-dom";
8
8
  var fa = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
@@ -5862,7 +5862,7 @@ const M_ = function(e) {
5862
5862
  };
5863
5863
  }, []), [r, n];
5864
5864
  };
5865
- var nb = Vn() ? EI : Mt;
5865
+ var nb = Vn() ? EI : wt;
5866
5866
  const w_ = function() {
5867
5867
  var e = u.useRef(null);
5868
5868
  function t() {
@@ -5966,18 +5966,18 @@ function R_(e, t, n, r) {
5966
5966
  !pe && t && c && (ge = Tc), pe && t && o && (ge = Dc), (pe && !t && s || !pe && f && !t && s) && (ge = Ac);
5967
5967
  var ye = G(ge);
5968
5968
  ge && (e || ye[or]) ? (P(ge), oe()) : P(f2);
5969
- }, [t]), Mt(function() {
5969
+ }, [t]), wt(function() {
5970
5970
  // Cancel appear
5971
5971
  (k === Tc && !c || // Cancel enter
5972
5972
  k === Dc && !o || // Cancel leave
5973
5973
  k === Ac && !s) && P(f2);
5974
- }, [c, o, s]), Mt(function() {
5974
+ }, [c, o, s]), wt(function() {
5975
5975
  return function() {
5976
5976
  H.current = !1, clearTimeout(F.current);
5977
5977
  };
5978
5978
  }, []);
5979
5979
  var ie = u.useRef(!1);
5980
- Mt(function() {
5980
+ wt(function() {
5981
5981
  O && (ie.current = !0), O !== void 0 && k === f2 && ((ie.current || O) && (M == null || M(O)), ie.current = !0);
5982
5982
  }, [O, k]);
5983
5983
  var fe = _;
@@ -6582,7 +6582,7 @@ var Q_ = `
6582
6582
  }
6583
6583
  `, J_ = function(t) {
6584
6584
  var n = Ht(zu), r = n.csp, a = n.prefixCls, o = Q_;
6585
- a && (o = o.replace(/anticon/g, a)), Mt(function() {
6585
+ a && (o = o.replace(/anticon/g, a)), wt(function() {
6586
6586
  var i = t.current, c = Wl(i);
6587
6587
  Kr(o, "@ant-design-icons", {
6588
6588
  prepend: !0,
@@ -7451,7 +7451,7 @@ var $e = {
7451
7451
  key: String(P.key)
7452
7452
  };
7453
7453
  }), E = Mk(d), M = ne(E, 2), w = M[0], N = M[1], O = N.offset, T = N.threshold, D = N.gap, $ = w && (x.length > 0 || L.length <= T), R = typeof c == "function" ? c(r) : c;
7454
- return Mt(function() {
7454
+ return wt(function() {
7455
7455
  w && x.length > 1 && S(function(P) {
7456
7456
  return P.filter(function(z) {
7457
7457
  return L.some(function(I) {
@@ -7460,7 +7460,7 @@ var $e = {
7460
7460
  });
7461
7461
  });
7462
7462
  });
7463
- }, [x, L, w]), Mt(function() {
7463
+ }, [x, L, w]), wt(function() {
7464
7464
  var P;
7465
7465
  if (w && p.current[(P = L[L.length - 1]) === null || P === void 0 ? void 0 : P.key]) {
7466
7466
  var z;
@@ -9474,9 +9474,9 @@ function Rb(e) {
9474
9474
  x: 0,
9475
9475
  y: 0
9476
9476
  }), d = ne(s, 2), f = d[0], m = d[1], p = Be(null), h = Be(null);
9477
- Mt(function() {
9477
+ wt(function() {
9478
9478
  m(i());
9479
- }, [c]), Mt(function() {
9479
+ }, [c]), wt(function() {
9480
9480
  return function() {
9481
9481
  document.removeEventListener("mousemove", p.current), document.removeEventListener("mouseup", h.current), document.removeEventListener("touchmove", p.current), document.removeEventListener("touchend", h.current), p.current = null, h.current = null;
9482
9482
  };
@@ -10962,7 +10962,7 @@ const Hj = {
10962
10962
  direction: z,
10963
10963
  button: I
10964
10964
  } = Ht(st), _ = (n = w ?? (I == null ? void 0 : I.autoInsertSpace)) !== null && n !== void 0 ? n : !0, A = P("btn", i), [k, H, F] = Pj(A), V = Ht(v1), W = h ?? V, J = Ht(wb), X = Zt(() => Bj(o), [o]), [q, ae] = Et(X.loading), [Q, G] = Et(!1), te = f1(t, /* @__PURE__ */ MI()), U = Dl.count(C) === 1 && !b && !Fc(D);
10965
- Mt(() => {
10965
+ wt(() => {
10966
10966
  let we = null;
10967
10967
  X.delay > 0 ? we = setTimeout(() => {
10968
10968
  we = null, ae(!0);
@@ -10971,7 +10971,7 @@ const Hj = {
10971
10971
  we && (clearTimeout(we), we = null);
10972
10972
  }
10973
10973
  return Fe;
10974
- }, [X]), Mt(() => {
10974
+ }, [X]), wt(() => {
10975
10975
  if (!te || !te.current || !_)
10976
10976
  return;
10977
10977
  const we = te.current.textContent;
@@ -11516,9 +11516,9 @@ var tB = function(t) {
11516
11516
  }
11517
11517
  i && oe.keyCode === $e.TAB && I.current.changeActive(!oe.shiftKey);
11518
11518
  }
11519
- Mt(function() {
11519
+ wt(function() {
11520
11520
  i && (H(!0), V());
11521
- }, [i]), Mt(function() {
11521
+ }, [i]), wt(function() {
11522
11522
  return function() {
11523
11523
  clearTimeout(ae.current);
11524
11524
  };
@@ -13599,7 +13599,7 @@ function Jb() {
13599
13599
  var h = Ht(aa), v = c || h, g = v && v._init;
13600
13600
  process.env.NODE_ENV !== "production" && dt(t.length === 2 ? c ? g : !0 : g, "useWatch requires a form instance since it can not auto detect from context.");
13601
13601
  var C = _n(r), b = Be(C);
13602
- return b.current = C, KB(C), Mt(
13602
+ return b.current = C, KB(C), wt(
13603
13603
  function() {
13604
13604
  if (g) {
13605
13605
  var y = v.getFieldsValue, x = v.getInternalHooks, S = x(H2), L = S.registerWatch, E = function(O, T) {
@@ -16898,7 +16898,7 @@ function IV(e, t, n, r, a, o, i) {
16898
16898
  typeof Ln == "number" && (Ze < he.left && (_e -= Ze - he.left - Me, A.x + oe < he.left + Ln && (_e += A.x - he.left + oe - Ln)), pt > he.right && (_e -= pt - he.right - Me, A.x > he.right - Ln && (_e += A.x - he.right + Ln)));
16899
16899
  var Tn = Ce === !0 ? 0 : Ce;
16900
16900
  typeof Tn == "number" && (je < he.top && (Ue -= je - he.top - se, A.y + U < he.top + Tn && (Ue += A.y - he.top + U - Tn)), ot > he.bottom && (Ue -= ot - he.bottom - se, A.y > he.bottom - Tn && (Ue += A.y - he.bottom + Tn)));
16901
- var e1 = V.x + _e, Yn = e1 + te, En = V.y + Ue, _t = En + K, wt = A.x, bn = wt + oe, Rt = A.y, Lt = Rt + U, it = Math.max(e1, wt), ft = Math.min(Yn, bn), kt = (it + ft) / 2, cn = kt - e1, On = Math.max(En, Rt), kn = Math.min(_t, Lt), c1 = (On + kn) / 2, m1 = c1 - En;
16901
+ var e1 = V.x + _e, Yn = e1 + te, En = V.y + Ue, _t = En + K, Mt = A.x, bn = Mt + oe, Rt = A.y, Lt = Rt + U, it = Math.max(e1, Mt), ft = Math.min(Yn, bn), kt = (it + ft) / 2, cn = kt - e1, On = Math.max(En, Rt), kn = Math.min(_t, Lt), c1 = (On + kn) / 2, m1 = c1 - En;
16902
16902
  i == null || i(t, Je);
16903
16903
  var rt = Ne.right - V.x - (_e + V.width), qe = Ne.bottom - V.y - (Ue + V.height);
16904
16904
  Re === 1 && (_e = Math.round(_e), rt = Math.round(rt)), He === 1 && (Ue = Math.round(Ue), qe = Math.round(qe));
@@ -17036,7 +17036,7 @@ function _V() {
17036
17036
  }, [Ze, $]), At(function() {
17037
17037
  at && !(P != null && P[$]) && En();
17038
17038
  }, [JSON.stringify(z)]);
17039
- var wt = u.useMemo(function() {
17039
+ var Mt = u.useMemo(function() {
17040
17040
  var Ct = PV(P, o, vt, H);
17041
17041
  return Z(Ct, A == null ? void 0 : A(vt));
17042
17042
  }, [vt, A, P, o, H]);
@@ -17126,7 +17126,7 @@ function _V() {
17126
17126
  ref: De,
17127
17127
  prefixCls: o,
17128
17128
  popup: O,
17129
- className: Z(T, wt),
17129
+ className: Z(T, Mt),
17130
17130
  style: D,
17131
17131
  target: ke,
17132
17132
  onMouseEnter: Jt,
@@ -17343,10 +17343,10 @@ var WV = ["id", "prefixCls", "className", "showSearch", "tagRender", "direction"
17343
17343
  }, []);
17344
17344
  var Ee = u.useRef(null), Ne = u.useRef(null), Re = u.useRef(null), He = u.useRef(null), De = u.useRef(null), we = u.useRef(!1), Fe = aV(), ke = ne(Fe, 3), Me = ke[0], se = ke[1], Se = ke[2];
17345
17345
  u.useImperativeHandle(t, function() {
17346
- var _t, wt;
17346
+ var _t, Mt;
17347
17347
  return {
17348
17348
  focus: (_t = He.current) === null || _t === void 0 ? void 0 : _t.focus,
17349
- blur: (wt = He.current) === null || wt === void 0 ? void 0 : wt.blur,
17349
+ blur: (Mt = He.current) === null || Mt === void 0 ? void 0 : Mt.blur,
17350
17350
  scrollTo: function(Rt) {
17351
17351
  var Lt;
17352
17352
  return (Lt = De.current) === null || Lt === void 0 ? void 0 : Lt.scrollTo(Rt);
@@ -17358,8 +17358,8 @@ var WV = ["id", "prefixCls", "className", "showSearch", "tagRender", "direction"
17358
17358
  var _t;
17359
17359
  if (g !== "combobox")
17360
17360
  return O;
17361
- var wt = (_t = d[0]) === null || _t === void 0 ? void 0 : _t.value;
17362
- return typeof wt == "string" || typeof wt == "number" ? String(wt) : "";
17361
+ var Mt = (_t = d[0]) === null || _t === void 0 ? void 0 : _t.value;
17362
+ return typeof Mt == "string" || typeof Mt == "number" ? String(Mt) : "";
17363
17363
  }, [O, g, d]), de = g === "combobox" && typeof y == "function" && y() || null, Le = typeof x == "function" && x(), Ve = N2(Ne, Le == null || (n = Le.props) === null || n === void 0 ? void 0 : n.ref), lt = u.useState(!1), ut = ne(lt, 2), Xe = ut[0], Ie = ut[1];
17364
17364
  At(function() {
17365
17365
  Ie(!0);
@@ -17370,25 +17370,25 @@ var WV = ["id", "prefixCls", "className", "showSearch", "tagRender", "direction"
17370
17370
  }), tt = ne(Qe, 2), at = tt[0], Je = tt[1], _e = Xe ? at : !1, Ue = !h && m;
17371
17371
  (C || Ue && _e && g === "combobox") && (_e = !1);
17372
17372
  var ht = Ue ? !1 : _e, yt = u.useCallback(function(_t) {
17373
- var wt = _t !== void 0 ? _t : !_e;
17374
- C || (Je(wt), _e !== wt && (E == null || E(wt)));
17373
+ var Mt = _t !== void 0 ? _t : !_e;
17374
+ C || (Je(Mt), _e !== Mt && (E == null || E(Mt)));
17375
17375
  }, [C, _e, Je, E]), Ye = u.useMemo(function() {
17376
17376
  return (R || []).some(function(_t) {
17377
17377
  return [`
17378
17378
  `, `\r
17379
17379
  `].includes(_t);
17380
17380
  });
17381
- }, [R]), Ae = u.useContext(ad) || {}, Ke = Ae.maxCount, ct = Ae.rawValues, gt = function(wt, bn, Rt) {
17381
+ }, [R]), Ae = u.useContext(ad) || {}, Ke = Ae.maxCount, ct = Ae.rawValues, gt = function(Mt, bn, Rt) {
17382
17382
  if (!(ie && e8(Ke) && (ct == null ? void 0 : ct.size) >= Ke)) {
17383
- var Lt = !0, it = wt;
17383
+ var Lt = !0, it = Mt;
17384
17384
  w == null || w(null);
17385
- var ft = HV(wt, R, e8(Ke) ? Ke - ct.size : void 0), kt = Rt ? null : ft;
17385
+ var ft = HV(Mt, R, e8(Ke) ? Ke - ct.size : void 0), kt = Rt ? null : ft;
17386
17386
  return g !== "combobox" && kt && (it = "", $ == null || $(kt), yt(!1), Lt = !1), D && ve !== it && D(it, {
17387
17387
  source: bn ? "typing" : "effect"
17388
17388
  }), Lt;
17389
17389
  }
17390
- }, Nt = function(wt) {
17391
- !wt || !wt.trim() || D(wt, {
17390
+ }, Nt = function(Mt) {
17391
+ !Mt || !Mt.trim() || D(Mt, {
17392
17392
  source: "submit"
17393
17393
  });
17394
17394
  };
@@ -17397,9 +17397,9 @@ var WV = ["id", "prefixCls", "className", "showSearch", "tagRender", "direction"
17397
17397
  }, [_e]), u.useEffect(function() {
17398
17398
  at && C && Je(!1), C && !we.current && se(!1);
17399
17399
  }, [C]);
17400
- var ce = NC(), me = ne(ce, 2), Ce = me[0], Pe = me[1], je = u.useRef(!1), ot = function(wt) {
17401
- var bn = Ce(), Rt = wt.key, Lt = Rt === "Enter";
17402
- if (Lt && (g !== "combobox" && wt.preventDefault(), _e || yt(!0)), Pe(!!ve), Rt === "Backspace" && !bn && ie && !ve && d.length) {
17400
+ var ce = NC(), me = ne(ce, 2), Ce = me[0], Pe = me[1], je = u.useRef(!1), ot = function(Mt) {
17401
+ var bn = Ce(), Rt = Mt.key, Lt = Rt === "Enter";
17402
+ if (Lt && (g !== "combobox" && Mt.preventDefault(), _e || yt(!0)), Pe(!!ve), Rt === "Backspace" && !bn && ie && !ve && d.length) {
17403
17403
  for (var it = xe(d), ft = null, kt = it.length - 1; kt >= 0; kt -= 1) {
17404
17404
  var cn = it[kt];
17405
17405
  if (!cn.disabled) {
@@ -17416,24 +17416,24 @@ var WV = ["id", "prefixCls", "className", "showSearch", "tagRender", "direction"
17416
17416
  kn[c1 - 1] = arguments[c1];
17417
17417
  if (_e && (!Lt || !je.current)) {
17418
17418
  var m1;
17419
- (m1 = De.current) === null || m1 === void 0 || m1.onKeyDown.apply(m1, [wt].concat(kn));
17419
+ (m1 = De.current) === null || m1 === void 0 || m1.onKeyDown.apply(m1, [Mt].concat(kn));
17420
17420
  }
17421
- Lt && (je.current = !0), oe == null || oe.apply(void 0, [wt].concat(kn));
17422
- }, Ze = function(wt) {
17421
+ Lt && (je.current = !0), oe == null || oe.apply(void 0, [Mt].concat(kn));
17422
+ }, Ze = function(Mt) {
17423
17423
  for (var bn = arguments.length, Rt = new Array(bn > 1 ? bn - 1 : 0), Lt = 1; Lt < bn; Lt++)
17424
17424
  Rt[Lt - 1] = arguments[Lt];
17425
17425
  if (_e) {
17426
17426
  var it;
17427
- (it = De.current) === null || it === void 0 || it.onKeyUp.apply(it, [wt].concat(Rt));
17427
+ (it = De.current) === null || it === void 0 || it.onKeyUp.apply(it, [Mt].concat(Rt));
17428
17428
  }
17429
- wt.key === "Enter" && (je.current = !1), U == null || U.apply(void 0, [wt].concat(Rt));
17430
- }, pt = function(wt) {
17429
+ Mt.key === "Enter" && (je.current = !1), U == null || U.apply(void 0, [Mt].concat(Rt));
17430
+ }, pt = function(Mt) {
17431
17431
  var bn = d.filter(function(Rt) {
17432
- return Rt !== wt;
17432
+ return Rt !== Mt;
17433
17433
  });
17434
17434
  f(bn, {
17435
17435
  type: "remove",
17436
- values: [wt]
17436
+ values: [Mt]
17437
17437
  });
17438
17438
  }, We = u.useRef(!1), Ge = function() {
17439
17439
  se(!0), C || (K && !We.current && K.apply(void 0, arguments), G.includes("focus") && yt(!0)), We.current = !0;
@@ -17453,8 +17453,8 @@ var WV = ["id", "prefixCls", "className", "showSearch", "tagRender", "direction"
17453
17453
  }), bt.splice(0, bt.length);
17454
17454
  };
17455
17455
  }, []);
17456
- var Ot = function(wt) {
17457
- var bn, Rt = wt.target, Lt = (bn = Re.current) === null || bn === void 0 ? void 0 : bn.getPopupElement();
17456
+ var Ot = function(Mt) {
17457
+ var bn, Rt = Mt.target, Lt = (bn = Re.current) === null || bn === void 0 ? void 0 : bn.getPopupElement();
17458
17458
  if (Lt && Lt.contains(Rt)) {
17459
17459
  var it = setTimeout(function() {
17460
17460
  var On = bt.indexOf(it);
@@ -17467,14 +17467,14 @@ var WV = ["id", "prefixCls", "className", "showSearch", "tagRender", "direction"
17467
17467
  }
17468
17468
  for (var ft = arguments.length, kt = new Array(ft > 1 ? ft - 1 : 0), cn = 1; cn < ft; cn++)
17469
17469
  kt[cn - 1] = arguments[cn];
17470
- re == null || re.apply(void 0, [wt].concat(kt));
17470
+ re == null || re.apply(void 0, [Mt].concat(kt));
17471
17471
  }, Gt = u.useState({}), Tt = ne(Gt, 2), Sn = Tt[1];
17472
17472
  function fn() {
17473
17473
  Sn({});
17474
17474
  }
17475
17475
  var mn;
17476
- Le && (mn = function(wt) {
17477
- yt(wt);
17476
+ Le && (mn = function(Mt) {
17477
+ yt(Mt);
17478
17478
  }), oV(function() {
17479
17479
  var _t;
17480
17480
  return [Ee.current, (_t = Re.current) === null || _t === void 0 ? void 0 : _t.getPopupElement()];
@@ -17502,8 +17502,8 @@ var WV = ["id", "prefixCls", "className", "showSearch", "tagRender", "direction"
17502
17502
  }
17503
17503
  }));
17504
17504
  var zt = function() {
17505
- var wt;
17506
- v == null || v(), (wt = He.current) === null || wt === void 0 || wt.focus(), f([], {
17505
+ var Mt;
17506
+ v == null || v(), (Mt = He.current) === null || Mt === void 0 || Mt.focus(), f([], {
17507
17507
  type: "clear",
17508
17508
  values: d
17509
17509
  }), gt("", !1, !1);
@@ -17527,12 +17527,12 @@ var WV = ["id", "prefixCls", "className", "showSearch", "tagRender", "direction"
17527
17527
  builtinPlacements: q,
17528
17528
  getPopupContainer: ae,
17529
17529
  empty: m,
17530
- getTriggerDOMNode: function(wt) {
17530
+ getTriggerDOMNode: function(Mt) {
17531
17531
  return (
17532
17532
  // TODO: This is workaround and should be removed in `rc-select`
17533
17533
  // And use new standard `nativeElement` for ref.
17534
17534
  // But we should update `rc-resize-observer` first.
17535
- Ne.current || wt
17535
+ Ne.current || Mt
17536
17536
  );
17537
17537
  },
17538
17538
  onPopupVisibleChange: mn,
@@ -17784,7 +17784,7 @@ function ZV(e, t, n) {
17784
17784
  var v = e(p);
17785
17785
  c.current.get(v), h ? (c.current.set(v, h), f()) : c.current.delete(v);
17786
17786
  }
17787
- return Mt(function() {
17787
+ return wt(function() {
17788
17788
  return d;
17789
17789
  }, []), [m, f, l.current, o];
17790
17790
  }
@@ -18281,13 +18281,13 @@ var sW = function(t, n) {
18281
18281
  }
18282
18282
  g(U.value, G, te);
18283
18283
  };
18284
- Mt(function() {
18284
+ wt(function() {
18285
18285
  H(C !== !1 ? z(0) : -1);
18286
18286
  }, [T.length, s]);
18287
18287
  var F = u.useCallback(function(Q) {
18288
18288
  return x.has(Q) && l !== "combobox";
18289
18289
  }, [l, xe(x).toString(), x.size]);
18290
- Mt(function() {
18290
+ wt(function() {
18291
18291
  var Q = setTimeout(function() {
18292
18292
  if (!c && i && x.size === 1) {
18293
18293
  var K = Array.from(x)[0], te = T.findIndex(function(U) {
@@ -22313,7 +22313,7 @@ var sK = ["prefixCls", "rootClassName", "style", "className", "tabIndex", "items
22313
22313
  _internalRenderMenuItem: fe,
22314
22314
  _internalRenderSubMenuItem: pe
22315
22315
  };
22316
- }, [fe, pe]), wt = yt !== "horizontal" || y ? Ee : (
22316
+ }, [fe, pe]), Mt = yt !== "horizontal" || y ? Ee : (
22317
22317
  // Need wrap for overflow dropdown that do not response for open
22318
22318
  Ee.map(function(Rt, Lt) {
22319
22319
  return (
@@ -22335,7 +22335,7 @@ var sK = ["prefixCls", "rootClassName", "style", "className", "tabIndex", "items
22335
22335
  style: c,
22336
22336
  role: "menu",
22337
22337
  tabIndex: d,
22338
- data: wt,
22338
+ data: Mt,
22339
22339
  renderRawItem: function(Lt) {
22340
22340
  return Lt;
22341
22341
  },
@@ -22683,7 +22683,7 @@ const rm = {
22683
22683
  } = e, C = yK(e, ["prefixCls", "className", "trigger", "children", "defaultCollapsed", "theme", "style", "collapsible", "reverseArrow", "width", "collapsedWidth", "zeroWidthTriggerStyle", "breakpoint", "onCollapse", "onBreakpoint"]), {
22684
22684
  siderHook: b
22685
22685
  } = Ht(hK), [y, x] = Et("collapsed" in e ? e.collapsed : i), [S, L] = Et(!1);
22686
- Mt(() => {
22686
+ wt(() => {
22687
22687
  "collapsed" in e && x(e.collapsed);
22688
22688
  }, [e.collapsed]);
22689
22689
  const E = (z, I) => {
@@ -22693,7 +22693,7 @@ const rm = {
22693
22693
  } = Ht(st), w = M("layout-sider", n), [N, O, T] = CK(w), D = Be();
22694
22694
  D.current = (z) => {
22695
22695
  L(z.matches), g == null || g(z.matches), y !== z.matches && E(z.matches, "responsive");
22696
- }, Mt(() => {
22696
+ }, wt(() => {
22697
22697
  function z(_) {
22698
22698
  return D.current(_);
22699
22699
  }
@@ -22719,7 +22719,7 @@ const rm = {
22719
22719
  I == null || I.removeListener(z);
22720
22720
  }
22721
22721
  };
22722
- }, [h]), Mt(() => {
22722
+ }, [h]), wt(() => {
22723
22723
  const z = SK("ant-sider-");
22724
22724
  return b.addSider(z), () => b.removeSider(z);
22725
22725
  }, []);
@@ -27621,7 +27621,7 @@ function Uq(e, t) {
27621
27621
  Ee(xt), !g && !i && o === tt && ot(qe);
27622
27622
  }, _t = function() {
27623
27623
  fe(!1);
27624
- }, wt = Ld(Q, G, K, qc(Me)), bn = Re[Me] || null, Rt = Pt(function(rt) {
27624
+ }, Mt = Ld(Q, G, K, qc(Me)), bn = Re[Me] || null, Rt = Pt(function(rt) {
27625
27625
  return s(rt, {
27626
27626
  activeIndex: Me
27627
27627
  });
@@ -27660,7 +27660,7 @@ function Uq(e, t) {
27660
27660
  onPresetHover: Kt,
27661
27661
  onPresetSubmit: wn,
27662
27662
  onNow: Ln,
27663
- cellRender: wt
27663
+ cellRender: Mt
27664
27664
  })), ft = function(qe, xt) {
27665
27665
  var Bt = je(qe, xt);
27666
27666
  Ee(Bt);
@@ -28023,7 +28023,7 @@ function Yq(e, t) {
28023
28023
  we(ft);
28024
28024
  }, _t = function() {
28025
28025
  de("input");
28026
- }, wt = function(ft) {
28026
+ }, Mt = function(ft) {
28027
28027
  de("input"), ye(!0, {
28028
28028
  inherit: !0
28029
28029
  }), Ve(ft);
@@ -28063,7 +28063,7 @@ function Yq(e, t) {
28063
28063
  activeHelp: !!Gt,
28064
28064
  allHelp: !!Gt && Ge === "preset",
28065
28065
  focused: Se,
28066
- onFocus: wt,
28066
+ onFocus: Mt,
28067
28067
  onBlur: bn,
28068
28068
  onKeyDown: Rt,
28069
28069
  onSubmit: je,
@@ -30888,7 +30888,7 @@ var OG = function(t) {
30888
30888
  function g() {
30889
30889
  It.cancel(h.current);
30890
30890
  }
30891
- return Mt(function() {
30891
+ return wt(function() {
30892
30892
  var C = {};
30893
30893
  if (n)
30894
30894
  if (r) {
@@ -31180,10 +31180,10 @@ var _G = /* @__PURE__ */ u.forwardRef(function(e, t) {
31180
31180
  break;
31181
31181
  }
31182
31182
  }
31183
- Mt(function() {
31183
+ wt(function() {
31184
31184
  var F = document.getElementById($);
31185
31185
  F && F.scrollIntoView && F.scrollIntoView(!1);
31186
- }, [M]), Mt(function() {
31186
+ }, [M]), wt(function() {
31187
31187
  x || w(null);
31188
31188
  }, [x]);
31189
31189
  var A = j({}, p ? "marginRight" : "marginLeft", m);
@@ -31314,7 +31314,7 @@ var FG = function(t) {
31314
31314
  });
31315
31315
  }
31316
31316
  return Ee ? (O ? Pe(R, me) : Pe(_, Ce), de(), ve(), !0) : !1;
31317
- }), Mt(function() {
31317
+ }), wt(function() {
31318
31318
  return de(), se && (Fe.current = setTimeout(function() {
31319
31319
  Se(0);
31320
31320
  }, 100)), de;
@@ -31388,7 +31388,7 @@ var FG = function(t) {
31388
31388
  }), Pe;
31389
31389
  });
31390
31390
  };
31391
- Mt(function() {
31391
+ wt(function() {
31392
31392
  tt();
31393
31393
  }, [y.map(function(me) {
31394
31394
  return me.key;
@@ -31408,9 +31408,9 @@ var FG = function(t) {
31408
31408
  indicator: g,
31409
31409
  rtl: c
31410
31410
  }), Ye = yt.style;
31411
- Mt(function() {
31411
+ wt(function() {
31412
31412
  Xe();
31413
- }, [i, He, De, Lm(ht), Lm(pe), O]), Mt(function() {
31413
+ }, [i, He, De, Lm(ht), Lm(pe), O]), wt(function() {
31414
31414
  at();
31415
31415
  }, [c]);
31416
31416
  var Ae = !!Ue.length, Ke = "".concat(b, "-nav-wrap"), ct, gt, Nt, ce;
@@ -31550,7 +31550,7 @@ var KG = ["id", "prefixCls", "className", "items", "direction", "activeKey", "de
31550
31550
  return U && nt(U) === "object" && "key" in U;
31551
31551
  });
31552
31552
  }, [i]), D = c === "rtl", $ = UG(f), R = Et(!1), P = ne(R, 2), z = P[0], I = P[1];
31553
- Mt(function() {
31553
+ wt(function() {
31554
31554
  I(ts());
31555
31555
  }, []);
31556
31556
  var _ = Xt(function() {
@@ -31564,7 +31564,7 @@ var KG = ["id", "prefixCls", "className", "items", "direction", "activeKey", "de
31564
31564
  return U.key === k;
31565
31565
  });
31566
31566
  }), V = ne(F, 2), W = V[0], J = V[1];
31567
- Mt(function() {
31567
+ wt(function() {
31568
31568
  var U = T.findIndex(function(re) {
31569
31569
  return re.key === k;
31570
31570
  });
@@ -31579,7 +31579,7 @@ var KG = ["id", "prefixCls", "className", "items", "direction", "activeKey", "de
31579
31579
  var X = Xt(null, {
31580
31580
  value: n
31581
31581
  }), q = ne(X, 2), ae = q[0], Q = q[1];
31582
- Mt(function() {
31582
+ wt(function() {
31583
31583
  n || (Q("rc-tabs-".concat(process.env.NODE_ENV === "test" ? "test" : Mm)), Mm += 1);
31584
31584
  }, []);
31585
31585
  function G(U, oe) {
@@ -36094,7 +36094,7 @@ var UX = ["autoComplete", "onChange", "onFocus", "onBlur", "onPressEnter", "onKe
36094
36094
  input: P.current,
36095
36095
  nativeElement: ((he = z.current) === null || he === void 0 ? void 0 : he.nativeElement) || P.current
36096
36096
  };
36097
- }), Mt(function() {
36097
+ }), wt(function() {
36098
36098
  D(function(he) {
36099
36099
  return he && f ? !1 : he;
36100
36100
  });
@@ -36112,7 +36112,7 @@ var UX = ["autoComplete", "onChange", "onFocus", "onBlur", "onPressEnter", "onKe
36112
36112
  return;
36113
36113
  H(Re), P.current && t0(P.current, be, r, Re);
36114
36114
  };
36115
- Mt(function() {
36115
+ wt(function() {
36116
36116
  if (J) {
36117
36117
  var he;
36118
36118
  (he = P.current) === null || he === void 0 || he.setSelectionRange.apply(he, xe(J));
@@ -36315,7 +36315,7 @@ const ZX = function() {
36315
36315
  var e = Be(0), t = function() {
36316
36316
  It.cancel(e.current);
36317
36317
  };
36318
- return Mt(function() {
36318
+ return wt(function() {
36319
36319
  return t;
36320
36320
  }, []), function(n) {
36321
36321
  t(), e.current = It(function() {
@@ -37092,7 +37092,7 @@ function tx(e, t) {
37092
37092
  !((a = e.current) === null || a === void 0) && a.input && ((o = e.current) === null || o === void 0 ? void 0 : o.input.getAttribute("type")) === "password" && (!((i = e.current) === null || i === void 0) && i.input.hasAttribute("value")) && ((c = e.current) === null || c === void 0 || c.input.removeAttribute("value"));
37093
37093
  }));
37094
37094
  };
37095
- return Mt(() => (t && r(), () => n.current.forEach((a) => {
37095
+ return wt(() => (t && r(), () => n.current.forEach((a) => {
37096
37096
  a && clearTimeout(a);
37097
37097
  })), []), r;
37098
37098
  }
@@ -37172,7 +37172,7 @@ const fc = /* @__PURE__ */ C1((e, t) => {
37172
37172
  } = Ht(Kn), F = pa(A, o), V = uQ(e) || !!k, W = Be(V);
37173
37173
  if (process.env.NODE_ENV !== "production") {
37174
37174
  const U = Vt("Input");
37175
- Mt(() => {
37175
+ wt(() => {
37176
37176
  var oe;
37177
37177
  V && !W.current && process.env.NODE_ENV !== "production" && U(document.activeElement === ((oe = N.current) === null || oe === void 0 ? void 0 : oe.input), "usage", "When Input is focused, dynamic add or remove prefix / suffix will make it lose focus caused by dom structure change. Read more: https://ant.design/components/input/#FAQ"), W.current = V;
37178
37178
  }, [V]);
@@ -37713,7 +37713,7 @@ var RQ = ["prefixCls", "defaultValue", "value", "autoSize", "onResize", "classNa
37713
37713
  },
37714
37714
  nativeElement: ((Me = q.current) === null || Me === void 0 ? void 0 : Me.nativeElement) || Q()
37715
37715
  };
37716
- }), Mt(function() {
37716
+ }), wt(function() {
37717
37717
  H(function(Me) {
37718
37718
  return !y && Me;
37719
37719
  });
@@ -39157,7 +39157,7 @@ function IJ(e) {
39157
39157
  name: t
39158
39158
  } = e;
39159
39159
  const n = Vt("Form");
39160
- Mt(() => {
39160
+ wt(() => {
39161
39161
  if (t)
39162
39162
  return Xc[t] = (Xc[t] || 0) + 1, process.env.NODE_ENV !== "production" && n(Xc[t] <= 1, "usage", "There exist multiple Form with same `name`."), () => {
39163
39163
  Xc[t] -= 1;
@@ -40088,7 +40088,7 @@ function iZ(e, t, n, r, a, o, i) {
40088
40088
  S.deltaY > 0 && (M = _a / M), i(M, "wheel", S.clientX, S.clientY);
40089
40089
  }
40090
40090
  };
40091
- return Mt(function() {
40091
+ return wt(function() {
40092
40092
  var x, S, L, E;
40093
40093
  if (t) {
40094
40094
  L = zr(window, "mouseup", b, !1), E = zr(window, "mousemove", C, !1);
@@ -40122,14 +40122,14 @@ function cZ(e) {
40122
40122
  }
40123
40123
  function Nx(e) {
40124
40124
  var t = e.src, n = e.isCustomPlaceholder, r = e.fallback, a = Et(n ? "loading" : "normal"), o = ne(a, 2), i = o[0], c = o[1], l = Be(!1), s = i === "error";
40125
- Mt(function() {
40125
+ wt(function() {
40126
40126
  var p = !0;
40127
40127
  return cZ(t).then(function(h) {
40128
40128
  !h && p && c("error");
40129
40129
  }), function() {
40130
40130
  p = !1;
40131
40131
  };
40132
- }, [t]), Mt(function() {
40132
+ }, [t]), wt(function() {
40133
40133
  n && !l.current ? c("loading") : s && c("normal");
40134
40134
  }, [t]);
40135
40135
  var d = function() {
@@ -40225,7 +40225,7 @@ function sZ(e, t, n, r, a, o, i) {
40225
40225
  O && o(B({}, O), "dragRebound");
40226
40226
  }
40227
40227
  };
40228
- return Mt(function() {
40228
+ return wt(function() {
40229
40229
  var x;
40230
40230
  return n && t && (x = zr(window, "touchmove", function(S) {
40231
40231
  return S.preventDefault();
@@ -40254,7 +40254,7 @@ var uZ = ["fallback", "src", "imgRef"], dZ = ["prefixCls", "src", "alt", "imageI
40254
40254
  }, o, s));
40255
40255
  }, $x = function(t) {
40256
40256
  var n = t.prefixCls, r = t.src, a = t.alt, o = t.imageInfo, i = t.fallback, c = t.movable, l = c === void 0 ? !0 : c, s = t.onClose, d = t.visible, f = t.icons, m = f === void 0 ? {} : f, p = t.rootClassName, h = t.closeIcon, v = t.getContainer, g = t.current, C = g === void 0 ? 0 : g, b = t.count, y = b === void 0 ? 1 : b, x = t.countRender, S = t.scaleStep, L = S === void 0 ? 0.5 : S, E = t.minScale, M = E === void 0 ? 1 : E, w = t.maxScale, N = w === void 0 ? 50 : w, O = t.transitionName, T = O === void 0 ? "zoom" : O, D = t.maskTransitionName, $ = D === void 0 ? "fade" : D, R = t.imageRender, P = t.imgCommonProps, z = t.toolbarRender, I = t.onTransform, _ = t.onChange, A = mt(t, dZ), k = Be(), H = Ht(mc), F = H && y > 1, V = H && y >= 1, W = Et(!0), J = ne(W, 2), X = J[0], q = J[1], ae = aZ(k, M, N, I), Q = ae.transform, G = ae.resetTransform, K = ae.updateTransform, te = ae.dispatchZoomChange, U = iZ(k, l, d, L, Q, K, te), oe = U.isMoving, re = U.onMouseDown, ue = U.onWheel, ie = sZ(k, l, d, M, Q, K, te), fe = ie.isTouching, pe = ie.onTouchStart, ge = ie.onTouchMove, ye = ie.onTouchEnd, he = Q.rotate, be = Q.scale, Ee = Z(j({}, "".concat(n, "-moving"), oe));
40257
- Mt(function() {
40257
+ wt(function() {
40258
40258
  X || q(!0);
40259
40259
  }, [X]);
40260
40260
  var Ne = function() {
@@ -40293,7 +40293,7 @@ var uZ = ["fallback", "src", "imgRef"], dZ = ["prefixCls", "src", "alt", "imageI
40293
40293
  scale: 1
40294
40294
  }, "doubleClick") : te(_a + L, "doubleClick", lt.clientX, lt.clientY));
40295
40295
  };
40296
- Mt(function() {
40296
+ wt(function() {
40297
40297
  var Ve = zr(window, "keydown", Se, !1);
40298
40298
  return function() {
40299
40299
  Ve.remove();
@@ -41140,7 +41140,7 @@ var kx = function(t) {
41140
41140
  return Math.max(1, Math.min(zt, A2(void 0, K, m)));
41141
41141
  }
41142
41142
  }), oe = ne(U, 2), re = oe[0], ue = oe[1], ie = ee.useState(re), fe = ne(ie, 2), pe = fe[0], ge = fe[1];
41143
- Mt(function() {
41143
+ wt(function() {
41144
41144
  ge(re);
41145
41145
  }, [re]);
41146
41146
  var ye = C !== s4, he = "current" in t;
@@ -43448,7 +43448,7 @@ var Hee = {
43448
43448
  gapPosition: "bottom"
43449
43449
  }, Vee = function() {
43450
43450
  var t = Be([]), n = Be(null);
43451
- return Mt(function() {
43451
+ return wt(function() {
43452
43452
  var r = Date.now(), a = !1;
43453
43453
  t.current.forEach(function(o) {
43454
43454
  if (o) {
@@ -45296,7 +45296,7 @@ function AL(e) {
45296
45296
  }
45297
45297
  });
45298
45298
  }
45299
- return Mt(function() {
45299
+ return wt(function() {
45300
45300
  return function() {
45301
45301
  o.current = null;
45302
45302
  };
@@ -45315,7 +45315,7 @@ function kne(e) {
45315
45315
  function o() {
45316
45316
  return t.current;
45317
45317
  }
45318
- return Mt(function() {
45318
+ return wt(function() {
45319
45319
  return r;
45320
45320
  }, []), [a, o];
45321
45321
  }
@@ -45598,7 +45598,7 @@ function qne(e, t) {
45598
45598
  var qe = rt.ellipsis;
45599
45599
  return qe;
45600
45600
  }) ? "fixed" : "auto");
45601
- }, [_e, ht, ye, d, Ae]), _t, wt = {
45601
+ }, [_e, ht, ye, d, Ae]), _t, Mt = {
45602
45602
  colWidths: at,
45603
45603
  columCount: ye.length,
45604
45604
  stickyOffsets: Je,
@@ -45629,7 +45629,7 @@ function qne(e, t) {
45629
45629
  scrollbarSize: In,
45630
45630
  ref: De,
45631
45631
  onScroll: Ot
45632
- }), wt.colWidths = ye.map(function(rt, qe) {
45632
+ }), Mt.colWidths = ye.map(function(rt, qe) {
45633
45633
  var xt = rt.width, Bt = qe === ye.length - 1 ? xt - In : xt;
45634
45634
  return typeof Bt == "number" && !Number.isNaN(Bt) ? Bt : (process.env.NODE_ENV !== "production" && dt(n.columns.length === 0, "When use `components.body` with render props. Each column should have a fixed `width` value."), 0);
45635
45635
  })) : cn = /* @__PURE__ */ u.createElement("div", {
@@ -45648,7 +45648,7 @@ function qne(e, t) {
45648
45648
  var On = B(B(B({
45649
45649
  noData: !R.length,
45650
45650
  maxContentScroll: Ue && Ee === "max-content"
45651
- }, wt), Ne), {}, {
45651
+ }, Mt), Ne), {}, {
45652
45652
  direction: f,
45653
45653
  stickyClassName: Nt,
45654
45654
  onScroll: Ot
@@ -45678,7 +45678,7 @@ function qne(e, t) {
45678
45678
  style: B(B({}, ot), {}, {
45679
45679
  tableLayout: En
45680
45680
  })
45681
- }, kt), it, Lt, C !== !1 && /* @__PURE__ */ u.createElement(lp, le({}, wt, Ne)), Rt, me && /* @__PURE__ */ u.createElement(Jc, {
45681
+ }, kt), it, Lt, C !== !1 && /* @__PURE__ */ u.createElement(lp, le({}, Mt, Ne)), Rt, me && /* @__PURE__ */ u.createElement(Jc, {
45682
45682
  stickyOffsets: Je,
45683
45683
  flattenColumns: ye
45684
45684
  }, me)));
@@ -51411,7 +51411,7 @@ function v4(e, t) {
51411
51411
  }
51412
51412
  const Yre = (e) => {
51413
51413
  const t = Be();
51414
- return Mt(() => {
51414
+ return wt(() => {
51415
51415
  t.current = e;
51416
51416
  }), t.current;
51417
51417
  }, Xre = (e, t, n) => Zt(() => e === !0 ? {
@@ -54672,7 +54672,7 @@ function _8({ children: e }) {
54672
54672
  ],
54673
54673
  []
54674
54674
  );
54675
- return Mt(() => {
54675
+ return wt(() => {
54676
54676
  const l = f0.get(Gr.Language), s = c.find((d) => d.language === l);
54677
54677
  s !== void 0 && (n(s.code), n1.locale(l.toLowerCase()));
54678
54678
  }, [a, c]), /* @__PURE__ */ ze.jsx(H1, { theme: i, locale: t, children: e });
@@ -55080,7 +55080,7 @@ function Rae({
55080
55080
  }
55081
55081
  const Pae = (e, t) => {
55082
55082
  const n = Be();
55083
- return Mt(() => {
55083
+ return wt(() => {
55084
55084
  n.current = e;
55085
55085
  }, [e, t]), n.current;
55086
55086
  }, yE = (e, t, n, r) => e.getFixedT(t, n, r), Iae = (e, t, n, r) => g1(yE(e, t, n, r), [e, t, n, r]), Tae = (e, t = {}) => {
@@ -55111,7 +55111,7 @@ const Pae = (e, t) => {
55111
55111
  let g = s.join();
55112
55112
  t.lng && (g = `${t.lng}${g}`);
55113
55113
  const C = Pae(g), b = Be(!0);
55114
- Mt(() => {
55114
+ wt(() => {
55115
55115
  const {
55116
55116
  bindI18n: M,
55117
55117
  bindI18nStore: w
@@ -55127,7 +55127,7 @@ const Pae = (e, t) => {
55127
55127
  return M && (o == null || o.on(M, N)), w && (o == null || o.store.on(w, N)), () => {
55128
55128
  b.current = !1, o && (M == null || M.split(" ").forEach((O) => o.off(O, N))), w && o && w.split(" ").forEach((O) => o.store.off(O, N));
55129
55129
  };
55130
- }, [o, g]), Mt(() => {
55130
+ }, [o, g]), wt(() => {
55131
55131
  b.current && d && v(m);
55132
55132
  }, [o, l, d]);
55133
55133
  const y = [h, o, d];
@@ -71230,7 +71230,7 @@ const ch = "https://aquasis.freshdesk.com/api/v2/", HNe = "UtA4JWhMo8w4eWzzgo9",
71230
71230
  icon: [512, 512, [61913], "f1d8", "M16.1 260.2c-22.6 12.9-20.5 47.3 3.6 57.3L160 376l0 103.3c0 18.1 14.6 32.7 32.7 32.7c9.7 0 18.9-4.3 25.1-11.8l62-74.3 123.9 51.6c18.9 7.9 40.8-4.5 43.9-24.7l64-416c1.9-12.1-3.4-24.3-13.5-31.2s-23.3-7.5-34-1.4l-448 256zm52.1 25.5L409.7 90.6 190.1 336l1.2 1L68.2 285.7zM403.3 425.4L236.7 355.9 450.8 116.6 403.3 425.4z"]
71231
71231
  }, { Title: sh } = Ro, Y1 = "HELPDESK.FORM", UNe = "GENERAL.MESSAGES", KNe = ({ onCancel: e }) => {
71232
71232
  const [t, n] = Et(!1), [r] = gn.useForm(), a = y5(), { requiredField: o } = S5(), i = so(Gr.AppName);
71233
- Mt(() => {
71233
+ wt(() => {
71234
71234
  Zn.changeLanguage(a);
71235
71235
  }, [a]);
71236
71236
  const c = [
@@ -71356,7 +71356,7 @@ const ch = "https://aquasis.freshdesk.com/api/v2/", HNe = "UtA4JWhMo8w4eWzzgo9",
71356
71356
  pce.add(kwe);
71357
71357
  const qNe = ({ size: e }) => {
71358
71358
  const [t, n] = Et(!1), r = y5(), a = () => n((c) => !c), o = () => n(!1);
71359
- Mt(() => {
71359
+ wt(() => {
71360
71360
  Zn.changeLanguage(r);
71361
71361
  }, [r]);
71362
71362
  const i = () => {
@@ -72884,7 +72884,7 @@ const E$e = async () => {
72884
72884
  n.setFieldValue(
72885
72885
  nn.ReleasePages,
72886
72886
  r.toSpliced(c, 1, { ...l, [nn.Fields]: d })
72887
- );
72887
+ ), console.log(t);
72888
72888
  }, i = /* @__PURE__ */ ze.jsx(Rr, { justify: "center", align: "middle", children: /* @__PURE__ */ ze.jsxs(Ls, { direction: "vertical", children: [
72889
72889
  /* @__PURE__ */ ze.jsx("p", { className: "ant-upload-drag-icon", children: /* @__PURE__ */ ze.jsx(a5, {}) }),
72890
72890
  /* @__PURE__ */ ze.jsx("p", { className: "ant-upload-text", children: Ft("GENERAL.UPLOAD_LABEL") }),
@@ -72924,11 +72924,7 @@ const E$e = async () => {
72924
72924
  afterSubmit: o
72925
72925
  }) => {
72926
72926
  const [i, c] = Et(!1), [l, s] = Et(!1), [d, f] = Et(0), [m] = gn.useForm(), p = Be(null), { requiredField: h } = S5(), { data: v } = yI(), g = gn.useWatch(nn.ReleasePages, m), C = (R) => f(R);
72927
- Mt(() => {
72928
- var P;
72929
- const R = (g == null ? void 0 : g.length) - 1;
72930
- (P = p.current) == null || P.goTo(R);
72931
- }, [g == null ? void 0 : g.length]), Mt(() => {
72927
+ wt(() => {
72932
72928
  n && c(!0);
72933
72929
  }, [n]);
72934
72930
  const b = () => {
@@ -73064,7 +73060,7 @@ const E$e = async () => {
73064
73060
  }, { Title: P$e, Text: I$e } = Ro, T$e = () => {
73065
73061
  var S, L;
73066
73062
  const [e, t] = Et(!1), [n, r] = Et(!1), [a, o] = Et(0), i = Be(null), c = so(Gr.AppId), l = so(Gr.UserId), { data: s } = yI(), { data: d } = N$e({ idApp: c, lastDeployed: !0, userId: l }), f = d == null ? void 0 : d[0], m = s == null ? void 0 : s.find((E) => E.id === c);
73067
- Mt(() => {
73063
+ wt(() => {
73068
73064
  if (d != null && d.length) {
73069
73065
  const E = d[0], M = !E.readRelease && !!E.isDeployed;
73070
73066
  t(M);
@@ -1066,4 +1066,4 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
1066
1066
  `)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...n){const r=new this(t);return n.forEach(a=>r.set(a)),r}static accessor(t){const r=(this[CI]=this[CI]={accessors:{}}).accessors,a=this.prototype;function o(i){const c=dc(i);r[c]||(fze(a,i),r[c]=!0)}return $e.isArray(t)?t.forEach(o):o(t),this}}yr.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),$e.reduceDescriptors(yr.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(r){this[n]=r}}}),$e.freezeMethods(yr);function rf(e,t){const n=this||uc,r=t||n,a=yr.from(r.headers);let o=r.data;return $e.forEach(e,function(c){o=c.call(n,o,a.normalize(),t?t.status:void 0)}),a.normalize(),o}function yI(e){return!!(e&&e.__CANCEL__)}function Mo(e,t,n){Bt.call(this,e??"canceled",Bt.ERR_CANCELED,t,n),this.name="CanceledError"}$e.inherits(Mo,Bt,{__CANCEL__:!0});function SI(e,t,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?e(n):t(new Bt("Request failed with status code "+n.status,[Bt.ERR_BAD_REQUEST,Bt.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}function mze(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function pze(e,t){e=e||10;const n=new Array(e),r=new Array(e);let a=0,o=0,i;return t=t!==void 0?t:1e3,function(l){const s=Date.now(),d=r[o];i||(i=s),n[a]=l,r[a]=s;let f=o,m=0;for(;f!==a;)m+=n[f++],f=f%e;if(a=(a+1)%e,a===o&&(o=(o+1)%e),s-i<t)return;const p=d&&s-d;return p?Math.round(m*1e3/p):void 0}}function gze(e,t){let n=0,r=1e3/t,a,o;const i=(s,d=Date.now())=>{n=d,a=null,o&&(clearTimeout(o),o=null),e.apply(null,s)};return[(...s)=>{const d=Date.now(),f=d-n;f>=r?i(s,d):(a=s,o||(o=setTimeout(()=>{o=null,i(a)},r-f)))},()=>a&&i(a)]}const Ts=(e,t,n=3)=>{let r=0;const a=pze(50,250);return gze(o=>{const i=o.loaded,c=o.lengthComputable?o.total:void 0,l=i-r,s=a(l),d=i<=c;r=i;const f={loaded:i,total:c,progress:c?i/c:void 0,bytes:l,rate:s||void 0,estimated:s&&c&&d?(c-i)/s:void 0,event:o,lengthComputable:c!=null,[t?"download":"upload"]:!0};e(f)},n)},xI=(e,t)=>{const n=e!=null;return[r=>t[0]({lengthComputable:n,total:e,loaded:r}),t[1]]},LI=e=>(...t)=>$e.asap(()=>e(...t)),hze=Cr.hasStandardBrowserEnv?function(){const t=Cr.navigator&&/(msie|trident)/i.test(Cr.navigator.userAgent),n=document.createElement("a");let r;function a(o){let i=o;return t&&(n.setAttribute("href",i),i=n.href),n.setAttribute("href",i),{href:n.href,protocol:n.protocol?n.protocol.replace(/:$/,""):"",host:n.host,search:n.search?n.search.replace(/^\?/,""):"",hash:n.hash?n.hash.replace(/^#/,""):"",hostname:n.hostname,port:n.port,pathname:n.pathname.charAt(0)==="/"?n.pathname:"/"+n.pathname}}return r=a(window.location.href),function(i){const c=$e.isString(i)?a(i):i;return c.protocol===r.protocol&&c.host===r.host}}():function(){return function(){return!0}}(),vze=Cr.hasStandardBrowserEnv?{write(e,t,n,r,a,o){const i=[e+"="+encodeURIComponent(t)];$e.isNumber(n)&&i.push("expires="+new Date(n).toGMTString()),$e.isString(r)&&i.push("path="+r),$e.isString(a)&&i.push("domain="+a),o===!0&&i.push("secure"),document.cookie=i.join("; ")},read(e){const t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(e){this.write(e,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function bze(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function Cze(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function EI(e,t){return e&&!bze(t)?Cze(e,t):t}const MI=e=>e instanceof yr?{...e}:e;function ca(e,t){t=t||{};const n={};function r(s,d,f){return $e.isPlainObject(s)&&$e.isPlainObject(d)?$e.merge.call({caseless:f},s,d):$e.isPlainObject(d)?$e.merge({},d):$e.isArray(d)?d.slice():d}function a(s,d,f){if($e.isUndefined(d)){if(!$e.isUndefined(s))return r(void 0,s,f)}else return r(s,d,f)}function o(s,d){if(!$e.isUndefined(d))return r(void 0,d)}function i(s,d){if($e.isUndefined(d)){if(!$e.isUndefined(s))return r(void 0,s)}else return r(void 0,d)}function c(s,d,f){if(f in t)return r(s,d);if(f in e)return r(void 0,s)}const l={url:o,method:o,data:o,baseURL:i,transformRequest:i,transformResponse:i,paramsSerializer:i,timeout:i,timeoutMessage:i,withCredentials:i,withXSRFToken:i,adapter:i,responseType:i,xsrfCookieName:i,xsrfHeaderName:i,onUploadProgress:i,onDownloadProgress:i,decompress:i,maxContentLength:i,maxBodyLength:i,beforeRedirect:i,transport:i,httpAgent:i,httpsAgent:i,cancelToken:i,socketPath:i,responseEncoding:i,validateStatus:c,headers:(s,d)=>a(MI(s),MI(d),!0)};return $e.forEach(Object.keys(Object.assign({},e,t)),function(d){const f=l[d]||a,m=f(e[d],t[d],d);$e.isUndefined(m)&&f!==c||(n[d]=m)}),n}const wI=e=>{const t=ca({},e);let{data:n,withXSRFToken:r,xsrfHeaderName:a,xsrfCookieName:o,headers:i,auth:c}=t;t.headers=i=yr.from(i),t.url=gI(EI(t.baseURL,t.url),e.params,e.paramsSerializer),c&&i.set("Authorization","Basic "+btoa((c.username||"")+":"+(c.password?unescape(encodeURIComponent(c.password)):"")));let l;if($e.isFormData(n)){if(Cr.hasStandardBrowserEnv||Cr.hasStandardBrowserWebWorkerEnv)i.setContentType(void 0);else if((l=i.getContentType())!==!1){const[s,...d]=l?l.split(";").map(f=>f.trim()).filter(Boolean):[];i.setContentType([s||"multipart/form-data",...d].join("; "))}}if(Cr.hasStandardBrowserEnv&&(r&&$e.isFunction(r)&&(r=r(t)),r||r!==!1&&hze(t.url))){const s=a&&o&&vze.read(o);s&&i.set(a,s)}return t},yze=typeof XMLHttpRequest<"u"&&function(e){return new Promise(function(n,r){const a=wI(e);let o=a.data;const i=yr.from(a.headers).normalize();let{responseType:c,onUploadProgress:l,onDownloadProgress:s}=a,d,f,m,p,h;function v(){p&&p(),h&&h(),a.cancelToken&&a.cancelToken.unsubscribe(d),a.signal&&a.signal.removeEventListener("abort",d)}let g=new XMLHttpRequest;g.open(a.method.toUpperCase(),a.url,!0),g.timeout=a.timeout;function C(){if(!g)return;const y=yr.from("getAllResponseHeaders"in g&&g.getAllResponseHeaders()),S={data:!c||c==="text"||c==="json"?g.responseText:g.response,status:g.status,statusText:g.statusText,headers:y,config:e,request:g};SI(function(E){n(E),v()},function(E){r(E),v()},S),g=null}"onloadend"in g?g.onloadend=C:g.onreadystatechange=function(){!g||g.readyState!==4||g.status===0&&!(g.responseURL&&g.responseURL.indexOf("file:")===0)||setTimeout(C)},g.onabort=function(){g&&(r(new Bt("Request aborted",Bt.ECONNABORTED,e,g)),g=null)},g.onerror=function(){r(new Bt("Network Error",Bt.ERR_NETWORK,e,g)),g=null},g.ontimeout=function(){let x=a.timeout?"timeout of "+a.timeout+"ms exceeded":"timeout exceeded";const S=a.transitional||vI;a.timeoutErrorMessage&&(x=a.timeoutErrorMessage),r(new Bt(x,S.clarifyTimeoutError?Bt.ETIMEDOUT:Bt.ECONNABORTED,e,g)),g=null},o===void 0&&i.setContentType(null),"setRequestHeader"in g&&$e.forEach(i.toJSON(),function(x,S){g.setRequestHeader(S,x)}),$e.isUndefined(a.withCredentials)||(g.withCredentials=!!a.withCredentials),c&&c!=="json"&&(g.responseType=a.responseType),s&&([m,h]=Ts(s,!0),g.addEventListener("progress",m)),l&&g.upload&&([f,p]=Ts(l),g.upload.addEventListener("progress",f),g.upload.addEventListener("loadend",p)),(a.cancelToken||a.signal)&&(d=y=>{g&&(r(!y||y.type?new Mo(null,e,g):y),g.abort(),g=null)},a.cancelToken&&a.cancelToken.subscribe(d),a.signal&&(a.signal.aborted?d():a.signal.addEventListener("abort",d)));const b=mze(a.url);if(b&&Cr.protocols.indexOf(b)===-1){r(new Bt("Unsupported protocol "+b+":",Bt.ERR_BAD_REQUEST,e));return}g.send(o||null)})},Sze=(e,t)=>{const{length:n}=e=e?e.filter(Boolean):[];if(t||n){let r=new AbortController,a;const o=function(s){if(!a){a=!0,c();const d=s instanceof Error?s:this.reason;r.abort(d instanceof Bt?d:new Mo(d instanceof Error?d.message:d))}};let i=t&&setTimeout(()=>{i=null,o(new Bt(`timeout ${t} of ms exceeded`,Bt.ETIMEDOUT))},t);const c=()=>{e&&(i&&clearTimeout(i),i=null,e.forEach(s=>{s.unsubscribe?s.unsubscribe(o):s.removeEventListener("abort",o)}),e=null)};e.forEach(s=>s.addEventListener("abort",o));const{signal:l}=r;return l.unsubscribe=()=>$e.asap(c),l}},xze=function*(e,t){let n=e.byteLength;if(n<t){yield e;return}let r=0,a;for(;r<n;)a=r+t,yield e.slice(r,a),r=a},Lze=async function*(e,t){for await(const n of Eze(e))yield*xze(n,t)},Eze=async function*(e){if(e[Symbol.asyncIterator]){yield*e;return}const t=e.getReader();try{for(;;){const{done:n,value:r}=await t.read();if(n)break;yield r}}finally{await t.cancel()}},zI=(e,t,n,r)=>{const a=Lze(e,t);let o=0,i,c=l=>{i||(i=!0,r&&r(l))};return new ReadableStream({async pull(l){try{const{done:s,value:d}=await a.next();if(s){c(),l.close();return}let f=d.byteLength;if(n){let m=o+=f;n(m)}l.enqueue(new Uint8Array(d))}catch(s){throw c(s),s}},cancel(l){return c(l),a.return()}},{highWaterMark:2})},Rs=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",NI=Rs&&typeof ReadableStream=="function",Mze=Rs&&(typeof TextEncoder=="function"?(e=>t=>e.encode(t))(new TextEncoder):async e=>new Uint8Array(await new Response(e).arrayBuffer())),OI=(e,...t)=>{try{return!!e(...t)}catch{return!1}},wze=NI&&OI(()=>{let e=!1;const t=new Request(Cr.origin,{body:new ReadableStream,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type");return e&&!t}),$I=64*1024,af=NI&&OI(()=>$e.isReadableStream(new Response("").body)),Ds={stream:af&&(e=>e.body)};Rs&&(e=>{["text","arrayBuffer","blob","formData","stream"].forEach(t=>{!Ds[t]&&(Ds[t]=$e.isFunction(e[t])?n=>n[t]():(n,r)=>{throw new Bt(`Response type '${t}' is not supported`,Bt.ERR_NOT_SUPPORT,r)})})})(new Response);const zze=async e=>{if(e==null)return 0;if($e.isBlob(e))return e.size;if($e.isSpecCompliantForm(e))return(await new Request(Cr.origin,{method:"POST",body:e}).arrayBuffer()).byteLength;if($e.isArrayBufferView(e)||$e.isArrayBuffer(e))return e.byteLength;if($e.isURLSearchParams(e)&&(e=e+""),$e.isString(e))return(await Mze(e)).byteLength},Nze=async(e,t)=>{const n=$e.toFiniteNumber(e.getContentLength());return n??zze(t)},of={http:Ywe,xhr:yze,fetch:Rs&&(async e=>{let{url:t,method:n,data:r,signal:a,cancelToken:o,timeout:i,onDownloadProgress:c,onUploadProgress:l,responseType:s,headers:d,withCredentials:f="same-origin",fetchOptions:m}=wI(e);s=s?(s+"").toLowerCase():"text";let p=Sze([a,o&&o.toAbortSignal()],i),h;const v=p&&p.unsubscribe&&(()=>{p.unsubscribe()});let g;try{if(l&&wze&&n!=="get"&&n!=="head"&&(g=await Nze(d,r))!==0){let S=new Request(t,{method:"POST",body:r,duplex:"half"}),L;if($e.isFormData(r)&&(L=S.headers.get("content-type"))&&d.setContentType(L),S.body){const[E,M]=xI(g,Ts(LI(l)));r=zI(S.body,$I,E,M)}}$e.isString(f)||(f=f?"include":"omit");const C="credentials"in Request.prototype;h=new Request(t,{...m,signal:p,method:n.toUpperCase(),headers:d.normalize().toJSON(),body:r,duplex:"half",credentials:C?f:void 0});let b=await fetch(h);const y=af&&(s==="stream"||s==="response");if(af&&(c||y&&v)){const S={};["status","statusText","headers"].forEach(w=>{S[w]=b[w]});const L=$e.toFiniteNumber(b.headers.get("content-length")),[E,M]=c&&xI(L,Ts(LI(c),!0))||[];b=new Response(zI(b.body,$I,E,()=>{M&&M(),v&&v()}),S)}s=s||"text";let x=await Ds[$e.findKey(Ds,s)||"text"](b,e);return!y&&v&&v(),await new Promise((S,L)=>{SI(S,L,{data:x,headers:yr.from(b.headers),status:b.status,statusText:b.statusText,config:e,request:h})})}catch(C){throw v&&v(),C&&C.name==="TypeError"&&/fetch/i.test(C.message)?Object.assign(new Bt("Network Error",Bt.ERR_NETWORK,e,h),{cause:C.cause||C}):Bt.from(C,C&&C.code,e,h)}})};$e.forEach(of,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const PI=e=>`- ${e}`,Oze=e=>$e.isFunction(e)||e===null||e===!1,II={getAdapter:e=>{e=$e.isArray(e)?e:[e];const{length:t}=e;let n,r;const a={};for(let o=0;o<t;o++){n=e[o];let i;if(r=n,!Oze(n)&&(r=of[(i=String(n)).toLowerCase()],r===void 0))throw new Bt(`Unknown adapter '${i}'`);if(r)break;a[i||"#"+o]=r}if(!r){const o=Object.entries(a).map(([c,l])=>`adapter ${c} `+(l===!1?"is not supported by the environment":"is not available in the build"));let i=t?o.length>1?`since :
1067
1067
  `+o.map(PI).join(`
1068
1068
  `):" "+PI(o[0]):"as no adapter specified";throw new Bt("There is no suitable adapter to dispatch the request "+i,"ERR_NOT_SUPPORT")}return r},adapters:of};function cf(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new Mo(null,e)}function TI(e){return cf(e),e.headers=yr.from(e.headers),e.data=rf.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),II.getAdapter(e.adapter||uc.adapter)(e).then(function(r){return cf(e),r.data=rf.call(e,e.transformResponse,r),r.headers=yr.from(r.headers),r},function(r){return yI(r)||(cf(e),r&&r.response&&(r.response.data=rf.call(e,e.transformResponse,r.response),r.response.headers=yr.from(r.response.headers))),Promise.reject(r)})}const RI="1.7.7",lf={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{lf[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}});const DI={};lf.transitional=function(t,n,r){function a(o,i){return"[Axios v"+RI+"] Transitional option '"+o+"'"+i+(r?". "+r:"")}return(o,i,c)=>{if(t===!1)throw new Bt(a(i," has been removed"+(n?" in "+n:"")),Bt.ERR_DEPRECATED);return n&&!DI[i]&&(DI[i]=!0,console.warn(a(i," has been deprecated since v"+n+" and will be removed in the near future"))),t?t(o,i,c):!0}};function $ze(e,t,n){if(typeof e!="object")throw new Bt("options must be an object",Bt.ERR_BAD_OPTION_VALUE);const r=Object.keys(e);let a=r.length;for(;a-- >0;){const o=r[a],i=t[o];if(i){const c=e[o],l=c===void 0||i(c,o,e);if(l!==!0)throw new Bt("option "+o+" must be "+l,Bt.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new Bt("Unknown option "+o,Bt.ERR_BAD_OPTION)}}const sf={assertOptions:$ze,validators:lf},E2=sf.validators;class la{constructor(t){this.defaults=t,this.interceptors={request:new hI,response:new hI}}async request(t,n){try{return await this._request(t,n)}catch(r){if(r instanceof Error){let a;Error.captureStackTrace?Error.captureStackTrace(a={}):a=new Error;const o=a.stack?a.stack.replace(/^.+\n/,""):"";try{r.stack?o&&!String(r.stack).endsWith(o.replace(/^.+\n.+\n/,""))&&(r.stack+=`
1069
- `+o):r.stack=o}catch{}}throw r}}_request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=ca(this.defaults,n);const{transitional:r,paramsSerializer:a,headers:o}=n;r!==void 0&&sf.assertOptions(r,{silentJSONParsing:E2.transitional(E2.boolean),forcedJSONParsing:E2.transitional(E2.boolean),clarifyTimeoutError:E2.transitional(E2.boolean)},!1),a!=null&&($e.isFunction(a)?n.paramsSerializer={serialize:a}:sf.assertOptions(a,{encode:E2.function,serialize:E2.function},!0)),n.method=(n.method||this.defaults.method||"get").toLowerCase();let i=o&&$e.merge(o.common,o[n.method]);o&&$e.forEach(["delete","get","head","post","put","patch","common"],h=>{delete o[h]}),n.headers=yr.concat(i,o);const c=[];let l=!0;this.interceptors.request.forEach(function(v){typeof v.runWhen=="function"&&v.runWhen(n)===!1||(l=l&&v.synchronous,c.unshift(v.fulfilled,v.rejected))});const s=[];this.interceptors.response.forEach(function(v){s.push(v.fulfilled,v.rejected)});let d,f=0,m;if(!l){const h=[TI.bind(this),void 0];for(h.unshift.apply(h,c),h.push.apply(h,s),m=h.length,d=Promise.resolve(n);f<m;)d=d.then(h[f++],h[f++]);return d}m=c.length;let p=n;for(f=0;f<m;){const h=c[f++],v=c[f++];try{p=h(p)}catch(g){v.call(this,g);break}}try{d=TI.call(this,p)}catch(h){return Promise.reject(h)}for(f=0,m=s.length;f<m;)d=d.then(s[f++],s[f++]);return d}getUri(t){t=ca(this.defaults,t);const n=EI(t.baseURL,t.url);return gI(n,t.params,t.paramsSerializer)}}$e.forEach(["delete","get","head","options"],function(t){la.prototype[t]=function(n,r){return this.request(ca(r||{},{method:t,url:n,data:(r||{}).data}))}}),$e.forEach(["post","put","patch"],function(t){function n(r){return function(o,i,c){return this.request(ca(c||{},{method:t,headers:r?{"Content-Type":"multipart/form-data"}:{},url:o,data:i}))}}la.prototype[t]=n(),la.prototype[t+"Form"]=n(!0)});class uf{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let n;this.promise=new Promise(function(o){n=o});const r=this;this.promise.then(a=>{if(!r._listeners)return;let o=r._listeners.length;for(;o-- >0;)r._listeners[o](a);r._listeners=null}),this.promise.then=a=>{let o;const i=new Promise(c=>{r.subscribe(c),o=c}).then(a);return i.cancel=function(){r.unsubscribe(o)},i},t(function(o,i,c){r.reason||(r.reason=new Mo(o,i,c),n(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const n=this._listeners.indexOf(t);n!==-1&&this._listeners.splice(n,1)}toAbortSignal(){const t=new AbortController,n=r=>{t.abort(r)};return this.subscribe(n),t.signal.unsubscribe=()=>this.unsubscribe(n),t.signal}static source(){let t;return{token:new uf(function(a){t=a}),cancel:t}}}function Pze(e){return function(n){return e.apply(null,n)}}function Ize(e){return $e.isObject(e)&&e.isAxiosError===!0}const df={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(df).forEach(([e,t])=>{df[t]=e});function AI(e){const t=new la(e),n=ZP(la.prototype.request,t);return $e.extend(n,la.prototype,t,{allOwnKeys:!0}),$e.extend(n,t,null,{allOwnKeys:!0}),n.create=function(a){return AI(ca(e,a))},n}const An=AI(uc);An.Axios=la,An.CanceledError=Mo,An.CancelToken=uf,An.isCancel=yI,An.VERSION=RI,An.toFormData=Ps,An.AxiosError=Bt,An.Cancel=An.CanceledError,An.all=function(t){return Promise.all(t)},An.spread=Pze,An.isAxiosError=Ize,An.mergeConfig=ca,An.AxiosHeaders=yr,An.formToJSON=e=>bI($e.isHTMLForm(e)?new FormData(e):e),An.getAdapter=II.getAdapter,An.HttpStatusCode=df,An.default=An;const sa=An.create({baseURL:window.baseUrl,timeout:6e4});sa.interceptors.request.use(e=>{const t=mo(R1.Token);return e.headers.IdApp=J1e(),e.headers.Authorization="Bearer "+t,e},e=>Promise.reject(e));const _I="https://aquasis.freshdesk.com/api/v2/",kI=btoa("UtA4JWhMo8w4eWzzgo9"),Tze=async({appName:e,...t})=>{var l;const n=+"23000031142",{data:r}=await sa.get(_I+"ticket_fields",{headers:{Authorization:`Basic ${kI}`}}),a=r.find(s=>s.name==="cf_produto"),o=(l=a==null?void 0:a.choices)==null?void 0:l.find(s=>s.toLowerCase().includes(e.toLowerCase())),i={...t,status:2,priority:4,group_id:n,type:"Pedido de Suporte",custom_fields:{cf_produto:o},tags:["new-freshdesk-widget"],source:9},c=new FormData;return Object.keys(i).forEach(s=>{var d;s==="custom_fields"?Object.keys(i[s]).forEach(f=>{c.append(`custom_fields[${f}]`,i.custom_fields[f])}):s==="attachments"?(d=t.attachments)==null||d.forEach(f=>{c.append("attachments[]",new File([f],f.name))}):s==="tags"?c.append("tags[]",i[s]):c.append(s,i[s])}),sa.post(_I+"tickets",c,{headers:{Authorization:`Basic ${kI}`,"Content-Type":"multipart/form-data"}})},Rze={prefix:"far",iconName:"paper-plane",icon:[512,512,[61913],"f1d8","M16.1 260.2c-22.6 12.9-20.5 47.3 3.6 57.3L160 376l0 103.3c0 18.1 14.6 32.7 32.7 32.7c9.7 0 18.9-4.3 25.1-11.8l62-74.3 123.9 51.6c18.9 7.9 40.8-4.5 43.9-24.7l64-416c1.9-12.1-3.4-24.3-13.5-31.2s-23.3-7.5-34-1.4l-448 256zm52.1 25.5L409.7 90.6 190.1 336l1.2 1L68.2 285.7zM403.3 425.4L236.7 355.9 450.8 116.6 403.3 425.4z"]},{Title:FI}=fo,Xr="HELPDESK.FORM",Dze="GENERAL.MESSAGES",Aze=({onCancel:e})=>{const[t,n]=O.useState(!1),[r]=un.useForm(),a=dd(),{requiredField:o}=fd(),i=mo(R1.AppName);O.useEffect(()=>{Gn.changeLanguage(a)},[a]);const c=[{dataIndex:"field",title:Dt("HELPDESK.TABLE.FIELD"),render:d=>Dt(`HELPDESK.FORM.FIELDS.${d.toUpperCase()}`)},{dataIndex:"code",title:Dt("HELPDESK.TABLE.CODE"),render:d=>Dt(`HELPDESK.ERRORS_CODE.${d.toUpperCase()}`)}],l=d=>{r.setFieldValue(oa.Attachments,d.fileList)},s=d=>{n(!0);const f={...d,appName:i};Tze(f).then(()=>{M0.success({message:Dt(`${Dze}.SUCCESS.TICKET`),placement:"topLeft"}),e&&e()}).catch(({response:m})=>{const{errors:p}=m.data;M0.error({className:"table-notification",message:Dt("ERROR"),placement:"topLeft",description:ze.jsx(w1,{dataSource:p,columns:c,pagination:{defaultPageSize:5},rowKey:"field",size:"small",bordered:!0}),duration:0})}).finally(()=>n(!1))};return ze.jsxs(C1,{className:"helpdesk__content",children:[ze.jsx(ir,{span:24,children:ze.jsx(FI,{level:3,className:"helpdesk__title",children:Dt(`${Xr}.TITLE`)})}),ze.jsx(ir,{span:24,children:ze.jsxs(G2,{children:[ze.jsx(FI,{level:4,children:Dt(`${Xr}.FIELDS.TITLE`)}),ze.jsxs(un,{form:r,layout:"vertical",onFinish:s,children:[ze.jsx(Ms,{fieldName:oa.Name,label:Dt(`${Xr}.FIELDS.NAME`),placeholder:Dt(`${Xr}.FIELDS.NAME`,{context:"PLACEHOLDER"}),rules:o}),ze.jsx(Ms,{fieldName:oa.Email,label:Dt(`${Xr}.FIELDS.EMAIL`),placeholder:Dt(`${Xr}.FIELDS.EMAIL`,{context:"PLACEHOLDER"}),rules:o}),ze.jsx(Ms,{fieldName:oa.Subject,label:Dt(`${Xr}.FIELDS.SUBJECT`),placeholder:Dt(`${Xr}.FIELDS.SUBJECT`,{context:"PLACEHOLDER"}),rules:o}),ze.jsx(swe,{fieldName:oa.Description,label:Dt(`${Xr}.FIELDS.DESCRIPTION`),placeholder:Dt(`${Xr}.FIELDS.DESCRIPTION`,{context:"PLACEHOLDER"}),rows:4,rules:o}),ze.jsx(un.Item,{name:oa.Attachments,children:ze.jsxs(rd,{beforeUpload:()=>!1,maxCount:5,onChange:l,className:"helpdesk__fields-files",multiple:!0,children:[ze.jsx("p",{className:"ant-upload-drag-icon",children:ze.jsx(g8,{})}),ze.jsx(k2e,{i18nKey:Dt(`${Xr}.FIELDS.UPLOAD_FILES`),components:{strong:ze.jsx("strong",{}),br:ze.jsx("br",{}),small:ze.jsx("small",{})}})]})}),ze.jsx(mn,{htmlType:"submit",type:"primary",icon:ze.jsx(I1,{icon:Rze}),loading:t,disabled:t,block:!0,children:Dt(`${Xr}.BUTTONS.SEND`)})]})]})})]})};fie.add(DMe);const _ze=({size:e})=>{const[t,n]=O.useState(!1),r=dd(),a=()=>n(c=>!c),o=()=>n(!1);O.useEffect(()=>{Gn.changeLanguage(r)},[r]);const i=()=>{switch(e){case"small":return"1x";case"large":return"xl";default:return"lg"}};return ze.jsx(id,{children:ze.jsx(C1,{align:"middle",children:ze.jsx(F6,{placement:"bottomRight",trigger:"click",content:ze.jsx(Aze,{onCancel:o}),rootClassName:"helpdesk__container",overlayInnerStyle:{padding:0},arrow:!1,open:t,destroyTooltipOnHide:!0,children:ze.jsx(fr,{title:Dt("HELPDESK.SUPPORT"),placement:"left",children:ze.jsx(mn,{type:"primary",shape:"circle",icon:ze.jsx(I1,{icon:cw,size:i()}),onClick:a,size:e})})})})})},kze=Xf()(_ze);function fc(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,fa(e,t)}var mc=function(){function e(){this.listeners=[]}var t=e.prototype;return t.subscribe=function(r){var a=this,o=r||function(){};return this.listeners.push(o),this.onSubscribe(),function(){a.listeners=a.listeners.filter(function(i){return i!==o}),a.onUnsubscribe()}},t.hasListeners=function(){return this.listeners.length>0},t.onSubscribe=function(){},t.onUnsubscribe=function(){},e}(),As=typeof window>"u";function cr(){}function Fze(e,t){return typeof e=="function"?e(t):e}function ff(e){return typeof e=="number"&&e>=0&&e!==1/0}function _s(e){return Array.isArray(e)?e:[e]}function jI(e,t){return Math.max(e+(t||0)-Date.now(),0)}function ks(e,t,n){return Bs(e)?typeof t=="function"?le({},n,{queryKey:e,queryFn:t}):le({},t,{queryKey:e}):e}function M2(e,t,n){return Bs(e)?[le({},t,{queryKey:e}),n]:[e||{},t]}function jze(e,t){if(e===!0&&t===!0||e==null&&t==null)return"all";if(e===!1&&t===!1)return"none";var n=e??!t;return n?"active":"inactive"}function BI(e,t){var n=e.active,r=e.exact,a=e.fetching,o=e.inactive,i=e.predicate,c=e.queryKey,l=e.stale;if(Bs(c)){if(r){if(t.queryHash!==mf(c,t.options))return!1}else if(!Fs(t.queryKey,c))return!1}var s=jze(n,o);if(s==="none")return!1;if(s!=="all"){var d=t.isActive();if(s==="active"&&!d||s==="inactive"&&d)return!1}return!(typeof l=="boolean"&&t.isStale()!==l||typeof a=="boolean"&&t.isFetching()!==a||i&&!i(t))}function HI(e,t){var n=e.exact,r=e.fetching,a=e.predicate,o=e.mutationKey;if(Bs(o)){if(!t.options.mutationKey)return!1;if(n){if(ua(t.options.mutationKey)!==ua(o))return!1}else if(!Fs(t.options.mutationKey,o))return!1}return!(typeof r=="boolean"&&t.state.status==="loading"!==r||a&&!a(t))}function mf(e,t){var n=(t==null?void 0:t.queryKeyHashFn)||ua;return n(e)}function ua(e){var t=_s(e);return Bze(t)}function Bze(e){return JSON.stringify(e,function(t,n){return pf(n)?Object.keys(n).sort().reduce(function(r,a){return r[a]=n[a],r},{}):n})}function Fs(e,t){return VI(_s(e),_s(t))}function VI(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?!Object.keys(t).some(function(n){return!VI(e[n],t[n])}):!1}function js(e,t){if(e===t)return e;var n=Array.isArray(e)&&Array.isArray(t);if(n||pf(e)&&pf(t)){for(var r=n?e.length:Object.keys(e).length,a=n?t:Object.keys(t),o=a.length,i=n?[]:{},c=0,l=0;l<o;l++){var s=n?l:a[l];i[s]=js(e[s],t[s]),i[s]===e[s]&&c++}return r===o&&c===r?e:i}return t}function Hze(e,t){if(e&&!t||t&&!e)return!1;for(var n in e)if(e[n]!==t[n])return!1;return!0}function pf(e){if(!WI(e))return!1;var t=e.constructor;if(typeof t>"u")return!0;var n=t.prototype;return!(!WI(n)||!n.hasOwnProperty("isPrototypeOf"))}function WI(e){return Object.prototype.toString.call(e)==="[object Object]"}function Bs(e){return typeof e=="string"||Array.isArray(e)}function Vze(e){return new Promise(function(t){setTimeout(t,e)})}function UI(e){Promise.resolve().then(e).catch(function(t){return setTimeout(function(){throw t})})}function KI(){if(typeof AbortController=="function")return new AbortController}var Wze=function(e){fc(t,e);function t(){var r;return r=e.call(this)||this,r.setup=function(a){var o;if(!As&&((o=window)!=null&&o.addEventListener)){var i=function(){return a()};return window.addEventListener("visibilitychange",i,!1),window.addEventListener("focus",i,!1),function(){window.removeEventListener("visibilitychange",i),window.removeEventListener("focus",i)}}},r}var n=t.prototype;return n.onSubscribe=function(){this.cleanup||this.setEventListener(this.setup)},n.onUnsubscribe=function(){if(!this.hasListeners()){var a;(a=this.cleanup)==null||a.call(this),this.cleanup=void 0}},n.setEventListener=function(a){var o,i=this;this.setup=a,(o=this.cleanup)==null||o.call(this),this.cleanup=a(function(c){typeof c=="boolean"?i.setFocused(c):i.onFocus()})},n.setFocused=function(a){this.focused=a,a&&this.onFocus()},n.onFocus=function(){this.listeners.forEach(function(a){a()})},n.isFocused=function(){return typeof this.focused=="boolean"?this.focused:typeof document>"u"?!0:[void 0,"visible","prerender"].includes(document.visibilityState)},t}(mc),pc=new Wze,Uze=function(e){fc(t,e);function t(){var r;return r=e.call(this)||this,r.setup=function(a){var o;if(!As&&((o=window)!=null&&o.addEventListener)){var i=function(){return a()};return window.addEventListener("online",i,!1),window.addEventListener("offline",i,!1),function(){window.removeEventListener("online",i),window.removeEventListener("offline",i)}}},r}var n=t.prototype;return n.onSubscribe=function(){this.cleanup||this.setEventListener(this.setup)},n.onUnsubscribe=function(){if(!this.hasListeners()){var a;(a=this.cleanup)==null||a.call(this),this.cleanup=void 0}},n.setEventListener=function(a){var o,i=this;this.setup=a,(o=this.cleanup)==null||o.call(this),this.cleanup=a(function(c){typeof c=="boolean"?i.setOnline(c):i.onOnline()})},n.setOnline=function(a){this.online=a,a&&this.onOnline()},n.onOnline=function(){this.listeners.forEach(function(a){a()})},n.isOnline=function(){return typeof this.online=="boolean"?this.online:typeof navigator>"u"||typeof navigator.onLine>"u"?!0:navigator.onLine},t}(mc),Hs=new Uze;function Kze(e){return Math.min(1e3*Math.pow(2,e),3e4)}function Vs(e){return typeof(e==null?void 0:e.cancel)=="function"}var qI=function(t){this.revert=t==null?void 0:t.revert,this.silent=t==null?void 0:t.silent};function Ws(e){return e instanceof qI}var GI=function(t){var n=this,r=!1,a,o,i,c;this.abort=t.abort,this.cancel=function(m){return a==null?void 0:a(m)},this.cancelRetry=function(){r=!0},this.continueRetry=function(){r=!1},this.continue=function(){return o==null?void 0:o()},this.failureCount=0,this.isPaused=!1,this.isResolved=!1,this.isTransportCancelable=!1,this.promise=new Promise(function(m,p){i=m,c=p});var l=function(p){n.isResolved||(n.isResolved=!0,t.onSuccess==null||t.onSuccess(p),o==null||o(),i(p))},s=function(p){n.isResolved||(n.isResolved=!0,t.onError==null||t.onError(p),o==null||o(),c(p))},d=function(){return new Promise(function(p){o=p,n.isPaused=!0,t.onPause==null||t.onPause()}).then(function(){o=void 0,n.isPaused=!1,t.onContinue==null||t.onContinue()})},f=function m(){if(!n.isResolved){var p;try{p=t.fn()}catch(h){p=Promise.reject(h)}a=function(v){if(!n.isResolved&&(s(new qI(v)),n.abort==null||n.abort(),Vs(p)))try{p.cancel()}catch{}},n.isTransportCancelable=Vs(p),Promise.resolve(p).then(l).catch(function(h){var v,g;if(!n.isResolved){var C=(v=t.retry)!=null?v:3,b=(g=t.retryDelay)!=null?g:Kze,y=typeof b=="function"?b(n.failureCount,h):b,x=C===!0||typeof C=="number"&&n.failureCount<C||typeof C=="function"&&C(n.failureCount,h);if(r||!x){s(h);return}n.failureCount++,t.onFail==null||t.onFail(n.failureCount,h),Vze(y).then(function(){if(!pc.isFocused()||!Hs.isOnline())return d()}).then(function(){r?s(h):m()})}})}};f()},qze=function(){function e(){this.queue=[],this.transactions=0,this.notifyFn=function(n){n()},this.batchNotifyFn=function(n){n()}}var t=e.prototype;return t.batch=function(r){var a;this.transactions++;try{a=r()}finally{this.transactions--,this.transactions||this.flush()}return a},t.schedule=function(r){var a=this;this.transactions?this.queue.push(r):UI(function(){a.notifyFn(r)})},t.batchCalls=function(r){var a=this;return function(){for(var o=arguments.length,i=new Array(o),c=0;c<o;c++)i[c]=arguments[c];a.schedule(function(){r.apply(void 0,i)})}},t.flush=function(){var r=this,a=this.queue;this.queue=[],a.length&&UI(function(){r.batchNotifyFn(function(){a.forEach(function(o){r.notifyFn(o)})})})},t.setNotifyFunction=function(r){this.notifyFn=r},t.setBatchNotifyFunction=function(r){this.batchNotifyFn=r},e}(),Mn=new qze,YI=console;function Us(){return YI}function Gze(e){YI=e}var Yze=function(){function e(n){this.abortSignalConsumed=!1,this.hadObservers=!1,this.defaultOptions=n.defaultOptions,this.setOptions(n.options),this.observers=[],this.cache=n.cache,this.queryKey=n.queryKey,this.queryHash=n.queryHash,this.initialState=n.state||this.getDefaultState(this.options),this.state=this.initialState,this.meta=n.meta,this.scheduleGc()}var t=e.prototype;return t.setOptions=function(r){var a;this.options=le({},this.defaultOptions,r),this.meta=r==null?void 0:r.meta,this.cacheTime=Math.max(this.cacheTime||0,(a=this.options.cacheTime)!=null?a:5*60*1e3)},t.setDefaultOptions=function(r){this.defaultOptions=r},t.scheduleGc=function(){var r=this;this.clearGcTimeout(),ff(this.cacheTime)&&(this.gcTimeout=setTimeout(function(){r.optionalRemove()},this.cacheTime))},t.clearGcTimeout=function(){this.gcTimeout&&(clearTimeout(this.gcTimeout),this.gcTimeout=void 0)},t.optionalRemove=function(){this.observers.length||(this.state.isFetching?this.hadObservers&&this.scheduleGc():this.cache.remove(this))},t.setData=function(r,a){var o,i,c=this.state.data,l=Fze(r,c);return(o=(i=this.options).isDataEqual)!=null&&o.call(i,c,l)?l=c:this.options.structuralSharing!==!1&&(l=js(c,l)),this.dispatch({data:l,type:"success",dataUpdatedAt:a==null?void 0:a.updatedAt}),l},t.setState=function(r,a){this.dispatch({type:"setState",state:r,setStateOptions:a})},t.cancel=function(r){var a,o=this.promise;return(a=this.retryer)==null||a.cancel(r),o?o.then(cr).catch(cr):Promise.resolve()},t.destroy=function(){this.clearGcTimeout(),this.cancel({silent:!0})},t.reset=function(){this.destroy(),this.setState(this.initialState)},t.isActive=function(){return this.observers.some(function(r){return r.options.enabled!==!1})},t.isFetching=function(){return this.state.isFetching},t.isStale=function(){return this.state.isInvalidated||!this.state.dataUpdatedAt||this.observers.some(function(r){return r.getCurrentResult().isStale})},t.isStaleByTime=function(r){return r===void 0&&(r=0),this.state.isInvalidated||!this.state.dataUpdatedAt||!jI(this.state.dataUpdatedAt,r)},t.onFocus=function(){var r,a=this.observers.find(function(o){return o.shouldFetchOnWindowFocus()});a&&a.refetch(),(r=this.retryer)==null||r.continue()},t.onOnline=function(){var r,a=this.observers.find(function(o){return o.shouldFetchOnReconnect()});a&&a.refetch(),(r=this.retryer)==null||r.continue()},t.addObserver=function(r){this.observers.indexOf(r)===-1&&(this.observers.push(r),this.hadObservers=!0,this.clearGcTimeout(),this.cache.notify({type:"observerAdded",query:this,observer:r}))},t.removeObserver=function(r){this.observers.indexOf(r)!==-1&&(this.observers=this.observers.filter(function(a){return a!==r}),this.observers.length||(this.retryer&&(this.retryer.isTransportCancelable||this.abortSignalConsumed?this.retryer.cancel({revert:!0}):this.retryer.cancelRetry()),this.cacheTime?this.scheduleGc():this.cache.remove(this)),this.cache.notify({type:"observerRemoved",query:this,observer:r}))},t.getObserversCount=function(){return this.observers.length},t.invalidate=function(){this.state.isInvalidated||this.dispatch({type:"invalidate"})},t.fetch=function(r,a){var o=this,i,c,l;if(this.state.isFetching){if(this.state.dataUpdatedAt&&(a!=null&&a.cancelRefetch))this.cancel({silent:!0});else if(this.promise){var s;return(s=this.retryer)==null||s.continueRetry(),this.promise}}if(r&&this.setOptions(r),!this.options.queryFn){var d=this.observers.find(function(b){return b.options.queryFn});d&&this.setOptions(d.options)}var f=_s(this.queryKey),m=KI(),p={queryKey:f,pageParam:void 0,meta:this.meta};Object.defineProperty(p,"signal",{enumerable:!0,get:function(){if(m)return o.abortSignalConsumed=!0,m.signal}});var h=function(){return o.options.queryFn?(o.abortSignalConsumed=!1,o.options.queryFn(p)):Promise.reject("Missing queryFn")},v={fetchOptions:a,options:this.options,queryKey:f,state:this.state,fetchFn:h,meta:this.meta};if((i=this.options.behavior)!=null&&i.onFetch){var g;(g=this.options.behavior)==null||g.onFetch(v)}if(this.revertState=this.state,!this.state.isFetching||this.state.fetchMeta!==((c=v.fetchOptions)==null?void 0:c.meta)){var C;this.dispatch({type:"fetch",meta:(C=v.fetchOptions)==null?void 0:C.meta})}return this.retryer=new GI({fn:v.fetchFn,abort:m==null||(l=m.abort)==null?void 0:l.bind(m),onSuccess:function(y){o.setData(y),o.cache.config.onSuccess==null||o.cache.config.onSuccess(y,o),o.cacheTime===0&&o.optionalRemove()},onError:function(y){Ws(y)&&y.silent||o.dispatch({type:"error",error:y}),Ws(y)||(o.cache.config.onError==null||o.cache.config.onError(y,o),Us().error(y)),o.cacheTime===0&&o.optionalRemove()},onFail:function(){o.dispatch({type:"failed"})},onPause:function(){o.dispatch({type:"pause"})},onContinue:function(){o.dispatch({type:"continue"})},retry:v.options.retry,retryDelay:v.options.retryDelay}),this.promise=this.retryer.promise,this.promise},t.dispatch=function(r){var a=this;this.state=this.reducer(this.state,r),Mn.batch(function(){a.observers.forEach(function(o){o.onQueryUpdate(r)}),a.cache.notify({query:a,type:"queryUpdated",action:r})})},t.getDefaultState=function(r){var a=typeof r.initialData=="function"?r.initialData():r.initialData,o=typeof r.initialData<"u",i=o?typeof r.initialDataUpdatedAt=="function"?r.initialDataUpdatedAt():r.initialDataUpdatedAt:0,c=typeof a<"u";return{data:a,dataUpdateCount:0,dataUpdatedAt:c?i??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchMeta:null,isFetching:!1,isInvalidated:!1,isPaused:!1,status:c?"success":"idle"}},t.reducer=function(r,a){var o,i;switch(a.type){case"failed":return le({},r,{fetchFailureCount:r.fetchFailureCount+1});case"pause":return le({},r,{isPaused:!0});case"continue":return le({},r,{isPaused:!1});case"fetch":return le({},r,{fetchFailureCount:0,fetchMeta:(o=a.meta)!=null?o:null,isFetching:!0,isPaused:!1},!r.dataUpdatedAt&&{error:null,status:"loading"});case"success":return le({},r,{data:a.data,dataUpdateCount:r.dataUpdateCount+1,dataUpdatedAt:(i=a.dataUpdatedAt)!=null?i:Date.now(),error:null,fetchFailureCount:0,isFetching:!1,isInvalidated:!1,isPaused:!1,status:"success"});case"error":var c=a.error;return Ws(c)&&c.revert&&this.revertState?le({},this.revertState):le({},r,{error:c,errorUpdateCount:r.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:r.fetchFailureCount+1,isFetching:!1,isPaused:!1,status:"error"});case"invalidate":return le({},r,{isInvalidated:!0});case"setState":return le({},r,a.state);default:return r}},e}(),Xze=function(e){fc(t,e);function t(r){var a;return a=e.call(this)||this,a.config=r||{},a.queries=[],a.queriesMap={},a}var n=t.prototype;return n.build=function(a,o,i){var c,l=o.queryKey,s=(c=o.queryHash)!=null?c:mf(l,o),d=this.get(s);return d||(d=new Yze({cache:this,queryKey:l,queryHash:s,options:a.defaultQueryOptions(o),state:i,defaultOptions:a.getQueryDefaults(l),meta:o.meta}),this.add(d)),d},n.add=function(a){this.queriesMap[a.queryHash]||(this.queriesMap[a.queryHash]=a,this.queries.push(a),this.notify({type:"queryAdded",query:a}))},n.remove=function(a){var o=this.queriesMap[a.queryHash];o&&(a.destroy(),this.queries=this.queries.filter(function(i){return i!==a}),o===a&&delete this.queriesMap[a.queryHash],this.notify({type:"queryRemoved",query:a}))},n.clear=function(){var a=this;Mn.batch(function(){a.queries.forEach(function(o){a.remove(o)})})},n.get=function(a){return this.queriesMap[a]},n.getAll=function(){return this.queries},n.find=function(a,o){var i=M2(a,o),c=i[0];return typeof c.exact>"u"&&(c.exact=!0),this.queries.find(function(l){return BI(c,l)})},n.findAll=function(a,o){var i=M2(a,o),c=i[0];return Object.keys(c).length>0?this.queries.filter(function(l){return BI(c,l)}):this.queries},n.notify=function(a){var o=this;Mn.batch(function(){o.listeners.forEach(function(i){i(a)})})},n.onFocus=function(){var a=this;Mn.batch(function(){a.queries.forEach(function(o){o.onFocus()})})},n.onOnline=function(){var a=this;Mn.batch(function(){a.queries.forEach(function(o){o.onOnline()})})},t}(mc),Qze=function(){function e(n){this.options=le({},n.defaultOptions,n.options),this.mutationId=n.mutationId,this.mutationCache=n.mutationCache,this.observers=[],this.state=n.state||Jze(),this.meta=n.meta}var t=e.prototype;return t.setState=function(r){this.dispatch({type:"setState",state:r})},t.addObserver=function(r){this.observers.indexOf(r)===-1&&this.observers.push(r)},t.removeObserver=function(r){this.observers=this.observers.filter(function(a){return a!==r})},t.cancel=function(){return this.retryer?(this.retryer.cancel(),this.retryer.promise.then(cr).catch(cr)):Promise.resolve()},t.continue=function(){return this.retryer?(this.retryer.continue(),this.retryer.promise):this.execute()},t.execute=function(){var r=this,a,o=this.state.status==="loading",i=Promise.resolve();return o||(this.dispatch({type:"loading",variables:this.options.variables}),i=i.then(function(){r.mutationCache.config.onMutate==null||r.mutationCache.config.onMutate(r.state.variables,r)}).then(function(){return r.options.onMutate==null?void 0:r.options.onMutate(r.state.variables)}).then(function(c){c!==r.state.context&&r.dispatch({type:"loading",context:c,variables:r.state.variables})})),i.then(function(){return r.executeMutation()}).then(function(c){a=c,r.mutationCache.config.onSuccess==null||r.mutationCache.config.onSuccess(a,r.state.variables,r.state.context,r)}).then(function(){return r.options.onSuccess==null?void 0:r.options.onSuccess(a,r.state.variables,r.state.context)}).then(function(){return r.options.onSettled==null?void 0:r.options.onSettled(a,null,r.state.variables,r.state.context)}).then(function(){return r.dispatch({type:"success",data:a}),a}).catch(function(c){return r.mutationCache.config.onError==null||r.mutationCache.config.onError(c,r.state.variables,r.state.context,r),Us().error(c),Promise.resolve().then(function(){return r.options.onError==null?void 0:r.options.onError(c,r.state.variables,r.state.context)}).then(function(){return r.options.onSettled==null?void 0:r.options.onSettled(void 0,c,r.state.variables,r.state.context)}).then(function(){throw r.dispatch({type:"error",error:c}),c})})},t.executeMutation=function(){var r=this,a;return this.retryer=new GI({fn:function(){return r.options.mutationFn?r.options.mutationFn(r.state.variables):Promise.reject("No mutationFn found")},onFail:function(){r.dispatch({type:"failed"})},onPause:function(){r.dispatch({type:"pause"})},onContinue:function(){r.dispatch({type:"continue"})},retry:(a=this.options.retry)!=null?a:0,retryDelay:this.options.retryDelay}),this.retryer.promise},t.dispatch=function(r){var a=this;this.state=Zze(this.state,r),Mn.batch(function(){a.observers.forEach(function(o){o.onMutationUpdate(r)}),a.mutationCache.notify(a)})},e}();function Jze(){return{context:void 0,data:void 0,error:null,failureCount:0,isPaused:!1,status:"idle",variables:void 0}}function Zze(e,t){switch(t.type){case"failed":return le({},e,{failureCount:e.failureCount+1});case"pause":return le({},e,{isPaused:!0});case"continue":return le({},e,{isPaused:!1});case"loading":return le({},e,{context:t.context,data:void 0,error:null,isPaused:!1,status:"loading",variables:t.variables});case"success":return le({},e,{data:t.data,error:null,status:"success",isPaused:!1});case"error":return le({},e,{data:void 0,error:t.error,failureCount:e.failureCount+1,isPaused:!1,status:"error"});case"setState":return le({},e,t.state);default:return e}}var eNe=function(e){fc(t,e);function t(r){var a;return a=e.call(this)||this,a.config=r||{},a.mutations=[],a.mutationId=0,a}var n=t.prototype;return n.build=function(a,o,i){var c=new Qze({mutationCache:this,mutationId:++this.mutationId,options:a.defaultMutationOptions(o),state:i,defaultOptions:o.mutationKey?a.getMutationDefaults(o.mutationKey):void 0,meta:o.meta});return this.add(c),c},n.add=function(a){this.mutations.push(a),this.notify(a)},n.remove=function(a){this.mutations=this.mutations.filter(function(o){return o!==a}),a.cancel(),this.notify(a)},n.clear=function(){var a=this;Mn.batch(function(){a.mutations.forEach(function(o){a.remove(o)})})},n.getAll=function(){return this.mutations},n.find=function(a){return typeof a.exact>"u"&&(a.exact=!0),this.mutations.find(function(o){return HI(a,o)})},n.findAll=function(a){return this.mutations.filter(function(o){return HI(a,o)})},n.notify=function(a){var o=this;Mn.batch(function(){o.listeners.forEach(function(i){i(a)})})},n.onFocus=function(){this.resumePausedMutations()},n.onOnline=function(){this.resumePausedMutations()},n.resumePausedMutations=function(){var a=this.mutations.filter(function(o){return o.state.isPaused});return Mn.batch(function(){return a.reduce(function(o,i){return o.then(function(){return i.continue().catch(cr)})},Promise.resolve())})},t}(mc);function tNe(){return{onFetch:function(t){t.fetchFn=function(){var n,r,a,o,i,c,l=(n=t.fetchOptions)==null||(r=n.meta)==null?void 0:r.refetchPage,s=(a=t.fetchOptions)==null||(o=a.meta)==null?void 0:o.fetchMore,d=s==null?void 0:s.pageParam,f=(s==null?void 0:s.direction)==="forward",m=(s==null?void 0:s.direction)==="backward",p=((i=t.state.data)==null?void 0:i.pages)||[],h=((c=t.state.data)==null?void 0:c.pageParams)||[],v=KI(),g=v==null?void 0:v.signal,C=h,b=!1,y=t.options.queryFn||function(){return Promise.reject("Missing queryFn")},x=function($,I,T,z){return C=z?[I].concat(C):[].concat(C,[I]),z?[T].concat($):[].concat($,[T])},S=function($,I,T,z){if(b)return Promise.reject("Cancelled");if(typeof T>"u"&&!I&&$.length)return Promise.resolve($);var R={queryKey:t.queryKey,signal:g,pageParam:T,meta:t.meta},k=y(R),_=Promise.resolve(k).then(function(V){return x($,T,V,z)});if(Vs(k)){var F=_;F.cancel=k.cancel}return _},L;if(!p.length)L=S([]);else if(f){var E=typeof d<"u",M=E?d:XI(t.options,p);L=S(p,E,M)}else if(m){var w=typeof d<"u",N=w?d:nNe(t.options,p);L=S(p,w,N,!0)}else(function(){C=[];var A=typeof t.options.getNextPageParam>"u",$=l&&p[0]?l(p[0],0,p):!0;L=$?S([],A,h[0]):Promise.resolve(x([],h[0],p[0]));for(var I=function(R){L=L.then(function(k){var _=l&&p[R]?l(p[R],R,p):!0;if(_){var F=A?h[R]:XI(t.options,k);return S(k,A,F)}return Promise.resolve(x(k,h[R],p[R]))})},T=1;T<p.length;T++)I(T)})();var P=L.then(function(A){return{pages:A,pageParams:C}}),D=P;return D.cancel=function(){b=!0,v==null||v.abort(),Vs(L)&&L.cancel()},P}}}}function XI(e,t){return e.getNextPageParam==null?void 0:e.getNextPageParam(t[t.length-1],t)}function nNe(e,t){return e.getPreviousPageParam==null?void 0:e.getPreviousPageParam(t[0],t)}var rNe=function(){function e(n){n===void 0&&(n={}),this.queryCache=n.queryCache||new Xze,this.mutationCache=n.mutationCache||new eNe,this.defaultOptions=n.defaultOptions||{},this.queryDefaults=[],this.mutationDefaults=[]}var t=e.prototype;return t.mount=function(){var r=this;this.unsubscribeFocus=pc.subscribe(function(){pc.isFocused()&&Hs.isOnline()&&(r.mutationCache.onFocus(),r.queryCache.onFocus())}),this.unsubscribeOnline=Hs.subscribe(function(){pc.isFocused()&&Hs.isOnline()&&(r.mutationCache.onOnline(),r.queryCache.onOnline())})},t.unmount=function(){var r,a;(r=this.unsubscribeFocus)==null||r.call(this),(a=this.unsubscribeOnline)==null||a.call(this)},t.isFetching=function(r,a){var o=M2(r,a),i=o[0];return i.fetching=!0,this.queryCache.findAll(i).length},t.isMutating=function(r){return this.mutationCache.findAll(le({},r,{fetching:!0})).length},t.getQueryData=function(r,a){var o;return(o=this.queryCache.find(r,a))==null?void 0:o.state.data},t.getQueriesData=function(r){return this.getQueryCache().findAll(r).map(function(a){var o=a.queryKey,i=a.state,c=i.data;return[o,c]})},t.setQueryData=function(r,a,o){var i=ks(r),c=this.defaultQueryOptions(i);return this.queryCache.build(this,c).setData(a,o)},t.setQueriesData=function(r,a,o){var i=this;return Mn.batch(function(){return i.getQueryCache().findAll(r).map(function(c){var l=c.queryKey;return[l,i.setQueryData(l,a,o)]})})},t.getQueryState=function(r,a){var o;return(o=this.queryCache.find(r,a))==null?void 0:o.state},t.removeQueries=function(r,a){var o=M2(r,a),i=o[0],c=this.queryCache;Mn.batch(function(){c.findAll(i).forEach(function(l){c.remove(l)})})},t.resetQueries=function(r,a,o){var i=this,c=M2(r,a,o),l=c[0],s=c[1],d=this.queryCache,f=le({},l,{active:!0});return Mn.batch(function(){return d.findAll(l).forEach(function(m){m.reset()}),i.refetchQueries(f,s)})},t.cancelQueries=function(r,a,o){var i=this,c=M2(r,a,o),l=c[0],s=c[1],d=s===void 0?{}:s;typeof d.revert>"u"&&(d.revert=!0);var f=Mn.batch(function(){return i.queryCache.findAll(l).map(function(m){return m.cancel(d)})});return Promise.all(f).then(cr).catch(cr)},t.invalidateQueries=function(r,a,o){var i,c,l,s=this,d=M2(r,a,o),f=d[0],m=d[1],p=le({},f,{active:(i=(c=f.refetchActive)!=null?c:f.active)!=null?i:!0,inactive:(l=f.refetchInactive)!=null?l:!1});return Mn.batch(function(){return s.queryCache.findAll(f).forEach(function(h){h.invalidate()}),s.refetchQueries(p,m)})},t.refetchQueries=function(r,a,o){var i=this,c=M2(r,a,o),l=c[0],s=c[1],d=Mn.batch(function(){return i.queryCache.findAll(l).map(function(m){return m.fetch(void 0,le({},s,{meta:{refetchPage:l==null?void 0:l.refetchPage}}))})}),f=Promise.all(d).then(cr);return s!=null&&s.throwOnError||(f=f.catch(cr)),f},t.fetchQuery=function(r,a,o){var i=ks(r,a,o),c=this.defaultQueryOptions(i);typeof c.retry>"u"&&(c.retry=!1);var l=this.queryCache.build(this,c);return l.isStaleByTime(c.staleTime)?l.fetch(c):Promise.resolve(l.state.data)},t.prefetchQuery=function(r,a,o){return this.fetchQuery(r,a,o).then(cr).catch(cr)},t.fetchInfiniteQuery=function(r,a,o){var i=ks(r,a,o);return i.behavior=tNe(),this.fetchQuery(i)},t.prefetchInfiniteQuery=function(r,a,o){return this.fetchInfiniteQuery(r,a,o).then(cr).catch(cr)},t.cancelMutations=function(){var r=this,a=Mn.batch(function(){return r.mutationCache.getAll().map(function(o){return o.cancel()})});return Promise.all(a).then(cr).catch(cr)},t.resumePausedMutations=function(){return this.getMutationCache().resumePausedMutations()},t.executeMutation=function(r){return this.mutationCache.build(this,r).execute()},t.getQueryCache=function(){return this.queryCache},t.getMutationCache=function(){return this.mutationCache},t.getDefaultOptions=function(){return this.defaultOptions},t.setDefaultOptions=function(r){this.defaultOptions=r},t.setQueryDefaults=function(r,a){var o=this.queryDefaults.find(function(i){return ua(r)===ua(i.queryKey)});o?o.defaultOptions=a:this.queryDefaults.push({queryKey:r,defaultOptions:a})},t.getQueryDefaults=function(r){var a;return r?(a=this.queryDefaults.find(function(o){return Fs(r,o.queryKey)}))==null?void 0:a.defaultOptions:void 0},t.setMutationDefaults=function(r,a){var o=this.mutationDefaults.find(function(i){return ua(r)===ua(i.mutationKey)});o?o.defaultOptions=a:this.mutationDefaults.push({mutationKey:r,defaultOptions:a})},t.getMutationDefaults=function(r){var a;return r?(a=this.mutationDefaults.find(function(o){return Fs(r,o.mutationKey)}))==null?void 0:a.defaultOptions:void 0},t.defaultQueryOptions=function(r){if(r!=null&&r._defaulted)return r;var a=le({},this.defaultOptions.queries,this.getQueryDefaults(r==null?void 0:r.queryKey),r,{_defaulted:!0});return!a.queryHash&&a.queryKey&&(a.queryHash=mf(a.queryKey,a)),a},t.defaultQueryObserverOptions=function(r){return this.defaultQueryOptions(r)},t.defaultMutationOptions=function(r){return r!=null&&r._defaulted?r:le({},this.defaultOptions.mutations,this.getMutationDefaults(r==null?void 0:r.mutationKey),r,{_defaulted:!0})},t.clear=function(){this.queryCache.clear(),this.mutationCache.clear()},e}(),aNe=function(e){fc(t,e);function t(r,a){var o;return o=e.call(this)||this,o.client=r,o.options=a,o.trackedProps=[],o.selectError=null,o.bindMethods(),o.setOptions(a),o}var n=t.prototype;return n.bindMethods=function(){this.remove=this.remove.bind(this),this.refetch=this.refetch.bind(this)},n.onSubscribe=function(){this.listeners.length===1&&(this.currentQuery.addObserver(this),QI(this.currentQuery,this.options)&&this.executeFetch(),this.updateTimers())},n.onUnsubscribe=function(){this.listeners.length||this.destroy()},n.shouldFetchOnReconnect=function(){return gf(this.currentQuery,this.options,this.options.refetchOnReconnect)},n.shouldFetchOnWindowFocus=function(){return gf(this.currentQuery,this.options,this.options.refetchOnWindowFocus)},n.destroy=function(){this.listeners=[],this.clearTimers(),this.currentQuery.removeObserver(this)},n.setOptions=function(a,o){var i=this.options,c=this.currentQuery;if(this.options=this.client.defaultQueryObserverOptions(a),typeof this.options.enabled<"u"&&typeof this.options.enabled!="boolean")throw new Error("Expected enabled to be a boolean");this.options.queryKey||(this.options.queryKey=i.queryKey),this.updateQuery();var l=this.hasListeners();l&&JI(this.currentQuery,c,this.options,i)&&this.executeFetch(),this.updateResult(o),l&&(this.currentQuery!==c||this.options.enabled!==i.enabled||this.options.staleTime!==i.staleTime)&&this.updateStaleTimeout();var s=this.computeRefetchInterval();l&&(this.currentQuery!==c||this.options.enabled!==i.enabled||s!==this.currentRefetchInterval)&&this.updateRefetchInterval(s)},n.getOptimisticResult=function(a){var o=this.client.defaultQueryObserverOptions(a),i=this.client.getQueryCache().build(this.client,o);return this.createResult(i,o)},n.getCurrentResult=function(){return this.currentResult},n.trackResult=function(a,o){var i=this,c={},l=function(d){i.trackedProps.includes(d)||i.trackedProps.push(d)};return Object.keys(a).forEach(function(s){Object.defineProperty(c,s,{configurable:!1,enumerable:!0,get:function(){return l(s),a[s]}})}),(o.useErrorBoundary||o.suspense)&&l("error"),c},n.getNextResult=function(a){var o=this;return new Promise(function(i,c){var l=o.subscribe(function(s){s.isFetching||(l(),s.isError&&(a!=null&&a.throwOnError)?c(s.error):i(s))})})},n.getCurrentQuery=function(){return this.currentQuery},n.remove=function(){this.client.getQueryCache().remove(this.currentQuery)},n.refetch=function(a){return this.fetch(le({},a,{meta:{refetchPage:a==null?void 0:a.refetchPage}}))},n.fetchOptimistic=function(a){var o=this,i=this.client.defaultQueryObserverOptions(a),c=this.client.getQueryCache().build(this.client,i);return c.fetch().then(function(){return o.createResult(c,i)})},n.fetch=function(a){var o=this;return this.executeFetch(a).then(function(){return o.updateResult(),o.currentResult})},n.executeFetch=function(a){this.updateQuery();var o=this.currentQuery.fetch(this.options,a);return a!=null&&a.throwOnError||(o=o.catch(cr)),o},n.updateStaleTimeout=function(){var a=this;if(this.clearStaleTimeout(),!(As||this.currentResult.isStale||!ff(this.options.staleTime))){var o=jI(this.currentResult.dataUpdatedAt,this.options.staleTime),i=o+1;this.staleTimeoutId=setTimeout(function(){a.currentResult.isStale||a.updateResult()},i)}},n.computeRefetchInterval=function(){var a;return typeof this.options.refetchInterval=="function"?this.options.refetchInterval(this.currentResult.data,this.currentQuery):(a=this.options.refetchInterval)!=null?a:!1},n.updateRefetchInterval=function(a){var o=this;this.clearRefetchInterval(),this.currentRefetchInterval=a,!(As||this.options.enabled===!1||!ff(this.currentRefetchInterval)||this.currentRefetchInterval===0)&&(this.refetchIntervalId=setInterval(function(){(o.options.refetchIntervalInBackground||pc.isFocused())&&o.executeFetch()},this.currentRefetchInterval))},n.updateTimers=function(){this.updateStaleTimeout(),this.updateRefetchInterval(this.computeRefetchInterval())},n.clearTimers=function(){this.clearStaleTimeout(),this.clearRefetchInterval()},n.clearStaleTimeout=function(){this.staleTimeoutId&&(clearTimeout(this.staleTimeoutId),this.staleTimeoutId=void 0)},n.clearRefetchInterval=function(){this.refetchIntervalId&&(clearInterval(this.refetchIntervalId),this.refetchIntervalId=void 0)},n.createResult=function(a,o){var i=this.currentQuery,c=this.options,l=this.currentResult,s=this.currentResultState,d=this.currentResultOptions,f=a!==i,m=f?a.state:this.currentQueryInitialState,p=f?this.currentResult:this.previousQueryResult,h=a.state,v=h.dataUpdatedAt,g=h.error,C=h.errorUpdatedAt,b=h.isFetching,y=h.status,x=!1,S=!1,L;if(o.optimisticResults){var E=this.hasListeners(),M=!E&&QI(a,o),w=E&&JI(a,i,o,c);(M||w)&&(b=!0,v||(y="loading"))}if(o.keepPreviousData&&!h.dataUpdateCount&&(p!=null&&p.isSuccess)&&y!=="error")L=p.data,v=p.dataUpdatedAt,y=p.status,x=!0;else if(o.select&&typeof h.data<"u")if(l&&h.data===(s==null?void 0:s.data)&&o.select===this.selectFn)L=this.selectResult;else try{this.selectFn=o.select,L=o.select(h.data),o.structuralSharing!==!1&&(L=js(l==null?void 0:l.data,L)),this.selectResult=L,this.selectError=null}catch(D){Us().error(D),this.selectError=D}else L=h.data;if(typeof o.placeholderData<"u"&&typeof L>"u"&&(y==="loading"||y==="idle")){var N;if(l!=null&&l.isPlaceholderData&&o.placeholderData===(d==null?void 0:d.placeholderData))N=l.data;else if(N=typeof o.placeholderData=="function"?o.placeholderData():o.placeholderData,o.select&&typeof N<"u")try{N=o.select(N),o.structuralSharing!==!1&&(N=js(l==null?void 0:l.data,N)),this.selectError=null}catch(D){Us().error(D),this.selectError=D}typeof N<"u"&&(y="success",L=N,S=!0)}this.selectError&&(g=this.selectError,L=this.selectResult,C=Date.now(),y="error");var P={status:y,isLoading:y==="loading",isSuccess:y==="success",isError:y==="error",isIdle:y==="idle",data:L,dataUpdatedAt:v,error:g,errorUpdatedAt:C,failureCount:h.fetchFailureCount,errorUpdateCount:h.errorUpdateCount,isFetched:h.dataUpdateCount>0||h.errorUpdateCount>0,isFetchedAfterMount:h.dataUpdateCount>m.dataUpdateCount||h.errorUpdateCount>m.errorUpdateCount,isFetching:b,isRefetching:b&&y!=="loading",isLoadingError:y==="error"&&h.dataUpdatedAt===0,isPlaceholderData:S,isPreviousData:x,isRefetchError:y==="error"&&h.dataUpdatedAt!==0,isStale:hf(a,o),refetch:this.refetch,remove:this.remove};return P},n.shouldNotifyListeners=function(a,o){if(!o)return!0;var i=this.options,c=i.notifyOnChangeProps,l=i.notifyOnChangePropsExclusions;if(!c&&!l||c==="tracked"&&!this.trackedProps.length)return!0;var s=c==="tracked"?this.trackedProps:c;return Object.keys(a).some(function(d){var f=d,m=a[f]!==o[f],p=s==null?void 0:s.some(function(v){return v===d}),h=l==null?void 0:l.some(function(v){return v===d});return m&&!h&&(!s||p)})},n.updateResult=function(a){var o=this.currentResult;if(this.currentResult=this.createResult(this.currentQuery,this.options),this.currentResultState=this.currentQuery.state,this.currentResultOptions=this.options,!Hze(this.currentResult,o)){var i={cache:!0};(a==null?void 0:a.listeners)!==!1&&this.shouldNotifyListeners(this.currentResult,o)&&(i.listeners=!0),this.notify(le({},i,a))}},n.updateQuery=function(){var a=this.client.getQueryCache().build(this.client,this.options);if(a!==this.currentQuery){var o=this.currentQuery;this.currentQuery=a,this.currentQueryInitialState=a.state,this.previousQueryResult=this.currentResult,this.hasListeners()&&(o==null||o.removeObserver(this),a.addObserver(this))}},n.onQueryUpdate=function(a){var o={};a.type==="success"?o.onSuccess=!0:a.type==="error"&&!Ws(a.error)&&(o.onError=!0),this.updateResult(o),this.hasListeners()&&this.updateTimers()},n.notify=function(a){var o=this;Mn.batch(function(){a.onSuccess?(o.options.onSuccess==null||o.options.onSuccess(o.currentResult.data),o.options.onSettled==null||o.options.onSettled(o.currentResult.data,null)):a.onError&&(o.options.onError==null||o.options.onError(o.currentResult.error),o.options.onSettled==null||o.options.onSettled(void 0,o.currentResult.error)),a.listeners&&o.listeners.forEach(function(i){i(o.currentResult)}),a.cache&&o.client.getQueryCache().notify({query:o.currentQuery,type:"observerResultsUpdated"})})},t}(mc);function oNe(e,t){return t.enabled!==!1&&!e.state.dataUpdatedAt&&!(e.state.status==="error"&&t.retryOnMount===!1)}function QI(e,t){return oNe(e,t)||e.state.dataUpdatedAt>0&&gf(e,t,t.refetchOnMount)}function gf(e,t,n){if(t.enabled!==!1){var r=typeof n=="function"?n(e):n;return r==="always"||r!==!1&&hf(e,t)}return!1}function JI(e,t,n,r){return n.enabled!==!1&&(e!==t||r.enabled===!1)&&(!n.suspense||e.state.status!=="error")&&hf(e,n)}function hf(e,t){return e.isStaleByTime(t.staleTime)}var iNe=Tn.unstable_batchedUpdates;Mn.setBatchNotifyFunction(iNe);var cNe=console;Gze(cNe);var ZI=O.createContext(void 0),eT=O.createContext(!1);function tT(e){return e&&typeof window<"u"?(window.ReactQueryClientContext||(window.ReactQueryClientContext=ZI),window.ReactQueryClientContext):ZI}var lNe=function(){var t=O.useContext(tT(O.useContext(eT)));if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},nT=function(t){var n=t.client,r=t.contextSharing,a=r===void 0?!1:r,o=t.children;O.useEffect(function(){return n.mount(),function(){n.unmount()}},[n]);var i=tT(a);return O.createElement(eT.Provider,{value:a},O.createElement(i.Provider,{value:n},o))};function sNe(){var e=!1;return{clearReset:function(){e=!1},reset:function(){e=!0},isReset:function(){return e}}}var uNe=O.createContext(sNe()),dNe=function(){return O.useContext(uNe)};function fNe(e,t,n){return typeof t=="function"?t.apply(void 0,n):typeof t=="boolean"?t:!!e}function mNe(e,t){var n=O.useRef(!1),r=O.useState(0),a=r[1],o=lNe(),i=dNe(),c=o.defaultQueryObserverOptions(e);c.optimisticResults=!0,c.onError&&(c.onError=Mn.batchCalls(c.onError)),c.onSuccess&&(c.onSuccess=Mn.batchCalls(c.onSuccess)),c.onSettled&&(c.onSettled=Mn.batchCalls(c.onSettled)),c.suspense&&(typeof c.staleTime!="number"&&(c.staleTime=1e3),c.cacheTime===0&&(c.cacheTime=1)),(c.suspense||c.useErrorBoundary)&&(i.isReset()||(c.retryOnMount=!1));var l=O.useState(function(){return new t(o,c)}),s=l[0],d=s.getOptimisticResult(c);if(O.useEffect(function(){n.current=!0,i.clearReset();var f=s.subscribe(Mn.batchCalls(function(){n.current&&a(function(m){return m+1})}));return s.updateResult(),function(){n.current=!1,f()}},[i,s]),O.useEffect(function(){s.setOptions(c,{listeners:!1})},[c,s]),c.suspense&&d.isLoading)throw s.fetchOptimistic(c).then(function(f){var m=f.data;c.onSuccess==null||c.onSuccess(m),c.onSettled==null||c.onSettled(m,null)}).catch(function(f){i.clearReset(),c.onError==null||c.onError(f),c.onSettled==null||c.onSettled(void 0,f)});if(d.isError&&!i.isReset()&&!d.isFetching&&fNe(c.suspense,c.useErrorBoundary,[d.error,s.getCurrentQuery()]))throw d.error;return c.notifyOnChangeProps==="tracked"&&(d=s.trackResult(d,c)),d}function rT(e,t,n){var r=ks(e,t,n);return mNe(r,aNe)}var Qt=(e=>(e.App="idApp",e.Version="version",e.DeployDate="releaseDate",e.ReleasePages="gaReleasePages",e.Fields="gaReleasePagesContent",e.Title="title",e.Description="description",e.Image="idFile",e.Order="order",e))(Qt||{}),vf=(e=>(e.GetApps="GetApps",e.GetReleases="GetReleases",e))(vf||{});const pNe=async()=>{const{data:e}=await sa.get("getApps");return e},gNe=async e=>{const{data:t}=await sa.post("ListReleases",e);return t},hNe=async e=>{const{data:t}=await sa.post("MaintainReleases",e);return t},vNe=async(e,t)=>{const{data:n}=await sa.post("ReadNotification",{idRelease:e,userId:t});return n},aT=()=>rT([vf.GetApps],async()=>await pNe()),bNe=e=>{const{idApp:t,userId:n,lastDeployed:r}=e;return rT([vf.GetReleases,t,n,r],async()=>await gNe(e),{enabled:!!t})},CNe=({index:e})=>{const{requiredField:t}=fd();return ze.jsx(un.List,{name:[e,Qt.Fields],children:(n,{remove:r})=>ze.jsxs(ze.Fragment,{children:[ze.jsx(ws,{fieldName:"idReleasePage",hidden:!0}),ze.jsx(S1,{gap:16,vertical:!0,children:n.map(({key:a,name:o,...i})=>ze.jsxs(S1,{gap:6,align:"center",children:[ze.jsxs(S1,{vertical:!0,gap:2,style:{width:"100%"},children:[ze.jsx(un.Item,{...i,name:[o,Qt.Title],rules:t,noStyle:!0,children:ze.jsx(y1,{placeholder:Dt("RELEASE-NOTES.FORM.FIELDS.TITLE"),maxLength:500})}),ze.jsx(un.Item,{...i,name:[o,Qt.Description],rules:t,noStyle:!0,children:ze.jsx(Gu,{autoSize:{minRows:2},placeholder:Dt("RELEASE-NOTES.FORM.FIELDS.DESCRIPTION")})})]}),ze.jsx(un.Item,{noStyle:!0,children:ze.jsx(fr,{title:Dt("GENERAL.REMOVE"),children:ze.jsx(mn,{type:"text",icon:ze.jsx(By,{}),onClick:()=>r(o)})})})]},a))})]})})},yNe=O.forwardRef(({changeSlide:e},t)=>{const n=un.useFormInstance(),r=un.useWatch(Qt.ReleasePages,n),a=c=>l=>{const s=c[0],d=c[1],f=r[s];Z1e(l.file.originFileObj,m=>{n.setFieldValue(Qt.ReleasePages,r.toSpliced(s,1,{...f,[d]:m}))})},o=c=>()=>{var f;const l=r==null?void 0:r[c],d=[...((f=r==null?void 0:r[c])==null?void 0:f[Qt.Fields])??[],{}];n.setFieldValue(Qt.ReleasePages,r.toSpliced(c,1,{...l,[Qt.Fields]:d}))},i=ze.jsx(C1,{justify:"center",align:"middle",children:ze.jsxs(f0,{direction:"vertical",children:[ze.jsx("p",{className:"ant-upload-drag-icon",children:ze.jsx(g8,{})}),ze.jsx("p",{className:"ant-upload-text",children:Dt("GENERAL.UPLOAD_LABEL")}),ze.jsx("p",{className:"ant-upload-hint",children:Dt("GENERAL.JPG_PNG_WARNING")})]})});return ze.jsx(un.List,{name:Qt.ReleasePages,children:c=>ze.jsxs(ze.Fragment,{children:[ze.jsx(ws,{fieldName:"idRelease",hidden:!0}),ze.jsx(ws,{fieldName:"idReleasePage",hidden:!0}),ze.jsx(Tu,{infinite:!1,ref:t,afterChange:e,children:c.map(({key:l,name:s,...d})=>{var m;const f=(m=r==null?void 0:r[s])==null?void 0:m[Qt.Image];return ze.jsx("div",{children:ze.jsxs(C1,{gutter:[8,16],style:{marginBottom:35},children:[ze.jsx(ir,{span:24,children:ze.jsxs(C1,{gutter:8,children:[ze.jsx(ir,{span:8,children:ze.jsx(CNe,{index:s})}),ze.jsx(ir,{span:16,children:ze.jsx(G2,{bordered:!0,styles:{body:{padding:2}},children:ze.jsx(un.Item,{...d,name:[s,Qt.Image],noStyle:!0,children:ze.jsx(rd,{listType:"picture",className:"patch-notes-image",showUploadList:!1,beforeUpload:e2e,onChange:a([s,Qt.Image]),children:f?ze.jsx(b0,{src:f,preview:!1,height:"100%",style:{maxHeight:800}}):i})})})})]})}),ze.jsx(ir,{span:8,children:ze.jsx(un.Item,{children:ze.jsx(mn,{type:"dashed",onClick:o(s),icon:ze.jsx(yu,{}),block:!0,children:Dt("RELEASE-NOTES.FORM.ADD_NEW_FIELD")})})})]})},l)})})]})})}),Z1="RELEASE-NOTES",SNe=({addBtnLabel:e,addBtnTooltipText:t,release2edit:n,beforeOpenModal:r,beforeCloseModal:a,afterSubmit:o})=>{const[i,c]=O.useState(!1),[l,s]=O.useState(!1),[d,f]=O.useState(0),[m]=un.useForm(),p=O.useRef(null),{requiredField:h}=fd(),{data:v}=aT(),g=un.useWatch(Qt.ReleasePages,m),C=I=>f(I);O.useEffect(()=>{var T;const I=(g==null?void 0:g.length)-1;(T=p.current)==null||T.goTo(I)},[g==null?void 0:g.length]),O.useEffect(()=>{n&&c(!0)},[n]);const b=()=>{r?new Promise(I=>I(r())).then(()=>c(!0)):c(!0)},y=()=>{a?new Promise(I=>I(a())).then(()=>c(!1)):c(!1)},x=()=>m.setFieldValue(Qt.ReleasePages,[...g,{[Qt.Fields]:[{}]}]),S=()=>m.setFieldValue(Qt.ReleasePages,g.filter((I,T)=>T!==d)),L=I=>{const T={...I,[Qt.DeployDate]:Zn(I[Qt.DeployDate]).format(cR),[Qt.ReleasePages]:I[Qt.ReleasePages].map((z,R)=>({...z,[Qt.Image]:t2e(z[Qt.Image]),order:R,[Qt.Fields]:z[Qt.Fields].map((k,_)=>({...k,order:_}))}))};hNe(T).then(()=>{x0.success(Dt("GENERAL.MESSAGES.SUCCESS.ITEM_CREATE",{item:Dt(`${Z1}.TEXT_SINGULAR`)})),o&&o()}).catch(z=>{var k;const R=((k=z.response)==null?void 0:k.data)??[];M0.error({message:Dt("GENERAL.ERROR"),description:ze.jsx(d8,{dataSource:R,renderItem:_=>ze.jsx(d8.Item,{children:Dt(`GENERAL.MESSAGES.ERROR.RELEASE_NOTE.${_.error}`)})})})}).finally(y)},E=()=>!!(g!=null&&g.length)&&d!==0,M=()=>!!(g!=null&&g.length)&&d!==(g==null?void 0:g.length)-1,w=ze.jsxs(S1,{justify:"flex-end",gap:8,children:[E()&&ze.jsx(mn,{type:"dashed",icon:ze.jsx(I1,{icon:g$}),onClick:()=>{var I;return(I=p.current)==null?void 0:I.prev()},children:Dt("GENERAL.BACK")}),M()&&ze.jsx(mn,{type:"dashed",iconPosition:"end",icon:ze.jsx(I1,{icon:h$}),onClick:()=>{var I;return(I=p.current)==null?void 0:I.next()},children:Dt("GENERAL.NEXT")}),ze.jsx(mn,{type:"dashed",danger:!0,icon:ze.jsx(I1,{icon:hN}),onClick:S,children:Dt(`${Z1}.REMOVE_CURRENT_SLIDE`)}),ze.jsx(mn,{type:"dashed",icon:ze.jsx(I1,{icon:K$}),onClick:x,children:Dt(`${Z1}.ADD_NEW_SLIDE`)}),ze.jsx(mn,{type:"primary",icon:ze.jsx(I1,{icon:rN}),onClick:()=>m.submit(),children:Dt("GENERAL.SAVE")})]}),N=I=>{s(t?I:!1)},P=()=>n?n[Qt.ReleasePages].map(I=>({...I,[Qt.Image]:gx(I[Qt.Image])})):[{}],D={...n,[Qt.ReleasePages]:P(),[Qt.DeployDate]:Zn(n==null?void 0:n[Qt.DeployDate])},A=r2e(v??[],"appName","id"),$=Dt(`${Z1}.${n?"UPD_RELEASE_NOTE":"ADD_RELEASE_NOTE"}`);return ze.jsxs(ze.Fragment,{children:[ze.jsx(fr,{title:t,open:l,onOpenChange:N,children:ze.jsx(mn,{type:"primary",icon:ze.jsx(I1,{icon:uz}),shape:e?"default":"circle",onClick:b,children:e})}),ze.jsx(Pr,{open:i,title:$,onCancel:y,width:"60%",footer:w,destroyOnClose:!0,children:ze.jsxs(un,{form:m,layout:"vertical",initialValues:D,onFinish:L,children:[ze.jsx(ws,{fieldName:"idRelease",hidden:!0}),ze.jsxs(C1,{gutter:10,children:[ze.jsx(ir,{span:8,children:ze.jsx(cwe,{fieldName:Qt.App,label:Dt(`${Z1}.FORM.FIELDS.APP`),placeholder:Dt(`${Z1}.FORM.FIELDS.APP`,{context:"PLACEHOLDER"}),options:A,rules:h})}),ze.jsx(ir,{span:8,children:ze.jsx(Ms,{fieldName:Qt.Version,label:Dt(`${Z1}.FORM.FIELDS.VERSION`),placeholder:"0.0.0",tooltip:Dt(`${Z1}.FORM.FIELDS.VERSION`,{context:"TOOLTIP"}),normalize:I=>I.replace(/\s/,".").replace(/[.]{2}/g,".").replace(/^[^0-9]|[^0-9.\b]/g,""),rules:[...h,()=>({validator(I,T){var k,_;const z=/[^0-9]$/,R=(_=(k=T==null?void 0:T.split("."))==null?void 0:k.filter(Boolean))==null?void 0:_.length;return z.test(T)?Promise.reject(new Error(Dt("GENERAL.FORM.ERRORS.VERSION"))):R>3||R<3?Promise.reject(new Error(Dt("GENERAL.FORM.ERRORS.FORMAT"))):Promise.resolve()}})]})}),ze.jsx(ir,{span:8,children:ze.jsx(lwe,{fieldName:Qt.DeployDate,label:Dt(`${Z1}.FORM.FIELDS.DEPLOY_DATE`),format:iR,rules:h})}),ze.jsx(ir,{span:24,children:ze.jsx(G2,{styles:{body:{background:n2e("PrimaryColorBgContainer")}},children:ze.jsx(yNe,{ref:p,changeSlide:C})})})]})]})})]})},{Title:xNe,Text:LNe}=fo,ENe=()=>{var S,L;const[e,t]=O.useState(!1),[n,r]=O.useState(!1),[a,o]=O.useState(0),i=O.useRef(null),c=mo(R1.AppId),l=mo(R1.UserId),{data:s}=aT(),{data:d}=bNe({idApp:c,lastDeployed:!0,userId:l}),f=d==null?void 0:d[0],m=s==null?void 0:s.find(E=>E.id===c);O.useEffect(()=>{if(d!=null&&d.length){const E=d[0],M=!E.readRelease&&!!E.isDeployed;t(M)}},[d]);const p=()=>{const E=d==null?void 0:d[0];n&&(E!=null&&E.isDeployed)&&vNe(E==null?void 0:E.idRelease,l),t(!1)},h=()=>{var E;return(E=i.current)==null?void 0:E.next()},v=()=>{var E;return(E=i.current)==null?void 0:E.prev()},g=E=>o(E),C=a===0,b=a===(((S=f==null?void 0:f.gaReleasePages)==null?void 0:S.length)??0)-1,y=E=>r(E.target.checked),x=ze.jsxs(S1,{justify:"space-between",align:"center",children:[ze.jsx(p2,{checked:n,onChange:y,children:Dt("RELEASE-NOTES.FORM.FIELDS.DO_NOT_SHOW_AGAIN")}),ze.jsxs(S1,{gap:8,children:[!C&&ze.jsx(mn,{onClick:v,children:Dt("Prev")}),!b&&ze.jsx(mn,{type:"primary",onClick:h,children:Dt("GENERAL.ACTIONS.NEXT")}),b&&ze.jsx(mn,{type:"primary",onClick:p,children:Dt("GENERAL.ACTIONS.CLOSE")})]})]});return ze.jsx(Pr,{open:e,title:Dt("RELEASE-NOTES.WHATS_NEWS",{app:m==null?void 0:m.appName,version:f==null?void 0:f.version}),onCancel:p,width:"60%",footer:x,children:ze.jsx(Tu,{infinite:!1,ref:i,afterChange:g,children:(L=f==null?void 0:f.gaReleasePages)==null?void 0:L.map(({idFile:E,gaReleasePagesContent:M},w)=>ze.jsx("div",{children:ze.jsxs(C1,{gutter:[24,16],style:{marginBottom:35},children:[ze.jsx(ir,{span:8,children:ze.jsx(S1,{gap:16,justify:"space-between",vertical:!0,style:{height:"100%"},children:M.map(({title:N,description:P},D)=>ze.jsxs(S1,{gap:6,vertical:!0,children:[ze.jsx(xNe,{level:4,children:N}),ze.jsx(LNe,{style:{opacity:.5},children:P})]},`${w}-${D}`))})}),ze.jsx(ir,{span:16,children:ze.jsx(S1,{justify:"center",children:ze.jsx(G2,{bordered:!0,styles:{body:{display:"flex",padding:2}},children:ze.jsx(b0,{src:gx(E),style:{maxHeight:800,borderRadius:8}})})})})]})},w))})})},oT=new rNe({defaultOptions:{queries:{retry:2}}}),MNe=({showAddBtn:e,...t})=>e?ze.jsx(id,{children:ze.jsx(nT,{client:oT,children:ze.jsx(SNe,{...t})})}):ze.jsx(id,{children:ze.jsx(nT,{client:oT,children:ze.jsx(ENe,{})})}),wNe=Xf()(MNe);sr.Helpdesk=kze,sr.ReleaseNote=wNe,Object.defineProperty(sr,Symbol.toStringTag,{value:"Module"})});
1069
+ `+o):r.stack=o}catch{}}throw r}}_request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=ca(this.defaults,n);const{transitional:r,paramsSerializer:a,headers:o}=n;r!==void 0&&sf.assertOptions(r,{silentJSONParsing:E2.transitional(E2.boolean),forcedJSONParsing:E2.transitional(E2.boolean),clarifyTimeoutError:E2.transitional(E2.boolean)},!1),a!=null&&($e.isFunction(a)?n.paramsSerializer={serialize:a}:sf.assertOptions(a,{encode:E2.function,serialize:E2.function},!0)),n.method=(n.method||this.defaults.method||"get").toLowerCase();let i=o&&$e.merge(o.common,o[n.method]);o&&$e.forEach(["delete","get","head","post","put","patch","common"],h=>{delete o[h]}),n.headers=yr.concat(i,o);const c=[];let l=!0;this.interceptors.request.forEach(function(v){typeof v.runWhen=="function"&&v.runWhen(n)===!1||(l=l&&v.synchronous,c.unshift(v.fulfilled,v.rejected))});const s=[];this.interceptors.response.forEach(function(v){s.push(v.fulfilled,v.rejected)});let d,f=0,m;if(!l){const h=[TI.bind(this),void 0];for(h.unshift.apply(h,c),h.push.apply(h,s),m=h.length,d=Promise.resolve(n);f<m;)d=d.then(h[f++],h[f++]);return d}m=c.length;let p=n;for(f=0;f<m;){const h=c[f++],v=c[f++];try{p=h(p)}catch(g){v.call(this,g);break}}try{d=TI.call(this,p)}catch(h){return Promise.reject(h)}for(f=0,m=s.length;f<m;)d=d.then(s[f++],s[f++]);return d}getUri(t){t=ca(this.defaults,t);const n=EI(t.baseURL,t.url);return gI(n,t.params,t.paramsSerializer)}}$e.forEach(["delete","get","head","options"],function(t){la.prototype[t]=function(n,r){return this.request(ca(r||{},{method:t,url:n,data:(r||{}).data}))}}),$e.forEach(["post","put","patch"],function(t){function n(r){return function(o,i,c){return this.request(ca(c||{},{method:t,headers:r?{"Content-Type":"multipart/form-data"}:{},url:o,data:i}))}}la.prototype[t]=n(),la.prototype[t+"Form"]=n(!0)});class uf{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let n;this.promise=new Promise(function(o){n=o});const r=this;this.promise.then(a=>{if(!r._listeners)return;let o=r._listeners.length;for(;o-- >0;)r._listeners[o](a);r._listeners=null}),this.promise.then=a=>{let o;const i=new Promise(c=>{r.subscribe(c),o=c}).then(a);return i.cancel=function(){r.unsubscribe(o)},i},t(function(o,i,c){r.reason||(r.reason=new Mo(o,i,c),n(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const n=this._listeners.indexOf(t);n!==-1&&this._listeners.splice(n,1)}toAbortSignal(){const t=new AbortController,n=r=>{t.abort(r)};return this.subscribe(n),t.signal.unsubscribe=()=>this.unsubscribe(n),t.signal}static source(){let t;return{token:new uf(function(a){t=a}),cancel:t}}}function Pze(e){return function(n){return e.apply(null,n)}}function Ize(e){return $e.isObject(e)&&e.isAxiosError===!0}const df={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(df).forEach(([e,t])=>{df[t]=e});function AI(e){const t=new la(e),n=ZP(la.prototype.request,t);return $e.extend(n,la.prototype,t,{allOwnKeys:!0}),$e.extend(n,t,null,{allOwnKeys:!0}),n.create=function(a){return AI(ca(e,a))},n}const An=AI(uc);An.Axios=la,An.CanceledError=Mo,An.CancelToken=uf,An.isCancel=yI,An.VERSION=RI,An.toFormData=Ps,An.AxiosError=Bt,An.Cancel=An.CanceledError,An.all=function(t){return Promise.all(t)},An.spread=Pze,An.isAxiosError=Ize,An.mergeConfig=ca,An.AxiosHeaders=yr,An.formToJSON=e=>bI($e.isHTMLForm(e)?new FormData(e):e),An.getAdapter=II.getAdapter,An.HttpStatusCode=df,An.default=An;const sa=An.create({baseURL:window.baseUrl,timeout:6e4});sa.interceptors.request.use(e=>{const t=mo(R1.Token);return e.headers.IdApp=J1e(),e.headers.Authorization="Bearer "+t,e},e=>Promise.reject(e));const _I="https://aquasis.freshdesk.com/api/v2/",kI=btoa("UtA4JWhMo8w4eWzzgo9"),Tze=async({appName:e,...t})=>{var l;const n=+"23000031142",{data:r}=await sa.get(_I+"ticket_fields",{headers:{Authorization:`Basic ${kI}`}}),a=r.find(s=>s.name==="cf_produto"),o=(l=a==null?void 0:a.choices)==null?void 0:l.find(s=>s.toLowerCase().includes(e.toLowerCase())),i={...t,status:2,priority:4,group_id:n,type:"Pedido de Suporte",custom_fields:{cf_produto:o},tags:["new-freshdesk-widget"],source:9},c=new FormData;return Object.keys(i).forEach(s=>{var d;s==="custom_fields"?Object.keys(i[s]).forEach(f=>{c.append(`custom_fields[${f}]`,i.custom_fields[f])}):s==="attachments"?(d=t.attachments)==null||d.forEach(f=>{c.append("attachments[]",new File([f],f.name))}):s==="tags"?c.append("tags[]",i[s]):c.append(s,i[s])}),sa.post(_I+"tickets",c,{headers:{Authorization:`Basic ${kI}`,"Content-Type":"multipart/form-data"}})},Rze={prefix:"far",iconName:"paper-plane",icon:[512,512,[61913],"f1d8","M16.1 260.2c-22.6 12.9-20.5 47.3 3.6 57.3L160 376l0 103.3c0 18.1 14.6 32.7 32.7 32.7c9.7 0 18.9-4.3 25.1-11.8l62-74.3 123.9 51.6c18.9 7.9 40.8-4.5 43.9-24.7l64-416c1.9-12.1-3.4-24.3-13.5-31.2s-23.3-7.5-34-1.4l-448 256zm52.1 25.5L409.7 90.6 190.1 336l1.2 1L68.2 285.7zM403.3 425.4L236.7 355.9 450.8 116.6 403.3 425.4z"]},{Title:FI}=fo,Xr="HELPDESK.FORM",Dze="GENERAL.MESSAGES",Aze=({onCancel:e})=>{const[t,n]=O.useState(!1),[r]=un.useForm(),a=dd(),{requiredField:o}=fd(),i=mo(R1.AppName);O.useEffect(()=>{Gn.changeLanguage(a)},[a]);const c=[{dataIndex:"field",title:Dt("HELPDESK.TABLE.FIELD"),render:d=>Dt(`HELPDESK.FORM.FIELDS.${d.toUpperCase()}`)},{dataIndex:"code",title:Dt("HELPDESK.TABLE.CODE"),render:d=>Dt(`HELPDESK.ERRORS_CODE.${d.toUpperCase()}`)}],l=d=>{r.setFieldValue(oa.Attachments,d.fileList)},s=d=>{n(!0);const f={...d,appName:i};Tze(f).then(()=>{M0.success({message:Dt(`${Dze}.SUCCESS.TICKET`),placement:"topLeft"}),e&&e()}).catch(({response:m})=>{const{errors:p}=m.data;M0.error({className:"table-notification",message:Dt("ERROR"),placement:"topLeft",description:ze.jsx(w1,{dataSource:p,columns:c,pagination:{defaultPageSize:5},rowKey:"field",size:"small",bordered:!0}),duration:0})}).finally(()=>n(!1))};return ze.jsxs(C1,{className:"helpdesk__content",children:[ze.jsx(ir,{span:24,children:ze.jsx(FI,{level:3,className:"helpdesk__title",children:Dt(`${Xr}.TITLE`)})}),ze.jsx(ir,{span:24,children:ze.jsxs(G2,{children:[ze.jsx(FI,{level:4,children:Dt(`${Xr}.FIELDS.TITLE`)}),ze.jsxs(un,{form:r,layout:"vertical",onFinish:s,children:[ze.jsx(Ms,{fieldName:oa.Name,label:Dt(`${Xr}.FIELDS.NAME`),placeholder:Dt(`${Xr}.FIELDS.NAME`,{context:"PLACEHOLDER"}),rules:o}),ze.jsx(Ms,{fieldName:oa.Email,label:Dt(`${Xr}.FIELDS.EMAIL`),placeholder:Dt(`${Xr}.FIELDS.EMAIL`,{context:"PLACEHOLDER"}),rules:o}),ze.jsx(Ms,{fieldName:oa.Subject,label:Dt(`${Xr}.FIELDS.SUBJECT`),placeholder:Dt(`${Xr}.FIELDS.SUBJECT`,{context:"PLACEHOLDER"}),rules:o}),ze.jsx(swe,{fieldName:oa.Description,label:Dt(`${Xr}.FIELDS.DESCRIPTION`),placeholder:Dt(`${Xr}.FIELDS.DESCRIPTION`,{context:"PLACEHOLDER"}),rows:4,rules:o}),ze.jsx(un.Item,{name:oa.Attachments,children:ze.jsxs(rd,{beforeUpload:()=>!1,maxCount:5,onChange:l,className:"helpdesk__fields-files",multiple:!0,children:[ze.jsx("p",{className:"ant-upload-drag-icon",children:ze.jsx(g8,{})}),ze.jsx(k2e,{i18nKey:Dt(`${Xr}.FIELDS.UPLOAD_FILES`),components:{strong:ze.jsx("strong",{}),br:ze.jsx("br",{}),small:ze.jsx("small",{})}})]})}),ze.jsx(mn,{htmlType:"submit",type:"primary",icon:ze.jsx(I1,{icon:Rze}),loading:t,disabled:t,block:!0,children:Dt(`${Xr}.BUTTONS.SEND`)})]})]})})]})};fie.add(DMe);const _ze=({size:e})=>{const[t,n]=O.useState(!1),r=dd(),a=()=>n(c=>!c),o=()=>n(!1);O.useEffect(()=>{Gn.changeLanguage(r)},[r]);const i=()=>{switch(e){case"small":return"1x";case"large":return"xl";default:return"lg"}};return ze.jsx(id,{children:ze.jsx(C1,{align:"middle",children:ze.jsx(F6,{placement:"bottomRight",trigger:"click",content:ze.jsx(Aze,{onCancel:o}),rootClassName:"helpdesk__container",overlayInnerStyle:{padding:0},arrow:!1,open:t,destroyTooltipOnHide:!0,children:ze.jsx(fr,{title:Dt("HELPDESK.SUPPORT"),placement:"left",children:ze.jsx(mn,{type:"primary",shape:"circle",icon:ze.jsx(I1,{icon:cw,size:i()}),onClick:a,size:e})})})})})},kze=Xf()(_ze);function fc(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,fa(e,t)}var mc=function(){function e(){this.listeners=[]}var t=e.prototype;return t.subscribe=function(r){var a=this,o=r||function(){};return this.listeners.push(o),this.onSubscribe(),function(){a.listeners=a.listeners.filter(function(i){return i!==o}),a.onUnsubscribe()}},t.hasListeners=function(){return this.listeners.length>0},t.onSubscribe=function(){},t.onUnsubscribe=function(){},e}(),As=typeof window>"u";function cr(){}function Fze(e,t){return typeof e=="function"?e(t):e}function ff(e){return typeof e=="number"&&e>=0&&e!==1/0}function _s(e){return Array.isArray(e)?e:[e]}function jI(e,t){return Math.max(e+(t||0)-Date.now(),0)}function ks(e,t,n){return Bs(e)?typeof t=="function"?le({},n,{queryKey:e,queryFn:t}):le({},t,{queryKey:e}):e}function M2(e,t,n){return Bs(e)?[le({},t,{queryKey:e}),n]:[e||{},t]}function jze(e,t){if(e===!0&&t===!0||e==null&&t==null)return"all";if(e===!1&&t===!1)return"none";var n=e??!t;return n?"active":"inactive"}function BI(e,t){var n=e.active,r=e.exact,a=e.fetching,o=e.inactive,i=e.predicate,c=e.queryKey,l=e.stale;if(Bs(c)){if(r){if(t.queryHash!==mf(c,t.options))return!1}else if(!Fs(t.queryKey,c))return!1}var s=jze(n,o);if(s==="none")return!1;if(s!=="all"){var d=t.isActive();if(s==="active"&&!d||s==="inactive"&&d)return!1}return!(typeof l=="boolean"&&t.isStale()!==l||typeof a=="boolean"&&t.isFetching()!==a||i&&!i(t))}function HI(e,t){var n=e.exact,r=e.fetching,a=e.predicate,o=e.mutationKey;if(Bs(o)){if(!t.options.mutationKey)return!1;if(n){if(ua(t.options.mutationKey)!==ua(o))return!1}else if(!Fs(t.options.mutationKey,o))return!1}return!(typeof r=="boolean"&&t.state.status==="loading"!==r||a&&!a(t))}function mf(e,t){var n=(t==null?void 0:t.queryKeyHashFn)||ua;return n(e)}function ua(e){var t=_s(e);return Bze(t)}function Bze(e){return JSON.stringify(e,function(t,n){return pf(n)?Object.keys(n).sort().reduce(function(r,a){return r[a]=n[a],r},{}):n})}function Fs(e,t){return VI(_s(e),_s(t))}function VI(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?!Object.keys(t).some(function(n){return!VI(e[n],t[n])}):!1}function js(e,t){if(e===t)return e;var n=Array.isArray(e)&&Array.isArray(t);if(n||pf(e)&&pf(t)){for(var r=n?e.length:Object.keys(e).length,a=n?t:Object.keys(t),o=a.length,i=n?[]:{},c=0,l=0;l<o;l++){var s=n?l:a[l];i[s]=js(e[s],t[s]),i[s]===e[s]&&c++}return r===o&&c===r?e:i}return t}function Hze(e,t){if(e&&!t||t&&!e)return!1;for(var n in e)if(e[n]!==t[n])return!1;return!0}function pf(e){if(!WI(e))return!1;var t=e.constructor;if(typeof t>"u")return!0;var n=t.prototype;return!(!WI(n)||!n.hasOwnProperty("isPrototypeOf"))}function WI(e){return Object.prototype.toString.call(e)==="[object Object]"}function Bs(e){return typeof e=="string"||Array.isArray(e)}function Vze(e){return new Promise(function(t){setTimeout(t,e)})}function UI(e){Promise.resolve().then(e).catch(function(t){return setTimeout(function(){throw t})})}function KI(){if(typeof AbortController=="function")return new AbortController}var Wze=function(e){fc(t,e);function t(){var r;return r=e.call(this)||this,r.setup=function(a){var o;if(!As&&((o=window)!=null&&o.addEventListener)){var i=function(){return a()};return window.addEventListener("visibilitychange",i,!1),window.addEventListener("focus",i,!1),function(){window.removeEventListener("visibilitychange",i),window.removeEventListener("focus",i)}}},r}var n=t.prototype;return n.onSubscribe=function(){this.cleanup||this.setEventListener(this.setup)},n.onUnsubscribe=function(){if(!this.hasListeners()){var a;(a=this.cleanup)==null||a.call(this),this.cleanup=void 0}},n.setEventListener=function(a){var o,i=this;this.setup=a,(o=this.cleanup)==null||o.call(this),this.cleanup=a(function(c){typeof c=="boolean"?i.setFocused(c):i.onFocus()})},n.setFocused=function(a){this.focused=a,a&&this.onFocus()},n.onFocus=function(){this.listeners.forEach(function(a){a()})},n.isFocused=function(){return typeof this.focused=="boolean"?this.focused:typeof document>"u"?!0:[void 0,"visible","prerender"].includes(document.visibilityState)},t}(mc),pc=new Wze,Uze=function(e){fc(t,e);function t(){var r;return r=e.call(this)||this,r.setup=function(a){var o;if(!As&&((o=window)!=null&&o.addEventListener)){var i=function(){return a()};return window.addEventListener("online",i,!1),window.addEventListener("offline",i,!1),function(){window.removeEventListener("online",i),window.removeEventListener("offline",i)}}},r}var n=t.prototype;return n.onSubscribe=function(){this.cleanup||this.setEventListener(this.setup)},n.onUnsubscribe=function(){if(!this.hasListeners()){var a;(a=this.cleanup)==null||a.call(this),this.cleanup=void 0}},n.setEventListener=function(a){var o,i=this;this.setup=a,(o=this.cleanup)==null||o.call(this),this.cleanup=a(function(c){typeof c=="boolean"?i.setOnline(c):i.onOnline()})},n.setOnline=function(a){this.online=a,a&&this.onOnline()},n.onOnline=function(){this.listeners.forEach(function(a){a()})},n.isOnline=function(){return typeof this.online=="boolean"?this.online:typeof navigator>"u"||typeof navigator.onLine>"u"?!0:navigator.onLine},t}(mc),Hs=new Uze;function Kze(e){return Math.min(1e3*Math.pow(2,e),3e4)}function Vs(e){return typeof(e==null?void 0:e.cancel)=="function"}var qI=function(t){this.revert=t==null?void 0:t.revert,this.silent=t==null?void 0:t.silent};function Ws(e){return e instanceof qI}var GI=function(t){var n=this,r=!1,a,o,i,c;this.abort=t.abort,this.cancel=function(m){return a==null?void 0:a(m)},this.cancelRetry=function(){r=!0},this.continueRetry=function(){r=!1},this.continue=function(){return o==null?void 0:o()},this.failureCount=0,this.isPaused=!1,this.isResolved=!1,this.isTransportCancelable=!1,this.promise=new Promise(function(m,p){i=m,c=p});var l=function(p){n.isResolved||(n.isResolved=!0,t.onSuccess==null||t.onSuccess(p),o==null||o(),i(p))},s=function(p){n.isResolved||(n.isResolved=!0,t.onError==null||t.onError(p),o==null||o(),c(p))},d=function(){return new Promise(function(p){o=p,n.isPaused=!0,t.onPause==null||t.onPause()}).then(function(){o=void 0,n.isPaused=!1,t.onContinue==null||t.onContinue()})},f=function m(){if(!n.isResolved){var p;try{p=t.fn()}catch(h){p=Promise.reject(h)}a=function(v){if(!n.isResolved&&(s(new qI(v)),n.abort==null||n.abort(),Vs(p)))try{p.cancel()}catch{}},n.isTransportCancelable=Vs(p),Promise.resolve(p).then(l).catch(function(h){var v,g;if(!n.isResolved){var C=(v=t.retry)!=null?v:3,b=(g=t.retryDelay)!=null?g:Kze,y=typeof b=="function"?b(n.failureCount,h):b,x=C===!0||typeof C=="number"&&n.failureCount<C||typeof C=="function"&&C(n.failureCount,h);if(r||!x){s(h);return}n.failureCount++,t.onFail==null||t.onFail(n.failureCount,h),Vze(y).then(function(){if(!pc.isFocused()||!Hs.isOnline())return d()}).then(function(){r?s(h):m()})}})}};f()},qze=function(){function e(){this.queue=[],this.transactions=0,this.notifyFn=function(n){n()},this.batchNotifyFn=function(n){n()}}var t=e.prototype;return t.batch=function(r){var a;this.transactions++;try{a=r()}finally{this.transactions--,this.transactions||this.flush()}return a},t.schedule=function(r){var a=this;this.transactions?this.queue.push(r):UI(function(){a.notifyFn(r)})},t.batchCalls=function(r){var a=this;return function(){for(var o=arguments.length,i=new Array(o),c=0;c<o;c++)i[c]=arguments[c];a.schedule(function(){r.apply(void 0,i)})}},t.flush=function(){var r=this,a=this.queue;this.queue=[],a.length&&UI(function(){r.batchNotifyFn(function(){a.forEach(function(o){r.notifyFn(o)})})})},t.setNotifyFunction=function(r){this.notifyFn=r},t.setBatchNotifyFunction=function(r){this.batchNotifyFn=r},e}(),Mn=new qze,YI=console;function Us(){return YI}function Gze(e){YI=e}var Yze=function(){function e(n){this.abortSignalConsumed=!1,this.hadObservers=!1,this.defaultOptions=n.defaultOptions,this.setOptions(n.options),this.observers=[],this.cache=n.cache,this.queryKey=n.queryKey,this.queryHash=n.queryHash,this.initialState=n.state||this.getDefaultState(this.options),this.state=this.initialState,this.meta=n.meta,this.scheduleGc()}var t=e.prototype;return t.setOptions=function(r){var a;this.options=le({},this.defaultOptions,r),this.meta=r==null?void 0:r.meta,this.cacheTime=Math.max(this.cacheTime||0,(a=this.options.cacheTime)!=null?a:5*60*1e3)},t.setDefaultOptions=function(r){this.defaultOptions=r},t.scheduleGc=function(){var r=this;this.clearGcTimeout(),ff(this.cacheTime)&&(this.gcTimeout=setTimeout(function(){r.optionalRemove()},this.cacheTime))},t.clearGcTimeout=function(){this.gcTimeout&&(clearTimeout(this.gcTimeout),this.gcTimeout=void 0)},t.optionalRemove=function(){this.observers.length||(this.state.isFetching?this.hadObservers&&this.scheduleGc():this.cache.remove(this))},t.setData=function(r,a){var o,i,c=this.state.data,l=Fze(r,c);return(o=(i=this.options).isDataEqual)!=null&&o.call(i,c,l)?l=c:this.options.structuralSharing!==!1&&(l=js(c,l)),this.dispatch({data:l,type:"success",dataUpdatedAt:a==null?void 0:a.updatedAt}),l},t.setState=function(r,a){this.dispatch({type:"setState",state:r,setStateOptions:a})},t.cancel=function(r){var a,o=this.promise;return(a=this.retryer)==null||a.cancel(r),o?o.then(cr).catch(cr):Promise.resolve()},t.destroy=function(){this.clearGcTimeout(),this.cancel({silent:!0})},t.reset=function(){this.destroy(),this.setState(this.initialState)},t.isActive=function(){return this.observers.some(function(r){return r.options.enabled!==!1})},t.isFetching=function(){return this.state.isFetching},t.isStale=function(){return this.state.isInvalidated||!this.state.dataUpdatedAt||this.observers.some(function(r){return r.getCurrentResult().isStale})},t.isStaleByTime=function(r){return r===void 0&&(r=0),this.state.isInvalidated||!this.state.dataUpdatedAt||!jI(this.state.dataUpdatedAt,r)},t.onFocus=function(){var r,a=this.observers.find(function(o){return o.shouldFetchOnWindowFocus()});a&&a.refetch(),(r=this.retryer)==null||r.continue()},t.onOnline=function(){var r,a=this.observers.find(function(o){return o.shouldFetchOnReconnect()});a&&a.refetch(),(r=this.retryer)==null||r.continue()},t.addObserver=function(r){this.observers.indexOf(r)===-1&&(this.observers.push(r),this.hadObservers=!0,this.clearGcTimeout(),this.cache.notify({type:"observerAdded",query:this,observer:r}))},t.removeObserver=function(r){this.observers.indexOf(r)!==-1&&(this.observers=this.observers.filter(function(a){return a!==r}),this.observers.length||(this.retryer&&(this.retryer.isTransportCancelable||this.abortSignalConsumed?this.retryer.cancel({revert:!0}):this.retryer.cancelRetry()),this.cacheTime?this.scheduleGc():this.cache.remove(this)),this.cache.notify({type:"observerRemoved",query:this,observer:r}))},t.getObserversCount=function(){return this.observers.length},t.invalidate=function(){this.state.isInvalidated||this.dispatch({type:"invalidate"})},t.fetch=function(r,a){var o=this,i,c,l;if(this.state.isFetching){if(this.state.dataUpdatedAt&&(a!=null&&a.cancelRefetch))this.cancel({silent:!0});else if(this.promise){var s;return(s=this.retryer)==null||s.continueRetry(),this.promise}}if(r&&this.setOptions(r),!this.options.queryFn){var d=this.observers.find(function(b){return b.options.queryFn});d&&this.setOptions(d.options)}var f=_s(this.queryKey),m=KI(),p={queryKey:f,pageParam:void 0,meta:this.meta};Object.defineProperty(p,"signal",{enumerable:!0,get:function(){if(m)return o.abortSignalConsumed=!0,m.signal}});var h=function(){return o.options.queryFn?(o.abortSignalConsumed=!1,o.options.queryFn(p)):Promise.reject("Missing queryFn")},v={fetchOptions:a,options:this.options,queryKey:f,state:this.state,fetchFn:h,meta:this.meta};if((i=this.options.behavior)!=null&&i.onFetch){var g;(g=this.options.behavior)==null||g.onFetch(v)}if(this.revertState=this.state,!this.state.isFetching||this.state.fetchMeta!==((c=v.fetchOptions)==null?void 0:c.meta)){var C;this.dispatch({type:"fetch",meta:(C=v.fetchOptions)==null?void 0:C.meta})}return this.retryer=new GI({fn:v.fetchFn,abort:m==null||(l=m.abort)==null?void 0:l.bind(m),onSuccess:function(y){o.setData(y),o.cache.config.onSuccess==null||o.cache.config.onSuccess(y,o),o.cacheTime===0&&o.optionalRemove()},onError:function(y){Ws(y)&&y.silent||o.dispatch({type:"error",error:y}),Ws(y)||(o.cache.config.onError==null||o.cache.config.onError(y,o),Us().error(y)),o.cacheTime===0&&o.optionalRemove()},onFail:function(){o.dispatch({type:"failed"})},onPause:function(){o.dispatch({type:"pause"})},onContinue:function(){o.dispatch({type:"continue"})},retry:v.options.retry,retryDelay:v.options.retryDelay}),this.promise=this.retryer.promise,this.promise},t.dispatch=function(r){var a=this;this.state=this.reducer(this.state,r),Mn.batch(function(){a.observers.forEach(function(o){o.onQueryUpdate(r)}),a.cache.notify({query:a,type:"queryUpdated",action:r})})},t.getDefaultState=function(r){var a=typeof r.initialData=="function"?r.initialData():r.initialData,o=typeof r.initialData<"u",i=o?typeof r.initialDataUpdatedAt=="function"?r.initialDataUpdatedAt():r.initialDataUpdatedAt:0,c=typeof a<"u";return{data:a,dataUpdateCount:0,dataUpdatedAt:c?i??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchMeta:null,isFetching:!1,isInvalidated:!1,isPaused:!1,status:c?"success":"idle"}},t.reducer=function(r,a){var o,i;switch(a.type){case"failed":return le({},r,{fetchFailureCount:r.fetchFailureCount+1});case"pause":return le({},r,{isPaused:!0});case"continue":return le({},r,{isPaused:!1});case"fetch":return le({},r,{fetchFailureCount:0,fetchMeta:(o=a.meta)!=null?o:null,isFetching:!0,isPaused:!1},!r.dataUpdatedAt&&{error:null,status:"loading"});case"success":return le({},r,{data:a.data,dataUpdateCount:r.dataUpdateCount+1,dataUpdatedAt:(i=a.dataUpdatedAt)!=null?i:Date.now(),error:null,fetchFailureCount:0,isFetching:!1,isInvalidated:!1,isPaused:!1,status:"success"});case"error":var c=a.error;return Ws(c)&&c.revert&&this.revertState?le({},this.revertState):le({},r,{error:c,errorUpdateCount:r.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:r.fetchFailureCount+1,isFetching:!1,isPaused:!1,status:"error"});case"invalidate":return le({},r,{isInvalidated:!0});case"setState":return le({},r,a.state);default:return r}},e}(),Xze=function(e){fc(t,e);function t(r){var a;return a=e.call(this)||this,a.config=r||{},a.queries=[],a.queriesMap={},a}var n=t.prototype;return n.build=function(a,o,i){var c,l=o.queryKey,s=(c=o.queryHash)!=null?c:mf(l,o),d=this.get(s);return d||(d=new Yze({cache:this,queryKey:l,queryHash:s,options:a.defaultQueryOptions(o),state:i,defaultOptions:a.getQueryDefaults(l),meta:o.meta}),this.add(d)),d},n.add=function(a){this.queriesMap[a.queryHash]||(this.queriesMap[a.queryHash]=a,this.queries.push(a),this.notify({type:"queryAdded",query:a}))},n.remove=function(a){var o=this.queriesMap[a.queryHash];o&&(a.destroy(),this.queries=this.queries.filter(function(i){return i!==a}),o===a&&delete this.queriesMap[a.queryHash],this.notify({type:"queryRemoved",query:a}))},n.clear=function(){var a=this;Mn.batch(function(){a.queries.forEach(function(o){a.remove(o)})})},n.get=function(a){return this.queriesMap[a]},n.getAll=function(){return this.queries},n.find=function(a,o){var i=M2(a,o),c=i[0];return typeof c.exact>"u"&&(c.exact=!0),this.queries.find(function(l){return BI(c,l)})},n.findAll=function(a,o){var i=M2(a,o),c=i[0];return Object.keys(c).length>0?this.queries.filter(function(l){return BI(c,l)}):this.queries},n.notify=function(a){var o=this;Mn.batch(function(){o.listeners.forEach(function(i){i(a)})})},n.onFocus=function(){var a=this;Mn.batch(function(){a.queries.forEach(function(o){o.onFocus()})})},n.onOnline=function(){var a=this;Mn.batch(function(){a.queries.forEach(function(o){o.onOnline()})})},t}(mc),Qze=function(){function e(n){this.options=le({},n.defaultOptions,n.options),this.mutationId=n.mutationId,this.mutationCache=n.mutationCache,this.observers=[],this.state=n.state||Jze(),this.meta=n.meta}var t=e.prototype;return t.setState=function(r){this.dispatch({type:"setState",state:r})},t.addObserver=function(r){this.observers.indexOf(r)===-1&&this.observers.push(r)},t.removeObserver=function(r){this.observers=this.observers.filter(function(a){return a!==r})},t.cancel=function(){return this.retryer?(this.retryer.cancel(),this.retryer.promise.then(cr).catch(cr)):Promise.resolve()},t.continue=function(){return this.retryer?(this.retryer.continue(),this.retryer.promise):this.execute()},t.execute=function(){var r=this,a,o=this.state.status==="loading",i=Promise.resolve();return o||(this.dispatch({type:"loading",variables:this.options.variables}),i=i.then(function(){r.mutationCache.config.onMutate==null||r.mutationCache.config.onMutate(r.state.variables,r)}).then(function(){return r.options.onMutate==null?void 0:r.options.onMutate(r.state.variables)}).then(function(c){c!==r.state.context&&r.dispatch({type:"loading",context:c,variables:r.state.variables})})),i.then(function(){return r.executeMutation()}).then(function(c){a=c,r.mutationCache.config.onSuccess==null||r.mutationCache.config.onSuccess(a,r.state.variables,r.state.context,r)}).then(function(){return r.options.onSuccess==null?void 0:r.options.onSuccess(a,r.state.variables,r.state.context)}).then(function(){return r.options.onSettled==null?void 0:r.options.onSettled(a,null,r.state.variables,r.state.context)}).then(function(){return r.dispatch({type:"success",data:a}),a}).catch(function(c){return r.mutationCache.config.onError==null||r.mutationCache.config.onError(c,r.state.variables,r.state.context,r),Us().error(c),Promise.resolve().then(function(){return r.options.onError==null?void 0:r.options.onError(c,r.state.variables,r.state.context)}).then(function(){return r.options.onSettled==null?void 0:r.options.onSettled(void 0,c,r.state.variables,r.state.context)}).then(function(){throw r.dispatch({type:"error",error:c}),c})})},t.executeMutation=function(){var r=this,a;return this.retryer=new GI({fn:function(){return r.options.mutationFn?r.options.mutationFn(r.state.variables):Promise.reject("No mutationFn found")},onFail:function(){r.dispatch({type:"failed"})},onPause:function(){r.dispatch({type:"pause"})},onContinue:function(){r.dispatch({type:"continue"})},retry:(a=this.options.retry)!=null?a:0,retryDelay:this.options.retryDelay}),this.retryer.promise},t.dispatch=function(r){var a=this;this.state=Zze(this.state,r),Mn.batch(function(){a.observers.forEach(function(o){o.onMutationUpdate(r)}),a.mutationCache.notify(a)})},e}();function Jze(){return{context:void 0,data:void 0,error:null,failureCount:0,isPaused:!1,status:"idle",variables:void 0}}function Zze(e,t){switch(t.type){case"failed":return le({},e,{failureCount:e.failureCount+1});case"pause":return le({},e,{isPaused:!0});case"continue":return le({},e,{isPaused:!1});case"loading":return le({},e,{context:t.context,data:void 0,error:null,isPaused:!1,status:"loading",variables:t.variables});case"success":return le({},e,{data:t.data,error:null,status:"success",isPaused:!1});case"error":return le({},e,{data:void 0,error:t.error,failureCount:e.failureCount+1,isPaused:!1,status:"error"});case"setState":return le({},e,t.state);default:return e}}var eNe=function(e){fc(t,e);function t(r){var a;return a=e.call(this)||this,a.config=r||{},a.mutations=[],a.mutationId=0,a}var n=t.prototype;return n.build=function(a,o,i){var c=new Qze({mutationCache:this,mutationId:++this.mutationId,options:a.defaultMutationOptions(o),state:i,defaultOptions:o.mutationKey?a.getMutationDefaults(o.mutationKey):void 0,meta:o.meta});return this.add(c),c},n.add=function(a){this.mutations.push(a),this.notify(a)},n.remove=function(a){this.mutations=this.mutations.filter(function(o){return o!==a}),a.cancel(),this.notify(a)},n.clear=function(){var a=this;Mn.batch(function(){a.mutations.forEach(function(o){a.remove(o)})})},n.getAll=function(){return this.mutations},n.find=function(a){return typeof a.exact>"u"&&(a.exact=!0),this.mutations.find(function(o){return HI(a,o)})},n.findAll=function(a){return this.mutations.filter(function(o){return HI(a,o)})},n.notify=function(a){var o=this;Mn.batch(function(){o.listeners.forEach(function(i){i(a)})})},n.onFocus=function(){this.resumePausedMutations()},n.onOnline=function(){this.resumePausedMutations()},n.resumePausedMutations=function(){var a=this.mutations.filter(function(o){return o.state.isPaused});return Mn.batch(function(){return a.reduce(function(o,i){return o.then(function(){return i.continue().catch(cr)})},Promise.resolve())})},t}(mc);function tNe(){return{onFetch:function(t){t.fetchFn=function(){var n,r,a,o,i,c,l=(n=t.fetchOptions)==null||(r=n.meta)==null?void 0:r.refetchPage,s=(a=t.fetchOptions)==null||(o=a.meta)==null?void 0:o.fetchMore,d=s==null?void 0:s.pageParam,f=(s==null?void 0:s.direction)==="forward",m=(s==null?void 0:s.direction)==="backward",p=((i=t.state.data)==null?void 0:i.pages)||[],h=((c=t.state.data)==null?void 0:c.pageParams)||[],v=KI(),g=v==null?void 0:v.signal,C=h,b=!1,y=t.options.queryFn||function(){return Promise.reject("Missing queryFn")},x=function($,I,T,z){return C=z?[I].concat(C):[].concat(C,[I]),z?[T].concat($):[].concat($,[T])},S=function($,I,T,z){if(b)return Promise.reject("Cancelled");if(typeof T>"u"&&!I&&$.length)return Promise.resolve($);var R={queryKey:t.queryKey,signal:g,pageParam:T,meta:t.meta},k=y(R),_=Promise.resolve(k).then(function(V){return x($,T,V,z)});if(Vs(k)){var F=_;F.cancel=k.cancel}return _},L;if(!p.length)L=S([]);else if(f){var E=typeof d<"u",M=E?d:XI(t.options,p);L=S(p,E,M)}else if(m){var w=typeof d<"u",N=w?d:nNe(t.options,p);L=S(p,w,N,!0)}else(function(){C=[];var A=typeof t.options.getNextPageParam>"u",$=l&&p[0]?l(p[0],0,p):!0;L=$?S([],A,h[0]):Promise.resolve(x([],h[0],p[0]));for(var I=function(R){L=L.then(function(k){var _=l&&p[R]?l(p[R],R,p):!0;if(_){var F=A?h[R]:XI(t.options,k);return S(k,A,F)}return Promise.resolve(x(k,h[R],p[R]))})},T=1;T<p.length;T++)I(T)})();var P=L.then(function(A){return{pages:A,pageParams:C}}),D=P;return D.cancel=function(){b=!0,v==null||v.abort(),Vs(L)&&L.cancel()},P}}}}function XI(e,t){return e.getNextPageParam==null?void 0:e.getNextPageParam(t[t.length-1],t)}function nNe(e,t){return e.getPreviousPageParam==null?void 0:e.getPreviousPageParam(t[0],t)}var rNe=function(){function e(n){n===void 0&&(n={}),this.queryCache=n.queryCache||new Xze,this.mutationCache=n.mutationCache||new eNe,this.defaultOptions=n.defaultOptions||{},this.queryDefaults=[],this.mutationDefaults=[]}var t=e.prototype;return t.mount=function(){var r=this;this.unsubscribeFocus=pc.subscribe(function(){pc.isFocused()&&Hs.isOnline()&&(r.mutationCache.onFocus(),r.queryCache.onFocus())}),this.unsubscribeOnline=Hs.subscribe(function(){pc.isFocused()&&Hs.isOnline()&&(r.mutationCache.onOnline(),r.queryCache.onOnline())})},t.unmount=function(){var r,a;(r=this.unsubscribeFocus)==null||r.call(this),(a=this.unsubscribeOnline)==null||a.call(this)},t.isFetching=function(r,a){var o=M2(r,a),i=o[0];return i.fetching=!0,this.queryCache.findAll(i).length},t.isMutating=function(r){return this.mutationCache.findAll(le({},r,{fetching:!0})).length},t.getQueryData=function(r,a){var o;return(o=this.queryCache.find(r,a))==null?void 0:o.state.data},t.getQueriesData=function(r){return this.getQueryCache().findAll(r).map(function(a){var o=a.queryKey,i=a.state,c=i.data;return[o,c]})},t.setQueryData=function(r,a,o){var i=ks(r),c=this.defaultQueryOptions(i);return this.queryCache.build(this,c).setData(a,o)},t.setQueriesData=function(r,a,o){var i=this;return Mn.batch(function(){return i.getQueryCache().findAll(r).map(function(c){var l=c.queryKey;return[l,i.setQueryData(l,a,o)]})})},t.getQueryState=function(r,a){var o;return(o=this.queryCache.find(r,a))==null?void 0:o.state},t.removeQueries=function(r,a){var o=M2(r,a),i=o[0],c=this.queryCache;Mn.batch(function(){c.findAll(i).forEach(function(l){c.remove(l)})})},t.resetQueries=function(r,a,o){var i=this,c=M2(r,a,o),l=c[0],s=c[1],d=this.queryCache,f=le({},l,{active:!0});return Mn.batch(function(){return d.findAll(l).forEach(function(m){m.reset()}),i.refetchQueries(f,s)})},t.cancelQueries=function(r,a,o){var i=this,c=M2(r,a,o),l=c[0],s=c[1],d=s===void 0?{}:s;typeof d.revert>"u"&&(d.revert=!0);var f=Mn.batch(function(){return i.queryCache.findAll(l).map(function(m){return m.cancel(d)})});return Promise.all(f).then(cr).catch(cr)},t.invalidateQueries=function(r,a,o){var i,c,l,s=this,d=M2(r,a,o),f=d[0],m=d[1],p=le({},f,{active:(i=(c=f.refetchActive)!=null?c:f.active)!=null?i:!0,inactive:(l=f.refetchInactive)!=null?l:!1});return Mn.batch(function(){return s.queryCache.findAll(f).forEach(function(h){h.invalidate()}),s.refetchQueries(p,m)})},t.refetchQueries=function(r,a,o){var i=this,c=M2(r,a,o),l=c[0],s=c[1],d=Mn.batch(function(){return i.queryCache.findAll(l).map(function(m){return m.fetch(void 0,le({},s,{meta:{refetchPage:l==null?void 0:l.refetchPage}}))})}),f=Promise.all(d).then(cr);return s!=null&&s.throwOnError||(f=f.catch(cr)),f},t.fetchQuery=function(r,a,o){var i=ks(r,a,o),c=this.defaultQueryOptions(i);typeof c.retry>"u"&&(c.retry=!1);var l=this.queryCache.build(this,c);return l.isStaleByTime(c.staleTime)?l.fetch(c):Promise.resolve(l.state.data)},t.prefetchQuery=function(r,a,o){return this.fetchQuery(r,a,o).then(cr).catch(cr)},t.fetchInfiniteQuery=function(r,a,o){var i=ks(r,a,o);return i.behavior=tNe(),this.fetchQuery(i)},t.prefetchInfiniteQuery=function(r,a,o){return this.fetchInfiniteQuery(r,a,o).then(cr).catch(cr)},t.cancelMutations=function(){var r=this,a=Mn.batch(function(){return r.mutationCache.getAll().map(function(o){return o.cancel()})});return Promise.all(a).then(cr).catch(cr)},t.resumePausedMutations=function(){return this.getMutationCache().resumePausedMutations()},t.executeMutation=function(r){return this.mutationCache.build(this,r).execute()},t.getQueryCache=function(){return this.queryCache},t.getMutationCache=function(){return this.mutationCache},t.getDefaultOptions=function(){return this.defaultOptions},t.setDefaultOptions=function(r){this.defaultOptions=r},t.setQueryDefaults=function(r,a){var o=this.queryDefaults.find(function(i){return ua(r)===ua(i.queryKey)});o?o.defaultOptions=a:this.queryDefaults.push({queryKey:r,defaultOptions:a})},t.getQueryDefaults=function(r){var a;return r?(a=this.queryDefaults.find(function(o){return Fs(r,o.queryKey)}))==null?void 0:a.defaultOptions:void 0},t.setMutationDefaults=function(r,a){var o=this.mutationDefaults.find(function(i){return ua(r)===ua(i.mutationKey)});o?o.defaultOptions=a:this.mutationDefaults.push({mutationKey:r,defaultOptions:a})},t.getMutationDefaults=function(r){var a;return r?(a=this.mutationDefaults.find(function(o){return Fs(r,o.mutationKey)}))==null?void 0:a.defaultOptions:void 0},t.defaultQueryOptions=function(r){if(r!=null&&r._defaulted)return r;var a=le({},this.defaultOptions.queries,this.getQueryDefaults(r==null?void 0:r.queryKey),r,{_defaulted:!0});return!a.queryHash&&a.queryKey&&(a.queryHash=mf(a.queryKey,a)),a},t.defaultQueryObserverOptions=function(r){return this.defaultQueryOptions(r)},t.defaultMutationOptions=function(r){return r!=null&&r._defaulted?r:le({},this.defaultOptions.mutations,this.getMutationDefaults(r==null?void 0:r.mutationKey),r,{_defaulted:!0})},t.clear=function(){this.queryCache.clear(),this.mutationCache.clear()},e}(),aNe=function(e){fc(t,e);function t(r,a){var o;return o=e.call(this)||this,o.client=r,o.options=a,o.trackedProps=[],o.selectError=null,o.bindMethods(),o.setOptions(a),o}var n=t.prototype;return n.bindMethods=function(){this.remove=this.remove.bind(this),this.refetch=this.refetch.bind(this)},n.onSubscribe=function(){this.listeners.length===1&&(this.currentQuery.addObserver(this),QI(this.currentQuery,this.options)&&this.executeFetch(),this.updateTimers())},n.onUnsubscribe=function(){this.listeners.length||this.destroy()},n.shouldFetchOnReconnect=function(){return gf(this.currentQuery,this.options,this.options.refetchOnReconnect)},n.shouldFetchOnWindowFocus=function(){return gf(this.currentQuery,this.options,this.options.refetchOnWindowFocus)},n.destroy=function(){this.listeners=[],this.clearTimers(),this.currentQuery.removeObserver(this)},n.setOptions=function(a,o){var i=this.options,c=this.currentQuery;if(this.options=this.client.defaultQueryObserverOptions(a),typeof this.options.enabled<"u"&&typeof this.options.enabled!="boolean")throw new Error("Expected enabled to be a boolean");this.options.queryKey||(this.options.queryKey=i.queryKey),this.updateQuery();var l=this.hasListeners();l&&JI(this.currentQuery,c,this.options,i)&&this.executeFetch(),this.updateResult(o),l&&(this.currentQuery!==c||this.options.enabled!==i.enabled||this.options.staleTime!==i.staleTime)&&this.updateStaleTimeout();var s=this.computeRefetchInterval();l&&(this.currentQuery!==c||this.options.enabled!==i.enabled||s!==this.currentRefetchInterval)&&this.updateRefetchInterval(s)},n.getOptimisticResult=function(a){var o=this.client.defaultQueryObserverOptions(a),i=this.client.getQueryCache().build(this.client,o);return this.createResult(i,o)},n.getCurrentResult=function(){return this.currentResult},n.trackResult=function(a,o){var i=this,c={},l=function(d){i.trackedProps.includes(d)||i.trackedProps.push(d)};return Object.keys(a).forEach(function(s){Object.defineProperty(c,s,{configurable:!1,enumerable:!0,get:function(){return l(s),a[s]}})}),(o.useErrorBoundary||o.suspense)&&l("error"),c},n.getNextResult=function(a){var o=this;return new Promise(function(i,c){var l=o.subscribe(function(s){s.isFetching||(l(),s.isError&&(a!=null&&a.throwOnError)?c(s.error):i(s))})})},n.getCurrentQuery=function(){return this.currentQuery},n.remove=function(){this.client.getQueryCache().remove(this.currentQuery)},n.refetch=function(a){return this.fetch(le({},a,{meta:{refetchPage:a==null?void 0:a.refetchPage}}))},n.fetchOptimistic=function(a){var o=this,i=this.client.defaultQueryObserverOptions(a),c=this.client.getQueryCache().build(this.client,i);return c.fetch().then(function(){return o.createResult(c,i)})},n.fetch=function(a){var o=this;return this.executeFetch(a).then(function(){return o.updateResult(),o.currentResult})},n.executeFetch=function(a){this.updateQuery();var o=this.currentQuery.fetch(this.options,a);return a!=null&&a.throwOnError||(o=o.catch(cr)),o},n.updateStaleTimeout=function(){var a=this;if(this.clearStaleTimeout(),!(As||this.currentResult.isStale||!ff(this.options.staleTime))){var o=jI(this.currentResult.dataUpdatedAt,this.options.staleTime),i=o+1;this.staleTimeoutId=setTimeout(function(){a.currentResult.isStale||a.updateResult()},i)}},n.computeRefetchInterval=function(){var a;return typeof this.options.refetchInterval=="function"?this.options.refetchInterval(this.currentResult.data,this.currentQuery):(a=this.options.refetchInterval)!=null?a:!1},n.updateRefetchInterval=function(a){var o=this;this.clearRefetchInterval(),this.currentRefetchInterval=a,!(As||this.options.enabled===!1||!ff(this.currentRefetchInterval)||this.currentRefetchInterval===0)&&(this.refetchIntervalId=setInterval(function(){(o.options.refetchIntervalInBackground||pc.isFocused())&&o.executeFetch()},this.currentRefetchInterval))},n.updateTimers=function(){this.updateStaleTimeout(),this.updateRefetchInterval(this.computeRefetchInterval())},n.clearTimers=function(){this.clearStaleTimeout(),this.clearRefetchInterval()},n.clearStaleTimeout=function(){this.staleTimeoutId&&(clearTimeout(this.staleTimeoutId),this.staleTimeoutId=void 0)},n.clearRefetchInterval=function(){this.refetchIntervalId&&(clearInterval(this.refetchIntervalId),this.refetchIntervalId=void 0)},n.createResult=function(a,o){var i=this.currentQuery,c=this.options,l=this.currentResult,s=this.currentResultState,d=this.currentResultOptions,f=a!==i,m=f?a.state:this.currentQueryInitialState,p=f?this.currentResult:this.previousQueryResult,h=a.state,v=h.dataUpdatedAt,g=h.error,C=h.errorUpdatedAt,b=h.isFetching,y=h.status,x=!1,S=!1,L;if(o.optimisticResults){var E=this.hasListeners(),M=!E&&QI(a,o),w=E&&JI(a,i,o,c);(M||w)&&(b=!0,v||(y="loading"))}if(o.keepPreviousData&&!h.dataUpdateCount&&(p!=null&&p.isSuccess)&&y!=="error")L=p.data,v=p.dataUpdatedAt,y=p.status,x=!0;else if(o.select&&typeof h.data<"u")if(l&&h.data===(s==null?void 0:s.data)&&o.select===this.selectFn)L=this.selectResult;else try{this.selectFn=o.select,L=o.select(h.data),o.structuralSharing!==!1&&(L=js(l==null?void 0:l.data,L)),this.selectResult=L,this.selectError=null}catch(D){Us().error(D),this.selectError=D}else L=h.data;if(typeof o.placeholderData<"u"&&typeof L>"u"&&(y==="loading"||y==="idle")){var N;if(l!=null&&l.isPlaceholderData&&o.placeholderData===(d==null?void 0:d.placeholderData))N=l.data;else if(N=typeof o.placeholderData=="function"?o.placeholderData():o.placeholderData,o.select&&typeof N<"u")try{N=o.select(N),o.structuralSharing!==!1&&(N=js(l==null?void 0:l.data,N)),this.selectError=null}catch(D){Us().error(D),this.selectError=D}typeof N<"u"&&(y="success",L=N,S=!0)}this.selectError&&(g=this.selectError,L=this.selectResult,C=Date.now(),y="error");var P={status:y,isLoading:y==="loading",isSuccess:y==="success",isError:y==="error",isIdle:y==="idle",data:L,dataUpdatedAt:v,error:g,errorUpdatedAt:C,failureCount:h.fetchFailureCount,errorUpdateCount:h.errorUpdateCount,isFetched:h.dataUpdateCount>0||h.errorUpdateCount>0,isFetchedAfterMount:h.dataUpdateCount>m.dataUpdateCount||h.errorUpdateCount>m.errorUpdateCount,isFetching:b,isRefetching:b&&y!=="loading",isLoadingError:y==="error"&&h.dataUpdatedAt===0,isPlaceholderData:S,isPreviousData:x,isRefetchError:y==="error"&&h.dataUpdatedAt!==0,isStale:hf(a,o),refetch:this.refetch,remove:this.remove};return P},n.shouldNotifyListeners=function(a,o){if(!o)return!0;var i=this.options,c=i.notifyOnChangeProps,l=i.notifyOnChangePropsExclusions;if(!c&&!l||c==="tracked"&&!this.trackedProps.length)return!0;var s=c==="tracked"?this.trackedProps:c;return Object.keys(a).some(function(d){var f=d,m=a[f]!==o[f],p=s==null?void 0:s.some(function(v){return v===d}),h=l==null?void 0:l.some(function(v){return v===d});return m&&!h&&(!s||p)})},n.updateResult=function(a){var o=this.currentResult;if(this.currentResult=this.createResult(this.currentQuery,this.options),this.currentResultState=this.currentQuery.state,this.currentResultOptions=this.options,!Hze(this.currentResult,o)){var i={cache:!0};(a==null?void 0:a.listeners)!==!1&&this.shouldNotifyListeners(this.currentResult,o)&&(i.listeners=!0),this.notify(le({},i,a))}},n.updateQuery=function(){var a=this.client.getQueryCache().build(this.client,this.options);if(a!==this.currentQuery){var o=this.currentQuery;this.currentQuery=a,this.currentQueryInitialState=a.state,this.previousQueryResult=this.currentResult,this.hasListeners()&&(o==null||o.removeObserver(this),a.addObserver(this))}},n.onQueryUpdate=function(a){var o={};a.type==="success"?o.onSuccess=!0:a.type==="error"&&!Ws(a.error)&&(o.onError=!0),this.updateResult(o),this.hasListeners()&&this.updateTimers()},n.notify=function(a){var o=this;Mn.batch(function(){a.onSuccess?(o.options.onSuccess==null||o.options.onSuccess(o.currentResult.data),o.options.onSettled==null||o.options.onSettled(o.currentResult.data,null)):a.onError&&(o.options.onError==null||o.options.onError(o.currentResult.error),o.options.onSettled==null||o.options.onSettled(void 0,o.currentResult.error)),a.listeners&&o.listeners.forEach(function(i){i(o.currentResult)}),a.cache&&o.client.getQueryCache().notify({query:o.currentQuery,type:"observerResultsUpdated"})})},t}(mc);function oNe(e,t){return t.enabled!==!1&&!e.state.dataUpdatedAt&&!(e.state.status==="error"&&t.retryOnMount===!1)}function QI(e,t){return oNe(e,t)||e.state.dataUpdatedAt>0&&gf(e,t,t.refetchOnMount)}function gf(e,t,n){if(t.enabled!==!1){var r=typeof n=="function"?n(e):n;return r==="always"||r!==!1&&hf(e,t)}return!1}function JI(e,t,n,r){return n.enabled!==!1&&(e!==t||r.enabled===!1)&&(!n.suspense||e.state.status!=="error")&&hf(e,n)}function hf(e,t){return e.isStaleByTime(t.staleTime)}var iNe=Tn.unstable_batchedUpdates;Mn.setBatchNotifyFunction(iNe);var cNe=console;Gze(cNe);var ZI=O.createContext(void 0),eT=O.createContext(!1);function tT(e){return e&&typeof window<"u"?(window.ReactQueryClientContext||(window.ReactQueryClientContext=ZI),window.ReactQueryClientContext):ZI}var lNe=function(){var t=O.useContext(tT(O.useContext(eT)));if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},nT=function(t){var n=t.client,r=t.contextSharing,a=r===void 0?!1:r,o=t.children;O.useEffect(function(){return n.mount(),function(){n.unmount()}},[n]);var i=tT(a);return O.createElement(eT.Provider,{value:a},O.createElement(i.Provider,{value:n},o))};function sNe(){var e=!1;return{clearReset:function(){e=!1},reset:function(){e=!0},isReset:function(){return e}}}var uNe=O.createContext(sNe()),dNe=function(){return O.useContext(uNe)};function fNe(e,t,n){return typeof t=="function"?t.apply(void 0,n):typeof t=="boolean"?t:!!e}function mNe(e,t){var n=O.useRef(!1),r=O.useState(0),a=r[1],o=lNe(),i=dNe(),c=o.defaultQueryObserverOptions(e);c.optimisticResults=!0,c.onError&&(c.onError=Mn.batchCalls(c.onError)),c.onSuccess&&(c.onSuccess=Mn.batchCalls(c.onSuccess)),c.onSettled&&(c.onSettled=Mn.batchCalls(c.onSettled)),c.suspense&&(typeof c.staleTime!="number"&&(c.staleTime=1e3),c.cacheTime===0&&(c.cacheTime=1)),(c.suspense||c.useErrorBoundary)&&(i.isReset()||(c.retryOnMount=!1));var l=O.useState(function(){return new t(o,c)}),s=l[0],d=s.getOptimisticResult(c);if(O.useEffect(function(){n.current=!0,i.clearReset();var f=s.subscribe(Mn.batchCalls(function(){n.current&&a(function(m){return m+1})}));return s.updateResult(),function(){n.current=!1,f()}},[i,s]),O.useEffect(function(){s.setOptions(c,{listeners:!1})},[c,s]),c.suspense&&d.isLoading)throw s.fetchOptimistic(c).then(function(f){var m=f.data;c.onSuccess==null||c.onSuccess(m),c.onSettled==null||c.onSettled(m,null)}).catch(function(f){i.clearReset(),c.onError==null||c.onError(f),c.onSettled==null||c.onSettled(void 0,f)});if(d.isError&&!i.isReset()&&!d.isFetching&&fNe(c.suspense,c.useErrorBoundary,[d.error,s.getCurrentQuery()]))throw d.error;return c.notifyOnChangeProps==="tracked"&&(d=s.trackResult(d,c)),d}function rT(e,t,n){var r=ks(e,t,n);return mNe(r,aNe)}var Qt=(e=>(e.App="idApp",e.Version="version",e.DeployDate="releaseDate",e.ReleasePages="gaReleasePages",e.Fields="gaReleasePagesContent",e.Title="title",e.Description="description",e.Image="idFile",e.Order="order",e))(Qt||{}),vf=(e=>(e.GetApps="GetApps",e.GetReleases="GetReleases",e))(vf||{});const pNe=async()=>{const{data:e}=await sa.get("getApps");return e},gNe=async e=>{const{data:t}=await sa.post("ListReleases",e);return t},hNe=async e=>{const{data:t}=await sa.post("MaintainReleases",e);return t},vNe=async(e,t)=>{const{data:n}=await sa.post("ReadNotification",{idRelease:e,userId:t});return n},aT=()=>rT([vf.GetApps],async()=>await pNe()),bNe=e=>{const{idApp:t,userId:n,lastDeployed:r}=e;return rT([vf.GetReleases,t,n,r],async()=>await gNe(e),{enabled:!!t})},CNe=({index:e})=>{const{requiredField:t}=fd();return ze.jsx(un.List,{name:[e,Qt.Fields],children:(n,{remove:r})=>ze.jsxs(ze.Fragment,{children:[ze.jsx(ws,{fieldName:"idReleasePage",hidden:!0}),ze.jsx(S1,{gap:16,vertical:!0,children:n.map(({key:a,name:o,...i})=>ze.jsxs(S1,{gap:6,align:"center",children:[ze.jsxs(S1,{vertical:!0,gap:2,style:{width:"100%"},children:[ze.jsx(un.Item,{...i,name:[o,Qt.Title],rules:t,noStyle:!0,children:ze.jsx(y1,{placeholder:Dt("RELEASE-NOTES.FORM.FIELDS.TITLE"),maxLength:500})}),ze.jsx(un.Item,{...i,name:[o,Qt.Description],rules:t,noStyle:!0,children:ze.jsx(Gu,{autoSize:{minRows:2},placeholder:Dt("RELEASE-NOTES.FORM.FIELDS.DESCRIPTION")})})]}),ze.jsx(un.Item,{noStyle:!0,children:ze.jsx(fr,{title:Dt("GENERAL.REMOVE"),children:ze.jsx(mn,{type:"text",icon:ze.jsx(By,{}),onClick:()=>r(o)})})})]},a))})]})})},yNe=O.forwardRef(({changeSlide:e},t)=>{const n=un.useFormInstance(),r=un.useWatch(Qt.ReleasePages,n),a=c=>l=>{const s=c[0],d=c[1],f=r[s];Z1e(l.file.originFileObj,m=>{n.setFieldValue(Qt.ReleasePages,r.toSpliced(s,1,{...f,[d]:m}))})},o=c=>()=>{var f;const l=r==null?void 0:r[c],d=[...((f=r==null?void 0:r[c])==null?void 0:f[Qt.Fields])??[],{}];n.setFieldValue(Qt.ReleasePages,r.toSpliced(c,1,{...l,[Qt.Fields]:d})),console.log(t)},i=ze.jsx(C1,{justify:"center",align:"middle",children:ze.jsxs(f0,{direction:"vertical",children:[ze.jsx("p",{className:"ant-upload-drag-icon",children:ze.jsx(g8,{})}),ze.jsx("p",{className:"ant-upload-text",children:Dt("GENERAL.UPLOAD_LABEL")}),ze.jsx("p",{className:"ant-upload-hint",children:Dt("GENERAL.JPG_PNG_WARNING")})]})});return ze.jsx(un.List,{name:Qt.ReleasePages,children:c=>ze.jsxs(ze.Fragment,{children:[ze.jsx(ws,{fieldName:"idRelease",hidden:!0}),ze.jsx(ws,{fieldName:"idReleasePage",hidden:!0}),ze.jsx(Tu,{infinite:!1,ref:t,afterChange:e,children:c.map(({key:l,name:s,...d})=>{var m;const f=(m=r==null?void 0:r[s])==null?void 0:m[Qt.Image];return ze.jsx("div",{children:ze.jsxs(C1,{gutter:[8,16],style:{marginBottom:35},children:[ze.jsx(ir,{span:24,children:ze.jsxs(C1,{gutter:8,children:[ze.jsx(ir,{span:8,children:ze.jsx(CNe,{index:s})}),ze.jsx(ir,{span:16,children:ze.jsx(G2,{bordered:!0,styles:{body:{padding:2}},children:ze.jsx(un.Item,{...d,name:[s,Qt.Image],noStyle:!0,children:ze.jsx(rd,{listType:"picture",className:"patch-notes-image",showUploadList:!1,beforeUpload:e2e,onChange:a([s,Qt.Image]),children:f?ze.jsx(b0,{src:f,preview:!1,height:"100%",style:{maxHeight:800}}):i})})})})]})}),ze.jsx(ir,{span:8,children:ze.jsx(un.Item,{children:ze.jsx(mn,{type:"dashed",onClick:o(s),icon:ze.jsx(yu,{}),block:!0,children:Dt("RELEASE-NOTES.FORM.ADD_NEW_FIELD")})})})]})},l)})})]})})}),Z1="RELEASE-NOTES",SNe=({addBtnLabel:e,addBtnTooltipText:t,release2edit:n,beforeOpenModal:r,beforeCloseModal:a,afterSubmit:o})=>{const[i,c]=O.useState(!1),[l,s]=O.useState(!1),[d,f]=O.useState(0),[m]=un.useForm(),p=O.useRef(null),{requiredField:h}=fd(),{data:v}=aT(),g=un.useWatch(Qt.ReleasePages,m),C=I=>f(I);O.useEffect(()=>{n&&c(!0)},[n]);const b=()=>{r?new Promise(I=>I(r())).then(()=>c(!0)):c(!0)},y=()=>{a?new Promise(I=>I(a())).then(()=>c(!1)):c(!1)},x=()=>m.setFieldValue(Qt.ReleasePages,[...g,{[Qt.Fields]:[{}]}]),S=()=>m.setFieldValue(Qt.ReleasePages,g.filter((I,T)=>T!==d)),L=I=>{const T={...I,[Qt.DeployDate]:Zn(I[Qt.DeployDate]).format(cR),[Qt.ReleasePages]:I[Qt.ReleasePages].map((z,R)=>({...z,[Qt.Image]:t2e(z[Qt.Image]),order:R,[Qt.Fields]:z[Qt.Fields].map((k,_)=>({...k,order:_}))}))};hNe(T).then(()=>{x0.success(Dt("GENERAL.MESSAGES.SUCCESS.ITEM_CREATE",{item:Dt(`${Z1}.TEXT_SINGULAR`)})),o&&o()}).catch(z=>{var k;const R=((k=z.response)==null?void 0:k.data)??[];M0.error({message:Dt("GENERAL.ERROR"),description:ze.jsx(d8,{dataSource:R,renderItem:_=>ze.jsx(d8.Item,{children:Dt(`GENERAL.MESSAGES.ERROR.RELEASE_NOTE.${_.error}`)})})})}).finally(y)},E=()=>!!(g!=null&&g.length)&&d!==0,M=()=>!!(g!=null&&g.length)&&d!==(g==null?void 0:g.length)-1,w=ze.jsxs(S1,{justify:"flex-end",gap:8,children:[E()&&ze.jsx(mn,{type:"dashed",icon:ze.jsx(I1,{icon:g$}),onClick:()=>{var I;return(I=p.current)==null?void 0:I.prev()},children:Dt("GENERAL.BACK")}),M()&&ze.jsx(mn,{type:"dashed",iconPosition:"end",icon:ze.jsx(I1,{icon:h$}),onClick:()=>{var I;return(I=p.current)==null?void 0:I.next()},children:Dt("GENERAL.NEXT")}),ze.jsx(mn,{type:"dashed",danger:!0,icon:ze.jsx(I1,{icon:hN}),onClick:S,children:Dt(`${Z1}.REMOVE_CURRENT_SLIDE`)}),ze.jsx(mn,{type:"dashed",icon:ze.jsx(I1,{icon:K$}),onClick:x,children:Dt(`${Z1}.ADD_NEW_SLIDE`)}),ze.jsx(mn,{type:"primary",icon:ze.jsx(I1,{icon:rN}),onClick:()=>m.submit(),children:Dt("GENERAL.SAVE")})]}),N=I=>{s(t?I:!1)},P=()=>n?n[Qt.ReleasePages].map(I=>({...I,[Qt.Image]:gx(I[Qt.Image])})):[{}],D={...n,[Qt.ReleasePages]:P(),[Qt.DeployDate]:Zn(n==null?void 0:n[Qt.DeployDate])},A=r2e(v??[],"appName","id"),$=Dt(`${Z1}.${n?"UPD_RELEASE_NOTE":"ADD_RELEASE_NOTE"}`);return ze.jsxs(ze.Fragment,{children:[ze.jsx(fr,{title:t,open:l,onOpenChange:N,children:ze.jsx(mn,{type:"primary",icon:ze.jsx(I1,{icon:uz}),shape:e?"default":"circle",onClick:b,children:e})}),ze.jsx(Pr,{open:i,title:$,onCancel:y,width:"60%",footer:w,destroyOnClose:!0,children:ze.jsxs(un,{form:m,layout:"vertical",initialValues:D,onFinish:L,children:[ze.jsx(ws,{fieldName:"idRelease",hidden:!0}),ze.jsxs(C1,{gutter:10,children:[ze.jsx(ir,{span:8,children:ze.jsx(cwe,{fieldName:Qt.App,label:Dt(`${Z1}.FORM.FIELDS.APP`),placeholder:Dt(`${Z1}.FORM.FIELDS.APP`,{context:"PLACEHOLDER"}),options:A,rules:h})}),ze.jsx(ir,{span:8,children:ze.jsx(Ms,{fieldName:Qt.Version,label:Dt(`${Z1}.FORM.FIELDS.VERSION`),placeholder:"0.0.0",tooltip:Dt(`${Z1}.FORM.FIELDS.VERSION`,{context:"TOOLTIP"}),normalize:I=>I.replace(/\s/,".").replace(/[.]{2}/g,".").replace(/^[^0-9]|[^0-9.\b]/g,""),rules:[...h,()=>({validator(I,T){var k,_;const z=/[^0-9]$/,R=(_=(k=T==null?void 0:T.split("."))==null?void 0:k.filter(Boolean))==null?void 0:_.length;return z.test(T)?Promise.reject(new Error(Dt("GENERAL.FORM.ERRORS.VERSION"))):R>3||R<3?Promise.reject(new Error(Dt("GENERAL.FORM.ERRORS.FORMAT"))):Promise.resolve()}})]})}),ze.jsx(ir,{span:8,children:ze.jsx(lwe,{fieldName:Qt.DeployDate,label:Dt(`${Z1}.FORM.FIELDS.DEPLOY_DATE`),format:iR,rules:h})}),ze.jsx(ir,{span:24,children:ze.jsx(G2,{styles:{body:{background:n2e("PrimaryColorBgContainer")}},children:ze.jsx(yNe,{ref:p,changeSlide:C})})})]})]})})]})},{Title:xNe,Text:LNe}=fo,ENe=()=>{var S,L;const[e,t]=O.useState(!1),[n,r]=O.useState(!1),[a,o]=O.useState(0),i=O.useRef(null),c=mo(R1.AppId),l=mo(R1.UserId),{data:s}=aT(),{data:d}=bNe({idApp:c,lastDeployed:!0,userId:l}),f=d==null?void 0:d[0],m=s==null?void 0:s.find(E=>E.id===c);O.useEffect(()=>{if(d!=null&&d.length){const E=d[0],M=!E.readRelease&&!!E.isDeployed;t(M)}},[d]);const p=()=>{const E=d==null?void 0:d[0];n&&(E!=null&&E.isDeployed)&&vNe(E==null?void 0:E.idRelease,l),t(!1)},h=()=>{var E;return(E=i.current)==null?void 0:E.next()},v=()=>{var E;return(E=i.current)==null?void 0:E.prev()},g=E=>o(E),C=a===0,b=a===(((S=f==null?void 0:f.gaReleasePages)==null?void 0:S.length)??0)-1,y=E=>r(E.target.checked),x=ze.jsxs(S1,{justify:"space-between",align:"center",children:[ze.jsx(p2,{checked:n,onChange:y,children:Dt("RELEASE-NOTES.FORM.FIELDS.DO_NOT_SHOW_AGAIN")}),ze.jsxs(S1,{gap:8,children:[!C&&ze.jsx(mn,{onClick:v,children:Dt("Prev")}),!b&&ze.jsx(mn,{type:"primary",onClick:h,children:Dt("GENERAL.ACTIONS.NEXT")}),b&&ze.jsx(mn,{type:"primary",onClick:p,children:Dt("GENERAL.ACTIONS.CLOSE")})]})]});return ze.jsx(Pr,{open:e,title:Dt("RELEASE-NOTES.WHATS_NEWS",{app:m==null?void 0:m.appName,version:f==null?void 0:f.version}),onCancel:p,width:"60%",footer:x,children:ze.jsx(Tu,{infinite:!1,ref:i,afterChange:g,children:(L=f==null?void 0:f.gaReleasePages)==null?void 0:L.map(({idFile:E,gaReleasePagesContent:M},w)=>ze.jsx("div",{children:ze.jsxs(C1,{gutter:[24,16],style:{marginBottom:35},children:[ze.jsx(ir,{span:8,children:ze.jsx(S1,{gap:16,justify:"space-between",vertical:!0,style:{height:"100%"},children:M.map(({title:N,description:P},D)=>ze.jsxs(S1,{gap:6,vertical:!0,children:[ze.jsx(xNe,{level:4,children:N}),ze.jsx(LNe,{style:{opacity:.5},children:P})]},`${w}-${D}`))})}),ze.jsx(ir,{span:16,children:ze.jsx(S1,{justify:"center",children:ze.jsx(G2,{bordered:!0,styles:{body:{display:"flex",padding:2}},children:ze.jsx(b0,{src:gx(E),style:{maxHeight:800,borderRadius:8}})})})})]})},w))})})},oT=new rNe({defaultOptions:{queries:{retry:2}}}),MNe=({showAddBtn:e,...t})=>e?ze.jsx(id,{children:ze.jsx(nT,{client:oT,children:ze.jsx(SNe,{...t})})}):ze.jsx(id,{children:ze.jsx(nT,{client:oT,children:ze.jsx(ENe,{})})}),wNe=Xf()(MNe);sr.Helpdesk=kze,sr.ReleaseNote=wNe,Object.defineProperty(sr,Symbol.toStringTag,{value:"Module"})});
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "aquasis-fe-components",
3
3
  "private": false,
4
- "version": "1.0.2-a",
4
+ "version": "1.0.2-c",
5
5
  "type": "module",
6
6
  "license": "ISC",
7
7
  "author": "Ewerton Souza",