@lokalise/harmony 1.17.0 → 1.17.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/harmony.mjs CHANGED
@@ -1,13 +1,13 @@
1
- var Xt = Object.defineProperty;
2
- var Zt = (e, t, n) => t in e ? Xt(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
1
+ var Vt = Object.defineProperty;
2
+ var Zt = (e, t, n) => t in e ? Vt(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
3
3
  var ee = (e, t, n) => Zt(e, typeof t != "symbol" ? t + "" : t, n);
4
4
  import { jsx as s, jsxs as h, Fragment as Ue } from "react/jsx-runtime";
5
5
  import * as F from "react";
6
- import { useRef as wt, useState as R, useCallback as We, useEffect as G, useContext as Et, createContext as Ct, cloneElement as en, Fragment as kt, forwardRef as tn } from "react";
7
- import { Tooltip as H, Link as L, Menu as ae, MenuList as se, CaretUpIcon as nn, UserIcon as Pt, MenuItem as K, MenuDivider as It, ConfirmModal as rn, Alert as on, Tag as Ne, Button as je, Loading as an, Popover as sn, JobIcon as cn } from "@lokalise/louis";
6
+ import { useRef as Et, useState as R, useCallback as We, useEffect as G, useContext as wt, createContext as Ct, cloneElement as en, Fragment as kt, forwardRef as tn } from "react";
7
+ import { Tooltip as H, Link as L, Menu as ae, MenuList as se, CaretUpIcon as nn, UserIcon as It, MenuItem as K, MenuDivider as Pt, ConfirmModal as rn, Alert as on, Tag as Ne, Button as je, Loading as an, Popover as sn, JobIcon as cn } from "@lokalise/louis";
8
8
  import { format as At, parseISO as ln, isThisSecond as dn } from "date-fns";
9
9
  import { toZonedTime as un } from "date-fns-tz";
10
- import { z as o } from "zod";
10
+ import { z as r } from "zod";
11
11
  import { buildPayloadRoute as qe } from "@lokalise/universal-ts-utils/api-contracts/apiContracts";
12
12
  import { sendByPayloadRoute as W, sendByGetRoute as J } from "@lokalise/frontend-http-client";
13
13
  import { useQuery as B, useMutation as Rt } from "@tanstack/react-query";
@@ -17,7 +17,7 @@ const xe = {
17
17
  InProgress: "in_progress",
18
18
  Created: "created",
19
19
  Queued: "queued"
20
- }, P = {
20
+ }, I = {
21
21
  ...xe,
22
22
  NotStarted: "not_started"
23
23
  }, te = {
@@ -47,31 +47,31 @@ function mn() {
47
47
  var e = typeof ne == "object" && ne && ne.Object === Object && ne;
48
48
  return _e = e, _e;
49
49
  }
50
- var ge, Ye;
50
+ var ge, Xe;
51
51
  function jt() {
52
- if (Ye) return ge;
53
- Ye = 1;
52
+ if (Xe) return ge;
53
+ Xe = 1;
54
54
  var e = mn(), t = typeof self == "object" && self && self.Object === Object && self, n = e || t || Function("return this")();
55
55
  return ge = n, ge;
56
56
  }
57
- var he, Ve;
57
+ var he, Ye;
58
58
  function fn() {
59
- if (Ve) return he;
60
- Ve = 1;
59
+ if (Ye) return he;
60
+ Ye = 1;
61
61
  var e = jt(), t = function() {
62
62
  return e.Date.now();
63
63
  };
64
64
  return he = t, he;
65
65
  }
66
- var pe, Xe;
66
+ var pe, Ve;
67
67
  function _n() {
68
- if (Xe) return pe;
69
- Xe = 1;
68
+ if (Ve) return pe;
69
+ Ve = 1;
70
70
  var e = /\s/;
71
71
  function t(n) {
72
- for (var r = n.length; r-- && e.test(n.charAt(r)); )
72
+ for (var o = n.length; o-- && e.test(n.charAt(o)); )
73
73
  ;
74
- return r;
74
+ return o;
75
75
  }
76
76
  return pe = t, pe;
77
77
  }
@@ -80,8 +80,8 @@ function gn() {
80
80
  if (Ze) return be;
81
81
  Ze = 1;
82
82
  var e = _n(), t = /^\s+/;
83
- function n(r) {
84
- return r && r.slice(0, e(r) + 1).replace(t, "");
83
+ function n(o) {
84
+ return o && o.slice(0, e(o) + 1).replace(t, "");
85
85
  }
86
86
  return be = n, be;
87
87
  }
@@ -96,7 +96,7 @@ var Te, tt;
96
96
  function hn() {
97
97
  if (tt) return Te;
98
98
  tt = 1;
99
- var e = xt(), t = Object.prototype, n = t.hasOwnProperty, r = t.toString, a = e ? e.toStringTag : void 0;
99
+ var e = xt(), t = Object.prototype, n = t.hasOwnProperty, o = t.toString, a = e ? e.toStringTag : void 0;
100
100
  function i(c) {
101
101
  var d = n.call(c, a), u = c[a];
102
102
  try {
@@ -104,7 +104,7 @@ function hn() {
104
104
  var l = !0;
105
105
  } catch {
106
106
  }
107
- var m = r.call(c);
107
+ var m = o.call(c);
108
108
  return l && (d ? c[a] = u : delete c[a]), m;
109
109
  }
110
110
  return Te = i, Te;
@@ -114,8 +114,8 @@ function pn() {
114
114
  if (nt) return ye;
115
115
  nt = 1;
116
116
  var e = Object.prototype, t = e.toString;
117
- function n(r) {
118
- return t.call(r);
117
+ function n(o) {
118
+ return t.call(o);
119
119
  }
120
120
  return ye = n, ye;
121
121
  }
@@ -123,41 +123,41 @@ var Se, rt;
123
123
  function bn() {
124
124
  if (rt) return Se;
125
125
  rt = 1;
126
- var e = xt(), t = hn(), n = pn(), r = "[object Null]", a = "[object Undefined]", i = e ? e.toStringTag : void 0;
126
+ var e = xt(), t = hn(), n = pn(), o = "[object Null]", a = "[object Undefined]", i = e ? e.toStringTag : void 0;
127
127
  function c(d) {
128
- return d == null ? d === void 0 ? a : r : i && i in Object(d) ? t(d) : n(d);
128
+ return d == null ? d === void 0 ? a : o : i && i in Object(d) ? t(d) : n(d);
129
129
  }
130
130
  return Se = c, Se;
131
131
  }
132
- var we, ot;
132
+ var Ee, ot;
133
133
  function vn() {
134
- if (ot) return we;
134
+ if (ot) return Ee;
135
135
  ot = 1;
136
136
  function e(t) {
137
137
  return t != null && typeof t == "object";
138
138
  }
139
- return we = e, we;
139
+ return Ee = e, Ee;
140
140
  }
141
- var Ee, at;
141
+ var we, at;
142
142
  function Tn() {
143
- if (at) return Ee;
143
+ if (at) return we;
144
144
  at = 1;
145
145
  var e = bn(), t = vn(), n = "[object Symbol]";
146
- function r(a) {
146
+ function o(a) {
147
147
  return typeof a == "symbol" || t(a) && e(a) == n;
148
148
  }
149
- return Ee = r, Ee;
149
+ return we = o, we;
150
150
  }
151
151
  var Ce, st;
152
152
  function yn() {
153
153
  if (st) return Ce;
154
154
  st = 1;
155
- var e = gn(), t = He(), n = Tn(), r = NaN, a = /^[-+]0x[0-9a-f]+$/i, i = /^0b[01]+$/i, c = /^0o[0-7]+$/i, d = parseInt;
155
+ var e = gn(), t = He(), n = Tn(), o = NaN, a = /^[-+]0x[0-9a-f]+$/i, i = /^0b[01]+$/i, c = /^0o[0-7]+$/i, d = parseInt;
156
156
  function u(l) {
157
157
  if (typeof l == "number")
158
158
  return l;
159
159
  if (n(l))
160
- return r;
160
+ return o;
161
161
  if (t(l)) {
162
162
  var m = typeof l.valueOf == "function" ? l.valueOf() : l;
163
163
  l = t(m) ? m + "" : m;
@@ -166,7 +166,7 @@ function yn() {
166
166
  return l === 0 ? l : +l;
167
167
  l = e(l);
168
168
  var _ = i.test(l);
169
- return _ || c.test(l) ? d(l.slice(2), _ ? 2 : 8) : a.test(l) ? r : +l;
169
+ return _ || c.test(l) ? d(l.slice(2), _ ? 2 : 8) : a.test(l) ? o : +l;
170
170
  }
171
171
  return Ce = u, Ce;
172
172
  }
@@ -174,64 +174,64 @@ var ke, it;
174
174
  function Ot() {
175
175
  if (it) return ke;
176
176
  it = 1;
177
- var e = He(), t = fn(), n = yn(), r = "Expected a function", a = Math.max, i = Math.min;
177
+ var e = He(), t = fn(), n = yn(), o = "Expected a function", a = Math.max, i = Math.min;
178
178
  function c(d, u, l) {
179
- var m, _, T, y, f, w, b = 0, g = !1, p = !1, v = !0;
179
+ var m, _, T, y, f, E, b = 0, g = !1, p = !1, v = !0;
180
180
  if (typeof d != "function")
181
- throw new TypeError(r);
181
+ throw new TypeError(o);
182
182
  u = n(u) || 0, e(l) && (g = !!l.leading, p = "maxWait" in l, T = p ? a(n(l.maxWait) || 0, u) : T, v = "trailing" in l ? !!l.trailing : v);
183
183
  function C(S) {
184
184
  var j = m, D = _;
185
185
  return m = _ = void 0, b = S, y = d.apply(D, j), y;
186
186
  }
187
- function E(S) {
187
+ function w(S) {
188
188
  return b = S, f = setTimeout(Z, u), g ? C(S) : y;
189
189
  }
190
- function X(S) {
191
- var j = S - w, D = S - b, Ke = u - j;
190
+ function V(S) {
191
+ var j = S - E, D = S - b, Ke = u - j;
192
192
  return p ? i(Ke, T - D) : Ke;
193
193
  }
194
194
  function ze(S) {
195
- var j = S - w, D = S - b;
196
- return w === void 0 || j >= u || j < 0 || p && D >= T;
195
+ var j = S - E, D = S - b;
196
+ return E === void 0 || j >= u || j < 0 || p && D >= T;
197
197
  }
198
198
  function Z() {
199
199
  var S = t();
200
200
  if (ze(S))
201
201
  return Ge(S);
202
- f = setTimeout(Z, X(S));
202
+ f = setTimeout(Z, V(S));
203
203
  }
204
204
  function Ge(S) {
205
205
  return f = void 0, v && m ? C(S) : (m = _ = void 0, y);
206
206
  }
207
- function Yt() {
208
- f !== void 0 && clearTimeout(f), b = 0, m = w = _ = f = void 0;
207
+ function Xt() {
208
+ f !== void 0 && clearTimeout(f), b = 0, m = E = _ = f = void 0;
209
209
  }
210
- function Vt() {
210
+ function Yt() {
211
211
  return f === void 0 ? y : Ge(t());
212
212
  }
213
213
  function me() {
214
214
  var S = t(), j = ze(S);
215
- if (m = arguments, _ = this, w = S, j) {
215
+ if (m = arguments, _ = this, E = S, j) {
216
216
  if (f === void 0)
217
- return E(w);
217
+ return w(E);
218
218
  if (p)
219
- return clearTimeout(f), f = setTimeout(Z, u), C(w);
219
+ return clearTimeout(f), f = setTimeout(Z, u), C(E);
220
220
  }
221
221
  return f === void 0 && (f = setTimeout(Z, u)), y;
222
222
  }
223
- return me.cancel = Yt, me.flush = Vt, me;
223
+ return me.cancel = Xt, me.flush = Yt, me;
224
224
  }
225
225
  return ke = c, ke;
226
226
  }
227
227
  var Sn = Ot();
228
- const wn = /* @__PURE__ */ Nt(Sn);
229
- var Pe, ct;
230
- function En() {
231
- if (ct) return Pe;
228
+ const En = /* @__PURE__ */ Nt(Sn);
229
+ var Ie, ct;
230
+ function wn() {
231
+ if (ct) return Ie;
232
232
  ct = 1;
233
233
  var e = Ot(), t = He(), n = "Expected a function";
234
- function r(a, i, c) {
234
+ function o(a, i, c) {
235
235
  var d = !0, u = !0;
236
236
  if (typeof a != "function")
237
237
  throw new TypeError(n);
@@ -241,27 +241,27 @@ function En() {
241
241
  trailing: u
242
242
  });
243
243
  }
244
- return Pe = r, Pe;
244
+ return Ie = o, Ie;
245
245
  }
246
- var Cn = En();
247
- const kn = /* @__PURE__ */ Nt(Cn), Pn = (e, t, n, r) => {
246
+ var Cn = wn();
247
+ const kn = /* @__PURE__ */ Nt(Cn), In = (e, t, n, o) => {
248
248
  switch (t) {
249
249
  case "debounce":
250
- return wn(e, n, r);
250
+ return En(e, n, o);
251
251
  case "throttle":
252
- return kn(e, n, r);
252
+ return kn(e, n, o);
253
253
  default:
254
254
  return e;
255
255
  }
256
- }, In = (
256
+ }, Pn = (
257
257
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
258
258
  (e) => {
259
259
  const t = F.useRef(e);
260
260
  return F.useEffect(() => {
261
261
  t.current = e;
262
262
  }), F.useMemo(() => (...n) => {
263
- var r;
264
- return (r = t.current) === null || r === void 0 ? void 0 : r.call(t, ...n);
263
+ var o;
264
+ return (o = t.current) === null || o === void 0 ? void 0 : o.call(t, ...n);
265
265
  }, []);
266
266
  }
267
267
  ), An = (
@@ -291,31 +291,31 @@ const kn = /* @__PURE__ */ Nt(Cn), Pn = (e, t, n, r) => {
291
291
  width: e.contentRect.width,
292
292
  height: e.contentRect.height
293
293
  };
294
- function Nn({ skipOnMount: e = !1, refreshMode: t, refreshRate: n = 1e3, refreshOptions: r, handleWidth: a = !0, handleHeight: i = !0, targetRef: c, observerOptions: d, onResize: u } = {}) {
295
- const l = wt(e), m = In(u), [_, T] = R({
294
+ function Nn({ skipOnMount: e = !1, refreshMode: t, refreshRate: n = 1e3, refreshOptions: o, handleWidth: a = !0, handleHeight: i = !0, targetRef: c, observerOptions: d, onResize: u } = {}) {
295
+ const l = Et(e), m = Pn(u), [_, T] = R({
296
296
  width: void 0,
297
297
  height: void 0
298
- }), { refProxy: y, refElement: f } = An(c), { box: w } = d || {}, b = We((p) => {
298
+ }), { refProxy: y, refElement: f } = An(c), { box: E } = d || {}, b = We((p) => {
299
299
  if (!a && !i)
300
300
  return;
301
301
  if (l.current) {
302
302
  l.current = !1;
303
303
  return;
304
304
  }
305
- const v = (C, E) => a && C.width !== E.width || i && C.height !== E.height;
305
+ const v = (C, w) => a && C.width !== w.width || i && C.height !== w.height;
306
306
  p.forEach((C) => {
307
- const E = Rn(C, w);
308
- T((X) => v(X, E) ? (m == null || m({
309
- width: E.width,
310
- height: E.height,
307
+ const w = Rn(C, E);
308
+ T((V) => v(V, w) ? (m == null || m({
309
+ width: w.width,
310
+ height: w.height,
311
311
  entry: C
312
- }), E) : X);
312
+ }), w) : V);
313
313
  });
314
- }, [a, i, l, w]), g = We(Pn(b, t, n, r), [
314
+ }, [a, i, l, E]), g = We(In(b, t, n, o), [
315
315
  b,
316
316
  t,
317
317
  n,
318
- r
318
+ o
319
319
  ]);
320
320
  return G(() => {
321
321
  let p;
@@ -324,23 +324,23 @@ function Nn({ skipOnMount: e = !1, refreshMode: t, refreshRate: n = 1e3, refresh
324
324
  height: null,
325
325
  entry: null
326
326
  }), T({ width: void 0, height: void 0 })), () => {
327
- var v, C, E;
328
- (v = p == null ? void 0 : p.disconnect) === null || v === void 0 || v.call(p), (E = (C = g).cancel) === null || E === void 0 || E.call(C);
327
+ var v, C, w;
328
+ (v = p == null ? void 0 : p.disconnect) === null || v === void 0 || v.call(p), (w = (C = g).cancel) === null || w === void 0 || w.call(C);
329
329
  };
330
330
  }, [g, f]), Object.assign({ ref: y }, _);
331
331
  }
332
332
  function Lt(e) {
333
- var t, n, r = "";
334
- if (typeof e == "string" || typeof e == "number") r += e;
333
+ var t, n, o = "";
334
+ if (typeof e == "string" || typeof e == "number") o += e;
335
335
  else if (typeof e == "object") if (Array.isArray(e)) {
336
336
  var a = e.length;
337
- for (t = 0; t < a; t++) e[t] && (n = Lt(e[t])) && (r && (r += " "), r += n);
338
- } else for (n in e) e[n] && (r && (r += " "), r += n);
339
- return r;
337
+ for (t = 0; t < a; t++) e[t] && (n = Lt(e[t])) && (o && (o += " "), o += n);
338
+ } else for (n in e) e[n] && (o && (o += " "), o += n);
339
+ return o;
340
340
  }
341
341
  function N() {
342
- for (var e, t, n = 0, r = "", a = arguments.length; n < a; n++) (e = arguments[n]) && (t = Lt(e)) && (r && (r += " "), r += t);
343
- return r;
342
+ for (var e, t, n = 0, o = "", a = arguments.length; n < a; n++) (e = arguments[n]) && (t = Lt(e)) && (o && (o += " "), o += t);
343
+ return o;
344
344
  }
345
345
  const jn = "_headerContainer_1cubo_1", xn = "_navigationTabList_1cubo_8", On = "_navigationTab_1cubo_8", Ln = "_headerContent_1cubo_34", Mn = "_staticEnabled_1cubo_50", q = {
346
346
  headerContainer: jn,
@@ -349,7 +349,7 @@ const jn = "_headerContainer_1cubo_1", xn = "_navigationTabList_1cubo_8", On = "
349
349
  headerContent: Ln,
350
350
  staticEnabled: Mn
351
351
  }, Un = 77, re = ({ sticky: e, children: t }) => {
352
- const { ref: n, height: r } = Nn({
352
+ const { ref: n, height: o } = Nn({
353
353
  refreshMode: "debounce",
354
354
  refreshRate: 0
355
355
  }), [a, i] = R(!1), c = () => a ? !e : !0;
@@ -359,7 +359,7 @@ const jn = "_headerContainer_1cubo_1", xn = "_navigationTabList_1cubo_8", On = "
359
359
  };
360
360
  return window.addEventListener("scroll", u), () => window.removeEventListener("scroll", u);
361
361
  }, []);
362
- const d = `${r || Un}px`;
362
+ const d = `${o || Un}px`;
363
363
  return /* @__PURE__ */ s("div", { style: { minHeight: d }, children: /* @__PURE__ */ s("div", { children: /* @__PURE__ */ h(
364
364
  "div",
365
365
  {
@@ -381,7 +381,7 @@ const qn = "_sidebarContainer_bmdti_1", Hn = {
381
381
  sidebarContainer: qn
382
382
  }, Bn = "_logoLink_1baxb_1", Dn = {
383
383
  logoLink: Bn
384
- }, $n = ({ src: e, href: t = "/", ariaLabel: n = "Home", alt: r = "Lokalise" }) => /* @__PURE__ */ s("a", { className: Dn.logoLink, href: t, "aria-label": n, children: /* @__PURE__ */ s("img", { src: e, alt: r }) }), Fn = "_link_18vhx_1", zn = "_active_18vhx_18", lt = {
384
+ }, $n = ({ src: e, href: t = "/", ariaLabel: n = "Home", alt: o = "Lokalise" }) => /* @__PURE__ */ s("a", { className: Dn.logoLink, href: t, "aria-label": n, children: /* @__PURE__ */ s("img", { src: e, alt: o }) }), Fn = "_link_18vhx_1", zn = "_active_18vhx_18", lt = {
385
385
  link: Fn,
386
386
  active: zn
387
387
  }, Gn = ({ label: e, to: t, icon: n }) => /* @__PURE__ */ s(H, { placement: "right", tooltip: e, children: /* @__PURE__ */ s(
@@ -411,14 +411,14 @@ const qn = "_sidebarContainer_bmdti_1", Hn = {
411
411
  ) }),
412
412
  children: /* @__PURE__ */ s(se, { placement: "right-start", children: e })
413
413
  }
414
- ), Qn = "_iconContainer_nz34m_1", Yn = {
414
+ ), Qn = "_iconContainer_nz34m_1", Xn = {
415
415
  iconContainer: Qn
416
416
  }, Mt = ({ className: e = "" }) => /* @__PURE__ */ s(
417
417
  "div",
418
418
  {
419
419
  "aria-label": "Upgrade Icon",
420
420
  className: N(
421
- Yn.iconContainer,
421
+ Xn.iconContainer,
422
422
  "flex-row",
423
423
  "items-center",
424
424
  "justify-center",
@@ -426,18 +426,18 @@ const qn = "_sidebarContainer_bmdti_1", Hn = {
426
426
  ),
427
427
  children: /* @__PURE__ */ s(nn, {})
428
428
  }
429
- ), Vn = "_menuContainer_ywskt_5", Xn = "_profileButton_ywskt_15", Zn = "_profileImage_ywskt_28", er = "_profileImageHighlight_ywskt_36", tr = "_profileImageUpgradeIcon_ywskt_40", nr = "_userIconWrapper_ywskt_46", x = {
430
- menuContainer: Vn,
431
- profileButton: Xn,
429
+ ), Yn = "_menuContainer_ywskt_5", Vn = "_profileButton_ywskt_15", Zn = "_profileImage_ywskt_28", er = "_profileImageHighlight_ywskt_36", tr = "_profileImageUpgradeIcon_ywskt_40", nr = "_userIconWrapper_ywskt_46", x = {
430
+ menuContainer: Yn,
431
+ profileButton: Vn,
432
432
  profileImage: Zn,
433
433
  profileImageHighlight: er,
434
434
  profileImageUpgradeIcon: tr,
435
435
  userIconWrapper: nr
436
- }, Ut = Ct({}), Y = () => Et(Ut), rr = ({ children: e }) => {
436
+ }, Ut = Ct({}), X = () => wt(Ut), rr = ({ children: e }) => {
437
437
  const {
438
438
  currentTeam: t,
439
439
  otherTeams: n,
440
- showUpgradeCta: r,
440
+ showUpgradeCta: o,
441
441
  showBillingButton: a,
442
442
  allowTeamCreation: i,
443
443
  isProviderAlpha: c,
@@ -445,7 +445,7 @@ const qn = "_sidebarContainer_bmdti_1", Hn = {
445
445
  isEndOfTrialActive: u,
446
446
  isTeamSuspended: l,
447
447
  isFullyAuthenticated: m
448
- } = Y();
448
+ } = X();
449
449
  return /* @__PURE__ */ s(
450
450
  ae,
451
451
  {
@@ -455,7 +455,7 @@ const qn = "_sidebarContainer_bmdti_1", Hn = {
455
455
  {
456
456
  src: t.logoUrl,
457
457
  className: N(x.profileImage, {
458
- [x.profileImageHighlight]: r
458
+ [x.profileImageHighlight]: o
459
459
  }),
460
460
  alt: "Team Logo"
461
461
  }
@@ -463,12 +463,12 @@ const qn = "_sidebarContainer_bmdti_1", Hn = {
463
463
  "div",
464
464
  {
465
465
  className: N(x.userIconWrapper, "flex-row", "align-center", "items-center", {
466
- [x.profileImageHighlight]: r
466
+ [x.profileImageHighlight]: o
467
467
  }),
468
- children: /* @__PURE__ */ s(Pt, { size: "25px" })
468
+ children: /* @__PURE__ */ s(It, { size: "25px" })
469
469
  }
470
470
  ),
471
- r && /* @__PURE__ */ s(Mt, { className: x.profileImageUpgradeIcon })
471
+ o && /* @__PURE__ */ s(Mt, { className: x.profileImageUpgradeIcon })
472
472
  ] }),
473
473
  children: /* @__PURE__ */ s(se, { placement: "right-end", className: x.menuContainer, children: e({
474
474
  allowTeamCreation: i,
@@ -482,18 +482,18 @@ const qn = "_sidebarContainer_bmdti_1", Hn = {
482
482
  }) })
483
483
  }
484
484
  );
485
- }, qt = 0, or = 9999, ar = [150, 151, 250, 251], sr = [152, 153, 252, 253], ir = [154, 155, 157, 158, 254, 255, 258, 354, 355, 358], cr = [156, 159, 160, 256, 259, 260], Ht = 9998, Be = (e) => e === qt, Bt = (e) => e === or, Aa = (e) => ar.includes(e), Ra = (e) => sr.includes(e), Na = (e) => ir.includes(e), ja = (e) => cr.includes(e), xa = (e) => e > qt && e < Ht, Oa = (e) => e === Ht, lr = /\n/, ut = (e, t, n) => e.split(t).flatMap((r, a) => a !== 0 ? [en(n, { key: Math.random().toString(32).slice(0, 10) }), r] : r), dr = (e, t, n) => typeof e == "string" ? ut(e, t, n) : e.flatMap((r) => typeof r == "string" ? ut(r, t, n) : r), ur = (e) => dr(e, lr, /* @__PURE__ */ s("br", {})), mr = /(\b(https?|):\/\/[-a-zA-Zа-яА-Я0-9+&@#/%?=~_|!:,.;]*[-a-zA-Zа-яА-Я0-9+&@#/%=~_|])/gi, fr = (e) => e.match(mr) ?? [], mt = (e, t, n) => {
486
- const r = e.split(t);
487
- if (r.length === 1)
485
+ }, qt = 0, or = 9999, ar = [150, 151, 250, 251], sr = [152, 153, 252, 253], ir = [154, 155, 157, 158, 254, 255, 258, 354, 355, 358], cr = [156, 159, 160, 256, 259, 260], Ht = 9998, Be = (e) => e === qt, Bt = (e) => e === or, Ra = (e) => ar.includes(e), Na = (e) => sr.includes(e), ja = (e) => ir.includes(e), xa = (e) => cr.includes(e), Oa = (e) => e > qt && e < Ht, La = (e) => e === Ht, lr = /\n/, ut = (e, t, n) => e.split(t).flatMap((o, a) => a !== 0 ? [en(n, { key: Math.random().toString(32).slice(0, 10) }), o] : o), dr = (e, t, n) => typeof e == "string" ? ut(e, t, n) : e.flatMap((o) => typeof o == "string" ? ut(o, t, n) : o), ur = (e) => dr(e, lr, /* @__PURE__ */ s("br", {})), mr = /(\b(https?|):\/\/[-a-zA-Zа-яА-Я0-9+&@#/%?=~_|!:,.;]*[-a-zA-Zа-яА-Я0-9+&@#/%=~_|])/gi, fr = (e) => e.match(mr) ?? [], mt = (e, t, n) => {
486
+ const o = e.split(t);
487
+ if (o.length === 1)
488
488
  return e;
489
489
  const a = [];
490
- return r[0] !== "" && a.push(r[0]), r.shift(), r[r.length - 1] === "" && r.pop(), a.push(
490
+ return o[0] !== "" && a.push(o[0]), o.shift(), o[o.length - 1] === "" && o.pop(), a.push(
491
491
  /* @__PURE__ */ s("a", { href: t, target: "_blank", rel: "noreferrer noopener", children: t }, t + n)
492
- ), a.push(r.join(t)), a.filter((i) => i !== "");
492
+ ), a.push(o.join(t)), a.filter((i) => i !== "");
493
493
  }, ft = (e) => {
494
494
  const t = fr(e);
495
- return t != null && t.length ? t.reduce((n, r, a) => typeof n == "string" ? mt(n, r, a) : n.flatMap((i) => typeof i == "string" ? mt(i, r, a) : i), e) : e;
496
- }, _r = (e) => typeof e == "string" ? ft(e) : e.flatMap((t) => typeof t == "string" ? ft(t) : t, e), gr = (e, t = "PP") => At(e, t), La = (e, t, n = "PP") => At(un(e, t), n), De = (e) => {
495
+ return t != null && t.length ? t.reduce((n, o, a) => typeof n == "string" ? mt(n, o, a) : n.flatMap((i) => typeof i == "string" ? mt(i, o, a) : i), e) : e;
496
+ }, _r = (e) => typeof e == "string" ? ft(e) : e.flatMap((t) => typeof t == "string" ? ft(t) : t, e), gr = (e, t = "PP") => At(e, t), Ma = (e, t, n = "PP") => At(un(e, t), n), De = (e) => {
497
497
  G(e, []);
498
498
  }, _t = {
499
499
  biller: "biller",
@@ -502,7 +502,7 @@ const qn = "_sidebarContainer_bmdti_1", Hn = {
502
502
  _t.biller,
503
503
  _t.owner
504
504
  ], hr = ({ children: e, config: t }) => {
505
- const { teams: n, currentTeamId: r, planId: a, isEndOfTrialActive: i, isFullyAuthenticated: c, userTeamRole: d } = t, u = n.find((g) => g.id === r), l = n.filter((g) => g.id !== r), m = gt.includes(d), _ = gt.includes(d), T = Be(a) || Bt(a), b = {
505
+ const { teams: n, currentTeamId: o, planId: a, isEndOfTrialActive: i, isFullyAuthenticated: c, userTeamRole: d } = t, u = n.find((g) => g.id === o), l = n.filter((g) => g.id !== o), m = gt.includes(d), _ = gt.includes(d), T = Be(a) || Bt(a), b = {
506
506
  ...t,
507
507
  currentTeam: u,
508
508
  otherTeams: l,
@@ -521,9 +521,9 @@ const qn = "_sidebarContainer_bmdti_1", Hn = {
521
521
  href: e,
522
522
  onClick: t,
523
523
  userEmail: n,
524
- hideBottomDivider: r
524
+ hideBottomDivider: o
525
525
  }) => {
526
- const { isEndOfTrialActive: a, isTeamSuspended: i } = Y();
526
+ const { isEndOfTrialActive: a, isTeamSuspended: i } = X();
527
527
  return a || i ? null : /* @__PURE__ */ h(Ue, { children: [
528
528
  /* @__PURE__ */ s(
529
529
  K,
@@ -538,17 +538,17 @@ const qn = "_sidebarContainer_bmdti_1", Hn = {
538
538
  ] })
539
539
  }
540
540
  ),
541
- !r && /* @__PURE__ */ s(It, {})
541
+ !o && /* @__PURE__ */ s(Pt, {})
542
542
  ] });
543
- }, yr = "_wrapper_15d85_1", Sr = "_profileImage_15d85_14", wr = "_teamName_15d85_22", Er = "_planLabel_15d85_29", Cr = "_membership_15d85_38", kr = "_defaultProfileImage_15d85_44", M = {
543
+ }, yr = "_wrapper_15d85_1", Sr = "_profileImage_15d85_14", Er = "_teamName_15d85_22", wr = "_planLabel_15d85_29", Cr = "_membership_15d85_38", kr = "_defaultProfileImage_15d85_44", M = {
544
544
  wrapper: yr,
545
545
  profileImage: Sr,
546
- teamName: wr,
547
- planLabel: Er,
546
+ teamName: Er,
547
+ planLabel: wr,
548
548
  membership: Cr,
549
549
  defaultProfileImage: kr
550
550
  }, Dt = ({ team: e, onClick: t, hidePlanLabel: n }) => {
551
- const { currentTeam: r, planId: a } = Y(), i = e || r;
551
+ const { currentTeam: o, planId: a } = X(), i = e || o;
552
552
  if (!i)
553
553
  return null;
554
554
  const c = Be(a) ? "Free" : Bt(a) ? "Trial" : void 0;
@@ -558,7 +558,7 @@ const qn = "_sidebarContainer_bmdti_1", Hn = {
558
558
  className: `flex-row gap-2 flex-nowrap items-center ${M.wrapper}`,
559
559
  ...t && { onClick: () => t(i) },
560
560
  children: [
561
- i.logoUrl ? /* @__PURE__ */ s("img", { className: M.profileImage, src: i.logoUrl, alt: "Team Logo" }) : /* @__PURE__ */ s("span", { className: `flex-row justify-center items-center ${M.defaultProfileImage}`, children: /* @__PURE__ */ s(Pt, { size: "25px" }) }),
561
+ i.logoUrl ? /* @__PURE__ */ s("img", { className: M.profileImage, src: i.logoUrl, alt: "Team Logo" }) : /* @__PURE__ */ s("span", { className: `flex-row justify-center items-center ${M.defaultProfileImage}`, children: /* @__PURE__ */ s(It, { size: "25px" }) }),
562
562
  /* @__PURE__ */ h("div", { className: "flex-col items-start", children: [
563
563
  /* @__PURE__ */ h("div", { className: "flex-row items-center flex-nowrap gap-2", children: [
564
564
  /* @__PURE__ */ s("span", { title: i.name, className: M.teamName, children: i.name }),
@@ -569,23 +569,23 @@ const qn = "_sidebarContainer_bmdti_1", Hn = {
569
569
  ]
570
570
  }
571
571
  );
572
- }, Pr = "_teamsContainer_1t68g_1", Ir = {
573
- teamsContainer: Pr
572
+ }, Ir = "_teamsContainer_1t68g_1", Pr = {
573
+ teamsContainer: Ir
574
574
  }, Ar = ({ onSwitchTeam: e }) => {
575
- const { otherTeams: t } = Y();
576
- return t.length === 0 ? null : /* @__PURE__ */ s("div", { className: `flex-col items-stretch ${Ir.teamsContainer}`, children: t.map((n) => /* @__PURE__ */ s(Dt, { team: n, onClick: e, hidePlanLabel: !0 }, n.id)) });
577
- }, Rr = "_container_1u995_1", Nr = "_planCta_1u995_15", jr = "_upgradeIconWrapper_1u995_19", Ie = {
575
+ const { otherTeams: t } = X();
576
+ return t.length === 0 ? null : /* @__PURE__ */ s("div", { className: `flex-col items-stretch ${Pr.teamsContainer}`, children: t.map((n) => /* @__PURE__ */ s(Dt, { team: n, onClick: e, hidePlanLabel: !0 }, n.id)) });
577
+ }, Rr = "_container_1u995_1", Nr = "_planCta_1u995_15", jr = "_upgradeIconWrapper_1u995_19", Pe = {
578
578
  container: Rr,
579
579
  planCta: Nr,
580
580
  upgradeIconWrapper: jr
581
581
  }, xr = ({ upgradeOptionHref: e }) => {
582
- const { planId: t, trialDaysLeft: n, showUpgradeCta: r } = Y();
583
- if (!r)
582
+ const { planId: t, trialDaysLeft: n, showUpgradeCta: o } = X();
583
+ if (!o)
584
584
  return null;
585
585
  const c = Be(t) ? "Your team is currently on the Free plan" : `Free trial ends in ${n} ${n === 1 ? "day" : "days"}`;
586
- return /* @__PURE__ */ h(K, { href: e, className: `flex-col gap-1 items-start ${Ie.container}`, children: [
587
- /* @__PURE__ */ s("span", { className: Ie.planCta, children: c }),
588
- /* @__PURE__ */ h("div", { className: `flex-row items-center gap-1 ${Ie.upgradeIconWrapper}`, children: [
586
+ return /* @__PURE__ */ h(K, { href: e, className: `flex-col gap-1 items-start ${Pe.container}`, children: [
587
+ /* @__PURE__ */ s("span", { className: Pe.planCta, children: c }),
588
+ /* @__PURE__ */ h("div", { className: `flex-row items-center gap-1 ${Pe.upgradeIconWrapper}`, children: [
589
589
  /* @__PURE__ */ s(Mt, {}),
590
590
  /* @__PURE__ */ s("span", { children: "See upgrade options" })
591
591
  ] })
@@ -627,15 +627,15 @@ function bt(e) {
627
627
  const {
628
628
  x: t,
629
629
  y: n,
630
- width: r,
630
+ width: o,
631
631
  height: a
632
632
  } = e;
633
633
  return {
634
- width: r,
634
+ width: o,
635
635
  height: a,
636
636
  top: n,
637
637
  left: t,
638
- right: t + r,
638
+ right: t + o,
639
639
  bottom: n + a,
640
640
  x: t,
641
641
  y: n
@@ -645,7 +645,7 @@ async function Br(e, t) {
645
645
  var n;
646
646
  t === void 0 && (t = {});
647
647
  const {
648
- x: r,
648
+ x: o,
649
649
  y: a,
650
650
  platform: i,
651
651
  rects: c,
@@ -663,7 +663,7 @@ async function Br(e, t) {
663
663
  rootBoundary: m,
664
664
  strategy: u
665
665
  })), p = _ === "floating" ? {
666
- x: r,
666
+ x: o,
667
667
  y: a,
668
668
  width: c.floating.width,
669
669
  height: c.floating.height
@@ -673,17 +673,17 @@ async function Br(e, t) {
673
673
  } : {
674
674
  x: 1,
675
675
  y: 1
676
- }, E = bt(i.convertOffsetParentRelativeRectToViewportRelativeRect ? await i.convertOffsetParentRelativeRectToViewportRelativeRect({
676
+ }, w = bt(i.convertOffsetParentRelativeRectToViewportRelativeRect ? await i.convertOffsetParentRelativeRectToViewportRelativeRect({
677
677
  elements: d,
678
678
  rect: p,
679
679
  offsetParent: v,
680
680
  strategy: u
681
681
  }) : p);
682
682
  return {
683
- top: (g.top - E.top + f.top) / C.y,
684
- bottom: (E.bottom - g.bottom + f.bottom) / C.y,
685
- left: (g.left - E.left + f.left) / C.x,
686
- right: (E.right - g.right + f.right) / C.x
683
+ top: (g.top - w.top + f.top) / C.y,
684
+ bottom: (w.bottom - g.bottom + f.bottom) / C.y,
685
+ left: (g.left - w.left + f.left) / C.x,
686
+ right: (w.right - g.right + f.right) / C.x
687
687
  };
688
688
  }
689
689
  const Dr = function(e) {
@@ -693,7 +693,7 @@ const Dr = function(e) {
693
693
  async fn(t) {
694
694
  const {
695
695
  x: n,
696
- y: r,
696
+ y: o,
697
697
  placement: a
698
698
  } = t, {
699
699
  mainAxis: i = !0,
@@ -713,7 +713,7 @@ const Dr = function(e) {
713
713
  ...u
714
714
  } = $t(e, t), l = {
715
715
  x: n,
716
- y: r
716
+ y: o
717
717
  }, m = await Br(t, u), _ = Ur(Ft(a)), T = Mr(_);
718
718
  let y = l[T], f = l[_];
719
719
  if (i) {
@@ -724,16 +724,16 @@ const Dr = function(e) {
724
724
  const b = _ === "y" ? "top" : "left", g = _ === "y" ? "bottom" : "right", p = f + m[b], v = f - m[g];
725
725
  f = pt(p, f, v);
726
726
  }
727
- const w = d.fn({
727
+ const E = d.fn({
728
728
  ...t,
729
729
  [T]: y,
730
730
  [_]: f
731
731
  });
732
732
  return {
733
- ...w,
733
+ ...E,
734
734
  data: {
735
- x: w.x - n,
736
- y: w.y - r,
735
+ x: E.x - n,
736
+ y: E.y - o,
737
737
  enabled: {
738
738
  [T]: i,
739
739
  [_]: c
@@ -746,27 +746,27 @@ const Dr = function(e) {
746
746
  navItem: $r,
747
747
  activeNavItem: Fr,
748
748
  badge: zr
749
- }, zt = Ct({}), V = () => Et(zt), Gr = (e) => {
750
- const t = e.lastIndexOf("."), n = e.slice(0, t), r = e.slice(t + 1);
751
- return { name: n, extension: r };
749
+ }, zt = Ct({}), Y = () => wt(zt), Gr = (e) => {
750
+ const t = e.lastIndexOf("."), n = e.slice(0, t), o = e.slice(t + 1);
751
+ return { name: n, extension: o };
752
752
  }, Kr = (e, t) => {
753
753
  switch (e) {
754
- case P.Completed:
754
+ case I.Completed:
755
755
  return t < 100 ? "Closed" : "Completed";
756
- case P.Created:
756
+ case I.Created:
757
757
  return t > 0 ? "In progress" : "Not started";
758
- case P.InProgress:
758
+ case I.InProgress:
759
759
  return "In progress";
760
- case P.Queued:
760
+ case I.Queued:
761
761
  return "Queued";
762
- case P.NotStarted:
762
+ case I.NotStarted:
763
763
  return "Not started";
764
764
  default:
765
765
  return "-";
766
766
  }
767
767
  }, Wr = (e) => {
768
768
  const t = e.progress ?? 0;
769
- return e.status === P.Created && t > 0 ? P.InProgress : e.status;
769
+ return e.status === I.Created && t > 0 ? I.InProgress : e.status;
770
770
  }, Jr = {
771
771
  [te.translation]: "#0891B2",
772
772
  [te.review]: "#16922D",
@@ -774,13 +774,13 @@ const Dr = function(e) {
774
774
  [te.automatic_translation]: "#60A5FA"
775
775
  }, Qr = (e) => {
776
776
  const t = [
777
- P.InProgress,
778
- P.Created,
779
- P.Completed
777
+ I.InProgress,
778
+ I.Created,
779
+ I.Completed
780
780
  ];
781
- return e.filter((n) => n.status !== "queued").map((n) => ({ ...n, status: Wr(n) })).sort((n, r) => n.status === P.InProgress && n.progress === 100 ? -1 : r.status === P.InProgress && r.progress === 100 ? 1 : n.status === r.status ? n.name < r.name ? 1 : -1 : t.indexOf(n.status) - t.indexOf(r.status));
782
- }, vt = (e) => e in [xe.InProgress, xe.Created], Yr = (e, t) => vt(e.status) && vt(t.status) && (t.progress ?? 0) >= 100, Vr = ({ task: e, language: t }) => {
783
- const [n, r] = R(!1), [a, i] = R(!1), { onLanguageCompleteConfirm: c, fetchTasks: d } = V(), u = () => {
781
+ return e.filter((n) => n.status !== "queued").map((n) => ({ ...n, status: Wr(n) })).sort((n, o) => n.status === I.InProgress && n.progress === 100 ? -1 : o.status === I.InProgress && o.progress === 100 ? 1 : n.status === o.status ? n.name < o.name ? 1 : -1 : t.indexOf(n.status) - t.indexOf(o.status));
782
+ }, vt = (e) => e in [xe.InProgress, xe.Created], Xr = (e, t) => vt(e.status) && vt(t.status) && (t.progress ?? 0) >= 100, Yr = ({ task: e, language: t }) => {
783
+ const [n, o] = R(!1), [a, i] = R(!1), { onLanguageCompleteConfirm: c, fetchTasks: d } = Y(), u = () => {
784
784
  i(!1);
785
785
  };
786
786
  return /* @__PURE__ */ h(Ue, { children: [
@@ -794,7 +794,7 @@ const Dr = function(e) {
794
794
  closeText: "Cancel",
795
795
  onClose: u,
796
796
  onConfirm: async () => {
797
- r(!0), await c({ task: e, language: t, closePrompt: u }), d();
797
+ o(!0), await c({ task: e, language: t, closePrompt: u }), d();
798
798
  },
799
799
  children: /* @__PURE__ */ h(on, { status: "info", children: [
800
800
  "Make sure you are finished and ",
@@ -814,12 +814,12 @@ const Dr = function(e) {
814
814
  }
815
815
  )
816
816
  ] });
817
- }, Xr = "_langRowCompleted_vpgdi_1", Zr = "_langCellSecondary_vpgdi_15", eo = "_langStatus_vpgdi_20", Re = {
818
- langRowCompleted: Xr,
817
+ }, Vr = "_langRowCompleted_vpgdi_1", Zr = "_langCellSecondary_vpgdi_15", eo = "_langStatus_vpgdi_20", Re = {
818
+ langRowCompleted: Vr,
819
819
  langCellSecondary: Zr,
820
820
  langStatus: eo
821
821
  }, to = ({ language: e, task: t }) => {
822
- const { getProjectUrl: n, langNameOnClick: r, langProgressOnClick: a } = V(), i = e.progress ?? 0, c = e.status === P.Completed, d = Yr(t, e);
822
+ const { getProjectUrl: n, langNameOnClick: o, langProgressOnClick: a } = Y(), i = e.progress ?? 0, c = e.status === I.Completed, d = Xr(t, e);
823
823
  return /* @__PURE__ */ h(
824
824
  "tr",
825
825
  {
@@ -832,7 +832,7 @@ const Dr = function(e) {
832
832
  {
833
833
  href: n({ task: t, language: e }),
834
834
  onClick: () => {
835
- r == null || r({ task: t, language: e });
835
+ o == null || o({ task: t, language: e });
836
836
  },
837
837
  children: e.name
838
838
  }
@@ -851,7 +851,7 @@ const Dr = function(e) {
851
851
  i,
852
852
  "%"
853
853
  ] }),
854
- /* @__PURE__ */ s("td", { children: d ? /* @__PURE__ */ s(Vr, { task: t, language: e }) : /* @__PURE__ */ s(
854
+ /* @__PURE__ */ s("td", { children: d ? /* @__PURE__ */ s(Yr, { task: t, language: e }) : /* @__PURE__ */ s(
855
855
  "span",
856
856
  {
857
857
  className: `${Re.langStatus} flex-row items-center justify-start`,
@@ -869,7 +869,7 @@ const Dr = function(e) {
869
869
  languagesTable: ao,
870
870
  metadata: so
871
871
  }, io = ({ task: e }) => {
872
- const { tasks: t, getProjectUrl: n, taskTitleOnClick: r } = V(), a = Qr(e.langs), i = (c) => {
872
+ const { tasks: t, getProjectUrl: n, taskTitleOnClick: o } = Y(), a = Qr(e.langs), i = (c) => {
873
873
  c !== void 0 && window.open(
874
874
  `/style-guide/${e.team_id}/download/${c.id}/link`,
875
875
  "_blank",
@@ -913,7 +913,7 @@ const Dr = function(e) {
913
913
  {
914
914
  href: n({ task: e, view: "multi" }),
915
915
  onClick: () => {
916
- r == null || r({ task: e });
916
+ o == null || o({ task: e });
917
917
  },
918
918
  children: e.title
919
919
  }
@@ -953,9 +953,9 @@ const Dr = function(e) {
953
953
  noTasksText: mo,
954
954
  tasksContainer: fo
955
955
  }, _o = () => {
956
- const { tasks: e, onTasksWidgetOpen: t, loadingTasks: n, fetchTasks: r } = V();
957
- return De(() => (r(), t == null || t({ tasks: e }), document.addEventListener(k.TaskCompleted, r), document.addEventListener(k.TaskClosed, r), document.addEventListener(k.Refresh, r), () => {
958
- document.removeEventListener(k.TaskCompleted, r), document.removeEventListener(k.TaskClosed, r), document.removeEventListener(k.Refresh, r);
956
+ const { tasks: e, onTasksWidgetOpen: t, loadingTasks: n, fetchTasks: o } = Y();
957
+ return De(() => (o(), t == null || t({ tasks: e }), document.addEventListener(k.TaskCompleted, o), document.addEventListener(k.TaskClosed, o), document.addEventListener(k.Refresh, o), () => {
958
+ document.removeEventListener(k.TaskCompleted, o), document.removeEventListener(k.TaskClosed, o), document.removeEventListener(k.Refresh, o);
959
959
  })), n ? /* @__PURE__ */ s("div", { "data-testid": "sidebar-tasks-loading-popover", className: $.loadingContainer, children: /* @__PURE__ */ s(an, {}) }) : e.length === 0 ? /* @__PURE__ */ h("div", { "data-testid": "sidebar-no-tasks-popover", className: $.noTasksContainer, children: [
960
960
  /* @__PURE__ */ s("h3", { className: $.noTasksHeading, children: "No tasks" }),
961
961
  /* @__PURE__ */ h("div", { className: $.noTasksText, children: [
@@ -965,19 +965,19 @@ const Dr = function(e) {
965
965
  ] })
966
966
  ] }) : /* @__PURE__ */ s("div", { "data-testid": "sidebar-tasks-popover", className: $.tasksContainer, children: e.map((a) => /* @__PURE__ */ s(io, { task: a }, a.id)) });
967
967
  }, go = ({ children: e, config: t }) => {
968
- const [n, r] = R([]), [a, i] = R(!0), [c, d] = R(0), {
968
+ const [n, o] = R([]), [a, i] = R(!0), [c, d] = R(0), {
969
969
  getProjectUrl: u,
970
970
  onLanguageCompleteConfirm: l,
971
971
  onTasksWidgetOpen: m,
972
972
  langNameOnClick: _,
973
973
  langProgressOnClick: T,
974
974
  taskTitleOnClick: y
975
- } = t, { getTasks: f, getTasksCount: w } = t, b = async () => {
975
+ } = t, { getTasks: f, getTasksCount: E } = t, b = async () => {
976
976
  i(!0);
977
977
  const v = await f();
978
- r(v), i(!1);
978
+ o(v), i(!1);
979
979
  }, g = async () => {
980
- const v = await w();
980
+ const v = await E();
981
981
  d(v);
982
982
  };
983
983
  De(() => (g(), document.addEventListener(k.TaskCompleted, g), document.addEventListener(k.TaskClosed, g), document.addEventListener(k.Refresh, g), () => {
@@ -997,16 +997,16 @@ const Dr = function(e) {
997
997
  };
998
998
  return /* @__PURE__ */ s(zt.Provider, { value: p, children: e });
999
999
  }, ho = (e) => function(n) {
1000
- const { config: r, ...a } = n;
1001
- return /* @__PURE__ */ s(go, { config: r, children: /* @__PURE__ */ s(e, { ...a }) });
1000
+ const { config: o, ...a } = n;
1001
+ return /* @__PURE__ */ s(go, { config: o, children: /* @__PURE__ */ s(e, { ...a }) });
1002
1002
  }, po = ho(() => {
1003
- const [e, t] = R(!1), { tasksCount: n } = V();
1003
+ const [e, t] = R(!1), { tasksCount: n } = Y();
1004
1004
  return De(() => {
1005
- const r = () => {
1005
+ const o = () => {
1006
1006
  t(!0);
1007
1007
  };
1008
- return document.addEventListener(k.ShowDialog, r), () => {
1009
- document.removeEventListener(k.ShowDialog, r);
1008
+ return document.addEventListener(k.ShowDialog, o), () => {
1009
+ document.removeEventListener(k.ShowDialog, o);
1010
1010
  };
1011
1011
  }), /* @__PURE__ */ s(H, { tooltip: "Tasks", placement: "right", children: /* @__PURE__ */ s(
1012
1012
  sn,
@@ -1025,14 +1025,14 @@ const Dr = function(e) {
1025
1025
  }
1026
1026
  })
1027
1027
  ],
1028
- children: (r) => /* @__PURE__ */ h(
1028
+ children: (o) => /* @__PURE__ */ h(
1029
1029
  je,
1030
1030
  {
1031
1031
  type: "button",
1032
1032
  "data-testid": "sidebar-tasks-widget-button",
1033
1033
  "aria-label": "Tasks",
1034
1034
  className: N(Ae.navItem, {
1035
- [Ae.activeNavItem]: r
1035
+ [Ae.activeNavItem]: o
1036
1036
  }),
1037
1037
  children: [
1038
1038
  /* @__PURE__ */ s(cn, { size: "25px" }),
@@ -1042,35 +1042,35 @@ const Dr = function(e) {
1042
1042
  )
1043
1043
  }
1044
1044
  ) });
1045
- }), I = ({ children: e, ...t }) => /* @__PURE__ */ s("nav", { ...t, className: Hn.sidebarContainer, children: e }), bo = ({ children: e }) => /* @__PURE__ */ s("div", { children: e });
1046
- I.Top = bo;
1045
+ }), P = ({ children: e, ...t }) => /* @__PURE__ */ s("nav", { ...t, className: Hn.sidebarContainer, children: e }), bo = ({ children: e }) => /* @__PURE__ */ s("div", { children: e });
1046
+ P.Top = bo;
1047
1047
  const vo = ({ children: e }) => /* @__PURE__ */ s("div", { children: e });
1048
- I.Bottom = vo;
1049
- I.Avatar = $n;
1050
- I.IconLink = Gn;
1051
- I.Menu = Jn;
1052
- I.ProfileMenu = pr;
1053
- I.TeamSwitch = Ar;
1054
- I.TeamMenuItem = Dt;
1055
- I.UpgradeMenuItem = xr;
1056
- I.ProfileSettingsMenuItem = Tr;
1057
- I.Tasks = po;
1048
+ P.Bottom = vo;
1049
+ P.Avatar = $n;
1050
+ P.IconLink = Gn;
1051
+ P.Menu = Jn;
1052
+ P.ProfileMenu = pr;
1053
+ P.TeamSwitch = Ar;
1054
+ P.TeamMenuItem = Dt;
1055
+ P.UpgradeMenuItem = xr;
1056
+ P.ProfileSettingsMenuItem = Tr;
1057
+ P.Tasks = po;
1058
1058
  const To = "_breadcrumbsItem_1hm6a_1", yo = "_breadcrumbs_1hm6a_1", Tt = {
1059
1059
  breadcrumbsItem: To,
1060
1060
  breadcrumbs: yo
1061
- }, Ma = ({ items: e }) => /* @__PURE__ */ s("nav", { "aria-label": "breadcrumb", className: Tt.breadcrumbs, children: e.map((t, n) => /* @__PURE__ */ h(kt, { children: [
1061
+ }, Ua = ({ items: e }) => /* @__PURE__ */ s("nav", { "aria-label": "breadcrumb", className: Tt.breadcrumbs, children: e.map((t, n) => /* @__PURE__ */ h(kt, { children: [
1062
1062
  /* @__PURE__ */ s(L, { className: Tt.breadcrumbsItem, href: t.link, rel: "noreferrer", children: t.name }),
1063
1063
  n < e.length - 1 && /* @__PURE__ */ s("span", { children: " — " })
1064
1064
  ] }, `${t.link}-${t.name}`)) }), So = ({ items: e }) => /* @__PURE__ */ s(Ue, { children: e.map((t, n) => /* @__PURE__ */ h(kt, { children: [
1065
- !!n && t.some((r) => r.visible) && /* @__PURE__ */ s(It, {}),
1066
- t.filter(({ visible: r }) => r).map(({ link: r, label: a, onClick: i }) => /* @__PURE__ */ s(K, { href: r || "#", "aria-label": a, onClick: i, children: a }, a))
1067
- ] }, t[0].label)) }), wo = "_badge_1pc1v_1", Eo = "_tag_1pc1v_15", Co = "_withNavLinkStyle_1pc1v_42 _withLinkStyle_1pc1v_21", ko = "_disabled_1pc1v_57", Po = "_projectNavigationItem_1pc1v_61", Io = "_projectNavigationItemDisabled_1pc1v_67", O = {
1068
- badge: wo,
1069
- tag: Eo,
1065
+ !!n && t.some((o) => o.visible) && /* @__PURE__ */ s(Pt, {}),
1066
+ t.filter(({ visible: o }) => o).map(({ link: o, label: a, onClick: i }) => /* @__PURE__ */ s(K, { href: o || "#", "aria-label": a, onClick: i, children: a }, a))
1067
+ ] }, t[0].label)) }), Eo = "_badge_1pc1v_1", wo = "_tag_1pc1v_15", Co = "_withNavLinkStyle_1pc1v_42 _withLinkStyle_1pc1v_21", ko = "_disabled_1pc1v_57", Io = "_projectNavigationItem_1pc1v_61", Po = "_projectNavigationItemDisabled_1pc1v_67", O = {
1068
+ badge: Eo,
1069
+ tag: wo,
1070
1070
  withNavLinkStyle: Co,
1071
1071
  disabled: ko,
1072
- projectNavigationItem: Po,
1073
- projectNavigationItemDisabled: Io
1072
+ projectNavigationItem: Io,
1073
+ projectNavigationItemDisabled: Po
1074
1074
  }, yt = ({ label: e, badge: t, novel: n }) => /* @__PURE__ */ h("div", { className: "flex gap-1", children: [
1075
1075
  /* @__PURE__ */ h("div", { children: [
1076
1076
  /* @__PURE__ */ s("span", { children: e }),
@@ -1078,7 +1078,7 @@ const To = "_breadcrumbsItem_1hm6a_1", yo = "_breadcrumbs_1hm6a_1", Tt = {
1078
1078
  ] }),
1079
1079
  !!n && /* @__PURE__ */ s(Ne, { className: O.tag, children: n })
1080
1080
  ] }), Oe = tn(
1081
- ({ label: e, href: t = "", disabled: n = !1, badge: r, onClick: a, novel: i }, c) => /* @__PURE__ */ s(H, { tooltip: "You do not have access to this function", show: n, children: /* @__PURE__ */ s(
1081
+ ({ label: e, href: t = "", disabled: n = !1, badge: o, onClick: a, novel: i }, c) => /* @__PURE__ */ s(H, { tooltip: "You do not have access to this function", show: n, children: /* @__PURE__ */ s(
1082
1082
  "div",
1083
1083
  {
1084
1084
  className: n ? O.projectNavigationItemDisabled : O.projectNavigationItem,
@@ -1092,21 +1092,21 @@ const To = "_breadcrumbsItem_1hm6a_1", yo = "_breadcrumbs_1hm6a_1", Tt = {
1092
1092
  }),
1093
1093
  disabled: n,
1094
1094
  onClick: a,
1095
- children: /* @__PURE__ */ s(yt, { label: e, badge: r, novel: i })
1095
+ children: /* @__PURE__ */ s(yt, { label: e, badge: o, novel: i })
1096
1096
  }
1097
- ) : /* @__PURE__ */ s("a", { href: t, className: O.withNavLinkStyle, children: /* @__PURE__ */ s(yt, { label: e, badge: r, novel: i }) })
1097
+ ) : /* @__PURE__ */ s("a", { href: t, className: O.withNavLinkStyle, children: /* @__PURE__ */ s(yt, { label: e, badge: o, novel: i }) })
1098
1098
  }
1099
1099
  ) })
1100
1100
  );
1101
1101
  Oe.displayName = "NavigationTabsItem";
1102
- const Ao = (e) => (e == null ? void 0 : e.some((t) => t.some((n) => n.visible))) ?? !1, Ro = (e) => e.visible && (!e.dropdown || Ao(e.dropdown)), Ua = ({ navigation: e, activeItem: t }) => /* @__PURE__ */ s("nav", { "aria-label": "Project", children: /* @__PURE__ */ s("ul", { className: q.navigationTabList, "aria-orientation": "horizontal", children: e.filter(Ro).map((n) => {
1103
- var r, a, i;
1102
+ const Ao = (e) => (e == null ? void 0 : e.some((t) => t.some((n) => n.visible))) ?? !1, Ro = (e) => e.visible && (!e.dropdown || Ao(e.dropdown)), qa = ({ navigation: e, activeItem: t }) => /* @__PURE__ */ s("nav", { "aria-label": "Project", children: /* @__PURE__ */ s("ul", { className: q.navigationTabList, "aria-orientation": "horizontal", children: e.filter(Ro).map((n) => {
1103
+ var o, a, i;
1104
1104
  return n.dropdown ? /* @__PURE__ */ s(
1105
1105
  "li",
1106
1106
  {
1107
1107
  className: q.navigationTab,
1108
1108
  "data-testid": n.key,
1109
- "aria-selected": (r = n.isActive) == null ? void 0 : r.call(n, t),
1109
+ "aria-selected": (o = n.isActive) == null ? void 0 : o.call(n, t),
1110
1110
  children: /* @__PURE__ */ s(
1111
1111
  ae,
1112
1112
  {
@@ -1274,7 +1274,7 @@ class A {
1274
1274
  * console.log(headers) // { 'Content-Type': 'application/json' }
1275
1275
  */
1276
1276
  async resolve() {
1277
- const t = this.factories.map((r) => r()), n = await Promise.all(t);
1277
+ const t = this.factories.map((o) => o()), n = await Promise.all(t);
1278
1278
  return Object.assign({}, ...n);
1279
1279
  }
1280
1280
  }
@@ -1288,28 +1288,28 @@ class No {
1288
1288
  apply(t) {
1289
1289
  return t.from(async () => {
1290
1290
  const n = this.middleware(A.create());
1291
- return n instanceof Promise ? n.then((r) => r.resolve()) : n.resolve();
1291
+ return n instanceof Promise ? n.then((o) => o.resolve()) : n.resolve();
1292
1292
  });
1293
1293
  }
1294
1294
  }
1295
- const Kt = o.union([
1296
- o.literal("owner"),
1297
- o.literal("admin"),
1298
- o.literal("biller"),
1299
- o.literal("member")
1300
- ]), jo = o.object({
1301
- userId: o.number(),
1302
- userUuid: o.string(),
1303
- teamId: o.number(),
1295
+ const Kt = r.union([
1296
+ r.literal("owner"),
1297
+ r.literal("admin"),
1298
+ r.literal("biller"),
1299
+ r.literal("member")
1300
+ ]), jo = r.object({
1301
+ userId: r.number(),
1302
+ userUuid: r.string(),
1303
+ teamId: r.number(),
1304
1304
  userTeamRole: Kt,
1305
- userEmail: o.string().email(),
1306
- userName: o.string(),
1307
- userCurrentTeamId: o.number(),
1308
- planId: o.number(),
1309
- planName: o.string(),
1310
- isProviderAlpha: o.boolean(),
1311
- isFullyAuthenticated: o.boolean(),
1312
- exp: o.number()
1305
+ userEmail: r.string().email(),
1306
+ userName: r.string(),
1307
+ userCurrentTeamId: r.number(),
1308
+ planId: r.number(),
1309
+ planName: r.string(),
1310
+ isProviderAlpha: r.boolean(),
1311
+ isFullyAuthenticated: r.boolean(),
1312
+ exp: r.number()
1313
1313
  });
1314
1314
  function ie(e) {
1315
1315
  try {
@@ -1326,14 +1326,14 @@ class Le extends Error {
1326
1326
  ee(this, "status", 401);
1327
1327
  }
1328
1328
  }
1329
- function qa(e) {
1329
+ function Ha(e) {
1330
1330
  return Gt(async (t) => {
1331
1331
  var i, c;
1332
1332
  const n = e.getCurrentToken() ?? await ((i = e.generateNewToken) == null ? void 0 : i.call(e));
1333
1333
  if (!n)
1334
1334
  throw new Le();
1335
- const { exp: r } = ie(n.accessToken) ?? { exp: 0 };
1336
- if (!dn(new Date(r)))
1335
+ const { exp: o } = ie(n.accessToken) ?? { exp: 0 };
1336
+ if (!dn(new Date(o)))
1337
1337
  return t.add("Authorization", `Bearer ${n.accessToken}`);
1338
1338
  const a = await e.refreshToken(n);
1339
1339
  if (!a)
@@ -1341,7 +1341,7 @@ function qa(e) {
1341
1341
  return (c = e.onNewTokenIssued) == null || c.call(e, a), t.add("Authorization", `Bearer ${a.accessToken}`);
1342
1342
  });
1343
1343
  }
1344
- const Ha = Gt(
1344
+ const Ba = Gt(
1345
1345
  (e) => e.and({ "x-lokalise-plugin": "true" })
1346
1346
  );
1347
1347
  function Wt() {
@@ -1352,10 +1352,10 @@ function xo() {
1352
1352
  return Me(document.cookie, "csrf_token") ?? null;
1353
1353
  }
1354
1354
  function Me(e, t) {
1355
- var n, r;
1356
- return (r = (n = e.split(";").find((a) => a.trim().startsWith(`${t}=`))) == null ? void 0 : n.trim()) == null ? void 0 : r.substring(t.length + 1);
1355
+ var n, o;
1356
+ return (o = (n = e.split(";").find((a) => a.trim().startsWith(`${t}=`))) == null ? void 0 : n.trim()) == null ? void 0 : o.substring(t.length + 1);
1357
1357
  }
1358
- function Ba() {
1358
+ function Da() {
1359
1359
  const e = Wt();
1360
1360
  if (!e)
1361
1361
  return;
@@ -1363,53 +1363,65 @@ function Ba() {
1363
1363
  if (t)
1364
1364
  return { ...e, payload: t };
1365
1365
  }
1366
- const Jt = o.object({
1367
- Authorization: o.string()
1368
- }), Oo = o.object({
1369
- "X-API-Token": o.string()
1370
- }), Lo = o.union([
1366
+ const Jt = r.union([
1367
+ r.object({ Authorization: r.string() }),
1368
+ r.object({ authorization: r.string() }),
1369
+ r.object({ AUTHORIZATION: r.string() })
1370
+ ]), Oo = r.union([
1371
+ r.object({ "X-API-Token": r.string() }),
1372
+ r.object({ "X-Api-Token": r.string() }),
1373
+ r.object({ "x-api-token": r.string() }),
1374
+ r.object({ "X-API-TOKEN": r.string() })
1375
+ ]), Lo = r.union([
1371
1376
  Jt,
1372
1377
  Oo
1373
- ]), Mo = o.object({
1374
- "X-Lokalise-Plugin": o.string()
1375
- }), ce = Lo.and(Mo), Uo = o.object({
1376
- accessToken: o.string(),
1377
- refreshToken: o.string()
1378
- }), qo = o.union([
1378
+ ]), Mo = r.union([
1379
+ r.object({ "X-Lokalise-Plugin": r.string() }),
1380
+ r.object({ "x-lokalise-plugin": r.string() }),
1381
+ r.object({ "X-LOKALISE-PLUGIN": r.string() })
1382
+ ]), ce = Lo.and(Mo), Uo = r.object({
1383
+ accessToken: r.string(),
1384
+ refreshToken: r.string()
1385
+ }), qo = r.union([
1386
+ r.object({ "X-Csrf-Token": r.string() }),
1387
+ r.object({ "X-CSRF-Token": r.string() }),
1388
+ r.object({ "x-csrf-token": r.string() }),
1389
+ r.object({ "X-CSRF-TOKEN": r.string() })
1390
+ ]), Ho = r.union([
1379
1391
  Jt,
1380
- o.object({ "x-csrf-token": o.string() })
1392
+ qo
1381
1393
  ]), $e = qe({
1382
1394
  description: "Takes a teamId and returns a JWT token access and refresh token for the user",
1383
1395
  method: "post",
1384
- requestPathParamsSchema: o.object({ teamId: o.number() }),
1396
+ requestPathParamsSchema: r.object({ teamId: r.number() }),
1385
1397
  pathResolver: (e) => `/team/${e.teamId}/actions/get-user-token`,
1386
- requestHeaderSchema: qo,
1387
- requestBodySchema: o.undefined(),
1398
+ requestHeaderSchema: Ho,
1399
+ requestBodySchema: r.undefined(),
1388
1400
  isEmptyResponseExpected: !0,
1389
1401
  successResponseBodySchema: Uo
1390
1402
  });
1391
- function Da(e, t, n) {
1403
+ function $a(e, t, n) {
1392
1404
  return async () => {
1393
- const r = t();
1394
- if (!r)
1405
+ const o = t();
1406
+ if (!o)
1395
1407
  throw new Le();
1396
1408
  return W(e, $e, {
1397
1409
  pathParams: { teamId: Number(await n()) },
1398
- headers: await A.create().add("x-csrf-token", r).resolve()
1410
+ headers: await A.create().add("x-csrf-token", o).resolve()
1399
1411
  });
1400
1412
  };
1401
1413
  }
1402
- function $a(e, t) {
1414
+ function Fa(e, t) {
1403
1415
  return async ({ refreshToken: n }) => W(e, $e, {
1404
1416
  pathParams: { teamId: Number(await t()) },
1405
1417
  headers: await A.create().add("Authorization", `Bearer ${n}`).resolve()
1406
1418
  });
1407
1419
  }
1408
- const Ho = {
1420
+ const Bo = {
1409
1421
  teamKey: (e) => ["getUserToken", e]
1410
- }, Bo = (e, t, n) => B({
1422
+ }, Do = (e, t, n) => B({
1411
1423
  ...n,
1412
- queryFn: async ({ queryKey: [r, a] }) => W(e, $e, {
1424
+ queryFn: async ({ queryKey: [o, a] }) => W(e, $e, {
1413
1425
  headers: await t.resolve(),
1414
1426
  pathParams: { teamId: a }
1415
1427
  })
@@ -1422,11 +1434,11 @@ const Ho = {
1422
1434
  };
1423
1435
  ee(oe, "eventName", "new-jwt-issued");
1424
1436
  let z = oe;
1425
- function Fa(e, t, n) {
1426
- const r = xo(), a = Bo(e, t.add("x-csrf-token", r ?? ""), {
1427
- queryKey: Ho.teamKey(n),
1428
- enabled: r !== void 0
1429
- }), i = wt();
1437
+ function za(e, t, n) {
1438
+ const o = xo(), a = Do(e, t.add("x-csrf-token", o ?? ""), {
1439
+ queryKey: Bo.teamKey(n),
1440
+ enabled: o !== void 0
1441
+ }), i = Et();
1430
1442
  return G(() => {
1431
1443
  a.data && a.data.accessToken !== i.current && (window.dispatchEvent(new z(a.data)), i.current = a.data.accessToken);
1432
1444
  }, [a.data]), a;
@@ -1436,245 +1448,245 @@ function Qt() {
1436
1448
  return G(() => {
1437
1449
  const n = (a) => {
1438
1450
  t(a.detail.payload);
1439
- }, r = Wt();
1440
- return t(r ? ie(r.accessToken) : void 0), window.addEventListener(z.eventName, n), () => {
1451
+ }, o = Wt();
1452
+ return t(o ? ie(o.accessToken) : void 0), window.addEventListener(z.eventName, n), () => {
1441
1453
  window.removeEventListener(z.eventName, n);
1442
1454
  };
1443
1455
  }, []), e;
1444
1456
  }
1445
- const Do = ce, $o = o.object({
1446
- user_id: o.number(),
1447
- email: o.string().email(),
1448
- fullname: o.string(),
1449
- created_at: o.string(),
1450
- created_at_timestamp: o.number(),
1457
+ const $o = ce, Fo = r.object({
1458
+ user_id: r.number(),
1459
+ email: r.string().email(),
1460
+ fullname: r.string(),
1461
+ created_at: r.string(),
1462
+ created_at_timestamp: r.number(),
1451
1463
  role: Kt
1452
- }), Fo = o.object({
1453
- team_id: o.number(),
1454
- team_user: $o
1455
- }), zo = Q({
1464
+ }), zo = r.object({
1465
+ team_id: r.number(),
1466
+ team_user: Fo
1467
+ }), Go = Q({
1456
1468
  description: "Get the details of a team user",
1457
- requestHeaderSchema: Do,
1458
- requestPathParamsSchema: o.object({ teamId: o.number(), userId: o.number() }),
1469
+ requestHeaderSchema: $o,
1470
+ requestPathParamsSchema: r.object({ teamId: r.number(), userId: r.number() }),
1459
1471
  pathResolver: ({ teamId: e, userId: t }) => `/teams/${e}/users/${t}`,
1460
- successResponseBodySchema: Fo
1461
- }), Go = {
1472
+ successResponseBodySchema: zo
1473
+ }), Ko = {
1462
1474
  teamUserKey: (e, t) => ["GetTeamUsers", e, t]
1463
- }, Ko = (e, t, n) => B({
1475
+ }, Wo = (e, t, n) => B({
1464
1476
  ...n,
1465
- queryFn: async ({ queryKey: [r, a, i] }) => J(e, zo, {
1477
+ queryFn: async ({ queryKey: [o, a, i] }) => J(e, Go, {
1466
1478
  headers: await t.resolve(),
1467
1479
  pathParams: { teamId: a, userId: i }
1468
1480
  })
1469
1481
  });
1470
- function za(e, t) {
1482
+ function Ga(e, t) {
1471
1483
  const n = Qt();
1472
- return Ko(e, t, {
1473
- queryKey: Go.teamUserKey((n == null ? void 0 : n.teamId) ?? 0, (n == null ? void 0 : n.userId) ?? 0),
1484
+ return Wo(e, t, {
1485
+ queryKey: Ko.teamUserKey((n == null ? void 0 : n.teamId) ?? 0, (n == null ? void 0 : n.userId) ?? 0),
1474
1486
  enabled: (n == null ? void 0 : n.userId) !== void 0 && n.teamId !== void 0
1475
1487
  });
1476
1488
  }
1477
- const Wo = o.object({
1478
- lang_id: o.number(),
1479
- lang_iso: o.string(),
1480
- lang_name: o.string(),
1481
- is_writable: o.union([o.literal(0), o.literal(1)])
1482
- }), Jo = o.object({
1483
- user_id: o.number(),
1484
- email: o.string().email(),
1485
- fullname: o.string(),
1486
- created_at: o.string(),
1487
- created_at_timestamp: o.number(),
1488
- admin_rights: o.array(o.string()),
1489
- languages: o.array(Wo),
1490
- is_admin: o.boolean(),
1491
- is_reviewer: o.boolean()
1492
- }), Qo = o.object({
1493
- project_id: o.string(),
1494
- contributors: o.array(Jo)
1489
+ const Jo = r.object({
1490
+ lang_id: r.number(),
1491
+ lang_iso: r.string(),
1492
+ lang_name: r.string(),
1493
+ is_writable: r.union([r.literal(0), r.literal(1)])
1494
+ }), Qo = r.object({
1495
+ user_id: r.number(),
1496
+ email: r.string().email(),
1497
+ fullname: r.string(),
1498
+ created_at: r.string(),
1499
+ created_at_timestamp: r.number(),
1500
+ admin_rights: r.array(r.string()),
1501
+ languages: r.array(Jo),
1502
+ is_admin: r.boolean(),
1503
+ is_reviewer: r.boolean()
1504
+ }), Xo = r.object({
1505
+ project_id: r.string(),
1506
+ contributors: r.array(Qo)
1495
1507
  }), Yo = Q({
1496
1508
  description: "Get the details of a project contributor",
1497
1509
  requestHeaderSchema: ce,
1498
- requestPathParamsSchema: o.object({ projectId: o.string(), contributorId: o.number() }),
1510
+ requestPathParamsSchema: r.object({ projectId: r.string(), contributorId: r.number() }),
1499
1511
  pathResolver: ({ projectId: e, contributorId: t }) => `/projects/${e}/contributors/${t}`,
1500
- successResponseBodySchema: Qo
1512
+ successResponseBodySchema: Xo
1501
1513
  }), Vo = {
1502
1514
  projectUserKey: (e, t) => ["RetrieveContributor", e, t]
1503
- }, Xo = (e, t, n) => B({
1515
+ }, Zo = (e, t, n) => B({
1504
1516
  ...n,
1505
- queryFn: async ({ queryKey: [r, a, i] }) => J(e, Yo, {
1517
+ queryFn: async ({ queryKey: [o, a, i] }) => J(e, Yo, {
1506
1518
  pathParams: { projectId: a, contributorId: i },
1507
1519
  headers: await t.resolve()
1508
1520
  })
1509
1521
  });
1510
- function Ga(e, t, n) {
1511
- const r = Qt();
1512
- return Xo(e, t, {
1513
- queryKey: Vo.projectUserKey(n, (r == null ? void 0 : r.userId) ?? 0),
1514
- enabled: r !== void 0
1522
+ function Ka(e, t, n) {
1523
+ const o = Qt();
1524
+ return Zo(e, t, {
1525
+ queryKey: Vo.projectUserKey(n, (o == null ? void 0 : o.userId) ?? 0),
1526
+ enabled: o !== void 0
1515
1527
  });
1516
1528
  }
1517
- const Zo = o.object({
1518
- lang_iso: o.string(),
1519
- custom_iso: o.string().optional()
1520
- }), ea = o.object({
1521
- language_id: o.number(),
1522
- language_iso: o.string(),
1523
- progress: o.number(),
1524
- words_to_do: o.number()
1525
- }), ta = o.object({
1526
- projectId: o.string()
1527
- }), na = o.object({
1528
- lang_id: o.number(),
1529
- lang_iso: o.string(),
1530
- lang_name: o.string(),
1531
- is_rtl: o.boolean(),
1532
- plural_forms: o.array(o.string().optional())
1533
- }), ra = o.object({
1534
- project_id: o.string(),
1535
- project_uuid: o.string().uuid(),
1536
- languages: o.array(na)
1537
- }), oa = Q({
1529
+ const ea = r.object({
1530
+ lang_iso: r.string(),
1531
+ custom_iso: r.string().optional()
1532
+ }), ta = r.object({
1533
+ language_id: r.number(),
1534
+ language_iso: r.string(),
1535
+ progress: r.number(),
1536
+ words_to_do: r.number()
1537
+ }), na = r.object({
1538
+ projectId: r.string()
1539
+ }), ra = r.object({
1540
+ lang_id: r.number(),
1541
+ lang_iso: r.string(),
1542
+ lang_name: r.string(),
1543
+ is_rtl: r.boolean(),
1544
+ plural_forms: r.array(r.string().optional())
1545
+ }), oa = r.object({
1546
+ project_id: r.string(),
1547
+ project_uuid: r.string().uuid(),
1548
+ languages: r.array(ra)
1549
+ }), aa = Q({
1538
1550
  description: "List of project languages",
1539
1551
  requestHeaderSchema: ce,
1540
- requestPathParamsSchema: ta,
1552
+ requestPathParamsSchema: na,
1541
1553
  pathResolver: ({ projectId: e }) => `/projects/${e}/languages`,
1542
- successResponseBodySchema: ra
1543
- }), le = ce, Fe = o.union([
1544
- o.literal("localization_files"),
1545
- o.literal("paged_documents"),
1546
- o.literal("marketing")
1547
- ]), aa = o.object({
1548
- per_platform_key_names: o.boolean(),
1549
- reviewing: o.boolean(),
1550
- auto_toggle_unverified: o.boolean(),
1551
- offline_translation: o.boolean(),
1552
- key_editing: o.boolean(),
1553
- inline_machine_translations: o.boolean(),
1554
- custom_translation_statuses: o.boolean(),
1555
- custom_translation_statuses_allow_multiple: o.boolean(),
1556
- segmentation: o.boolean(),
1557
- contributor_preview_download_enabled: o.boolean()
1558
- }), sa = o.object({
1559
- not_reviewed: o.number(),
1560
- unverified: o.number(),
1561
- spelling_grammar: o.number(),
1562
- inconsistent_placeholders: o.number(),
1563
- inconsistent_html: o.number(),
1564
- different_number_of_urls: o.number(),
1565
- different_urls: o.number(),
1566
- leading_whitespace: o.number(),
1567
- trailing_whitespace: o.number(),
1568
- different_number_of_email_address: o.number(),
1569
- different_email_address: o.number(),
1570
- different_brackets: o.number(),
1571
- different_numbers: o.number(),
1572
- double_space: o.number(),
1573
- special_placeholder: o.number(),
1574
- unbalanced_brackets: o.number()
1575
- }), ia = o.object({
1576
- progress_total: o.number(),
1577
- keys_total: o.number(),
1578
- team: o.number(),
1579
- base_words: o.number(),
1580
- qa_issues_total: o.number(),
1581
- qa_issues: sa,
1582
- languages: o.array(ea)
1583
- }), de = o.object({
1584
- project_id: o.string(),
1585
- uuid: o.string().uuid(),
1554
+ successResponseBodySchema: oa
1555
+ }), le = ce, Fe = r.union([
1556
+ r.literal("localization_files"),
1557
+ r.literal("paged_documents"),
1558
+ r.literal("marketing")
1559
+ ]), sa = r.object({
1560
+ per_platform_key_names: r.boolean(),
1561
+ reviewing: r.boolean(),
1562
+ auto_toggle_unverified: r.boolean(),
1563
+ offline_translation: r.boolean(),
1564
+ key_editing: r.boolean(),
1565
+ inline_machine_translations: r.boolean(),
1566
+ custom_translation_statuses: r.boolean(),
1567
+ custom_translation_statuses_allow_multiple: r.boolean(),
1568
+ segmentation: r.boolean(),
1569
+ contributor_preview_download_enabled: r.boolean()
1570
+ }), ia = r.object({
1571
+ not_reviewed: r.number(),
1572
+ unverified: r.number(),
1573
+ spelling_grammar: r.number(),
1574
+ inconsistent_placeholders: r.number(),
1575
+ inconsistent_html: r.number(),
1576
+ different_number_of_urls: r.number(),
1577
+ different_urls: r.number(),
1578
+ leading_whitespace: r.number(),
1579
+ trailing_whitespace: r.number(),
1580
+ different_number_of_email_address: r.number(),
1581
+ different_email_address: r.number(),
1582
+ different_brackets: r.number(),
1583
+ different_numbers: r.number(),
1584
+ double_space: r.number(),
1585
+ special_placeholder: r.number(),
1586
+ unbalanced_brackets: r.number()
1587
+ }), ca = r.object({
1588
+ progress_total: r.number(),
1589
+ keys_total: r.number(),
1590
+ team: r.number(),
1591
+ base_words: r.number(),
1592
+ qa_issues_total: r.number(),
1593
+ qa_issues: ia,
1594
+ languages: r.array(ta)
1595
+ }), de = r.object({
1596
+ project_id: r.string(),
1597
+ uuid: r.string().uuid(),
1586
1598
  project_type: Fe,
1587
- name: o.string(),
1588
- description: o.string(),
1589
- created_at: o.string(),
1590
- created_at_timestamp: o.number(),
1591
- created_by: o.number(),
1592
- created_by_email: o.string(),
1593
- team_id: o.number(),
1594
- base_language_id: o.number(),
1595
- base_language_iso: o.string(),
1596
- settings: aa.optional(),
1597
- statistics: ia.optional()
1598
- }), ca = o.object({
1599
- name: o.string(),
1600
- team_id: o.string(),
1601
- base_lang_iso: o.string(),
1602
- languages: o.array(Zo),
1599
+ name: r.string(),
1600
+ description: r.string(),
1601
+ created_at: r.string(),
1602
+ created_at_timestamp: r.number(),
1603
+ created_by: r.number(),
1604
+ created_by_email: r.string(),
1605
+ team_id: r.number(),
1606
+ base_language_id: r.number(),
1607
+ base_language_iso: r.string(),
1608
+ settings: sa.optional(),
1609
+ statistics: ca.optional()
1610
+ }), la = r.object({
1611
+ name: r.string(),
1612
+ team_id: r.string(),
1613
+ base_lang_iso: r.string(),
1614
+ languages: r.array(ea),
1603
1615
  project_type: Fe,
1604
- is_segmentation_enabled: o.boolean()
1605
- }), St = o.union([o.literal(0), o.literal(1)]), la = o.object({
1616
+ is_segmentation_enabled: r.boolean()
1617
+ }), St = r.union([r.literal(0), r.literal(1)]), da = r.object({
1606
1618
  filter_type: Fe.optional(),
1607
- filter_team_id: o.number().optional(),
1608
- filter_names: o.string().optional(),
1619
+ filter_team_id: r.number().optional(),
1620
+ filter_names: r.string().optional(),
1609
1621
  include_statistics: St.optional(),
1610
1622
  include_settings: St.optional(),
1611
- limit: o.number().optional(),
1612
- page: o.number().optional()
1613
- }), da = o.object({
1614
- projects: o.array(de)
1615
- }), ua = o.object({
1616
- project_id: o.string()
1617
- }), ma = o.object({
1618
- project_id: o.string()
1619
- }), fa = o.object({
1620
- name: o.string().min(1),
1621
- description: o.string().optional()
1622
- }), ue = () => "/projects", _a = qe({
1623
+ limit: r.number().optional(),
1624
+ page: r.number().optional()
1625
+ }), ua = r.object({
1626
+ projects: r.array(de)
1627
+ }), ma = r.object({
1628
+ project_id: r.string()
1629
+ }), fa = r.object({
1630
+ project_id: r.string()
1631
+ }), _a = r.object({
1632
+ name: r.string().min(1),
1633
+ description: r.string().optional()
1634
+ }), ue = () => "/projects", ga = qe({
1623
1635
  description: "Create a new project",
1624
1636
  requestHeaderSchema: le,
1625
1637
  method: "post",
1626
1638
  pathResolver: ue,
1627
- requestBodySchema: ca,
1639
+ requestBodySchema: la,
1628
1640
  successResponseBodySchema: de
1629
- }), ga = Q({
1641
+ }), ha = Q({
1630
1642
  description: "List all projects",
1631
1643
  requestHeaderSchema: le,
1632
1644
  pathResolver: ue,
1633
- requestQuerySchema: la,
1634
- successResponseBodySchema: da
1635
- }), ha = Q({
1645
+ requestQuerySchema: da,
1646
+ successResponseBodySchema: ua
1647
+ }), pa = Q({
1636
1648
  description: "Retrieve a project",
1637
1649
  requestHeaderSchema: le,
1638
- requestPathParamsSchema: ua,
1650
+ requestPathParamsSchema: ma,
1639
1651
  pathResolver: ({ project_id: e }) => `${ue()}/${e}`,
1640
1652
  successResponseBodySchema: de
1641
- }), pa = qe({
1653
+ }), ba = qe({
1642
1654
  description: "Update a project",
1643
1655
  requestHeaderSchema: le,
1644
1656
  method: "put",
1645
- requestPathParamsSchema: ma,
1657
+ requestPathParamsSchema: fa,
1646
1658
  pathResolver: ({ project_id: e }) => `${ue()}/${e}`,
1647
- requestBodySchema: fa,
1659
+ requestBodySchema: _a,
1648
1660
  successResponseBodySchema: de
1649
1661
  });
1650
- function Ka(e, t, n = {}) {
1662
+ function Wa(e, t, n = {}) {
1651
1663
  return Rt({
1652
1664
  ...n,
1653
- mutationFn: async (r) => W(e, _a, {
1665
+ mutationFn: async (o) => W(e, ga, {
1654
1666
  headers: await t.resolve(),
1655
- body: r
1667
+ body: o
1656
1668
  })
1657
1669
  });
1658
1670
  }
1659
- const Wa = {
1671
+ const Ja = {
1660
1672
  projectIdKey: (e) => ["listProjectLanguages", e]
1661
1673
  };
1662
- function Ja(e, t, n) {
1674
+ function Qa(e, t, n) {
1663
1675
  return B({
1664
1676
  ...n,
1665
- queryFn: async ({ queryKey: [r, a] }) => J(e, oa, {
1677
+ queryFn: async ({ queryKey: [o, a] }) => J(e, aa, {
1666
1678
  headers: await t.resolve(),
1667
1679
  pathParams: { projectId: a }
1668
1680
  })
1669
1681
  });
1670
1682
  }
1671
- const Qa = {
1683
+ const Xa = {
1672
1684
  paramsKey: (e) => ["listProjects", e]
1673
1685
  };
1674
1686
  function Ya(e, t, n) {
1675
1687
  return B({
1676
1688
  ...n,
1677
- queryFn: async ({ queryKey: [r, a] }) => J(e, ga, {
1689
+ queryFn: async ({ queryKey: [o, a] }) => J(e, ha, {
1678
1690
  headers: await t.resolve(),
1679
1691
  queryParams: a
1680
1692
  })
@@ -1683,19 +1695,19 @@ function Ya(e, t, n) {
1683
1695
  const Va = {
1684
1696
  projectIdKey: (e) => ["retrieveProject", e]
1685
1697
  };
1686
- function Xa(e, t, n) {
1698
+ function Za(e, t, n) {
1687
1699
  return B({
1688
1700
  ...n,
1689
- queryFn: async ({ queryKey: [r, a] }) => J(e, ha, {
1701
+ queryFn: async ({ queryKey: [o, a] }) => J(e, pa, {
1690
1702
  headers: await t.resolve(),
1691
1703
  pathParams: { project_id: a }
1692
1704
  })
1693
1705
  });
1694
1706
  }
1695
- function Za(e, t, n, r = {}) {
1707
+ function es(e, t, n, o = {}) {
1696
1708
  return Rt({
1697
- ...r,
1698
- mutationFn: async (a) => W(e, pa, {
1709
+ ...o,
1710
+ mutationFn: async (a) => W(e, ba, {
1699
1711
  headers: await t.resolve(),
1700
1712
  body: a,
1701
1713
  pathParams: n
@@ -1703,67 +1715,68 @@ function Za(e, t, n, r = {}) {
1703
1715
  });
1704
1716
  }
1705
1717
  export {
1706
- Ma as Breadcrumbs,
1718
+ Ua as Breadcrumbs,
1707
1719
  Ht as ENTERPRISE_OPENSOURCE_PLAN_ID,
1708
1720
  cr as ENTERPRISE_PLAN_IDS,
1709
1721
  sr as ESSENTIAL_PLAN_IDS,
1710
1722
  qt as FREE_PLAN_ID,
1711
1723
  A as HeaderBuilder,
1712
- qa as JwtAuthHeaderBuilderMiddleware,
1724
+ Ha as JwtAuthHeaderBuilderMiddleware,
1713
1725
  re as NavigationPanel,
1714
- Ua as NavigationTabs,
1726
+ qa as NavigationTabs,
1715
1727
  ir as PRO_PLAN_IDS,
1716
- Ha as PublicApiHeaderBuilderMiddleware,
1728
+ Ba as PublicApiHeaderBuilderMiddleware,
1717
1729
  ar as START_PLAN_IDS,
1718
- I as Sidebar,
1719
- P as SidebarTaskLanguageStatuses,
1730
+ P as Sidebar,
1731
+ I as SidebarTaskLanguageStatuses,
1720
1732
  xe as SidebarTaskStatuses,
1721
1733
  te as SidebarTaskTypeOptions,
1722
1734
  or as TRIAL_PLAN_ID,
1735
+ Le as UnauthorizedError,
1723
1736
  ur as convertNewLineToBreakTag,
1724
1737
  Gt as createHeaderBuilderMiddleware,
1725
- _a as createProject,
1738
+ ga as createProject,
1726
1739
  gr as formatDate,
1727
- La as formatDateTz,
1728
- Da as generateTokenFromClassicSession,
1729
- Ba as getAuthenticatedSessionDetailFromRequest,
1740
+ Ma as formatDateTz,
1741
+ $a as generateTokenFromClassicSession,
1742
+ Da as getAuthenticatedSessionDetailFromRequest,
1730
1743
  xo as getCsrfTokenFromCookie,
1731
1744
  Wt as getJwtTokenFromCookie,
1732
- zo as getTeamUser,
1733
- Go as getTeamUsersQueryKey,
1745
+ Go as getTeamUser,
1746
+ Ko as getTeamUsersQueryKey,
1734
1747
  $e as getUserToken,
1735
- Ho as getUserTokenKey,
1736
- Oa as isEnterpriseOpenSourcePlan,
1737
- ja as isEnterprisePlan,
1738
- Ra as isEssentialPlan,
1748
+ Bo as getUserTokenKey,
1749
+ La as isEnterpriseOpenSourcePlan,
1750
+ xa as isEnterprisePlan,
1751
+ Na as isEssentialPlan,
1739
1752
  Be as isFreePlan,
1740
- xa as isPaidPlan,
1741
- Na as isProPlan,
1742
- Aa as isStartPlan,
1753
+ Oa as isPaidPlan,
1754
+ ja as isProPlan,
1755
+ Ra as isStartPlan,
1743
1756
  Bt as isTrialPlan,
1744
- oa as listProjectLanguages,
1745
- Wa as listProjectLanguagesKey,
1746
- ga as listProjects,
1747
- Qa as listProjectsKey,
1757
+ aa as listProjectLanguages,
1758
+ Ja as listProjectLanguagesKey,
1759
+ ha as listProjects,
1760
+ Xa as listProjectsKey,
1748
1761
  _r as makeUrlClickable,
1749
1762
  ie as parseJwtTokenPayload,
1750
- $a as refreshExpiredToken,
1763
+ Fa as refreshExpiredToken,
1751
1764
  Yo as retrieveContributor,
1752
1765
  Vo as retrieveContributorKeys,
1753
- ha as retrieveProject,
1766
+ pa as retrieveProject,
1754
1767
  Va as retrieveProjectQueryKey,
1755
- pa as updateProject,
1756
- Ga as useAuthenticatedProjectContributor,
1768
+ ba as updateProject,
1769
+ Ka as useAuthenticatedProjectContributor,
1757
1770
  Qt as useAuthenticatedSessionPayload,
1758
- za as useAuthenticatedUser,
1759
- Ka as useCreateProjectMutation,
1771
+ Ga as useAuthenticatedUser,
1772
+ Wa as useCreateProjectMutation,
1760
1773
  De as useEffectOnce,
1761
- Fa as useGetPromotedClassicSessionJwtQuery,
1762
- Ko as useGetTeamUsersQuery,
1763
- Bo as useGetUserTokenQuery,
1764
- Ja as useListProjectLanguagesQuery,
1774
+ za as useGetPromotedClassicSessionJwtQuery,
1775
+ Wo as useGetTeamUsersQuery,
1776
+ Do as useGetUserTokenQuery,
1777
+ Qa as useListProjectLanguagesQuery,
1765
1778
  Ya as useListProjectsQuery,
1766
- Xo as useRetrieveContributorQuery,
1767
- Xa as useRetrieveProjectQuery,
1768
- Za as useUpdateProjectMutation
1779
+ Zo as useRetrieveContributorQuery,
1780
+ Za as useRetrieveProjectQuery,
1781
+ es as useUpdateProjectMutation
1769
1782
  };