@lokalise/harmony 1.6.0-exp-jwtutils.17 → 1.6.0-exp-jwtutils.18
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.cjs +1 -1
- package/dist/harmony.mjs +723 -583
- package/dist/types/src/features/publicApi/hooks/useCreateProjectMutation.d.ts +6 -6
- package/dist/types/src/features/publicApi/hooks/useListProjectsQuery.d.ts +1 -1
- package/dist/types/src/features/publicApi/hooks/useRetrieveProjectQuery.d.ts +5 -5
- package/dist/types/src/features/publicApi/index.d.ts +7 -0
- package/dist/types/src/features/publicApi/projects.d.ts +28 -28
- package/dist/types/src/features/publicApi/types/project.d.ts +10 -10
- package/package.json +1 -1
package/dist/harmony.mjs
CHANGED
@@ -1,149 +1,149 @@
|
|
1
|
-
var
|
2
|
-
var
|
3
|
-
var
|
4
|
-
import { jsx as i, jsxs as
|
5
|
-
import * as
|
6
|
-
import { useRef as
|
7
|
-
import { Tooltip as
|
8
|
-
import { z as
|
9
|
-
import {
|
10
|
-
import { buildPayloadRoute as
|
11
|
-
import { useQuery as
|
12
|
-
import { buildGetRoute as
|
13
|
-
import { format as
|
14
|
-
import { toZonedTime as
|
15
|
-
var
|
16
|
-
function
|
1
|
+
var It = Object.defineProperty;
|
2
|
+
var Et = (e, t, n) => t in e ? It(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
|
3
|
+
var Ce = (e, t, n) => Et(e, typeof t != "symbol" ? t + "" : t, n);
|
4
|
+
import { jsx as i, jsxs as p, Fragment as tt } from "react/jsx-runtime";
|
5
|
+
import * as q from "react";
|
6
|
+
import { useRef as nt, useState as ge, useCallback as je, useEffect as M, useContext as Pt, createContext as kt, cloneElement as Nt, Fragment as rt, forwardRef as Ct } from "react";
|
7
|
+
import { Tooltip as he, Link as at, Menu as pe, MenuList as ve, CaretUpIcon as jt, UserIcon as ot, MenuItem as J, MenuDivider as it, Tag as Rt } from "@lokalise/louis";
|
8
|
+
import { z as r } from "zod";
|
9
|
+
import { sendByPayloadRoute as K, sendByGetRoute as W } from "@lokalise/frontend-http-client";
|
10
|
+
import { buildPayloadRoute as st } from "@lokalise/universal-ts-utils/api-contracts/apiContracts";
|
11
|
+
import { useMutation as At, useQuery as U } from "@tanstack/react-query";
|
12
|
+
import { buildGetRoute as Q } from "@lokalise/universal-ts-utils/node";
|
13
|
+
import { format as ct } from "date-fns";
|
14
|
+
import { toZonedTime as Ot } from "date-fns-tz";
|
15
|
+
var H = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
|
16
|
+
function lt(e) {
|
17
17
|
return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
|
18
18
|
}
|
19
|
-
var
|
20
|
-
function
|
21
|
-
if (
|
22
|
-
|
19
|
+
var Z, Re;
|
20
|
+
function Te() {
|
21
|
+
if (Re) return Z;
|
22
|
+
Re = 1;
|
23
23
|
function e(t) {
|
24
24
|
var n = typeof t;
|
25
25
|
return t != null && (n == "object" || n == "function");
|
26
26
|
}
|
27
|
-
return
|
28
|
-
}
|
29
|
-
var
|
30
|
-
function
|
31
|
-
if (
|
32
|
-
|
33
|
-
var e = typeof
|
34
|
-
return
|
35
|
-
}
|
36
|
-
var
|
37
|
-
function
|
38
|
-
if (
|
39
|
-
|
40
|
-
var e =
|
41
|
-
return
|
42
|
-
}
|
43
|
-
var
|
44
|
-
function
|
45
|
-
if (
|
46
|
-
|
47
|
-
var e =
|
27
|
+
return Z = e, Z;
|
28
|
+
}
|
29
|
+
var X, Ae;
|
30
|
+
function Lt() {
|
31
|
+
if (Ae) return X;
|
32
|
+
Ae = 1;
|
33
|
+
var e = typeof H == "object" && H && H.Object === Object && H;
|
34
|
+
return X = e, X;
|
35
|
+
}
|
36
|
+
var ee, Oe;
|
37
|
+
function ut() {
|
38
|
+
if (Oe) return ee;
|
39
|
+
Oe = 1;
|
40
|
+
var e = Lt(), t = typeof self == "object" && self && self.Object === Object && self, n = e || t || Function("return this")();
|
41
|
+
return ee = n, ee;
|
42
|
+
}
|
43
|
+
var te, Le;
|
44
|
+
function qt() {
|
45
|
+
if (Le) return te;
|
46
|
+
Le = 1;
|
47
|
+
var e = ut(), t = function() {
|
48
48
|
return e.Date.now();
|
49
49
|
};
|
50
|
-
return
|
50
|
+
return te = t, te;
|
51
51
|
}
|
52
|
-
var
|
53
|
-
function
|
54
|
-
if (
|
55
|
-
|
52
|
+
var ne, qe;
|
53
|
+
function Mt() {
|
54
|
+
if (qe) return ne;
|
55
|
+
qe = 1;
|
56
56
|
var e = /\s/;
|
57
57
|
function t(n) {
|
58
|
-
for (var
|
58
|
+
for (var a = n.length; a-- && e.test(n.charAt(a)); )
|
59
59
|
;
|
60
|
-
return
|
60
|
+
return a;
|
61
61
|
}
|
62
|
-
return
|
62
|
+
return ne = t, ne;
|
63
63
|
}
|
64
|
-
var
|
65
|
-
function
|
66
|
-
if (
|
67
|
-
|
68
|
-
var e =
|
69
|
-
function n(
|
70
|
-
return
|
64
|
+
var re, Me;
|
65
|
+
function Ut() {
|
66
|
+
if (Me) return re;
|
67
|
+
Me = 1;
|
68
|
+
var e = Mt(), t = /^\s+/;
|
69
|
+
function n(a) {
|
70
|
+
return a && a.slice(0, e(a) + 1).replace(t, "");
|
71
71
|
}
|
72
|
-
return
|
72
|
+
return re = n, re;
|
73
73
|
}
|
74
|
-
var
|
75
|
-
function
|
76
|
-
if (
|
77
|
-
|
78
|
-
var e =
|
79
|
-
return
|
74
|
+
var ae, Ue;
|
75
|
+
function dt() {
|
76
|
+
if (Ue) return ae;
|
77
|
+
Ue = 1;
|
78
|
+
var e = ut(), t = e.Symbol;
|
79
|
+
return ae = t, ae;
|
80
80
|
}
|
81
|
-
var
|
82
|
-
function
|
83
|
-
if (
|
84
|
-
|
85
|
-
var e =
|
86
|
-
function
|
87
|
-
var u = n.call(c,
|
81
|
+
var oe, xe;
|
82
|
+
function xt() {
|
83
|
+
if (xe) return oe;
|
84
|
+
xe = 1;
|
85
|
+
var e = dt(), t = Object.prototype, n = t.hasOwnProperty, a = t.toString, o = e ? e.toStringTag : void 0;
|
86
|
+
function s(c) {
|
87
|
+
var u = n.call(c, o), d = c[o];
|
88
88
|
try {
|
89
|
-
c[
|
89
|
+
c[o] = void 0;
|
90
90
|
var l = !0;
|
91
91
|
} catch {
|
92
92
|
}
|
93
|
-
var m =
|
94
|
-
return l && (u ? c[
|
93
|
+
var m = a.call(c);
|
94
|
+
return l && (u ? c[o] = d : delete c[o]), m;
|
95
95
|
}
|
96
|
-
return
|
96
|
+
return oe = s, oe;
|
97
97
|
}
|
98
|
-
var
|
99
|
-
function
|
100
|
-
if (
|
101
|
-
|
98
|
+
var ie, Be;
|
99
|
+
function Bt() {
|
100
|
+
if (Be) return ie;
|
101
|
+
Be = 1;
|
102
102
|
var e = Object.prototype, t = e.toString;
|
103
|
-
function n(
|
104
|
-
return t.call(
|
103
|
+
function n(a) {
|
104
|
+
return t.call(a);
|
105
105
|
}
|
106
|
-
return
|
106
|
+
return ie = n, ie;
|
107
107
|
}
|
108
|
-
var
|
109
|
-
function
|
110
|
-
if (
|
111
|
-
|
112
|
-
var e =
|
108
|
+
var se, $e;
|
109
|
+
function $t() {
|
110
|
+
if ($e) return se;
|
111
|
+
$e = 1;
|
112
|
+
var e = dt(), t = xt(), n = Bt(), a = "[object Null]", o = "[object Undefined]", s = e ? e.toStringTag : void 0;
|
113
113
|
function c(u) {
|
114
|
-
return u == null ? u === void 0 ?
|
114
|
+
return u == null ? u === void 0 ? o : a : s && s in Object(u) ? t(u) : n(u);
|
115
115
|
}
|
116
|
-
return
|
116
|
+
return se = c, se;
|
117
117
|
}
|
118
|
-
var
|
119
|
-
function
|
120
|
-
if (
|
121
|
-
|
118
|
+
var ce, He;
|
119
|
+
function Ht() {
|
120
|
+
if (He) return ce;
|
121
|
+
He = 1;
|
122
122
|
function e(t) {
|
123
123
|
return t != null && typeof t == "object";
|
124
124
|
}
|
125
|
-
return
|
125
|
+
return ce = e, ce;
|
126
126
|
}
|
127
|
-
var
|
128
|
-
function
|
129
|
-
if (
|
130
|
-
|
131
|
-
var e =
|
132
|
-
function
|
133
|
-
return typeof
|
127
|
+
var le, De;
|
128
|
+
function Dt() {
|
129
|
+
if (De) return le;
|
130
|
+
De = 1;
|
131
|
+
var e = $t(), t = Ht(), n = "[object Symbol]";
|
132
|
+
function a(o) {
|
133
|
+
return typeof o == "symbol" || t(o) && e(o) == n;
|
134
134
|
}
|
135
|
-
return
|
135
|
+
return le = a, le;
|
136
136
|
}
|
137
|
-
var
|
138
|
-
function
|
139
|
-
if (
|
140
|
-
|
141
|
-
var e =
|
137
|
+
var ue, ze;
|
138
|
+
function zt() {
|
139
|
+
if (ze) return ue;
|
140
|
+
ze = 1;
|
141
|
+
var e = Ut(), t = Te(), n = Dt(), a = NaN, o = /^[-+]0x[0-9a-f]+$/i, s = /^0b[01]+$/i, c = /^0o[0-7]+$/i, u = parseInt;
|
142
142
|
function d(l) {
|
143
143
|
if (typeof l == "number")
|
144
144
|
return l;
|
145
145
|
if (n(l))
|
146
|
-
return
|
146
|
+
return a;
|
147
147
|
if (t(l)) {
|
148
148
|
var m = typeof l.valueOf == "function" ? l.valueOf() : l;
|
149
149
|
l = t(m) ? m + "" : m;
|
@@ -151,123 +151,123 @@ function Bt() {
|
|
151
151
|
if (typeof l != "string")
|
152
152
|
return l === 0 ? l : +l;
|
153
153
|
l = e(l);
|
154
|
-
var
|
155
|
-
return
|
154
|
+
var g = s.test(l);
|
155
|
+
return g || c.test(l) ? u(l.slice(2), g ? 2 : 8) : o.test(l) ? a : +l;
|
156
156
|
}
|
157
|
-
return
|
157
|
+
return ue = d, ue;
|
158
158
|
}
|
159
|
-
var
|
160
|
-
function
|
161
|
-
if (
|
162
|
-
|
163
|
-
var e =
|
159
|
+
var de, Fe;
|
160
|
+
function mt() {
|
161
|
+
if (Fe) return de;
|
162
|
+
Fe = 1;
|
163
|
+
var e = Te(), t = qt(), n = zt(), a = "Expected a function", o = Math.max, s = Math.min;
|
164
164
|
function c(u, d, l) {
|
165
|
-
var m,
|
165
|
+
var m, g, T, y, b, w, I = 0, P = !1, _ = !1, E = !0;
|
166
166
|
if (typeof u != "function")
|
167
|
-
throw new TypeError(
|
168
|
-
d = n(d) || 0, e(l) && (
|
167
|
+
throw new TypeError(a);
|
168
|
+
d = n(d) || 0, e(l) && (P = !!l.leading, _ = "maxWait" in l, T = _ ? o(n(l.maxWait) || 0, d) : T, E = "trailing" in l ? !!l.trailing : E);
|
169
169
|
function v(f) {
|
170
|
-
var
|
171
|
-
return m =
|
170
|
+
var k = m, L = g;
|
171
|
+
return m = g = void 0, I = f, y = u.apply(L, k), y;
|
172
172
|
}
|
173
|
-
function
|
174
|
-
return
|
173
|
+
function h(f) {
|
174
|
+
return I = f, b = setTimeout($, d), P ? v(f) : y;
|
175
175
|
}
|
176
|
-
function
|
177
|
-
var
|
178
|
-
return
|
176
|
+
function B(f) {
|
177
|
+
var k = f - w, L = f - I, Ne = d - k;
|
178
|
+
return _ ? s(Ne, T - L) : Ne;
|
179
179
|
}
|
180
|
-
function
|
181
|
-
var
|
182
|
-
return
|
180
|
+
function Pe(f) {
|
181
|
+
var k = f - w, L = f - I;
|
182
|
+
return w === void 0 || k >= d || k < 0 || _ && L >= T;
|
183
183
|
}
|
184
|
-
function
|
184
|
+
function $() {
|
185
185
|
var f = t();
|
186
|
-
if (
|
187
|
-
return
|
188
|
-
|
186
|
+
if (Pe(f))
|
187
|
+
return ke(f);
|
188
|
+
b = setTimeout($, B(f));
|
189
189
|
}
|
190
|
-
function
|
191
|
-
return
|
190
|
+
function ke(f) {
|
191
|
+
return b = void 0, E && m ? v(f) : (m = g = void 0, y);
|
192
192
|
}
|
193
|
-
function
|
194
|
-
|
193
|
+
function wt() {
|
194
|
+
b !== void 0 && clearTimeout(b), I = 0, m = w = g = b = void 0;
|
195
195
|
}
|
196
|
-
function
|
197
|
-
return
|
196
|
+
function St() {
|
197
|
+
return b === void 0 ? y : ke(t());
|
198
198
|
}
|
199
|
-
function
|
200
|
-
var f = t(),
|
201
|
-
if (m = arguments,
|
202
|
-
if (
|
203
|
-
return
|
204
|
-
if (
|
205
|
-
return clearTimeout(
|
199
|
+
function V() {
|
200
|
+
var f = t(), k = Pe(f);
|
201
|
+
if (m = arguments, g = this, w = f, k) {
|
202
|
+
if (b === void 0)
|
203
|
+
return h(w);
|
204
|
+
if (_)
|
205
|
+
return clearTimeout(b), b = setTimeout($, d), v(w);
|
206
206
|
}
|
207
|
-
return
|
207
|
+
return b === void 0 && (b = setTimeout($, d)), y;
|
208
208
|
}
|
209
|
-
return
|
209
|
+
return V.cancel = wt, V.flush = St, V;
|
210
210
|
}
|
211
|
-
return
|
211
|
+
return de = c, de;
|
212
212
|
}
|
213
|
-
var
|
214
|
-
const
|
215
|
-
var
|
216
|
-
function
|
217
|
-
if (
|
218
|
-
|
219
|
-
var e =
|
220
|
-
function
|
213
|
+
var Ft = mt();
|
214
|
+
const Gt = /* @__PURE__ */ lt(Ft);
|
215
|
+
var me, Ge;
|
216
|
+
function Jt() {
|
217
|
+
if (Ge) return me;
|
218
|
+
Ge = 1;
|
219
|
+
var e = mt(), t = Te(), n = "Expected a function";
|
220
|
+
function a(o, s, c) {
|
221
221
|
var u = !0, d = !0;
|
222
|
-
if (typeof
|
222
|
+
if (typeof o != "function")
|
223
223
|
throw new TypeError(n);
|
224
|
-
return t(c) && (u = "leading" in c ? !!c.leading : u, d = "trailing" in c ? !!c.trailing : d), e(
|
224
|
+
return t(c) && (u = "leading" in c ? !!c.leading : u, d = "trailing" in c ? !!c.trailing : d), e(o, s, {
|
225
225
|
leading: u,
|
226
|
-
maxWait:
|
226
|
+
maxWait: s,
|
227
227
|
trailing: d
|
228
228
|
});
|
229
229
|
}
|
230
|
-
return
|
230
|
+
return me = a, me;
|
231
231
|
}
|
232
|
-
var
|
233
|
-
const
|
232
|
+
var Kt = Jt();
|
233
|
+
const Wt = /* @__PURE__ */ lt(Kt), Qt = (e, t, n, a) => {
|
234
234
|
switch (t) {
|
235
235
|
case "debounce":
|
236
|
-
return
|
236
|
+
return Gt(e, n, a);
|
237
237
|
case "throttle":
|
238
|
-
return
|
238
|
+
return Wt(e, n, a);
|
239
239
|
default:
|
240
240
|
return e;
|
241
241
|
}
|
242
|
-
},
|
242
|
+
}, Yt = (
|
243
243
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
244
244
|
(e) => {
|
245
|
-
const t =
|
246
|
-
return
|
245
|
+
const t = q.useRef(e);
|
246
|
+
return q.useEffect(() => {
|
247
247
|
t.current = e;
|
248
|
-
}),
|
249
|
-
var
|
250
|
-
return (
|
248
|
+
}), q.useMemo(() => (...n) => {
|
249
|
+
var a;
|
250
|
+
return (a = t.current) === null || a === void 0 ? void 0 : a.call(t, ...n);
|
251
251
|
}, []);
|
252
252
|
}
|
253
|
-
),
|
253
|
+
), Vt = (
|
254
254
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
255
255
|
(e) => {
|
256
|
-
const [t, n] =
|
256
|
+
const [t, n] = q.useState((e == null ? void 0 : e.current) || null);
|
257
257
|
return e && setTimeout(() => {
|
258
258
|
e.current !== t && n(e.current);
|
259
|
-
}, 0), { refProxy:
|
260
|
-
|
259
|
+
}, 0), { refProxy: q.useMemo(() => new Proxy((o) => {
|
260
|
+
o !== t && n(o);
|
261
261
|
}, {
|
262
|
-
get(
|
263
|
-
return
|
262
|
+
get(o, s) {
|
263
|
+
return s === "current" ? t : o[s];
|
264
264
|
},
|
265
|
-
set(
|
266
|
-
return
|
265
|
+
set(o, s, c) {
|
266
|
+
return s === "current" ? n(c) : o[s] = c, !0;
|
267
267
|
}
|
268
268
|
}), [t]), refElement: t, setRefElement: n };
|
269
269
|
}
|
270
|
-
),
|
270
|
+
), Zt = (e, t) => t === "border-box" ? {
|
271
271
|
width: e.borderBoxSize[0].inlineSize,
|
272
272
|
height: e.borderBoxSize[0].blockSize
|
273
273
|
} : t === "content-box" ? {
|
@@ -277,374 +277,374 @@ const Ht = /* @__PURE__ */ it(Ft), Gt = (e, t, n, r) => {
|
|
277
277
|
width: e.contentRect.width,
|
278
278
|
height: e.contentRect.height
|
279
279
|
};
|
280
|
-
function
|
281
|
-
const l =
|
280
|
+
function Xt({ skipOnMount: e = !1, refreshMode: t, refreshRate: n = 1e3, refreshOptions: a, handleWidth: o = !0, handleHeight: s = !0, targetRef: c, observerOptions: u, onResize: d } = {}) {
|
281
|
+
const l = nt(e), m = Yt(d), [g, T] = ge({
|
282
282
|
width: void 0,
|
283
283
|
height: void 0
|
284
|
-
}), { refProxy:
|
285
|
-
if (!
|
284
|
+
}), { refProxy: y, refElement: b } = Vt(c), { box: w } = u || {}, I = je((_) => {
|
285
|
+
if (!o && !s)
|
286
286
|
return;
|
287
287
|
if (l.current) {
|
288
288
|
l.current = !1;
|
289
289
|
return;
|
290
290
|
}
|
291
|
-
const
|
292
|
-
|
293
|
-
const
|
294
|
-
T((
|
295
|
-
width:
|
296
|
-
height:
|
291
|
+
const E = (v, h) => o && v.width !== h.width || s && v.height !== h.height;
|
292
|
+
_.forEach((v) => {
|
293
|
+
const h = Zt(v, w);
|
294
|
+
T((B) => E(B, h) ? (m == null || m({
|
295
|
+
width: h.width,
|
296
|
+
height: h.height,
|
297
297
|
entry: v
|
298
|
-
}),
|
298
|
+
}), h) : B);
|
299
299
|
});
|
300
|
-
}, [
|
301
|
-
|
300
|
+
}, [o, s, l, w]), P = je(Qt(I, t, n, a), [
|
301
|
+
I,
|
302
302
|
t,
|
303
303
|
n,
|
304
|
-
|
304
|
+
a
|
305
305
|
]);
|
306
|
-
return
|
307
|
-
let
|
308
|
-
return
|
306
|
+
return M(() => {
|
307
|
+
let _;
|
308
|
+
return b ? (_ = new window.ResizeObserver(P), _.observe(b, u)) : (g.width || g.height) && (m == null || m({
|
309
309
|
width: null,
|
310
310
|
height: null,
|
311
311
|
entry: null
|
312
312
|
}), T({ width: void 0, height: void 0 })), () => {
|
313
|
-
var
|
314
|
-
(
|
313
|
+
var E, v, h;
|
314
|
+
(E = _ == null ? void 0 : _.disconnect) === null || E === void 0 || E.call(_), (h = (v = P).cancel) === null || h === void 0 || h.call(v);
|
315
315
|
};
|
316
|
-
}, [
|
316
|
+
}, [P, b]), Object.assign({ ref: y }, g);
|
317
317
|
}
|
318
|
-
function
|
319
|
-
var t, n,
|
320
|
-
if (typeof e == "string" || typeof e == "number")
|
318
|
+
function ft(e) {
|
319
|
+
var t, n, a = "";
|
320
|
+
if (typeof e == "string" || typeof e == "number") a += e;
|
321
321
|
else if (typeof e == "object") if (Array.isArray(e)) {
|
322
|
-
var
|
323
|
-
for (t = 0; t <
|
324
|
-
} else for (n in e) e[n] && (
|
325
|
-
return
|
326
|
-
}
|
327
|
-
function
|
328
|
-
for (var e, t, n = 0,
|
329
|
-
return
|
330
|
-
}
|
331
|
-
const
|
332
|
-
headerContainer:
|
333
|
-
navigationTabList:
|
334
|
-
navigationTab:
|
335
|
-
headerContent:
|
336
|
-
staticEnabled:
|
337
|
-
},
|
338
|
-
const { ref: n, height:
|
322
|
+
var o = e.length;
|
323
|
+
for (t = 0; t < o; t++) e[t] && (n = ft(e[t])) && (a && (a += " "), a += n);
|
324
|
+
} else for (n in e) e[n] && (a && (a += " "), a += n);
|
325
|
+
return a;
|
326
|
+
}
|
327
|
+
function j() {
|
328
|
+
for (var e, t, n = 0, a = "", o = arguments.length; n < o; n++) (e = arguments[n]) && (t = ft(e)) && (a && (a += " "), a += t);
|
329
|
+
return a;
|
330
|
+
}
|
331
|
+
const en = "_headerContainer_1cubo_1", tn = "_navigationTabList_1cubo_8", nn = "_navigationTab_1cubo_8", rn = "_headerContent_1cubo_34", an = "_staticEnabled_1cubo_50", A = {
|
332
|
+
headerContainer: en,
|
333
|
+
navigationTabList: tn,
|
334
|
+
navigationTab: nn,
|
335
|
+
headerContent: rn,
|
336
|
+
staticEnabled: an
|
337
|
+
}, on = 77, z = ({ sticky: e, children: t }) => {
|
338
|
+
const { ref: n, height: a } = Xt({
|
339
339
|
refreshMode: "debounce",
|
340
340
|
refreshRate: 0
|
341
|
-
}), [
|
342
|
-
|
341
|
+
}), [o, s] = ge(!1), c = () => o ? !e : !0;
|
342
|
+
M(() => {
|
343
343
|
const d = () => {
|
344
|
-
|
344
|
+
s(window.scrollY > 0);
|
345
345
|
};
|
346
346
|
return window.addEventListener("scroll", d), () => window.removeEventListener("scroll", d);
|
347
347
|
}, []);
|
348
|
-
const u = `${
|
349
|
-
return /* @__PURE__ */ i("div", { style: { minHeight: u }, children: /* @__PURE__ */ i("div", { children: /* @__PURE__ */
|
348
|
+
const u = `${a || on}px`;
|
349
|
+
return /* @__PURE__ */ i("div", { style: { minHeight: u }, children: /* @__PURE__ */ i("div", { children: /* @__PURE__ */ p(
|
350
350
|
"div",
|
351
351
|
{
|
352
352
|
ref: n,
|
353
|
-
className:
|
353
|
+
className: j(A.headerContent, {
|
354
354
|
[A.staticEnabled]: c()
|
355
355
|
}),
|
356
356
|
children: [
|
357
|
-
/* @__PURE__ */ i(
|
358
|
-
/* @__PURE__ */ i(
|
357
|
+
/* @__PURE__ */ i(z.Header, {}),
|
358
|
+
/* @__PURE__ */ i(z.Tabs, {}),
|
359
359
|
t
|
360
360
|
]
|
361
361
|
}
|
362
362
|
) }) });
|
363
363
|
};
|
364
|
-
|
365
|
-
|
366
|
-
const
|
367
|
-
sidebarContainer:
|
368
|
-
},
|
369
|
-
logoLink:
|
370
|
-
},
|
371
|
-
link:
|
372
|
-
active:
|
373
|
-
},
|
374
|
-
|
364
|
+
z.Header = ({ children: e }) => /* @__PURE__ */ i("div", { className: A.headerContainer, children: e });
|
365
|
+
z.Tabs = ({ children: e }) => /* @__PURE__ */ i("div", { className: "flex justify-between gap-2 nowrap", children: e });
|
366
|
+
const sn = "_sidebarContainer_bmdti_1", cn = {
|
367
|
+
sidebarContainer: sn
|
368
|
+
}, ln = "_logoLink_1baxb_1", un = {
|
369
|
+
logoLink: ln
|
370
|
+
}, dn = ({ src: e, href: t = "/", ariaLabel: n = "Home", alt: a = "Lokalise" }) => /* @__PURE__ */ i("a", { className: un.logoLink, href: t, "aria-label": n, children: /* @__PURE__ */ i("img", { src: e, alt: a }) }), mn = "_link_1weq1_1", fn = "_active_1weq1_18", Je = {
|
371
|
+
link: mn,
|
372
|
+
active: fn
|
373
|
+
}, _n = ({ label: e, to: t, icon: n }) => /* @__PURE__ */ i(he, { placement: "right", tooltip: e, children: /* @__PURE__ */ i(
|
374
|
+
at,
|
375
375
|
{
|
376
|
-
className:
|
377
|
-
[
|
376
|
+
className: j(Je.link, {
|
377
|
+
[Je.active]: window.location.pathname.startsWith(t)
|
378
378
|
}),
|
379
379
|
href: t,
|
380
380
|
children: /* @__PURE__ */ i(n, { size: "25px" })
|
381
381
|
}
|
382
|
-
) }),
|
383
|
-
dropdownButton:
|
384
|
-
dropdownButtonActive:
|
385
|
-
},
|
386
|
-
|
382
|
+
) }), bn = "_dropdownButton_hwh0c_1", gn = "_dropdownButtonActive_hwh0c_18", Ke = {
|
383
|
+
dropdownButton: bn,
|
384
|
+
dropdownButtonActive: gn
|
385
|
+
}, hn = ({ children: e, icon: t }) => /* @__PURE__ */ i(
|
386
|
+
pe,
|
387
387
|
{
|
388
|
-
menuButton: ({ opened: n }) => /* @__PURE__ */ i(
|
388
|
+
menuButton: ({ opened: n }) => /* @__PURE__ */ i(he, { placement: "right", tooltip: "Help", children: /* @__PURE__ */ i(
|
389
389
|
"button",
|
390
390
|
{
|
391
391
|
type: "button",
|
392
|
-
className:
|
393
|
-
[
|
392
|
+
className: j(Ke.dropdownButton, {
|
393
|
+
[Ke.dropdownButtonActive]: n
|
394
394
|
}),
|
395
395
|
children: /* @__PURE__ */ i(t, { size: "25px" })
|
396
396
|
}
|
397
397
|
) }),
|
398
|
-
children: /* @__PURE__ */ i(
|
398
|
+
children: /* @__PURE__ */ i(ve, { placement: "right-start", children: e })
|
399
399
|
}
|
400
|
-
),
|
401
|
-
iconContainer:
|
402
|
-
},
|
400
|
+
), pn = "_iconContainer_nz34m_1", vn = {
|
401
|
+
iconContainer: pn
|
402
|
+
}, _t = ({ className: e = "" }) => /* @__PURE__ */ i(
|
403
403
|
"div",
|
404
404
|
{
|
405
405
|
"aria-label": "Upgrade Icon",
|
406
|
-
className:
|
407
|
-
|
406
|
+
className: j(
|
407
|
+
vn.iconContainer,
|
408
408
|
"flex-row",
|
409
409
|
"items-center",
|
410
410
|
"justify-center",
|
411
411
|
e
|
412
412
|
),
|
413
|
-
children: /* @__PURE__ */ i(
|
413
|
+
children: /* @__PURE__ */ i(jt, {})
|
414
414
|
}
|
415
|
-
),
|
416
|
-
menuContainer:
|
417
|
-
profileButton:
|
418
|
-
profileImage:
|
419
|
-
profileImageHighlight:
|
420
|
-
profileImageUpgradeIcon:
|
421
|
-
userIconWrapper:
|
422
|
-
},
|
415
|
+
), Tn = "_menuContainer_wbu3u_5", yn = "_profileButton_wbu3u_16", wn = "_profileImage_wbu3u_29", Sn = "_profileImageHighlight_wbu3u_37", In = "_profileImageUpgradeIcon_wbu3u_41", En = "_userIconWrapper_wbu3u_47", N = {
|
416
|
+
menuContainer: Tn,
|
417
|
+
profileButton: yn,
|
418
|
+
profileImage: wn,
|
419
|
+
profileImageHighlight: Sn,
|
420
|
+
profileImageUpgradeIcon: In,
|
421
|
+
userIconWrapper: En
|
422
|
+
}, bt = kt({}), x = () => Pt(bt), Pn = ({ children: e }) => {
|
423
423
|
const {
|
424
424
|
currentTeam: t,
|
425
425
|
otherTeams: n,
|
426
|
-
showUpgradeCta:
|
427
|
-
showBillingButton:
|
428
|
-
allowTeamCreation:
|
426
|
+
showUpgradeCta: a,
|
427
|
+
showBillingButton: o,
|
428
|
+
allowTeamCreation: s,
|
429
429
|
isLimitedView: c,
|
430
430
|
isProviderAlpha: u,
|
431
431
|
canAccessTeamSettings: d,
|
432
432
|
isEndOfTrialActive: l,
|
433
433
|
isTeamSuspended: m
|
434
|
-
} =
|
434
|
+
} = x();
|
435
435
|
return /* @__PURE__ */ i(
|
436
|
-
|
436
|
+
pe,
|
437
437
|
{
|
438
|
-
menuButton: () => /* @__PURE__ */
|
438
|
+
menuButton: () => /* @__PURE__ */ p("button", { className: N.profileButton, "aria-label": "Profile menu", type: "button", children: [
|
439
439
|
t != null && t.logoUrl ? /* @__PURE__ */ i(
|
440
440
|
"img",
|
441
441
|
{
|
442
442
|
src: t.logoUrl,
|
443
|
-
className:
|
444
|
-
[
|
443
|
+
className: j(N.profileImage, {
|
444
|
+
[N.profileImageHighlight]: a
|
445
445
|
}),
|
446
446
|
alt: "Team Logo"
|
447
447
|
}
|
448
448
|
) : /* @__PURE__ */ i(
|
449
449
|
"div",
|
450
450
|
{
|
451
|
-
className:
|
452
|
-
[
|
451
|
+
className: j(N.userIconWrapper, "flex-row", "align-center", "items-center", {
|
452
|
+
[N.profileImageHighlight]: a
|
453
453
|
}),
|
454
|
-
children: /* @__PURE__ */ i(
|
454
|
+
children: /* @__PURE__ */ i(ot, { size: "25px" })
|
455
455
|
}
|
456
456
|
),
|
457
|
-
|
457
|
+
a && /* @__PURE__ */ i(_t, { className: N.profileImageUpgradeIcon })
|
458
458
|
] }),
|
459
|
-
children: /* @__PURE__ */ i(
|
460
|
-
allowTeamCreation:
|
459
|
+
children: /* @__PURE__ */ i(ve, { placement: "right-end", className: N.menuContainer, children: e({
|
460
|
+
allowTeamCreation: s,
|
461
461
|
otherTeams: n,
|
462
462
|
isLimitedView: c,
|
463
463
|
canAccessTeamSettings: d,
|
464
464
|
isEndOfTrialActive: l,
|
465
465
|
isTeamSuspended: m,
|
466
|
-
showBillingButton:
|
466
|
+
showBillingButton: o,
|
467
467
|
isProviderAlpha: u
|
468
468
|
}) })
|
469
469
|
}
|
470
470
|
);
|
471
|
-
},
|
472
|
-
const
|
473
|
-
if (
|
471
|
+
}, gt = 0, kn = 9999, Nn = [150, 151, 250, 251], Cn = [152, 153, 252, 253], jn = [154, 155, 157, 158, 254, 255, 258, 354, 355, 358], Rn = [156, 159, 160, 256, 259, 260], ht = 9998, ye = (e) => e === gt, pt = (e) => e === kn, Xr = (e) => Nn.includes(e), ea = (e) => Cn.includes(e), ta = (e) => jn.includes(e), na = (e) => Rn.includes(e), ra = (e) => e > gt && e < ht, aa = (e) => e === ht, An = /\n/, We = (e, t, n) => e.split(t).flatMap((a, o) => o !== 0 ? [Nt(n, { key: Math.random().toString(32).slice(0, 10) }), a] : a), On = (e, t, n) => typeof e == "string" ? We(e, t, n) : e.flatMap((a) => typeof a == "string" ? We(a, t, n) : a), oa = (e) => On(e, An, /* @__PURE__ */ i("br", {})), Ln = /(\b(https?|):\/\/[-a-zA-Zа-яА-Я0-9+&@#/%?=~_|!:,.;]*[-a-zA-Zа-яА-Я0-9+&@#/%=~_|])/gi, qn = (e) => e.match(Ln) ?? [], Qe = (e, t, n) => {
|
472
|
+
const a = e.split(t);
|
473
|
+
if (a.length === 1)
|
474
474
|
return e;
|
475
|
-
const
|
476
|
-
return
|
475
|
+
const o = [];
|
476
|
+
return a[0] !== "" && o.push(a[0]), a.shift(), a[a.length - 1] === "" && a.pop(), o.push(
|
477
477
|
/* @__PURE__ */ i("a", { href: t, target: "_blank", rel: "noreferrer noopener", children: t }, t + n)
|
478
|
-
),
|
479
|
-
},
|
480
|
-
const t =
|
481
|
-
return t != null && t.length ? t.reduce((n,
|
482
|
-
},
|
483
|
-
|
484
|
-
},
|
478
|
+
), o.push(a.join(t)), o.filter((s) => s !== "");
|
479
|
+
}, Ye = (e) => {
|
480
|
+
const t = qn(e);
|
481
|
+
return t != null && t.length ? t.reduce((n, a, o) => typeof n == "string" ? Qe(n, a, o) : n.flatMap((s) => typeof s == "string" ? Qe(s, a, o) : s), e) : e;
|
482
|
+
}, ia = (e) => typeof e == "string" ? Ye(e) : e.flatMap((t) => typeof t == "string" ? Ye(t) : t, e), sa = (e, t = "PP") => ct(e, t), ca = (e, t, n = "PP") => ct(Ot(e, t), n), la = (e) => {
|
483
|
+
M(e, []);
|
484
|
+
}, Mn = ({ children: e, config: t }) => {
|
485
485
|
const {
|
486
486
|
teams: n,
|
487
|
-
currentTeamId:
|
488
|
-
planId:
|
489
|
-
isLimitedView:
|
487
|
+
currentTeamId: a,
|
488
|
+
planId: o,
|
489
|
+
isLimitedView: s,
|
490
490
|
isTeamSuspended: c,
|
491
491
|
canAccessTeamSettings: u,
|
492
492
|
isEndOfTrialActive: d
|
493
|
-
} = t, l = n.find((
|
493
|
+
} = t, l = n.find((_) => _.id === a), m = n.filter((_) => _.id !== a), g = (l == null ? void 0 : l.role) ?? "", T = ["biller", "owner"].includes(g), y = ye(o) || pt(o), P = {
|
494
494
|
...t,
|
495
495
|
currentTeam: l,
|
496
496
|
otherTeams: m,
|
497
497
|
canChangeBilling: T,
|
498
|
-
isOnFreeOrTrialPlan:
|
499
|
-
showUpgradeCta: !
|
500
|
-
showBillingButton: !
|
501
|
-
allowTeamCreation: !
|
498
|
+
isOnFreeOrTrialPlan: y,
|
499
|
+
showUpgradeCta: !s && y && T && !c,
|
500
|
+
showBillingButton: !s && u && T,
|
501
|
+
allowTeamCreation: !s && !d
|
502
502
|
};
|
503
|
-
return /* @__PURE__ */ i(
|
504
|
-
},
|
505
|
-
container:
|
506
|
-
profileEmail:
|
507
|
-
},
|
503
|
+
return /* @__PURE__ */ i(bt.Provider, { value: P, children: e });
|
504
|
+
}, Un = ({ config: e, children: t }) => /* @__PURE__ */ i(Mn, { config: e, children: /* @__PURE__ */ i(Pn, { children: t }) }), xn = "_container_q5pot_1", Bn = "_profileEmail_q5pot_5", Ve = {
|
505
|
+
container: xn,
|
506
|
+
profileEmail: Bn
|
507
|
+
}, $n = ({
|
508
508
|
href: e,
|
509
509
|
onClick: t,
|
510
510
|
userEmail: n,
|
511
|
-
hideBottomDivider:
|
511
|
+
hideBottomDivider: a
|
512
512
|
}) => {
|
513
|
-
const { isEndOfTrialActive:
|
514
|
-
return
|
513
|
+
const { isEndOfTrialActive: o, isTeamSuspended: s } = x();
|
514
|
+
return o || s ? null : /* @__PURE__ */ p(tt, { children: [
|
515
515
|
/* @__PURE__ */ i(
|
516
|
-
|
516
|
+
J,
|
517
517
|
{
|
518
518
|
href: e,
|
519
519
|
onClick: () => {
|
520
520
|
t == null || t();
|
521
521
|
},
|
522
|
-
children: /* @__PURE__ */
|
522
|
+
children: /* @__PURE__ */ p("div", { className: `flex-col ${Ve.container}`, children: [
|
523
523
|
/* @__PURE__ */ i("span", { children: "Profile Settings" }),
|
524
|
-
/* @__PURE__ */ i("span", { className:
|
524
|
+
/* @__PURE__ */ i("span", { className: Ve.profileEmail, children: n })
|
525
525
|
] })
|
526
526
|
}
|
527
527
|
),
|
528
|
-
!
|
528
|
+
!a && /* @__PURE__ */ i(it, {})
|
529
529
|
] });
|
530
|
-
},
|
531
|
-
wrapper:
|
532
|
-
profileImage:
|
533
|
-
teamName:
|
534
|
-
planLabel:
|
535
|
-
membership:
|
536
|
-
defaultProfileImage:
|
537
|
-
},
|
538
|
-
const { currentTeam:
|
539
|
-
if (!
|
530
|
+
}, Hn = "_wrapper_15d85_1", Dn = "_profileImage_15d85_14", zn = "_teamName_15d85_22", Fn = "_planLabel_15d85_29", Gn = "_membership_15d85_38", Jn = "_defaultProfileImage_15d85_44", R = {
|
531
|
+
wrapper: Hn,
|
532
|
+
profileImage: Dn,
|
533
|
+
teamName: zn,
|
534
|
+
planLabel: Fn,
|
535
|
+
membership: Gn,
|
536
|
+
defaultProfileImage: Jn
|
537
|
+
}, vt = ({ team: e, onClick: t, hidePlanLabel: n }) => {
|
538
|
+
const { currentTeam: a, planId: o } = x(), s = e || a;
|
539
|
+
if (!s)
|
540
540
|
return null;
|
541
|
-
const c =
|
542
|
-
return /* @__PURE__ */
|
543
|
-
t ?
|
541
|
+
const c = ye(o) ? "Free" : pt(o) ? "Trial" : void 0;
|
542
|
+
return /* @__PURE__ */ p(
|
543
|
+
t ? J : "div",
|
544
544
|
{
|
545
|
-
className: `flex-row gap-2 flex-nowrap items-center ${
|
546
|
-
...t && { onClick: () => t(
|
545
|
+
className: `flex-row gap-2 flex-nowrap items-center ${R.wrapper}`,
|
546
|
+
...t && { onClick: () => t(s) },
|
547
547
|
children: [
|
548
|
-
|
549
|
-
/* @__PURE__ */
|
550
|
-
/* @__PURE__ */
|
551
|
-
/* @__PURE__ */ i("span", { title:
|
552
|
-
c && !n && /* @__PURE__ */ i("span", { className: `flex-row justify-center items-center ${
|
548
|
+
s.logoUrl ? /* @__PURE__ */ i("img", { className: R.profileImage, src: s.logoUrl, alt: "Team Logo" }) : /* @__PURE__ */ i("span", { className: `flex-row justify-center items-center ${R.defaultProfileImage}`, children: /* @__PURE__ */ i(ot, { size: "25px" }) }),
|
549
|
+
/* @__PURE__ */ p("div", { className: "flex-col items-start", children: [
|
550
|
+
/* @__PURE__ */ p("div", { className: "flex-row items-center flex-nowrap gap-2", children: [
|
551
|
+
/* @__PURE__ */ i("span", { title: s.name, className: R.teamName, children: s.name }),
|
552
|
+
c && !n && /* @__PURE__ */ i("span", { className: `flex-row justify-center items-center ${R.planLabel}`, children: c })
|
553
553
|
] }),
|
554
|
-
/* @__PURE__ */ i("span", { className:
|
554
|
+
/* @__PURE__ */ i("span", { className: R.membership, children: s.role })
|
555
555
|
] })
|
556
556
|
]
|
557
557
|
}
|
558
558
|
);
|
559
|
-
},
|
560
|
-
teamsContainer:
|
561
|
-
},
|
562
|
-
const { otherTeams: t } =
|
563
|
-
return t.length === 0 ? null : /* @__PURE__ */ i("div", { className: `flex-col items-stretch ${
|
564
|
-
},
|
565
|
-
container:
|
566
|
-
planCta:
|
567
|
-
upgradeIconWrapper:
|
568
|
-
},
|
569
|
-
const { planId: t, trialDaysLeft: n, showUpgradeCta:
|
570
|
-
if (!
|
559
|
+
}, Kn = "_teamsContainer_1t68g_1", Wn = {
|
560
|
+
teamsContainer: Kn
|
561
|
+
}, Qn = ({ onSwitchTeam: e }) => {
|
562
|
+
const { otherTeams: t } = x();
|
563
|
+
return t.length === 0 ? null : /* @__PURE__ */ i("div", { className: `flex-col items-stretch ${Wn.teamsContainer}`, children: t.map((n) => /* @__PURE__ */ i(vt, { team: n, onClick: e, hidePlanLabel: !0 }, n.id)) });
|
564
|
+
}, Yn = "_container_1u995_1", Vn = "_planCta_1u995_15", Zn = "_upgradeIconWrapper_1u995_19", fe = {
|
565
|
+
container: Yn,
|
566
|
+
planCta: Vn,
|
567
|
+
upgradeIconWrapper: Zn
|
568
|
+
}, Xn = ({ upgradeOptionHref: e }) => {
|
569
|
+
const { planId: t, trialDaysLeft: n, showUpgradeCta: a } = x();
|
570
|
+
if (!a)
|
571
571
|
return null;
|
572
|
-
const c =
|
573
|
-
return /* @__PURE__ */
|
574
|
-
/* @__PURE__ */ i("span", { className:
|
575
|
-
/* @__PURE__ */
|
576
|
-
/* @__PURE__ */ i(
|
572
|
+
const c = ye(t) ? "Your team is currently on the Free plan" : `Free trial ends in ${n} ${n === 1 ? "day" : "days"}`;
|
573
|
+
return /* @__PURE__ */ p(J, { href: e, className: `flex-col gap-1 items-start ${fe.container}`, children: [
|
574
|
+
/* @__PURE__ */ i("span", { className: fe.planCta, children: c }),
|
575
|
+
/* @__PURE__ */ p("div", { className: `flex-row items-center gap-1 ${fe.upgradeIconWrapper}`, children: [
|
576
|
+
/* @__PURE__ */ i(_t, {}),
|
577
577
|
/* @__PURE__ */ i("span", { children: "See upgrade options" })
|
578
578
|
] })
|
579
579
|
] });
|
580
|
-
},
|
581
|
-
|
582
|
-
|
583
|
-
|
584
|
-
|
585
|
-
|
586
|
-
|
587
|
-
|
588
|
-
|
589
|
-
|
590
|
-
|
591
|
-
const
|
592
|
-
breadcrumbsItem:
|
593
|
-
breadcrumbs:
|
594
|
-
},
|
595
|
-
/* @__PURE__ */ i(
|
580
|
+
}, S = ({ children: e, ...t }) => /* @__PURE__ */ i("nav", { ...t, className: cn.sidebarContainer, children: e });
|
581
|
+
S.Top = ({ children: e }) => /* @__PURE__ */ i("div", { children: e });
|
582
|
+
S.Bottom = ({ children: e }) => /* @__PURE__ */ i("div", { children: e });
|
583
|
+
S.Avatar = dn;
|
584
|
+
S.IconLink = _n;
|
585
|
+
S.Menu = hn;
|
586
|
+
S.ProfileMenu = Un;
|
587
|
+
S.TeamSwitch = Qn;
|
588
|
+
S.TeamMenuItem = vt;
|
589
|
+
S.UpgradeMenuItem = Xn;
|
590
|
+
S.ProfileSettingsMenuItem = $n;
|
591
|
+
const er = "_breadcrumbsItem_1hm6a_1", tr = "_breadcrumbs_1hm6a_1", Ze = {
|
592
|
+
breadcrumbsItem: er,
|
593
|
+
breadcrumbs: tr
|
594
|
+
}, ua = ({ items: e }) => /* @__PURE__ */ i("nav", { "aria-label": "breadcrumb", className: Ze.breadcrumbs, children: e.map((t, n) => /* @__PURE__ */ p(rt, { children: [
|
595
|
+
/* @__PURE__ */ i(at, { className: Ze.breadcrumbsItem, href: t.link, rel: "noreferrer", children: t.name }),
|
596
596
|
n < e.length - 1 && /* @__PURE__ */ i("span", { children: " — " })
|
597
|
-
] }, `${t.link}-${t.name}`)) }),
|
598
|
-
!!n && t.some((
|
599
|
-
t.filter(({ visible:
|
600
|
-
] }, t[0].label)) }),
|
601
|
-
badge:
|
602
|
-
tag:
|
603
|
-
withNavLinkStyle:
|
604
|
-
disabled:
|
605
|
-
projectNavigationItem:
|
606
|
-
projectNavigationItemDisabled:
|
607
|
-
},
|
608
|
-
/* @__PURE__ */
|
597
|
+
] }, `${t.link}-${t.name}`)) }), nr = ({ items: e }) => /* @__PURE__ */ i(tt, { children: e.map((t, n) => /* @__PURE__ */ p(rt, { children: [
|
598
|
+
!!n && t.some((a) => a.visible) && /* @__PURE__ */ i(it, {}),
|
599
|
+
t.filter(({ visible: a }) => a).map(({ link: a, label: o, onClick: s }) => /* @__PURE__ */ i(J, { href: a || "#", "aria-label": o, onClick: s, children: o }, o))
|
600
|
+
] }, t[0].label)) }), rr = "_badge_1pc1v_1", ar = "_tag_1pc1v_15", or = "_withNavLinkStyle_1pc1v_42 _withLinkStyle_1pc1v_21", ir = "_disabled_1pc1v_57", sr = "_projectNavigationItem_1pc1v_61", cr = "_projectNavigationItemDisabled_1pc1v_67", C = {
|
601
|
+
badge: rr,
|
602
|
+
tag: ar,
|
603
|
+
withNavLinkStyle: or,
|
604
|
+
disabled: ir,
|
605
|
+
projectNavigationItem: sr,
|
606
|
+
projectNavigationItemDisabled: cr
|
607
|
+
}, Xe = ({ label: e, badge: t, novel: n }) => /* @__PURE__ */ p("div", { className: "flex gap-1", children: [
|
608
|
+
/* @__PURE__ */ p("div", { children: [
|
609
609
|
/* @__PURE__ */ i("span", { children: e }),
|
610
610
|
!!t && /* @__PURE__ */ i("div", { className: C.badge, "aria-label": `${t} items requiring attention`, children: t > 9 ? "9+" : t })
|
611
611
|
] }),
|
612
|
-
!!n && /* @__PURE__ */ i(
|
613
|
-
] }),
|
614
|
-
({ label: e, href: t = "", disabled: n = !1, badge:
|
612
|
+
!!n && /* @__PURE__ */ i(Rt, { className: C.tag, children: n })
|
613
|
+
] }), _e = Ct(
|
614
|
+
({ label: e, href: t = "", disabled: n = !1, badge: a, onClick: o, novel: s }, c) => /* @__PURE__ */ i(he, { tooltip: "You do not have access to this function", show: n, children: /* @__PURE__ */ i(
|
615
615
|
"div",
|
616
616
|
{
|
617
617
|
className: n ? C.projectNavigationItemDisabled : C.projectNavigationItem,
|
618
|
-
children:
|
618
|
+
children: o || n || !t ? /* @__PURE__ */ i(
|
619
619
|
"button",
|
620
620
|
{
|
621
621
|
type: "button",
|
622
622
|
ref: c,
|
623
|
-
className:
|
623
|
+
className: j(C.withNavLinkStyle, {
|
624
624
|
[C.disabled]: n
|
625
625
|
}),
|
626
626
|
disabled: n,
|
627
|
-
onClick:
|
628
|
-
children: /* @__PURE__ */ i(
|
627
|
+
onClick: o,
|
628
|
+
children: /* @__PURE__ */ i(Xe, { label: e, badge: a, novel: s })
|
629
629
|
}
|
630
|
-
) : /* @__PURE__ */ i("a", { href: t, className: C.withNavLinkStyle, children: /* @__PURE__ */ i(
|
630
|
+
) : /* @__PURE__ */ i("a", { href: t, className: C.withNavLinkStyle, children: /* @__PURE__ */ i(Xe, { label: e, badge: a, novel: s }) })
|
631
631
|
}
|
632
632
|
) })
|
633
633
|
);
|
634
|
-
|
635
|
-
const
|
636
|
-
var
|
634
|
+
_e.displayName = "NavigationTabsItem";
|
635
|
+
const lr = (e) => (e == null ? void 0 : e.some((t) => t.some((n) => n.visible))) ?? !1, ur = (e) => e.visible && (!e.dropdown || lr(e.dropdown)), da = ({ navigation: e, activeItem: t }) => /* @__PURE__ */ i("nav", { "aria-label": "Project", children: /* @__PURE__ */ i("ul", { className: A.navigationTabList, "aria-orientation": "horizontal", children: e.filter(ur).map((n) => {
|
636
|
+
var a, o, s;
|
637
637
|
return n.dropdown ? /* @__PURE__ */ i(
|
638
638
|
"li",
|
639
639
|
{
|
640
640
|
className: A.navigationTab,
|
641
641
|
"data-testid": n.key,
|
642
|
-
"aria-selected": (
|
642
|
+
"aria-selected": (a = n.isActive) == null ? void 0 : a.call(n, t),
|
643
643
|
children: /* @__PURE__ */ i(
|
644
|
-
|
644
|
+
pe,
|
645
645
|
{
|
646
|
-
menuButton: ({ opened: c }) => /* @__PURE__ */ i(
|
647
|
-
children: /* @__PURE__ */ i(
|
646
|
+
menuButton: ({ opened: c }) => /* @__PURE__ */ i(_e, { label: n.label, disabled: n.disabled, active: c }),
|
647
|
+
children: /* @__PURE__ */ i(ve, { children: /* @__PURE__ */ i(nr, { items: n.dropdown }) })
|
648
648
|
}
|
649
649
|
)
|
650
650
|
},
|
@@ -654,9 +654,9 @@ const ir = (e) => (e == null ? void 0 : e.some((t) => t.some((n) => n.visible)))
|
|
654
654
|
{
|
655
655
|
className: A.navigationTab,
|
656
656
|
"data-testid": n.key,
|
657
|
-
"aria-selected": (
|
657
|
+
"aria-selected": (o = n.isActive) == null ? void 0 : o.call(n, t),
|
658
658
|
children: /* @__PURE__ */ i(
|
659
|
-
|
659
|
+
_e,
|
660
660
|
{
|
661
661
|
label: n.label,
|
662
662
|
href: n.link,
|
@@ -664,292 +664,432 @@ const ir = (e) => (e == null ? void 0 : e.some((t) => t.some((n) => n.visible)))
|
|
664
664
|
disabled: n.disabled,
|
665
665
|
badge: n.badge,
|
666
666
|
novel: n.novel,
|
667
|
-
active: (
|
667
|
+
active: (s = n.isActive) == null ? void 0 : s.call(n, t)
|
668
668
|
}
|
669
669
|
)
|
670
670
|
},
|
671
671
|
n.key
|
672
672
|
);
|
673
|
-
}) }) }),
|
674
|
-
lang_id:
|
675
|
-
lang_iso:
|
676
|
-
lang_name:
|
677
|
-
is_writable:
|
678
|
-
}),
|
679
|
-
user_id:
|
680
|
-
email:
|
681
|
-
fullname:
|
682
|
-
created_at:
|
683
|
-
created_at_timestamp:
|
684
|
-
admin_rights:
|
685
|
-
languages:
|
673
|
+
}) }) }), dr = r.object({
|
674
|
+
lang_id: r.number(),
|
675
|
+
lang_iso: r.string(),
|
676
|
+
lang_name: r.string(),
|
677
|
+
is_writable: r.union([r.literal(0), r.literal(1)])
|
678
|
+
}), mr = r.object({
|
679
|
+
user_id: r.number(),
|
680
|
+
email: r.string().email(),
|
681
|
+
fullname: r.string(),
|
682
|
+
created_at: r.string(),
|
683
|
+
created_at_timestamp: r.number(),
|
684
|
+
admin_rights: r.array(r.string()),
|
685
|
+
languages: r.array(dr),
|
686
686
|
// TODO nic: Do I need this?
|
687
|
-
is_admin:
|
688
|
-
is_reviewer:
|
689
|
-
}),
|
690
|
-
project_id:
|
691
|
-
contributors:
|
692
|
-
}),
|
687
|
+
is_admin: r.boolean(),
|
688
|
+
is_reviewer: r.boolean()
|
689
|
+
}), fr = r.object({
|
690
|
+
project_id: r.string(),
|
691
|
+
contributors: r.array(mr)
|
692
|
+
}), _r = Q({
|
693
693
|
description: "Get the details of a project contributor",
|
694
|
-
requestPathParamsSchema:
|
694
|
+
requestPathParamsSchema: r.object({ projectId: r.string(), contributorId: r.number() }),
|
695
695
|
pathResolver: ({ projectId: e, contributorId: t }) => `/projects/${e}/contributors/${t}`,
|
696
|
-
successResponseBodySchema:
|
697
|
-
}),
|
698
|
-
|
699
|
-
|
700
|
-
|
701
|
-
|
702
|
-
|
703
|
-
|
704
|
-
|
705
|
-
|
706
|
-
|
707
|
-
|
708
|
-
|
709
|
-
|
710
|
-
|
711
|
-
|
712
|
-
|
696
|
+
successResponseBodySchema: fr
|
697
|
+
}), br = r.object({
|
698
|
+
lang_iso: r.string(),
|
699
|
+
custom_iso: r.string().optional()
|
700
|
+
}), gr = r.object({
|
701
|
+
language_id: r.number(),
|
702
|
+
language_iso: r.string(),
|
703
|
+
progress: r.number(),
|
704
|
+
words_to_do: r.number()
|
705
|
+
}), we = r.union([
|
706
|
+
r.literal("localization_files"),
|
707
|
+
r.literal("paged_documents"),
|
708
|
+
r.literal("marketing")
|
709
|
+
]), hr = r.object({
|
710
|
+
per_platform_key_names: r.boolean(),
|
711
|
+
reviewing: r.boolean(),
|
712
|
+
auto_toggle_unverified: r.boolean(),
|
713
|
+
offline_translation: r.boolean(),
|
714
|
+
key_editing: r.boolean(),
|
715
|
+
inline_machine_translations: r.boolean(),
|
716
|
+
custom_translation_statuses: r.boolean(),
|
717
|
+
custom_translation_statuses_allow_multiple: r.boolean(),
|
718
|
+
segmentation: r.boolean(),
|
719
|
+
contributor_preview_download_enabled: r.boolean()
|
720
|
+
}), pr = r.object({
|
721
|
+
not_reviewed: r.number(),
|
722
|
+
unverified: r.number(),
|
723
|
+
spelling_grammar: r.number(),
|
724
|
+
inconsistent_placeholders: r.number(),
|
725
|
+
inconsistent_html: r.number(),
|
726
|
+
different_number_of_urls: r.number(),
|
727
|
+
different_urls: r.number(),
|
728
|
+
leading_whitespace: r.number(),
|
729
|
+
trailing_whitespace: r.number(),
|
730
|
+
different_number_of_email_address: r.number(),
|
731
|
+
different_email_address: r.number(),
|
732
|
+
different_brackets: r.number(),
|
733
|
+
different_numbers: r.number(),
|
734
|
+
double_space: r.number(),
|
735
|
+
special_placeholder: r.number(),
|
736
|
+
unbalanced_brackets: r.number()
|
737
|
+
}), vr = r.object({
|
738
|
+
progress_total: r.number(),
|
739
|
+
keys_total: r.number(),
|
740
|
+
team: r.number(),
|
741
|
+
base_words: r.number(),
|
742
|
+
qa_issues_total: r.number(),
|
743
|
+
qa_issues: pr
|
744
|
+
}), F = r.object({
|
745
|
+
project_id: r.string(),
|
746
|
+
project_type: we,
|
747
|
+
name: r.string(),
|
748
|
+
description: r.string(),
|
749
|
+
created_at: r.string(),
|
750
|
+
created_at_timestamp: r.number(),
|
751
|
+
created_by: r.number(),
|
752
|
+
created_by_email: r.string(),
|
753
|
+
team_id: r.number(),
|
754
|
+
base_language_id: r.number(),
|
755
|
+
base_language_iso: r.string(),
|
756
|
+
settings: hr,
|
757
|
+
statistics: vr,
|
758
|
+
languages: r.array(gr)
|
759
|
+
}), Tr = r.object({
|
760
|
+
name: r.string(),
|
761
|
+
team_id: r.number(),
|
762
|
+
base_lang_iso: r.string(),
|
763
|
+
languages: r.array(br),
|
764
|
+
project_type: we,
|
765
|
+
is_segmentation_enabled: r.boolean()
|
766
|
+
}), Se = () => "/projects", yr = st({
|
767
|
+
description: "Create a new project",
|
768
|
+
method: "post",
|
769
|
+
pathResolver: Se,
|
770
|
+
requestBodySchema: Tr,
|
771
|
+
successResponseBodySchema: F
|
772
|
+
}), wr = r.object({
|
773
|
+
project_type: we.optional(),
|
774
|
+
filter_team_id: r.number().optional(),
|
775
|
+
filter_names: r.string().optional(),
|
776
|
+
include_statistics: r.boolean().optional(),
|
777
|
+
include_settings: r.boolean().optional(),
|
778
|
+
limit: r.number().optional(),
|
779
|
+
page: r.number().optional()
|
780
|
+
}), Sr = r.array(
|
781
|
+
r.union([
|
782
|
+
F.omit({ statistics: !0, settings: !0 }),
|
783
|
+
F.pick({ settings: !0, statistics: !0 }).partial()
|
784
|
+
])
|
785
|
+
), Ir = Q({
|
786
|
+
description: "List all projects",
|
787
|
+
pathResolver: Se,
|
788
|
+
requestQuerySchema: wr,
|
789
|
+
successResponseBodySchema: Sr
|
790
|
+
}), Er = r.object({
|
791
|
+
project_id: r.string()
|
792
|
+
}), Pr = Q({
|
793
|
+
description: "Retrieve a project",
|
794
|
+
pathResolver: Se,
|
795
|
+
requestQuerySchema: Er,
|
796
|
+
successResponseBodySchema: F
|
797
|
+
}), Tt = r.union([
|
798
|
+
r.literal("owner"),
|
799
|
+
r.literal("admin"),
|
800
|
+
r.literal("biller"),
|
801
|
+
r.literal("member")
|
802
|
+
]), kr = r.object({
|
803
|
+
user_id: r.number(),
|
804
|
+
email: r.string().email(),
|
805
|
+
fullname: r.string(),
|
806
|
+
created_at: r.string(),
|
807
|
+
created_at_timestamp: r.number(),
|
808
|
+
role: Tt
|
809
|
+
}), Nr = r.object({
|
810
|
+
team_id: r.number(),
|
811
|
+
team_user: kr
|
812
|
+
}), Cr = Q({
|
713
813
|
description: "Get the details of a team user",
|
714
|
-
requestPathParamsSchema:
|
814
|
+
requestPathParamsSchema: r.object({ teamId: r.number(), userId: r.number() }),
|
715
815
|
pathResolver: ({ teamId: e, userId: t }) => `/teams/${e}/users/${t}`,
|
716
|
-
successResponseBodySchema:
|
717
|
-
}),
|
718
|
-
accessToken:
|
719
|
-
refreshToken:
|
720
|
-
}),
|
816
|
+
successResponseBodySchema: Nr
|
817
|
+
}), jr = r.object({
|
818
|
+
accessToken: r.string(),
|
819
|
+
refreshToken: r.string()
|
820
|
+
}), Ie = st({
|
721
821
|
description: "Takes a teamId and returns a JWT token access and refresh token for the user",
|
722
822
|
method: "post",
|
723
|
-
requestPathParamsSchema:
|
823
|
+
requestPathParamsSchema: r.object({ teamId: r.number() }),
|
724
824
|
pathResolver: (e) => `/team/${e.teamId}/actions/get-user-token`,
|
725
|
-
requestHeaderSchema:
|
726
|
-
Authorization:
|
727
|
-
"x-csrf-token":
|
825
|
+
requestHeaderSchema: r.object({
|
826
|
+
Authorization: r.string().optional(),
|
827
|
+
"x-csrf-token": r.string().optional()
|
728
828
|
}),
|
729
|
-
requestBodySchema:
|
730
|
-
successResponseBodySchema:
|
731
|
-
})
|
829
|
+
requestBodySchema: r.undefined(),
|
830
|
+
successResponseBodySchema: jr
|
831
|
+
});
|
832
|
+
function ma(e, t = {}) {
|
833
|
+
return At({
|
834
|
+
...t,
|
835
|
+
mutationFn: (n) => K(e, yr, {
|
836
|
+
body: n
|
837
|
+
})
|
838
|
+
});
|
839
|
+
}
|
840
|
+
const Rr = {
|
732
841
|
teamUserKey: (e, t) => ["GetTeamUsers", e, t]
|
733
|
-
},
|
842
|
+
}, Ar = (e, t) => U({
|
734
843
|
...t,
|
735
|
-
queryFn: ({ queryKey: [n,
|
736
|
-
}),
|
844
|
+
queryFn: ({ queryKey: [n, a, o] }) => W(e, Cr, { pathParams: { teamId: a, userId: o } })
|
845
|
+
}), Or = {
|
737
846
|
teamKey: (e) => ["getUserToken", e]
|
738
|
-
},
|
847
|
+
}, Lr = (e, t) => U({
|
739
848
|
...t,
|
740
|
-
queryFn: ({ queryKey: [n,
|
741
|
-
pathParams: { teamId:
|
849
|
+
queryFn: ({ queryKey: [n, a] }) => K(e, Ie, {
|
850
|
+
pathParams: { teamId: a },
|
742
851
|
headers: {}
|
743
852
|
})
|
744
|
-
}),
|
853
|
+
}), fa = {
|
854
|
+
// TODO nic: Is there a better way to key this?
|
855
|
+
paramsKey: (e) => ["listProjects", e]
|
856
|
+
};
|
857
|
+
function _a(e, t) {
|
858
|
+
return U({
|
859
|
+
...t,
|
860
|
+
queryFn: ({ queryKey: [n, a] }) => W(e, Ir, {
|
861
|
+
queryParams: a
|
862
|
+
})
|
863
|
+
});
|
864
|
+
}
|
865
|
+
const qr = {
|
745
866
|
projectUserKey: (e, t) => ["RetrieveContributor", e, t]
|
746
|
-
},
|
867
|
+
}, Mr = (e, t) => U({
|
747
868
|
...t,
|
748
|
-
queryFn: ({ queryKey: [n,
|
749
|
-
pathParams: { projectId:
|
869
|
+
queryFn: ({ queryKey: [n, a, o] }) => W(e, _r, {
|
870
|
+
pathParams: { projectId: a, contributorId: o }
|
750
871
|
})
|
751
|
-
}),
|
752
|
-
|
753
|
-
|
754
|
-
|
755
|
-
|
756
|
-
|
757
|
-
|
758
|
-
|
759
|
-
|
760
|
-
|
761
|
-
|
762
|
-
|
763
|
-
|
872
|
+
}), ba = {
|
873
|
+
projectIdKey: (e) => ["retrieveProject", e]
|
874
|
+
};
|
875
|
+
function ga(e, t) {
|
876
|
+
return U({
|
877
|
+
...t,
|
878
|
+
queryFn: ({ queryKey: [n, a] }) => W(e, Pr, {
|
879
|
+
queryParams: { project_id: a }
|
880
|
+
})
|
881
|
+
});
|
882
|
+
}
|
883
|
+
const Ur = r.object({
|
884
|
+
userId: r.number(),
|
885
|
+
userUuid: r.string(),
|
886
|
+
teamId: r.number(),
|
887
|
+
userTeamRole: Tt,
|
888
|
+
userEmail: r.string().email(),
|
889
|
+
userName: r.string(),
|
890
|
+
userCurrentTeamId: r.number(),
|
891
|
+
planId: r.number(),
|
892
|
+
planName: r.string(),
|
893
|
+
isProviderAlpha: r.boolean(),
|
894
|
+
isFullyAuthenticated: r.boolean(),
|
895
|
+
exp: r.number()
|
764
896
|
});
|
765
|
-
function
|
897
|
+
function Y(e) {
|
766
898
|
try {
|
767
899
|
const t = e.split(".")[1], n = atob(t);
|
768
|
-
return
|
900
|
+
return Ur.parse(JSON.parse(n));
|
769
901
|
} catch {
|
770
902
|
return;
|
771
903
|
}
|
772
904
|
}
|
773
|
-
const
|
905
|
+
const G = class G extends CustomEvent {
|
774
906
|
constructor(t) {
|
775
|
-
super(
|
776
|
-
detail: { token: t, payload:
|
907
|
+
super(G.eventName, {
|
908
|
+
detail: { token: t, payload: Y(t.accessToken) }
|
777
909
|
});
|
778
910
|
}
|
779
911
|
};
|
780
|
-
|
781
|
-
let
|
782
|
-
function
|
783
|
-
const n =
|
784
|
-
queryKey:
|
785
|
-
}),
|
786
|
-
return
|
787
|
-
n.data && n.data.accessToken !==
|
912
|
+
Ce(G, "eventName", "new-jwt-issued");
|
913
|
+
let O = G;
|
914
|
+
function ha(e, t) {
|
915
|
+
const n = Lr(e, {
|
916
|
+
queryKey: Or.teamKey(t)
|
917
|
+
}), a = nt();
|
918
|
+
return M(() => {
|
919
|
+
n.data && n.data.accessToken !== a.current && (window.dispatchEvent(new O(n.data)), a.current = n.data.accessToken);
|
788
920
|
}, [n.data]), n;
|
789
921
|
}
|
790
|
-
function
|
791
|
-
const e =
|
922
|
+
function Ee() {
|
923
|
+
const e = be(document.cookie, "accessToken"), t = be(document.cookie, "refreshToken");
|
792
924
|
return !e || !t ? Promise.resolve(void 0) : Promise.resolve({ accessToken: e, refreshToken: t });
|
793
925
|
}
|
794
|
-
function
|
795
|
-
return Promise.resolve(
|
926
|
+
function xr() {
|
927
|
+
return Promise.resolve(be(document.cookie, "csrf_token"));
|
796
928
|
}
|
797
|
-
function
|
798
|
-
var n,
|
799
|
-
return (
|
929
|
+
function be(e, t) {
|
930
|
+
var n, a;
|
931
|
+
return (a = (n = e.split(";").find((o) => o.trim().startsWith(`${t}=`))) == null ? void 0 : n.trim()) == null ? void 0 : a.substring(t.length + 1);
|
800
932
|
}
|
801
|
-
function
|
802
|
-
const [e, t] =
|
803
|
-
return
|
933
|
+
function yt() {
|
934
|
+
const [e, t] = ge();
|
935
|
+
return M(() => {
|
804
936
|
let n = !1;
|
805
|
-
const
|
806
|
-
t(
|
937
|
+
const a = (o) => {
|
938
|
+
t(o.detail.payload), n = !0;
|
807
939
|
};
|
808
|
-
return
|
809
|
-
n || t(
|
810
|
-
}), window.addEventListener(
|
811
|
-
window.removeEventListener(
|
940
|
+
return Ee().then((o) => o && Y(o.accessToken)).then((o) => {
|
941
|
+
n || t(o);
|
942
|
+
}), window.addEventListener(O.eventName, a), () => {
|
943
|
+
window.removeEventListener(O.eventName, a);
|
812
944
|
};
|
813
945
|
}, []), e;
|
814
946
|
}
|
815
|
-
function
|
816
|
-
const t =
|
817
|
-
return
|
818
|
-
queryKey:
|
947
|
+
function pa(e) {
|
948
|
+
const t = yt();
|
949
|
+
return Ar(e, {
|
950
|
+
queryKey: Rr.teamUserKey((t == null ? void 0 : t.teamId) ?? 0, (t == null ? void 0 : t.userId) ?? 0)
|
819
951
|
});
|
820
952
|
}
|
821
|
-
function
|
822
|
-
const n =
|
823
|
-
return
|
824
|
-
queryKey:
|
953
|
+
function va(e, t) {
|
954
|
+
const n = yt();
|
955
|
+
return Mr(e, {
|
956
|
+
queryKey: qr.projectUserKey(t, (n == null ? void 0 : n.userId) ?? 0),
|
825
957
|
enabled: n !== void 0
|
826
958
|
});
|
827
959
|
}
|
828
|
-
async function
|
829
|
-
const e = await
|
960
|
+
async function Ta() {
|
961
|
+
const e = await Ee();
|
830
962
|
if (!e)
|
831
963
|
return Promise.resolve(void 0);
|
832
|
-
const t =
|
964
|
+
const t = Y(e.accessToken);
|
833
965
|
return t ? { ...e, payload: t } : Promise.resolve(void 0);
|
834
966
|
}
|
835
|
-
function
|
967
|
+
function D(e) {
|
836
968
|
return { Authorization: `Bearer ${e}` };
|
837
969
|
}
|
838
|
-
function
|
839
|
-
return (n) => async (
|
970
|
+
function Br(e, t) {
|
971
|
+
return (n) => async (a, o) => {
|
840
972
|
var u;
|
841
|
-
const
|
842
|
-
if (
|
843
|
-
return n(
|
844
|
-
const c = await n(
|
845
|
-
...
|
846
|
-
headers: { ...
|
973
|
+
const s = await t.getCachedJwtToken();
|
974
|
+
if (s === void 0)
|
975
|
+
return n(a, o);
|
976
|
+
const c = await n(a, {
|
977
|
+
...o,
|
978
|
+
headers: { ...o.headers, ...D(s.accessToken) }
|
847
979
|
});
|
848
|
-
if (
|
849
|
-
const d =
|
980
|
+
if (s && (c.status === 401 || c.status === 403)) {
|
981
|
+
const d = Y(s.accessToken);
|
850
982
|
if (!d)
|
851
983
|
return c;
|
852
|
-
const l = await
|
984
|
+
const l = await K(e, Ie, {
|
853
985
|
pathParams: { teamId: d.teamId },
|
854
|
-
headers:
|
986
|
+
headers: D(s.refreshToken)
|
855
987
|
});
|
856
|
-
return await ((u = t.onNewJwtTokenIssued) == null ? void 0 : u.call(t, l)), n(
|
857
|
-
...
|
858
|
-
headers: { ...
|
988
|
+
return await ((u = t.onNewJwtTokenIssued) == null ? void 0 : u.call(t, l)), n(a, {
|
989
|
+
...o,
|
990
|
+
headers: { ...o.headers, ...D(l.accessToken) }
|
859
991
|
});
|
860
992
|
}
|
861
993
|
return c;
|
862
994
|
};
|
863
995
|
}
|
864
|
-
const
|
996
|
+
const $r = {
|
865
997
|
wretch: {
|
866
998
|
lokaliseAuth(e) {
|
867
|
-
return this.middlewares([
|
999
|
+
return this.middlewares([Br(this, e)]);
|
868
1000
|
}
|
869
1001
|
}
|
870
1002
|
};
|
871
|
-
function
|
872
|
-
return (n) => async (
|
1003
|
+
function Hr(e, t) {
|
1004
|
+
return (n) => async (a, o) => {
|
873
1005
|
var d;
|
874
1006
|
if (await t.getCachedJwtToken() !== void 0)
|
875
|
-
return n(
|
1007
|
+
return n(a, o);
|
876
1008
|
const c = await t.getCsrfToken();
|
877
1009
|
if (c === void 0)
|
878
|
-
return n(
|
879
|
-
const u = await
|
1010
|
+
return n(a, o);
|
1011
|
+
const u = await K(e, Ie, {
|
880
1012
|
pathParams: { teamId: await t.getTeamId() },
|
881
1013
|
headers: { "x-csrf-token": c }
|
882
1014
|
});
|
883
|
-
return await ((d = t.onNewJwtTokenIssued) == null ? void 0 : d.call(t, u)), n(
|
884
|
-
...
|
885
|
-
headers: { ...
|
1015
|
+
return await ((d = t.onNewJwtTokenIssued) == null ? void 0 : d.call(t, u)), n(a, {
|
1016
|
+
...o,
|
1017
|
+
headers: { ...o.headers, ...D(u.accessToken) }
|
886
1018
|
});
|
887
1019
|
};
|
888
1020
|
}
|
889
|
-
const
|
1021
|
+
const ya = {
|
890
1022
|
wretch: {
|
891
1023
|
lokaliseAuth(e = {}) {
|
892
|
-
return this.addon(
|
1024
|
+
return this.addon($r).lokaliseAuth(et(e));
|
893
1025
|
},
|
894
1026
|
promoteClassicSession(e) {
|
895
|
-
const t =
|
896
|
-
return this.middlewares([
|
1027
|
+
const t = et(e);
|
1028
|
+
return this.middlewares([Hr(this, t)]);
|
897
1029
|
}
|
898
1030
|
}
|
899
1031
|
};
|
900
|
-
function
|
1032
|
+
function et(e) {
|
901
1033
|
return {
|
902
1034
|
...e,
|
903
|
-
getCachedJwtToken: e.getCachedJwtToken ??
|
904
|
-
getCsrfToken: "getCsrfToken" in e ? e.getCsrfToken :
|
1035
|
+
getCachedJwtToken: e.getCachedJwtToken ?? Ee,
|
1036
|
+
getCsrfToken: "getCsrfToken" in e ? e.getCsrfToken : xr,
|
905
1037
|
onNewJwtTokenIssued: (t) => {
|
906
1038
|
var n;
|
907
|
-
return window.dispatchEvent(new
|
1039
|
+
return window.dispatchEvent(new O(t)), ((n = e.onNewJwtTokenIssued) == null ? void 0 : n.call(e, t)) ?? Promise.resolve();
|
908
1040
|
}
|
909
1041
|
};
|
910
1042
|
}
|
911
1043
|
export {
|
912
|
-
|
913
|
-
|
914
|
-
|
915
|
-
|
916
|
-
|
917
|
-
|
918
|
-
|
919
|
-
|
920
|
-
|
921
|
-
|
922
|
-
|
1044
|
+
ua as Breadcrumbs,
|
1045
|
+
ht as ENTERPRISE_OPENSOURCE_PLAN_ID,
|
1046
|
+
Rn as ENTERPRISE_PLAN_IDS,
|
1047
|
+
Cn as ESSENTIAL_PLAN_IDS,
|
1048
|
+
gt as FREE_PLAN_ID,
|
1049
|
+
jr as JWT_TOKEN_SCHEMA,
|
1050
|
+
$r as LokaliseAuthAddon,
|
1051
|
+
ya as LokaliseAuthBrowserAddon,
|
1052
|
+
z as NavigationPanel,
|
1053
|
+
da as NavigationTabs,
|
1054
|
+
jn as PRO_PLAN_IDS,
|
923
1055
|
Nn as START_PLAN_IDS,
|
924
|
-
|
925
|
-
|
926
|
-
|
927
|
-
|
928
|
-
|
929
|
-
|
930
|
-
|
931
|
-
|
932
|
-
|
933
|
-
|
934
|
-
|
935
|
-
|
936
|
-
|
937
|
-
|
938
|
-
|
939
|
-
|
940
|
-
|
941
|
-
|
942
|
-
|
943
|
-
|
944
|
-
|
945
|
-
|
946
|
-
|
947
|
-
|
948
|
-
|
949
|
-
|
950
|
-
|
951
|
-
|
952
|
-
|
953
|
-
|
954
|
-
|
1056
|
+
S as Sidebar,
|
1057
|
+
kr as TEAM_USER_SCHEMA,
|
1058
|
+
kn as TRIAL_PLAN_ID,
|
1059
|
+
oa as convertNewLineToBreakTag,
|
1060
|
+
yr as createProject,
|
1061
|
+
sa as formatDate,
|
1062
|
+
ca as formatDateTz,
|
1063
|
+
Ta as getAuthenticatedSessionDetailFromRequest,
|
1064
|
+
Cr as getTeamUser,
|
1065
|
+
Rr as getTeamUsersQueryKey,
|
1066
|
+
Ie as getUserToken,
|
1067
|
+
Or as getUserTokenKey,
|
1068
|
+
aa as isEnterpriseOpenSourcePlan,
|
1069
|
+
na as isEnterprisePlan,
|
1070
|
+
ea as isEssentialPlan,
|
1071
|
+
ye as isFreePlan,
|
1072
|
+
ra as isPaidPlan,
|
1073
|
+
ta as isProPlan,
|
1074
|
+
Xr as isStartPlan,
|
1075
|
+
pt as isTrialPlan,
|
1076
|
+
Ir as listProjects,
|
1077
|
+
fa as listProjectsKey,
|
1078
|
+
ia as makeUrlClickable,
|
1079
|
+
Y as parseJwtTokenPayload,
|
1080
|
+
_r as retrieveContributor,
|
1081
|
+
qr as retrieveContributorKeys,
|
1082
|
+
Pr as retrieveProject,
|
1083
|
+
ba as retrieveProjectQueryKey,
|
1084
|
+
va as useAuthenticatedProjectContributor,
|
1085
|
+
yt as useAuthenticatedSessionPayload,
|
1086
|
+
pa as useAuthenticatedUser,
|
1087
|
+
ma as useCreateProjectMutation,
|
1088
|
+
la as useEffectOnce,
|
1089
|
+
ha as useGetPromotedClassicSessionJwtQuery,
|
1090
|
+
Ar as useGetTeamUsersQuery,
|
1091
|
+
Lr as useGetUserTokenQuery,
|
1092
|
+
_a as useListProjectsQuery,
|
1093
|
+
Mr as useRetrieveContributorQuery,
|
1094
|
+
ga as useRetrieveProjectQuery
|
955
1095
|
};
|