@lokalise/harmony 1.22.2 → 1.23.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/harmony.mjs CHANGED
@@ -1,22 +1,22 @@
1
1
  var Zt = Object.defineProperty;
2
- var en = (e, t, n) => t in e ? Zt(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
3
- var re = (e, t, n) => en(e, typeof t != "symbol" ? t + "" : t, n);
4
- import { jsx as s, jsxs as f, Fragment as He } from "react/jsx-runtime";
5
- import * as K from "react";
6
- import { useRef as Ct, useState as I, useCallback as We, useEffect as J, useContext as wt, createContext as At, cloneElement as tn, Fragment as Pt, forwardRef as nn } from "react";
7
- import { Tooltip as q, Link as M, Menu as le, MenuList as ue, CaretUpIcon as rn, UserIcon as Rt, MenuItem as W, MenuDivider as kt, ConfirmModal as an, Alert as on, Tag as Oe, Button as xe, Loading as sn, Popover as cn, JobIcon as ln } from "@lokalise/louis";
2
+ var en = (e, t, r) => t in e ? Zt(e, t, { enumerable: !0, configurable: !0, writable: !0, value: r }) : e[t] = r;
3
+ var re = (e, t, r) => en(e, typeof t != "symbol" ? t + "" : t, r);
4
+ import { jsx as o, jsxs as h, Fragment as He } from "react/jsx-runtime";
5
+ import * as z from "react";
6
+ import { useRef as Ct, useState as I, useCallback as Qe, useEffect as Q, useContext as Pt, createContext as wt, cloneElement as tn, Fragment as At, forwardRef as nn } from "react";
7
+ import { Tooltip as D, Link as U, Menu as le, MenuList as ue, CaretUpIcon as rn, UserIcon as Rt, MenuItem as W, MenuDivider as kt, ConfirmModal as an, Alert as sn, Tag as Oe, Button as xe, Loading as on, Popover as cn, JobIcon as ln } from "@lokalise/louis";
8
8
  import { format as It, parseISO as un, isThisSecond as dn } from "date-fns";
9
9
  import { toZonedTime as mn } from "date-fns-tz";
10
- import { z as r } from "zod";
11
- import { buildPayloadRoute as Q, buildGetRoute as Y } from "@lokalise/api-contracts";
12
- import { sendByPayloadRoute as D, sendByGetRoute as X } from "@lokalise/frontend-http-client";
13
- import { useQuery as $, useMutation as Be } from "@tanstack/react-query";
10
+ import { z as n } from "zod";
11
+ import { buildPayloadRoute as Y, buildGetRoute as X } from "@lokalise/api-contracts";
12
+ import { sendByPayloadRoute as $, sendByGetRoute as G } from "@lokalise/frontend-http-client";
13
+ import { useQuery as H, useMutation as qe } from "@tanstack/react-query";
14
14
  const Le = {
15
15
  Completed: "completed",
16
16
  InProgress: "in_progress",
17
17
  Created: "created",
18
18
  Queued: "queued"
19
- }, P = {
19
+ }, A = {
20
20
  ...Le,
21
21
  NotStarted: "not_started"
22
22
  }, ae = {
@@ -25,33 +25,33 @@ const Le = {
25
25
  lqa_by_ai: "lqa_by_ai",
26
26
  automatic_translation: "automatic_translation"
27
27
  };
28
- var oe = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
28
+ var se = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
29
29
  function jt(e) {
30
30
  return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
31
31
  }
32
- var pe, Qe;
33
- function qe() {
34
- if (Qe) return pe;
35
- Qe = 1;
32
+ var pe, We;
33
+ function Be() {
34
+ if (We) return pe;
35
+ We = 1;
36
36
  function e(t) {
37
- var n = typeof t;
38
- return t != null && (n == "object" || n == "function");
37
+ var r = typeof t;
38
+ return t != null && (r == "object" || r == "function");
39
39
  }
40
40
  return pe = e, pe;
41
41
  }
42
- var fe, Ye;
42
+ var he, Ye;
43
43
  function _n() {
44
- if (Ye) return fe;
44
+ if (Ye) return he;
45
45
  Ye = 1;
46
- var e = typeof oe == "object" && oe && oe.Object === Object && oe;
47
- return fe = e, fe;
46
+ var e = typeof se == "object" && se && se.Object === Object && se;
47
+ return he = e, he;
48
48
  }
49
- var he, Xe;
49
+ var fe, Xe;
50
50
  function Nt() {
51
- if (Xe) return he;
51
+ if (Xe) return fe;
52
52
  Xe = 1;
53
- var e = _n(), t = typeof self == "object" && self && self.Object === Object && self, n = e || t || Function("return this")();
54
- return he = n, he;
53
+ var e = _n(), t = typeof self == "object" && self && self.Object === Object && self, r = e || t || Function("return this")();
54
+ return fe = r, fe;
55
55
  }
56
56
  var be, Ve;
57
57
  function gn() {
@@ -67,95 +67,95 @@ function pn() {
67
67
  if (Ze) return Te;
68
68
  Ze = 1;
69
69
  var e = /\s/;
70
- function t(n) {
71
- for (var a = n.length; a-- && e.test(n.charAt(a)); )
70
+ function t(r) {
71
+ for (var a = r.length; a-- && e.test(r.charAt(a)); )
72
72
  ;
73
73
  return a;
74
74
  }
75
75
  return Te = t, Te;
76
76
  }
77
77
  var ve, et;
78
- function fn() {
78
+ function hn() {
79
79
  if (et) return ve;
80
80
  et = 1;
81
81
  var e = pn(), t = /^\s+/;
82
- function n(a) {
82
+ function r(a) {
83
83
  return a && a.slice(0, e(a) + 1).replace(t, "");
84
84
  }
85
- return ve = n, ve;
85
+ return ve = r, ve;
86
86
  }
87
- var ye, tt;
87
+ var Se, tt;
88
88
  function Ot() {
89
- if (tt) return ye;
89
+ if (tt) return Se;
90
90
  tt = 1;
91
91
  var e = Nt(), t = e.Symbol;
92
- return ye = t, ye;
92
+ return Se = t, Se;
93
93
  }
94
- var Ee, nt;
95
- function hn() {
96
- if (nt) return Ee;
94
+ var ye, nt;
95
+ function fn() {
96
+ if (nt) return ye;
97
97
  nt = 1;
98
- var e = Ot(), t = Object.prototype, n = t.hasOwnProperty, a = t.toString, o = e ? e.toStringTag : void 0;
98
+ var e = Ot(), t = Object.prototype, r = t.hasOwnProperty, a = t.toString, s = e ? e.toStringTag : void 0;
99
99
  function i(c) {
100
- var u = n.call(c, o), d = c[o];
100
+ var u = r.call(c, s), d = c[s];
101
101
  try {
102
- c[o] = void 0;
102
+ c[s] = void 0;
103
103
  var l = !0;
104
104
  } catch {
105
105
  }
106
106
  var m = a.call(c);
107
- return l && (u ? c[o] = d : delete c[o]), m;
107
+ return l && (u ? c[s] = d : delete c[s]), m;
108
108
  }
109
- return Ee = i, Ee;
109
+ return ye = i, ye;
110
110
  }
111
- var Se, rt;
111
+ var Ee, rt;
112
112
  function bn() {
113
- if (rt) return Se;
113
+ if (rt) return Ee;
114
114
  rt = 1;
115
115
  var e = Object.prototype, t = e.toString;
116
- function n(a) {
116
+ function r(a) {
117
117
  return t.call(a);
118
118
  }
119
- return Se = n, Se;
119
+ return Ee = r, Ee;
120
120
  }
121
121
  var Ce, at;
122
122
  function Tn() {
123
123
  if (at) return Ce;
124
124
  at = 1;
125
- var e = Ot(), t = hn(), n = bn(), a = "[object Null]", o = "[object Undefined]", i = e ? e.toStringTag : void 0;
125
+ var e = Ot(), t = fn(), r = bn(), a = "[object Null]", s = "[object Undefined]", i = e ? e.toStringTag : void 0;
126
126
  function c(u) {
127
- return u == null ? u === void 0 ? o : a : i && i in Object(u) ? t(u) : n(u);
127
+ return u == null ? u === void 0 ? s : a : i && i in Object(u) ? t(u) : r(u);
128
128
  }
129
129
  return Ce = c, Ce;
130
130
  }
131
- var we, ot;
131
+ var Pe, st;
132
132
  function vn() {
133
- if (ot) return we;
134
- ot = 1;
133
+ if (st) return Pe;
134
+ st = 1;
135
135
  function e(t) {
136
136
  return t != null && typeof t == "object";
137
137
  }
138
- return we = e, we;
138
+ return Pe = e, Pe;
139
139
  }
140
- var Ae, st;
141
- function yn() {
142
- if (st) return Ae;
143
- st = 1;
144
- var e = Tn(), t = vn(), n = "[object Symbol]";
145
- function a(o) {
146
- return typeof o == "symbol" || t(o) && e(o) == n;
140
+ var we, ot;
141
+ function Sn() {
142
+ if (ot) return we;
143
+ ot = 1;
144
+ var e = Tn(), t = vn(), r = "[object Symbol]";
145
+ function a(s) {
146
+ return typeof s == "symbol" || t(s) && e(s) == r;
147
147
  }
148
- return Ae = a, Ae;
148
+ return we = a, we;
149
149
  }
150
- var Pe, it;
151
- function En() {
152
- if (it) return Pe;
150
+ var Ae, it;
151
+ function yn() {
152
+ if (it) return Ae;
153
153
  it = 1;
154
- var e = fn(), t = qe(), n = yn(), a = NaN, o = /^[-+]0x[0-9a-f]+$/i, i = /^0b[01]+$/i, c = /^0o[0-7]+$/i, u = parseInt;
154
+ var e = hn(), t = Be(), r = Sn(), a = NaN, s = /^[-+]0x[0-9a-f]+$/i, i = /^0b[01]+$/i, c = /^0o[0-7]+$/i, u = parseInt;
155
155
  function d(l) {
156
156
  if (typeof l == "number")
157
157
  return l;
158
- if (n(l))
158
+ if (r(l))
159
159
  return a;
160
160
  if (t(l)) {
161
161
  var m = typeof l.valueOf == "function" ? l.valueOf() : l;
@@ -165,76 +165,76 @@ function En() {
165
165
  return l === 0 ? l : +l;
166
166
  l = e(l);
167
167
  var g = i.test(l);
168
- return g || c.test(l) ? u(l.slice(2), g ? 2 : 8) : o.test(l) ? a : +l;
168
+ return g || c.test(l) ? u(l.slice(2), g ? 2 : 8) : s.test(l) ? a : +l;
169
169
  }
170
- return Pe = d, Pe;
170
+ return Ae = d, Ae;
171
171
  }
172
172
  var Re, ct;
173
173
  function xt() {
174
174
  if (ct) return Re;
175
175
  ct = 1;
176
- var e = qe(), t = gn(), n = En(), a = "Expected a function", o = Math.max, i = Math.min;
176
+ var e = Be(), t = gn(), r = yn(), a = "Expected a function", s = Math.max, i = Math.min;
177
177
  function c(u, d, l) {
178
- var m, g, v, y, _, S, b = 0, p = !1, h = !1, T = !0;
178
+ var m, g, v, S, _, E, b = 0, p = !1, f = !1, T = !0;
179
179
  if (typeof u != "function")
180
180
  throw new TypeError(a);
181
- d = n(d) || 0, e(l) && (p = !!l.leading, h = "maxWait" in l, v = h ? o(n(l.maxWait) || 0, d) : v, T = "trailing" in l ? !!l.trailing : T);
182
- function w(E) {
183
- var N = m, G = g;
184
- return m = g = void 0, b = E, y = u.apply(G, N), y;
181
+ d = r(d) || 0, e(l) && (p = !!l.leading, f = "maxWait" in l, v = f ? s(r(l.maxWait) || 0, d) : v, T = "trailing" in l ? !!l.trailing : T);
182
+ function P(y) {
183
+ var N = m, F = g;
184
+ return m = g = void 0, b = y, S = u.apply(F, N), S;
185
185
  }
186
- function C(E) {
187
- return b = E, _ = setTimeout(ne, d), p ? w(E) : y;
186
+ function C(y) {
187
+ return b = y, _ = setTimeout(ne, d), p ? P(y) : S;
188
188
  }
189
- function te(E) {
190
- var N = E - S, G = E - b, Je = d - N;
191
- return h ? i(Je, v - G) : Je;
189
+ function te(y) {
190
+ var N = y - E, F = y - b, Je = d - N;
191
+ return f ? i(Je, v - F) : Je;
192
192
  }
193
- function Ke(E) {
194
- var N = E - S, G = E - b;
195
- return S === void 0 || N >= d || N < 0 || h && G >= v;
193
+ function Ke(y) {
194
+ var N = y - E, F = y - b;
195
+ return E === void 0 || N >= d || N < 0 || f && F >= v;
196
196
  }
197
197
  function ne() {
198
- var E = t();
199
- if (Ke(E))
200
- return ze(E);
201
- _ = setTimeout(ne, te(E));
198
+ var y = t();
199
+ if (Ke(y))
200
+ return ze(y);
201
+ _ = setTimeout(ne, te(y));
202
202
  }
203
- function ze(E) {
204
- return _ = void 0, T && m ? w(E) : (m = g = void 0, y);
203
+ function ze(y) {
204
+ return _ = void 0, T && m ? P(y) : (m = g = void 0, S);
205
205
  }
206
206
  function Xt() {
207
- _ !== void 0 && clearTimeout(_), b = 0, m = S = g = _ = void 0;
207
+ _ !== void 0 && clearTimeout(_), b = 0, m = E = g = _ = void 0;
208
208
  }
209
209
  function Vt() {
210
- return _ === void 0 ? y : ze(t());
210
+ return _ === void 0 ? S : ze(t());
211
211
  }
212
212
  function ge() {
213
- var E = t(), N = Ke(E);
214
- if (m = arguments, g = this, S = E, N) {
213
+ var y = t(), N = Ke(y);
214
+ if (m = arguments, g = this, E = y, N) {
215
215
  if (_ === void 0)
216
- return C(S);
217
- if (h)
218
- return clearTimeout(_), _ = setTimeout(ne, d), w(S);
216
+ return C(E);
217
+ if (f)
218
+ return clearTimeout(_), _ = setTimeout(ne, d), P(E);
219
219
  }
220
- return _ === void 0 && (_ = setTimeout(ne, d)), y;
220
+ return _ === void 0 && (_ = setTimeout(ne, d)), S;
221
221
  }
222
222
  return ge.cancel = Xt, ge.flush = Vt, ge;
223
223
  }
224
224
  return Re = c, Re;
225
225
  }
226
- var Sn = xt();
227
- const Cn = /* @__PURE__ */ jt(Sn);
226
+ var En = xt();
227
+ const Cn = /* @__PURE__ */ jt(En);
228
228
  var ke, lt;
229
- function wn() {
229
+ function Pn() {
230
230
  if (lt) return ke;
231
231
  lt = 1;
232
- var e = xt(), t = qe(), n = "Expected a function";
233
- function a(o, i, c) {
232
+ var e = xt(), t = Be(), r = "Expected a function";
233
+ function a(s, i, c) {
234
234
  var u = !0, d = !0;
235
- if (typeof o != "function")
236
- throw new TypeError(n);
237
- return t(c) && (u = "leading" in c ? !!c.leading : u, d = "trailing" in c ? !!c.trailing : d), e(o, i, {
235
+ if (typeof s != "function")
236
+ throw new TypeError(r);
237
+ return t(c) && (u = "leading" in c ? !!c.leading : u, d = "trailing" in c ? !!c.trailing : d), e(s, i, {
238
238
  leading: u,
239
239
  maxWait: i,
240
240
  trailing: d
@@ -242,43 +242,43 @@ function wn() {
242
242
  }
243
243
  return ke = a, ke;
244
244
  }
245
- var An = wn();
246
- const Pn = /* @__PURE__ */ jt(An), Rn = (e, t, n, a) => {
245
+ var wn = Pn();
246
+ const An = /* @__PURE__ */ jt(wn), Rn = (e, t, r, a) => {
247
247
  switch (t) {
248
248
  case "debounce":
249
- return Cn(e, n, a);
249
+ return Cn(e, r, a);
250
250
  case "throttle":
251
- return Pn(e, n, a);
251
+ return An(e, r, a);
252
252
  default:
253
253
  return e;
254
254
  }
255
255
  }, kn = (
256
256
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
257
257
  (e) => {
258
- const t = K.useRef(e);
259
- return K.useEffect(() => {
258
+ const t = z.useRef(e);
259
+ return z.useEffect(() => {
260
260
  t.current = e;
261
- }), K.useMemo(() => (...n) => {
261
+ }), z.useMemo(() => (...r) => {
262
262
  var a;
263
- return (a = t.current) === null || a === void 0 ? void 0 : a.call(t, ...n);
263
+ return (a = t.current) === null || a === void 0 ? void 0 : a.call(t, ...r);
264
264
  }, []);
265
265
  }
266
266
  ), In = (
267
267
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
268
268
  (e) => {
269
- const [t, n] = K.useState((e == null ? void 0 : e.current) || null);
269
+ const [t, r] = z.useState((e == null ? void 0 : e.current) || null);
270
270
  return e && setTimeout(() => {
271
- e.current !== t && n(e.current);
272
- }, 0), { refProxy: K.useMemo(() => new Proxy((o) => {
273
- o !== t && n(o);
271
+ e.current !== t && r(e.current);
272
+ }, 0), { refProxy: z.useMemo(() => new Proxy((s) => {
273
+ s !== t && r(s);
274
274
  }, {
275
- get(o, i) {
276
- return i === "current" ? t : o[i];
275
+ get(s, i) {
276
+ return i === "current" ? t : s[i];
277
277
  },
278
- set(o, i, c) {
279
- return i === "current" ? n(c) : o[i] = c, !0;
278
+ set(s, i, c) {
279
+ return i === "current" ? r(c) : s[i] = c, !0;
280
280
  }
281
- }), [t]), refElement: t, setRefElement: n };
281
+ }), [t]), refElement: t, setRefElement: r };
282
282
  }
283
283
  ), jn = (e, t) => t === "border-box" ? {
284
284
  width: e.borderBoxSize[0].inlineSize,
@@ -290,55 +290,55 @@ const Pn = /* @__PURE__ */ jt(An), Rn = (e, t, n, a) => {
290
290
  width: e.contentRect.width,
291
291
  height: e.contentRect.height
292
292
  };
293
- function Nn({ skipOnMount: e = !1, refreshMode: t, refreshRate: n = 1e3, refreshOptions: a, handleWidth: o = !0, handleHeight: i = !0, targetRef: c, observerOptions: u, onResize: d } = {}) {
293
+ function Nn({ skipOnMount: e = !1, refreshMode: t, refreshRate: r = 1e3, refreshOptions: a, handleWidth: s = !0, handleHeight: i = !0, targetRef: c, observerOptions: u, onResize: d } = {}) {
294
294
  const l = Ct(e), m = kn(d), [g, v] = I({
295
295
  width: void 0,
296
296
  height: void 0
297
- }), { refProxy: y, refElement: _ } = In(c), { box: S } = u || {}, b = We((h) => {
298
- if (!o && !i)
297
+ }), { refProxy: S, refElement: _ } = In(c), { box: E } = u || {}, b = Qe((f) => {
298
+ if (!s && !i)
299
299
  return;
300
300
  if (l.current) {
301
301
  l.current = !1;
302
302
  return;
303
303
  }
304
- const T = (w, C) => o && w.width !== C.width || i && w.height !== C.height;
305
- h.forEach((w) => {
306
- const C = jn(w, S);
304
+ const T = (P, C) => s && P.width !== C.width || i && P.height !== C.height;
305
+ f.forEach((P) => {
306
+ const C = jn(P, E);
307
307
  v((te) => T(te, C) ? (m == null || m({
308
308
  width: C.width,
309
309
  height: C.height,
310
- entry: w
310
+ entry: P
311
311
  }), C) : te);
312
312
  });
313
- }, [o, i, l, S]), p = We(Rn(b, t, n, a), [
313
+ }, [s, i, l, E]), p = Qe(Rn(b, t, r, a), [
314
314
  b,
315
315
  t,
316
- n,
316
+ r,
317
317
  a
318
318
  ]);
319
- return J(() => {
320
- let h;
321
- return _ ? (h = new window.ResizeObserver(p), h.observe(_, u)) : (g.width || g.height) && (m == null || m({
319
+ return Q(() => {
320
+ let f;
321
+ return _ ? (f = new window.ResizeObserver(p), f.observe(_, u)) : (g.width || g.height) && (m == null || m({
322
322
  width: null,
323
323
  height: null,
324
324
  entry: null
325
325
  }), v({ width: void 0, height: void 0 })), () => {
326
- var T, w, C;
327
- (T = h == null ? void 0 : h.disconnect) === null || T === void 0 || T.call(h), (C = (w = p).cancel) === null || C === void 0 || C.call(w);
326
+ var T, P, C;
327
+ (T = f == null ? void 0 : f.disconnect) === null || T === void 0 || T.call(f), (C = (P = p).cancel) === null || C === void 0 || C.call(P);
328
328
  };
329
- }, [p, _]), Object.assign({ ref: y }, g);
329
+ }, [p, _]), Object.assign({ ref: S }, g);
330
330
  }
331
331
  function Lt(e) {
332
- var t, n, a = "";
332
+ var t, r, a = "";
333
333
  if (typeof e == "string" || typeof e == "number") a += e;
334
334
  else if (typeof e == "object") if (Array.isArray(e)) {
335
- var o = e.length;
336
- for (t = 0; t < o; t++) e[t] && (n = Lt(e[t])) && (a && (a += " "), a += n);
337
- } else for (n in e) e[n] && (a && (a += " "), a += n);
335
+ var s = e.length;
336
+ for (t = 0; t < s; t++) e[t] && (r = Lt(e[t])) && (a && (a += " "), a += r);
337
+ } else for (r in e) e[r] && (a && (a += " "), a += r);
338
338
  return a;
339
339
  }
340
340
  function j() {
341
- for (var e, t, n = 0, a = "", o = arguments.length; n < o; n++) (e = arguments[n]) && (t = Lt(e)) && (a && (a += " "), a += t);
341
+ for (var e, t, r = 0, a = "", s = arguments.length; r < s; r++) (e = arguments[r]) && (t = Lt(e)) && (a && (a += " "), a += t);
342
342
  return a;
343
343
  }
344
344
  const On = "_headerContainer_1cubo_1", xn = "_navigationTabList_1cubo_8", Ln = "_navigationTab_1cubo_8", Mn = "_headerContent_1cubo_34", Un = "_staticEnabled_1cubo_50", B = {
@@ -347,77 +347,77 @@ const On = "_headerContainer_1cubo_1", xn = "_navigationTabList_1cubo_8", Ln = "
347
347
  navigationTab: Ln,
348
348
  headerContent: Mn,
349
349
  staticEnabled: Un
350
- }, Hn = 77, se = ({ sticky: e, children: t }) => {
351
- const { ref: n, height: a } = Nn({
350
+ }, Hn = 77, oe = ({ sticky: e, children: t }) => {
351
+ const { ref: r, height: a } = Nn({
352
352
  refreshMode: "debounce",
353
353
  refreshRate: 0
354
- }), [o, i] = I(!1), c = () => o ? !e : !0;
355
- J(() => {
354
+ }), [s, i] = I(!1), c = () => s ? !e : !0;
355
+ Q(() => {
356
356
  const d = () => {
357
357
  i(window.scrollY > 0);
358
358
  };
359
359
  return window.addEventListener("scroll", d), () => window.removeEventListener("scroll", d);
360
360
  }, []);
361
361
  const u = `${a || Hn}px`;
362
- return /* @__PURE__ */ s("div", { style: { minHeight: u }, children: /* @__PURE__ */ s("div", { children: /* @__PURE__ */ f(
362
+ return /* @__PURE__ */ o("div", { style: { minHeight: u }, children: /* @__PURE__ */ o("div", { children: /* @__PURE__ */ h(
363
363
  "div",
364
364
  {
365
- ref: n,
365
+ ref: r,
366
366
  className: j(B.headerContent, {
367
367
  [B.staticEnabled]: c()
368
368
  }),
369
369
  children: [
370
- /* @__PURE__ */ s(se.Header, {}),
371
- /* @__PURE__ */ s(se.Tabs, {}),
370
+ /* @__PURE__ */ o(oe.Header, {}),
371
+ /* @__PURE__ */ o(oe.Tabs, {}),
372
372
  t
373
373
  ]
374
374
  }
375
375
  ) }) });
376
376
  };
377
- se.Header = ({ children: e }) => /* @__PURE__ */ s("div", { className: B.headerContainer, children: e });
378
- se.Tabs = ({ children: e }) => /* @__PURE__ */ s("div", { className: "flex justify-between gap-2 nowrap", children: e });
379
- const Bn = "_sidebarContainer_bmdti_1", qn = {
380
- sidebarContainer: Bn
377
+ oe.Header = ({ children: e }) => /* @__PURE__ */ o("div", { className: B.headerContainer, children: e });
378
+ oe.Tabs = ({ children: e }) => /* @__PURE__ */ o("div", { className: "flex justify-between gap-2 nowrap", children: e });
379
+ const qn = "_sidebarContainer_bmdti_1", Bn = {
380
+ sidebarContainer: qn
381
381
  }, Dn = "_logoLink_1baxb_1", $n = {
382
382
  logoLink: Dn
383
383
  }, Gn = ({
384
384
  src: e,
385
385
  href: t = "/",
386
- ariaLabel: n = "Lokalise App Home",
386
+ ariaLabel: r = "Lokalise App Home",
387
387
  alt: a = "Lokalise Logo"
388
- }) => /* @__PURE__ */ s("a", { className: $n.logoLink, href: t, "aria-label": n, children: /* @__PURE__ */ s("img", { src: e, alt: a }) }), Fn = "_link_18vhx_1", Kn = "_active_18vhx_18", ut = {
388
+ }) => /* @__PURE__ */ o("a", { className: $n.logoLink, href: t, "aria-label": r, children: /* @__PURE__ */ o("img", { src: e, alt: a }) }), Fn = "_link_18vhx_1", Kn = "_active_18vhx_18", ut = {
389
389
  link: Fn,
390
390
  active: Kn
391
- }, zn = ({ label: e, to: t, icon: n }) => /* @__PURE__ */ s(q, { placement: "right", tooltip: e, children: /* @__PURE__ */ s(
392
- M,
391
+ }, zn = ({ label: e, to: t, icon: r }) => /* @__PURE__ */ o(D, { placement: "right", tooltip: e, children: /* @__PURE__ */ o(
392
+ U,
393
393
  {
394
394
  className: j(ut.link, {
395
395
  [ut.active]: window.location.pathname.startsWith(t)
396
396
  }),
397
397
  href: t,
398
- children: /* @__PURE__ */ s(n, { size: "25px" })
398
+ children: /* @__PURE__ */ o(r, { size: "25px" })
399
399
  }
400
- ) }), Jn = "_dropdownButton_13l5r_1", Wn = "_dropdownButtonActive_13l5r_18", dt = {
400
+ ) }), Jn = "_dropdownButton_13l5r_1", Qn = "_dropdownButtonActive_13l5r_18", dt = {
401
401
  dropdownButton: Jn,
402
- dropdownButtonActive: Wn
403
- }, Qn = ({ children: e, icon: t }) => /* @__PURE__ */ s(
402
+ dropdownButtonActive: Qn
403
+ }, Wn = ({ children: e, icon: t }) => /* @__PURE__ */ o(
404
404
  le,
405
405
  {
406
- menuButton: ({ opened: n }) => /* @__PURE__ */ s(q, { placement: "right", tooltip: "Help", children: /* @__PURE__ */ s(
406
+ menuButton: ({ opened: r }) => /* @__PURE__ */ o(D, { placement: "right", tooltip: "Help", children: /* @__PURE__ */ o(
407
407
  "button",
408
408
  {
409
409
  type: "button",
410
410
  className: j(dt.dropdownButton, {
411
- [dt.dropdownButtonActive]: n
411
+ [dt.dropdownButtonActive]: r
412
412
  }),
413
- children: /* @__PURE__ */ s(t, { size: "25px" })
413
+ children: /* @__PURE__ */ o(t, { size: "25px" })
414
414
  }
415
415
  ) }),
416
- children: /* @__PURE__ */ s(ue, { placement: "right-start", children: e })
416
+ children: /* @__PURE__ */ o(ue, { placement: "right-start", children: e })
417
417
  }
418
418
  ), Yn = "_iconContainer_nz34m_1", Xn = {
419
419
  iconContainer: Yn
420
- }, Mt = ({ className: e = "" }) => /* @__PURE__ */ s(
420
+ }, Mt = ({ className: e = "" }) => /* @__PURE__ */ o(
421
421
  "div",
422
422
  {
423
423
  "aria-label": "Upgrade Icon",
@@ -428,21 +428,21 @@ const Bn = "_sidebarContainer_bmdti_1", qn = {
428
428
  "justify-center",
429
429
  e
430
430
  ),
431
- children: /* @__PURE__ */ s(rn, {})
431
+ children: /* @__PURE__ */ o(rn, {})
432
432
  }
433
- ), Vn = "_menuContainer_1phdw_10", Zn = "_profileButton_1phdw_20", er = "_profileImage_1phdw_33", tr = "_profileImageHighlight_1phdw_41", nr = "_profileImageUpgradeIcon_1phdw_45", rr = "_userIconWrapper_1phdw_51", x = {
433
+ ), Vn = "_menuContainer_1phdw_10", Zn = "_profileButton_1phdw_20", er = "_profileImage_1phdw_33", tr = "_profileImageHighlight_1phdw_41", nr = "_profileImageUpgradeIcon_1phdw_45", rr = "_userIconWrapper_1phdw_51", L = {
434
434
  menuContainer: Vn,
435
435
  profileButton: Zn,
436
436
  profileImage: er,
437
437
  profileImageHighlight: tr,
438
438
  profileImageUpgradeIcon: nr,
439
439
  userIconWrapper: rr
440
- }, Ut = At({}), V = () => wt(Ut), ar = ({ children: e }) => {
440
+ }, Ut = wt({}), V = () => Pt(Ut), ar = ({ children: e }) => {
441
441
  const {
442
442
  currentTeam: t,
443
- otherTeams: n,
443
+ otherTeams: r,
444
444
  showUpgradeCta: a,
445
- showBillingButton: o,
445
+ showBillingButton: s,
446
446
  allowTeamCreation: i,
447
447
  isProviderAlpha: c,
448
448
  canAccessTeamSettings: u,
@@ -450,63 +450,63 @@ const Bn = "_sidebarContainer_bmdti_1", qn = {
450
450
  isTeamSuspended: l,
451
451
  isFullyAuthenticated: m
452
452
  } = V();
453
- return /* @__PURE__ */ s(
453
+ return /* @__PURE__ */ o(
454
454
  le,
455
455
  {
456
- menuButton: () => /* @__PURE__ */ f("button", { className: x.profileButton, "aria-label": "Profile menu", type: "button", children: [
457
- t != null && t.logoUrl ? /* @__PURE__ */ s(
456
+ menuButton: () => /* @__PURE__ */ h("button", { className: L.profileButton, "aria-label": "Profile menu", type: "button", children: [
457
+ t != null && t.logoUrl ? /* @__PURE__ */ o(
458
458
  "img",
459
459
  {
460
460
  src: t.logoUrl,
461
- className: j(x.profileImage, {
462
- [x.profileImageHighlight]: a
461
+ className: j(L.profileImage, {
462
+ [L.profileImageHighlight]: a
463
463
  }),
464
464
  alt: "Team Logo"
465
465
  }
466
- ) : /* @__PURE__ */ s(
466
+ ) : /* @__PURE__ */ o(
467
467
  "div",
468
468
  {
469
- className: j(x.userIconWrapper, "flex-row", "align-center", "items-center", {
470
- [x.profileImageHighlight]: a
469
+ className: j(L.userIconWrapper, "flex-row", "align-center", "items-center", {
470
+ [L.profileImageHighlight]: a
471
471
  }),
472
- children: /* @__PURE__ */ s(Rt, { size: "25px" })
472
+ children: /* @__PURE__ */ o(Rt, { size: "25px" })
473
473
  }
474
474
  ),
475
- a && /* @__PURE__ */ s(Mt, { className: x.profileImageUpgradeIcon })
475
+ a && /* @__PURE__ */ o(Mt, { className: L.profileImageUpgradeIcon })
476
476
  ] }),
477
- children: /* @__PURE__ */ s(ue, { placement: "right-end", className: x.menuContainer, children: e({
477
+ children: /* @__PURE__ */ o(ue, { placement: "right-end", className: L.menuContainer, children: e({
478
478
  allowTeamCreation: i,
479
- otherTeams: n,
479
+ otherTeams: r,
480
480
  canAccessTeamSettings: u,
481
481
  isEndOfTrialActive: d,
482
482
  isTeamSuspended: l,
483
- showBillingButton: o,
483
+ showBillingButton: s,
484
484
  isProviderAlpha: c,
485
485
  isFullyAuthenticated: m
486
486
  }) })
487
487
  }
488
488
  );
489
- }, Ht = 0, or = 9999, sr = [150, 151, 250, 251], ir = [152, 153, 252, 253], cr = [154, 155, 157, 158, 254, 255, 258, 354, 355, 358], lr = [156, 159, 160, 256, 259, 260], Bt = 9998, De = (e) => e === Ht, qt = (e) => e === or, Fo = (e) => sr.includes(e), Ko = (e) => ir.includes(e), zo = (e) => cr.includes(e), Jo = (e) => lr.includes(e), Wo = (e) => e > Ht && e < Bt, Qo = (e) => e === Bt, ur = /\n/, mt = (e, t, n) => e.split(t).flatMap((a, o) => o !== 0 ? [tn(n, { key: Math.random().toString(32).slice(0, 10) }), a] : a), dr = (e, t, n) => typeof e == "string" ? mt(e, t, n) : e.flatMap((a) => typeof a == "string" ? mt(a, t, n) : a), mr = (e) => dr(e, ur, /* @__PURE__ */ s("br", {})), _r = /(\b(https?|):\/\/[-a-zA-Zа-яА-Я0-9+&@#/%?=~_|!:,.;]*[-a-zA-Zа-яА-Я0-9+&@#/%=~_|])/gi, gr = (e) => e.match(_r) ?? [], _t = (e, t, n) => {
489
+ }, Ht = 0, sr = 9999, or = [150, 151, 250, 251], ir = [152, 153, 252, 253], cr = [154, 155, 157, 158, 254, 255, 258, 354, 355, 358], lr = [156, 159, 160, 256, 259, 260], qt = 9998, De = (e) => e === Ht, Bt = (e) => e === sr, Ws = (e) => or.includes(e), Ys = (e) => ir.includes(e), Xs = (e) => cr.includes(e), Vs = (e) => lr.includes(e), Zs = (e) => e > Ht && e < qt, eo = (e) => e === qt, ur = /\n/, mt = (e, t, r) => e.split(t).flatMap((a, s) => s !== 0 ? [tn(r, { key: Math.random().toString(32).slice(0, 10) }), a] : a), dr = (e, t, r) => typeof e == "string" ? mt(e, t, r) : e.flatMap((a) => typeof a == "string" ? mt(a, t, r) : a), mr = (e) => dr(e, ur, /* @__PURE__ */ o("br", {})), _r = /(\b(https?|):\/\/[-a-zA-Zа-яА-Я0-9+&@#/%?=~_|!:,.;]*[-a-zA-Zа-яА-Я0-9+&@#/%=~_|])/gi, gr = (e) => e.match(_r) ?? [], _t = (e, t, r) => {
490
490
  const a = e.split(t);
491
491
  if (a.length === 1)
492
492
  return e;
493
- const o = [];
494
- return a[0] !== "" && o.push(a[0]), a.shift(), a[a.length - 1] === "" && a.pop(), o.push(
495
- /* @__PURE__ */ s("a", { href: t, target: "_blank", rel: "noreferrer noopener", children: t }, t + n)
496
- ), o.push(a.join(t)), o.filter((i) => i !== "");
493
+ const s = [];
494
+ return a[0] !== "" && s.push(a[0]), a.shift(), a[a.length - 1] === "" && a.pop(), s.push(
495
+ /* @__PURE__ */ o("a", { href: t, target: "_blank", rel: "noreferrer noopener", children: t }, t + r)
496
+ ), s.push(a.join(t)), s.filter((i) => i !== "");
497
497
  }, gt = (e) => {
498
498
  const t = gr(e);
499
- return t != null && t.length ? t.reduce((n, a, o) => typeof n == "string" ? _t(n, a, o) : n.flatMap((i) => typeof i == "string" ? _t(i, a, o) : i), e) : e;
500
- }, pr = (e) => typeof e == "string" ? gt(e) : e.flatMap((t) => typeof t == "string" ? gt(t) : t, e), fr = (e, t = "PP") => It(e, t), Yo = (e, t, n = "PP") => It(mn(e, t), n), $e = (e) => {
501
- J(e, []);
499
+ return t != null && t.length ? t.reduce((r, a, s) => typeof r == "string" ? _t(r, a, s) : r.flatMap((i) => typeof i == "string" ? _t(i, a, s) : i), e) : e;
500
+ }, pr = (e) => typeof e == "string" ? gt(e) : e.flatMap((t) => typeof t == "string" ? gt(t) : t, e), hr = (e, t = "PP") => It(e, t), to = (e, t, r = "PP") => It(mn(e, t), r), $e = (e) => {
501
+ Q(e, []);
502
502
  }, pt = {
503
503
  biller: "biller",
504
504
  owner: "owner"
505
- }, ft = [
505
+ }, ht = [
506
506
  pt.biller,
507
507
  pt.owner
508
- ], hr = ({ children: e, config: t }) => {
509
- const { teams: n, currentTeamId: a, planId: o, isEndOfTrialActive: i, isFullyAuthenticated: c, userTeamRole: u } = t, d = n.find((p) => p.id === a), l = n.filter((p) => p.id !== a), m = ft.includes(u), g = ft.includes(u), v = De(o) || qt(o), b = {
508
+ ], fr = ({ children: e, config: t }) => {
509
+ const { teams: r, currentTeamId: a, planId: s, isEndOfTrialActive: i, isFullyAuthenticated: c, userTeamRole: u } = t, d = r.find((p) => p.id === a), l = r.filter((p) => p.id !== a), m = ht.includes(u), g = ht.includes(u), v = De(s) || Bt(s), b = {
510
510
  ...t,
511
511
  currentTeam: d,
512
512
  otherTeams: l,
@@ -517,60 +517,60 @@ const Bn = "_sidebarContainer_bmdti_1", qn = {
517
517
  showBillingButton: c && g && m,
518
518
  allowTeamCreation: c && !i
519
519
  };
520
- return /* @__PURE__ */ s(Ut.Provider, { value: b, children: e });
521
- }, br = ({ config: e, children: t }) => /* @__PURE__ */ s(hr, { config: e, children: /* @__PURE__ */ s(ar, { children: t }) }), Tr = "_container_q5pot_1", vr = "_profileEmail_q5pot_5", ht = {
520
+ return /* @__PURE__ */ o(Ut.Provider, { value: b, children: e });
521
+ }, br = ({ config: e, children: t }) => /* @__PURE__ */ o(fr, { config: e, children: /* @__PURE__ */ o(ar, { children: t }) }), Tr = "_container_q5pot_1", vr = "_profileEmail_q5pot_5", ft = {
522
522
  container: Tr,
523
523
  profileEmail: vr
524
- }, yr = ({
524
+ }, Sr = ({
525
525
  href: e,
526
526
  onClick: t,
527
- userEmail: n,
527
+ userEmail: r,
528
528
  hideBottomDivider: a
529
529
  }) => {
530
- const { isEndOfTrialActive: o, isTeamSuspended: i } = V();
531
- return o || i ? null : /* @__PURE__ */ f(He, { children: [
532
- /* @__PURE__ */ s(
530
+ const { isEndOfTrialActive: s, isTeamSuspended: i } = V();
531
+ return s || i ? null : /* @__PURE__ */ h(He, { children: [
532
+ /* @__PURE__ */ o(
533
533
  W,
534
534
  {
535
535
  href: e,
536
536
  onClick: () => {
537
537
  t == null || t();
538
538
  },
539
- children: /* @__PURE__ */ f("div", { className: `flex-col ${ht.container}`, children: [
540
- /* @__PURE__ */ s("span", { children: "Profile Settings" }),
541
- /* @__PURE__ */ s("span", { className: ht.profileEmail, children: n })
539
+ children: /* @__PURE__ */ h("div", { className: `flex-col ${ft.container}`, children: [
540
+ /* @__PURE__ */ o("span", { children: "Profile Settings" }),
541
+ /* @__PURE__ */ o("span", { className: ft.profileEmail, children: r })
542
542
  ] })
543
543
  }
544
544
  ),
545
- !a && /* @__PURE__ */ s(kt, {})
545
+ !a && /* @__PURE__ */ o(kt, {})
546
546
  ] });
547
- }, Er = "_wrapper_1in7x_5", Sr = "_profileImage_1in7x_11", Cr = "_teamDetails_1in7x_19", wr = "_planWrapper_1in7x_28", Ar = "_teamName_1in7x_36", Pr = "_planLabel_1in7x_45", Rr = "_membership_1in7x_53", kr = "_defaultProfileImage_1in7x_59", O = {
548
- wrapper: Er,
549
- profileImage: Sr,
547
+ }, yr = "_wrapper_1in7x_5", Er = "_profileImage_1in7x_11", Cr = "_teamDetails_1in7x_19", Pr = "_planWrapper_1in7x_28", wr = "_teamName_1in7x_36", Ar = "_planLabel_1in7x_45", Rr = "_membership_1in7x_53", kr = "_defaultProfileImage_1in7x_59", O = {
548
+ wrapper: yr,
549
+ profileImage: Er,
550
550
  teamDetails: Cr,
551
- planWrapper: wr,
552
- teamName: Ar,
553
- planLabel: Pr,
551
+ planWrapper: Pr,
552
+ teamName: wr,
553
+ planLabel: Ar,
554
554
  membership: Rr,
555
555
  defaultProfileImage: kr
556
- }, Dt = ({ team: e, onClick: t, hidePlanLabel: n }) => {
557
- const { currentTeam: a, planId: o } = V(), i = e || a;
556
+ }, Dt = ({ team: e, onClick: t, hidePlanLabel: r }) => {
557
+ const { currentTeam: a, planId: s } = V(), i = e || a;
558
558
  if (!i)
559
559
  return null;
560
- const c = De(o) ? "Free" : qt(o) ? "Trial" : void 0;
561
- return /* @__PURE__ */ f(
560
+ const c = De(s) ? "Free" : Bt(s) ? "Trial" : void 0;
561
+ return /* @__PURE__ */ h(
562
562
  t ? W : "div",
563
563
  {
564
564
  className: O.wrapper,
565
565
  ...t && { onClick: () => t(i) },
566
566
  children: [
567
- i.logoUrl ? /* @__PURE__ */ s("img", { className: O.profileImage, src: i.logoUrl, alt: "" }) : /* @__PURE__ */ s("span", { className: `${O.defaultProfileImage}`, children: /* @__PURE__ */ s(Rt, { size: "25px" }) }),
568
- /* @__PURE__ */ f("div", { className: O.teamDetails, children: [
569
- /* @__PURE__ */ f("div", { className: O.planWrapper, children: [
570
- /* @__PURE__ */ s("span", { className: O.teamName, children: i.name }),
571
- c && !n && /* @__PURE__ */ s("span", { className: `${O.planLabel}`, children: c })
567
+ i.logoUrl ? /* @__PURE__ */ o("img", { className: O.profileImage, src: i.logoUrl, alt: "" }) : /* @__PURE__ */ o("span", { className: `${O.defaultProfileImage}`, children: /* @__PURE__ */ o(Rt, { size: "25px" }) }),
568
+ /* @__PURE__ */ h("div", { className: O.teamDetails, children: [
569
+ /* @__PURE__ */ h("div", { className: O.planWrapper, children: [
570
+ /* @__PURE__ */ o("span", { className: O.teamName, children: i.name }),
571
+ c && !r && /* @__PURE__ */ o("span", { className: `${O.planLabel}`, children: c })
572
572
  ] }),
573
- /* @__PURE__ */ s("span", { className: O.membership, children: i.role })
573
+ /* @__PURE__ */ o("span", { className: O.membership, children: i.role })
574
574
  ] })
575
575
  ]
576
576
  }
@@ -579,12 +579,12 @@ const Bn = "_sidebarContainer_bmdti_1", qn = {
579
579
  teamsContainer: Ir
580
580
  }, Nr = ({ onSwitchTeam: e }) => {
581
581
  const { otherTeams: t } = V();
582
- return t.length === 0 ? null : /* @__PURE__ */ s(
582
+ return t.length === 0 ? null : /* @__PURE__ */ o(
583
583
  "div",
584
584
  {
585
585
  "data-testid": "sidebar-team-switch",
586
586
  className: `flex-col items-stretch ${jr.teamsContainer}`,
587
- children: t.map((n) => /* @__PURE__ */ s(Dt, { team: n, onClick: e, hidePlanLabel: !0 }, n.id))
587
+ children: t.map((r) => /* @__PURE__ */ o(Dt, { team: r, onClick: e, hidePlanLabel: !0 }, r.id))
588
588
  }
589
589
  );
590
590
  }, Or = "_container_1u995_1", xr = "_planCta_1u995_15", Lr = "_upgradeIconWrapper_1u995_19", Ie = {
@@ -592,28 +592,28 @@ const Bn = "_sidebarContainer_bmdti_1", qn = {
592
592
  planCta: xr,
593
593
  upgradeIconWrapper: Lr
594
594
  }, Mr = ({ upgradeOptionHref: e }) => {
595
- const { planId: t, trialDaysLeft: n, showUpgradeCta: a } = V();
595
+ const { planId: t, trialDaysLeft: r, showUpgradeCta: a } = V();
596
596
  if (!a)
597
597
  return null;
598
- const c = De(t) ? "Your team is currently on the Free plan" : `Free trial ends in ${n} ${n === 1 ? "day" : "days"}`;
599
- return /* @__PURE__ */ f(
598
+ const c = De(t) ? "Your team is currently on the Free plan" : `Free trial ends in ${r} ${r === 1 ? "day" : "days"}`;
599
+ return /* @__PURE__ */ h(
600
600
  W,
601
601
  {
602
602
  "data-testid": "sidebar-upgrade-menu-item",
603
603
  href: e,
604
604
  className: `flex-col gap-1 items-start ${Ie.container}`,
605
605
  children: [
606
- /* @__PURE__ */ s("span", { className: Ie.planCta, children: c }),
607
- /* @__PURE__ */ f("div", { className: `flex-row items-center gap-1 ${Ie.upgradeIconWrapper}`, children: [
608
- /* @__PURE__ */ s(Mt, {}),
609
- /* @__PURE__ */ s("span", { children: "See upgrade options" })
606
+ /* @__PURE__ */ o("span", { className: Ie.planCta, children: c }),
607
+ /* @__PURE__ */ h("div", { className: `flex-row items-center gap-1 ${Ie.upgradeIconWrapper}`, children: [
608
+ /* @__PURE__ */ o(Mt, {}),
609
+ /* @__PURE__ */ o("span", { children: "See upgrade options" })
610
610
  ] })
611
611
  ]
612
612
  }
613
613
  );
614
614
  }, Ur = Math.min, Hr = Math.max;
615
- function bt(e, t, n) {
616
- return Hr(e, Ur(t, n));
615
+ function bt(e, t, r) {
616
+ return Hr(e, Ur(t, r));
617
617
  }
618
618
  function $t(e, t) {
619
619
  return typeof e == "function" ? e(t) : e;
@@ -621,10 +621,10 @@ function $t(e, t) {
621
621
  function Gt(e) {
622
622
  return e.split("-")[0];
623
623
  }
624
- function Br(e) {
624
+ function qr(e) {
625
625
  return e === "x" ? "y" : "x";
626
626
  }
627
- function qr(e) {
627
+ function Br(e) {
628
628
  return ["top", "bottom"].includes(Gt(e)) ? "y" : "x";
629
629
  }
630
630
  function Dr(e) {
@@ -647,27 +647,27 @@ function $r(e) {
647
647
  function Tt(e) {
648
648
  const {
649
649
  x: t,
650
- y: n,
650
+ y: r,
651
651
  width: a,
652
- height: o
652
+ height: s
653
653
  } = e;
654
654
  return {
655
655
  width: a,
656
- height: o,
657
- top: n,
656
+ height: s,
657
+ top: r,
658
658
  left: t,
659
659
  right: t + a,
660
- bottom: n + o,
660
+ bottom: r + s,
661
661
  x: t,
662
- y: n
662
+ y: r
663
663
  };
664
664
  }
665
665
  async function Gr(e, t) {
666
- var n;
666
+ var r;
667
667
  t === void 0 && (t = {});
668
668
  const {
669
669
  x: a,
670
- y: o,
670
+ y: s,
671
671
  platform: i,
672
672
  rects: c,
673
673
  elements: u,
@@ -677,18 +677,18 @@ async function Gr(e, t) {
677
677
  rootBoundary: m = "viewport",
678
678
  elementContext: g = "floating",
679
679
  altBoundary: v = !1,
680
- padding: y = 0
681
- } = $t(t, e), _ = $r(y), b = u[v ? g === "floating" ? "reference" : "floating" : g], p = Tt(await i.getClippingRect({
682
- element: (n = await (i.isElement == null ? void 0 : i.isElement(b))) == null || n ? b : b.contextElement || await (i.getDocumentElement == null ? void 0 : i.getDocumentElement(u.floating)),
680
+ padding: S = 0
681
+ } = $t(t, e), _ = $r(S), b = u[v ? g === "floating" ? "reference" : "floating" : g], p = Tt(await i.getClippingRect({
682
+ element: (r = await (i.isElement == null ? void 0 : i.isElement(b))) == null || r ? b : b.contextElement || await (i.getDocumentElement == null ? void 0 : i.getDocumentElement(u.floating)),
683
683
  boundary: l,
684
684
  rootBoundary: m,
685
685
  strategy: d
686
- })), h = g === "floating" ? {
686
+ })), f = g === "floating" ? {
687
687
  x: a,
688
- y: o,
688
+ y: s,
689
689
  width: c.floating.width,
690
690
  height: c.floating.height
691
- } : c.reference, T = await (i.getOffsetParent == null ? void 0 : i.getOffsetParent(u.floating)), w = await (i.isElement == null ? void 0 : i.isElement(T)) ? await (i.getScale == null ? void 0 : i.getScale(T)) || {
691
+ } : c.reference, T = await (i.getOffsetParent == null ? void 0 : i.getOffsetParent(u.floating)), P = await (i.isElement == null ? void 0 : i.isElement(T)) ? await (i.getScale == null ? void 0 : i.getScale(T)) || {
692
692
  x: 1,
693
693
  y: 1
694
694
  } : {
@@ -696,15 +696,15 @@ async function Gr(e, t) {
696
696
  y: 1
697
697
  }, C = Tt(i.convertOffsetParentRelativeRectToViewportRelativeRect ? await i.convertOffsetParentRelativeRectToViewportRelativeRect({
698
698
  elements: u,
699
- rect: h,
699
+ rect: f,
700
700
  offsetParent: T,
701
701
  strategy: d
702
- }) : h);
702
+ }) : f);
703
703
  return {
704
- top: (p.top - C.top + _.top) / w.y,
705
- bottom: (C.bottom - p.bottom + _.bottom) / w.y,
706
- left: (p.left - C.left + _.left) / w.x,
707
- right: (C.right - p.right + _.right) / w.x
704
+ top: (p.top - C.top + _.top) / P.y,
705
+ bottom: (C.bottom - p.bottom + _.bottom) / P.y,
706
+ left: (p.left - C.left + _.left) / P.x,
707
+ right: (C.right - p.right + _.right) / P.x
708
708
  };
709
709
  }
710
710
  const Fr = function(e) {
@@ -713,9 +713,9 @@ const Fr = function(e) {
713
713
  options: e,
714
714
  async fn(t) {
715
715
  const {
716
- x: n,
716
+ x: r,
717
717
  y: a,
718
- placement: o
718
+ placement: s
719
719
  } = t, {
720
720
  mainAxis: i = !0,
721
721
  crossAxis: c = !1,
@@ -723,38 +723,38 @@ const Fr = function(e) {
723
723
  fn: (b) => {
724
724
  let {
725
725
  x: p,
726
- y: h
726
+ y: f
727
727
  } = b;
728
728
  return {
729
729
  x: p,
730
- y: h
730
+ y: f
731
731
  };
732
732
  }
733
733
  },
734
734
  ...d
735
735
  } = $t(e, t), l = {
736
- x: n,
736
+ x: r,
737
737
  y: a
738
- }, m = await Gr(t, d), g = qr(Gt(o)), v = Br(g);
739
- let y = l[v], _ = l[g];
738
+ }, m = await Gr(t, d), g = Br(Gt(s)), v = qr(g);
739
+ let S = l[v], _ = l[g];
740
740
  if (i) {
741
- const b = v === "y" ? "top" : "left", p = v === "y" ? "bottom" : "right", h = y + m[b], T = y - m[p];
742
- y = bt(h, y, T);
741
+ const b = v === "y" ? "top" : "left", p = v === "y" ? "bottom" : "right", f = S + m[b], T = S - m[p];
742
+ S = bt(f, S, T);
743
743
  }
744
744
  if (c) {
745
- const b = g === "y" ? "top" : "left", p = g === "y" ? "bottom" : "right", h = _ + m[b], T = _ - m[p];
746
- _ = bt(h, _, T);
745
+ const b = g === "y" ? "top" : "left", p = g === "y" ? "bottom" : "right", f = _ + m[b], T = _ - m[p];
746
+ _ = bt(f, _, T);
747
747
  }
748
- const S = u.fn({
748
+ const E = u.fn({
749
749
  ...t,
750
- [v]: y,
750
+ [v]: S,
751
751
  [g]: _
752
752
  });
753
753
  return {
754
- ...S,
754
+ ...E,
755
755
  data: {
756
- x: S.x - n,
757
- y: S.y - a,
756
+ x: E.x - r,
757
+ y: E.y - a,
758
758
  enabled: {
759
759
  [v]: i,
760
760
  [g]: c
@@ -767,27 +767,27 @@ const Fr = function(e) {
767
767
  navItem: Kr,
768
768
  activeNavItem: zr,
769
769
  badge: Jr
770
- }, Ft = At({}), Z = () => wt(Ft), Wr = (e) => {
771
- const t = e.lastIndexOf("."), n = e.slice(0, t), a = e.slice(t + 1);
772
- return { name: n, extension: a };
773
- }, Qr = (e, t) => {
770
+ }, Ft = wt({}), Z = () => Pt(Ft), Qr = (e) => {
771
+ const t = e.lastIndexOf("."), r = e.slice(0, t), a = e.slice(t + 1);
772
+ return { name: r, extension: a };
773
+ }, Wr = (e, t) => {
774
774
  switch (e) {
775
- case P.Completed:
775
+ case A.Completed:
776
776
  return t < 100 ? "Closed" : "Completed";
777
- case P.Created:
777
+ case A.Created:
778
778
  return t > 0 ? "In progress" : "Not started";
779
- case P.InProgress:
779
+ case A.InProgress:
780
780
  return "In progress";
781
- case P.Queued:
781
+ case A.Queued:
782
782
  return "Queued";
783
- case P.NotStarted:
783
+ case A.NotStarted:
784
784
  return "Not started";
785
785
  default:
786
786
  return "-";
787
787
  }
788
788
  }, Yr = (e) => {
789
789
  const t = e.progress ?? 0;
790
- return e.status === P.Created && t > 0 ? P.InProgress : e.status;
790
+ return e.status === A.Created && t > 0 ? A.InProgress : e.status;
791
791
  }, Xr = {
792
792
  [ae.translation]: "#0891B2",
793
793
  [ae.review]: "#16922D",
@@ -795,21 +795,21 @@ const Fr = function(e) {
795
795
  [ae.automatic_translation]: "#60A5FA"
796
796
  }, Vr = (e) => {
797
797
  const t = [
798
- P.InProgress,
799
- P.Created,
800
- P.Completed
798
+ A.InProgress,
799
+ A.Created,
800
+ A.Completed
801
801
  ];
802
- return e.filter((n) => n.status !== "queued").map((n) => ({ ...n, status: Yr(n) })).sort((n, a) => n.status === P.InProgress && n.progress === 100 ? -1 : a.status === P.InProgress && a.progress === 100 ? 1 : n.status === a.status ? n.name < a.name ? 1 : -1 : t.indexOf(n.status) - t.indexOf(a.status));
802
+ return e.filter((r) => r.status !== "queued").map((r) => ({ ...r, status: Yr(r) })).sort((r, a) => r.status === A.InProgress && r.progress === 100 ? -1 : a.status === A.InProgress && a.progress === 100 ? 1 : r.status === a.status ? r.name < a.name ? 1 : -1 : t.indexOf(r.status) - t.indexOf(a.status));
803
803
  }, vt = (e) => [Le.InProgress, Le.Created].includes(e), Zr = (e, t) => vt(e.status) && vt(t.status) && (t.progress ?? 0) >= 100, ea = ({ task: e, language: t }) => {
804
- const [n, a] = I(!1), [o, i] = I(!1), { onLanguageCompleteConfirm: c, fetchTasks: u } = Z(), d = () => {
804
+ const [r, a] = I(!1), [s, i] = I(!1), { onLanguageCompleteConfirm: c, fetchTasks: u } = Z(), d = () => {
805
805
  i(!1);
806
806
  };
807
- return /* @__PURE__ */ f(He, { children: [
808
- o && /* @__PURE__ */ s(
807
+ return /* @__PURE__ */ h(He, { children: [
808
+ s && /* @__PURE__ */ o(
809
809
  an,
810
810
  {
811
811
  opened: !0,
812
- loading: n,
812
+ loading: r,
813
813
  title: `Are you finished with ${t.name}?`,
814
814
  confirmText: "Mark as done",
815
815
  closeText: "Cancel",
@@ -817,17 +817,17 @@ const Fr = function(e) {
817
817
  onConfirm: async () => {
818
818
  a(!0), await c({ task: e, language: t, closePrompt: d }), u();
819
819
  },
820
- children: /* @__PURE__ */ f(on, { status: "info", children: [
820
+ children: /* @__PURE__ */ h(sn, { status: "info", children: [
821
821
  "Make sure you are finished and ",
822
- /* @__PURE__ */ s("strong", { children: "mark it as done" }),
822
+ /* @__PURE__ */ o("strong", { children: "mark it as done" }),
823
823
  " to notify your team admin. This action cannot be undone, and the language might no longer be available for you to edit."
824
824
  ] })
825
825
  }
826
826
  ),
827
- /* @__PURE__ */ s(
828
- M,
827
+ /* @__PURE__ */ o(
828
+ U,
829
829
  {
830
- disabled: n,
830
+ disabled: r,
831
831
  onClick: () => {
832
832
  i(!0);
833
833
  },
@@ -840,202 +840,202 @@ const Fr = function(e) {
840
840
  langCellSecondary: na,
841
841
  langStatus: ra
842
842
  }, aa = ({ language: e, task: t }) => {
843
- const { getProjectUrl: n, langNameOnClick: a, langProgressOnClick: o } = Z(), i = e.progress ?? 0, c = e.status === P.Completed, u = Zr(t, e);
844
- return /* @__PURE__ */ f(
843
+ const { getProjectUrl: r, langNameOnClick: a, langProgressOnClick: s } = Z(), i = e.progress ?? 0, c = e.status === A.Completed, u = Zr(t, e);
844
+ return /* @__PURE__ */ h(
845
845
  "tr",
846
846
  {
847
847
  className: j({
848
848
  [Ne.langRowCompleted]: u
849
849
  }),
850
850
  children: [
851
- /* @__PURE__ */ s("td", { children: /* @__PURE__ */ s(q, { tooltip: "Open in bilingual view", children: /* @__PURE__ */ s(
852
- M,
851
+ /* @__PURE__ */ o("td", { children: /* @__PURE__ */ o(D, { tooltip: "Open in bilingual view", children: /* @__PURE__ */ o(
852
+ U,
853
853
  {
854
- href: n({ task: t, language: e }),
854
+ href: r({ task: t, language: e }),
855
855
  onClick: () => {
856
856
  a == null || a({ task: t, language: e });
857
857
  },
858
858
  children: e.name
859
859
  }
860
860
  ) }) }),
861
- /* @__PURE__ */ s("td", { className: Ne.langCellSecondary, children: u || c ? "0" : /* @__PURE__ */ s(q, { tooltip: "Open uncompleted items", children: /* @__PURE__ */ s(
862
- M,
861
+ /* @__PURE__ */ o("td", { className: Ne.langCellSecondary, children: u || c ? "0" : /* @__PURE__ */ o(D, { tooltip: "Open uncompleted items", children: /* @__PURE__ */ o(
862
+ U,
863
863
  {
864
- href: n({ task: t, language: e, taskUncompleted: !0 }),
864
+ href: r({ task: t, language: e, taskUncompleted: !0 }),
865
865
  onClick: () => {
866
- o == null || o({ task: t, language: e });
866
+ s == null || s({ task: t, language: e });
867
867
  },
868
868
  children: e.base_words_total - e.base_words_done
869
869
  }
870
870
  ) }) }),
871
- /* @__PURE__ */ f("td", { children: [
871
+ /* @__PURE__ */ h("td", { children: [
872
872
  i,
873
873
  "%"
874
874
  ] }),
875
- /* @__PURE__ */ s("td", { children: u ? /* @__PURE__ */ s(ea, { task: t, language: e }) : /* @__PURE__ */ s(
875
+ /* @__PURE__ */ o("td", { children: u ? /* @__PURE__ */ o(ea, { task: t, language: e }) : /* @__PURE__ */ o(
876
876
  "span",
877
877
  {
878
878
  className: `${Ne.langStatus} flex-row items-center justify-start`,
879
879
  "data-status": e.status,
880
- children: Qr(e.status, i)
880
+ children: Wr(e.status, i)
881
881
  }
882
882
  ) })
883
883
  ]
884
884
  }
885
885
  );
886
- }, oa = "_taskContainer_mt2or_1", sa = "_taskTitle_mt2or_21", ia = "_taskDescription_mt2or_28", ca = "_languagesTable_mt2or_35", la = "_metadata_mt2or_87", H = {
887
- taskContainer: oa,
888
- taskTitle: sa,
886
+ }, sa = "_taskContainer_mt2or_1", oa = "_taskTitle_mt2or_21", ia = "_taskDescription_mt2or_28", ca = "_languagesTable_mt2or_35", la = "_metadata_mt2or_87", q = {
887
+ taskContainer: sa,
888
+ taskTitle: oa,
889
889
  taskDescription: ia,
890
890
  languagesTable: ca,
891
891
  metadata: la
892
892
  }, ua = ({ task: e }) => {
893
- const { getProjectUrl: t, taskTitleOnClick: n } = Z(), a = Vr(e.langs), o = (i) => {
893
+ const { getProjectUrl: t, taskTitleOnClick: r } = Z(), a = Vr(e.langs), s = (i) => {
894
894
  window.open(
895
895
  `/style-guide/${e.team_id}/download/${i.id}/link`,
896
896
  "_blank",
897
897
  "noopener,noreferrer"
898
898
  );
899
899
  };
900
- return /* @__PURE__ */ f("div", { className: H.taskContainer, children: [
901
- /* @__PURE__ */ f("div", { className: "flex-row gap-1 items-center", children: [
902
- /* @__PURE__ */ f("div", { className: "flex-row gap-1 items-start flex-wrap", children: [
903
- /* @__PURE__ */ s(Oe, { color: Xr[e.task_type], variant: "solid", children: e.task_type.toLocaleUpperCase() }),
904
- e.due_date && /* @__PURE__ */ f(Oe, { color: "#EAB308", children: [
900
+ return /* @__PURE__ */ h("div", { className: q.taskContainer, children: [
901
+ /* @__PURE__ */ h("div", { className: "flex-row gap-1 items-center", children: [
902
+ /* @__PURE__ */ h("div", { className: "flex-row gap-1 items-start flex-wrap", children: [
903
+ /* @__PURE__ */ o(Oe, { color: Xr[e.task_type], variant: "solid", children: e.task_type.toLocaleUpperCase() }),
904
+ e.due_date && /* @__PURE__ */ h(Oe, { color: "#EAB308", children: [
905
905
  "DUE ",
906
- fr(un(e.due_date), "yyyy-MM-dd")
906
+ hr(un(e.due_date), "yyyy-MM-dd")
907
907
  ] })
908
908
  ] }),
909
- e.style_guides.length > 0 && /* @__PURE__ */ s("div", { className: "flex-row", children: e.style_guides.length === 1 ? /* @__PURE__ */ s(
909
+ e.style_guides.length > 0 && /* @__PURE__ */ o("div", { className: "flex-row", children: e.style_guides.length === 1 ? /* @__PURE__ */ o(
910
910
  xe,
911
911
  {
912
912
  size: "sm",
913
913
  variant: "secondary",
914
- onClick: () => o(e.style_guides[0]),
914
+ onClick: () => s(e.style_guides[0]),
915
915
  children: "Download style guide"
916
916
  }
917
- ) : /* @__PURE__ */ s(
917
+ ) : /* @__PURE__ */ o(
918
918
  le,
919
919
  {
920
- menuButton: /* @__PURE__ */ s(xe, { variant: "secondary", size: "sm", children: "Download style guide" }),
921
- children: /* @__PURE__ */ s(ue, { children: e.style_guides.map((i) => /* @__PURE__ */ s(
920
+ menuButton: /* @__PURE__ */ o(xe, { variant: "secondary", size: "sm", children: "Download style guide" }),
921
+ children: /* @__PURE__ */ o(ue, { children: e.style_guides.map((i) => /* @__PURE__ */ o(
922
922
  W,
923
923
  {
924
- onClick: () => o(i),
925
- children: Wr(i.name).name
924
+ onClick: () => s(i),
925
+ children: Qr(i.name).name
926
926
  },
927
927
  i.id
928
928
  )) })
929
929
  }
930
930
  ) })
931
931
  ] }),
932
- /* @__PURE__ */ s("h4", { className: H.taskTitle, children: /* @__PURE__ */ s(
933
- M,
932
+ /* @__PURE__ */ o("h4", { className: q.taskTitle, children: /* @__PURE__ */ o(
933
+ U,
934
934
  {
935
935
  href: t({ task: e, view: "multi" }),
936
936
  onClick: () => {
937
- n == null || n({ task: e });
937
+ r == null || r({ task: e });
938
938
  },
939
939
  children: e.title
940
940
  }
941
941
  ) }),
942
- e.description && /* @__PURE__ */ s("div", { className: H.taskDescription, children: mr(pr(e.description)) }),
943
- /* @__PURE__ */ f("table", { className: H.languagesTable, children: [
944
- /* @__PURE__ */ s("thead", { children: /* @__PURE__ */ f("tr", { children: [
945
- /* @__PURE__ */ s("th", { children: "Languages" }),
946
- /* @__PURE__ */ s("th", { children: "Words to do" }),
947
- /* @__PURE__ */ s("th", { children: "Progress" }),
948
- /* @__PURE__ */ s("th", { children: "Status" })
942
+ e.description && /* @__PURE__ */ o("div", { className: q.taskDescription, children: mr(pr(e.description)) }),
943
+ /* @__PURE__ */ h("table", { className: q.languagesTable, children: [
944
+ /* @__PURE__ */ o("thead", { children: /* @__PURE__ */ h("tr", { children: [
945
+ /* @__PURE__ */ o("th", { children: "Languages" }),
946
+ /* @__PURE__ */ o("th", { children: "Words to do" }),
947
+ /* @__PURE__ */ o("th", { children: "Progress" }),
948
+ /* @__PURE__ */ o("th", { children: "Status" })
949
949
  ] }) }),
950
- /* @__PURE__ */ s("tbody", { children: a.map((i) => /* @__PURE__ */ s(aa, { language: i, task: e }, i.lang_id)) })
950
+ /* @__PURE__ */ o("tbody", { children: a.map((i) => /* @__PURE__ */ o(aa, { language: i, task: e }, i.lang_id)) })
951
951
  ] }),
952
- /* @__PURE__ */ f("div", { "data-testid": "sidebar-task-overview-metadata", className: H.metadata, children: [
953
- /* @__PURE__ */ f("span", { children: [
952
+ /* @__PURE__ */ h("div", { "data-testid": "sidebar-task-overview-metadata", className: q.metadata, children: [
953
+ /* @__PURE__ */ h("span", { children: [
954
954
  "Source: ",
955
955
  e.source_lang_name
956
956
  ] }),
957
- /* @__PURE__ */ s("span", { children: e.created_by_fullname }),
958
- /* @__PURE__ */ f("span", { children: [
957
+ /* @__PURE__ */ o("span", { children: e.created_by_fullname }),
958
+ /* @__PURE__ */ h("span", { children: [
959
959
  "In ",
960
960
  e.project_name,
961
- e.master_branching_enabled === "1" && /* @__PURE__ */ s("div", { className: H.tag, children: e.branch_name ? e.branch_name : "master" })
961
+ e.master_branching_enabled === "1" && /* @__PURE__ */ o("div", { className: q.tag, children: e.branch_name ? e.branch_name : "master" })
962
962
  ] })
963
963
  ] })
964
964
  ] });
965
- }, A = {
965
+ }, w = {
966
966
  TaskCompleted: "task_completed",
967
967
  TaskClosed: "task_closed",
968
968
  Refresh: "refresh",
969
969
  ShowDialog: "show_dialog"
970
- }, da = "_loadingContainer_19d6m_1", ma = "_noTasksContainer_19d6m_7", _a = "_noTasksHeading_19d6m_14", ga = "_noTasksText_19d6m_18", pa = "_tasksContainer_19d6m_23", F = {
970
+ }, da = "_loadingContainer_19d6m_1", ma = "_noTasksContainer_19d6m_7", _a = "_noTasksHeading_19d6m_14", ga = "_noTasksText_19d6m_18", pa = "_tasksContainer_19d6m_23", K = {
971
971
  loadingContainer: da,
972
972
  noTasksContainer: ma,
973
973
  noTasksHeading: _a,
974
974
  noTasksText: ga,
975
975
  tasksContainer: pa
976
- }, fa = () => {
977
- const { tasks: e, onTasksWidgetOpen: t, loadingTasks: n, fetchTasks: a } = Z();
976
+ }, ha = () => {
977
+ const { tasks: e, onTasksWidgetOpen: t, loadingTasks: r, fetchTasks: a } = Z();
978
978
  return $e(() => ((async () => {
979
979
  const i = await a();
980
980
  t == null || t({ tasks: i });
981
- })(), document.addEventListener(A.TaskCompleted, a), document.addEventListener(A.TaskClosed, a), document.addEventListener(A.Refresh, a), () => {
982
- document.removeEventListener(A.TaskCompleted, a), document.removeEventListener(A.TaskClosed, a), document.removeEventListener(A.Refresh, a);
983
- })), n ? /* @__PURE__ */ s("div", { "data-testid": "sidebar-tasks-loading-popover", className: F.loadingContainer, children: /* @__PURE__ */ s(sn, {}) }) : e.length === 0 ? /* @__PURE__ */ f("div", { "data-testid": "sidebar-no-tasks-popover", className: F.noTasksContainer, children: [
984
- /* @__PURE__ */ s("h3", { className: F.noTasksHeading, children: "No tasks" }),
985
- /* @__PURE__ */ f("div", { className: F.noTasksText, children: [
981
+ })(), document.addEventListener(w.TaskCompleted, a), document.addEventListener(w.TaskClosed, a), document.addEventListener(w.Refresh, a), () => {
982
+ document.removeEventListener(w.TaskCompleted, a), document.removeEventListener(w.TaskClosed, a), document.removeEventListener(w.Refresh, a);
983
+ })), r ? /* @__PURE__ */ o("div", { "data-testid": "sidebar-tasks-loading-popover", className: K.loadingContainer, children: /* @__PURE__ */ o(on, {}) }) : e.length === 0 ? /* @__PURE__ */ h("div", { "data-testid": "sidebar-no-tasks-popover", className: K.noTasksContainer, children: [
984
+ /* @__PURE__ */ o("h3", { className: K.noTasksHeading, children: "No tasks" }),
985
+ /* @__PURE__ */ h("div", { className: K.noTasksText, children: [
986
986
  "Your incoming tasks will appear here.",
987
- /* @__PURE__ */ s("br", {}),
988
- /* @__PURE__ */ s(M, { href: "https://docs.lokalise.com/translation-workflow/tasks", target: "_new", children: "Learn more" })
987
+ /* @__PURE__ */ o("br", {}),
988
+ /* @__PURE__ */ o(U, { href: "https://docs.lokalise.com/translation-workflow/tasks", target: "_new", children: "Learn more" })
989
989
  ] })
990
- ] }) : /* @__PURE__ */ s("div", { "data-testid": "sidebar-tasks-popover", className: F.tasksContainer, children: e.map((o) => /* @__PURE__ */ s(ua, { task: o }, o.id)) });
991
- }, ha = ({ children: e, config: t }) => {
992
- const [n, a] = I([]), [o, i] = I(!0), [c, u] = I(0), {
990
+ ] }) : /* @__PURE__ */ o("div", { "data-testid": "sidebar-tasks-popover", className: K.tasksContainer, children: e.map((s) => /* @__PURE__ */ o(ua, { task: s }, s.id)) });
991
+ }, fa = ({ children: e, config: t }) => {
992
+ const [r, a] = I([]), [s, i] = I(!0), [c, u] = I(0), {
993
993
  getProjectUrl: d,
994
994
  onLanguageCompleteConfirm: l,
995
995
  onTasksWidgetOpen: m,
996
996
  langNameOnClick: g,
997
997
  langProgressOnClick: v,
998
- taskTitleOnClick: y
999
- } = t, { getTasks: _, getTasksCount: S } = t, b = async () => {
998
+ taskTitleOnClick: S
999
+ } = t, { getTasks: _, getTasksCount: E } = t, b = async () => {
1000
1000
  i(!0);
1001
1001
  const T = await _();
1002
1002
  return a(T), i(!1), T;
1003
1003
  }, p = async () => {
1004
- const T = await S();
1004
+ const T = await E();
1005
1005
  u(T);
1006
1006
  };
1007
- $e(() => (p(), document.addEventListener(A.TaskCompleted, p), document.addEventListener(A.TaskClosed, p), document.addEventListener(A.Refresh, p), () => {
1008
- document.removeEventListener(A.TaskCompleted, p), document.removeEventListener(A.TaskClosed, p), document.removeEventListener(A.Refresh, p);
1007
+ $e(() => (p(), document.addEventListener(w.TaskCompleted, p), document.addEventListener(w.TaskClosed, p), document.addEventListener(w.Refresh, p), () => {
1008
+ document.removeEventListener(w.TaskCompleted, p), document.removeEventListener(w.TaskClosed, p), document.removeEventListener(w.Refresh, p);
1009
1009
  }));
1010
- const h = {
1010
+ const f = {
1011
1011
  fetchTasks: b,
1012
- tasks: n,
1012
+ tasks: r,
1013
1013
  tasksCount: c,
1014
- loadingTasks: o,
1014
+ loadingTasks: s,
1015
1015
  getProjectUrl: d,
1016
1016
  onLanguageCompleteConfirm: l,
1017
1017
  onTasksWidgetOpen: m,
1018
1018
  langNameOnClick: g,
1019
1019
  langProgressOnClick: v,
1020
- taskTitleOnClick: y
1020
+ taskTitleOnClick: S
1021
1021
  };
1022
- return /* @__PURE__ */ s(Ft.Provider, { value: h, children: e });
1023
- }, ba = (e) => function(n) {
1024
- const { config: a, ...o } = n;
1025
- return /* @__PURE__ */ s(ha, { config: a, children: /* @__PURE__ */ s(e, { ...o }) });
1022
+ return /* @__PURE__ */ o(Ft.Provider, { value: f, children: e });
1023
+ }, ba = (e) => function(r) {
1024
+ const { config: a, ...s } = r;
1025
+ return /* @__PURE__ */ o(fa, { config: a, children: /* @__PURE__ */ o(e, { ...s }) });
1026
1026
  }, Ta = ba(() => {
1027
- const [e, t] = I(!1), { tasksCount: n } = Z();
1027
+ const [e, t] = I(!1), { tasksCount: r } = Z();
1028
1028
  return $e(() => {
1029
1029
  const a = () => {
1030
1030
  t(!0);
1031
1031
  };
1032
- return document.addEventListener(A.ShowDialog, a), () => {
1033
- document.removeEventListener(A.ShowDialog, a);
1032
+ return document.addEventListener(w.ShowDialog, a), () => {
1033
+ document.removeEventListener(w.ShowDialog, a);
1034
1034
  };
1035
- }), /* @__PURE__ */ s(q, { tooltip: "Tasks", placement: "right", children: /* @__PURE__ */ s(
1035
+ }), /* @__PURE__ */ o(D, { tooltip: "Tasks", placement: "right", children: /* @__PURE__ */ o(
1036
1036
  cn,
1037
1037
  {
1038
- content: /* @__PURE__ */ s(fa, {}),
1038
+ content: /* @__PURE__ */ o(ha, {}),
1039
1039
  placement: "right",
1040
1040
  open: e,
1041
1041
  onOpenChange: t,
@@ -1049,7 +1049,7 @@ const Fr = function(e) {
1049
1049
  }
1050
1050
  })
1051
1051
  ],
1052
- children: (a) => /* @__PURE__ */ f(
1052
+ children: (a) => /* @__PURE__ */ h(
1053
1053
  xe,
1054
1054
  {
1055
1055
  type: "button",
@@ -1059,107 +1059,107 @@ const Fr = function(e) {
1059
1059
  [je.activeNavItem]: a
1060
1060
  }),
1061
1061
  children: [
1062
- /* @__PURE__ */ s(ln, { size: "25px" }),
1063
- n > 0 && /* @__PURE__ */ s("div", { className: je.badge, "aria-label": `${n} items requiring attention`, children: n > 9 ? "9+" : n })
1062
+ /* @__PURE__ */ o(ln, { size: "25px" }),
1063
+ r > 0 && /* @__PURE__ */ o("div", { className: je.badge, "aria-label": `${r} items requiring attention`, children: r > 9 ? "9+" : r })
1064
1064
  ]
1065
1065
  }
1066
1066
  )
1067
1067
  }
1068
1068
  ) });
1069
- }), R = ({ children: e, ...t }) => /* @__PURE__ */ s("nav", { ...t, className: qn.sidebarContainer, children: e }), va = ({ children: e }) => /* @__PURE__ */ s("div", { children: e });
1069
+ }), R = ({ children: e, ...t }) => /* @__PURE__ */ o("nav", { ...t, className: Bn.sidebarContainer, children: e }), va = ({ children: e }) => /* @__PURE__ */ o("div", { children: e });
1070
1070
  R.Top = va;
1071
- const ya = ({ children: e }) => /* @__PURE__ */ s("div", { children: e });
1072
- R.Bottom = ya;
1071
+ const Sa = ({ children: e }) => /* @__PURE__ */ o("div", { children: e });
1072
+ R.Bottom = Sa;
1073
1073
  R.Avatar = Gn;
1074
1074
  R.IconLink = zn;
1075
- R.Menu = Qn;
1075
+ R.Menu = Wn;
1076
1076
  R.ProfileMenu = br;
1077
1077
  R.TeamSwitch = Nr;
1078
1078
  R.TeamMenuItem = Dt;
1079
1079
  R.UpgradeMenuItem = Mr;
1080
- R.ProfileSettingsMenuItem = yr;
1080
+ R.ProfileSettingsMenuItem = Sr;
1081
1081
  R.Tasks = Ta;
1082
- const Ea = "_breadcrumbsItem_1hm6a_1", Sa = "_breadcrumbs_1hm6a_1", yt = {
1083
- breadcrumbsItem: Ea,
1084
- breadcrumbs: Sa
1085
- }, Xo = ({ items: e }) => /* @__PURE__ */ s("nav", { "aria-label": "breadcrumb", className: yt.breadcrumbs, children: e.map((t, n) => /* @__PURE__ */ f(Pt, { children: [
1086
- /* @__PURE__ */ s(M, { className: yt.breadcrumbsItem, href: t.link, rel: "noreferrer", children: t.name }),
1087
- n < e.length - 1 && /* @__PURE__ */ s("span", { children: " — " })
1088
- ] }, `${t.link}-${t.name}`)) }), Ca = ({ items: e }) => /* @__PURE__ */ s(He, { children: e.map((t, n) => /* @__PURE__ */ f(Pt, { children: [
1089
- !!n && t.some((a) => a.visible) && /* @__PURE__ */ s(kt, {}),
1090
- t.filter(({ visible: a }) => a).map(({ link: a, label: o, onClick: i }) => /* @__PURE__ */ s(W, { href: a || "#", "aria-label": o, onClick: i, children: o }, o))
1091
- ] }, t[0].label)) }), wa = "_badge_1pc1v_1", Aa = "_tag_1pc1v_15", Pa = "_withNavLinkStyle_1pc1v_42 _withLinkStyle_1pc1v_21", Ra = "_disabled_1pc1v_57", ka = "_projectNavigationItem_1pc1v_61", Ia = "_projectNavigationItemDisabled_1pc1v_67", L = {
1092
- badge: wa,
1093
- tag: Aa,
1094
- withNavLinkStyle: Pa,
1082
+ const ya = "_breadcrumbsItem_1hm6a_1", Ea = "_breadcrumbs_1hm6a_1", St = {
1083
+ breadcrumbsItem: ya,
1084
+ breadcrumbs: Ea
1085
+ }, no = ({ items: e }) => /* @__PURE__ */ o("nav", { "aria-label": "breadcrumb", className: St.breadcrumbs, children: e.map((t, r) => /* @__PURE__ */ h(At, { children: [
1086
+ /* @__PURE__ */ o(U, { className: St.breadcrumbsItem, href: t.link, rel: "noreferrer", children: t.name }),
1087
+ r < e.length - 1 && /* @__PURE__ */ o("span", { children: " — " })
1088
+ ] }, `${t.link}-${t.name}`)) }), Ca = ({ items: e }) => /* @__PURE__ */ o(He, { children: e.map((t, r) => /* @__PURE__ */ h(At, { children: [
1089
+ !!r && t.some((a) => a.visible) && /* @__PURE__ */ o(kt, {}),
1090
+ t.filter(({ visible: a }) => a).map(({ link: a, label: s, onClick: i }) => /* @__PURE__ */ o(W, { href: a || "#", "aria-label": s, onClick: i, children: s }, s))
1091
+ ] }, t[0].label)) }), Pa = "_badge_1pc1v_1", wa = "_tag_1pc1v_15", Aa = "_withNavLinkStyle_1pc1v_42 _withLinkStyle_1pc1v_21", Ra = "_disabled_1pc1v_57", ka = "_projectNavigationItem_1pc1v_61", Ia = "_projectNavigationItemDisabled_1pc1v_67", M = {
1092
+ badge: Pa,
1093
+ tag: wa,
1094
+ withNavLinkStyle: Aa,
1095
1095
  disabled: Ra,
1096
1096
  projectNavigationItem: ka,
1097
1097
  projectNavigationItemDisabled: Ia
1098
- }, Et = ({ label: e, badge: t, novel: n }) => /* @__PURE__ */ f("div", { className: "flex gap-1", children: [
1099
- /* @__PURE__ */ f("div", { children: [
1100
- /* @__PURE__ */ s("span", { children: e }),
1101
- !!t && /* @__PURE__ */ s("div", { className: L.badge, "aria-label": `${t} items requiring attention`, children: t > 9 ? "9+" : t })
1098
+ }, yt = ({ label: e, badge: t, novel: r }) => /* @__PURE__ */ h("div", { className: "flex gap-1", children: [
1099
+ /* @__PURE__ */ h("div", { children: [
1100
+ /* @__PURE__ */ o("span", { children: e }),
1101
+ !!t && /* @__PURE__ */ o("div", { className: M.badge, "aria-label": `${t} items requiring attention`, children: t > 9 ? "9+" : t })
1102
1102
  ] }),
1103
- !!n && /* @__PURE__ */ s(Oe, { className: L.tag, children: n })
1103
+ !!r && /* @__PURE__ */ o(Oe, { className: M.tag, children: r })
1104
1104
  ] }), Me = nn(
1105
- ({ label: e, href: t = "", disabled: n = !1, badge: a, onClick: o, novel: i }, c) => /* @__PURE__ */ s(q, { tooltip: "You do not have access to this function", show: n, children: /* @__PURE__ */ s(
1105
+ ({ label: e, href: t = "", disabled: r = !1, badge: a, onClick: s, novel: i }, c) => /* @__PURE__ */ o(D, { tooltip: "You do not have access to this function", show: r, children: /* @__PURE__ */ o(
1106
1106
  "div",
1107
1107
  {
1108
- className: n ? L.projectNavigationItemDisabled : L.projectNavigationItem,
1109
- children: o || n || !t ? /* @__PURE__ */ s(
1108
+ className: r ? M.projectNavigationItemDisabled : M.projectNavigationItem,
1109
+ children: s || r || !t ? /* @__PURE__ */ o(
1110
1110
  "button",
1111
1111
  {
1112
1112
  type: "button",
1113
1113
  ref: c,
1114
- className: j(L.withNavLinkStyle, {
1115
- [L.disabled]: n
1114
+ className: j(M.withNavLinkStyle, {
1115
+ [M.disabled]: r
1116
1116
  }),
1117
- disabled: n,
1118
- onClick: o,
1119
- children: /* @__PURE__ */ s(Et, { label: e, badge: a, novel: i })
1117
+ disabled: r,
1118
+ onClick: s,
1119
+ children: /* @__PURE__ */ o(yt, { label: e, badge: a, novel: i })
1120
1120
  }
1121
- ) : /* @__PURE__ */ s("a", { href: t, className: L.withNavLinkStyle, children: /* @__PURE__ */ s(Et, { label: e, badge: a, novel: i }) })
1121
+ ) : /* @__PURE__ */ o("a", { href: t, className: M.withNavLinkStyle, children: /* @__PURE__ */ o(yt, { label: e, badge: a, novel: i }) })
1122
1122
  }
1123
1123
  ) })
1124
1124
  );
1125
1125
  Me.displayName = "NavigationTabsItem";
1126
- const ja = (e) => (e == null ? void 0 : e.some((t) => t.some((n) => n.visible))) ?? !1, Na = (e) => e.visible && (!e.dropdown || ja(e.dropdown)), Vo = ({ navigation: e, activeItem: t }) => /* @__PURE__ */ s("nav", { "aria-label": "Project", children: /* @__PURE__ */ s("ul", { className: B.navigationTabList, "aria-orientation": "horizontal", children: e.filter(Na).map((n) => {
1127
- var a, o, i;
1128
- return n.dropdown ? /* @__PURE__ */ s(
1126
+ const ja = (e) => (e == null ? void 0 : e.some((t) => t.some((r) => r.visible))) ?? !1, Na = (e) => e.visible && (!e.dropdown || ja(e.dropdown)), ro = ({ navigation: e, activeItem: t }) => /* @__PURE__ */ o("nav", { "aria-label": "Project", children: /* @__PURE__ */ o("ul", { className: B.navigationTabList, "aria-orientation": "horizontal", children: e.filter(Na).map((r) => {
1127
+ var a, s, i;
1128
+ return r.dropdown ? /* @__PURE__ */ o(
1129
1129
  "li",
1130
1130
  {
1131
1131
  className: B.navigationTab,
1132
- "data-testid": n.key,
1133
- "aria-selected": (a = n.isActive) == null ? void 0 : a.call(n, t),
1134
- children: /* @__PURE__ */ s(
1132
+ "data-testid": r.key,
1133
+ "aria-selected": (a = r.isActive) == null ? void 0 : a.call(r, t),
1134
+ children: /* @__PURE__ */ o(
1135
1135
  le,
1136
1136
  {
1137
- menuButton: ({ opened: c }) => /* @__PURE__ */ s(Me, { label: n.label, disabled: n.disabled, active: c }),
1138
- children: /* @__PURE__ */ s(ue, { children: /* @__PURE__ */ s(Ca, { items: n.dropdown }) })
1137
+ menuButton: ({ opened: c }) => /* @__PURE__ */ o(Me, { label: r.label, disabled: r.disabled, active: c }),
1138
+ children: /* @__PURE__ */ o(ue, { children: /* @__PURE__ */ o(Ca, { items: r.dropdown }) })
1139
1139
  }
1140
1140
  )
1141
1141
  },
1142
- n.key
1143
- ) : /* @__PURE__ */ s(
1142
+ r.key
1143
+ ) : /* @__PURE__ */ o(
1144
1144
  "li",
1145
1145
  {
1146
1146
  className: B.navigationTab,
1147
- "data-testid": n.key,
1148
- "aria-selected": (o = n.isActive) == null ? void 0 : o.call(n, t),
1149
- children: /* @__PURE__ */ s(
1147
+ "data-testid": r.key,
1148
+ "aria-selected": (s = r.isActive) == null ? void 0 : s.call(r, t),
1149
+ children: /* @__PURE__ */ o(
1150
1150
  Me,
1151
1151
  {
1152
- label: n.label,
1153
- href: n.link,
1154
- onClick: n.onClick,
1155
- disabled: n.disabled,
1156
- badge: n.badge,
1157
- novel: n.novel,
1158
- active: (i = n.isActive) == null ? void 0 : i.call(n, t)
1152
+ label: r.label,
1153
+ href: r.link,
1154
+ onClick: r.onClick,
1155
+ disabled: r.disabled,
1156
+ badge: r.badge,
1157
+ novel: r.novel,
1158
+ active: (i = r.isActive) == null ? void 0 : i.call(r, t)
1159
1159
  }
1160
1160
  )
1161
1161
  },
1162
- n.key
1162
+ r.key
1163
1163
  );
1164
1164
  }) }) });
1165
1165
  class k {
@@ -1193,8 +1193,8 @@ class k {
1193
1193
  * @param key - The key of the header
1194
1194
  * @param value - The value of the header
1195
1195
  */
1196
- add(t, n) {
1197
- return new k([...this.factories, () => ({ [t]: n })]);
1196
+ add(t, r) {
1197
+ return new k([...this.factories, () => ({ [t]: r })]);
1198
1198
  }
1199
1199
  /**
1200
1200
  * Adds multiple headers to the builder by providing an object or a promise of an object with the headers.
@@ -1298,8 +1298,8 @@ class k {
1298
1298
  * console.log(headers) // { 'Content-Type': 'application/json' }
1299
1299
  */
1300
1300
  async resolve() {
1301
- const t = this.factories.map((a) => a()), n = await Promise.all(t);
1302
- return Object.assign({}, ...n);
1301
+ const t = this.factories.map((a) => a()), r = await Promise.all(t);
1302
+ return Object.assign({}, ...r);
1303
1303
  }
1304
1304
  }
1305
1305
  function Kt(e) {
@@ -1311,35 +1311,35 @@ class Oa {
1311
1311
  }
1312
1312
  apply(t) {
1313
1313
  return t.from(async () => {
1314
- const n = this.middleware(k.create());
1315
- return n instanceof Promise ? n.then((a) => a.resolve()) : n.resolve();
1314
+ const r = this.middleware(k.create());
1315
+ return r instanceof Promise ? r.then((a) => a.resolve()) : r.resolve();
1316
1316
  });
1317
1317
  }
1318
1318
  }
1319
- const zt = r.union([
1320
- r.literal("owner"),
1321
- r.literal("admin"),
1322
- r.literal("biller"),
1323
- r.literal("member")
1324
- ]), xa = r.object({
1325
- userId: r.number(),
1326
- userUuid: r.string().uuid(),
1327
- teamId: r.number(),
1328
- teamUuid: r.string().uuid(),
1319
+ const zt = n.union([
1320
+ n.literal("owner"),
1321
+ n.literal("admin"),
1322
+ n.literal("biller"),
1323
+ n.literal("member")
1324
+ ]), xa = n.object({
1325
+ userId: n.number(),
1326
+ userUuid: n.string().uuid(),
1327
+ teamId: n.number(),
1328
+ teamUuid: n.string().uuid(),
1329
1329
  userTeamRole: zt,
1330
- userEmail: r.string().email(),
1331
- userName: r.string(),
1332
- userCurrentTeamId: r.number(),
1333
- planId: r.number(),
1334
- planName: r.string(),
1335
- isProviderAlpha: r.boolean(),
1336
- isFullyAuthenticated: r.boolean(),
1337
- exp: r.number()
1330
+ userEmail: n.string().email(),
1331
+ userName: n.string(),
1332
+ userCurrentTeamId: n.number(),
1333
+ planId: n.number(),
1334
+ planName: n.string(),
1335
+ isProviderAlpha: n.boolean(),
1336
+ isFullyAuthenticated: n.boolean(),
1337
+ exp: n.number()
1338
1338
  });
1339
1339
  function ee(e) {
1340
1340
  try {
1341
- const t = e.split(".")[1], n = atob(t);
1342
- return xa.parse(JSON.parse(n));
1341
+ const t = e.split(".")[1], r = atob(t);
1342
+ return xa.parse(JSON.parse(r));
1343
1343
  } catch {
1344
1344
  return;
1345
1345
  }
@@ -1351,22 +1351,22 @@ class ie extends Error {
1351
1351
  re(this, "status", 401);
1352
1352
  }
1353
1353
  }
1354
- function Zo(e) {
1354
+ function ao(e) {
1355
1355
  return Kt(async (t) => {
1356
1356
  var i, c;
1357
- const n = e.getCurrentToken() ?? await ((i = e.generateNewToken) == null ? void 0 : i.call(e));
1358
- if (!n)
1357
+ const r = e.getCurrentToken() ?? await ((i = e.generateNewToken) == null ? void 0 : i.call(e));
1358
+ if (!r)
1359
1359
  throw new ie();
1360
- const { exp: a } = ee(n.accessToken) ?? { exp: 0 };
1360
+ const { exp: a } = ee(r.accessToken) ?? { exp: 0 };
1361
1361
  if (!dn(new Date(a)))
1362
- return t.add("authorization", `Bearer ${n.accessToken}`);
1363
- const o = await e.refreshToken(n);
1364
- if (!o)
1362
+ return t.add("authorization", `Bearer ${r.accessToken}`);
1363
+ const s = await e.refreshToken(r);
1364
+ if (!s)
1365
1365
  throw new ie();
1366
- return (c = e.onNewTokenIssued) == null || c.call(e, o), t.add("authorization", `Bearer ${o.accessToken}`);
1366
+ return (c = e.onNewTokenIssued) == null || c.call(e, s), t.add("authorization", `Bearer ${s.accessToken}`);
1367
1367
  });
1368
1368
  }
1369
- const es = Kt(
1369
+ const so = Kt(
1370
1370
  (e) => e.and({ "x-lokalise-plugin": "true" })
1371
1371
  );
1372
1372
  function Jt() {
@@ -1377,10 +1377,10 @@ function La() {
1377
1377
  return Ue(document.cookie, "csrf_token") ?? null;
1378
1378
  }
1379
1379
  function Ue(e, t) {
1380
- var n, a;
1381
- return (a = (n = e.split(";").find((o) => o.trim().startsWith(`${t}=`))) == null ? void 0 : n.trim()) == null ? void 0 : a.substring(t.length + 1);
1380
+ var r, a;
1381
+ return (a = (r = e.split(";").find((s) => s.trim().startsWith(`${t}=`))) == null ? void 0 : r.trim()) == null ? void 0 : a.substring(t.length + 1);
1382
1382
  }
1383
- function ts() {
1383
+ function oo() {
1384
1384
  const e = Jt();
1385
1385
  if (!e)
1386
1386
  return;
@@ -1388,71 +1388,71 @@ function ts() {
1388
1388
  if (t)
1389
1389
  return { ...e, payload: t };
1390
1390
  }
1391
- const Wt = r.union([
1392
- r.object({ authorization: r.string() }),
1393
- r.object({ AUTHORIZATION: r.string() })
1394
- ]), Ma = r.union([
1395
- r.object({ "X-API-Token": r.string() }),
1396
- r.object({ "X-Api-Token": r.string() }),
1397
- r.object({ "x-api-token": r.string() }),
1398
- r.object({ "X-API-TOKEN": r.string() })
1399
- ]), Ua = r.union([
1400
- Wt,
1391
+ const Qt = n.union([
1392
+ n.object({ authorization: n.string() }),
1393
+ n.object({ AUTHORIZATION: n.string() })
1394
+ ]), Ma = n.union([
1395
+ n.object({ "X-API-Token": n.string() }),
1396
+ n.object({ "X-Api-Token": n.string() }),
1397
+ n.object({ "x-api-token": n.string() }),
1398
+ n.object({ "X-API-TOKEN": n.string() })
1399
+ ]), Ua = n.union([
1400
+ Qt,
1401
1401
  Ma
1402
- ]), Ha = r.union([
1403
- r.object({ "X-Lokalise-Plugin": r.string() }),
1404
- r.object({ "x-lokalise-plugin": r.string() }),
1405
- r.object({ "X-LOKALISE-PLUGIN": r.string() })
1406
- ]), U = Ua.and(Ha), Ba = r.object({
1407
- accessToken: r.string(),
1408
- refreshToken: r.string()
1409
- }), qa = r.union([
1410
- r.object({ "X-Csrf-Token": r.string() }),
1411
- r.object({ "X-CSRF-Token": r.string() }),
1412
- r.object({ "x-csrf-token": r.string() }),
1413
- r.object({ "X-CSRF-TOKEN": r.string() })
1414
- ]), Da = r.union([
1415
- Wt,
1416
- qa
1417
- ]), Ge = Q({
1402
+ ]), Ha = n.union([
1403
+ n.object({ "X-Lokalise-Plugin": n.string() }),
1404
+ n.object({ "x-lokalise-plugin": n.string() }),
1405
+ n.object({ "X-LOKALISE-PLUGIN": n.string() })
1406
+ ]), x = Ua.and(Ha), qa = n.object({
1407
+ accessToken: n.string(),
1408
+ refreshToken: n.string()
1409
+ }), Ba = n.union([
1410
+ n.object({ "X-Csrf-Token": n.string() }),
1411
+ n.object({ "X-CSRF-Token": n.string() }),
1412
+ n.object({ "x-csrf-token": n.string() }),
1413
+ n.object({ "X-CSRF-TOKEN": n.string() })
1414
+ ]), Da = n.union([
1415
+ Qt,
1416
+ Ba
1417
+ ]), Ge = Y({
1418
1418
  description: "Takes a teamId and returns a JWT token access and refresh token for the user",
1419
1419
  method: "post",
1420
- requestPathParamsSchema: r.object({ teamId: r.number() }),
1420
+ requestPathParamsSchema: n.object({ teamId: n.number() }),
1421
1421
  pathResolver: (e) => `/team/${e.teamId}/actions/get-user-token`,
1422
1422
  requestHeaderSchema: Da,
1423
- requestBodySchema: r.undefined(),
1423
+ requestBodySchema: n.undefined(),
1424
1424
  isEmptyResponseExpected: !0,
1425
- successResponseBodySchema: Ba
1425
+ successResponseBodySchema: qa
1426
1426
  });
1427
- function ns(e, t, n) {
1427
+ function io(e, t, r) {
1428
1428
  return async () => {
1429
1429
  const a = t();
1430
1430
  if (!a)
1431
1431
  throw new ie();
1432
- return D(e, Ge, {
1433
- pathParams: { teamId: Number(await n()) },
1432
+ return $(e, Ge, {
1433
+ pathParams: { teamId: Number(await r()) },
1434
1434
  headers: await k.create().add("x-csrf-token", a).resolve()
1435
1435
  });
1436
1436
  };
1437
1437
  }
1438
- function rs(e) {
1439
- return async ({ accessToken: t, refreshToken: n }) => {
1438
+ function co(e) {
1439
+ return async ({ accessToken: t, refreshToken: r }) => {
1440
1440
  const a = ee(t);
1441
1441
  if (!a)
1442
1442
  throw new ie();
1443
- return D(e, Ge, {
1443
+ return $(e, Ge, {
1444
1444
  pathParams: { teamId: a.teamId },
1445
- headers: await k.create().add("authorization", `Bearer ${n}`).resolve()
1445
+ headers: await k.create().add("authorization", `Bearer ${r}`).resolve()
1446
1446
  });
1447
1447
  };
1448
1448
  }
1449
1449
  const $a = {
1450
1450
  teamKey: (e) => ["getUserToken", e]
1451
- }, Ga = (e, t, n) => $({
1452
- ...n,
1453
- queryFn: async ({ queryKey: [a, o] }) => D(e, Ge, {
1451
+ }, Ga = (e, t, r) => H({
1452
+ ...r,
1453
+ queryFn: async ({ queryKey: [a, s] }) => $(e, Ge, {
1454
1454
  headers: await t.resolve(),
1455
- pathParams: { teamId: o }
1455
+ pathParams: { teamId: s }
1456
1456
  })
1457
1457
  }), ce = class ce extends CustomEvent {
1458
1458
  constructor(t) {
@@ -1462,408 +1462,457 @@ const $a = {
1462
1462
  }
1463
1463
  };
1464
1464
  re(ce, "eventName", "new-jwt-issued");
1465
- let z = ce;
1466
- function as(e, t, n) {
1467
- const a = La(), o = Ga(e, t.add("x-csrf-token", a ?? ""), {
1468
- queryKey: $a.teamKey(n),
1465
+ let J = ce;
1466
+ function lo(e, t, r) {
1467
+ const a = La(), s = Ga(e, t.add("x-csrf-token", a ?? ""), {
1468
+ queryKey: $a.teamKey(r),
1469
1469
  enabled: a !== void 0
1470
1470
  }), i = Ct();
1471
- return J(() => {
1472
- o.data && o.data.accessToken !== i.current && (window.dispatchEvent(new z(o.data)), i.current = o.data.accessToken);
1473
- }, [o.data]), o;
1471
+ return Q(() => {
1472
+ s.data && s.data.accessToken !== i.current && (window.dispatchEvent(new J(s.data)), i.current = s.data.accessToken);
1473
+ }, [s.data]), s;
1474
1474
  }
1475
- function Qt() {
1475
+ function Wt() {
1476
1476
  const [e, t] = I();
1477
- return J(() => {
1478
- const n = (o) => {
1479
- t(o.detail.payload);
1477
+ return Q(() => {
1478
+ const r = (s) => {
1479
+ t(s.detail.payload);
1480
1480
  }, a = Jt();
1481
- return t(a ? ee(a.accessToken) : void 0), window.addEventListener(z.eventName, n), () => {
1482
- window.removeEventListener(z.eventName, n);
1481
+ return t(a ? ee(a.accessToken) : void 0), window.addEventListener(J.eventName, r), () => {
1482
+ window.removeEventListener(J.eventName, r);
1483
1483
  };
1484
1484
  }, []), e;
1485
1485
  }
1486
- const Fa = U, Ka = r.object({
1487
- user_id: r.number(),
1488
- email: r.string().email(),
1489
- fullname: r.string(),
1490
- created_at: r.string(),
1491
- created_at_timestamp: r.number(),
1486
+ const Fa = x, Ka = n.object({
1487
+ user_id: n.number(),
1488
+ email: n.string().email(),
1489
+ fullname: n.string(),
1490
+ created_at: n.string(),
1491
+ created_at_timestamp: n.number(),
1492
1492
  role: zt
1493
- }), za = r.object({
1494
- teamId: r.number(),
1495
- userId: r.number()
1496
- }), Ja = r.object({
1497
- team_id: r.number(),
1493
+ }), za = n.object({
1494
+ teamId: n.number(),
1495
+ userId: n.number()
1496
+ }), Ja = n.object({
1497
+ team_id: n.number(),
1498
1498
  team_user: Ka
1499
- }), Wa = Y({
1499
+ }), Qa = X({
1500
1500
  description: "Get the details of a team user",
1501
1501
  requestHeaderSchema: Fa,
1502
1502
  requestPathParamsSchema: za,
1503
1503
  pathResolver: ({ teamId: e, userId: t }) => `/teams/${e}/users/${t}`,
1504
1504
  successResponseBodySchema: Ja
1505
- }), Qa = {
1505
+ }), Wa = {
1506
1506
  teamUserKey: (e, t) => ["GetTeamUsers", e, t]
1507
- }, Ya = (e, t, n) => $({
1508
- ...n,
1509
- queryFn: async ({ queryKey: [a, o, i] }) => X(e, Wa, {
1507
+ }, Ya = (e, t, r) => H({
1508
+ ...r,
1509
+ queryFn: async ({ queryKey: [a, s, i] }) => G(e, Qa, {
1510
1510
  headers: await t.resolve(),
1511
- pathParams: { teamId: o, userId: i }
1511
+ pathParams: { teamId: s, userId: i }
1512
1512
  })
1513
1513
  });
1514
- function os(e, t) {
1515
- const n = Qt();
1514
+ function uo(e, t) {
1515
+ const r = Wt();
1516
1516
  return Ya(e, t, {
1517
- queryKey: Qa.teamUserKey((n == null ? void 0 : n.teamId) ?? 0, (n == null ? void 0 : n.userId) ?? 0),
1518
- enabled: (n == null ? void 0 : n.userId) !== void 0 && n.teamId !== void 0
1517
+ queryKey: Wa.teamUserKey((r == null ? void 0 : r.teamId) ?? 0, (r == null ? void 0 : r.userId) ?? 0),
1518
+ enabled: (r == null ? void 0 : r.userId) !== void 0 && r.teamId !== void 0
1519
1519
  });
1520
1520
  }
1521
- const ss = U, Xa = r.object({
1522
- lang_id: r.number(),
1523
- lang_iso: r.string(),
1524
- lang_name: r.string(),
1525
- is_writable: r.union([r.literal(0), r.literal(1)])
1526
- }), Va = r.object({
1527
- user_id: r.number(),
1528
- email: r.string().email(),
1529
- fullname: r.string(),
1530
- created_at: r.string(),
1531
- created_at_timestamp: r.number(),
1532
- admin_rights: r.array(r.string()),
1533
- languages: r.array(Xa),
1534
- is_admin: r.boolean(),
1535
- is_reviewer: r.boolean()
1536
- }), Za = r.union([
1537
- r.object({ uuid: r.string().uuid() }),
1538
- r.object({ id: r.string() })
1539
- ]), eo = r.union([
1540
- r.object({ authenticatedUser: r.literal(!0) }),
1541
- r.object({ uuid: r.string().uuid() }),
1542
- r.object({ id: r.number() })
1543
- ]), to = r.object({
1521
+ const mo = x, Xa = n.object({
1522
+ lang_id: n.number(),
1523
+ lang_iso: n.string(),
1524
+ lang_name: n.string(),
1525
+ is_writable: n.union([n.literal(0), n.literal(1)])
1526
+ }), Va = n.object({
1527
+ user_id: n.number(),
1528
+ email: n.string().email(),
1529
+ fullname: n.string(),
1530
+ created_at: n.string(),
1531
+ created_at_timestamp: n.number(),
1532
+ admin_rights: n.array(n.string()),
1533
+ languages: n.array(Xa),
1534
+ is_admin: n.boolean(),
1535
+ is_reviewer: n.boolean()
1536
+ }), Za = n.union([
1537
+ n.object({ uuid: n.string().uuid() }),
1538
+ n.object({ id: n.string() })
1539
+ ]), es = n.union([
1540
+ n.object({ authenticatedUser: n.literal(!0) }),
1541
+ n.object({ uuid: n.string().uuid() }),
1542
+ n.object({ id: n.number() })
1543
+ ]), ts = n.object({
1544
1544
  project: Za,
1545
- contributor: eo
1546
- }), no = r.object({
1547
- project_id: r.string(),
1545
+ contributor: es
1546
+ }), ns = n.object({
1547
+ project_id: n.string(),
1548
1548
  contributor: Va
1549
- }), ro = (e) => "authenticatedUser" in e ? "me" : "uuid" in e ? e.uuid : `${e.id}`, ao = (e) => "uuid" in e ? e.uuid : e.id, oo = Y({
1549
+ }), rs = (e) => "authenticatedUser" in e ? "me" : "uuid" in e ? e.uuid : `${e.id}`, as = (e) => "uuid" in e ? e.uuid : e.id, ss = X({
1550
1550
  description: "Get the details of a project contributor",
1551
- requestHeaderSchema: U,
1552
- requestPathParamsSchema: to,
1553
- pathResolver: ({ project: e, contributor: t }) => `/projects/${ao(e)}/contributors/${ro(t)}`,
1554
- successResponseBodySchema: no
1555
- }), so = {
1551
+ requestHeaderSchema: x,
1552
+ requestPathParamsSchema: ts,
1553
+ pathResolver: ({ project: e, contributor: t }) => `/projects/${as(e)}/contributors/${rs(t)}`,
1554
+ successResponseBodySchema: ns
1555
+ }), os = {
1556
1556
  projectUserKey: (e) => ["RetrieveContributor", e]
1557
- }, io = (e, t, n) => $({
1558
- ...n,
1559
- queryFn: async ({ queryKey: [a, o] }) => X(e, oo, {
1560
- pathParams: o,
1557
+ }, is = (e, t, r) => H({
1558
+ ...r,
1559
+ queryFn: async ({ queryKey: [a, s] }) => G(e, ss, {
1560
+ pathParams: s,
1561
1561
  headers: await t.resolve()
1562
1562
  })
1563
1563
  });
1564
- function is(e, t, n) {
1565
- const a = Qt(), o = a != null && a.userId ? { id: a.userId } : { authenticatedUser: !0 };
1566
- return io(e, t, {
1567
- queryKey: so.projectUserKey({ project: { id: n }, contributor: o }),
1564
+ function _o(e, t, r) {
1565
+ const a = Wt(), s = a != null && a.userId ? { id: a.userId } : { authenticatedUser: !0 };
1566
+ return is(e, t, {
1567
+ queryKey: os.projectUserKey({ project: { id: r }, contributor: s }),
1568
1568
  enabled: a !== void 0
1569
1569
  });
1570
1570
  }
1571
- const co = r.object({
1572
- lang_iso: r.string(),
1573
- custom_iso: r.string().optional()
1574
- }), lo = r.object({
1575
- language_id: r.number(),
1576
- language_iso: r.string(),
1577
- progress: r.number(),
1578
- words_to_do: r.number(),
1579
- project_language_id: r.number(),
1580
- project_language_uuid: r.string().uuid()
1581
- }), uo = r.object({
1582
- projectId: r.string()
1583
- }), Yt = r.object({
1584
- lang_id: r.number(),
1585
- lang_iso: r.string(),
1586
- lang_name: r.string(),
1587
- is_rtl: r.boolean(),
1588
- plural_forms: r.array(r.string().optional()),
1589
- project_language_id: r.string(),
1590
- project_language_uuid: r.string().uuid()
1591
- }), mo = r.object({
1592
- project_id: r.string(),
1593
- project_uuid: r.string().uuid(),
1594
- languages: r.array(Yt)
1595
- }), _o = r.object({
1596
- projectId: r.string()
1597
- }), go = r.object({
1598
- languages: r.array(
1599
- r.object({
1600
- lang_iso: r.string(),
1601
- custom_iso: r.string().optional(),
1602
- custom_name: r.string().optional(),
1603
- custom_plural_forms: r.array(r.string()).optional()
1571
+ const cs = n.object({
1572
+ lang_iso: n.string(),
1573
+ custom_iso: n.string().optional()
1574
+ }), ls = n.object({
1575
+ language_id: n.number(),
1576
+ language_iso: n.string(),
1577
+ progress: n.number(),
1578
+ words_to_do: n.number(),
1579
+ project_language_id: n.number(),
1580
+ project_language_uuid: n.string().uuid()
1581
+ }), us = n.object({
1582
+ projectId: n.string()
1583
+ }), Yt = n.object({
1584
+ lang_id: n.number(),
1585
+ lang_iso: n.string(),
1586
+ lang_name: n.string(),
1587
+ is_rtl: n.boolean(),
1588
+ plural_forms: n.array(n.string().optional()),
1589
+ project_language_id: n.string(),
1590
+ project_language_uuid: n.string().uuid()
1591
+ }), ds = n.object({
1592
+ project_id: n.string(),
1593
+ project_uuid: n.string().uuid(),
1594
+ languages: n.array(Yt)
1595
+ }), ms = n.object({
1596
+ projectId: n.string()
1597
+ }), _s = n.object({
1598
+ languages: n.array(
1599
+ n.object({
1600
+ lang_iso: n.string(),
1601
+ custom_iso: n.string().optional(),
1602
+ custom_name: n.string().optional(),
1603
+ custom_plural_forms: n.array(n.string()).optional()
1604
1604
  })
1605
1605
  )
1606
- }), po = r.object({
1607
- project_id: r.string(),
1608
- project_uuid: r.string().uuid(),
1609
- languages: r.array(Yt),
1610
- errors: r.array(
1611
- r.object({
1612
- message: r.string(),
1613
- code: r.number(),
1614
- lang_iso: r.string()
1606
+ }), gs = n.object({
1607
+ project_id: n.string(),
1608
+ project_uuid: n.string().uuid(),
1609
+ languages: n.array(Yt),
1610
+ errors: n.array(
1611
+ n.object({
1612
+ message: n.string(),
1613
+ code: n.number(),
1614
+ lang_iso: n.string()
1615
1615
  })
1616
1616
  ).optional()
1617
- }), fo = r.object({
1618
- projectId: r.string()
1619
- }), ho = r.object({
1620
- langs: r.array(
1621
- r.object({
1622
- lang_iso: r.string(),
1623
- base_lang: r.boolean()
1617
+ }), ps = n.object({
1618
+ projectId: n.string()
1619
+ }), hs = n.object({
1620
+ langs: n.array(
1621
+ n.object({
1622
+ lang_iso: n.string(),
1623
+ base_lang: n.boolean()
1624
1624
  })
1625
1625
  )
1626
- }), bo = r.object({
1627
- result: r.boolean()
1628
- }), To = Y({
1626
+ }), fs = n.object({
1627
+ result: n.boolean()
1628
+ }), bs = X({
1629
1629
  description: "List of project languages",
1630
- requestHeaderSchema: U,
1631
- requestPathParamsSchema: uo,
1630
+ requestHeaderSchema: x,
1631
+ requestPathParamsSchema: us,
1632
1632
  pathResolver: ({ projectId: e }) => `/projects/${e}/languages`,
1633
- successResponseBodySchema: mo
1634
- }), cs = Q({
1633
+ successResponseBodySchema: ds
1634
+ }), go = Y({
1635
1635
  description: "Add languages to existing project",
1636
- requestHeaderSchema: U,
1636
+ requestHeaderSchema: x,
1637
1637
  method: "post",
1638
- requestPathParamsSchema: _o,
1638
+ requestPathParamsSchema: ms,
1639
1639
  pathResolver: ({ projectId: e }) => `/projects/${e}/languages`,
1640
- requestBodySchema: go,
1641
- successResponseBodySchema: po
1642
- }), vo = Q({
1640
+ requestBodySchema: _s,
1641
+ successResponseBodySchema: gs
1642
+ }), Ts = Y({
1643
1643
  description: "Bulk update project languages",
1644
- requestHeaderSchema: U,
1644
+ requestHeaderSchema: x,
1645
1645
  method: "put",
1646
- requestPathParamsSchema: fo,
1646
+ requestPathParamsSchema: ps,
1647
1647
  pathResolver: ({ projectId: e }) => `/projects/${e}/languages/bulk-update`,
1648
- requestBodySchema: ho,
1649
- successResponseBodySchema: bo
1650
- }), de = U, Fe = r.union([
1651
- r.literal("localization_files"),
1652
- r.literal("paged_documents"),
1653
- r.literal("marketing")
1654
- ]), yo = r.object({
1655
- per_platform_key_names: r.boolean(),
1656
- reviewing: r.boolean(),
1657
- auto_toggle_unverified: r.boolean(),
1658
- offline_translation: r.boolean(),
1659
- key_editing: r.boolean(),
1660
- inline_machine_translations: r.boolean(),
1661
- custom_translation_statuses: r.boolean(),
1662
- custom_translation_statuses_allow_multiple: r.boolean(),
1663
- segmentation: r.boolean(),
1664
- contributor_preview_download_enabled: r.boolean()
1665
- }), Eo = r.object({
1666
- not_reviewed: r.number(),
1667
- unverified: r.number(),
1668
- spelling_grammar: r.number(),
1669
- inconsistent_placeholders: r.number(),
1670
- inconsistent_html: r.number(),
1671
- different_number_of_urls: r.number(),
1672
- different_urls: r.number(),
1673
- leading_whitespace: r.number(),
1674
- trailing_whitespace: r.number(),
1675
- different_number_of_email_address: r.number(),
1676
- different_email_address: r.number(),
1677
- different_brackets: r.number(),
1678
- different_numbers: r.number(),
1679
- double_space: r.number(),
1680
- special_placeholder: r.number(),
1681
- unbalanced_brackets: r.number()
1682
- }), So = r.object({
1683
- progress_total: r.number(),
1684
- keys_total: r.number(),
1685
- team: r.number(),
1686
- base_words: r.number(),
1687
- qa_issues_total: r.number(),
1688
- qa_issues: Eo,
1689
- languages: r.array(lo)
1690
- }), me = r.object({
1691
- project_id: r.string(),
1692
- uuid: r.string().uuid(),
1648
+ requestBodySchema: hs,
1649
+ successResponseBodySchema: fs
1650
+ }), de = x, Fe = n.union([
1651
+ n.literal("localization_files"),
1652
+ n.literal("paged_documents"),
1653
+ n.literal("marketing")
1654
+ ]), vs = n.object({
1655
+ per_platform_key_names: n.boolean(),
1656
+ reviewing: n.boolean(),
1657
+ auto_toggle_unverified: n.boolean(),
1658
+ offline_translation: n.boolean(),
1659
+ key_editing: n.boolean(),
1660
+ inline_machine_translations: n.boolean(),
1661
+ custom_translation_statuses: n.boolean(),
1662
+ custom_translation_statuses_allow_multiple: n.boolean(),
1663
+ segmentation: n.boolean(),
1664
+ contributor_preview_download_enabled: n.boolean()
1665
+ }), Ss = n.object({
1666
+ not_reviewed: n.number(),
1667
+ unverified: n.number(),
1668
+ spelling_grammar: n.number(),
1669
+ inconsistent_placeholders: n.number(),
1670
+ inconsistent_html: n.number(),
1671
+ different_number_of_urls: n.number(),
1672
+ different_urls: n.number(),
1673
+ leading_whitespace: n.number(),
1674
+ trailing_whitespace: n.number(),
1675
+ different_number_of_email_address: n.number(),
1676
+ different_email_address: n.number(),
1677
+ different_brackets: n.number(),
1678
+ different_numbers: n.number(),
1679
+ double_space: n.number(),
1680
+ special_placeholder: n.number(),
1681
+ unbalanced_brackets: n.number()
1682
+ }), ys = n.object({
1683
+ progress_total: n.number(),
1684
+ keys_total: n.number(),
1685
+ team: n.number(),
1686
+ base_words: n.number(),
1687
+ qa_issues_total: n.number(),
1688
+ qa_issues: Ss,
1689
+ languages: n.array(ls)
1690
+ }), me = n.object({
1691
+ project_id: n.string(),
1692
+ uuid: n.string().uuid(),
1693
1693
  project_type: Fe,
1694
- name: r.string(),
1695
- description: r.string(),
1696
- created_at: r.string(),
1697
- created_at_timestamp: r.number(),
1698
- created_by: r.number(),
1699
- created_by_email: r.string(),
1700
- team_id: r.number(),
1701
- team_uuid: r.string().uuid(),
1702
- base_language_id: r.number(),
1703
- base_language_iso: r.string(),
1704
- base_project_language_id: r.number(),
1705
- base_project_language_uuid: r.string().uuid(),
1706
- settings: yo.optional(),
1707
- statistics: So.optional()
1708
- }), Co = r.object({
1709
- name: r.string(),
1710
- team_id: r.string(),
1711
- base_lang_iso: r.string(),
1712
- languages: r.array(co),
1694
+ name: n.string(),
1695
+ description: n.string(),
1696
+ created_at: n.string(),
1697
+ created_at_timestamp: n.number(),
1698
+ created_by: n.number(),
1699
+ created_by_email: n.string(),
1700
+ team_id: n.number(),
1701
+ team_uuid: n.string().uuid(),
1702
+ base_language_id: n.number(),
1703
+ base_language_iso: n.string(),
1704
+ base_project_language_id: n.number(),
1705
+ base_project_language_uuid: n.string().uuid(),
1706
+ settings: vs.optional(),
1707
+ statistics: ys.optional()
1708
+ }), Es = n.object({
1709
+ name: n.string(),
1710
+ team_id: n.string(),
1711
+ base_lang_iso: n.string(),
1712
+ languages: n.array(cs),
1713
1713
  project_type: Fe,
1714
- is_segmentation_enabled: r.boolean()
1715
- }), St = r.union([r.literal(0), r.literal(1)]), wo = r.object({
1714
+ is_segmentation_enabled: n.boolean()
1715
+ }), Et = n.union([n.literal(0), n.literal(1)]), Cs = n.object({
1716
1716
  filter_type: Fe.optional(),
1717
- filter_team_id: r.number().optional(),
1718
- filter_names: r.string().optional(),
1719
- include_statistics: St.optional(),
1720
- include_settings: St.optional(),
1721
- limit: r.number().optional(),
1722
- page: r.number().optional()
1723
- }), Ao = r.object({
1724
- projects: r.array(me)
1725
- }), Po = r.object({
1726
- project_id: r.string()
1727
- }), Ro = r.object({
1728
- project_id: r.string()
1729
- }), ko = r.object({
1730
- name: r.string().min(1),
1731
- description: r.string().optional()
1732
- }), _e = () => "/projects", Io = Q({
1717
+ filter_team_id: n.number().optional(),
1718
+ filter_names: n.string().optional(),
1719
+ include_statistics: Et.optional(),
1720
+ include_settings: Et.optional(),
1721
+ limit: n.number().optional(),
1722
+ page: n.number().optional()
1723
+ }), Ps = n.object({
1724
+ projects: n.array(me)
1725
+ }), ws = n.object({
1726
+ project_id: n.string()
1727
+ }), As = n.object({
1728
+ project_id: n.string()
1729
+ }), Rs = n.object({
1730
+ name: n.string().min(1),
1731
+ description: n.string().optional()
1732
+ }), _e = () => "/projects", ks = Y({
1733
1733
  description: "Create a new project",
1734
1734
  requestHeaderSchema: de,
1735
1735
  method: "post",
1736
1736
  pathResolver: _e,
1737
- requestBodySchema: Co,
1737
+ requestBodySchema: Es,
1738
1738
  successResponseBodySchema: me
1739
- }), jo = Y({
1739
+ }), Is = X({
1740
1740
  description: "List all projects",
1741
1741
  requestHeaderSchema: de,
1742
1742
  pathResolver: _e,
1743
- requestQuerySchema: wo,
1744
- successResponseBodySchema: Ao
1745
- }), No = Y({
1743
+ requestQuerySchema: Cs,
1744
+ successResponseBodySchema: Ps
1745
+ }), js = X({
1746
1746
  description: "Retrieve a project",
1747
1747
  requestHeaderSchema: de,
1748
- requestPathParamsSchema: Po,
1748
+ requestPathParamsSchema: ws,
1749
1749
  pathResolver: ({ project_id: e }) => `${_e()}/${e}`,
1750
1750
  successResponseBodySchema: me
1751
- }), Oo = Q({
1751
+ }), Ns = Y({
1752
1752
  description: "Update a project",
1753
1753
  requestHeaderSchema: de,
1754
1754
  method: "put",
1755
- requestPathParamsSchema: Ro,
1755
+ requestPathParamsSchema: As,
1756
1756
  pathResolver: ({ project_id: e }) => `${_e()}/${e}`,
1757
- requestBodySchema: ko,
1757
+ requestBodySchema: Rs,
1758
1758
  successResponseBodySchema: me
1759
+ }), Os = n.object({
1760
+ projectId: n.string(),
1761
+ translationId: n.number()
1762
+ }), xs = n.enum(["critical", "major", "minor"]), Ls = n.object({
1763
+ category: n.string(),
1764
+ comment: n.string(),
1765
+ severity: xs
1766
+ }), Ms = n.object({
1767
+ score: n.number(),
1768
+ hasMajorIssue: n.boolean(),
1769
+ hasCriticalIssue: n.boolean(),
1770
+ issues: n.array(Ls)
1759
1771
  });
1760
- function ls(e, t, n = {}) {
1761
- return Be({
1762
- ...n,
1763
- mutationFn: async (a) => D(e, Io, {
1772
+ function po(e, t, r = {}) {
1773
+ return qe({
1774
+ ...r,
1775
+ mutationFn: async (a) => $(e, ks, {
1764
1776
  headers: await t.resolve(),
1765
1777
  body: a
1766
1778
  })
1767
1779
  });
1768
1780
  }
1769
- const us = {
1781
+ const ho = {
1770
1782
  projectIdKey: (e) => ["listProjectLanguages", e]
1771
1783
  };
1772
- function ds(e, t, n) {
1773
- return $({
1774
- ...n,
1775
- queryFn: async ({ queryKey: [a, o] }) => X(e, To, {
1784
+ function fo(e, t, r) {
1785
+ return H({
1786
+ ...r,
1787
+ queryFn: async ({ queryKey: [a, s] }) => G(e, bs, {
1776
1788
  headers: await t.resolve(),
1777
- pathParams: { projectId: o }
1789
+ pathParams: { projectId: s }
1778
1790
  })
1779
1791
  });
1780
1792
  }
1781
- const ms = {
1793
+ const bo = {
1782
1794
  paramsKey: (e) => ["listProjects", e]
1783
1795
  };
1784
- function _s(e, t, n) {
1785
- return $({
1786
- ...n,
1787
- queryFn: async ({ queryKey: [a, o] }) => X(e, jo, {
1796
+ function To(e, t, r) {
1797
+ return H({
1798
+ ...r,
1799
+ queryFn: async ({ queryKey: [a, s] }) => G(e, Is, {
1788
1800
  headers: await t.resolve(),
1789
- queryParams: o
1801
+ queryParams: s
1790
1802
  })
1791
1803
  });
1792
1804
  }
1793
- const gs = {
1805
+ const vo = {
1794
1806
  projectIdKey: (e) => ["retrieveProject", e]
1795
1807
  };
1796
- function ps(e, t, n) {
1797
- return $({
1798
- ...n,
1799
- queryFn: async ({ queryKey: [a, o] }) => X(e, No, {
1808
+ function So(e, t, r) {
1809
+ return H({
1810
+ ...r,
1811
+ queryFn: async ({ queryKey: [a, s] }) => G(e, js, {
1800
1812
  headers: await t.resolve(),
1801
- pathParams: { project_id: o }
1813
+ pathParams: { project_id: s }
1802
1814
  })
1803
1815
  });
1804
1816
  }
1805
- function fs(e, t, n, a = {}) {
1806
- return Be({
1817
+ function yo(e, t, r, a = {}) {
1818
+ return qe({
1807
1819
  ...a,
1808
- mutationFn: async (o) => D(e, Oo, {
1820
+ mutationFn: async (s) => $(e, Ns, {
1809
1821
  headers: await t.resolve(),
1810
- body: o,
1811
- pathParams: n
1822
+ body: s,
1823
+ pathParams: r
1812
1824
  })
1813
1825
  });
1814
1826
  }
1815
- function hs(e, t, n, a = {}) {
1816
- return Be({
1827
+ function Eo(e, t, r, a = {}) {
1828
+ return qe({
1817
1829
  ...a,
1818
- mutationFn: async (o) => D(e, vo, {
1830
+ mutationFn: async (s) => $(e, Ts, {
1819
1831
  pathParams: t,
1820
- headers: await n.resolve(),
1821
- body: o
1832
+ headers: await r.resolve(),
1833
+ body: s
1834
+ })
1835
+ });
1836
+ }
1837
+ function Us(e) {
1838
+ return {
1839
+ isEmptyResponseExpected: e.isEmptyResponseExpected ?? !1,
1840
+ isNonJSONResponseExpected: e.isNonJSONResponseExpected ?? !1,
1841
+ method: "get",
1842
+ pathResolver: e.pathResolver,
1843
+ requestHeaderSchema: e.requestHeaderSchema,
1844
+ requestPathParamsSchema: e.requestPathParamsSchema,
1845
+ requestQuerySchema: e.requestQuerySchema,
1846
+ successResponseBodySchema: e.successResponseBodySchema,
1847
+ description: e.description,
1848
+ responseSchemasByStatusCode: e.responseSchemasByStatusCode,
1849
+ metadata: e.metadata
1850
+ };
1851
+ }
1852
+ const Hs = Us({
1853
+ description: "Generate translation quality score",
1854
+ requestHeaderSchema: x,
1855
+ requestPathParamsSchema: Os,
1856
+ pathResolver: ({ projectId: e, translationId: t }) => `/projects/${e}/translations/${t}/scoring-guidance`,
1857
+ successResponseBodySchema: Ms
1858
+ }), Co = {
1859
+ paramsKey: (e) => ["getScore", e]
1860
+ };
1861
+ function Po(e, t, r) {
1862
+ return H({
1863
+ ...r,
1864
+ queryFn: async ({ queryKey: [a, s] }) => G(e, Hs, {
1865
+ headers: await t.resolve(),
1866
+ pathParams: s
1822
1867
  })
1823
1868
  });
1824
1869
  }
1825
1870
  export {
1826
- _o as ADD_LANGUAGES_TO_PROJECT_PATH_PARAMS_SCHEMA,
1827
- go as ADD_LANGUAGES_TO_PROJECT_REQUEST_BODY_SCHEMA,
1828
- po as ADD_LANGUAGES_TO_PROJECT_RESPONSE_SCHEMA,
1829
- fo as BULK_UPDATE_PROJECT_LANGUAGES_PATH_PARAMS_SCHEMA,
1830
- ho as BULK_UPDATE_PROJECT_LANGUAGES_REQUEST_BODY_SCHEMA,
1831
- bo as BULK_UPDATE_PROJECT_LANGUAGES_RESPONSE_SCHEMA,
1832
- Xo as Breadcrumbs,
1833
- ss as CONTRIBUTOR_API_BASE_HEADER_SCHEMA,
1871
+ ms as ADD_LANGUAGES_TO_PROJECT_PATH_PARAMS_SCHEMA,
1872
+ _s as ADD_LANGUAGES_TO_PROJECT_REQUEST_BODY_SCHEMA,
1873
+ gs as ADD_LANGUAGES_TO_PROJECT_RESPONSE_SCHEMA,
1874
+ ps as BULK_UPDATE_PROJECT_LANGUAGES_PATH_PARAMS_SCHEMA,
1875
+ hs as BULK_UPDATE_PROJECT_LANGUAGES_REQUEST_BODY_SCHEMA,
1876
+ fs as BULK_UPDATE_PROJECT_LANGUAGES_RESPONSE_SCHEMA,
1877
+ no as Breadcrumbs,
1878
+ mo as CONTRIBUTOR_API_BASE_HEADER_SCHEMA,
1834
1879
  Xa as CONTRIBUTOR_LANGUAGE_SCHEMA,
1835
1880
  Va as CONTRIBUTOR_SCHEMA,
1836
- Co as CREATE_PROJECT_REQUEST_BODY_SCHEMA,
1837
- Bt as ENTERPRISE_OPENSOURCE_PLAN_ID,
1881
+ Es as CREATE_PROJECT_REQUEST_BODY_SCHEMA,
1882
+ qt as ENTERPRISE_OPENSOURCE_PLAN_ID,
1838
1883
  lr as ENTERPRISE_PLAN_IDS,
1839
1884
  ir as ESSENTIAL_PLAN_IDS,
1840
1885
  Ht as FREE_PLAN_ID,
1886
+ Os as GET_SCORE_REQUEST_QUERY_SCHEMA,
1887
+ Ms as GET_SCORE_RESPONSE_SCHEMA,
1841
1888
  k as HeaderBuilder,
1842
- Ba as JWT_TOKEN_SCHEMA,
1843
- Zo as JwtAuthHeaderBuilderMiddleware,
1844
- co as LANGUAGE_ISO_SCHEMA,
1889
+ Ls as ISSUE_SCHEMA,
1890
+ qa as JWT_TOKEN_SCHEMA,
1891
+ ao as JwtAuthHeaderBuilderMiddleware,
1892
+ cs as LANGUAGE_ISO_SCHEMA,
1845
1893
  Yt as LANGUAGE_SCHEMA,
1846
- lo as LANGUAGE_STATISTICS_SCHEMA,
1847
- wo as LIST_PROJECTS_REQUEST_QUERY_SCHEMA,
1848
- Ao as LIST_PROJECTS_SUCCESS_RESPONSE_BODY,
1849
- uo as LIST_PROJECT_LANGUAGES_PATH_PARAMS_SCHEMA,
1850
- mo as LIST_PROJECT_LANGUAGES_RESPONSE_SCHEMA,
1851
- se as NavigationPanel,
1852
- Vo as NavigationTabs,
1894
+ ls as LANGUAGE_STATISTICS_SCHEMA,
1895
+ Cs as LIST_PROJECTS_REQUEST_QUERY_SCHEMA,
1896
+ Ps as LIST_PROJECTS_SUCCESS_RESPONSE_BODY,
1897
+ us as LIST_PROJECT_LANGUAGES_PATH_PARAMS_SCHEMA,
1898
+ ds as LIST_PROJECT_LANGUAGES_RESPONSE_SCHEMA,
1899
+ oe as NavigationPanel,
1900
+ ro as NavigationTabs,
1853
1901
  de as PROJECT_API_BASE_HEADERS_SCHEMA,
1854
- Eo as PROJECT_QA_ISSUES_SCHEMA,
1902
+ Ss as PROJECT_QA_ISSUES_SCHEMA,
1855
1903
  me as PROJECT_SCHEMA,
1856
- yo as PROJECT_SETTINGS_SCHEMA,
1857
- So as PROJECT_STATISTICS_SCHEMA,
1904
+ vs as PROJECT_SETTINGS_SCHEMA,
1905
+ ys as PROJECT_STATISTICS_SCHEMA,
1858
1906
  Fe as PROJECT_TYPE_SCHEMA,
1859
1907
  cr as PRO_PLAN_IDS,
1860
- es as PublicApiHeaderBuilderMiddleware,
1861
- to as RETRIEVE_CONTRIBUTOR_PATH_PARAMS_SCHEMA,
1862
- no as RETRIEVE_CONTRIBUTOR_RESPONSE_SCHEMA,
1863
- Po as RETRIEVE_PROJECT_PATH_PARAM_SCHEMA,
1864
- sr as START_PLAN_IDS,
1908
+ so as PublicApiHeaderBuilderMiddleware,
1909
+ ts as RETRIEVE_CONTRIBUTOR_PATH_PARAMS_SCHEMA,
1910
+ ns as RETRIEVE_CONTRIBUTOR_RESPONSE_SCHEMA,
1911
+ ws as RETRIEVE_PROJECT_PATH_PARAM_SCHEMA,
1912
+ xs as SEVERITY_ENUM,
1913
+ or as START_PLAN_IDS,
1865
1914
  R as Sidebar,
1866
- P as SidebarTaskLanguageStatuses,
1915
+ A as SidebarTaskLanguageStatuses,
1867
1916
  Le as SidebarTaskStatuses,
1868
1917
  ae as SidebarTaskTypeOptions,
1869
1918
  zt as TEAM_ROLE_SCHEMA,
@@ -1871,58 +1920,60 @@ export {
1871
1920
  za as TEAM_USER_PATH_PARAMS_SCHEMA,
1872
1921
  Ja as TEAM_USER_RESPONSE_SCHEMA,
1873
1922
  Ka as TEAM_USER_SCHEMA,
1874
- or as TRIAL_PLAN_ID,
1875
- Ro as UPDATE_PROJECT_PATH_PARAMS_SCHEMA,
1876
- ko as UPDATE_PROJECT_REQUEST_BODY_SCHEMA,
1923
+ sr as TRIAL_PLAN_ID,
1924
+ As as UPDATE_PROJECT_PATH_PARAMS_SCHEMA,
1925
+ Rs as UPDATE_PROJECT_REQUEST_BODY_SCHEMA,
1877
1926
  Da as USER_TOKEN_REQUEST_HEADER_SCHEMA,
1878
1927
  ie as UnauthorizedError,
1879
- cs as addLanguagesToProject,
1880
- vo as bulkUpdateProjectLanguages,
1928
+ go as addLanguagesToProject,
1929
+ Ts as bulkUpdateProjectLanguages,
1881
1930
  mr as convertNewLineToBreakTag,
1882
1931
  Kt as createHeaderBuilderMiddleware,
1883
- Io as createProject,
1884
- fr as formatDate,
1885
- Yo as formatDateTz,
1886
- ns as generateTokenFromClassicSession,
1887
- ts as getAuthenticatedSessionDetailFromRequest,
1932
+ ks as createProject,
1933
+ hr as formatDate,
1934
+ to as formatDateTz,
1935
+ io as generateTokenFromClassicSession,
1936
+ oo as getAuthenticatedSessionDetailFromRequest,
1888
1937
  La as getCsrfTokenFromCookie,
1889
1938
  Jt as getJwtTokenFromCookie,
1890
- Wa as getTeamUser,
1891
- Qa as getTeamUsersQueryKey,
1939
+ Co as getScoreKey,
1940
+ Qa as getTeamUser,
1941
+ Wa as getTeamUsersQueryKey,
1892
1942
  Ge as getUserToken,
1893
1943
  $a as getUserTokenKey,
1894
- Qo as isEnterpriseOpenSourcePlan,
1895
- Jo as isEnterprisePlan,
1896
- Ko as isEssentialPlan,
1944
+ eo as isEnterpriseOpenSourcePlan,
1945
+ Vs as isEnterprisePlan,
1946
+ Ys as isEssentialPlan,
1897
1947
  De as isFreePlan,
1898
- Wo as isPaidPlan,
1899
- zo as isProPlan,
1900
- Fo as isStartPlan,
1901
- qt as isTrialPlan,
1902
- To as listProjectLanguages,
1903
- us as listProjectLanguagesKey,
1904
- jo as listProjects,
1905
- ms as listProjectsKey,
1948
+ Zs as isPaidPlan,
1949
+ Xs as isProPlan,
1950
+ Ws as isStartPlan,
1951
+ Bt as isTrialPlan,
1952
+ bs as listProjectLanguages,
1953
+ ho as listProjectLanguagesKey,
1954
+ Is as listProjects,
1955
+ bo as listProjectsKey,
1906
1956
  pr as makeUrlClickable,
1907
1957
  ee as parseJwtTokenPayload,
1908
- rs as refreshExpiredToken,
1909
- oo as retrieveContributor,
1910
- so as retrieveContributorKeys,
1911
- No as retrieveProject,
1912
- gs as retrieveProjectQueryKey,
1913
- Oo as updateProject,
1914
- is as useAuthenticatedProjectContributor,
1915
- Qt as useAuthenticatedSessionPayload,
1916
- os as useAuthenticatedUser,
1917
- hs as useBulkUpdateProjectLanguagesMutation,
1918
- ls as useCreateProjectMutation,
1958
+ co as refreshExpiredToken,
1959
+ ss as retrieveContributor,
1960
+ os as retrieveContributorKeys,
1961
+ js as retrieveProject,
1962
+ vo as retrieveProjectQueryKey,
1963
+ Ns as updateProject,
1964
+ _o as useAuthenticatedProjectContributor,
1965
+ Wt as useAuthenticatedSessionPayload,
1966
+ uo as useAuthenticatedUser,
1967
+ Eo as useBulkUpdateProjectLanguagesMutation,
1968
+ po as useCreateProjectMutation,
1919
1969
  $e as useEffectOnce,
1920
- as as useGetPromotedClassicSessionJwtQuery,
1970
+ lo as useGetPromotedClassicSessionJwtQuery,
1971
+ Po as useGetScoreQuery,
1921
1972
  Ya as useGetTeamUsersQuery,
1922
1973
  Ga as useGetUserTokenQuery,
1923
- ds as useListProjectLanguagesQuery,
1924
- _s as useListProjectsQuery,
1925
- io as useRetrieveContributorQuery,
1926
- ps as useRetrieveProjectQuery,
1927
- fs as useUpdateProjectMutation
1974
+ fo as useListProjectLanguagesQuery,
1975
+ To as useListProjectsQuery,
1976
+ is as useRetrieveContributorQuery,
1977
+ So as useRetrieveProjectQuery,
1978
+ yo as useUpdateProjectMutation
1928
1979
  };