@lokalise/harmony 1.4.0 → 1.5.1
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.css +1 -1
- package/dist/harmony.mjs +564 -348
- package/dist/types/src/components/Sidebar/Sidebar.d.ts +47 -0
- package/dist/types/src/components/Sidebar/Sidebar.stories.d.ts +90 -0
- package/dist/types/src/components/Sidebar/UpgradeIcon/UpgradeIcon.d.ts +5 -0
- package/dist/types/src/components/Sidebar/Widgets/Avatar/Avatar.d.ts +8 -0
- package/dist/types/src/components/Sidebar/Widgets/IconLink/IconLink.d.ts +9 -0
- package/dist/types/src/components/Sidebar/Widgets/Menu/Menu.d.ts +7 -0
- package/dist/types/src/components/Sidebar/Widgets/ProfileMenu/ProfileMenu.d.ts +8 -0
- package/dist/types/src/components/Sidebar/Widgets/ProfileMenu/ProfileMenuContent.d.ts +6 -0
- package/dist/types/src/components/Sidebar/Widgets/ProfileMenu/ProfileMenuContext.d.ts +3 -0
- package/dist/types/src/components/Sidebar/Widgets/ProfileMenu/ProfileMenuProvider.d.ts +7 -0
- package/dist/types/src/components/Sidebar/Widgets/ProfileMenu/ProfileSettingsMenuItem/ProfileSettingsMenuItem.d.ts +8 -0
- package/dist/types/src/components/Sidebar/Widgets/ProfileMenu/TeamMenuItem/TeamMenuItem.d.ts +8 -0
- package/dist/types/src/components/Sidebar/Widgets/ProfileMenu/TeamSwitch/TeamSwitch.d.ts +6 -0
- package/dist/types/src/components/Sidebar/Widgets/ProfileMenu/UpgradeMenuItem/UpgradeMenuItem.d.ts +5 -0
- package/dist/types/src/components/Sidebar/Widgets/ProfileMenu/types.d.ts +22 -0
- package/dist/types/src/components/Sidebar/types.d.ts +14 -0
- package/dist/types/src/components/Sidebar/utils/index.d.ts +4 -0
- package/dist/types/src/node.d.ts +2 -7
- package/dist/types/src/utils/hooks/useEffectOnce.d.ts +5 -0
- package/dist/types/src/utils/node.d.ts +6 -0
- package/dist/types/src/utils/typeUtils.d.ts +3 -0
- package/dist/types/tests/mocks/sidebar/profileMenu.d.ts +2 -0
- package/package.json +3 -2
package/dist/harmony.mjs
CHANGED
@@ -1,475 +1,691 @@
|
|
1
|
-
import { jsx as
|
2
|
-
import * as
|
3
|
-
import { useRef as
|
4
|
-
import { Link as
|
5
|
-
import { format as
|
6
|
-
import { toZonedTime as
|
7
|
-
var
|
8
|
-
function
|
1
|
+
import { jsx as i, jsxs as b, Fragment as Be } from "react/jsx-runtime";
|
2
|
+
import * as k from "react";
|
3
|
+
import { useRef as rn, useState as Me, useCallback as me, useEffect as ie, useContext as an, createContext as on, cloneElement as sn, Fragment as $e, forwardRef as cn } from "react";
|
4
|
+
import { Tooltip as ae, Link as Ue, Menu as oe, MenuList as se, CaretUpIcon as ln, UserIcon as De, MenuItem as $, MenuDivider as ze, Tag as un } from "@lokalise/louis";
|
5
|
+
import { format as We } from "date-fns";
|
6
|
+
import { toZonedTime as dn } from "date-fns-tz";
|
7
|
+
var B = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
|
8
|
+
function Fe(e) {
|
9
9
|
return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
|
10
10
|
}
|
11
|
-
var
|
12
|
-
function
|
13
|
-
if (
|
14
|
-
|
15
|
-
function e(
|
16
|
-
var
|
17
|
-
return
|
11
|
+
var D, ge;
|
12
|
+
function ce() {
|
13
|
+
if (ge) return D;
|
14
|
+
ge = 1;
|
15
|
+
function e(n) {
|
16
|
+
var t = typeof n;
|
17
|
+
return n != null && (t == "object" || t == "function");
|
18
18
|
}
|
19
|
-
return A = e, A;
|
20
|
-
}
|
21
|
-
var D, te;
|
22
|
-
function Ve() {
|
23
|
-
if (te) return D;
|
24
|
-
te = 1;
|
25
|
-
var e = typeof O == "object" && O && O.Object === Object && O;
|
26
19
|
return D = e, D;
|
27
20
|
}
|
28
|
-
var
|
29
|
-
function
|
30
|
-
if (
|
31
|
-
|
32
|
-
var e =
|
33
|
-
return
|
21
|
+
var z, he;
|
22
|
+
function fn() {
|
23
|
+
if (he) return z;
|
24
|
+
he = 1;
|
25
|
+
var e = typeof B == "object" && B && B.Object === Object && B;
|
26
|
+
return z = e, z;
|
34
27
|
}
|
35
|
-
var
|
36
|
-
function
|
37
|
-
if (
|
38
|
-
|
39
|
-
var e =
|
28
|
+
var W, pe;
|
29
|
+
function He() {
|
30
|
+
if (pe) return W;
|
31
|
+
pe = 1;
|
32
|
+
var e = fn(), n = typeof self == "object" && self && self.Object === Object && self, t = e || n || Function("return this")();
|
33
|
+
return W = t, W;
|
34
|
+
}
|
35
|
+
var F, be;
|
36
|
+
function mn() {
|
37
|
+
if (be) return F;
|
38
|
+
be = 1;
|
39
|
+
var e = He(), n = function() {
|
40
40
|
return e.Date.now();
|
41
41
|
};
|
42
|
-
return
|
42
|
+
return F = n, F;
|
43
43
|
}
|
44
|
-
var
|
45
|
-
function
|
46
|
-
if (
|
47
|
-
|
44
|
+
var H, _e;
|
45
|
+
function gn() {
|
46
|
+
if (_e) return H;
|
47
|
+
_e = 1;
|
48
48
|
var e = /\s/;
|
49
|
-
function
|
50
|
-
for (var
|
49
|
+
function n(t) {
|
50
|
+
for (var r = t.length; r-- && e.test(t.charAt(r)); )
|
51
51
|
;
|
52
|
-
return
|
52
|
+
return r;
|
53
53
|
}
|
54
|
-
return
|
54
|
+
return H = n, H;
|
55
55
|
}
|
56
|
-
var G,
|
57
|
-
function
|
58
|
-
if (
|
59
|
-
|
60
|
-
var e =
|
61
|
-
function
|
62
|
-
return
|
56
|
+
var G, ve;
|
57
|
+
function hn() {
|
58
|
+
if (ve) return G;
|
59
|
+
ve = 1;
|
60
|
+
var e = gn(), n = /^\s+/;
|
61
|
+
function t(r) {
|
62
|
+
return r && r.slice(0, e(r) + 1).replace(n, "");
|
63
63
|
}
|
64
|
-
return G =
|
64
|
+
return G = t, G;
|
65
65
|
}
|
66
|
-
var
|
67
|
-
function
|
68
|
-
if (
|
69
|
-
|
70
|
-
var e =
|
71
|
-
return
|
66
|
+
var V, Te;
|
67
|
+
function Ge() {
|
68
|
+
if (Te) return V;
|
69
|
+
Te = 1;
|
70
|
+
var e = He(), n = e.Symbol;
|
71
|
+
return V = n, V;
|
72
72
|
}
|
73
|
-
var
|
74
|
-
function
|
75
|
-
if (
|
76
|
-
|
77
|
-
var e =
|
78
|
-
function
|
79
|
-
var
|
73
|
+
var Y, we;
|
74
|
+
function pn() {
|
75
|
+
if (we) return Y;
|
76
|
+
we = 1;
|
77
|
+
var e = Ge(), n = Object.prototype, t = n.hasOwnProperty, r = n.toString, a = e ? e.toStringTag : void 0;
|
78
|
+
function o(c) {
|
79
|
+
var l = t.call(c, a), u = c[a];
|
80
80
|
try {
|
81
|
-
c[
|
82
|
-
var
|
81
|
+
c[a] = void 0;
|
82
|
+
var s = !0;
|
83
83
|
} catch {
|
84
84
|
}
|
85
|
-
var d =
|
86
|
-
return
|
85
|
+
var d = r.call(c);
|
86
|
+
return s && (l ? c[a] = u : delete c[a]), d;
|
87
87
|
}
|
88
|
-
return
|
88
|
+
return Y = o, Y;
|
89
89
|
}
|
90
|
-
var
|
91
|
-
function
|
92
|
-
if (
|
93
|
-
|
94
|
-
var e = Object.prototype,
|
95
|
-
function
|
96
|
-
return
|
90
|
+
var Z, Ie;
|
91
|
+
function bn() {
|
92
|
+
if (Ie) return Z;
|
93
|
+
Ie = 1;
|
94
|
+
var e = Object.prototype, n = e.toString;
|
95
|
+
function t(r) {
|
96
|
+
return n.call(r);
|
97
97
|
}
|
98
|
-
return
|
98
|
+
return Z = t, Z;
|
99
99
|
}
|
100
|
-
var
|
101
|
-
function
|
102
|
-
if (
|
103
|
-
|
104
|
-
var e =
|
105
|
-
function c(
|
106
|
-
return
|
100
|
+
var X, ye;
|
101
|
+
function _n() {
|
102
|
+
if (ye) return X;
|
103
|
+
ye = 1;
|
104
|
+
var e = Ge(), n = pn(), t = bn(), r = "[object Null]", a = "[object Undefined]", o = e ? e.toStringTag : void 0;
|
105
|
+
function c(l) {
|
106
|
+
return l == null ? l === void 0 ? a : r : o && o in Object(l) ? n(l) : t(l);
|
107
107
|
}
|
108
|
-
return
|
108
|
+
return X = c, X;
|
109
109
|
}
|
110
|
-
var
|
111
|
-
function
|
112
|
-
if (
|
113
|
-
|
114
|
-
function e(
|
115
|
-
return
|
110
|
+
var J, Ne;
|
111
|
+
function vn() {
|
112
|
+
if (Ne) return J;
|
113
|
+
Ne = 1;
|
114
|
+
function e(n) {
|
115
|
+
return n != null && typeof n == "object";
|
116
116
|
}
|
117
|
-
return
|
117
|
+
return J = e, J;
|
118
118
|
}
|
119
|
-
var
|
120
|
-
function
|
121
|
-
if (
|
122
|
-
|
123
|
-
var e =
|
124
|
-
function
|
125
|
-
return typeof
|
119
|
+
var K, Se;
|
120
|
+
function Tn() {
|
121
|
+
if (Se) return K;
|
122
|
+
Se = 1;
|
123
|
+
var e = _n(), n = vn(), t = "[object Symbol]";
|
124
|
+
function r(a) {
|
125
|
+
return typeof a == "symbol" || n(a) && e(a) == t;
|
126
126
|
}
|
127
|
-
return
|
127
|
+
return K = r, K;
|
128
128
|
}
|
129
|
-
var
|
130
|
-
function
|
131
|
-
if (
|
132
|
-
|
133
|
-
var e =
|
134
|
-
function
|
135
|
-
if (typeof
|
136
|
-
return
|
137
|
-
if (
|
138
|
-
return
|
139
|
-
if (
|
140
|
-
var d = typeof
|
141
|
-
|
129
|
+
var Q, Ee;
|
130
|
+
function wn() {
|
131
|
+
if (Ee) return Q;
|
132
|
+
Ee = 1;
|
133
|
+
var e = hn(), n = ce(), t = Tn(), r = NaN, a = /^[-+]0x[0-9a-f]+$/i, o = /^0b[01]+$/i, c = /^0o[0-7]+$/i, l = parseInt;
|
134
|
+
function u(s) {
|
135
|
+
if (typeof s == "number")
|
136
|
+
return s;
|
137
|
+
if (t(s))
|
138
|
+
return r;
|
139
|
+
if (n(s)) {
|
140
|
+
var d = typeof s.valueOf == "function" ? s.valueOf() : s;
|
141
|
+
s = n(d) ? d + "" : d;
|
142
142
|
}
|
143
|
-
if (typeof
|
144
|
-
return
|
145
|
-
|
146
|
-
var
|
147
|
-
return
|
143
|
+
if (typeof s != "string")
|
144
|
+
return s === 0 ? s : +s;
|
145
|
+
s = e(s);
|
146
|
+
var h = o.test(s);
|
147
|
+
return h || c.test(s) ? l(s.slice(2), h ? 2 : 8) : a.test(s) ? r : +s;
|
148
148
|
}
|
149
|
-
return
|
149
|
+
return Q = u, Q;
|
150
150
|
}
|
151
|
-
var
|
152
|
-
function
|
153
|
-
if (
|
154
|
-
|
155
|
-
var e =
|
156
|
-
function c(
|
157
|
-
var d,
|
158
|
-
if (typeof
|
159
|
-
throw new TypeError(
|
160
|
-
|
161
|
-
function
|
162
|
-
var
|
163
|
-
return d =
|
151
|
+
var ee, Pe;
|
152
|
+
function Ve() {
|
153
|
+
if (Pe) return ee;
|
154
|
+
Pe = 1;
|
155
|
+
var e = ce(), n = mn(), t = wn(), r = "Expected a function", a = Math.max, o = Math.min;
|
156
|
+
function c(l, u, s) {
|
157
|
+
var d, h, v, T, g, w, y = 0, S = !1, m = !1, N = !0;
|
158
|
+
if (typeof l != "function")
|
159
|
+
throw new TypeError(r);
|
160
|
+
u = t(u) || 0, e(s) && (S = !!s.leading, m = "maxWait" in s, v = m ? a(t(s.maxWait) || 0, u) : v, N = "trailing" in s ? !!s.trailing : N);
|
161
|
+
function _(f) {
|
162
|
+
var E = d, R = h;
|
163
|
+
return d = h = void 0, y = f, T = l.apply(R, E), T;
|
164
164
|
}
|
165
|
-
function
|
166
|
-
return y = f,
|
165
|
+
function p(f) {
|
166
|
+
return y = f, g = setTimeout(q, u), S ? _(f) : T;
|
167
167
|
}
|
168
|
-
function
|
169
|
-
var
|
170
|
-
return
|
168
|
+
function A(f) {
|
169
|
+
var E = f - w, R = f - y, fe = u - E;
|
170
|
+
return m ? o(fe, v - R) : fe;
|
171
171
|
}
|
172
|
-
function
|
173
|
-
var
|
174
|
-
return
|
172
|
+
function ue(f) {
|
173
|
+
var E = f - w, R = f - y;
|
174
|
+
return w === void 0 || E >= u || E < 0 || m && R >= v;
|
175
175
|
}
|
176
|
-
function
|
177
|
-
var f =
|
178
|
-
if (
|
179
|
-
return
|
180
|
-
|
176
|
+
function q() {
|
177
|
+
var f = n();
|
178
|
+
if (ue(f))
|
179
|
+
return de(f);
|
180
|
+
g = setTimeout(q, A(f));
|
181
181
|
}
|
182
|
-
function
|
183
|
-
return
|
182
|
+
function de(f) {
|
183
|
+
return g = void 0, N && d ? _(f) : (d = h = void 0, T);
|
184
184
|
}
|
185
|
-
function
|
186
|
-
|
185
|
+
function nn() {
|
186
|
+
g !== void 0 && clearTimeout(g), y = 0, d = w = h = g = void 0;
|
187
187
|
}
|
188
|
-
function
|
189
|
-
return
|
188
|
+
function tn() {
|
189
|
+
return g === void 0 ? T : de(n());
|
190
190
|
}
|
191
|
-
function
|
192
|
-
var f =
|
193
|
-
if (d = arguments,
|
194
|
-
if (
|
195
|
-
return
|
196
|
-
if (
|
197
|
-
return clearTimeout(
|
191
|
+
function U() {
|
192
|
+
var f = n(), E = ue(f);
|
193
|
+
if (d = arguments, h = this, w = f, E) {
|
194
|
+
if (g === void 0)
|
195
|
+
return p(w);
|
196
|
+
if (m)
|
197
|
+
return clearTimeout(g), g = setTimeout(q, u), _(w);
|
198
198
|
}
|
199
|
-
return
|
199
|
+
return g === void 0 && (g = setTimeout(q, u)), T;
|
200
200
|
}
|
201
|
-
return
|
201
|
+
return U.cancel = nn, U.flush = tn, U;
|
202
202
|
}
|
203
|
-
return
|
203
|
+
return ee = c, ee;
|
204
204
|
}
|
205
|
-
var
|
206
|
-
const
|
207
|
-
var
|
208
|
-
function
|
209
|
-
if (
|
210
|
-
|
211
|
-
var e =
|
212
|
-
function
|
213
|
-
var
|
214
|
-
if (typeof
|
215
|
-
throw new TypeError(
|
216
|
-
return
|
217
|
-
leading:
|
218
|
-
maxWait:
|
219
|
-
trailing:
|
205
|
+
var In = Ve();
|
206
|
+
const yn = /* @__PURE__ */ Fe(In);
|
207
|
+
var ne, je;
|
208
|
+
function Nn() {
|
209
|
+
if (je) return ne;
|
210
|
+
je = 1;
|
211
|
+
var e = Ve(), n = ce(), t = "Expected a function";
|
212
|
+
function r(a, o, c) {
|
213
|
+
var l = !0, u = !0;
|
214
|
+
if (typeof a != "function")
|
215
|
+
throw new TypeError(t);
|
216
|
+
return n(c) && (l = "leading" in c ? !!c.leading : l, u = "trailing" in c ? !!c.trailing : u), e(a, o, {
|
217
|
+
leading: l,
|
218
|
+
maxWait: o,
|
219
|
+
trailing: u
|
220
220
|
});
|
221
221
|
}
|
222
|
-
return
|
222
|
+
return ne = r, ne;
|
223
223
|
}
|
224
|
-
var
|
225
|
-
const
|
226
|
-
switch (
|
224
|
+
var Sn = Nn();
|
225
|
+
const En = /* @__PURE__ */ Fe(Sn), Pn = (e, n, t, r) => {
|
226
|
+
switch (n) {
|
227
227
|
case "debounce":
|
228
|
-
return
|
228
|
+
return yn(e, t, r);
|
229
229
|
case "throttle":
|
230
|
-
return
|
230
|
+
return En(e, t, r);
|
231
231
|
default:
|
232
232
|
return e;
|
233
233
|
}
|
234
|
-
},
|
234
|
+
}, jn = (
|
235
235
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
236
236
|
(e) => {
|
237
|
-
const
|
238
|
-
return
|
239
|
-
|
240
|
-
}),
|
241
|
-
var
|
242
|
-
return (
|
237
|
+
const n = k.useRef(e);
|
238
|
+
return k.useEffect(() => {
|
239
|
+
n.current = e;
|
240
|
+
}), k.useMemo(() => (...t) => {
|
241
|
+
var r;
|
242
|
+
return (r = n.current) === null || r === void 0 ? void 0 : r.call(n, ...t);
|
243
243
|
}, []);
|
244
244
|
}
|
245
|
-
),
|
245
|
+
), Ln = (
|
246
246
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
247
247
|
(e) => {
|
248
|
-
const [
|
248
|
+
const [n, t] = k.useState((e == null ? void 0 : e.current) || null);
|
249
249
|
return e && setTimeout(() => {
|
250
|
-
e.current !==
|
251
|
-
}, 0), { refProxy:
|
252
|
-
|
250
|
+
e.current !== n && t(e.current);
|
251
|
+
}, 0), { refProxy: k.useMemo(() => new Proxy((a) => {
|
252
|
+
a !== n && t(a);
|
253
253
|
}, {
|
254
|
-
get(
|
255
|
-
return
|
254
|
+
get(a, o) {
|
255
|
+
return o === "current" ? n : a[o];
|
256
256
|
},
|
257
|
-
set(
|
258
|
-
return
|
257
|
+
set(a, o, c) {
|
258
|
+
return o === "current" ? t(c) : a[o] = c, !0;
|
259
259
|
}
|
260
|
-
}), [
|
260
|
+
}), [n]), refElement: n, setRefElement: t };
|
261
261
|
}
|
262
|
-
),
|
262
|
+
), xn = (e, n) => n === "border-box" ? {
|
263
263
|
width: e.borderBoxSize[0].inlineSize,
|
264
264
|
height: e.borderBoxSize[0].blockSize
|
265
|
-
} :
|
265
|
+
} : n === "content-box" ? {
|
266
266
|
width: e.contentBoxSize[0].inlineSize,
|
267
267
|
height: e.contentBoxSize[0].blockSize
|
268
268
|
} : {
|
269
269
|
width: e.contentRect.width,
|
270
270
|
height: e.contentRect.height
|
271
271
|
};
|
272
|
-
function
|
273
|
-
const
|
272
|
+
function Cn({ skipOnMount: e = !1, refreshMode: n, refreshRate: t = 1e3, refreshOptions: r, handleWidth: a = !0, handleHeight: o = !0, targetRef: c, observerOptions: l, onResize: u } = {}) {
|
273
|
+
const s = rn(e), d = jn(u), [h, v] = Me({
|
274
274
|
width: void 0,
|
275
275
|
height: void 0
|
276
|
-
}), { refProxy:
|
277
|
-
if (!
|
276
|
+
}), { refProxy: T, refElement: g } = Ln(c), { box: w } = l || {}, y = me((m) => {
|
277
|
+
if (!a && !o)
|
278
278
|
return;
|
279
|
-
if (
|
280
|
-
|
279
|
+
if (s.current) {
|
280
|
+
s.current = !1;
|
281
281
|
return;
|
282
282
|
}
|
283
|
-
const
|
284
|
-
|
285
|
-
const
|
286
|
-
|
287
|
-
width:
|
288
|
-
height:
|
289
|
-
entry:
|
290
|
-
}),
|
283
|
+
const N = (_, p) => a && _.width !== p.width || o && _.height !== p.height;
|
284
|
+
m.forEach((_) => {
|
285
|
+
const p = xn(_, w);
|
286
|
+
v((A) => N(A, p) ? (d == null || d({
|
287
|
+
width: p.width,
|
288
|
+
height: p.height,
|
289
|
+
entry: _
|
290
|
+
}), p) : A);
|
291
291
|
});
|
292
|
-
}, [
|
292
|
+
}, [a, o, s, w]), S = me(Pn(y, n, t, r), [
|
293
293
|
y,
|
294
|
-
r,
|
295
294
|
n,
|
296
|
-
t
|
295
|
+
t,
|
296
|
+
r
|
297
297
|
]);
|
298
|
-
return
|
299
|
-
let
|
300
|
-
return
|
298
|
+
return ie(() => {
|
299
|
+
let m;
|
300
|
+
return g ? (m = new window.ResizeObserver(S), m.observe(g, l)) : (h.width || h.height) && (d == null || d({
|
301
301
|
width: null,
|
302
302
|
height: null,
|
303
303
|
entry: null
|
304
|
-
}),
|
305
|
-
var
|
306
|
-
(
|
304
|
+
}), v({ width: void 0, height: void 0 })), () => {
|
305
|
+
var N, _, p;
|
306
|
+
(N = m == null ? void 0 : m.disconnect) === null || N === void 0 || N.call(m), (p = (_ = S).cancel) === null || p === void 0 || p.call(_);
|
307
307
|
};
|
308
|
-
}, [
|
308
|
+
}, [S, g]), Object.assign({ ref: T }, h);
|
309
309
|
}
|
310
|
-
function
|
311
|
-
var
|
312
|
-
if (typeof e == "string" || typeof e == "number")
|
310
|
+
function Ye(e) {
|
311
|
+
var n, t, r = "";
|
312
|
+
if (typeof e == "string" || typeof e == "number") r += e;
|
313
313
|
else if (typeof e == "object") if (Array.isArray(e)) {
|
314
|
-
var
|
315
|
-
for (
|
316
|
-
} else for (
|
317
|
-
return
|
314
|
+
var a = e.length;
|
315
|
+
for (n = 0; n < a; n++) e[n] && (t = Ye(e[n])) && (r && (r += " "), r += t);
|
316
|
+
} else for (t in e) e[t] && (r && (r += " "), r += t);
|
317
|
+
return r;
|
318
318
|
}
|
319
|
-
function
|
320
|
-
for (var e,
|
321
|
-
return
|
319
|
+
function L() {
|
320
|
+
for (var e, n, t = 0, r = "", a = arguments.length; t < a; t++) (e = arguments[t]) && (n = Ye(e)) && (r && (r += " "), r += n);
|
321
|
+
return r;
|
322
322
|
}
|
323
|
-
const
|
324
|
-
headerContainer:
|
325
|
-
navigationTabList:
|
326
|
-
navigationTab:
|
327
|
-
headerContent:
|
328
|
-
staticEnabled:
|
329
|
-
},
|
330
|
-
const { ref:
|
323
|
+
const Rn = "_headerContainer_1cubo_1", kn = "_navigationTabList_1cubo_8", On = "_navigationTab_1cubo_8", An = "_headerContent_1cubo_34", qn = "_staticEnabled_1cubo_50", C = {
|
324
|
+
headerContainer: Rn,
|
325
|
+
navigationTabList: kn,
|
326
|
+
navigationTab: On,
|
327
|
+
headerContent: An,
|
328
|
+
staticEnabled: qn
|
329
|
+
}, Bn = 77, M = ({ sticky: e, children: n }) => {
|
330
|
+
const { ref: t, height: r } = Cn({
|
331
331
|
refreshMode: "debounce",
|
332
332
|
refreshRate: 0
|
333
|
-
}), [
|
334
|
-
|
335
|
-
const
|
336
|
-
|
333
|
+
}), [a, o] = Me(!1), c = () => a ? !e : !0;
|
334
|
+
ie(() => {
|
335
|
+
const u = () => {
|
336
|
+
o(window.scrollY > 0);
|
337
337
|
};
|
338
|
-
return window.addEventListener("scroll",
|
338
|
+
return window.addEventListener("scroll", u), () => window.removeEventListener("scroll", u);
|
339
339
|
}, []);
|
340
|
-
const
|
341
|
-
return /* @__PURE__ */
|
340
|
+
const l = `${r || Bn}px`;
|
341
|
+
return /* @__PURE__ */ i("div", { style: { minHeight: l }, children: /* @__PURE__ */ i("div", { children: /* @__PURE__ */ b(
|
342
342
|
"div",
|
343
343
|
{
|
344
|
-
ref:
|
345
|
-
className:
|
346
|
-
[
|
344
|
+
ref: t,
|
345
|
+
className: L(C.headerContent, {
|
346
|
+
[C.staticEnabled]: c()
|
347
347
|
}),
|
348
348
|
children: [
|
349
|
-
/* @__PURE__ */
|
350
|
-
/* @__PURE__ */
|
351
|
-
|
349
|
+
/* @__PURE__ */ i(M.Header, {}),
|
350
|
+
/* @__PURE__ */ i(M.Tabs, {}),
|
351
|
+
n
|
352
352
|
]
|
353
353
|
}
|
354
354
|
) }) });
|
355
355
|
};
|
356
|
-
|
357
|
-
|
358
|
-
const
|
359
|
-
|
360
|
-
|
361
|
-
|
362
|
-
|
363
|
-
|
364
|
-
|
365
|
-
|
366
|
-
|
367
|
-
|
368
|
-
|
369
|
-
|
370
|
-
|
371
|
-
|
372
|
-
|
373
|
-
|
374
|
-
},
|
375
|
-
|
376
|
-
|
377
|
-
|
356
|
+
M.Header = ({ children: e }) => /* @__PURE__ */ i("div", { className: C.headerContainer, children: e });
|
357
|
+
M.Tabs = ({ children: e }) => /* @__PURE__ */ i("div", { className: "flex justify-between gap-2 nowrap", children: e });
|
358
|
+
const Mn = "_sidebarContainer_bmdti_1", $n = {
|
359
|
+
sidebarContainer: Mn
|
360
|
+
}, Un = "_logoLink_1baxb_1", Dn = {
|
361
|
+
logoLink: Un
|
362
|
+
}, zn = ({ src: e, href: n = "/", ariaLabel: t = "Home", alt: r = "Lokalise" }) => /* @__PURE__ */ i("a", { className: Dn.logoLink, href: n, "aria-label": t, children: /* @__PURE__ */ i("img", { src: e, alt: r }) }), Wn = "_link_1weq1_1", Fn = "_active_1weq1_18", Le = {
|
363
|
+
link: Wn,
|
364
|
+
active: Fn
|
365
|
+
}, Hn = ({ label: e, to: n, icon: t }) => /* @__PURE__ */ i(ae, { placement: "right", tooltip: e, children: /* @__PURE__ */ i(
|
366
|
+
Ue,
|
367
|
+
{
|
368
|
+
className: L(Le.link, {
|
369
|
+
[Le.active]: window.location.pathname.startsWith(n)
|
370
|
+
}),
|
371
|
+
href: n,
|
372
|
+
children: /* @__PURE__ */ i(t, { size: "25px" })
|
373
|
+
}
|
374
|
+
) }), Gn = "_dropdownButton_hwh0c_1", Vn = "_dropdownButtonActive_hwh0c_18", xe = {
|
375
|
+
dropdownButton: Gn,
|
376
|
+
dropdownButtonActive: Vn
|
377
|
+
}, Yn = ({ children: e, icon: n }) => /* @__PURE__ */ i(
|
378
|
+
oe,
|
379
|
+
{
|
380
|
+
menuButton: ({ opened: t }) => /* @__PURE__ */ i(ae, { placement: "right", tooltip: "Help", children: /* @__PURE__ */ i(
|
381
|
+
"button",
|
382
|
+
{
|
383
|
+
type: "button",
|
384
|
+
className: L(xe.dropdownButton, {
|
385
|
+
[xe.dropdownButtonActive]: t
|
386
|
+
}),
|
387
|
+
children: /* @__PURE__ */ i(n, { size: "25px" })
|
388
|
+
}
|
389
|
+
) }),
|
390
|
+
children: /* @__PURE__ */ i(se, { placement: "right-start", children: e })
|
391
|
+
}
|
392
|
+
), Zn = "_iconContainer_nz34m_1", Xn = {
|
393
|
+
iconContainer: Zn
|
394
|
+
}, Ze = ({ className: e = "" }) => /* @__PURE__ */ i(
|
395
|
+
"div",
|
396
|
+
{
|
397
|
+
"aria-label": "Upgrade Icon",
|
398
|
+
className: L(
|
399
|
+
Xn.iconContainer,
|
400
|
+
"flex-row",
|
401
|
+
"items-center",
|
402
|
+
"justify-center",
|
403
|
+
e
|
404
|
+
),
|
405
|
+
children: /* @__PURE__ */ i(ln, {})
|
406
|
+
}
|
407
|
+
), Jn = "_menuContainer_wbu3u_5", Kn = "_profileButton_wbu3u_16", Qn = "_profileImage_wbu3u_29", et = "_profileImageHighlight_wbu3u_37", nt = "_profileImageUpgradeIcon_wbu3u_41", tt = "_userIconWrapper_wbu3u_47", P = {
|
408
|
+
menuContainer: Jn,
|
409
|
+
profileButton: Kn,
|
410
|
+
profileImage: Qn,
|
411
|
+
profileImageHighlight: et,
|
412
|
+
profileImageUpgradeIcon: nt,
|
413
|
+
userIconWrapper: tt
|
414
|
+
}, Xe = on({}), O = () => an(Xe), rt = ({ children: e }) => {
|
415
|
+
const {
|
416
|
+
currentTeam: n,
|
417
|
+
otherTeams: t,
|
418
|
+
showUpgradeCta: r,
|
419
|
+
showBillingButton: a,
|
420
|
+
allowTeamCreation: o,
|
421
|
+
isLimitedView: c,
|
422
|
+
isProviderAlpha: l,
|
423
|
+
canAccessTeamSettings: u,
|
424
|
+
isEndOfTrialActive: s,
|
425
|
+
isTeamSuspended: d
|
426
|
+
} = O();
|
427
|
+
return /* @__PURE__ */ i(
|
428
|
+
oe,
|
429
|
+
{
|
430
|
+
menuButton: () => /* @__PURE__ */ b("button", { className: P.profileButton, "aria-label": "Profile menu", type: "button", children: [
|
431
|
+
n != null && n.logoUrl ? /* @__PURE__ */ i(
|
432
|
+
"img",
|
433
|
+
{
|
434
|
+
src: n.logoUrl,
|
435
|
+
className: L(P.profileImage, {
|
436
|
+
[P.profileImageHighlight]: r
|
437
|
+
}),
|
438
|
+
alt: "Team Logo"
|
439
|
+
}
|
440
|
+
) : /* @__PURE__ */ i(
|
441
|
+
"div",
|
442
|
+
{
|
443
|
+
className: L(P.userIconWrapper, "flex-row", "align-center", "items-center", {
|
444
|
+
[P.profileImageHighlight]: r
|
445
|
+
}),
|
446
|
+
children: /* @__PURE__ */ i(De, { size: "25px" })
|
447
|
+
}
|
448
|
+
),
|
449
|
+
r && /* @__PURE__ */ i(Ze, { className: P.profileImageUpgradeIcon })
|
450
|
+
] }),
|
451
|
+
children: /* @__PURE__ */ i(se, { placement: "right-end", className: P.menuContainer, children: e({
|
452
|
+
allowTeamCreation: o,
|
453
|
+
otherTeams: t,
|
454
|
+
isLimitedView: c,
|
455
|
+
canAccessTeamSettings: u,
|
456
|
+
isEndOfTrialActive: s,
|
457
|
+
isTeamSuspended: d,
|
458
|
+
showBillingButton: a,
|
459
|
+
isProviderAlpha: l
|
460
|
+
}) })
|
461
|
+
}
|
462
|
+
);
|
463
|
+
}, Je = 0, it = 9999, at = [150, 151, 250, 251], ot = [152, 153, 252, 253], st = [154, 155, 157, 158, 254, 255, 258, 354, 355, 358], ct = [156, 159, 160, 256, 259, 260], Ke = 9998, le = (e) => e === Je, Qe = (e) => e === it, Vt = (e) => at.includes(e), Yt = (e) => ot.includes(e), Zt = (e) => st.includes(e), Xt = (e) => ct.includes(e), Jt = (e) => e > Je && e < Ke, Kt = (e) => e === Ke, lt = /\n/, Ce = (e, n, t) => e.split(n).flatMap((r, a) => a !== 0 ? [sn(t, { key: Math.random().toString(32).slice(0, 10) }), r] : r), ut = (e, n, t) => typeof e == "string" ? Ce(e, n, t) : e.flatMap((r) => typeof r == "string" ? Ce(r, n, t) : r), Qt = (e) => ut(e, lt, /* @__PURE__ */ i("br", {})), dt = /(\b(https?|):\/\/[-a-zA-Zа-яА-Я0-9+&@#/%?=~_|!:,.;]*[-a-zA-Zа-яА-Я0-9+&@#/%=~_|])/gi, ft = (e) => e.match(dt) ?? [], Re = (e, n, t) => {
|
464
|
+
const r = e.split(n);
|
465
|
+
if (r.length === 1)
|
466
|
+
return e;
|
467
|
+
const a = [];
|
468
|
+
return r[0] !== "" && a.push(r[0]), r.shift(), r[r.length - 1] === "" && r.pop(), a.push(
|
469
|
+
/* @__PURE__ */ i("a", { href: n, target: "_blank", rel: "noreferrer noopener", children: n }, n + t)
|
470
|
+
), a.push(r.join(n)), a.filter((o) => o !== "");
|
471
|
+
}, ke = (e) => {
|
472
|
+
const n = ft(e);
|
473
|
+
return n != null && n.length ? n.reduce((t, r, a) => typeof t == "string" ? Re(t, r, a) : t.flatMap((o) => typeof o == "string" ? Re(o, r, a) : o), e) : e;
|
474
|
+
}, er = (e) => typeof e == "string" ? ke(e) : e.flatMap((n) => typeof n == "string" ? ke(n) : n, e), nr = (e, n = "PP") => We(e, n), tr = (e, n, t = "PP") => We(dn(e, n), t), rr = (e) => {
|
475
|
+
ie(e, []);
|
476
|
+
}, mt = ({ children: e, config: n }) => {
|
477
|
+
const {
|
478
|
+
teams: t,
|
479
|
+
currentTeamId: r,
|
480
|
+
planId: a,
|
481
|
+
isLimitedView: o,
|
482
|
+
isTeamSuspended: c,
|
483
|
+
canAccessTeamSettings: l,
|
484
|
+
isEndOfTrialActive: u
|
485
|
+
} = n, s = t.find((m) => m.id === r), d = t.filter((m) => m.id !== r), h = (s == null ? void 0 : s.role) ?? "", v = ["biller", "owner"].includes(h), T = le(a) || Qe(a), S = {
|
486
|
+
...n,
|
487
|
+
currentTeam: s,
|
488
|
+
otherTeams: d,
|
489
|
+
canChangeBilling: v,
|
490
|
+
isOnFreeOrTrialPlan: T,
|
491
|
+
showUpgradeCta: !o && T && v && !c,
|
492
|
+
showBillingButton: !o && l && v,
|
493
|
+
allowTeamCreation: !o && !u
|
494
|
+
};
|
495
|
+
return /* @__PURE__ */ i(Xe.Provider, { value: S, children: e });
|
496
|
+
}, gt = ({ config: e, children: n }) => /* @__PURE__ */ i(mt, { config: e, children: /* @__PURE__ */ i(rt, { children: n }) }), ht = "_container_q5pot_1", pt = "_profileEmail_q5pot_5", Oe = {
|
497
|
+
container: ht,
|
498
|
+
profileEmail: pt
|
499
|
+
}, bt = ({
|
500
|
+
href: e,
|
501
|
+
onClick: n,
|
502
|
+
userEmail: t,
|
503
|
+
hideBottomDivider: r
|
504
|
+
}) => {
|
505
|
+
const { isEndOfTrialActive: a, isTeamSuspended: o } = O();
|
506
|
+
return a || o ? null : /* @__PURE__ */ b(Be, { children: [
|
507
|
+
/* @__PURE__ */ i(
|
508
|
+
$,
|
509
|
+
{
|
510
|
+
href: e,
|
511
|
+
onClick: () => {
|
512
|
+
n == null || n();
|
513
|
+
},
|
514
|
+
children: /* @__PURE__ */ b("div", { className: `flex-col ${Oe.container}`, children: [
|
515
|
+
/* @__PURE__ */ i("span", { children: "Profile Settings" }),
|
516
|
+
/* @__PURE__ */ i("span", { className: Oe.profileEmail, children: t })
|
517
|
+
] })
|
518
|
+
}
|
519
|
+
),
|
520
|
+
!r && /* @__PURE__ */ i(ze, {})
|
521
|
+
] });
|
522
|
+
}, _t = "_wrapper_15d85_1", vt = "_profileImage_15d85_14", Tt = "_teamName_15d85_22", wt = "_planLabel_15d85_29", It = "_membership_15d85_38", yt = "_defaultProfileImage_15d85_44", x = {
|
523
|
+
wrapper: _t,
|
524
|
+
profileImage: vt,
|
525
|
+
teamName: Tt,
|
526
|
+
planLabel: wt,
|
527
|
+
membership: It,
|
528
|
+
defaultProfileImage: yt
|
529
|
+
}, en = ({ team: e, onClick: n, hidePlanLabel: t }) => {
|
530
|
+
const { currentTeam: r, planId: a } = O(), o = e || r;
|
531
|
+
if (!o)
|
532
|
+
return null;
|
533
|
+
const c = le(a) ? "Free" : Qe(a) ? "Trial" : void 0;
|
534
|
+
return /* @__PURE__ */ b(
|
535
|
+
n ? $ : "div",
|
536
|
+
{
|
537
|
+
className: `flex-row gap-2 flex-nowrap items-center ${x.wrapper}`,
|
538
|
+
...n && { onClick: () => n(o) },
|
539
|
+
children: [
|
540
|
+
o.logoUrl ? /* @__PURE__ */ i("img", { className: x.profileImage, src: o.logoUrl, alt: "Team Logo" }) : /* @__PURE__ */ i("span", { className: `flex-row justify-center items-center ${x.defaultProfileImage}`, children: /* @__PURE__ */ i(De, { size: "25px" }) }),
|
541
|
+
/* @__PURE__ */ b("div", { className: "flex-col items-start", children: [
|
542
|
+
/* @__PURE__ */ b("div", { className: "flex-row items-center flex-nowrap gap-2", children: [
|
543
|
+
/* @__PURE__ */ i("span", { title: o.name, className: x.teamName, children: o.name }),
|
544
|
+
c && !t && /* @__PURE__ */ i("span", { className: `flex-row justify-center items-center ${x.planLabel}`, children: c })
|
545
|
+
] }),
|
546
|
+
/* @__PURE__ */ i("span", { className: x.membership, children: o.role })
|
547
|
+
] })
|
548
|
+
]
|
549
|
+
}
|
550
|
+
);
|
551
|
+
}, Nt = "_teamsContainer_1t68g_1", St = {
|
552
|
+
teamsContainer: Nt
|
553
|
+
}, Et = ({ onSwitchTeam: e }) => {
|
554
|
+
const { otherTeams: n } = O();
|
555
|
+
return n.length === 0 ? null : /* @__PURE__ */ i("div", { className: `flex-col items-stretch ${St.teamsContainer}`, children: n.map((t) => /* @__PURE__ */ i(en, { team: t, onClick: e, hidePlanLabel: !0 }, t.id)) });
|
556
|
+
}, Pt = "_container_1u995_1", jt = "_planCta_1u995_15", Lt = "_upgradeIconWrapper_1u995_19", te = {
|
557
|
+
container: Pt,
|
558
|
+
planCta: jt,
|
559
|
+
upgradeIconWrapper: Lt
|
560
|
+
}, xt = ({ upgradeOptionHref: e }) => {
|
561
|
+
const { planId: n, trialDaysLeft: t, showUpgradeCta: r } = O();
|
562
|
+
if (!r)
|
563
|
+
return null;
|
564
|
+
const c = le(n) ? "Your team is currently on the Free plan" : `Free trial ends in ${t} ${t === 1 ? "day" : "days"}`;
|
565
|
+
return /* @__PURE__ */ b($, { href: e, className: `flex-col gap-1 items-start ${te.container}`, children: [
|
566
|
+
/* @__PURE__ */ i("span", { className: te.planCta, children: c }),
|
567
|
+
/* @__PURE__ */ b("div", { className: `flex-row items-center gap-1 ${te.upgradeIconWrapper}`, children: [
|
568
|
+
/* @__PURE__ */ i(Ze, {}),
|
569
|
+
/* @__PURE__ */ i("span", { children: "See upgrade options" })
|
570
|
+
] })
|
571
|
+
] });
|
572
|
+
}, I = ({ children: e, ...n }) => /* @__PURE__ */ i("nav", { ...n, className: $n.sidebarContainer, children: e });
|
573
|
+
I.Top = ({ children: e }) => /* @__PURE__ */ i("div", { children: e });
|
574
|
+
I.Bottom = ({ children: e }) => /* @__PURE__ */ i("div", { children: e });
|
575
|
+
I.Avatar = zn;
|
576
|
+
I.IconLink = Hn;
|
577
|
+
I.Menu = Yn;
|
578
|
+
I.ProfileMenu = gt;
|
579
|
+
I.TeamSwitch = Et;
|
580
|
+
I.TeamMenuItem = en;
|
581
|
+
I.UpgradeMenuItem = xt;
|
582
|
+
I.ProfileSettingsMenuItem = bt;
|
583
|
+
const Ct = "_breadcrumbsItem_1hm6a_1", Rt = "_breadcrumbs_1hm6a_1", Ae = {
|
584
|
+
breadcrumbsItem: Ct,
|
585
|
+
breadcrumbs: Rt
|
586
|
+
}, ir = ({ items: e }) => /* @__PURE__ */ i("nav", { "aria-label": "breadcrumb", className: Ae.breadcrumbs, children: e.map((n, t) => /* @__PURE__ */ b($e, { children: [
|
587
|
+
/* @__PURE__ */ i(Ue, { className: Ae.breadcrumbsItem, href: n.link, rel: "noreferrer", children: n.name }),
|
588
|
+
t < e.length - 1 && /* @__PURE__ */ i("span", { children: " — " })
|
589
|
+
] }, `${n.link}-${n.name}`)) }), kt = ({ items: e }) => /* @__PURE__ */ i(Be, { children: e.map((n, t) => /* @__PURE__ */ b($e, { children: [
|
590
|
+
!!t && n.some((r) => r.visible) && /* @__PURE__ */ i(ze, {}),
|
591
|
+
n.filter(({ visible: r }) => r).map(({ link: r, label: a, onClick: o }) => /* @__PURE__ */ i($, { href: r || "#", "aria-label": a, onClick: o, children: a }, a))
|
592
|
+
] }, n[0].label)) }), Ot = "_badge_1pc1v_1", At = "_tag_1pc1v_15", qt = "_withNavLinkStyle_1pc1v_42 _withLinkStyle_1pc1v_21", Bt = "_disabled_1pc1v_57", Mt = "_projectNavigationItem_1pc1v_61", $t = "_projectNavigationItemDisabled_1pc1v_67", j = {
|
593
|
+
badge: Ot,
|
594
|
+
tag: At,
|
595
|
+
withNavLinkStyle: qt,
|
596
|
+
disabled: Bt,
|
597
|
+
projectNavigationItem: Mt,
|
598
|
+
projectNavigationItemDisabled: $t
|
599
|
+
}, qe = ({ label: e, badge: n, novel: t }) => /* @__PURE__ */ b("div", { className: "flex gap-1", children: [
|
600
|
+
/* @__PURE__ */ b("div", { children: [
|
601
|
+
/* @__PURE__ */ i("span", { children: e }),
|
602
|
+
!!n && /* @__PURE__ */ i("div", { className: j.badge, "aria-label": `${n} items requiring attention`, children: n > 9 ? "9+" : n })
|
378
603
|
] }),
|
379
|
-
!!
|
380
|
-
] }),
|
381
|
-
({ label: e, href:
|
604
|
+
!!t && /* @__PURE__ */ i(un, { className: j.tag, children: t })
|
605
|
+
] }), re = cn(
|
606
|
+
({ label: e, href: n = "", disabled: t = !1, badge: r, onClick: a, novel: o }, c) => /* @__PURE__ */ i(ae, { tooltip: "You do not have access to this function", show: t, children: /* @__PURE__ */ i(
|
382
607
|
"div",
|
383
608
|
{
|
384
|
-
className:
|
385
|
-
children:
|
609
|
+
className: t ? j.projectNavigationItemDisabled : j.projectNavigationItem,
|
610
|
+
children: a || t || !n ? /* @__PURE__ */ i(
|
386
611
|
"button",
|
387
612
|
{
|
388
613
|
type: "button",
|
389
614
|
ref: c,
|
390
|
-
className:
|
391
|
-
[
|
615
|
+
className: L(j.withNavLinkStyle, {
|
616
|
+
[j.disabled]: t
|
392
617
|
}),
|
393
|
-
disabled:
|
394
|
-
onClick:
|
395
|
-
children: /* @__PURE__ */
|
618
|
+
disabled: t,
|
619
|
+
onClick: a,
|
620
|
+
children: /* @__PURE__ */ i(qe, { label: e, badge: r, novel: o })
|
396
621
|
}
|
397
|
-
) : /* @__PURE__ */
|
622
|
+
) : /* @__PURE__ */ i("a", { href: n, className: j.withNavLinkStyle, children: /* @__PURE__ */ i(qe, { label: e, badge: r, novel: o }) })
|
398
623
|
}
|
399
624
|
) })
|
400
625
|
);
|
401
|
-
|
402
|
-
const
|
403
|
-
var
|
404
|
-
return
|
626
|
+
re.displayName = "NavigationTabsItem";
|
627
|
+
const Ut = (e) => (e == null ? void 0 : e.some((n) => n.some((t) => t.visible))) ?? !1, Dt = (e) => e.visible && (!e.dropdown || Ut(e.dropdown)), ar = ({ navigation: e, activeItem: n }) => /* @__PURE__ */ i("nav", { "aria-label": "Project", children: /* @__PURE__ */ i("ul", { className: C.navigationTabList, "aria-orientation": "horizontal", children: e.filter(Dt).map((t) => {
|
628
|
+
var r, a, o;
|
629
|
+
return t.dropdown ? /* @__PURE__ */ i(
|
405
630
|
"li",
|
406
631
|
{
|
407
|
-
className:
|
408
|
-
"data-testid":
|
409
|
-
"aria-selected": (
|
410
|
-
children: /* @__PURE__ */
|
411
|
-
|
632
|
+
className: C.navigationTab,
|
633
|
+
"data-testid": t.key,
|
634
|
+
"aria-selected": (r = t.isActive) == null ? void 0 : r.call(t, n),
|
635
|
+
children: /* @__PURE__ */ i(
|
636
|
+
oe,
|
412
637
|
{
|
413
|
-
menuButton: ({ opened: c }) => /* @__PURE__ */
|
414
|
-
children: /* @__PURE__ */
|
638
|
+
menuButton: ({ opened: c }) => /* @__PURE__ */ i(re, { label: t.label, disabled: t.disabled, active: c }),
|
639
|
+
children: /* @__PURE__ */ i(se, { children: /* @__PURE__ */ i(kt, { items: t.dropdown }) })
|
415
640
|
}
|
416
641
|
)
|
417
642
|
},
|
418
|
-
|
419
|
-
) : /* @__PURE__ */
|
643
|
+
t.key
|
644
|
+
) : /* @__PURE__ */ i(
|
420
645
|
"li",
|
421
646
|
{
|
422
|
-
className:
|
423
|
-
"data-testid":
|
424
|
-
"aria-selected": (
|
425
|
-
children: /* @__PURE__ */
|
426
|
-
|
647
|
+
className: C.navigationTab,
|
648
|
+
"data-testid": t.key,
|
649
|
+
"aria-selected": (a = t.isActive) == null ? void 0 : a.call(t, n),
|
650
|
+
children: /* @__PURE__ */ i(
|
651
|
+
re,
|
427
652
|
{
|
428
|
-
label:
|
429
|
-
href:
|
430
|
-
onClick:
|
431
|
-
disabled:
|
432
|
-
badge:
|
433
|
-
novel:
|
434
|
-
active: (
|
653
|
+
label: t.label,
|
654
|
+
href: t.link,
|
655
|
+
onClick: t.onClick,
|
656
|
+
disabled: t.disabled,
|
657
|
+
badge: t.badge,
|
658
|
+
novel: t.novel,
|
659
|
+
active: (o = t.isActive) == null ? void 0 : o.call(t, n)
|
435
660
|
}
|
436
661
|
)
|
437
662
|
},
|
438
|
-
|
663
|
+
t.key
|
439
664
|
);
|
440
|
-
}) }) })
|
441
|
-
const t = e.split(r);
|
442
|
-
if (t.length === 1)
|
443
|
-
return e;
|
444
|
-
const i = [];
|
445
|
-
return t[0] !== "" && i.push(t[0]), t.shift(), t[t.length - 1] === "" && t.pop(), i.push(
|
446
|
-
/* @__PURE__ */ s("a", { href: r, target: "_blank", rel: "noreferrer noopener", children: r }, r + n)
|
447
|
-
), i.push(t.join(r)), i.filter((a) => a !== "");
|
448
|
-
}, ye = (e) => {
|
449
|
-
const r = Mr(e);
|
450
|
-
return r != null && r.length ? r.reduce((n, t, i) => typeof n == "string" ? pe(n, t, i) : n.flatMap((a) => typeof a == "string" ? pe(a, t, i) : a), e) : e;
|
451
|
-
}, nn = (e) => typeof e == "string" ? ye(e) : e.flatMap((r) => typeof r == "string" ? ye(r) : r, e), tn = (e, r = "PP") => je(e, r), an = (e, r, n = "PP") => je(Ze(e, r), n);
|
665
|
+
}) }) });
|
452
666
|
export {
|
453
|
-
|
454
|
-
|
455
|
-
|
456
|
-
|
457
|
-
|
458
|
-
|
459
|
-
|
460
|
-
|
461
|
-
|
462
|
-
|
463
|
-
|
464
|
-
|
465
|
-
|
466
|
-
|
467
|
-
|
468
|
-
|
469
|
-
|
470
|
-
|
471
|
-
|
472
|
-
|
473
|
-
|
474
|
-
|
667
|
+
ir as Breadcrumbs,
|
668
|
+
Ke as ENTERPRISE_OPENSOURCE_PLAN_ID,
|
669
|
+
ct as ENTERPRISE_PLAN_IDS,
|
670
|
+
ot as ESSENTIAL_PLAN_IDS,
|
671
|
+
Je as FREE_PLAN_ID,
|
672
|
+
M as NavigationPanel,
|
673
|
+
ar as NavigationTabs,
|
674
|
+
st as PRO_PLAN_IDS,
|
675
|
+
at as START_PLAN_IDS,
|
676
|
+
I as Sidebar,
|
677
|
+
it as TRIAL_PLAN_ID,
|
678
|
+
Qt as convertNewLineToBreakTag,
|
679
|
+
nr as formatDate,
|
680
|
+
tr as formatDateTz,
|
681
|
+
Kt as isEnterpriseOpenSourcePlan,
|
682
|
+
Xt as isEnterprisePlan,
|
683
|
+
Yt as isEssentialPlan,
|
684
|
+
le as isFreePlan,
|
685
|
+
Jt as isPaidPlan,
|
686
|
+
Zt as isProPlan,
|
687
|
+
Vt as isStartPlan,
|
688
|
+
Qe as isTrialPlan,
|
689
|
+
er as makeUrlClickable,
|
690
|
+
rr as useEffectOnce
|
475
691
|
};
|