@apolitical/component-library 1.13.2 → 1.13.3-beta.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/communities/community-details/community-details.d.ts +8 -2
- package/discussion/components/post/post.d.ts +1 -3
- package/index.js +13 -13
- package/index.mjs +1142 -1197
- package/package.json +1 -1
- package/style.css +1 -1
package/index.mjs
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import A, { memo as Ae, useState as
|
|
1
|
+
import A, { memo as Ae, useState as D, useEffect as z, useRef as Z, useMemo as qe, Children as yt, createContext as Mt, useContext as ye, Fragment as Zt, useCallback as Ee, useReducer as rr, Suspense as sr } from "react";
|
|
2
2
|
import or from "lodash.clonedeep";
|
|
3
3
|
import ar from "lodash.set";
|
|
4
|
-
import { useIntl as
|
|
5
|
-
import
|
|
6
|
-
import
|
|
4
|
+
import { useIntl as P, IntlProvider as ir, createIntl as lr, FormattedMessage as we } from "react-intl";
|
|
5
|
+
import Ct from "truncate";
|
|
6
|
+
import Ke from "markdown-to-jsx";
|
|
7
7
|
import { QueryClient as cr, QueryClientProvider as ur, useQueryClient as At, useQuery as cn, useMutation as fe } from "@tanstack/react-query";
|
|
8
8
|
import { ReactQueryDevtools as dr } from "@tanstack/react-query-devtools";
|
|
9
9
|
import Ge from "posthog-js";
|
|
@@ -29,15 +29,15 @@ var dn = { exports: {} };
|
|
|
29
29
|
for (var s = [], o = 0; o < arguments.length; o++) {
|
|
30
30
|
var l = arguments[o];
|
|
31
31
|
if (l) {
|
|
32
|
-
var
|
|
33
|
-
if (
|
|
32
|
+
var m = typeof l;
|
|
33
|
+
if (m === "string" || m === "number")
|
|
34
34
|
s.push(l);
|
|
35
35
|
else if (Array.isArray(l)) {
|
|
36
36
|
if (l.length) {
|
|
37
37
|
var a = n.apply(null, l);
|
|
38
38
|
a && s.push(a);
|
|
39
39
|
}
|
|
40
|
-
} else if (
|
|
40
|
+
} else if (m === "object") {
|
|
41
41
|
if (l.toString !== Object.prototype.toString && !l.toString.toString().includes("[native code]")) {
|
|
42
42
|
s.push(l.toString());
|
|
43
43
|
continue;
|
|
@@ -52,9 +52,9 @@ var dn = { exports: {} };
|
|
|
52
52
|
e.exports ? (n.default = n, e.exports = n) : window.classNames = n;
|
|
53
53
|
})();
|
|
54
54
|
})(dn);
|
|
55
|
-
var
|
|
56
|
-
const j = /* @__PURE__ */ xr(
|
|
57
|
-
var
|
|
55
|
+
var br = dn.exports;
|
|
56
|
+
const j = /* @__PURE__ */ xr(br), vr = ({ element: e = "span", showOnFocus: t = !0, children: n, ...s }) => A.createElement(e, { ...s, className: j("hidden", { "show-on-focus": t }), children: n }), ne = Ae(vr), wr = ({ element: e = "span", children: t = null, ...n }) => A.createElement(e, { ...n, "aria-hidden": !0 }, t), mn = Ae(wr);
|
|
57
|
+
var jt = { exports: {} }, De = {};
|
|
58
58
|
/**
|
|
59
59
|
* @license React
|
|
60
60
|
* react-jsx-runtime.production.min.js
|
|
@@ -67,10 +67,10 @@ var St = { exports: {} }, Pe = {};
|
|
|
67
67
|
var qt;
|
|
68
68
|
function kr() {
|
|
69
69
|
if (qt)
|
|
70
|
-
return
|
|
70
|
+
return De;
|
|
71
71
|
qt = 1;
|
|
72
72
|
var e = A, t = Symbol.for("react.element"), n = Symbol.for("react.fragment"), s = Object.prototype.hasOwnProperty, o = e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, l = { key: !0, ref: !0, __self: !0, __source: !0 };
|
|
73
|
-
function
|
|
73
|
+
function m(a, i, c) {
|
|
74
74
|
var u, f = {}, p = null, h = null;
|
|
75
75
|
c !== void 0 && (p = "" + c), i.key !== void 0 && (p = "" + i.key), i.ref !== void 0 && (h = i.ref);
|
|
76
76
|
for (u in i)
|
|
@@ -80,9 +80,9 @@ function kr() {
|
|
|
80
80
|
f[u] === void 0 && (f[u] = i[u]);
|
|
81
81
|
return { $$typeof: t, type: a, key: p, ref: h, props: f, _owner: o.current };
|
|
82
82
|
}
|
|
83
|
-
return
|
|
83
|
+
return De.Fragment = n, De.jsx = m, De.jsxs = m, De;
|
|
84
84
|
}
|
|
85
|
-
var
|
|
85
|
+
var Pe = {};
|
|
86
86
|
/**
|
|
87
87
|
* @license React
|
|
88
88
|
* react-jsx-runtime.development.js
|
|
@@ -95,58 +95,58 @@ var Fe = {};
|
|
|
95
95
|
var Kt;
|
|
96
96
|
function yr() {
|
|
97
97
|
return Kt || (Kt = 1, process.env.NODE_ENV !== "production" && function() {
|
|
98
|
-
var e = A, t = Symbol.for("react.element"), n = Symbol.for("react.portal"), s = Symbol.for("react.fragment"), o = Symbol.for("react.strict_mode"), l = Symbol.for("react.profiler"),
|
|
99
|
-
function g(
|
|
100
|
-
if (
|
|
98
|
+
var e = A, t = Symbol.for("react.element"), n = Symbol.for("react.portal"), s = Symbol.for("react.fragment"), o = Symbol.for("react.strict_mode"), l = Symbol.for("react.profiler"), m = Symbol.for("react.provider"), a = Symbol.for("react.context"), i = Symbol.for("react.forward_ref"), c = Symbol.for("react.suspense"), u = Symbol.for("react.suspense_list"), f = Symbol.for("react.memo"), p = Symbol.for("react.lazy"), h = Symbol.for("react.offscreen"), _ = Symbol.iterator, b = "@@iterator";
|
|
99
|
+
function g(d) {
|
|
100
|
+
if (d === null || typeof d != "object")
|
|
101
101
|
return null;
|
|
102
|
-
var
|
|
103
|
-
return typeof
|
|
102
|
+
var v = _ && d[_] || d[b];
|
|
103
|
+
return typeof v == "function" ? v : null;
|
|
104
104
|
}
|
|
105
105
|
var E = e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
|
|
106
|
-
function
|
|
106
|
+
function x(d) {
|
|
107
107
|
{
|
|
108
|
-
for (var
|
|
109
|
-
y[
|
|
110
|
-
|
|
108
|
+
for (var v = arguments.length, y = new Array(v > 1 ? v - 1 : 0), S = 1; S < v; S++)
|
|
109
|
+
y[S - 1] = arguments[S];
|
|
110
|
+
$("error", d, y);
|
|
111
111
|
}
|
|
112
112
|
}
|
|
113
|
-
function
|
|
113
|
+
function $(d, v, y) {
|
|
114
114
|
{
|
|
115
|
-
var
|
|
116
|
-
O !== "" && (
|
|
117
|
-
var H = y.map(function(
|
|
118
|
-
return String(
|
|
115
|
+
var S = E.ReactDebugCurrentFrame, O = S.getStackAddendum();
|
|
116
|
+
O !== "" && (v += "%s", y = y.concat([O]));
|
|
117
|
+
var H = y.map(function(N) {
|
|
118
|
+
return String(N);
|
|
119
119
|
});
|
|
120
|
-
H.unshift("Warning: " +
|
|
120
|
+
H.unshift("Warning: " + v), Function.prototype.apply.call(console[d], console, H);
|
|
121
121
|
}
|
|
122
122
|
}
|
|
123
|
-
var T = !1, M = !1, Q = !1, V = !1,
|
|
124
|
-
|
|
125
|
-
function q(
|
|
126
|
-
return !!(typeof
|
|
123
|
+
var T = !1, M = !1, Q = !1, V = !1, w = !1, F;
|
|
124
|
+
F = Symbol.for("react.module.reference");
|
|
125
|
+
function q(d) {
|
|
126
|
+
return !!(typeof d == "string" || typeof d == "function" || d === s || d === l || w || d === o || d === c || d === u || V || d === h || T || M || Q || typeof d == "object" && d !== null && (d.$$typeof === p || d.$$typeof === f || d.$$typeof === m || d.$$typeof === a || d.$$typeof === i || // This needs to include all possible module reference object
|
|
127
127
|
// types supported by any Flight configuration anywhere since
|
|
128
128
|
// we don't know which Flight build this will end up being used
|
|
129
129
|
// with.
|
|
130
|
-
|
|
130
|
+
d.$$typeof === F || d.getModuleId !== void 0));
|
|
131
131
|
}
|
|
132
|
-
function
|
|
133
|
-
var
|
|
134
|
-
if (
|
|
135
|
-
return
|
|
136
|
-
var O =
|
|
132
|
+
function k(d, v, y) {
|
|
133
|
+
var S = d.displayName;
|
|
134
|
+
if (S)
|
|
135
|
+
return S;
|
|
136
|
+
var O = v.displayName || v.name || "";
|
|
137
137
|
return O !== "" ? y + "(" + O + ")" : y;
|
|
138
138
|
}
|
|
139
|
-
function
|
|
140
|
-
return
|
|
139
|
+
function Y(d) {
|
|
140
|
+
return d.displayName || "Context";
|
|
141
141
|
}
|
|
142
|
-
function
|
|
143
|
-
if (
|
|
142
|
+
function B(d) {
|
|
143
|
+
if (d == null)
|
|
144
144
|
return null;
|
|
145
|
-
if (typeof
|
|
146
|
-
return
|
|
147
|
-
if (typeof
|
|
148
|
-
return
|
|
149
|
-
switch (
|
|
145
|
+
if (typeof d.tag == "number" && x("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."), typeof d == "function")
|
|
146
|
+
return d.displayName || d.name || null;
|
|
147
|
+
if (typeof d == "string")
|
|
148
|
+
return d;
|
|
149
|
+
switch (d) {
|
|
150
150
|
case s:
|
|
151
151
|
return "Fragment";
|
|
152
152
|
case n:
|
|
@@ -160,23 +160,23 @@ function yr() {
|
|
|
160
160
|
case u:
|
|
161
161
|
return "SuspenseList";
|
|
162
162
|
}
|
|
163
|
-
if (typeof
|
|
164
|
-
switch (
|
|
163
|
+
if (typeof d == "object")
|
|
164
|
+
switch (d.$$typeof) {
|
|
165
165
|
case a:
|
|
166
|
-
var
|
|
167
|
-
return
|
|
168
|
-
case
|
|
169
|
-
var y =
|
|
170
|
-
return
|
|
166
|
+
var v = d;
|
|
167
|
+
return Y(v) + ".Consumer";
|
|
168
|
+
case m:
|
|
169
|
+
var y = d;
|
|
170
|
+
return Y(y._context) + ".Provider";
|
|
171
171
|
case i:
|
|
172
|
-
return
|
|
172
|
+
return k(d, d.render, "ForwardRef");
|
|
173
173
|
case f:
|
|
174
|
-
var
|
|
175
|
-
return
|
|
174
|
+
var S = d.displayName || null;
|
|
175
|
+
return S !== null ? S : B(d.type) || "Memo";
|
|
176
176
|
case p: {
|
|
177
|
-
var O =
|
|
177
|
+
var O = d, H = O._payload, N = O._init;
|
|
178
178
|
try {
|
|
179
|
-
return
|
|
179
|
+
return B(N(H));
|
|
180
180
|
} catch {
|
|
181
181
|
return null;
|
|
182
182
|
}
|
|
@@ -184,80 +184,80 @@ function yr() {
|
|
|
184
184
|
}
|
|
185
185
|
return null;
|
|
186
186
|
}
|
|
187
|
-
var
|
|
188
|
-
function
|
|
187
|
+
var L = Object.assign, U = 0, G, K, ie, le, se, R, ee;
|
|
188
|
+
function oe() {
|
|
189
189
|
}
|
|
190
|
-
|
|
191
|
-
function
|
|
190
|
+
oe.__reactDisabledLog = !0;
|
|
191
|
+
function ce() {
|
|
192
192
|
{
|
|
193
193
|
if (U === 0) {
|
|
194
|
-
|
|
195
|
-
var
|
|
194
|
+
G = console.log, K = console.info, ie = console.warn, le = console.error, se = console.group, R = console.groupCollapsed, ee = console.groupEnd;
|
|
195
|
+
var d = {
|
|
196
196
|
configurable: !0,
|
|
197
197
|
enumerable: !0,
|
|
198
|
-
value:
|
|
198
|
+
value: oe,
|
|
199
199
|
writable: !0
|
|
200
200
|
};
|
|
201
201
|
Object.defineProperties(console, {
|
|
202
|
-
info:
|
|
203
|
-
log:
|
|
204
|
-
warn:
|
|
205
|
-
error:
|
|
206
|
-
group:
|
|
207
|
-
groupCollapsed:
|
|
208
|
-
groupEnd:
|
|
202
|
+
info: d,
|
|
203
|
+
log: d,
|
|
204
|
+
warn: d,
|
|
205
|
+
error: d,
|
|
206
|
+
group: d,
|
|
207
|
+
groupCollapsed: d,
|
|
208
|
+
groupEnd: d
|
|
209
209
|
});
|
|
210
210
|
}
|
|
211
211
|
U++;
|
|
212
212
|
}
|
|
213
213
|
}
|
|
214
|
-
function
|
|
214
|
+
function te() {
|
|
215
215
|
{
|
|
216
216
|
if (U--, U === 0) {
|
|
217
|
-
var
|
|
217
|
+
var d = {
|
|
218
218
|
configurable: !0,
|
|
219
219
|
enumerable: !0,
|
|
220
220
|
writable: !0
|
|
221
221
|
};
|
|
222
222
|
Object.defineProperties(console, {
|
|
223
|
-
log:
|
|
224
|
-
value:
|
|
223
|
+
log: L({}, d, {
|
|
224
|
+
value: G
|
|
225
225
|
}),
|
|
226
|
-
info:
|
|
226
|
+
info: L({}, d, {
|
|
227
227
|
value: K
|
|
228
228
|
}),
|
|
229
|
-
warn:
|
|
229
|
+
warn: L({}, d, {
|
|
230
230
|
value: ie
|
|
231
231
|
}),
|
|
232
|
-
error:
|
|
232
|
+
error: L({}, d, {
|
|
233
233
|
value: le
|
|
234
234
|
}),
|
|
235
|
-
group:
|
|
236
|
-
value:
|
|
235
|
+
group: L({}, d, {
|
|
236
|
+
value: se
|
|
237
237
|
}),
|
|
238
|
-
groupCollapsed:
|
|
239
|
-
value:
|
|
238
|
+
groupCollapsed: L({}, d, {
|
|
239
|
+
value: R
|
|
240
240
|
}),
|
|
241
|
-
groupEnd:
|
|
242
|
-
value:
|
|
241
|
+
groupEnd: L({}, d, {
|
|
242
|
+
value: ee
|
|
243
243
|
})
|
|
244
244
|
});
|
|
245
245
|
}
|
|
246
|
-
U < 0 &&
|
|
246
|
+
U < 0 && x("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
|
|
247
247
|
}
|
|
248
248
|
}
|
|
249
|
-
var
|
|
250
|
-
function pe(
|
|
249
|
+
var ue = E.ReactCurrentDispatcher, me;
|
|
250
|
+
function pe(d, v, y) {
|
|
251
251
|
{
|
|
252
252
|
if (me === void 0)
|
|
253
253
|
try {
|
|
254
254
|
throw Error();
|
|
255
255
|
} catch (O) {
|
|
256
|
-
var
|
|
257
|
-
me =
|
|
256
|
+
var S = O.stack.trim().match(/\n( *(at )?)/);
|
|
257
|
+
me = S && S[1] || "";
|
|
258
258
|
}
|
|
259
259
|
return `
|
|
260
|
-
` + me +
|
|
260
|
+
` + me + d;
|
|
261
261
|
}
|
|
262
262
|
}
|
|
263
263
|
var ge = !1, Se;
|
|
@@ -265,224 +265,224 @@ function yr() {
|
|
|
265
265
|
var Pn = typeof WeakMap == "function" ? WeakMap : Map;
|
|
266
266
|
Se = new Pn();
|
|
267
267
|
}
|
|
268
|
-
function
|
|
269
|
-
if (!
|
|
268
|
+
function Ot(d, v) {
|
|
269
|
+
if (!d || ge)
|
|
270
270
|
return "";
|
|
271
271
|
{
|
|
272
|
-
var y = Se.get(
|
|
272
|
+
var y = Se.get(d);
|
|
273
273
|
if (y !== void 0)
|
|
274
274
|
return y;
|
|
275
275
|
}
|
|
276
|
-
var
|
|
276
|
+
var S;
|
|
277
277
|
ge = !0;
|
|
278
278
|
var O = Error.prepareStackTrace;
|
|
279
279
|
Error.prepareStackTrace = void 0;
|
|
280
280
|
var H;
|
|
281
|
-
H =
|
|
281
|
+
H = ue.current, ue.current = null, ce();
|
|
282
282
|
try {
|
|
283
|
-
if (
|
|
284
|
-
var
|
|
283
|
+
if (v) {
|
|
284
|
+
var N = function() {
|
|
285
285
|
throw Error();
|
|
286
286
|
};
|
|
287
|
-
if (Object.defineProperty(
|
|
287
|
+
if (Object.defineProperty(N.prototype, "props", {
|
|
288
288
|
set: function() {
|
|
289
289
|
throw Error();
|
|
290
290
|
}
|
|
291
291
|
}), typeof Reflect == "object" && Reflect.construct) {
|
|
292
292
|
try {
|
|
293
|
-
Reflect.construct(
|
|
293
|
+
Reflect.construct(N, []);
|
|
294
294
|
} catch (_e) {
|
|
295
|
-
|
|
295
|
+
S = _e;
|
|
296
296
|
}
|
|
297
|
-
Reflect.construct(
|
|
297
|
+
Reflect.construct(d, [], N);
|
|
298
298
|
} else {
|
|
299
299
|
try {
|
|
300
|
-
|
|
300
|
+
N.call();
|
|
301
301
|
} catch (_e) {
|
|
302
|
-
|
|
302
|
+
S = _e;
|
|
303
303
|
}
|
|
304
|
-
|
|
304
|
+
d.call(N.prototype);
|
|
305
305
|
}
|
|
306
306
|
} else {
|
|
307
307
|
try {
|
|
308
308
|
throw Error();
|
|
309
309
|
} catch (_e) {
|
|
310
|
-
|
|
310
|
+
S = _e;
|
|
311
311
|
}
|
|
312
|
-
|
|
312
|
+
d();
|
|
313
313
|
}
|
|
314
314
|
} catch (_e) {
|
|
315
|
-
if (_e &&
|
|
315
|
+
if (_e && S && typeof _e.stack == "string") {
|
|
316
316
|
for (var C = _e.stack.split(`
|
|
317
|
-
`),
|
|
318
|
-
`), J = C.length - 1,
|
|
319
|
-
|
|
320
|
-
for (; J >= 1 &&
|
|
321
|
-
if (C[J] !==
|
|
322
|
-
if (J !== 1 ||
|
|
317
|
+
`), re = S.stack.split(`
|
|
318
|
+
`), J = C.length - 1, X = re.length - 1; J >= 1 && X >= 0 && C[J] !== re[X]; )
|
|
319
|
+
X--;
|
|
320
|
+
for (; J >= 1 && X >= 0; J--, X--)
|
|
321
|
+
if (C[J] !== re[X]) {
|
|
322
|
+
if (J !== 1 || X !== 1)
|
|
323
323
|
do
|
|
324
|
-
if (J--,
|
|
324
|
+
if (J--, X--, X < 0 || C[J] !== re[X]) {
|
|
325
325
|
var de = `
|
|
326
326
|
` + C[J].replace(" at new ", " at ");
|
|
327
|
-
return
|
|
327
|
+
return d.displayName && de.includes("<anonymous>") && (de = de.replace("<anonymous>", d.displayName)), typeof d == "function" && Se.set(d, de), de;
|
|
328
328
|
}
|
|
329
|
-
while (J >= 1 &&
|
|
329
|
+
while (J >= 1 && X >= 0);
|
|
330
330
|
break;
|
|
331
331
|
}
|
|
332
332
|
}
|
|
333
333
|
} finally {
|
|
334
|
-
ge = !1,
|
|
334
|
+
ge = !1, ue.current = H, te(), Error.prepareStackTrace = O;
|
|
335
335
|
}
|
|
336
|
-
var Te =
|
|
337
|
-
return typeof
|
|
336
|
+
var Te = d ? d.displayName || d.name : "", Xt = Te ? pe(Te) : "";
|
|
337
|
+
return typeof d == "function" && Se.set(d, Xt), Xt;
|
|
338
338
|
}
|
|
339
|
-
function Fn(
|
|
340
|
-
return
|
|
339
|
+
function Fn(d, v, y) {
|
|
340
|
+
return Ot(d, !1);
|
|
341
341
|
}
|
|
342
|
-
function Rn(
|
|
343
|
-
var
|
|
344
|
-
return !!(
|
|
342
|
+
function Rn(d) {
|
|
343
|
+
var v = d.prototype;
|
|
344
|
+
return !!(v && v.isReactComponent);
|
|
345
345
|
}
|
|
346
|
-
function Be(
|
|
347
|
-
if (
|
|
346
|
+
function Be(d, v, y) {
|
|
347
|
+
if (d == null)
|
|
348
348
|
return "";
|
|
349
|
-
if (typeof
|
|
350
|
-
return
|
|
351
|
-
if (typeof
|
|
352
|
-
return pe(
|
|
353
|
-
switch (
|
|
349
|
+
if (typeof d == "function")
|
|
350
|
+
return Ot(d, Rn(d));
|
|
351
|
+
if (typeof d == "string")
|
|
352
|
+
return pe(d);
|
|
353
|
+
switch (d) {
|
|
354
354
|
case c:
|
|
355
355
|
return pe("Suspense");
|
|
356
356
|
case u:
|
|
357
357
|
return pe("SuspenseList");
|
|
358
358
|
}
|
|
359
|
-
if (typeof
|
|
360
|
-
switch (
|
|
359
|
+
if (typeof d == "object")
|
|
360
|
+
switch (d.$$typeof) {
|
|
361
361
|
case i:
|
|
362
|
-
return Fn(
|
|
362
|
+
return Fn(d.render);
|
|
363
363
|
case f:
|
|
364
|
-
return Be(
|
|
364
|
+
return Be(d.type, v, y);
|
|
365
365
|
case p: {
|
|
366
|
-
var
|
|
366
|
+
var S = d, O = S._payload, H = S._init;
|
|
367
367
|
try {
|
|
368
|
-
return Be(H(O),
|
|
368
|
+
return Be(H(O), v, y);
|
|
369
369
|
} catch {
|
|
370
370
|
}
|
|
371
371
|
}
|
|
372
372
|
}
|
|
373
373
|
return "";
|
|
374
374
|
}
|
|
375
|
-
var Ie = Object.prototype.hasOwnProperty,
|
|
376
|
-
function He(
|
|
377
|
-
if (
|
|
378
|
-
var
|
|
379
|
-
|
|
375
|
+
var Ie = Object.prototype.hasOwnProperty, Lt = {}, Bt = E.ReactDebugCurrentFrame;
|
|
376
|
+
function He(d) {
|
|
377
|
+
if (d) {
|
|
378
|
+
var v = d._owner, y = Be(d.type, d._source, v ? v.type : null);
|
|
379
|
+
Bt.setExtraStackFrame(y);
|
|
380
380
|
} else
|
|
381
|
-
|
|
381
|
+
Bt.setExtraStackFrame(null);
|
|
382
382
|
}
|
|
383
|
-
function On(
|
|
383
|
+
function On(d, v, y, S, O) {
|
|
384
384
|
{
|
|
385
385
|
var H = Function.call.bind(Ie);
|
|
386
|
-
for (var
|
|
387
|
-
if (H(
|
|
386
|
+
for (var N in d)
|
|
387
|
+
if (H(d, N)) {
|
|
388
388
|
var C = void 0;
|
|
389
389
|
try {
|
|
390
|
-
if (typeof
|
|
391
|
-
var
|
|
392
|
-
throw
|
|
390
|
+
if (typeof d[N] != "function") {
|
|
391
|
+
var re = Error((S || "React class") + ": " + y + " type `" + N + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof d[N] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
|
|
392
|
+
throw re.name = "Invariant Violation", re;
|
|
393
393
|
}
|
|
394
|
-
C =
|
|
394
|
+
C = d[N](v, N, S, y, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
|
|
395
395
|
} catch (J) {
|
|
396
396
|
C = J;
|
|
397
397
|
}
|
|
398
|
-
C && !(C instanceof Error) && (He(O),
|
|
398
|
+
C && !(C instanceof Error) && (He(O), x("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).", S || "React class", y, N, typeof C), He(null)), C instanceof Error && !(C.message in Lt) && (Lt[C.message] = !0, He(O), x("Failed %s type: %s", y, C.message), He(null));
|
|
399
399
|
}
|
|
400
400
|
}
|
|
401
401
|
}
|
|
402
402
|
var Ln = Array.isArray;
|
|
403
|
-
function
|
|
404
|
-
return Ln(
|
|
403
|
+
function st(d) {
|
|
404
|
+
return Ln(d);
|
|
405
405
|
}
|
|
406
|
-
function Bn(
|
|
406
|
+
function Bn(d) {
|
|
407
407
|
{
|
|
408
|
-
var
|
|
408
|
+
var v = typeof Symbol == "function" && Symbol.toStringTag, y = v && d[Symbol.toStringTag] || d.constructor.name || "Object";
|
|
409
409
|
return y;
|
|
410
410
|
}
|
|
411
411
|
}
|
|
412
|
-
function In(
|
|
412
|
+
function In(d) {
|
|
413
413
|
try {
|
|
414
|
-
return
|
|
414
|
+
return It(d), !1;
|
|
415
415
|
} catch {
|
|
416
416
|
return !0;
|
|
417
417
|
}
|
|
418
418
|
}
|
|
419
|
-
function
|
|
420
|
-
return "" +
|
|
419
|
+
function It(d) {
|
|
420
|
+
return "" + d;
|
|
421
421
|
}
|
|
422
|
-
function
|
|
423
|
-
if (In(
|
|
424
|
-
return
|
|
422
|
+
function Ht(d) {
|
|
423
|
+
if (In(d))
|
|
424
|
+
return x("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", Bn(d)), It(d);
|
|
425
425
|
}
|
|
426
|
-
var
|
|
426
|
+
var Ne = E.ReactCurrentOwner, Hn = {
|
|
427
427
|
key: !0,
|
|
428
428
|
ref: !0,
|
|
429
429
|
__self: !0,
|
|
430
430
|
__source: !0
|
|
431
|
-
},
|
|
432
|
-
|
|
433
|
-
function Qn(
|
|
434
|
-
if (Ie.call(
|
|
435
|
-
var
|
|
436
|
-
if (
|
|
431
|
+
}, Qt, Ut, ot;
|
|
432
|
+
ot = {};
|
|
433
|
+
function Qn(d) {
|
|
434
|
+
if (Ie.call(d, "ref")) {
|
|
435
|
+
var v = Object.getOwnPropertyDescriptor(d, "ref").get;
|
|
436
|
+
if (v && v.isReactWarning)
|
|
437
437
|
return !1;
|
|
438
438
|
}
|
|
439
|
-
return
|
|
439
|
+
return d.ref !== void 0;
|
|
440
440
|
}
|
|
441
|
-
function Un(
|
|
442
|
-
if (Ie.call(
|
|
443
|
-
var
|
|
444
|
-
if (
|
|
441
|
+
function Un(d) {
|
|
442
|
+
if (Ie.call(d, "key")) {
|
|
443
|
+
var v = Object.getOwnPropertyDescriptor(d, "key").get;
|
|
444
|
+
if (v && v.isReactWarning)
|
|
445
445
|
return !1;
|
|
446
446
|
}
|
|
447
|
-
return
|
|
447
|
+
return d.key !== void 0;
|
|
448
448
|
}
|
|
449
|
-
function Wn(
|
|
450
|
-
if (typeof
|
|
451
|
-
var y =
|
|
452
|
-
|
|
449
|
+
function Wn(d, v) {
|
|
450
|
+
if (typeof d.ref == "string" && Ne.current && v && Ne.current.stateNode !== v) {
|
|
451
|
+
var y = B(Ne.current.type);
|
|
452
|
+
ot[y] || (x('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref', B(Ne.current.type), d.ref), ot[y] = !0);
|
|
453
453
|
}
|
|
454
454
|
}
|
|
455
|
-
function zn(
|
|
455
|
+
function zn(d, v) {
|
|
456
456
|
{
|
|
457
457
|
var y = function() {
|
|
458
|
-
|
|
458
|
+
Qt || (Qt = !0, x("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", v));
|
|
459
459
|
};
|
|
460
|
-
y.isReactWarning = !0, Object.defineProperty(
|
|
460
|
+
y.isReactWarning = !0, Object.defineProperty(d, "key", {
|
|
461
461
|
get: y,
|
|
462
462
|
configurable: !0
|
|
463
463
|
});
|
|
464
464
|
}
|
|
465
465
|
}
|
|
466
|
-
function Vn(
|
|
466
|
+
function Vn(d, v) {
|
|
467
467
|
{
|
|
468
468
|
var y = function() {
|
|
469
|
-
|
|
469
|
+
Ut || (Ut = !0, x("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", v));
|
|
470
470
|
};
|
|
471
|
-
y.isReactWarning = !0, Object.defineProperty(
|
|
471
|
+
y.isReactWarning = !0, Object.defineProperty(d, "ref", {
|
|
472
472
|
get: y,
|
|
473
473
|
configurable: !0
|
|
474
474
|
});
|
|
475
475
|
}
|
|
476
476
|
}
|
|
477
|
-
var Yn = function(
|
|
477
|
+
var Yn = function(d, v, y, S, O, H, N) {
|
|
478
478
|
var C = {
|
|
479
479
|
// This tag allows us to uniquely identify this as a React Element
|
|
480
480
|
$$typeof: t,
|
|
481
481
|
// Built-in properties that belong on the element
|
|
482
|
-
type:
|
|
483
|
-
key:
|
|
482
|
+
type: d,
|
|
483
|
+
key: v,
|
|
484
484
|
ref: y,
|
|
485
|
-
props:
|
|
485
|
+
props: N,
|
|
486
486
|
// Record the component responsible for creating this element.
|
|
487
487
|
_owner: H
|
|
488
488
|
};
|
|
@@ -495,7 +495,7 @@ function yr() {
|
|
|
495
495
|
configurable: !1,
|
|
496
496
|
enumerable: !1,
|
|
497
497
|
writable: !1,
|
|
498
|
-
value:
|
|
498
|
+
value: S
|
|
499
499
|
}), Object.defineProperty(C, "_source", {
|
|
500
500
|
configurable: !1,
|
|
501
501
|
enumerable: !1,
|
|
@@ -503,186 +503,186 @@ function yr() {
|
|
|
503
503
|
value: O
|
|
504
504
|
}), Object.freeze && (Object.freeze(C.props), Object.freeze(C)), C;
|
|
505
505
|
};
|
|
506
|
-
function Gn(
|
|
506
|
+
function Gn(d, v, y, S, O) {
|
|
507
507
|
{
|
|
508
|
-
var H,
|
|
509
|
-
y !== void 0 && (
|
|
510
|
-
for (H in
|
|
511
|
-
Ie.call(
|
|
512
|
-
if (
|
|
513
|
-
var J =
|
|
508
|
+
var H, N = {}, C = null, re = null;
|
|
509
|
+
y !== void 0 && (Ht(y), C = "" + y), Un(v) && (Ht(v.key), C = "" + v.key), Qn(v) && (re = v.ref, Wn(v, O));
|
|
510
|
+
for (H in v)
|
|
511
|
+
Ie.call(v, H) && !Hn.hasOwnProperty(H) && (N[H] = v[H]);
|
|
512
|
+
if (d && d.defaultProps) {
|
|
513
|
+
var J = d.defaultProps;
|
|
514
514
|
for (H in J)
|
|
515
|
-
|
|
515
|
+
N[H] === void 0 && (N[H] = J[H]);
|
|
516
516
|
}
|
|
517
|
-
if (C ||
|
|
518
|
-
var
|
|
519
|
-
C && zn(
|
|
517
|
+
if (C || re) {
|
|
518
|
+
var X = typeof d == "function" ? d.displayName || d.name || "Unknown" : d;
|
|
519
|
+
C && zn(N, X), re && Vn(N, X);
|
|
520
520
|
}
|
|
521
|
-
return Yn(
|
|
521
|
+
return Yn(d, C, re, O, S, Ne.current, N);
|
|
522
522
|
}
|
|
523
523
|
}
|
|
524
|
-
var
|
|
525
|
-
function $e(
|
|
526
|
-
if (
|
|
527
|
-
var
|
|
528
|
-
|
|
524
|
+
var at = E.ReactCurrentOwner, Wt = E.ReactDebugCurrentFrame;
|
|
525
|
+
function $e(d) {
|
|
526
|
+
if (d) {
|
|
527
|
+
var v = d._owner, y = Be(d.type, d._source, v ? v.type : null);
|
|
528
|
+
Wt.setExtraStackFrame(y);
|
|
529
529
|
} else
|
|
530
|
-
|
|
530
|
+
Wt.setExtraStackFrame(null);
|
|
531
531
|
}
|
|
532
|
-
var
|
|
533
|
-
|
|
534
|
-
function
|
|
535
|
-
return typeof
|
|
532
|
+
var it;
|
|
533
|
+
it = !1;
|
|
534
|
+
function lt(d) {
|
|
535
|
+
return typeof d == "object" && d !== null && d.$$typeof === t;
|
|
536
536
|
}
|
|
537
|
-
function
|
|
537
|
+
function zt() {
|
|
538
538
|
{
|
|
539
|
-
if (
|
|
540
|
-
var
|
|
541
|
-
if (
|
|
539
|
+
if (at.current) {
|
|
540
|
+
var d = B(at.current.type);
|
|
541
|
+
if (d)
|
|
542
542
|
return `
|
|
543
543
|
|
|
544
|
-
Check the render method of \`` +
|
|
544
|
+
Check the render method of \`` + d + "`.";
|
|
545
545
|
}
|
|
546
546
|
return "";
|
|
547
547
|
}
|
|
548
548
|
}
|
|
549
|
-
function Jn(
|
|
549
|
+
function Jn(d) {
|
|
550
550
|
{
|
|
551
|
-
if (
|
|
552
|
-
var
|
|
551
|
+
if (d !== void 0) {
|
|
552
|
+
var v = d.fileName.replace(/^.*[\\\/]/, ""), y = d.lineNumber;
|
|
553
553
|
return `
|
|
554
554
|
|
|
555
|
-
Check your code at ` +
|
|
555
|
+
Check your code at ` + v + ":" + y + ".";
|
|
556
556
|
}
|
|
557
557
|
return "";
|
|
558
558
|
}
|
|
559
559
|
}
|
|
560
|
-
var
|
|
561
|
-
function Xn(
|
|
560
|
+
var Vt = {};
|
|
561
|
+
function Xn(d) {
|
|
562
562
|
{
|
|
563
|
-
var
|
|
564
|
-
if (!
|
|
565
|
-
var y = typeof
|
|
566
|
-
y && (
|
|
563
|
+
var v = zt();
|
|
564
|
+
if (!v) {
|
|
565
|
+
var y = typeof d == "string" ? d : d.displayName || d.name;
|
|
566
|
+
y && (v = `
|
|
567
567
|
|
|
568
568
|
Check the top-level render call using <` + y + ">.");
|
|
569
569
|
}
|
|
570
|
-
return
|
|
570
|
+
return v;
|
|
571
571
|
}
|
|
572
572
|
}
|
|
573
|
-
function
|
|
573
|
+
function Yt(d, v) {
|
|
574
574
|
{
|
|
575
|
-
if (!
|
|
575
|
+
if (!d._store || d._store.validated || d.key != null)
|
|
576
576
|
return;
|
|
577
|
-
|
|
578
|
-
var y = Xn(
|
|
579
|
-
if (
|
|
577
|
+
d._store.validated = !0;
|
|
578
|
+
var y = Xn(v);
|
|
579
|
+
if (Vt[y])
|
|
580
580
|
return;
|
|
581
|
-
|
|
582
|
-
var
|
|
583
|
-
|
|
581
|
+
Vt[y] = !0;
|
|
582
|
+
var S = "";
|
|
583
|
+
d && d._owner && d._owner !== at.current && (S = " It was passed a child from " + B(d._owner.type) + "."), $e(d), x('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', y, S), $e(null);
|
|
584
584
|
}
|
|
585
585
|
}
|
|
586
|
-
function
|
|
586
|
+
function Gt(d, v) {
|
|
587
587
|
{
|
|
588
|
-
if (typeof
|
|
588
|
+
if (typeof d != "object")
|
|
589
589
|
return;
|
|
590
|
-
if (
|
|
591
|
-
for (var y = 0; y <
|
|
592
|
-
var
|
|
593
|
-
|
|
590
|
+
if (st(d))
|
|
591
|
+
for (var y = 0; y < d.length; y++) {
|
|
592
|
+
var S = d[y];
|
|
593
|
+
lt(S) && Yt(S, v);
|
|
594
594
|
}
|
|
595
|
-
else if (
|
|
596
|
-
|
|
597
|
-
else if (
|
|
598
|
-
var O = g(
|
|
599
|
-
if (typeof O == "function" && O !==
|
|
600
|
-
for (var H = O.call(
|
|
601
|
-
|
|
595
|
+
else if (lt(d))
|
|
596
|
+
d._store && (d._store.validated = !0);
|
|
597
|
+
else if (d) {
|
|
598
|
+
var O = g(d);
|
|
599
|
+
if (typeof O == "function" && O !== d.entries)
|
|
600
|
+
for (var H = O.call(d), N; !(N = H.next()).done; )
|
|
601
|
+
lt(N.value) && Yt(N.value, v);
|
|
602
602
|
}
|
|
603
603
|
}
|
|
604
604
|
}
|
|
605
|
-
function Zn(
|
|
605
|
+
function Zn(d) {
|
|
606
606
|
{
|
|
607
|
-
var
|
|
608
|
-
if (
|
|
607
|
+
var v = d.type;
|
|
608
|
+
if (v == null || typeof v == "string")
|
|
609
609
|
return;
|
|
610
610
|
var y;
|
|
611
|
-
if (typeof
|
|
612
|
-
y =
|
|
613
|
-
else if (typeof
|
|
611
|
+
if (typeof v == "function")
|
|
612
|
+
y = v.propTypes;
|
|
613
|
+
else if (typeof v == "object" && (v.$$typeof === i || // Note: Memo only checks outer props here.
|
|
614
614
|
// Inner props are checked in the reconciler.
|
|
615
|
-
|
|
616
|
-
y =
|
|
615
|
+
v.$$typeof === f))
|
|
616
|
+
y = v.propTypes;
|
|
617
617
|
else
|
|
618
618
|
return;
|
|
619
619
|
if (y) {
|
|
620
|
-
var
|
|
621
|
-
On(y,
|
|
622
|
-
} else if (
|
|
623
|
-
|
|
624
|
-
var O =
|
|
625
|
-
|
|
620
|
+
var S = B(v);
|
|
621
|
+
On(y, d.props, "prop", S, d);
|
|
622
|
+
} else if (v.PropTypes !== void 0 && !it) {
|
|
623
|
+
it = !0;
|
|
624
|
+
var O = B(v);
|
|
625
|
+
x("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", O || "Unknown");
|
|
626
626
|
}
|
|
627
|
-
typeof
|
|
627
|
+
typeof v.getDefaultProps == "function" && !v.getDefaultProps.isReactClassApproved && x("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
|
|
628
628
|
}
|
|
629
629
|
}
|
|
630
|
-
function qn(
|
|
630
|
+
function qn(d) {
|
|
631
631
|
{
|
|
632
|
-
for (var
|
|
633
|
-
var
|
|
634
|
-
if (
|
|
635
|
-
$e(
|
|
632
|
+
for (var v = Object.keys(d.props), y = 0; y < v.length; y++) {
|
|
633
|
+
var S = v[y];
|
|
634
|
+
if (S !== "children" && S !== "key") {
|
|
635
|
+
$e(d), x("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", S), $e(null);
|
|
636
636
|
break;
|
|
637
637
|
}
|
|
638
638
|
}
|
|
639
|
-
|
|
639
|
+
d.ref !== null && ($e(d), x("Invalid attribute `ref` supplied to `React.Fragment`."), $e(null));
|
|
640
640
|
}
|
|
641
641
|
}
|
|
642
|
-
function
|
|
642
|
+
function Jt(d, v, y, S, O, H) {
|
|
643
643
|
{
|
|
644
|
-
var
|
|
645
|
-
if (!
|
|
644
|
+
var N = q(d);
|
|
645
|
+
if (!N) {
|
|
646
646
|
var C = "";
|
|
647
|
-
(
|
|
648
|
-
var
|
|
649
|
-
|
|
647
|
+
(d === void 0 || typeof d == "object" && d !== null && Object.keys(d).length === 0) && (C += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");
|
|
648
|
+
var re = Jn(O);
|
|
649
|
+
re ? C += re : C += zt();
|
|
650
650
|
var J;
|
|
651
|
-
|
|
651
|
+
d === null ? J = "null" : st(d) ? J = "array" : d !== void 0 && d.$$typeof === t ? (J = "<" + (B(d.type) || "Unknown") + " />", C = " Did you accidentally export a JSX literal instead of a component?") : J = typeof d, x("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", J, C);
|
|
652
652
|
}
|
|
653
|
-
var
|
|
654
|
-
if (
|
|
655
|
-
return
|
|
656
|
-
if (
|
|
657
|
-
var de =
|
|
653
|
+
var X = Gn(d, v, y, O, H);
|
|
654
|
+
if (X == null)
|
|
655
|
+
return X;
|
|
656
|
+
if (N) {
|
|
657
|
+
var de = v.children;
|
|
658
658
|
if (de !== void 0)
|
|
659
|
-
if (
|
|
660
|
-
if (
|
|
659
|
+
if (S)
|
|
660
|
+
if (st(de)) {
|
|
661
661
|
for (var Te = 0; Te < de.length; Te++)
|
|
662
|
-
|
|
662
|
+
Gt(de[Te], d);
|
|
663
663
|
Object.freeze && Object.freeze(de);
|
|
664
664
|
} else
|
|
665
|
-
|
|
665
|
+
x("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");
|
|
666
666
|
else
|
|
667
|
-
|
|
667
|
+
Gt(de, d);
|
|
668
668
|
}
|
|
669
|
-
return
|
|
669
|
+
return d === s ? qn(X) : Zn(X), X;
|
|
670
670
|
}
|
|
671
671
|
}
|
|
672
|
-
function Kn(
|
|
673
|
-
return
|
|
672
|
+
function Kn(d, v, y) {
|
|
673
|
+
return Jt(d, v, y, !0);
|
|
674
674
|
}
|
|
675
|
-
function er(
|
|
676
|
-
return
|
|
675
|
+
function er(d, v, y) {
|
|
676
|
+
return Jt(d, v, y, !1);
|
|
677
677
|
}
|
|
678
678
|
var tr = er, nr = Kn;
|
|
679
|
-
|
|
680
|
-
}()),
|
|
679
|
+
Pe.Fragment = s, Pe.jsx = tr, Pe.jsxs = nr;
|
|
680
|
+
}()), Pe;
|
|
681
681
|
}
|
|
682
|
-
process.env.NODE_ENV === "production" ?
|
|
683
|
-
var r =
|
|
682
|
+
process.env.NODE_ENV === "production" ? jt.exports = kr() : jt.exports = yr();
|
|
683
|
+
var r = jt.exports;
|
|
684
684
|
const jr = () => {
|
|
685
|
-
const [e, t] =
|
|
685
|
+
const [e, t] = D(window.location.pathname), n = () => {
|
|
686
686
|
const s = window.location.pathname;
|
|
687
687
|
t(s);
|
|
688
688
|
};
|
|
@@ -690,13 +690,13 @@ const jr = () => {
|
|
|
690
690
|
window.removeEventListener("popstate", n);
|
|
691
691
|
}), []), e;
|
|
692
692
|
}, Ce = (e, t) => {
|
|
693
|
-
const n =
|
|
693
|
+
const n = Z(!1);
|
|
694
694
|
z(() => {
|
|
695
695
|
n.current ? e() : n.current = !0;
|
|
696
696
|
}, t);
|
|
697
697
|
};
|
|
698
698
|
function Er(e, t, n) {
|
|
699
|
-
var s = this, o =
|
|
699
|
+
var s = this, o = Z(null), l = Z(0), m = Z(null), a = Z([]), i = Z(), c = Z(), u = Z(e), f = Z(!0);
|
|
700
700
|
z(function() {
|
|
701
701
|
u.current = e;
|
|
702
702
|
}, [e]);
|
|
@@ -704,71 +704,71 @@ function Er(e, t, n) {
|
|
|
704
704
|
if (typeof e != "function")
|
|
705
705
|
throw new TypeError("Expected a function");
|
|
706
706
|
t = +t || 0;
|
|
707
|
-
var h = !!(n = n || {}).leading, _ = !("trailing" in n) || !!n.trailing,
|
|
707
|
+
var h = !!(n = n || {}).leading, _ = !("trailing" in n) || !!n.trailing, b = "maxWait" in n, g = b ? Math.max(+n.maxWait || 0, t) : null;
|
|
708
708
|
z(function() {
|
|
709
709
|
return f.current = !0, function() {
|
|
710
710
|
f.current = !1;
|
|
711
711
|
};
|
|
712
712
|
}, []);
|
|
713
713
|
var E = qe(function() {
|
|
714
|
-
var
|
|
715
|
-
var
|
|
716
|
-
return a.current = i.current = null, l.current =
|
|
717
|
-
},
|
|
718
|
-
p && cancelAnimationFrame(
|
|
719
|
-
}, T = function(
|
|
714
|
+
var x = function(w) {
|
|
715
|
+
var F = a.current, q = i.current;
|
|
716
|
+
return a.current = i.current = null, l.current = w, c.current = u.current.apply(q, F);
|
|
717
|
+
}, $ = function(w, F) {
|
|
718
|
+
p && cancelAnimationFrame(m.current), m.current = p ? requestAnimationFrame(w) : setTimeout(w, F);
|
|
719
|
+
}, T = function(w) {
|
|
720
720
|
if (!f.current)
|
|
721
721
|
return !1;
|
|
722
|
-
var
|
|
723
|
-
return !o.current ||
|
|
724
|
-
}, M = function(
|
|
725
|
-
return
|
|
726
|
-
}, Q = function
|
|
727
|
-
var
|
|
728
|
-
if (T(
|
|
729
|
-
return M(
|
|
722
|
+
var F = w - o.current;
|
|
723
|
+
return !o.current || F >= t || F < 0 || b && w - l.current >= g;
|
|
724
|
+
}, M = function(w) {
|
|
725
|
+
return m.current = null, _ && a.current ? x(w) : (a.current = i.current = null, c.current);
|
|
726
|
+
}, Q = function w() {
|
|
727
|
+
var F = Date.now();
|
|
728
|
+
if (T(F))
|
|
729
|
+
return M(F);
|
|
730
730
|
if (f.current) {
|
|
731
|
-
var q = t - (
|
|
732
|
-
|
|
731
|
+
var q = t - (F - o.current), k = b ? Math.min(q, g - (F - l.current)) : q;
|
|
732
|
+
$(w, k);
|
|
733
733
|
}
|
|
734
734
|
}, V = function() {
|
|
735
|
-
var
|
|
736
|
-
if (a.current = [].slice.call(arguments), i.current = s, o.current =
|
|
737
|
-
if (!
|
|
738
|
-
return l.current = o.current,
|
|
739
|
-
if (
|
|
740
|
-
return
|
|
735
|
+
var w = Date.now(), F = T(w);
|
|
736
|
+
if (a.current = [].slice.call(arguments), i.current = s, o.current = w, F) {
|
|
737
|
+
if (!m.current && f.current)
|
|
738
|
+
return l.current = o.current, $(Q, t), h ? x(o.current) : c.current;
|
|
739
|
+
if (b)
|
|
740
|
+
return $(Q, t), x(o.current);
|
|
741
741
|
}
|
|
742
|
-
return
|
|
742
|
+
return m.current || $(Q, t), c.current;
|
|
743
743
|
};
|
|
744
744
|
return V.cancel = function() {
|
|
745
|
-
|
|
745
|
+
m.current && (p ? cancelAnimationFrame(m.current) : clearTimeout(m.current)), l.current = 0, a.current = o.current = i.current = m.current = null;
|
|
746
746
|
}, V.isPending = function() {
|
|
747
|
-
return !!
|
|
747
|
+
return !!m.current;
|
|
748
748
|
}, V.flush = function() {
|
|
749
|
-
return
|
|
749
|
+
return m.current ? M(Date.now()) : c.current;
|
|
750
750
|
}, V;
|
|
751
|
-
}, [h,
|
|
751
|
+
}, [h, b, t, g, _, p]);
|
|
752
752
|
return E;
|
|
753
753
|
}
|
|
754
754
|
function fn(e, t, n) {
|
|
755
755
|
var s = n === void 0 ? {} : n, o = s.leading, l = s.trailing;
|
|
756
756
|
return Er(e, t, { maxWait: t, leading: o === void 0 || o, trailing: l === void 0 || l });
|
|
757
757
|
}
|
|
758
|
-
let
|
|
759
|
-
const
|
|
758
|
+
let ct;
|
|
759
|
+
const et = (e = !0, t = !1) => {
|
|
760
760
|
if (!e)
|
|
761
761
|
return;
|
|
762
762
|
const [n, s] = A.useState(0) || [!1, () => {
|
|
763
763
|
}];
|
|
764
|
-
z(() => (l(), window.addEventListener("resize",
|
|
765
|
-
clearTimeout(
|
|
764
|
+
z(() => (l(), window.addEventListener("resize", m), () => {
|
|
765
|
+
clearTimeout(ct), m.flush(), window.removeEventListener("resize", m);
|
|
766
766
|
}), []);
|
|
767
767
|
const o = () => window.innerWidth, l = () => {
|
|
768
768
|
s(o());
|
|
769
|
-
},
|
|
769
|
+
}, m = fn(
|
|
770
770
|
() => {
|
|
771
|
-
o() !== n && (t && (clearTimeout(
|
|
771
|
+
o() !== n && (t && (clearTimeout(ct), document.body.classList.add("is-resizing"), ct = setTimeout(() => {
|
|
772
772
|
document.body.classList.remove("is-resizing");
|
|
773
773
|
}, 550)), l());
|
|
774
774
|
},
|
|
@@ -788,7 +788,7 @@ const tt = (e = !0, t = !1) => {
|
|
|
788
788
|
if (!window)
|
|
789
789
|
return;
|
|
790
790
|
const [o, l] = A.useState({ current: 0, past: 0 }) || [!1, () => {
|
|
791
|
-
}], [
|
|
791
|
+
}], [m, a] = A.useState({ scrollDown: !1, scrollUp: !1 }) || [!1, () => {
|
|
792
792
|
}];
|
|
793
793
|
z(() => (i(), window.addEventListener("scroll", c), () => {
|
|
794
794
|
c.flush(), window.removeEventListener("scroll", c);
|
|
@@ -796,17 +796,17 @@ const tt = (e = !0, t = !1) => {
|
|
|
796
796
|
const i = () => {
|
|
797
797
|
const u = window.scrollY, f = o.current, p = u - f, h = p > 0 ? "down" : "up";
|
|
798
798
|
if (l({ current: u, past: f }), h === "down") {
|
|
799
|
-
u >= e + t.down && !
|
|
799
|
+
u >= e + t.down && !m.scrollDown && (!m.scrollUp || p > t.up) && (n(), a({ scrollUp: !1, scrollDown: !0 }));
|
|
800
800
|
return;
|
|
801
801
|
}
|
|
802
|
-
Math.abs(p) >= t.up && !
|
|
802
|
+
Math.abs(p) >= t.up && !m.scrollUp && (s(), a({ scrollUp: !0, scrollDown: !1 }));
|
|
803
803
|
}, c = fn(() => {
|
|
804
804
|
i();
|
|
805
805
|
}, 250);
|
|
806
806
|
return o;
|
|
807
|
-
},
|
|
807
|
+
}, so = (e = [], t = !0) => {
|
|
808
808
|
e = Array.isArray(e) ? e : [e];
|
|
809
|
-
const n =
|
|
809
|
+
const n = Z(!1);
|
|
810
810
|
Ce(() => {
|
|
811
811
|
if (window && window.location && window.location.hash) {
|
|
812
812
|
if (n.current)
|
|
@@ -849,14 +849,14 @@ const tt = (e = !0, t = !1) => {
|
|
|
849
849
|
} catch {
|
|
850
850
|
return "";
|
|
851
851
|
}
|
|
852
|
-
const
|
|
852
|
+
const m = l / 36e5, a = Math.floor(l / 864e5);
|
|
853
853
|
if (a < 1)
|
|
854
|
-
return
|
|
854
|
+
return m < 1 ? { path: "now" } : { path: "hours", number: Math.floor(m) };
|
|
855
855
|
if (a < 7)
|
|
856
856
|
return { path: "days", number: a };
|
|
857
857
|
const i = Math.floor(a / 7);
|
|
858
858
|
return i <= 52 ? { path: "weeks", number: i } : { path: "years", number: Math.floor(a / 365) };
|
|
859
|
-
}, Cr = (e) => new Promise((t) => setTimeout(t, e)),
|
|
859
|
+
}, Cr = (e) => new Promise((t) => setTimeout(t, e)), Nt = {
|
|
860
860
|
apolitical: "Apolitical",
|
|
861
861
|
breadcrumbs_label: "Go back to:",
|
|
862
862
|
breadcrumbs_currentPage: "Current page:",
|
|
@@ -1139,13 +1139,13 @@ Thank you for helping to protect the Apolitical community from abusive content.`
|
|
|
1139
1139
|
sharedLinks_copy_text: "Copy link",
|
|
1140
1140
|
tags_community: "From the community",
|
|
1141
1141
|
tooltip_loading: "Loading..."
|
|
1142
|
-
},
|
|
1142
|
+
}, Ar = {
|
|
1143
1143
|
languageSwitcher_label: "Me gustaría leer este artículo en...",
|
|
1144
1144
|
languageSwitcher_translation_original: "idioma original",
|
|
1145
1145
|
languageSwitcher_translation_human: "traducido por un humano",
|
|
1146
1146
|
languageSwitcher_translation_machine: "traducido por máquina",
|
|
1147
1147
|
languageSwitcher_disclaimer: "Este contenido fue traducido automáticamente y ocasionalmente tendrá errores de género u otras traducciones directas. Estamos intentando resolver este problema, pero mientras tanto, si notas algún error grave, escríbenos a <link>{email}</link>"
|
|
1148
|
-
},
|
|
1148
|
+
}, Nr = {
|
|
1149
1149
|
collapsibleSection_summary: "En savoir plus",
|
|
1150
1150
|
languageSwitcher_label: "Je voudrais lire cet article dans...",
|
|
1151
1151
|
languageSwitcher_translation_original: "langue originale",
|
|
@@ -1160,13 +1160,13 @@ Thank you for helping to protect the Apolitical community from abusive content.`
|
|
|
1160
1160
|
languageSwitcher_disclaimer: "Este conteúdo foi traduzido automaticamente e, ocasionalmente, poderão ocorrer erros de linguagem de gênero ou outras traduções diretas. Estamos tentando resolver isso, porém se perceber algo errado por favor nos avise em <link>{email}</link>"
|
|
1161
1161
|
}, Pr = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
1162
1162
|
__proto__: null,
|
|
1163
|
-
en:
|
|
1164
|
-
es:
|
|
1165
|
-
fr:
|
|
1163
|
+
en: Nt,
|
|
1164
|
+
es: Ar,
|
|
1165
|
+
fr: Nr,
|
|
1166
1166
|
pt: Dr
|
|
1167
1167
|
}, Symbol.toStringTag, { value: "Module" })), he = (e, t, n, s, o = {}) => {
|
|
1168
1168
|
let l = "";
|
|
1169
|
-
return `${t}_${n}` in
|
|
1169
|
+
return `${t}_${n}` in Nt ? l = e({ id: `${t}_${n}` }, o) : l = e({ id: t }, { [s]: n, ...o }), l;
|
|
1170
1170
|
}, Fr = (e, t, n) => {
|
|
1171
1171
|
if (!e || e === 0)
|
|
1172
1172
|
return "0";
|
|
@@ -1190,21 +1190,21 @@ Thank you for helping to protect the Apolitical community from abusive content.`
|
|
|
1190
1190
|
icon: s = !1,
|
|
1191
1191
|
href: o = !1,
|
|
1192
1192
|
element: l = "button",
|
|
1193
|
-
onClick:
|
|
1193
|
+
onClick: m = !1,
|
|
1194
1194
|
className: a = "",
|
|
1195
1195
|
disabled: i = !1,
|
|
1196
1196
|
screenreaderText: c = !1,
|
|
1197
1197
|
children: u = !1,
|
|
1198
1198
|
...f
|
|
1199
1199
|
}) => {
|
|
1200
|
-
const h =
|
|
1200
|
+
const h = et(typeof t == "object");
|
|
1201
1201
|
if (typeof t == "object" && typeof h == "number") {
|
|
1202
1202
|
const g = Object.assign({}, t), E = pn(Object.keys(g));
|
|
1203
1203
|
t = hn(h, E, g);
|
|
1204
1204
|
}
|
|
1205
1205
|
const _ = [];
|
|
1206
1206
|
typeof t == "string" && _.push(t), s && (_.push("icon"), typeof s == "object" ? (_.push(s.icon), s.position ? _.push(s.position) : _.push("left"), s.hover && _.push(`hover_${s.hover}`), s.animate && (_.push("animate"), typeof s.animate == "string" && _.push(s.animate))) : (_.push(s), !s.includes("right") && !s.includes("left") && _.push("left"))), n.muted && _.push("muted"), n.fullWidth && _.push("full-width");
|
|
1207
|
-
const
|
|
1207
|
+
const b = {
|
|
1208
1208
|
...f,
|
|
1209
1209
|
className: j(e, a, _, {
|
|
1210
1210
|
"no-text": !u,
|
|
@@ -1212,35 +1212,35 @@ Thank you for helping to protect the Apolitical community from abusive content.`
|
|
|
1212
1212
|
button: o
|
|
1213
1213
|
}),
|
|
1214
1214
|
onClick: (g) => {
|
|
1215
|
-
(!o || o[0] === "#") &&
|
|
1215
|
+
(!o || o[0] === "#") && m && (g.preventDefault(), g.stopPropagation()), m && m(g);
|
|
1216
1216
|
},
|
|
1217
1217
|
disabled: typeof i == "object" && "isClickable" in i ? !i.isClickable : i
|
|
1218
1218
|
};
|
|
1219
|
-
return o && (l = "a",
|
|
1219
|
+
return o && (l = "a", b.href = o), A.createElement(
|
|
1220
1220
|
l,
|
|
1221
|
-
|
|
1222
|
-
u || (c ? /* @__PURE__ */ r.jsx(
|
|
1221
|
+
b,
|
|
1222
|
+
u || (c ? /* @__PURE__ */ r.jsx(ne, { showOnFocus: !1, children: c }) : null)
|
|
1223
1223
|
);
|
|
1224
|
-
},
|
|
1225
|
-
const s = e.length > 1 ? "ul" : "p", o = e.map((l,
|
|
1224
|
+
}, tt = ({ buttons: e, className: t = "", ...n }) => {
|
|
1225
|
+
const s = e.length > 1 ? "ul" : "p", o = e.map((l, m) => s === "p" ? /* @__PURE__ */ r.jsx(W, { ...l }, m) : /* @__PURE__ */ r.jsx("li", { children: /* @__PURE__ */ r.jsx(W, { ...l }) }, m));
|
|
1226
1226
|
return A.createElement(s, { className: j("button-wrapper", t), ...n, children: o });
|
|
1227
1227
|
};
|
|
1228
|
-
const
|
|
1228
|
+
const Le = ({ maxWidth: e = !1 }) => {
|
|
1229
1229
|
const t = e ? { "--max-width": `${e / 16}rem` } : {};
|
|
1230
1230
|
return /* @__PURE__ */ r.jsx("hr", { className: j({ "has-max-width": e }), style: t });
|
|
1231
|
-
},
|
|
1231
|
+
}, nt = ({
|
|
1232
1232
|
href: e,
|
|
1233
1233
|
children: t,
|
|
1234
1234
|
fallbackElement: n,
|
|
1235
1235
|
className: s = "",
|
|
1236
1236
|
onClick: o,
|
|
1237
1237
|
gtmContext: l,
|
|
1238
|
-
gtmType:
|
|
1238
|
+
gtmType: m,
|
|
1239
1239
|
...a
|
|
1240
1240
|
}) => {
|
|
1241
1241
|
if (e) {
|
|
1242
1242
|
const i = { ...a };
|
|
1243
|
-
return o && (i.onClick = o), l && (i["data-gtm-event-context"] = l),
|
|
1243
|
+
return o && (i.onClick = o), l && (i["data-gtm-event-context"] = l), m && (i["data-gtm-event-type"] = m), /* @__PURE__ */ r.jsx(
|
|
1244
1244
|
"a",
|
|
1245
1245
|
{
|
|
1246
1246
|
href: e,
|
|
@@ -1364,7 +1364,7 @@ const Ne = ({ maxWidth: e = !1 }) => {
|
|
|
1364
1364
|
}, Lr = ({ format: e, height: t, query: n, width: s }) => {
|
|
1365
1365
|
let o = `w=${s}&h=${t}`;
|
|
1366
1366
|
return o = e ? `${o}&fm=${e}` : o, o = n ? `${o}&${n}` : o, o;
|
|
1367
|
-
},
|
|
1367
|
+
}, ut = ({ format: e, range: t, url: n, query: s }) => t.map(({ height: o, width: l }) => `${n}?${Lr({
|
|
1368
1368
|
format: e,
|
|
1369
1369
|
height: o,
|
|
1370
1370
|
query: s,
|
|
@@ -1375,13 +1375,13 @@ const Br = ({ image: e, className: t, testId: n }) => {
|
|
|
1375
1375
|
description: s,
|
|
1376
1376
|
height: o,
|
|
1377
1377
|
type: l,
|
|
1378
|
-
query:
|
|
1378
|
+
query: m,
|
|
1379
1379
|
url: a,
|
|
1380
1380
|
width: i,
|
|
1381
1381
|
loading: c,
|
|
1382
1382
|
decoding: u,
|
|
1383
1383
|
fetchPriority: f
|
|
1384
|
-
} = e, { range: p, sizes: h } = Or(e), _ =
|
|
1384
|
+
} = e, { range: p, sizes: h } = Or(e), _ = ut({ format: "avif", query: m, range: p, url: a }), b = ut({ format: "webp", query: m, range: p, url: a }), g = ut({ format: "", query: m, range: p, url: a });
|
|
1385
1385
|
return /* @__PURE__ */ r.jsxs("picture", { className: t, children: [
|
|
1386
1386
|
l !== "image/gif" && /* @__PURE__ */ r.jsx(
|
|
1387
1387
|
"source",
|
|
@@ -1396,7 +1396,7 @@ const Br = ({ image: e, className: t, testId: n }) => {
|
|
|
1396
1396
|
"source",
|
|
1397
1397
|
{
|
|
1398
1398
|
type: "image/webp",
|
|
1399
|
-
srcSet:
|
|
1399
|
+
srcSet: b,
|
|
1400
1400
|
sizes: h,
|
|
1401
1401
|
"data-testid": "source"
|
|
1402
1402
|
}
|
|
@@ -1418,9 +1418,9 @@ const Br = ({ image: e, className: t, testId: n }) => {
|
|
|
1418
1418
|
)
|
|
1419
1419
|
] });
|
|
1420
1420
|
};
|
|
1421
|
-
let
|
|
1421
|
+
let Fe = !1;
|
|
1422
1422
|
const Ir = ({ isOpen: e = !1, isLoading: t = !1, children: n }) => {
|
|
1423
|
-
const s =
|
|
1423
|
+
const s = P(), o = Z(null), [l, m] = D("hidden");
|
|
1424
1424
|
z(() => {
|
|
1425
1425
|
const i = o.current;
|
|
1426
1426
|
if (i)
|
|
@@ -1429,18 +1429,18 @@ const Ir = ({ isOpen: e = !1, isLoading: t = !1, children: n }) => {
|
|
|
1429
1429
|
};
|
|
1430
1430
|
}, []);
|
|
1431
1431
|
const a = ({ propertyName: i }) => {
|
|
1432
|
-
i === "opacity" && (
|
|
1432
|
+
i === "opacity" && (Fe !== !1 && clearTimeout(Fe), m((c) => c === "opening" ? "open" : c === "closing" ? "closed" : c === "closed" ? "hidden" : c));
|
|
1433
1433
|
};
|
|
1434
1434
|
return Ce(() => {
|
|
1435
|
-
|
|
1435
|
+
Fe !== !1 && clearTimeout(Fe);
|
|
1436
1436
|
let i = "open";
|
|
1437
|
-
e ?
|
|
1438
|
-
|
|
1437
|
+
e ? m("opening") : (m("closing"), i = "hidden"), Fe = setTimeout(() => {
|
|
1438
|
+
m(i);
|
|
1439
1439
|
}, 300);
|
|
1440
1440
|
}, [e]), /* @__PURE__ */ r.jsx("aside", { ref: o, className: j("tooltip text-medium", l, { loading: t }), hidden: l === "hidden", children: t ? /* @__PURE__ */ r.jsx("p", { children: s.formatMessage({ id: "tooltip_loading" }) }) : typeof n == "string" ? /* @__PURE__ */ r.jsx("p", { children: n }) : n });
|
|
1441
1441
|
};
|
|
1442
1442
|
const _n = ({ children: e, className: t = "", ...n }) => /* @__PURE__ */ r.jsx("section", { className: j("full-width-section", t), ...n, children: e });
|
|
1443
|
-
const
|
|
1443
|
+
const oo = ({ text: e, buttons: t, className: n = "" }) => {
|
|
1444
1444
|
const s = [];
|
|
1445
1445
|
return t.forEach((o) => {
|
|
1446
1446
|
s.push({
|
|
@@ -1455,10 +1455,10 @@ const ao = ({ text: e, buttons: t, className: n = "" }) => {
|
|
|
1455
1455
|
});
|
|
1456
1456
|
}), /* @__PURE__ */ r.jsx(_n, { className: j("download-section", n), children: /* @__PURE__ */ r.jsxs(r.Fragment, { children: [
|
|
1457
1457
|
A.createElement(typeof e == "string" ? "h2" : e.element, { className: "text" }, typeof e == "string" ? e : e.text),
|
|
1458
|
-
/* @__PURE__ */ r.jsx(
|
|
1458
|
+
/* @__PURE__ */ r.jsx(tt, { buttons: s })
|
|
1459
1459
|
] }) });
|
|
1460
1460
|
};
|
|
1461
|
-
const
|
|
1461
|
+
const ao = ({ title: e = !1, logos: t = [], className: n = "" }) => {
|
|
1462
1462
|
const s = t.length;
|
|
1463
1463
|
if (s === 0)
|
|
1464
1464
|
return null;
|
|
@@ -1473,7 +1473,7 @@ const io = ({ title: e = !1, logos: t = [], className: n = "" }) => {
|
|
|
1473
1473
|
{
|
|
1474
1474
|
className: j({ "two-col": s === 2 || s === 4, "three-col": s === 5 || s <= 10 && s % 3 === 0 }),
|
|
1475
1475
|
children: t.map(
|
|
1476
|
-
({ logo: l, nameOfBusiness:
|
|
1476
|
+
({ logo: l, nameOfBusiness: m, link: a = !1, description: i = !1 }, c) => {
|
|
1477
1477
|
if (!l || !l.url)
|
|
1478
1478
|
return null;
|
|
1479
1479
|
const u = /* @__PURE__ */ r.jsx(
|
|
@@ -1482,7 +1482,7 @@ const io = ({ title: e = !1, logos: t = [], className: n = "" }) => {
|
|
|
1482
1482
|
src: l.url,
|
|
1483
1483
|
width: l.width || "auto",
|
|
1484
1484
|
height: l.height || "auto",
|
|
1485
|
-
alt:
|
|
1485
|
+
alt: m
|
|
1486
1486
|
}
|
|
1487
1487
|
);
|
|
1488
1488
|
return /* @__PURE__ */ r.jsxs("li", { children: [
|
|
@@ -1518,8 +1518,8 @@ const Hr = [
|
|
|
1518
1518
|
"blockquote",
|
|
1519
1519
|
"q"
|
|
1520
1520
|
], Qr = ({ content: e, image: t, variant: n = "default", spacing: s = "normal", cta: o, children: l }) => {
|
|
1521
|
-
const
|
|
1522
|
-
return
|
|
1521
|
+
const m = ["eyebrow", "title", "text"], a = { eyebrow: "small", title: "h1", text: "p" }, i = {};
|
|
1522
|
+
return m.forEach((c) => {
|
|
1523
1523
|
if (!e[c]) {
|
|
1524
1524
|
i[c] = !1;
|
|
1525
1525
|
return;
|
|
@@ -1542,7 +1542,7 @@ const Hr = [
|
|
|
1542
1542
|
u && u.scrollIntoView({ behavior: "smooth" });
|
|
1543
1543
|
}), /* @__PURE__ */ r.jsx(_n, { className: j("banner-section", n, s, { "has-image": t, "has-extra-spacing": s === "normal" && i.eyebrow && i.title }), children: /* @__PURE__ */ r.jsxs(r.Fragment, { children: [
|
|
1544
1544
|
/* @__PURE__ */ r.jsxs("div", { className: "content-wrapper", children: [
|
|
1545
|
-
|
|
1545
|
+
m.map((c) => {
|
|
1546
1546
|
if (i[c] && typeof i[c] == "object") {
|
|
1547
1547
|
const { text: u, element: f = "" } = i[c];
|
|
1548
1548
|
return A.createElement(
|
|
@@ -1567,8 +1567,8 @@ const Hr = [
|
|
|
1567
1567
|
] }),
|
|
1568
1568
|
t && /* @__PURE__ */ r.jsx(Br, { image: { ...t, aspect: "banner" } })
|
|
1569
1569
|
] }) });
|
|
1570
|
-
},
|
|
1571
|
-
const
|
|
1570
|
+
}, io = Ae(Qr);
|
|
1571
|
+
const lo = ({
|
|
1572
1572
|
variant: e = "primary",
|
|
1573
1573
|
button: t = null,
|
|
1574
1574
|
title: n,
|
|
@@ -1578,32 +1578,32 @@ const co = ({
|
|
|
1578
1578
|
n && /* @__PURE__ */ r.jsx("p", { className: "title", children: n }),
|
|
1579
1579
|
s && /* @__PURE__ */ r.jsx("p", { children: s }),
|
|
1580
1580
|
t && /* @__PURE__ */ r.jsx(W, { variant: "secondary", size: "medium", href: t.link, className: "gtm-trackable", "data-gtm-event-context": o, "data-gtm-event-type": "learn-more-click", children: t.text })
|
|
1581
|
-
] }),
|
|
1581
|
+
] }), Et = "https://storage.googleapis.com/apolitical-assets/", Re = {
|
|
1582
1582
|
general: "hello@apolitical.co",
|
|
1583
1583
|
support: "concierge@apolitical.co",
|
|
1584
1584
|
"data-protection": {
|
|
1585
1585
|
default: "dpo@apolitical.co",
|
|
1586
1586
|
eu: "dpo.agl@apolitical.foundation"
|
|
1587
1587
|
}
|
|
1588
|
-
},
|
|
1588
|
+
}, co = "200,000+";
|
|
1589
1589
|
const xn = ({ label: e = !1, className: t = "", children: n }) => {
|
|
1590
|
-
const s =
|
|
1590
|
+
const s = P();
|
|
1591
1591
|
return /* @__PURE__ */ r.jsxs("details", { className: j("collapsible-section", t), children: [
|
|
1592
1592
|
/* @__PURE__ */ r.jsx("summary", { children: e || s.formatMessage({ id: "collapsibleSection_summary" }) }),
|
|
1593
1593
|
/* @__PURE__ */ r.jsx("div", { className: "content", children: n })
|
|
1594
1594
|
] });
|
|
1595
1595
|
};
|
|
1596
1596
|
const ke = ({ variant: e = "primary", className: t = "", children: n, ...s }) => /* @__PURE__ */ r.jsx("div", { className: j("highlighted-text-box", e, t), ...s, children: n });
|
|
1597
|
-
const
|
|
1597
|
+
const rt = ({ variant: e = "empty", text: t = !1, button: n = !1, className: s = "" }) => {
|
|
1598
1598
|
let o = n && !!Object.keys(n).length;
|
|
1599
|
-
const l = typeof n == "object" && "breakpoints" in n,
|
|
1600
|
-
if (l && typeof n == "object" && typeof
|
|
1599
|
+
const l = typeof n == "object" && "breakpoints" in n, m = et(l);
|
|
1600
|
+
if (l && typeof n == "object" && typeof m == "number") {
|
|
1601
1601
|
const f = Object.assign({}, n.breakpoints), p = pn(Object.keys(f));
|
|
1602
|
-
o = hn(
|
|
1602
|
+
o = hn(m, p, f);
|
|
1603
1603
|
}
|
|
1604
1604
|
const { breakpoints: a, text: i = "", component: c, ...u } = n;
|
|
1605
1605
|
return /* @__PURE__ */ r.jsx(ke, { variant: "subtle", className: j("empty-state-box", e, s), children: /* @__PURE__ */ r.jsxs(r.Fragment, { children: [
|
|
1606
|
-
t && /* @__PURE__ */ r.jsx(
|
|
1606
|
+
t && /* @__PURE__ */ r.jsx(Ke, { options: { forceBlock: !0 }, children: t }),
|
|
1607
1607
|
o && typeof n == "object" && (c || /* @__PURE__ */ r.jsx(
|
|
1608
1608
|
W,
|
|
1609
1609
|
{
|
|
@@ -1614,27 +1614,27 @@ const st = ({ variant: e = "empty", text: t = !1, button: n = !1, className: s =
|
|
|
1614
1614
|
))
|
|
1615
1615
|
] }) });
|
|
1616
1616
|
};
|
|
1617
|
-
const
|
|
1617
|
+
const St = ({ children: e, ...t }) => /* @__PURE__ */ r.jsx("p", { ...t, children: e }), bn = { q: St, blockquote: St };
|
|
1618
1618
|
for (let e = 1; e <= 6; e++)
|
|
1619
|
-
|
|
1619
|
+
bn[`h${e}`] = { component: St, props: { className: "title" } };
|
|
1620
1620
|
const Ur = ({ type: e = "default", className: t = "", heading: n = !1, children: s }) => /* @__PURE__ */ r.jsxs("div", { className: j("helper-text-box text-small", e, t), children: [
|
|
1621
1621
|
n && /* @__PURE__ */ r.jsx("p", { className: "title", children: n }),
|
|
1622
1622
|
typeof s == "string" ? /* @__PURE__ */ r.jsx(
|
|
1623
|
-
|
|
1623
|
+
Ke,
|
|
1624
1624
|
{
|
|
1625
1625
|
options: {
|
|
1626
1626
|
wrapper: A.Fragment,
|
|
1627
1627
|
forceBlock: !0,
|
|
1628
|
-
overrides:
|
|
1628
|
+
overrides: bn
|
|
1629
1629
|
},
|
|
1630
1630
|
children: s
|
|
1631
1631
|
}
|
|
1632
1632
|
) : /* @__PURE__ */ r.jsx("p", { children: s })
|
|
1633
1633
|
] });
|
|
1634
|
-
const
|
|
1635
|
-
const l =
|
|
1634
|
+
const uo = ({ className: e = "", show: t = !1, hide: n = !1, text: s, children: o }) => {
|
|
1635
|
+
const l = P(), m = Z(null), [a, i] = D(""), [c, u] = D("closed");
|
|
1636
1636
|
z(() => {
|
|
1637
|
-
const h =
|
|
1637
|
+
const h = m.current;
|
|
1638
1638
|
if (h)
|
|
1639
1639
|
return h.addEventListener("transitionend", f), () => {
|
|
1640
1640
|
h.removeEventListener("transitionend", f);
|
|
@@ -1656,8 +1656,8 @@ const mo = ({ className: e = "", show: t = !1, hide: n = !1, text: s, children:
|
|
|
1656
1656
|
return null;
|
|
1657
1657
|
const p = ["opening", "open"].includes(c);
|
|
1658
1658
|
return /* @__PURE__ */ r.jsxs(ke, { variant: "subtle", className: j("hide-show-text-box", e), children: [
|
|
1659
|
-
/* @__PURE__ */ r.jsxs("div", { ref:
|
|
1660
|
-
/* @__PURE__ */ r.jsx(
|
|
1659
|
+
/* @__PURE__ */ r.jsxs("div", { ref: m, className: j("content", c), children: [
|
|
1660
|
+
/* @__PURE__ */ r.jsx(Ke, { options: { forceBlock: !0 }, children: c === "closed" ? a : s }),
|
|
1661
1661
|
c !== "closed" && o
|
|
1662
1662
|
] }),
|
|
1663
1663
|
/* @__PURE__ */ r.jsx("p", { className: "cta", children: /* @__PURE__ */ r.jsx(
|
|
@@ -1675,20 +1675,20 @@ const mo = ({ className: e = "", show: t = !1, hide: n = !1, text: s, children:
|
|
|
1675
1675
|
) })
|
|
1676
1676
|
] });
|
|
1677
1677
|
}, Wr = () => A.Fragment, zr = ({ children: e }) => /* @__PURE__ */ r.jsx(ke, { variant: "secondary", children: e }), Vr = ["span", "strong", "h1", "h2", "h3", "h4", "h5", "h6", "p"], Yr = ({ children: e }) => {
|
|
1678
|
-
const t =
|
|
1678
|
+
const t = P();
|
|
1679
1679
|
if (!e)
|
|
1680
1680
|
return null;
|
|
1681
1681
|
let n = t.formatMessage({ id: "markdown_collapsibleSection_summary" });
|
|
1682
1682
|
const s = [];
|
|
1683
|
-
for (const l of
|
|
1683
|
+
for (const l of yt.toArray(e))
|
|
1684
1684
|
if (!(!l || typeof l == "string" || typeof l == "number"))
|
|
1685
1685
|
if (A.isValidElement(l) && l.type === "summary") {
|
|
1686
1686
|
if (l.props && l.props.children) {
|
|
1687
|
-
for (const
|
|
1688
|
-
if (!(!
|
|
1689
|
-
const a =
|
|
1687
|
+
for (const m of yt.toArray(l.props.children))
|
|
1688
|
+
if (!(!m || typeof m == "string" || typeof m == "number") && A.isValidElement(m)) {
|
|
1689
|
+
const a = m.type;
|
|
1690
1690
|
if (Vr.includes(a)) {
|
|
1691
|
-
for (n =
|
|
1691
|
+
for (n = m.props.children; typeof n != "string" && (Array.isArray(n) && n[0].props && n[0].props.children && n[0].props.children[0]); )
|
|
1692
1692
|
n = n[0].props.children[0];
|
|
1693
1693
|
break;
|
|
1694
1694
|
}
|
|
@@ -1720,11 +1720,11 @@ const mo = ({ className: e = "", show: t = !1, hide: n = !1, text: s, children:
|
|
|
1720
1720
|
}
|
|
1721
1721
|
return /* @__PURE__ */ r.jsx("div", { ...t, children: e });
|
|
1722
1722
|
}, Jr = (e) => {
|
|
1723
|
-
const t =
|
|
1723
|
+
const t = P(), n = Date.now().toString();
|
|
1724
1724
|
let s = "default";
|
|
1725
1725
|
const o = e.src;
|
|
1726
1726
|
return o.includes("youtube") || o.includes("vimeo") ? s = "video" : o.includes("riddle") || o.includes("sli.do") ? s = "poll" : o.includes("padlet") && (s = "padlet"), /* @__PURE__ */ r.jsxs(r.Fragment, { children: [
|
|
1727
|
-
/* @__PURE__ */ r.jsx(
|
|
1727
|
+
/* @__PURE__ */ r.jsx(ne, { children: /* @__PURE__ */ r.jsx("a", { href: `#content-after-iframe-${n}`, children: t.formatMessage({ id: `markdown_skip${s === "default" ? "" : `_${s}`}` }) }) }),
|
|
1728
1728
|
/* @__PURE__ */ r.jsx("iframe", { ...e, title: t.formatMessage({ id: `markdown_iframe${s === "default" ? "" : `_${s}`}` }) }),
|
|
1729
1729
|
/* @__PURE__ */ r.jsx("span", { id: `content-after-iframe-${n}`, tabIndex: -1 })
|
|
1730
1730
|
] });
|
|
@@ -1735,11 +1735,11 @@ const mo = ({ className: e = "", show: t = !1, hide: n = !1, text: s, children:
|
|
|
1735
1735
|
let n = { ...t };
|
|
1736
1736
|
t.href && (t.href.includes("http:") || t.href.includes("https:")) && !t.target && (n.target = "_blank");
|
|
1737
1737
|
let s = e, o = !1;
|
|
1738
|
-
for (const l of
|
|
1738
|
+
for (const l of yt.toArray(e))
|
|
1739
1739
|
if (!(!l || typeof l == "string" || typeof l == "number") && A.isValidElement(l)) {
|
|
1740
|
-
const
|
|
1741
|
-
if (["button", "center", "span", "strong"].includes(
|
|
1742
|
-
for ((
|
|
1740
|
+
const m = l.type;
|
|
1741
|
+
if (["button", "center", "span", "strong"].includes(m) && l.props && l.props.children && l.props.children[0])
|
|
1742
|
+
for ((m === "button" || tn(l.props.children[0]) === "button") && (o = !0), s = l.props.children[0]; s && typeof s != "string" && !(typeof s == "boolean" || typeof s == "number" || !A.isValidElement(s)); )
|
|
1743
1743
|
if (s.props && s.props.children && s.props.children[0])
|
|
1744
1744
|
s = s.props.children[0], s && tn(s) === "button" && (o = !0);
|
|
1745
1745
|
else
|
|
@@ -1767,47 +1767,47 @@ const nn = ({ className: e = "", options: t = {}, children: n }) => {
|
|
|
1767
1767
|
iframe: Jr
|
|
1768
1768
|
}
|
|
1769
1769
|
};
|
|
1770
|
-
return /* @__PURE__ */ r.jsx("div", { className: j("markdown-text", e), children: /* @__PURE__ */ r.jsx(
|
|
1770
|
+
return /* @__PURE__ */ r.jsx("div", { className: j("markdown-text", e), children: /* @__PURE__ */ r.jsx(Ke, { options: { ...s, ...t }, children: n }) });
|
|
1771
1771
|
};
|
|
1772
1772
|
const qr = ({ size: e = "medium", variant: t = "default", className: n = "", children: s }) => /* @__PURE__ */ r.jsx("span", { className: j("pill", e, t, n), children: s });
|
|
1773
|
-
const
|
|
1773
|
+
const $t = ({ element: e = "p", children: t = null, className: n = "", ...s }) => A.createElement(e, { ...s, className: j("status-banner text-small", n), "aria-live": "assertive" }, t);
|
|
1774
1774
|
const Kr = ({ progress: e = 0, text: t = !1, className: n = "" }) => {
|
|
1775
|
-
const s =
|
|
1776
|
-
return /* @__PURE__ */ r.jsx("span", { className: j(`progress-bar section-${o}`, n), style: l, children: /* @__PURE__ */ r.jsx(
|
|
1775
|
+
const s = P(), o = e > 75 ? 100 : e > 50 ? 75 : e > 25 ? 50 : e > 5 ? 25 : 0, l = { "--progress": `${e}%` };
|
|
1776
|
+
return /* @__PURE__ */ r.jsx("span", { className: j(`progress-bar section-${o}`, n), style: l, children: /* @__PURE__ */ r.jsx(ne, { children: t ? `${e} ${t}` : s.formatMessage({ id: "progressBar" }, { number: e }) }) });
|
|
1777
1777
|
}, es = Ae(Kr);
|
|
1778
|
-
const
|
|
1779
|
-
const s =
|
|
1778
|
+
const dt = "loadingBlock_", ts = ({ progress: e = 0, steps: t = !1, className: n = "" }) => {
|
|
1779
|
+
const s = P();
|
|
1780
1780
|
t || (t = {
|
|
1781
|
-
0: { text: s.formatMessage({ id: `${
|
|
1782
|
-
75: { text: s.formatMessage({ id: `${
|
|
1783
|
-
100: { text: s.formatMessage({ id: `${
|
|
1781
|
+
0: { text: s.formatMessage({ id: `${dt}loading` }) },
|
|
1782
|
+
75: { text: s.formatMessage({ id: `${dt}almostDone` }) },
|
|
1783
|
+
100: { text: s.formatMessage({ id: `${dt}complete` }) }
|
|
1784
1784
|
});
|
|
1785
1785
|
let o = null;
|
|
1786
1786
|
const l = Object.keys(t);
|
|
1787
1787
|
for (let a = 0; a < l.length && !(e < parseInt(l[a])); a++)
|
|
1788
1788
|
o = l[a];
|
|
1789
|
-
const
|
|
1789
|
+
const m = o && t[o].icon ? { "--icon": `url(${Et}icons/${t[o].icon}.svg)` } : {};
|
|
1790
1790
|
return /* @__PURE__ */ r.jsxs(
|
|
1791
1791
|
ke,
|
|
1792
1792
|
{
|
|
1793
1793
|
className: j("loading-block", n, { "has-icon": o && t[o].icon }),
|
|
1794
1794
|
variant: "subtle",
|
|
1795
|
-
style:
|
|
1795
|
+
style: m,
|
|
1796
1796
|
children: [
|
|
1797
1797
|
o && /* @__PURE__ */ r.jsx("span", { className: "step", children: t[o].text }),
|
|
1798
1798
|
/* @__PURE__ */ r.jsx(es, { progress: e })
|
|
1799
1799
|
]
|
|
1800
1800
|
}
|
|
1801
1801
|
);
|
|
1802
|
-
},
|
|
1803
|
-
const
|
|
1804
|
-
const
|
|
1802
|
+
}, mo = Ae(ts);
|
|
1803
|
+
const ve = ({ element: e = "div", className: t = "", ...n }) => /* @__PURE__ */ r.jsx(mn, { element: e, className: j("loading-placeholder", t), ...n });
|
|
1804
|
+
const Tt = {
|
|
1805
1805
|
header: ["logo", "link", "link", "search"],
|
|
1806
1806
|
sidebar: ["text", "text", "text", "text", "text"],
|
|
1807
1807
|
"cards-section": ["subtitle", "cards"],
|
|
1808
1808
|
cards: ["card", "card", "card", "card"],
|
|
1809
1809
|
"overview-page": ["header", "sidebar", "title", "text", "cards-section", "cards-section", "footer"]
|
|
1810
|
-
},
|
|
1810
|
+
}, vn = (e, t) => e in Tt ? /* @__PURE__ */ r.jsx("div", { className: e, children: Tt[e].map((n, s) => vn(n, s)) }, t) : /* @__PURE__ */ r.jsx(ve, { className: e }, t), ns = ({ layout: e = "overview-page" }) => /* @__PURE__ */ r.jsx("div", { className: j("loading-state", e), children: Tt[e].map((t, n) => vn(t, n)) }), wn = (e) => {
|
|
1811
1811
|
const t = e && e.toUpperCase().split(" ");
|
|
1812
1812
|
return Array.isArray(t) && t.length > 1 && t[0] !== "" ? t[1] === "" ? t[0][0] : t[0][0] + t[t.length - 1][0] : e ? e.substr(0, 1) : "";
|
|
1813
1813
|
}, Qe = ["#5AB6A3", "#A2D7AF", "#806056", "#3962B3"], rs = (e) => {
|
|
@@ -1819,8 +1819,8 @@ const Ct = {
|
|
|
1819
1819
|
if (s <= t * (o + 1))
|
|
1820
1820
|
return Qe[o];
|
|
1821
1821
|
};
|
|
1822
|
-
const rn = 256,
|
|
1823
|
-
const [a, i] =
|
|
1822
|
+
const rn = 256, Dt = ({ className: e = "", src: t = "", name: n, alt: s, width: o = rn, height: l = rn, ...m }) => {
|
|
1823
|
+
const [a, i] = D(!1), c = Z(null);
|
|
1824
1824
|
z(() => {
|
|
1825
1825
|
const f = c.current;
|
|
1826
1826
|
if (!f)
|
|
@@ -1832,7 +1832,7 @@ const rn = 256, Pt = ({ className: e = "", src: t = "", name: n, alt: s, width:
|
|
|
1832
1832
|
typeof window < "u" && window.devicePixelRatio && (f.width = h * window.devicePixelRatio, f.height = _ * window.devicePixelRatio, p.scale(window.devicePixelRatio, window.devicePixelRatio)), p.fillStyle = rs(n), p.fillRect(0, 0, h, _), p.font = `${h / 3}px Arial`, p.textAlign = "center", p.fillStyle = "white", p.fillText(wn(n), h / 2, _ / 1.6);
|
|
1833
1833
|
}, [n]);
|
|
1834
1834
|
let u = !1;
|
|
1835
|
-
return t && t !== "" && !a && (t.includes("http") || t.includes("//")) && (u = !0), /* @__PURE__ */ r.jsx("figure", { className: j("profile-picture", e, { error: a }), ...
|
|
1835
|
+
return t && t !== "" && !a && (t.includes("http") || t.includes("//")) && (u = !0), /* @__PURE__ */ r.jsx("figure", { className: j("profile-picture", e, { error: a }), ...m, children: u ? /* @__PURE__ */ r.jsx(
|
|
1836
1836
|
"img",
|
|
1837
1837
|
{
|
|
1838
1838
|
src: t,
|
|
@@ -1845,9 +1845,9 @@ const rn = 256, Pt = ({ className: e = "", src: t = "", name: n, alt: s, width:
|
|
|
1845
1845
|
}
|
|
1846
1846
|
) : /* @__PURE__ */ r.jsx("canvas", { ref: c }) });
|
|
1847
1847
|
}, kn = (e) => e === "apolitical" ? {
|
|
1848
|
-
image: `${
|
|
1848
|
+
image: `${Et}logos/member_apolitical.svg`
|
|
1849
1849
|
} : e === "community" || typeof e == "object" && !e.name ? {
|
|
1850
|
-
image: `${
|
|
1850
|
+
image: `${Et}logos/member_community.svg`
|
|
1851
1851
|
} : {
|
|
1852
1852
|
name: e.name,
|
|
1853
1853
|
role: e.jobTitle || "",
|
|
@@ -1861,14 +1861,14 @@ const rn = 256, Pt = ({ className: e = "", src: t = "", name: n, alt: s, width:
|
|
|
1861
1861
|
country: n = "",
|
|
1862
1862
|
maximumCharacters: s = 80
|
|
1863
1863
|
}) => {
|
|
1864
|
-
const o = e !== "", l = t !== "",
|
|
1865
|
-
if (!o && !l && !
|
|
1864
|
+
const o = e !== "", l = t !== "", m = n !== "";
|
|
1865
|
+
if (!o && !l && !m)
|
|
1866
1866
|
return "";
|
|
1867
1867
|
const a = `${e}${o && l ? ` — ${t}` : t}`;
|
|
1868
|
-
let i = `${a}${(o || l) &&
|
|
1869
|
-
return i.length > s && (i = a), i.length > s && (i =
|
|
1868
|
+
let i = `${a}${(o || l) && m ? `, ${n}` : n}`;
|
|
1869
|
+
return i.length > s && (i = a), i.length > s && (i = Ct(i, s)), i;
|
|
1870
1870
|
};
|
|
1871
|
-
const
|
|
1871
|
+
const Pt = ({
|
|
1872
1872
|
element: e = "div",
|
|
1873
1873
|
member: t = "community",
|
|
1874
1874
|
additionalContent: n = !1,
|
|
@@ -1876,13 +1876,13 @@ const Ft = ({
|
|
|
1876
1876
|
gtmType: o = "member-click",
|
|
1877
1877
|
className: l = ""
|
|
1878
1878
|
}) => {
|
|
1879
|
-
const
|
|
1880
|
-
a.name || (a.name =
|
|
1879
|
+
const m = P(), a = kn(t);
|
|
1880
|
+
a.name || (a.name = m.formatMessage({ id: `member_${typeof t == "string" ? t : "community"}` }));
|
|
1881
1881
|
const { name: i, url: c, image: u } = a, f = ss(a), p = n && n.createdAt ? Mr(n.createdAt) : !1, h = n && n.createdAt ? Tr(n.createdAt) : "";
|
|
1882
1882
|
return A.createElement(e, {
|
|
1883
1883
|
className: j("member text-medium", l),
|
|
1884
1884
|
children: /* @__PURE__ */ r.jsxs(
|
|
1885
|
-
|
|
1885
|
+
nt,
|
|
1886
1886
|
{
|
|
1887
1887
|
href: c,
|
|
1888
1888
|
gtmType: o,
|
|
@@ -1891,12 +1891,12 @@ const Ft = ({
|
|
|
1891
1891
|
_ == null || _.stopPropagation();
|
|
1892
1892
|
},
|
|
1893
1893
|
children: [
|
|
1894
|
-
/* @__PURE__ */ r.jsx(
|
|
1894
|
+
/* @__PURE__ */ r.jsx(Dt, { name: i, src: u }),
|
|
1895
1895
|
/* @__PURE__ */ r.jsxs("p", { className: "details", children: [
|
|
1896
1896
|
/* @__PURE__ */ r.jsx("strong", { children: i }),
|
|
1897
1897
|
n && /* @__PURE__ */ r.jsxs("span", { className: "additional-content", children: [
|
|
1898
|
-
n.createdAt && p && /* @__PURE__ */ r.jsx("span", { className: "date", title: h, "aria-label": h, children:
|
|
1899
|
-
n.didEdit && /* @__PURE__ */ r.jsx("em", { children:
|
|
1898
|
+
n.createdAt && p && /* @__PURE__ */ r.jsx("span", { className: "date", title: h, "aria-label": h, children: m.formatMessage({ id: `dates_${p.path}` }, { number: p.number }) }),
|
|
1899
|
+
n.didEdit && /* @__PURE__ */ r.jsx("em", { children: m.formatMessage({ id: "discussion_edited" }) })
|
|
1900
1900
|
] }),
|
|
1901
1901
|
f && /* @__PURE__ */ r.jsx("small", { children: f })
|
|
1902
1902
|
] })
|
|
@@ -1908,18 +1908,18 @@ const Ft = ({
|
|
|
1908
1908
|
const sn = {
|
|
1909
1909
|
small: 24,
|
|
1910
1910
|
medium: 48
|
|
1911
|
-
}, os = ({ element: e = "div", contributors: { total: t, data: n } = { total: void 0, data: [] }, styling: { showText: s, size: o, showGap: l, showPlaceholders:
|
|
1912
|
-
const c =
|
|
1911
|
+
}, os = ({ element: e = "div", contributors: { total: t, data: n } = { total: void 0, data: [] }, styling: { showText: s, size: o, showGap: l, showPlaceholders: m } = { showText: !0, size: "medium", showGap: !0, showPlaceholders: !1 }, cutoff: a = 2, className: i = "" }) => {
|
|
1912
|
+
const c = P();
|
|
1913
1913
|
return !n || n.length === 0 ? null : A.createElement(
|
|
1914
1914
|
e,
|
|
1915
1915
|
{ className: j("contributors", i, o, { "has-gap": l }), children: /* @__PURE__ */ r.jsxs(r.Fragment, { children: [
|
|
1916
1916
|
/* @__PURE__ */ r.jsx("ul", { children: n.map((u, f) => {
|
|
1917
1917
|
let p, h = "";
|
|
1918
1918
|
if (f < a) {
|
|
1919
|
-
const { name: _ = "", image:
|
|
1920
|
-
if (
|
|
1921
|
-
return /* @__PURE__ */ r.jsx(
|
|
1922
|
-
p = /* @__PURE__ */ r.jsx(
|
|
1919
|
+
const { name: _ = "", image: b = "" } = kn(u);
|
|
1920
|
+
if (m)
|
|
1921
|
+
return /* @__PURE__ */ r.jsx(ve, { element: "li", className: "contributor" }, f);
|
|
1922
|
+
p = /* @__PURE__ */ r.jsx(Dt, { name: _, src: b, width: sn[o || "medium"], height: sn[o || "medium"] });
|
|
1923
1923
|
} else if (f === a) {
|
|
1924
1924
|
const _ = (t || n.length) - a;
|
|
1925
1925
|
p = /* @__PURE__ */ r.jsxs("small", { className: j({ "large-number": _ > 99 }), children: [
|
|
@@ -1929,7 +1929,7 @@ const sn = {
|
|
|
1929
1929
|
}
|
|
1930
1930
|
return p ? /* @__PURE__ */ r.jsx("li", { className: j("contributor", h), children: p }, f) : null;
|
|
1931
1931
|
}) }),
|
|
1932
|
-
s && /* @__PURE__ */ r.jsx("span", { className: "label", children: typeof s == "string" ? s : n.length === 1 ? typeof n[0] == "string" ? c.formatMessage({ id: `member_${n[0]}` }) :
|
|
1932
|
+
s && /* @__PURE__ */ r.jsx("span", { className: "label", children: typeof s == "string" ? s : n.length === 1 ? typeof n[0] == "string" ? c.formatMessage({ id: `member_${n[0]}` }) : Ct(n[0].name || "", 20) : null })
|
|
1933
1933
|
] }) }
|
|
1934
1934
|
);
|
|
1935
1935
|
}, as = ({ showDevTools: e = !0, children: t }) => {
|
|
@@ -1949,7 +1949,7 @@ const sn = {
|
|
|
1949
1949
|
e && /* @__PURE__ */ r.jsx(dr, { initialIsOpen: !1 })
|
|
1950
1950
|
] });
|
|
1951
1951
|
};
|
|
1952
|
-
var is =
|
|
1952
|
+
var is = Mt({ client: Ge });
|
|
1953
1953
|
function ls(e) {
|
|
1954
1954
|
var t = e.children, n = e.client, s = e.apiKey, o = e.options, l = qe(function() {
|
|
1955
1955
|
return n && s && console.warn("[PostHog.js] You have provided both a client and an apiKey to PostHogProvider. The apiKey will be ignored in favour of the client."), n && o && console.warn("[PostHog.js] You have provided both a client and options to PostHogProvider. The options will be ignored in favour of the client."), n || (s && (Ge.__loaded && console.warn("[PostHog.js] was already loaded elsewhere. This may cause issues."), Ge.init(s, o)), Ge);
|
|
@@ -1978,21 +1978,21 @@ const cs = ({ children: e, user: t }) => t.isLoading ? /* @__PURE__ */ r.jsx(r.F
|
|
|
1978
1978
|
...n || {}
|
|
1979
1979
|
};
|
|
1980
1980
|
return /* @__PURE__ */ r.jsx(ir, { locale: s, messages: o, children: e });
|
|
1981
|
-
}, je =
|
|
1982
|
-
const [s, o] =
|
|
1981
|
+
}, je = Mt(null), ds = ({ children: e, user: t }) => /* @__PURE__ */ r.jsx(je.Provider, { value: t, children: e }), fo = ({ bootstrap: e, children: t, intl: n }) => {
|
|
1982
|
+
const [s, o] = D({ isLoading: !0 });
|
|
1983
1983
|
return z(() => {
|
|
1984
1984
|
e().then((l) => o({ ...l, isLoading: !1 })).catch(() => o({ isLoading: !1 }));
|
|
1985
1985
|
}, []), /* @__PURE__ */ r.jsx(us, { locale: n == null ? void 0 : n.locale, messages: n == null ? void 0 : n.messages, children: /* @__PURE__ */ r.jsx(ds, { user: s, children: /* @__PURE__ */ r.jsx(as, { children: /* @__PURE__ */ r.jsx(cs, { user: s, children: t }) }) }) });
|
|
1986
1986
|
};
|
|
1987
|
-
const
|
|
1987
|
+
const mt = "joinCommunityButton", yn = ({ isMember: e = !1, isShort: t = !1, functions: { join: n, leave: s } = { join: () => {
|
|
1988
1988
|
}, leave: () => {
|
|
1989
1989
|
} } }) => {
|
|
1990
|
-
const o =
|
|
1990
|
+
const o = P(), l = ye(je), m = l && typeof l.id == "string", [a, i] = D(e), [c, u] = D(e ? "joined" : "notJoined");
|
|
1991
1991
|
z(() => {
|
|
1992
1992
|
c === "joining" ? u("joined") : c === "leaving" && u("notJoined");
|
|
1993
1993
|
}, [a]);
|
|
1994
1994
|
const f = {}, p = {};
|
|
1995
|
-
return a && c !== "leaving" && (f["data-hover-text"] = o.formatMessage({ id: `${
|
|
1995
|
+
return a && c !== "leaving" && (f["data-hover-text"] = o.formatMessage({ id: `${mt}_leave` }), f["aria-label"] = o.formatMessage({ id: `${mt}_member_aria` }), p["aria-hidden"] = "true"), /* @__PURE__ */ r.jsx(
|
|
1996
1996
|
W,
|
|
1997
1997
|
{
|
|
1998
1998
|
variant: a ? "secondary" : "primary",
|
|
@@ -2000,48 +2000,77 @@ const ft = "joinCommunityButton", yn = ({ isMember: e = !1, isShort: t = !1, fun
|
|
|
2000
2000
|
styling: { fullWidth: !0 },
|
|
2001
2001
|
icon: a && c !== "leaving" ? { icon: "tick", position: "left" } : !1,
|
|
2002
2002
|
onClick: async (h) => {
|
|
2003
|
-
|
|
2003
|
+
m && (h.currentTarget.blur(), a ? (u("leaving"), typeof s == "function" && await s()) : (u("joining"), typeof n == "function" && await n()), i(!a));
|
|
2004
2004
|
},
|
|
2005
2005
|
className: j("join-community-button", c, { active: c === "joining" }),
|
|
2006
|
-
disabled: !
|
|
2006
|
+
disabled: !m,
|
|
2007
2007
|
...f,
|
|
2008
|
-
children: /* @__PURE__ */ r.jsx("span", { className: "text", ...p, children: o.formatMessage({ id: `${
|
|
2008
|
+
children: /* @__PURE__ */ r.jsx("span", { className: "text", ...p, children: o.formatMessage({ id: `${mt}${["joining", "leaving"].includes(c) ? `_${c}` : a ? "_member" : t ? "_short" : ""}` }) })
|
|
2009
2009
|
}
|
|
2010
2010
|
);
|
|
2011
2011
|
};
|
|
2012
|
-
const
|
|
2013
|
-
|
|
2014
|
-
|
|
2015
|
-
|
|
2012
|
+
const ft = "communityDetails_", po = ({
|
|
2013
|
+
className: e = "",
|
|
2014
|
+
isMember: t = !1,
|
|
2015
|
+
slug: n,
|
|
2016
|
+
members: { number: s = 0, data: o = [] } = { number: 0, data: [] },
|
|
2017
|
+
functions: { onInviteClick: l, ...m }
|
|
2018
|
+
}) => {
|
|
2019
|
+
const a = P(), i = 5, c = s || o.length, u = o.length ? o : Array(i).fill({});
|
|
2020
|
+
return /* @__PURE__ */ r.jsxs("div", { className: j("community-details", e), children: [
|
|
2021
|
+
/* @__PURE__ */ r.jsx(Le, {}),
|
|
2016
2022
|
/* @__PURE__ */ r.jsxs("div", { className: "member-details", children: [
|
|
2017
2023
|
/* @__PURE__ */ r.jsxs("div", { className: "top", children: [
|
|
2018
2024
|
/* @__PURE__ */ r.jsxs("h3", { children: [
|
|
2019
|
-
|
|
2020
|
-
/* @__PURE__ */ r.jsx("span", { className: "count", children:
|
|
2025
|
+
a.formatMessage({ id: `${ft}members` }),
|
|
2026
|
+
/* @__PURE__ */ r.jsx("span", { className: "count", children: c })
|
|
2021
2027
|
] }),
|
|
2022
|
-
/* @__PURE__ */ r.jsx("p", { className: "text-small", children: /* @__PURE__ */ r.jsx("a", { href: `/communities/${
|
|
2028
|
+
/* @__PURE__ */ r.jsx("p", { className: "text-small", children: /* @__PURE__ */ r.jsx("a", { href: `/communities/${n}/members`, children: a.formatMessage({ id: `${ft}viewAll` }) }) })
|
|
2023
2029
|
] }),
|
|
2024
|
-
/* @__PURE__ */ r.jsx(
|
|
2030
|
+
/* @__PURE__ */ r.jsx(
|
|
2031
|
+
os,
|
|
2032
|
+
{
|
|
2033
|
+
contributors: {
|
|
2034
|
+
total: s,
|
|
2035
|
+
data: u
|
|
2036
|
+
},
|
|
2037
|
+
styling: {
|
|
2038
|
+
size: "medium",
|
|
2039
|
+
showGap: !0,
|
|
2040
|
+
showPlaceholders: c === 0
|
|
2041
|
+
},
|
|
2042
|
+
cutoff: i
|
|
2043
|
+
}
|
|
2044
|
+
)
|
|
2025
2045
|
] }),
|
|
2026
|
-
/* @__PURE__ */ r.jsx(yn, { isMember:
|
|
2027
|
-
|
|
2046
|
+
/* @__PURE__ */ r.jsx(yn, { isMember: t, ...m }),
|
|
2047
|
+
t && /* @__PURE__ */ r.jsx(
|
|
2048
|
+
W,
|
|
2049
|
+
{
|
|
2050
|
+
variant: "primary",
|
|
2051
|
+
onClick: l,
|
|
2052
|
+
icon: { icon: "plus" },
|
|
2053
|
+
styling: { fullWidth: !0 },
|
|
2054
|
+
children: a.formatMessage({ id: `${ft}invite` })
|
|
2055
|
+
}
|
|
2056
|
+
)
|
|
2028
2057
|
] });
|
|
2029
2058
|
};
|
|
2030
|
-
const
|
|
2059
|
+
const ho = ({
|
|
2031
2060
|
breadcrumbs: e,
|
|
2032
2061
|
cutoff: t = 20,
|
|
2033
2062
|
className: n = ""
|
|
2034
2063
|
}) => {
|
|
2035
|
-
const s =
|
|
2064
|
+
const s = P();
|
|
2036
2065
|
return /* @__PURE__ */ r.jsxs(r.Fragment, { children: [
|
|
2037
|
-
/* @__PURE__ */ r.jsx(
|
|
2038
|
-
/* @__PURE__ */ r.jsx("ul", { className: j("breadcrumbs text-small", n), children: e.map(({ text: o, href: l, current:
|
|
2039
|
-
|
|
2040
|
-
/* @__PURE__ */ r.jsx(
|
|
2066
|
+
/* @__PURE__ */ r.jsx(ne, { element: "p", children: s.formatMessage({ id: "breadcrumbs_label" }) }),
|
|
2067
|
+
/* @__PURE__ */ r.jsx("ul", { className: j("breadcrumbs text-small", n), children: e.map(({ text: o, href: l, current: m = !1 }, a) => /* @__PURE__ */ r.jsxs("li", { children: [
|
|
2068
|
+
m && /* @__PURE__ */ r.jsx(ne, { element: "span", children: s.formatMessage({ id: "breadcrumbs_currentPage" }) }),
|
|
2069
|
+
/* @__PURE__ */ r.jsx(nt, { href: m ? void 0 : l, children: Ct(o, t) })
|
|
2041
2070
|
] }, `${window.btoa(o)}_${a}`)) })
|
|
2042
2071
|
] });
|
|
2043
2072
|
};
|
|
2044
|
-
const
|
|
2073
|
+
const go = ({
|
|
2045
2074
|
options: e,
|
|
2046
2075
|
allOption: t = !1,
|
|
2047
2076
|
allowMultiple: n = !0,
|
|
@@ -2049,19 +2078,19 @@ const _o = ({
|
|
|
2049
2078
|
},
|
|
2050
2079
|
className: o = ""
|
|
2051
2080
|
}) => {
|
|
2052
|
-
const l =
|
|
2081
|
+
const l = P(), m = t ? [{ id: "all", text: typeof t != "boolean" && t.text || l.formatMessage({ id: "filters_all" }) }, ...e] : e, [a, i] = D(t ? ["all"] : []), c = (u, f) => {
|
|
2053
2082
|
let p = [];
|
|
2054
2083
|
a.includes(u) ? p = a.filter((h) => h !== u) : u === "all" ? p = ["all"] : n ? p = [...a.filter((h) => h !== "all"), u] : p = [u], i((h) => (s && typeof s == "function" && s({ current: p, previous: h }), p)), f && typeof f == "function" && f();
|
|
2055
2084
|
};
|
|
2056
|
-
return /* @__PURE__ */ r.jsx("ul", { className: j("filters", o), children:
|
|
2085
|
+
return /* @__PURE__ */ r.jsx("ul", { className: j("filters", o), children: m.map(({ id: u, text: f, disabled: p = !1, callback: h = () => {
|
|
2057
2086
|
} }) => {
|
|
2058
2087
|
let _ = {};
|
|
2059
2088
|
return p && (_ = { disabled: !0, "aria-label": l.formatMessage({ id: "filters_disabled" }, { name: f }) }), /* @__PURE__ */ r.jsx("li", { children: /* @__PURE__ */ r.jsx(
|
|
2060
2089
|
"button",
|
|
2061
2090
|
{
|
|
2062
2091
|
className: j(u, { selected: a.includes(u) }),
|
|
2063
|
-
onClick: (
|
|
2064
|
-
|
|
2092
|
+
onClick: (b) => {
|
|
2093
|
+
b.preventDefault(), b.stopPropagation(), c(u, h);
|
|
2065
2094
|
},
|
|
2066
2095
|
..._,
|
|
2067
2096
|
children: f
|
|
@@ -2077,7 +2106,7 @@ const _o = ({
|
|
|
2077
2106
|
l === "before-lang" ? s += `/${o}` : (s.includes(`/${n}/`) || (s += `/${n}`), s += `/${o}`);
|
|
2078
2107
|
}), s.includes(`/${n}/`) || (s += `/${n}`), s;
|
|
2079
2108
|
};
|
|
2080
|
-
const
|
|
2109
|
+
const pt = { en: "English", es: "Español", fr: "Français", pt: "Português" }, Ue = "languageSwitcher_", _o = ({
|
|
2081
2110
|
currentLanguage: e,
|
|
2082
2111
|
isOriginalLanguage: t = !1,
|
|
2083
2112
|
isHumanTranslation: n = !1,
|
|
@@ -2085,48 +2114,48 @@ const ht = { en: "English", es: "Español", fr: "Français", pt: "Português" },
|
|
|
2085
2114
|
onChange: o = () => {
|
|
2086
2115
|
},
|
|
2087
2116
|
urlParts: l,
|
|
2088
|
-
variant:
|
|
2117
|
+
variant: m = "default",
|
|
2089
2118
|
label: a,
|
|
2090
2119
|
className: i = ""
|
|
2091
2120
|
}) => {
|
|
2092
|
-
const c =
|
|
2121
|
+
const c = P(), [u, f] = D(e);
|
|
2093
2122
|
if (z(() => {
|
|
2094
2123
|
e !== u && f(e);
|
|
2095
|
-
}, [e]), !s || !Object.values(s).some((
|
|
2124
|
+
}, [e]), !s || !Object.values(s).some((b) => b && b.post_name))
|
|
2096
2125
|
return null;
|
|
2097
2126
|
const h = Object.keys(s), _ = u !== e;
|
|
2098
|
-
return /* @__PURE__ */ r.jsxs("div", { className: j("language-switcher text-small",
|
|
2127
|
+
return /* @__PURE__ */ r.jsxs("div", { className: j("language-switcher text-small", m, i), children: [
|
|
2099
2128
|
/* @__PURE__ */ r.jsxs("nav", { children: [
|
|
2100
|
-
|
|
2101
|
-
/* @__PURE__ */ r.jsx("ul", { children: h.map((
|
|
2102
|
-
if (!
|
|
2129
|
+
m !== "short" && /* @__PURE__ */ r.jsx("p", { children: a || c.formatMessage({ id: `${Ue}label` }) }),
|
|
2130
|
+
/* @__PURE__ */ r.jsx("ul", { children: h.map((b) => {
|
|
2131
|
+
if (!pt[b])
|
|
2103
2132
|
return null;
|
|
2104
|
-
let g = { className:
|
|
2105
|
-
return u ===
|
|
2133
|
+
let g = { className: b };
|
|
2134
|
+
return u === b ? g["aria-label"] = c.formatMessage({ id: `${Ue}selected` }, { language: pt[b] }) : g = {
|
|
2106
2135
|
...g,
|
|
2107
|
-
href: ms(
|
|
2136
|
+
href: ms(b, l),
|
|
2108
2137
|
onClick: (E) => {
|
|
2109
|
-
E.preventDefault(), E.stopPropagation(), f(
|
|
2138
|
+
E.preventDefault(), E.stopPropagation(), f(b), o(b);
|
|
2110
2139
|
}
|
|
2111
|
-
}, /* @__PURE__ */ r.jsx("li", { children: /* @__PURE__ */ r.jsx(
|
|
2140
|
+
}, /* @__PURE__ */ r.jsx("li", { children: /* @__PURE__ */ r.jsx(nt, { ...g, fallbackElement: "span", children: pt[b] }) }, b);
|
|
2112
2141
|
}) }),
|
|
2113
|
-
|
|
2142
|
+
m !== "short" && !_ && /* @__PURE__ */ r.jsx("p", { children: c.formatMessage({ id: `${Ue}translation_${t ? "original" : n ? "human" : "machine"}` }) })
|
|
2114
2143
|
] }),
|
|
2115
|
-
|
|
2144
|
+
m !== "short" && !_ && !t && !n && /* @__PURE__ */ r.jsx("small", {
|
|
2116
2145
|
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
2117
2146
|
// @ts-ignore
|
|
2118
2147
|
// `values` are throwing a type error: https://github.com/formatjs/formatjs/issues/3633
|
|
2119
2148
|
children: c.formatMessage({ id: `${Ue}disclaimer` }, {
|
|
2120
|
-
email:
|
|
2121
|
-
link: (
|
|
2122
|
-
const g = `mailto:${
|
|
2123
|
-
return /* @__PURE__ */ r.jsx("a", { href: g, children:
|
|
2149
|
+
email: Re.support,
|
|
2150
|
+
link: (b) => {
|
|
2151
|
+
const g = `mailto:${b}`;
|
|
2152
|
+
return /* @__PURE__ */ r.jsx("a", { href: g, children: b });
|
|
2124
2153
|
}
|
|
2125
2154
|
})
|
|
2126
2155
|
})
|
|
2127
2156
|
] });
|
|
2128
2157
|
};
|
|
2129
|
-
const
|
|
2158
|
+
const ht = lr({ locale: "en", messages: Nt }), fs = ({
|
|
2130
2159
|
page: e = 1,
|
|
2131
2160
|
length: t = 0,
|
|
2132
2161
|
limit: n = 10,
|
|
@@ -2134,14 +2163,14 @@ const gt = lr({ locale: "en", messages: Dt }), fs = ({
|
|
|
2134
2163
|
},
|
|
2135
2164
|
icon: o = !1,
|
|
2136
2165
|
messages: l = {
|
|
2137
|
-
button:
|
|
2138
|
-
endOfFeed:
|
|
2139
|
-
error:
|
|
2166
|
+
button: ht.formatMessage({ id: "loadMore_button" }),
|
|
2167
|
+
endOfFeed: ht.formatMessage({ id: "loadMore_endOfFeed" }),
|
|
2168
|
+
error: ht.formatMessage({ id: "loadMore_error" })
|
|
2140
2169
|
},
|
|
2141
|
-
className:
|
|
2170
|
+
className: m = "",
|
|
2142
2171
|
gtmContext: a = "LoadMore"
|
|
2143
2172
|
}) => {
|
|
2144
|
-
const [i, c] =
|
|
2173
|
+
const [i, c] = D(!1), [u, f] = D(!1);
|
|
2145
2174
|
if (t <= 0 || t < n * e)
|
|
2146
2175
|
return null;
|
|
2147
2176
|
const p = async (h) => {
|
|
@@ -2151,7 +2180,7 @@ const gt = lr({ locale: "en", messages: Dt }), fs = ({
|
|
|
2151
2180
|
_ instanceof Error && _.message && _.message.includes("Cannot read items") ? f(!0) : c(!0);
|
|
2152
2181
|
}
|
|
2153
2182
|
};
|
|
2154
|
-
return /* @__PURE__ */ r.jsxs("footer", { className: j("load-more",
|
|
2183
|
+
return /* @__PURE__ */ r.jsxs("footer", { className: j("load-more", m), children: [
|
|
2155
2184
|
i && /* @__PURE__ */ r.jsx("p", { className: "error", children: l.error }),
|
|
2156
2185
|
u ? /* @__PURE__ */ r.jsx("p", { children: l.endOfFeed }) : /* @__PURE__ */ r.jsx(
|
|
2157
2186
|
W,
|
|
@@ -2170,7 +2199,7 @@ const gt = lr({ locale: "en", messages: Dt }), fs = ({
|
|
|
2170
2199
|
};
|
|
2171
2200
|
let We = !1;
|
|
2172
2201
|
const ps = ({ element: e = "div", id: t = "more-menu", options: n, className: s = "" }) => {
|
|
2173
|
-
const o =
|
|
2202
|
+
const o = P(), l = Z(null), [m, a] = D(!1), i = (c) => {
|
|
2174
2203
|
l.current && c.target instanceof HTMLElement && !l.current.contains(c.target) && a(!1);
|
|
2175
2204
|
};
|
|
2176
2205
|
return z(() => (document.addEventListener("click", i, !0), () => {
|
|
@@ -2185,15 +2214,15 @@ const ps = ({ element: e = "div", id: t = "more-menu", options: n, className: s
|
|
|
2185
2214
|
variant: "tertiary",
|
|
2186
2215
|
size: "medium",
|
|
2187
2216
|
icon: { icon: "ellipsis" },
|
|
2188
|
-
onClick: () => a(!
|
|
2217
|
+
onClick: () => a(!m),
|
|
2189
2218
|
"aria-haspopup": "true",
|
|
2190
|
-
"aria-expanded":
|
|
2219
|
+
"aria-expanded": m,
|
|
2191
2220
|
"aria-controls": t,
|
|
2192
2221
|
screenreaderText: o.formatMessage({ id: "moreMenu" })
|
|
2193
2222
|
}
|
|
2194
2223
|
),
|
|
2195
|
-
/* @__PURE__ */ r.jsx("ul", { id: t, hidden: !
|
|
2196
|
-
const
|
|
2224
|
+
/* @__PURE__ */ r.jsx("ul", { id: t, hidden: !m, children: n.map(({ href: c, onClick: u, text: f, icon: p, ...h }, _) => {
|
|
2225
|
+
const b = {
|
|
2197
2226
|
...h,
|
|
2198
2227
|
onClick: (g) => {
|
|
2199
2228
|
a(!1), typeof u == "function" && u(g);
|
|
@@ -2207,13 +2236,13 @@ const ps = ({ element: e = "div", id: t = "more-menu", options: n, className: s
|
|
|
2207
2236
|
}, 100);
|
|
2208
2237
|
}
|
|
2209
2238
|
};
|
|
2210
|
-
return c && (
|
|
2239
|
+
return c && (b.href = c), /* @__PURE__ */ r.jsx("li", { children: /* @__PURE__ */ r.jsx(
|
|
2211
2240
|
W,
|
|
2212
2241
|
{
|
|
2213
2242
|
variant: "tertiary",
|
|
2214
2243
|
size: "medium",
|
|
2215
2244
|
icon: p ? { icon: p, position: "left" } : !1,
|
|
2216
|
-
...
|
|
2245
|
+
...b,
|
|
2217
2246
|
children: f
|
|
2218
2247
|
}
|
|
2219
2248
|
) }, `${window.btoa(f)}_${_}`);
|
|
@@ -2221,32 +2250,32 @@ const ps = ({ element: e = "div", id: t = "more-menu", options: n, className: s
|
|
|
2221
2250
|
] })
|
|
2222
2251
|
});
|
|
2223
2252
|
};
|
|
2224
|
-
const jn = ({ variant: e = "default", version: t = "default", className: n = "", ...s }) => /* @__PURE__ */ r.jsx("p", { className: "logo-wrapper", children: /* @__PURE__ */ r.jsx("a", { href: "/home/", className: j("logo", e, t, n), ...s, children: /* @__PURE__ */ r.jsx(
|
|
2253
|
+
const jn = ({ variant: e = "default", version: t = "default", className: n = "", ...s }) => /* @__PURE__ */ r.jsx("p", { className: "logo-wrapper", children: /* @__PURE__ */ r.jsx("a", { href: "/home/", className: j("logo", e, t, n), ...s, children: /* @__PURE__ */ r.jsx(ne, { children: /* @__PURE__ */ r.jsx(we, { id: "apolitical" }) }) }) });
|
|
2225
2254
|
const hs = {
|
|
2226
2255
|
"2-1": 901
|
|
2227
|
-
},
|
|
2228
|
-
const o =
|
|
2256
|
+
}, xo = ({ layout: e = "2-1", hideOnMobile: t = !1, className: n = "", children: s }) => {
|
|
2257
|
+
const o = et(!0);
|
|
2229
2258
|
let l = s;
|
|
2230
|
-
return A.Children.count(s) === 1 && (l = A.Children.toArray(s)[0], l.props && (l = l.props.children)), /* @__PURE__ */ r.jsx("section", { className: j("columns", `layout-${e}`, n), children: A.Children.map(l, (
|
|
2259
|
+
return A.Children.count(s) === 1 && (l = A.Children.toArray(s)[0], l.props && (l = l.props.children)), /* @__PURE__ */ r.jsx("section", { className: j("columns", `layout-${e}`, n), children: A.Children.map(l, (m, a) => t !== !1 && a === t && o && o < hs[e] ? null : m) });
|
|
2231
2260
|
};
|
|
2232
|
-
const
|
|
2233
|
-
const e =
|
|
2234
|
-
|
|
2261
|
+
const gt = "cookieBanner_", _t = ["apol-cookie-banner", "apolitical-performance-cookie-consent", "functional-cookie-consent"], xt = new Date(Date.now() + 12 * 30 * 24 * 60 * 60 * 1e3), gs = () => {
|
|
2262
|
+
const e = P(), [t, n, s] = mr(_t), [o, l] = D(!t["apol-cookie-banner"]), m = () => {
|
|
2263
|
+
_t.forEach((u) => {
|
|
2235
2264
|
n(u, !0, {
|
|
2236
2265
|
path: "/",
|
|
2237
|
-
expires:
|
|
2266
|
+
expires: xt,
|
|
2238
2267
|
domain: u === "apolitical-performance-cookie-consent" ? ".apolitical.co" : void 0
|
|
2239
2268
|
});
|
|
2240
2269
|
}), l(!1), window.location.reload();
|
|
2241
2270
|
}, a = () => {
|
|
2242
2271
|
n("apol-cookie-banner", !0, {
|
|
2243
2272
|
path: "/",
|
|
2244
|
-
expires:
|
|
2245
|
-
}),
|
|
2273
|
+
expires: xt
|
|
2274
|
+
}), _t.forEach((u) => {
|
|
2246
2275
|
if (u === "apol-cookie-banner") {
|
|
2247
2276
|
n(u, !0, {
|
|
2248
2277
|
path: "/",
|
|
2249
|
-
expires:
|
|
2278
|
+
expires: xt
|
|
2250
2279
|
});
|
|
2251
2280
|
return;
|
|
2252
2281
|
}
|
|
@@ -2258,7 +2287,7 @@ const _t = "cookieBanner_", xt = ["apol-cookie-banner", "apolitical-performance-
|
|
|
2258
2287
|
const i = [
|
|
2259
2288
|
{ id: "settings", href: "/pages/cookie-policy", gtmType: "policy-page" },
|
|
2260
2289
|
{ id: "reject", onClick: a, gtmType: "reject-all" },
|
|
2261
|
-
{ id: "accept", onClick:
|
|
2290
|
+
{ id: "accept", onClick: m, gtmType: "accepted-all" }
|
|
2262
2291
|
], c = [];
|
|
2263
2292
|
return i.forEach((u) => {
|
|
2264
2293
|
c.push({
|
|
@@ -2268,14 +2297,14 @@ const _t = "cookieBanner_", xt = ["apol-cookie-banner", "apolitical-performance-
|
|
|
2268
2297
|
className: "gtm-trackable",
|
|
2269
2298
|
"data-gtm-event-context": "cookie-banner",
|
|
2270
2299
|
"data-gtm-event-type": `cookie-${u.gtmType}-click`,
|
|
2271
|
-
children: e.formatMessage({ id: `${
|
|
2300
|
+
children: e.formatMessage({ id: `${gt}buttons_${u.id}` })
|
|
2272
2301
|
});
|
|
2273
2302
|
}), /* @__PURE__ */ r.jsxs("aside", { id: "cookie-banner", className: "text-medium", children: [
|
|
2274
|
-
/* @__PURE__ */ r.jsx("h6", { children: e.formatMessage({ id: `${
|
|
2275
|
-
/* @__PURE__ */ r.jsx("p", { children: e.formatMessage({ id: `${
|
|
2276
|
-
/* @__PURE__ */ r.jsx(
|
|
2303
|
+
/* @__PURE__ */ r.jsx("h6", { children: e.formatMessage({ id: `${gt}title` }) }),
|
|
2304
|
+
/* @__PURE__ */ r.jsx("p", { children: e.formatMessage({ id: `${gt}text` }) }),
|
|
2305
|
+
/* @__PURE__ */ r.jsx(tt, { buttons: c })
|
|
2277
2306
|
] });
|
|
2278
|
-
},
|
|
2307
|
+
}, be = {
|
|
2279
2308
|
platform: {
|
|
2280
2309
|
order: ["events", "courses", "qanda", "articles"],
|
|
2281
2310
|
// An array guarantees the right order
|
|
@@ -2340,11 +2369,11 @@ const _t = "cookieBanner_", xt = ["apol-cookie-banner", "apolitical-performance-
|
|
|
2340
2369
|
text: {
|
|
2341
2370
|
order: ["dataProtection", "euDataProtection"],
|
|
2342
2371
|
dataProtection: {
|
|
2343
|
-
email:
|
|
2372
|
+
email: Re["data-protection"].default,
|
|
2344
2373
|
gtmType: "email-dpo-link"
|
|
2345
2374
|
},
|
|
2346
2375
|
euDataProtection: {
|
|
2347
|
-
email:
|
|
2376
|
+
email: Re["data-protection"].eu,
|
|
2348
2377
|
gtmType: "email-eu-dpo-link"
|
|
2349
2378
|
}
|
|
2350
2379
|
}
|
|
@@ -2356,10 +2385,10 @@ const _t = "cookieBanner_", xt = ["apol-cookie-banner", "apolitical-performance-
|
|
|
2356
2385
|
registered: { address: !0 },
|
|
2357
2386
|
berlin: { address: !0 },
|
|
2358
2387
|
support: {
|
|
2359
|
-
email:
|
|
2388
|
+
email: Re.support,
|
|
2360
2389
|
gtmType: "concierge-email-click"
|
|
2361
2390
|
},
|
|
2362
|
-
business: { email:
|
|
2391
|
+
business: { email: Re.general, gtmType: "hello-email-click" }
|
|
2363
2392
|
}
|
|
2364
2393
|
},
|
|
2365
2394
|
social: {
|
|
@@ -2370,27 +2399,27 @@ const _t = "cookieBanner_", xt = ["apol-cookie-banner", "apolitical-performance-
|
|
|
2370
2399
|
}
|
|
2371
2400
|
};
|
|
2372
2401
|
const Me = "footer_", Je = "SiteFooter", on = ({ group: e }) => {
|
|
2373
|
-
const t =
|
|
2402
|
+
const t = be[e].order || [];
|
|
2374
2403
|
let n = !1;
|
|
2375
|
-
return "text" in
|
|
2404
|
+
return "text" in be[e] && (n = be[e].text), /* @__PURE__ */ r.jsxs(Zt, { children: [
|
|
2376
2405
|
/* @__PURE__ */ r.jsx("p", { className: "pre-title", children: /* @__PURE__ */ r.jsx(we, { id: `${Me}${e}` }) }),
|
|
2377
2406
|
Array.isArray(t) && t.length > 0 && /* @__PURE__ */ r.jsx("ul", { className: "text-medium", children: t.map((s) => {
|
|
2378
2407
|
if (["order", "child", "text"].includes(s))
|
|
2379
2408
|
return null;
|
|
2380
|
-
const { href: o, gtmType: l } =
|
|
2381
|
-
return ["legal"].includes(e) && (
|
|
2409
|
+
const { href: o, gtmType: l } = be[e][s], m = {};
|
|
2410
|
+
return ["legal"].includes(e) && (m.target = "_blank", m.rel = "noopener"), /* @__PURE__ */ r.jsx("li", { children: /* @__PURE__ */ r.jsx(
|
|
2382
2411
|
"a",
|
|
2383
2412
|
{
|
|
2384
2413
|
href: o,
|
|
2385
2414
|
className: "gtm-trackable",
|
|
2386
2415
|
"data-gtm-event-context": Je,
|
|
2387
2416
|
"data-gtm-event-type": l,
|
|
2388
|
-
...
|
|
2417
|
+
...m,
|
|
2389
2418
|
children: /* @__PURE__ */ r.jsx(we, { id: `${Me}${e}_${s}` })
|
|
2390
2419
|
}
|
|
2391
2420
|
) }, `${e}_${s}`);
|
|
2392
2421
|
}) }),
|
|
2393
|
-
typeof n != "boolean" && "order" in n && Array.isArray(n.order) && /* @__PURE__ */ r.jsx("dl", { className: "text-medium", children: n.order.map((s) => /* @__PURE__ */ r.jsxs(
|
|
2422
|
+
typeof n != "boolean" && "order" in n && Array.isArray(n.order) && /* @__PURE__ */ r.jsx("dl", { className: "text-medium", children: n.order.map((s) => /* @__PURE__ */ r.jsxs(Zt, { children: [
|
|
2394
2423
|
/* @__PURE__ */ r.jsx("dt", { children: /* @__PURE__ */ r.jsx(we, { id: `${Me}${e}_${s}` }) }),
|
|
2395
2424
|
/* @__PURE__ */ r.jsxs("dd", { children: [
|
|
2396
2425
|
typeof n != "boolean" && n[s].address && /* @__PURE__ */ r.jsx("address", { children: /* @__PURE__ */ r.jsx(we, { id: `${Me}${e}_${s}_address`, values: { br: /* @__PURE__ */ r.jsx("br", {}) } }) }),
|
|
@@ -2421,12 +2450,12 @@ const Me = "footer_", Je = "SiteFooter", on = ({ group: e }) => {
|
|
|
2421
2450
|
),
|
|
2422
2451
|
/* @__PURE__ */ r.jsx("footer", { children: ["platform", "community", "company", "contact"].map((e) => /* @__PURE__ */ r.jsxs("div", { className: "group", children: [
|
|
2423
2452
|
/* @__PURE__ */ r.jsx(on, { group: e }),
|
|
2424
|
-
Object.keys(
|
|
2453
|
+
Object.keys(be[e]).includes("child") && /* @__PURE__ */ r.jsx(on, { group: be[e].child })
|
|
2425
2454
|
] }, e)) }),
|
|
2426
2455
|
/* @__PURE__ */ r.jsx("hr", {}),
|
|
2427
2456
|
/* @__PURE__ */ r.jsxs("div", { className: "sub-footer", children: [
|
|
2428
|
-
/* @__PURE__ */ r.jsx("ul", { children: Array.isArray(
|
|
2429
|
-
const t =
|
|
2457
|
+
/* @__PURE__ */ r.jsx("ul", { children: Array.isArray(be.social.order) && be.social.order.map((e) => {
|
|
2458
|
+
const t = be.social[e];
|
|
2430
2459
|
return /* @__PURE__ */ r.jsx("li", { className: e, children: /* @__PURE__ */ r.jsx(
|
|
2431
2460
|
"a",
|
|
2432
2461
|
{
|
|
@@ -2444,11 +2473,11 @@ const Me = "footer_", Je = "SiteFooter", on = ({ group: e }) => {
|
|
|
2444
2473
|
] })
|
|
2445
2474
|
] }) });
|
|
2446
2475
|
const ze = "emailHelperTextBox_", bo = ({ type: e, email: t, redirectPath: n, resendVerificationCode: s }) => {
|
|
2447
|
-
const o =
|
|
2476
|
+
const o = P(), [l, m] = D({ path: `${ze}default`, type: "default", link: {}, mail: {}, error: "" }), [a, i] = D(!1), c = Ee(
|
|
2448
2477
|
(h) => {
|
|
2449
2478
|
h.preventDefault(), h.stopPropagation();
|
|
2450
|
-
const _ = (
|
|
2451
|
-
|
|
2479
|
+
const _ = (b) => {
|
|
2480
|
+
m({
|
|
2452
2481
|
path: `${ze}error_verificationFailedToSend`,
|
|
2453
2482
|
type: "error",
|
|
2454
2483
|
link: {
|
|
@@ -2465,7 +2494,7 @@ const ze = "emailHelperTextBox_", bo = ({ type: e, email: t, redirectPath: n, re
|
|
|
2465
2494
|
"data-gtm-event-context": "ErrorVerifyingBox",
|
|
2466
2495
|
"data-gtm-event-type": "email-concierge-click"
|
|
2467
2496
|
},
|
|
2468
|
-
error:
|
|
2497
|
+
error: b
|
|
2469
2498
|
});
|
|
2470
2499
|
};
|
|
2471
2500
|
if (typeof s != "function") {
|
|
@@ -2474,8 +2503,8 @@ const ze = "emailHelperTextBox_", bo = ({ type: e, email: t, redirectPath: n, re
|
|
|
2474
2503
|
}
|
|
2475
2504
|
i(!0), s(t).then(() => {
|
|
2476
2505
|
localStorage.setItem("email", t), window.location.href = n || "/signup/verify-email";
|
|
2477
|
-
}).catch((
|
|
2478
|
-
_(
|
|
2506
|
+
}).catch((b) => {
|
|
2507
|
+
_(b.message);
|
|
2479
2508
|
}).finally(() => {
|
|
2480
2509
|
i(!1);
|
|
2481
2510
|
});
|
|
@@ -2485,13 +2514,13 @@ const ze = "emailHelperTextBox_", bo = ({ type: e, email: t, redirectPath: n, re
|
|
|
2485
2514
|
);
|
|
2486
2515
|
z(
|
|
2487
2516
|
() => {
|
|
2488
|
-
let h = ze, _ = "default",
|
|
2517
|
+
let h = ze, _ = "default", b = {}, g = {};
|
|
2489
2518
|
switch (e) {
|
|
2490
2519
|
case "gov":
|
|
2491
2520
|
h += "autoApproved", _ = "success";
|
|
2492
2521
|
break;
|
|
2493
2522
|
case "nonGov":
|
|
2494
|
-
h += "unrecognisedEmail", _ = "error",
|
|
2523
|
+
h += "unrecognisedEmail", _ = "error", b = {
|
|
2495
2524
|
href: "https://about.apolitical.co/who-can-join-the-community",
|
|
2496
2525
|
"data-gtm-event-context": "NonGovEmailHelperTextBox",
|
|
2497
2526
|
"data-gtm-event-type": "LearnMoreClick"
|
|
@@ -2506,7 +2535,7 @@ const ze = "emailHelperTextBox_", bo = ({ type: e, email: t, redirectPath: n, re
|
|
|
2506
2535
|
};
|
|
2507
2536
|
break;
|
|
2508
2537
|
case "verify":
|
|
2509
|
-
h += "emailUnverified", _ = "error",
|
|
2538
|
+
h += "emailUnverified", _ = "error", b = {
|
|
2510
2539
|
href: "#",
|
|
2511
2540
|
"data-gtm-event-context": "VerifyEmailBox",
|
|
2512
2541
|
"data-gtm-event-type": "SendEmailClick",
|
|
@@ -2516,7 +2545,7 @@ const ze = "emailHelperTextBox_", bo = ({ type: e, email: t, redirectPath: n, re
|
|
|
2516
2545
|
};
|
|
2517
2546
|
break;
|
|
2518
2547
|
case "exists":
|
|
2519
|
-
h += "emailAlreadyExists", _ = "error",
|
|
2548
|
+
h += "emailAlreadyExists", _ = "error", b = {
|
|
2520
2549
|
href: "/user-onboarding/login",
|
|
2521
2550
|
"data-gtm-event-context": "EmailExistsBox",
|
|
2522
2551
|
"data-gtm-event-type": "login-click"
|
|
@@ -2528,14 +2557,14 @@ const ze = "emailHelperTextBox_", bo = ({ type: e, email: t, redirectPath: n, re
|
|
|
2528
2557
|
};
|
|
2529
2558
|
break;
|
|
2530
2559
|
default:
|
|
2531
|
-
h += "default",
|
|
2560
|
+
h += "default", b = {
|
|
2532
2561
|
href: "https://about.apolitical.co/who-can-join-the-community",
|
|
2533
2562
|
"data-gtm-event-context": "DefaultEmailHelperTextBox",
|
|
2534
2563
|
"data-gtm-event-type": "LearnMoreClick"
|
|
2535
2564
|
};
|
|
2536
2565
|
break;
|
|
2537
2566
|
}
|
|
2538
|
-
|
|
2567
|
+
m({ ...l, path: h, type: _, link: b, mail: g });
|
|
2539
2568
|
},
|
|
2540
2569
|
/* eslint-disable react-hooks/exhaustive-deps */
|
|
2541
2570
|
[e]
|
|
@@ -2544,8 +2573,8 @@ const ze = "emailHelperTextBox_", bo = ({ type: e, email: t, redirectPath: n, re
|
|
|
2544
2573
|
return ["link", "mail"].forEach((h) => {
|
|
2545
2574
|
u[h] = Object.keys(l[h]).length ? (_) => /* @__PURE__ */ r.jsx("a", { ...l[h], children: _ }) : (_) => _;
|
|
2546
2575
|
}), /* @__PURE__ */ r.jsx(Ur, { type: l.type, heading: a ? !1 : o.formatMessage({ id: `${l.path}_title` }), children: a ? /* @__PURE__ */ r.jsxs(r.Fragment, { children: [
|
|
2547
|
-
/* @__PURE__ */ r.jsx(
|
|
2548
|
-
/* @__PURE__ */ r.jsx(
|
|
2576
|
+
/* @__PURE__ */ r.jsx(ve, { element: "span" }),
|
|
2577
|
+
/* @__PURE__ */ r.jsx(ve, { element: "span" })
|
|
2549
2578
|
] }) : (
|
|
2550
2579
|
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
2551
2580
|
// @ts-ignore
|
|
@@ -2570,45 +2599,45 @@ const Ve = "passwordRules_", Sn = "isMoreThanEightCharacters", $n = "includesNum
|
|
|
2570
2599
|
[$n]: "numberSymbol",
|
|
2571
2600
|
[Tn]: "lowercaseUppercase"
|
|
2572
2601
|
}, xs = ({ matchingRules: e = { isMoreThanEightCharacters: !1, includesNumberAndSymbol: !1, includesLowerAndUppercase: !1 }, className: t = "" }) => {
|
|
2573
|
-
const n =
|
|
2602
|
+
const n = P();
|
|
2574
2603
|
return /* @__PURE__ */ r.jsxs("aside", { className: j("password-rules", t), children: [
|
|
2575
2604
|
/* @__PURE__ */ r.jsx("small", { children: n.formatMessage({ id: `${Ve}intro` }) }),
|
|
2576
2605
|
/* @__PURE__ */ r.jsx("ul", { children: [Sn, $n, Tn].map((s) => /* @__PURE__ */ r.jsxs("li", { className: j({ matches: e[s] }), children: [
|
|
2577
|
-
/* @__PURE__ */ r.jsxs(
|
|
2606
|
+
/* @__PURE__ */ r.jsxs(ne, { children: [
|
|
2578
2607
|
n.formatMessage({ id: `${Ve}rule_label` }),
|
|
2579
2608
|
" "
|
|
2580
2609
|
] }),
|
|
2581
2610
|
/* @__PURE__ */ r.jsx("span", { children: n.formatMessage({ id: `${Ve}rule_${_s[s]}` }) }),
|
|
2582
|
-
!e[s] && /* @__PURE__ */ r.jsxs(
|
|
2611
|
+
!e[s] && /* @__PURE__ */ r.jsxs(ne, { element: "strong", children: [
|
|
2583
2612
|
" ",
|
|
2584
2613
|
" ",
|
|
2585
2614
|
n.formatMessage({ id: `${Ve}notMet` })
|
|
2586
2615
|
] })
|
|
2587
2616
|
] }, `rule-${s}`)) })
|
|
2588
2617
|
] });
|
|
2589
|
-
},
|
|
2590
|
-
const
|
|
2618
|
+
}, vo = Ae(xs);
|
|
2619
|
+
const wo = ({
|
|
2591
2620
|
text: e = {},
|
|
2592
2621
|
topRating: t = 5,
|
|
2593
2622
|
functions: { createRating: n = () => null, updateRating: s = () => {
|
|
2594
2623
|
}, reportError: o = () => {
|
|
2595
2624
|
} },
|
|
2596
2625
|
className: l = "",
|
|
2597
|
-
hasLoaded:
|
|
2626
|
+
hasLoaded: m = !1
|
|
2598
2627
|
}) => {
|
|
2599
|
-
const a =
|
|
2628
|
+
const a = P(), [i, c] = D({ setUp: !1, id: null, rating: null, disabled: !0 }), u = async () => {
|
|
2600
2629
|
try {
|
|
2601
2630
|
const E = await n();
|
|
2602
|
-
c((
|
|
2631
|
+
c((x) => ({ ...x, setUp: !0, id: E && E.id, disabled: !1 }));
|
|
2603
2632
|
} catch (E) {
|
|
2604
|
-
c((
|
|
2633
|
+
c((x) => ({ ...x, setUp: !0, disabled: !0 })), o(E);
|
|
2605
2634
|
}
|
|
2606
2635
|
};
|
|
2607
2636
|
if (z(() => {
|
|
2608
|
-
|
|
2609
|
-
}, [
|
|
2610
|
-
return /* @__PURE__ */ r.jsx(
|
|
2611
|
-
const { id: f, rating: p, disabled: h } = i, _ = "ratings_",
|
|
2637
|
+
m && !i.setUp && u();
|
|
2638
|
+
}, [m]), !m)
|
|
2639
|
+
return /* @__PURE__ */ r.jsx(ve, { className: "rating-placeholder" });
|
|
2640
|
+
const { id: f, rating: p, disabled: h } = i, _ = "ratings_", b = {
|
|
2612
2641
|
text: a.formatMessage({ id: `${_}text` }),
|
|
2613
2642
|
low: a.formatMessage({ id: `${_}low` }),
|
|
2614
2643
|
high: a.formatMessage({ id: `${_}high` }),
|
|
@@ -2617,37 +2646,37 @@ const ko = ({
|
|
|
2617
2646
|
}, g = async (E) => {
|
|
2618
2647
|
if (!(!f || h))
|
|
2619
2648
|
try {
|
|
2620
|
-
c((
|
|
2621
|
-
} catch (
|
|
2622
|
-
c((
|
|
2649
|
+
c((x) => ({ ...x, rating: E, disabled: !0 })), await s({ id: f, value: E });
|
|
2650
|
+
} catch (x) {
|
|
2651
|
+
c(($) => ({ ...$, rating: null })), o(x);
|
|
2623
2652
|
} finally {
|
|
2624
|
-
c((
|
|
2653
|
+
c((x) => ({ ...x, disabled: !1 }));
|
|
2625
2654
|
}
|
|
2626
2655
|
};
|
|
2627
2656
|
return /* @__PURE__ */ r.jsxs("div", { className: j("rating", l), children: [
|
|
2628
|
-
/* @__PURE__ */ r.jsx("span", { className: "label", children:
|
|
2657
|
+
/* @__PURE__ */ r.jsx("span", { className: "label", children: b[p ? "success" : "text"] }),
|
|
2629
2658
|
/* @__PURE__ */ r.jsx("ol", { children: Array.from(new Array(t).keys()).map((E) => {
|
|
2630
|
-
const
|
|
2631
|
-
return /* @__PURE__ */ r.jsx("li", { className: j({ selected: p &&
|
|
2659
|
+
const x = E + 1;
|
|
2660
|
+
return /* @__PURE__ */ r.jsx("li", { className: j({ selected: p && x <= p }), children: /* @__PURE__ */ r.jsx(
|
|
2632
2661
|
W,
|
|
2633
2662
|
{
|
|
2634
2663
|
variant: "tertiary",
|
|
2635
2664
|
size: "small",
|
|
2636
|
-
icon: { icon: `star${!p ||
|
|
2665
|
+
icon: { icon: `star${!p || x > p ? "_empty" : ""}`, position: "left", hover: "star" },
|
|
2637
2666
|
screenreaderText: `${a.formatMessage(
|
|
2638
2667
|
{ id: `${_}stars` },
|
|
2639
|
-
{ number:
|
|
2640
|
-
)}${
|
|
2641
|
-
onClick: (
|
|
2642
|
-
|
|
2668
|
+
{ number: x, total: t }
|
|
2669
|
+
)}${x === 1 || x === t ? ` - ${b[x === 1 ? "low" : "high"]}` : ""}`,
|
|
2670
|
+
onClick: ($) => {
|
|
2671
|
+
$.preventDefault(), $.stopPropagation(), g(x);
|
|
2643
2672
|
},
|
|
2644
2673
|
disabled: h
|
|
2645
2674
|
}
|
|
2646
|
-
) }, `rating-${
|
|
2675
|
+
) }, `rating-${x}`);
|
|
2647
2676
|
}) })
|
|
2648
2677
|
] });
|
|
2649
2678
|
};
|
|
2650
|
-
const
|
|
2679
|
+
const bs = ({
|
|
2651
2680
|
id: e = "search",
|
|
2652
2681
|
className: t = "",
|
|
2653
2682
|
handleToggle: n = !1,
|
|
@@ -2655,10 +2684,10 @@ const vs = ({
|
|
|
2655
2684
|
gtmContext: o = "search-bar",
|
|
2656
2685
|
gtmEvent: l = "form-submission"
|
|
2657
2686
|
}) => {
|
|
2658
|
-
const { searchIsOpen:
|
|
2687
|
+
const { searchIsOpen: m = !0, isDesktopVersion: a = !1 } = n || {}, i = P(), c = Z(null);
|
|
2659
2688
|
Ce(() => {
|
|
2660
|
-
!n || a || !
|
|
2661
|
-
}, [
|
|
2689
|
+
!n || a || !m || c.current && c.current.focus();
|
|
2690
|
+
}, [m]);
|
|
2662
2691
|
const u = (f) => {
|
|
2663
2692
|
f.preventDefault(), f.stopPropagation(), !(!c.current || !c.current.value || c.current.value.length < 1) && (window.location.href = `/search?search=${encodeURIComponent(c.current.value)}`);
|
|
2664
2693
|
};
|
|
@@ -2669,8 +2698,8 @@ const vs = ({
|
|
|
2669
2698
|
className: j("search-form gtm-trackable", t),
|
|
2670
2699
|
"data-gtm-event-context": o,
|
|
2671
2700
|
"data-gtm-event-type": l,
|
|
2672
|
-
children: /* @__PURE__ */ r.jsx("fieldset", { id: `${e}-form`, hidden: n ? !
|
|
2673
|
-
/* @__PURE__ */ r.jsx(
|
|
2701
|
+
children: /* @__PURE__ */ r.jsx("fieldset", { id: `${e}-form`, hidden: n ? !m : !1, role: "search", children: /* @__PURE__ */ r.jsxs("p", { children: [
|
|
2702
|
+
/* @__PURE__ */ r.jsx(ne, { element: "label", htmlFor: e, children: i.formatMessage({ id: "search_label" }) }),
|
|
2674
2703
|
/* @__PURE__ */ r.jsx(
|
|
2675
2704
|
"input",
|
|
2676
2705
|
{
|
|
@@ -2692,47 +2721,47 @@ const vs = ({
|
|
|
2692
2721
|
onClick: (f) => {
|
|
2693
2722
|
f.preventDefault(), f.stopPropagation(), c.current && c.current.value && (c.current.value = "");
|
|
2694
2723
|
},
|
|
2695
|
-
children: /* @__PURE__ */ r.jsx(
|
|
2724
|
+
children: /* @__PURE__ */ r.jsx(ne, { children: i.formatMessage({ id: "search_clear" }) })
|
|
2696
2725
|
}
|
|
2697
2726
|
),
|
|
2698
|
-
/* @__PURE__ */ r.jsx("button", { className: "search", onClick: u, children: /* @__PURE__ */ r.jsx(
|
|
2727
|
+
/* @__PURE__ */ r.jsx("button", { className: "search", onClick: u, children: /* @__PURE__ */ r.jsx(ne, { children: i.formatMessage({ id: "search_cta" }) }) })
|
|
2699
2728
|
] }) })
|
|
2700
2729
|
}
|
|
2701
2730
|
);
|
|
2702
2731
|
};
|
|
2703
|
-
const
|
|
2732
|
+
const vs = ({
|
|
2704
2733
|
title: e,
|
|
2705
2734
|
label: t,
|
|
2706
2735
|
ctaMessage: n,
|
|
2707
2736
|
titleColor: s,
|
|
2708
2737
|
labelColor: o,
|
|
2709
2738
|
backgroundColor: l,
|
|
2710
|
-
onClose:
|
|
2739
|
+
onClose: m,
|
|
2711
2740
|
reportError: a,
|
|
2712
2741
|
sendInvites: i,
|
|
2713
2742
|
initialFormStatus: c = "NOT_SUBMITTED"
|
|
2714
2743
|
/* NOT_SUBMITTED */
|
|
2715
2744
|
}) => {
|
|
2716
|
-
const [u, f] =
|
|
2745
|
+
const [u, f] = D([]), [p, h] = D(!0), [_, b] = D(c), { formatMessage: g } = P(), E = async (T) => {
|
|
2717
2746
|
T.preventDefault();
|
|
2718
2747
|
try {
|
|
2719
|
-
await i(u), f([]),
|
|
2748
|
+
await i(u), f([]), b(
|
|
2720
2749
|
"SUCCESS"
|
|
2721
2750
|
/* SUCCESS */
|
|
2722
2751
|
);
|
|
2723
2752
|
} catch (M) {
|
|
2724
|
-
|
|
2753
|
+
b(
|
|
2725
2754
|
"ERROR"
|
|
2726
2755
|
/* ERROR */
|
|
2727
2756
|
), a(M);
|
|
2728
2757
|
}
|
|
2729
|
-
},
|
|
2730
|
-
T.preventDefault(),
|
|
2758
|
+
}, x = (T) => {
|
|
2759
|
+
T.preventDefault(), b(
|
|
2731
2760
|
"NOT_SUBMITTED"
|
|
2732
2761
|
/* NOT_SUBMITTED */
|
|
2733
2762
|
), h(!0), f([]);
|
|
2734
|
-
},
|
|
2735
|
-
T.preventDefault(),
|
|
2763
|
+
}, $ = (T) => {
|
|
2764
|
+
T.preventDefault(), m(), b(
|
|
2736
2765
|
"CLOSED"
|
|
2737
2766
|
/* CLOSED */
|
|
2738
2767
|
);
|
|
@@ -2742,11 +2771,11 @@ const bs = ({
|
|
|
2742
2771
|
" ",
|
|
2743
2772
|
g({ id: "inviteForm_error" })
|
|
2744
2773
|
] }) }),
|
|
2745
|
-
/* @__PURE__ */ r.jsx(
|
|
2774
|
+
/* @__PURE__ */ r.jsx(Le, {}),
|
|
2746
2775
|
/* @__PURE__ */ r.jsx("div", { className: "footer", children: _ === "SUCCESS" ? /* @__PURE__ */ r.jsxs(r.Fragment, { children: [
|
|
2747
|
-
/* @__PURE__ */ r.jsx(W, { variant: "secondary", onClick:
|
|
2748
|
-
/* @__PURE__ */ r.jsx(W, { onClick:
|
|
2749
|
-
] }) : /* @__PURE__ */ r.jsx(W, { onClick:
|
|
2776
|
+
/* @__PURE__ */ r.jsx(W, { variant: "secondary", onClick: x, children: g({ id: "inviteForm_ctaSendMoreInvites" }) }),
|
|
2777
|
+
/* @__PURE__ */ r.jsx(W, { onClick: $, children: g({ id: "inviteForm_ctaDone" }) })
|
|
2778
|
+
] }) : /* @__PURE__ */ r.jsx(W, { onClick: x, children: g({ id: "inviteForm_ctaTryAgain" }) }) })
|
|
2750
2779
|
] }) : /* @__PURE__ */ r.jsxs(
|
|
2751
2780
|
"form",
|
|
2752
2781
|
{
|
|
@@ -2787,7 +2816,7 @@ const bs = ({
|
|
|
2787
2816
|
}
|
|
2788
2817
|
)
|
|
2789
2818
|
] }),
|
|
2790
|
-
/* @__PURE__ */ r.jsx(
|
|
2819
|
+
/* @__PURE__ */ r.jsx(Le, {}),
|
|
2791
2820
|
/* @__PURE__ */ r.jsx("fieldset", { className: "footer", children: /* @__PURE__ */ r.jsx(W, { className: "sendEmailsButton", disabled: p, children: n }) })
|
|
2792
2821
|
]
|
|
2793
2822
|
}
|
|
@@ -2800,8 +2829,8 @@ const bs = ({
|
|
|
2800
2829
|
navigation: { loggedIn: 769, loggedOut: 881 },
|
|
2801
2830
|
search: { loggedIn: 961, loggedOut: 1121 }
|
|
2802
2831
|
}, s = (l) => {
|
|
2803
|
-
const
|
|
2804
|
-
return t >= n[l][
|
|
2832
|
+
const m = `logged${e ? "In" : "Out"}`;
|
|
2833
|
+
return t >= n[l][m];
|
|
2805
2834
|
};
|
|
2806
2835
|
let o = {};
|
|
2807
2836
|
return ["navigation", "search"].forEach((l) => {
|
|
@@ -2819,8 +2848,8 @@ const bs = ({
|
|
|
2819
2848
|
return;
|
|
2820
2849
|
I.handlerCalled[e] = o;
|
|
2821
2850
|
let l = [{ type: `menus.${e}`, value: t }];
|
|
2822
|
-
t === !0 && Object.keys(n).forEach((
|
|
2823
|
-
|
|
2851
|
+
t === !0 && Object.keys(n).forEach((m) => {
|
|
2852
|
+
m === e || n[m] === !1 || l.push({ type: `menus.${m}`, value: !1 });
|
|
2824
2853
|
}), s(l);
|
|
2825
2854
|
},
|
|
2826
2855
|
// Find the first child inside a ref that matches the `key` (and optional `value`) we're looking for,
|
|
@@ -2852,7 +2881,7 @@ const bs = ({
|
|
|
2852
2881
|
s[e][l].focus();
|
|
2853
2882
|
return;
|
|
2854
2883
|
}
|
|
2855
|
-
let
|
|
2884
|
+
let m, a;
|
|
2856
2885
|
switch (e) {
|
|
2857
2886
|
case "navigation":
|
|
2858
2887
|
if (n) {
|
|
@@ -2861,20 +2890,20 @@ const bs = ({
|
|
|
2861
2890
|
"attributes.aria-controls",
|
|
2862
2891
|
"navigation"
|
|
2863
2892
|
);
|
|
2864
|
-
|
|
2893
|
+
m = I.findFirstChild(i.children, "href");
|
|
2865
2894
|
} else
|
|
2866
|
-
|
|
2867
|
-
|
|
2895
|
+
m = I.findFirstChild(t.current.children, "href");
|
|
2896
|
+
m || (m = t.current);
|
|
2868
2897
|
break;
|
|
2869
2898
|
case "account":
|
|
2870
2899
|
if (a = I.findFirstChild(t.current.children, "className", "account"), !a || !a.children)
|
|
2871
2900
|
return;
|
|
2872
|
-
|
|
2901
|
+
m = I.findFirstChild(a.children, "href");
|
|
2873
2902
|
break;
|
|
2874
2903
|
default:
|
|
2875
2904
|
return;
|
|
2876
2905
|
}
|
|
2877
|
-
|
|
2906
|
+
m && (o([{ type: `focusElements.${e}.${l}`, value: m }]), m.focus());
|
|
2878
2907
|
},
|
|
2879
2908
|
events: {
|
|
2880
2909
|
onClick: (e, { id: t, callback: n, isOpen: s }) => {
|
|
@@ -2977,7 +3006,7 @@ const bs = ({
|
|
|
2977
3006
|
},
|
|
2978
3007
|
doTrack: l = null
|
|
2979
3008
|
}) => {
|
|
2980
|
-
const
|
|
3009
|
+
const m = P(), a = un(Xe, e);
|
|
2981
3010
|
if (!a || a.onlyShow && (a.onlyShow === "logged-in" && !t || a.onlyShow === "logged-out" && t))
|
|
2982
3011
|
return null;
|
|
2983
3012
|
const i = "doTrack" in a, c = l === null ? i ? a.doTrack : !0 : l, u = e.includes("buttons.");
|
|
@@ -2985,10 +3014,10 @@ const bs = ({
|
|
|
2985
3014
|
a.hasVariantText && (f += `_logged${t ? "In" : "Out"}`);
|
|
2986
3015
|
let p = !1;
|
|
2987
3016
|
if (a.href) {
|
|
2988
|
-
let
|
|
2989
|
-
if (
|
|
2990
|
-
const
|
|
2991
|
-
|
|
3017
|
+
let x = a.gtmType || `${e}-click`;
|
|
3018
|
+
if (x.includes(".")) {
|
|
3019
|
+
const $ = x.split("."), T = $[$.length - 2];
|
|
3020
|
+
x = `${T === "topics" ? `${T}-` : ""}${$[$.length - 1]}`;
|
|
2992
3021
|
}
|
|
2993
3022
|
p = {
|
|
2994
3023
|
href: a.href,
|
|
@@ -2996,7 +3025,7 @@ const bs = ({
|
|
|
2996
3025
|
}, c && (p = {
|
|
2997
3026
|
...p,
|
|
2998
3027
|
className: "gtm-trackable",
|
|
2999
|
-
"data-gtm-event-type":
|
|
3028
|
+
"data-gtm-event-type": x,
|
|
3000
3029
|
"data-gtm-event-context": "HeaderButtons"
|
|
3001
3030
|
}), u && (p = {
|
|
3002
3031
|
...p,
|
|
@@ -3005,55 +3034,55 @@ const bs = ({
|
|
|
3005
3034
|
...a.props || {}
|
|
3006
3035
|
});
|
|
3007
3036
|
}
|
|
3008
|
-
const h = a.order && a.order[0] && a[a.order[0]], _ = h && a[a.order[0]].order,
|
|
3037
|
+
const h = a.order && a.order[0] && a[a.order[0]], _ = h && a[a.order[0]].order, b = p && window.location.pathname === a.href;
|
|
3009
3038
|
let g = {}, E = {};
|
|
3010
3039
|
if (h) {
|
|
3011
|
-
const
|
|
3012
|
-
onClick: (T) => I.events.onClick(T, { id:
|
|
3013
|
-
onFocus: () => I.events.onFocus({ id:
|
|
3014
|
-
onBlur: () => I.events.onBlur({ id:
|
|
3015
|
-
onMouseLeave: () => I.events.onBlur({ id:
|
|
3016
|
-
onMouseEnter: () => I.events.onMouseEnter({ id:
|
|
3040
|
+
const x = a.menuId || e, $ = {
|
|
3041
|
+
onClick: (T) => I.events.onClick(T, { id: x, callback: o, isOpen: s[x] }),
|
|
3042
|
+
onFocus: () => I.events.onFocus({ id: x }),
|
|
3043
|
+
onBlur: () => I.events.onBlur({ id: x, callback: o }),
|
|
3044
|
+
onMouseLeave: () => I.events.onBlur({ id: x, callback: o }),
|
|
3045
|
+
onMouseEnter: () => I.events.onMouseEnter({ id: x, callback: o })
|
|
3017
3046
|
};
|
|
3018
3047
|
n && (_ && (g = {
|
|
3019
|
-
|
|
3048
|
+
...$,
|
|
3020
3049
|
onKeyPress: (T) => {
|
|
3021
|
-
T.key === "Enter" && I.events.onClick(T, { id:
|
|
3050
|
+
T.key === "Enter" && I.events.onClick(T, { id: x, callback: o, isOpen: s[x] });
|
|
3022
3051
|
},
|
|
3023
3052
|
tabIndex: "0",
|
|
3024
3053
|
// Add a `tabIndex` so keyboard users can focus on the `li`
|
|
3025
3054
|
"aria-haspopup": !0,
|
|
3026
|
-
"aria-expanded": s[
|
|
3027
|
-
"aria-controls":
|
|
3028
|
-
}), E = { hidden:
|
|
3055
|
+
"aria-expanded": s[x],
|
|
3056
|
+
"aria-controls": x
|
|
3057
|
+
}), E = { hidden: x in s ? !s[x] : !0 }), _ || (E = {
|
|
3029
3058
|
...E,
|
|
3030
|
-
|
|
3059
|
+
...$
|
|
3031
3060
|
});
|
|
3032
3061
|
}
|
|
3033
|
-
return /* @__PURE__ */ r.jsxs("li", { className: j({ [a.className]: a.className, "has-submenu": h, parent: _, active:
|
|
3034
|
-
p ? A.createElement(u ? W : "a", p,
|
|
3035
|
-
a.order && /* @__PURE__ */ r.jsx("ul", { ...E, children: a.order.map((
|
|
3036
|
-
if (!a[
|
|
3062
|
+
return /* @__PURE__ */ r.jsxs("li", { className: j({ [a.className]: a.className, "has-submenu": h, parent: _, active: b }), role: "none", ...g, children: [
|
|
3063
|
+
p ? A.createElement(u ? W : "a", p, m.formatMessage({ id: f })) : m.formatMessage({ id: f }),
|
|
3064
|
+
a.order && /* @__PURE__ */ r.jsx("ul", { ...E, children: a.order.map((x) => {
|
|
3065
|
+
if (!a[x])
|
|
3037
3066
|
return null;
|
|
3038
|
-
const
|
|
3067
|
+
const $ = {
|
|
3039
3068
|
isLoggedIn: t,
|
|
3040
3069
|
isDesktopVersion: n,
|
|
3041
3070
|
menus: s,
|
|
3042
3071
|
callback: o,
|
|
3043
3072
|
doTrack: i ? c : null
|
|
3044
3073
|
};
|
|
3045
|
-
return a[
|
|
3046
|
-
|
|
3047
|
-
/* @__PURE__ */ r.jsx("ul", { children: a[
|
|
3048
|
-
] },
|
|
3074
|
+
return a[x].order ? /* @__PURE__ */ r.jsxs("li", { className: j({ [a[x].className]: a[x].className }), children: [
|
|
3075
|
+
m.formatMessage({ id: `${f}_${x}` }),
|
|
3076
|
+
/* @__PURE__ */ r.jsx("ul", { children: a[x].order.map((T) => /* @__PURE__ */ r.jsx(Ze, { id: `${e}.${x}.${T}`, ...$ }, T)) })
|
|
3077
|
+
] }, x) : /* @__PURE__ */ r.jsx(Ze, { id: `${e}.${x}`, ...$ }, x);
|
|
3049
3078
|
}) })
|
|
3050
3079
|
] }, e);
|
|
3051
3080
|
};
|
|
3052
3081
|
const ws = { height: 67, height_desktop: 83 }, Mn = () => {
|
|
3053
|
-
const e =
|
|
3082
|
+
const e = P(), t = ye(je), n = et(!0, !0), s = t && typeof t.id == "string", o = qe(
|
|
3054
3083
|
() => I.getIsDesktopVersion(s, n),
|
|
3055
3084
|
[s, n]
|
|
3056
|
-
), [l,
|
|
3085
|
+
), [l, m] = rr($r, {
|
|
3057
3086
|
headerIsVisible: !0,
|
|
3058
3087
|
menus: { navigation: !1, search: !1, account: !1 },
|
|
3059
3088
|
focusElements: {
|
|
@@ -3065,23 +3094,23 @@ const ws = { height: 67, height_desktop: 83 }, Mn = () => {
|
|
|
3065
3094
|
scrollPosition: ws[`height${o.navigation ? "_desktop" : ""}`],
|
|
3066
3095
|
callbacks: {
|
|
3067
3096
|
scrollUp: () => {
|
|
3068
|
-
!o && i.navigation || I.shouldChangeHeaderIsVisible(!0, i,
|
|
3097
|
+
!o && i.navigation || I.shouldChangeHeaderIsVisible(!0, i, m);
|
|
3069
3098
|
},
|
|
3070
3099
|
scrollDown: () => {
|
|
3071
|
-
!o && i.navigation || I.shouldChangeHeaderIsVisible(!1, i,
|
|
3100
|
+
!o && i.navigation || I.shouldChangeHeaderIsVisible(!1, i, m);
|
|
3072
3101
|
}
|
|
3073
3102
|
}
|
|
3074
3103
|
});
|
|
3075
3104
|
const u = (p, h) => {
|
|
3076
|
-
I.handleMenus({ id: p, value: h, menus: i, dispatch:
|
|
3077
|
-
}, f =
|
|
3105
|
+
I.handleMenus({ id: p, value: h, menus: i, dispatch: m });
|
|
3106
|
+
}, f = Z(null);
|
|
3078
3107
|
return Ce(() => {
|
|
3079
3108
|
i.navigation && I.autoFocus({
|
|
3080
3109
|
menu: "navigation",
|
|
3081
3110
|
navigationRef: f,
|
|
3082
3111
|
isDesktopVersion: o.navigation,
|
|
3083
3112
|
focusElements: c,
|
|
3084
|
-
dispatch:
|
|
3113
|
+
dispatch: m
|
|
3085
3114
|
});
|
|
3086
3115
|
}, [i.navigation]), Ce(() => {
|
|
3087
3116
|
i.account && I.autoFocus({
|
|
@@ -3089,11 +3118,11 @@ const ws = { height: 67, height_desktop: 83 }, Mn = () => {
|
|
|
3089
3118
|
navigationRef: f,
|
|
3090
3119
|
isDesktopVersion: o.navigation,
|
|
3091
3120
|
focusElements: c,
|
|
3092
|
-
dispatch:
|
|
3121
|
+
dispatch: m
|
|
3093
3122
|
});
|
|
3094
3123
|
}, [i.account]), t && t.isLoading ? null : /* @__PURE__ */ r.jsxs(r.Fragment, { children: [
|
|
3095
3124
|
/* @__PURE__ */ r.jsxs("nav", { id: "header", className: j({ "logged-in": s, "logged-out": !s, visible: a }), children: [
|
|
3096
|
-
/* @__PURE__ */ r.jsx(
|
|
3125
|
+
/* @__PURE__ */ r.jsx(ne, { element: "a", href: "#content-of-page", children: e.formatMessage({ id: "header_skip" }) }),
|
|
3097
3126
|
/* @__PURE__ */ r.jsx(jn, {}),
|
|
3098
3127
|
!o.navigation && /* @__PURE__ */ r.jsx(
|
|
3099
3128
|
"button",
|
|
@@ -3107,7 +3136,7 @@ const ws = { height: 67, height_desktop: 83 }, Mn = () => {
|
|
|
3107
3136
|
"aria-haspopup": "true",
|
|
3108
3137
|
"aria-expanded": i.navigation,
|
|
3109
3138
|
"aria-controls": "navigation",
|
|
3110
|
-
children: /* @__PURE__ */ r.jsx(
|
|
3139
|
+
children: /* @__PURE__ */ r.jsx(ne, { children: e.formatMessage({ id: `header_menu_${i.navigation ? "hide" : "show"}` }) })
|
|
3111
3140
|
}
|
|
3112
3141
|
),
|
|
3113
3142
|
/* @__PURE__ */ r.jsx(
|
|
@@ -3141,11 +3170,11 @@ const ws = { height: 67, height_desktop: 83 }, Mn = () => {
|
|
|
3141
3170
|
"aria-haspopup": "true",
|
|
3142
3171
|
"aria-expanded": i.search,
|
|
3143
3172
|
"aria-controls": "search-form",
|
|
3144
|
-
children: /* @__PURE__ */ r.jsx(
|
|
3173
|
+
children: /* @__PURE__ */ r.jsx(ne, { children: e.formatMessage({ id: `header_search_${i.search ? "hide" : "show"}` }) })
|
|
3145
3174
|
}
|
|
3146
3175
|
),
|
|
3147
3176
|
/* @__PURE__ */ r.jsx(
|
|
3148
|
-
|
|
3177
|
+
bs,
|
|
3149
3178
|
{
|
|
3150
3179
|
id: "global-search",
|
|
3151
3180
|
handleToggle: { searchIsOpen: i.search, isDesktopVersion: o.search },
|
|
@@ -3164,8 +3193,8 @@ const ws = { height: 67, height_desktop: 83 }, Mn = () => {
|
|
|
3164
3193
|
"aria-expanded": i.account,
|
|
3165
3194
|
"aria-controls": "navigation",
|
|
3166
3195
|
children: [
|
|
3167
|
-
/* @__PURE__ */ r.jsx(
|
|
3168
|
-
/* @__PURE__ */ r.jsx(
|
|
3196
|
+
/* @__PURE__ */ r.jsx(ne, { children: e.formatMessage({ id: `header_account_${i.account ? "hide" : "show"}` }) }),
|
|
3197
|
+
/* @__PURE__ */ r.jsx(Dt, { name: t && t.name || "", src: t && t.image && t.image.thumbnail || "" })
|
|
3169
3198
|
]
|
|
3170
3199
|
}
|
|
3171
3200
|
) : /* @__PURE__ */ r.jsx("ul", { className: "sign-in-buttons", children: Xe.buttons.order.map((p) => /* @__PURE__ */ r.jsx(Ze, { id: `buttons.${p}` }, p)) })
|
|
@@ -3180,21 +3209,21 @@ const ws = { height: 67, height_desktop: 83 }, Mn = () => {
|
|
|
3180
3209
|
] });
|
|
3181
3210
|
};
|
|
3182
3211
|
const ks = () => {
|
|
3183
|
-
const e =
|
|
3212
|
+
const e = P();
|
|
3184
3213
|
return /* @__PURE__ */ r.jsxs(r.Fragment, { children: [
|
|
3185
3214
|
/* @__PURE__ */ r.jsx(Mn, {}),
|
|
3186
|
-
/* @__PURE__ */ r.jsx("div", {
|
|
3215
|
+
/* @__PURE__ */ r.jsx("div", { id: "content", children: /* @__PURE__ */ r.jsx(rt, { variant: "error", text: e.formatMessage({ id: "pageLayout_error" }) }) }),
|
|
3187
3216
|
/* @__PURE__ */ r.jsx(En, {})
|
|
3188
3217
|
] });
|
|
3189
|
-
},
|
|
3190
|
-
const
|
|
3218
|
+
}, ko = ({ children: e, reportError: t, showFooter: n = !0, background: s = "default", className: o = "", locale: l = "en" }) => {
|
|
3219
|
+
const m = jr();
|
|
3191
3220
|
z(() => {
|
|
3192
3221
|
window.scrollTo(0, 0);
|
|
3193
|
-
}, [
|
|
3222
|
+
}, [m]);
|
|
3194
3223
|
const a = gn(e, { locale: l });
|
|
3195
3224
|
return /* @__PURE__ */ r.jsx(hr, { onError: t, fallback: /* @__PURE__ */ r.jsx(ks, {}), children: /* @__PURE__ */ r.jsx(sr, { fallback: /* @__PURE__ */ r.jsx(ns, { layout: "overview-page" }), children: /* @__PURE__ */ r.jsx("div", { id: "wrapper", className: j(o, { [s]: s !== "default" }), children: /* @__PURE__ */ r.jsxs(fr, { children: [
|
|
3196
3225
|
/* @__PURE__ */ r.jsx(Mn, {}),
|
|
3197
|
-
/* @__PURE__ */ r.jsx("div", {
|
|
3226
|
+
/* @__PURE__ */ r.jsx("div", { id: "content", children: a }),
|
|
3198
3227
|
n && /* @__PURE__ */ r.jsx(En, {}),
|
|
3199
3228
|
/* @__PURE__ */ r.jsx(gs, {})
|
|
3200
3229
|
] }) }) }) });
|
|
@@ -3229,16 +3258,16 @@ const ks = () => {
|
|
|
3229
3258
|
return bt[e] ? (e = bt[e], { id: e, text: `${an.default}${e}` }) : null;
|
|
3230
3259
|
}
|
|
3231
3260
|
};
|
|
3232
|
-
const
|
|
3261
|
+
const yo = ({
|
|
3233
3262
|
tags: e = [],
|
|
3234
3263
|
color: t = "default",
|
|
3235
3264
|
forceOneLine: n = !1,
|
|
3236
3265
|
canHaveLinks: s = !0,
|
|
3237
3266
|
className: o = "",
|
|
3238
3267
|
gtmType: l = "tag-click",
|
|
3239
|
-
gtmContext:
|
|
3268
|
+
gtmContext: m = "tags"
|
|
3240
3269
|
}) => {
|
|
3241
|
-
const a =
|
|
3270
|
+
const a = P();
|
|
3242
3271
|
if (!e || e.length < 1)
|
|
3243
3272
|
return null;
|
|
3244
3273
|
const i = [];
|
|
@@ -3255,28 +3284,28 @@ const jo = ({
|
|
|
3255
3284
|
href: c.href,
|
|
3256
3285
|
className: "gtm-trackable",
|
|
3257
3286
|
"data-gtm-event-type": l,
|
|
3258
|
-
"data-gtm-event-context":
|
|
3287
|
+
"data-gtm-event-context": m,
|
|
3259
3288
|
children: u
|
|
3260
3289
|
}
|
|
3261
3290
|
) : u }, c.id);
|
|
3262
3291
|
}) });
|
|
3263
3292
|
};
|
|
3264
|
-
const
|
|
3293
|
+
const jo = ({
|
|
3265
3294
|
members: { total: e, data: t = [] },
|
|
3266
3295
|
pagination: n,
|
|
3267
3296
|
gtmContext: s = "member",
|
|
3268
3297
|
gtmType: o = "member-click",
|
|
3269
3298
|
className: l = ""
|
|
3270
3299
|
}) => {
|
|
3271
|
-
const
|
|
3300
|
+
const m = P();
|
|
3272
3301
|
return t.length === 0 ? null : (e || (e = t.length), /* @__PURE__ */ r.jsxs("div", { className: j("members-list", l), children: [
|
|
3273
3302
|
/* @__PURE__ */ r.jsxs("h1", { children: [
|
|
3274
|
-
|
|
3303
|
+
m.formatMessage({ id: "membersList" }),
|
|
3275
3304
|
/* @__PURE__ */ r.jsx("span", { className: "count", children: e })
|
|
3276
3305
|
] }),
|
|
3277
3306
|
/* @__PURE__ */ r.jsx("ul", { children: t.map((a, i) => /* @__PURE__ */ r.jsxs("li", { children: [
|
|
3278
|
-
/* @__PURE__ */ r.jsx(
|
|
3279
|
-
a.isAdmin && /* @__PURE__ */ r.jsx(qr, { children:
|
|
3307
|
+
/* @__PURE__ */ r.jsx(Pt, { member: a, gtmContext: s, gtmType: o }),
|
|
3308
|
+
a.isAdmin && /* @__PURE__ */ r.jsx(qr, { children: m.formatMessage({ id: "membersList_admin" }) })
|
|
3280
3309
|
] }, i)) }),
|
|
3281
3310
|
n && /* @__PURE__ */ r.jsx(
|
|
3282
3311
|
fs,
|
|
@@ -3301,7 +3330,7 @@ const ae = "discussion_form_", Cn = ({
|
|
|
3301
3330
|
inputRef: s,
|
|
3302
3331
|
maxLength: o = 5e4,
|
|
3303
3332
|
minRows: l = 4,
|
|
3304
|
-
forceShow:
|
|
3333
|
+
forceShow: m = {
|
|
3305
3334
|
cancel: !1,
|
|
3306
3335
|
error: !1
|
|
3307
3336
|
},
|
|
@@ -3320,116 +3349,116 @@ const ae = "discussion_form_", Cn = ({
|
|
|
3320
3349
|
},
|
|
3321
3350
|
gtmContext: i = "DiscussionForm"
|
|
3322
3351
|
}) => {
|
|
3323
|
-
var
|
|
3324
|
-
const c =
|
|
3352
|
+
var F, q;
|
|
3353
|
+
const c = P(), u = ye(je), [f, p] = D(
|
|
3325
3354
|
n.isEditing && n.isEditing.text || ""
|
|
3326
|
-
), [h, _] =
|
|
3355
|
+
), [h, _] = D(m.error || !1), [b, g] = D(!1), E = Z(null);
|
|
3327
3356
|
if (s || (s = E), n.isLoading)
|
|
3328
3357
|
return /* @__PURE__ */ r.jsx(
|
|
3329
|
-
|
|
3358
|
+
ve,
|
|
3330
3359
|
{
|
|
3331
3360
|
className: "discussion-card discussion-form",
|
|
3332
3361
|
"data-testid": "loading-placeholder"
|
|
3333
3362
|
}
|
|
3334
3363
|
);
|
|
3335
|
-
const
|
|
3336
|
-
const
|
|
3337
|
-
p(
|
|
3338
|
-
let
|
|
3339
|
-
!u || !u.id ?
|
|
3364
|
+
const x = (k) => {
|
|
3365
|
+
const Y = k.target.value;
|
|
3366
|
+
p(Y);
|
|
3367
|
+
let B;
|
|
3368
|
+
!u || !u.id ? B = he(
|
|
3340
3369
|
c.formatMessage,
|
|
3341
3370
|
`${ae}error_loggedOut`,
|
|
3342
3371
|
e.type,
|
|
3343
3372
|
"action"
|
|
3344
|
-
) : t ?
|
|
3373
|
+
) : t ? Y.length >= o && (B = `${ae}error_tooLong`) : B = he(
|
|
3345
3374
|
c.formatMessage,
|
|
3346
3375
|
`${ae}error_noPermission`,
|
|
3347
3376
|
e.type,
|
|
3348
3377
|
"action"
|
|
3349
|
-
),
|
|
3378
|
+
), B ? _(B) : h && _(!1);
|
|
3350
3379
|
};
|
|
3351
|
-
let
|
|
3380
|
+
let $ = `${e.type}-form`;
|
|
3352
3381
|
if (e.type === "response" || e.type === "reply") {
|
|
3353
|
-
const
|
|
3354
|
-
|
|
3382
|
+
const k = e.type === "response" ? ((F = e.slugs) == null ? void 0 : F.question) || "" : ((q = e.slugs) == null ? void 0 : q.answer) || "";
|
|
3383
|
+
k && ($ = `${$}-${k.slice(-15)}`);
|
|
3355
3384
|
}
|
|
3356
|
-
const T = async (
|
|
3357
|
-
var
|
|
3358
|
-
if (
|
|
3385
|
+
const T = async (k) => {
|
|
3386
|
+
var B;
|
|
3387
|
+
if (k.preventDefault(), k.stopPropagation(), !u || !u.id || !t || Q)
|
|
3359
3388
|
return;
|
|
3360
3389
|
Ye && clearTimeout(Ye), g("submitting");
|
|
3361
|
-
const
|
|
3390
|
+
const Y = window.location.pathname;
|
|
3362
3391
|
try {
|
|
3363
|
-
let
|
|
3392
|
+
let L;
|
|
3364
3393
|
switch (e.type) {
|
|
3365
3394
|
case "post":
|
|
3366
|
-
|
|
3395
|
+
L = await a.create({ content: f });
|
|
3367
3396
|
break;
|
|
3368
3397
|
case "question":
|
|
3369
|
-
|
|
3398
|
+
L = await a.create({
|
|
3370
3399
|
title: f,
|
|
3371
3400
|
authorId: u && u.id,
|
|
3372
|
-
...(
|
|
3401
|
+
...(B = a.props) == null ? void 0 : B.create
|
|
3373
3402
|
});
|
|
3374
3403
|
break;
|
|
3375
3404
|
case "response":
|
|
3376
|
-
|
|
3405
|
+
L = await a.create(
|
|
3377
3406
|
{ question: e.slugs.question },
|
|
3378
|
-
{ body: f, authorId: u && u.id, contentPath:
|
|
3407
|
+
{ body: f, authorId: u && u.id, contentPath: Y }
|
|
3379
3408
|
);
|
|
3380
3409
|
break;
|
|
3381
3410
|
case "reply":
|
|
3382
|
-
|
|
3411
|
+
L = await a.create(
|
|
3383
3412
|
{ question: e.slugs.question, answer: e.slugs.answer },
|
|
3384
|
-
{ body: f, authorId: u && u.id, contentPath:
|
|
3413
|
+
{ body: f, authorId: u && u.id, contentPath: Y }
|
|
3385
3414
|
);
|
|
3386
3415
|
break;
|
|
3387
3416
|
default:
|
|
3388
3417
|
break;
|
|
3389
3418
|
}
|
|
3390
|
-
await Cr(1e3), a.callback && await a.callback(
|
|
3419
|
+
await Cr(1e3), a.callback && await a.callback(L), Ye = setTimeout(() => {
|
|
3391
3420
|
p(""), g("submitted"), M();
|
|
3392
3421
|
}, 500);
|
|
3393
|
-
} catch (
|
|
3394
|
-
const U =
|
|
3395
|
-
let
|
|
3396
|
-
U.message.includes("entry already exists") && (
|
|
3422
|
+
} catch (L) {
|
|
3423
|
+
const U = L;
|
|
3424
|
+
let G = `${ae}error`;
|
|
3425
|
+
U.message.includes("entry already exists") && (G = he(
|
|
3397
3426
|
c.formatMessage,
|
|
3398
3427
|
`${ae}error_alreadyExists`,
|
|
3399
3428
|
e.type,
|
|
3400
3429
|
"action"
|
|
3401
|
-
)), U.message.includes("429") ?
|
|
3430
|
+
)), U.message.includes("429") ? G = he(
|
|
3402
3431
|
c.formatMessage,
|
|
3403
3432
|
`${ae}error_tooMany`,
|
|
3404
3433
|
e.type,
|
|
3405
3434
|
"action"
|
|
3406
|
-
) : U.message.includes("400") && (
|
|
3435
|
+
) : U.message.includes("400") && (G = `${ae}error`), _(G), M();
|
|
3407
3436
|
}
|
|
3408
3437
|
}, M = () => {
|
|
3409
3438
|
Ye = setTimeout(() => {
|
|
3410
3439
|
_(!1), g(!1);
|
|
3411
3440
|
}, 5e3);
|
|
3412
|
-
}, Q = !f || !Rr(f), V =
|
|
3413
|
-
return (n.isEditing && !V ||
|
|
3441
|
+
}, Q = !f || !Rr(f), V = b === "submitting", w = [];
|
|
3442
|
+
return (n.isEditing && !V || m.cancel) && w.push({
|
|
3414
3443
|
variant: "secondary",
|
|
3415
3444
|
size: { mobile: "small", 600: "medium" },
|
|
3416
3445
|
onClick: a.handleCancel,
|
|
3417
3446
|
className: "gtm-trackable",
|
|
3418
3447
|
"data-gtm-event-context": i,
|
|
3419
3448
|
"data-gtm-event-type": `cancel-${e.type}-click`,
|
|
3420
|
-
disabled: !
|
|
3449
|
+
disabled: !m.cancel && (!u || !u.id || !f),
|
|
3421
3450
|
children: c.formatMessage({ id: `${ae}cancel` })
|
|
3422
|
-
}),
|
|
3451
|
+
}), w.push({
|
|
3423
3452
|
variant: "primary",
|
|
3424
3453
|
size: { mobile: "small", 600: "medium" },
|
|
3425
|
-
onClick: (
|
|
3454
|
+
onClick: (k) => {
|
|
3426
3455
|
if (n.isEditing) {
|
|
3427
3456
|
g("submitting"), a.handleSaveEdit && a.handleSaveEdit(
|
|
3428
3457
|
E.current && "value" in E.current ? E.current.value : ""
|
|
3429
3458
|
);
|
|
3430
3459
|
return;
|
|
3431
3460
|
}
|
|
3432
|
-
T(
|
|
3461
|
+
T(k);
|
|
3433
3462
|
},
|
|
3434
3463
|
className: "gtm-trackable",
|
|
3435
3464
|
"data-gtm-event-context": i,
|
|
@@ -3442,7 +3471,7 @@ const ae = "discussion_form_", Cn = ({
|
|
|
3442
3471
|
}), /* @__PURE__ */ r.jsxs(
|
|
3443
3472
|
"form",
|
|
3444
3473
|
{
|
|
3445
|
-
id:
|
|
3474
|
+
id: $,
|
|
3446
3475
|
className: j("discussion-card discussion-form", {
|
|
3447
3476
|
"no-styling": n.isInWrapper && n.isEditing
|
|
3448
3477
|
}),
|
|
@@ -3450,19 +3479,19 @@ const ae = "discussion_form_", Cn = ({
|
|
|
3450
3479
|
children: [
|
|
3451
3480
|
(n == null ? void 0 : n.showTitle) && !n.isEditing && ["question"].includes(e.type) && /* @__PURE__ */ r.jsx("h2", { children: he(c.formatMessage, `${ae}title`, e.type, "action") }),
|
|
3452
3481
|
/* @__PURE__ */ r.jsx(
|
|
3453
|
-
|
|
3482
|
+
Pt,
|
|
3454
3483
|
{
|
|
3455
3484
|
member: u || "community",
|
|
3456
3485
|
gtmContext: i,
|
|
3457
3486
|
gtmType: "profile-click"
|
|
3458
3487
|
}
|
|
3459
3488
|
),
|
|
3460
|
-
/* @__PURE__ */ r.jsx(
|
|
3489
|
+
/* @__PURE__ */ r.jsx(ne, { element: "label", showOnFocus: !1, htmlFor: `${$}-input`, children: he(c.formatMessage, `${ae}label`, e.type, "action") }),
|
|
3461
3490
|
/* @__PURE__ */ r.jsx(
|
|
3462
3491
|
gr,
|
|
3463
3492
|
{
|
|
3464
3493
|
ref: s,
|
|
3465
|
-
id: `${
|
|
3494
|
+
id: `${$}-input`,
|
|
3466
3495
|
name: e.type,
|
|
3467
3496
|
placeholder: he(
|
|
3468
3497
|
c.formatMessage,
|
|
@@ -3470,7 +3499,7 @@ const ae = "discussion_form_", Cn = ({
|
|
|
3470
3499
|
e.type,
|
|
3471
3500
|
"action"
|
|
3472
3501
|
),
|
|
3473
|
-
onChange:
|
|
3502
|
+
onChange: x,
|
|
3474
3503
|
value: f,
|
|
3475
3504
|
maxLength: o,
|
|
3476
3505
|
"aria-invalid": !!h,
|
|
@@ -3480,7 +3509,7 @@ const ae = "discussion_form_", Cn = ({
|
|
|
3480
3509
|
}
|
|
3481
3510
|
),
|
|
3482
3511
|
/* @__PURE__ */ r.jsx("small", { children: he(c.formatMessage, `${ae}explainer`, e.type, "action", {
|
|
3483
|
-
a: (
|
|
3512
|
+
a: (k) => /* @__PURE__ */ r.jsx(
|
|
3484
3513
|
"a",
|
|
3485
3514
|
{
|
|
3486
3515
|
href: "https://about.apolitical.co/q-and-a-community-guidelines",
|
|
@@ -3489,13 +3518,13 @@ const ae = "discussion_form_", Cn = ({
|
|
|
3489
3518
|
"data-gtm-event-context": i,
|
|
3490
3519
|
"data-gtm-event-type": "community-guidelines-link",
|
|
3491
3520
|
rel: "noreferrer",
|
|
3492
|
-
children:
|
|
3521
|
+
children: k
|
|
3493
3522
|
}
|
|
3494
3523
|
)
|
|
3495
3524
|
}) }),
|
|
3496
|
-
/* @__PURE__ */ r.jsx(
|
|
3497
|
-
|
|
3498
|
-
h && /* @__PURE__ */ r.jsx(
|
|
3525
|
+
/* @__PURE__ */ r.jsx(tt, { buttons: w }),
|
|
3526
|
+
b === "submitted" && /* @__PURE__ */ r.jsx($t, { className: "success", "data-testid": "success", children: he(c.formatMessage, `${ae}success`, e.type, "action") }),
|
|
3527
|
+
h && /* @__PURE__ */ r.jsx($t, { id: "error-message", className: "error", "data-testid": "error", children: m.error ? m.error : typeof h == "string" ? h.includes(" ") ? h : c.formatMessage(
|
|
3499
3528
|
{ id: h },
|
|
3500
3529
|
{
|
|
3501
3530
|
action: c.formatMessage({
|
|
@@ -3507,14 +3536,14 @@ const ae = "discussion_form_", Cn = ({
|
|
|
3507
3536
|
]
|
|
3508
3537
|
}
|
|
3509
3538
|
);
|
|
3510
|
-
},
|
|
3539
|
+
}, An = ({
|
|
3511
3540
|
contentType: e,
|
|
3512
3541
|
createPost: t,
|
|
3513
|
-
membershipRequiredToPost: { isMember: n, required: s, join: o, leave: l, notMemberStateText:
|
|
3542
|
+
membershipRequiredToPost: { isMember: n, required: s, join: o, leave: l, notMemberStateText: m }
|
|
3514
3543
|
}) => s && !n ? /* @__PURE__ */ r.jsx(
|
|
3515
|
-
|
|
3544
|
+
rt,
|
|
3516
3545
|
{
|
|
3517
|
-
text:
|
|
3546
|
+
text: m,
|
|
3518
3547
|
button: {
|
|
3519
3548
|
component: /* @__PURE__ */ r.jsx(yn, { functions: { join: o, leave: l } })
|
|
3520
3549
|
}
|
|
@@ -3530,12 +3559,12 @@ const ae = "discussion_form_", Cn = ({
|
|
|
3530
3559
|
), js = {
|
|
3531
3560
|
showThread: !1,
|
|
3532
3561
|
showForm: !1
|
|
3533
|
-
},
|
|
3534
|
-
const [t, n] =
|
|
3562
|
+
}, Nn = Mt(js), Eo = ({ children: e }) => {
|
|
3563
|
+
const [t, n] = D({
|
|
3535
3564
|
showThread: !1,
|
|
3536
3565
|
showForm: !1
|
|
3537
3566
|
});
|
|
3538
|
-
return /* @__PURE__ */ r.jsx(
|
|
3567
|
+
return /* @__PURE__ */ r.jsx(Nn.Provider, { value: { ...t, updateConversation: n }, children: e });
|
|
3539
3568
|
}, Es = ({
|
|
3540
3569
|
question: e,
|
|
3541
3570
|
answer: t,
|
|
@@ -3545,36 +3574,36 @@ const ae = "discussion_form_", Cn = ({
|
|
|
3545
3574
|
...t && { answerSlug: t },
|
|
3546
3575
|
...n && { replySlug: n }
|
|
3547
3576
|
}), Ss = (e, t = 10) => !e || e.length === 0 ? [] : e.slice(0, t);
|
|
3548
|
-
let
|
|
3549
|
-
const
|
|
3550
|
-
|
|
3551
|
-
},
|
|
3577
|
+
let Oe = !1;
|
|
3578
|
+
const vt = () => {
|
|
3579
|
+
Oe !== !1 && (clearTimeout(Oe), Oe = !1);
|
|
3580
|
+
}, wt = 10, $s = ({
|
|
3552
3581
|
element: e = "div",
|
|
3553
3582
|
likes: t = 0,
|
|
3554
3583
|
peopleWhoLiked: n = !1,
|
|
3555
3584
|
isShort: s = !0,
|
|
3556
3585
|
userLiked: o = !1,
|
|
3557
3586
|
content: l = { type: "reply", slugs: {} },
|
|
3558
|
-
canLike:
|
|
3587
|
+
canLike: m = !0,
|
|
3559
3588
|
functions: { createLike: a = () => {
|
|
3560
3589
|
}, deleteLike: i = () => {
|
|
3561
3590
|
} } = {}
|
|
3562
3591
|
}) => {
|
|
3563
|
-
const c =
|
|
3592
|
+
const c = P();
|
|
3564
3593
|
z(() => {
|
|
3565
3594
|
h(o);
|
|
3566
3595
|
}, [o]);
|
|
3567
|
-
const [u, f] =
|
|
3568
|
-
if (M.preventDefault(), M.stopPropagation(), E(!1),
|
|
3569
|
-
return
|
|
3570
|
-
if (
|
|
3596
|
+
const [u, f] = D(t), [p, h] = D(o), [_, b] = D(!1), [g, E] = D(!1), x = qe(() => Ss(n, wt), [n]), $ = (M) => {
|
|
3597
|
+
if (M.preventDefault(), M.stopPropagation(), E(!1), Oe)
|
|
3598
|
+
return vt(), !1;
|
|
3599
|
+
if (vt(), _ || !m)
|
|
3571
3600
|
return !1;
|
|
3572
|
-
|
|
3601
|
+
Oe = setTimeout(T, 350);
|
|
3573
3602
|
}, T = async () => {
|
|
3574
|
-
if (
|
|
3603
|
+
if (vt(), _ || !m)
|
|
3575
3604
|
return !1;
|
|
3576
3605
|
let M = p ? u - 1 : u + 1;
|
|
3577
|
-
M < 0 && (M = 0),
|
|
3606
|
+
M < 0 && (M = 0), b(!0), f(M), h(!p);
|
|
3578
3607
|
try {
|
|
3579
3608
|
if (l && l.slugs) {
|
|
3580
3609
|
const Q = Es(l.slugs);
|
|
@@ -3583,14 +3612,14 @@ const wt = () => {
|
|
|
3583
3612
|
} catch {
|
|
3584
3613
|
f(t), h(o);
|
|
3585
3614
|
} finally {
|
|
3586
|
-
|
|
3615
|
+
b(!1);
|
|
3587
3616
|
}
|
|
3588
3617
|
};
|
|
3589
3618
|
return A.createElement(
|
|
3590
3619
|
e,
|
|
3591
3620
|
{
|
|
3592
|
-
className: j("likes-wrapper text-medium action-button", { "show-spinner": _, "is-liked": p, disabled: !
|
|
3593
|
-
onClick:
|
|
3621
|
+
className: j("likes-wrapper text-medium action-button", { "show-spinner": _, "is-liked": p, disabled: !m }),
|
|
3622
|
+
onClick: $,
|
|
3594
3623
|
onMouseEnter: () => {
|
|
3595
3624
|
E(!0);
|
|
3596
3625
|
},
|
|
@@ -3611,12 +3640,12 @@ const wt = () => {
|
|
|
3611
3640
|
size: "medium",
|
|
3612
3641
|
icon: { icon: p ? "heart" : "heart_empty", animate: "bounce" },
|
|
3613
3642
|
className: j({ "do-animation": p && !o }),
|
|
3614
|
-
screenreaderText:
|
|
3643
|
+
screenreaderText: m ? c.formatMessage({
|
|
3615
3644
|
id: `discussion_likes_${p ? "unlike" : "like"}`
|
|
3616
3645
|
}, { action: c.formatMessage({ id: `discussion_action_${l.type}` }) }) : !1,
|
|
3617
|
-
onClick:
|
|
3618
|
-
disabled: !
|
|
3619
|
-
"aria-hidden": !
|
|
3646
|
+
onClick: $,
|
|
3647
|
+
disabled: !m,
|
|
3648
|
+
"aria-hidden": !m,
|
|
3620
3649
|
"data-testid": "like-button",
|
|
3621
3650
|
"data-gtm-event-context": "Likes",
|
|
3622
3651
|
"data-gtm-event-type": `like-${l.type}-click`
|
|
@@ -3624,8 +3653,8 @@ const wt = () => {
|
|
|
3624
3653
|
),
|
|
3625
3654
|
/* @__PURE__ */ r.jsx("span", { className: j("number-of-likes", { "no-likes": u === 0 }), "data-testid": "number-of-likes", children: c.formatMessage({ id: `discussion_likes${s ? "_short" : ""}` }, { number: u }) }),
|
|
3626
3655
|
n && /* @__PURE__ */ r.jsx(Ir, { isOpen: g, isLoading: n.length === 0, children: n.length && /* @__PURE__ */ r.jsxs("ul", { children: [
|
|
3627
|
-
|
|
3628
|
-
n.length >
|
|
3656
|
+
x.map((M) => typeof M == "string" || !M.name ? null : /* @__PURE__ */ r.jsx("li", { children: /* @__PURE__ */ r.jsx(nt, { href: M.id ? `/profiles/${M.id}` : void 0, gtmContext: "Likes", gtmType: "liked-name-click", children: M.name }) }, M.id || window.btoa(M.name))),
|
|
3657
|
+
n.length > wt && /* @__PURE__ */ r.jsx("li", { children: c.formatMessage({ id: "discussion_likes_more" }, { number: n.length - wt }) })
|
|
3629
3658
|
] }) })
|
|
3630
3659
|
] })
|
|
3631
3660
|
}
|
|
@@ -3647,18 +3676,18 @@ const Dn = ({
|
|
|
3647
3676
|
functions: { onOpen: o = () => {
|
|
3648
3677
|
}, onClose: l = () => {
|
|
3649
3678
|
} } = {},
|
|
3650
|
-
forceShow: { error:
|
|
3679
|
+
forceShow: { error: m = !1 } = {},
|
|
3651
3680
|
title: a,
|
|
3652
3681
|
children: i,
|
|
3653
3682
|
buttons: c,
|
|
3654
3683
|
className: u = "",
|
|
3655
3684
|
gtmContext: f = "Modal"
|
|
3656
3685
|
}) => {
|
|
3657
|
-
const p =
|
|
3686
|
+
const p = P(), [h, _] = D(t), b = (E) => {
|
|
3658
3687
|
_(E), E ? (o(), document.body.classList.add("has-overlay")) : (l(), document.body.classList.remove("has-overlay"));
|
|
3659
3688
|
};
|
|
3660
3689
|
z(() => {
|
|
3661
|
-
|
|
3690
|
+
b(t);
|
|
3662
3691
|
}, [t]);
|
|
3663
3692
|
const g = s ? { "--max-width": `${s / 16}rem` } : {};
|
|
3664
3693
|
return /* @__PURE__ */ r.jsx("div", { className: j("overlay", { open: h }), children: /* @__PURE__ */ r.jsx(
|
|
@@ -3677,7 +3706,7 @@ const Dn = ({
|
|
|
3677
3706
|
variant: "tertiary",
|
|
3678
3707
|
size: "medium",
|
|
3679
3708
|
icon: { icon: "close" },
|
|
3680
|
-
onClick: () =>
|
|
3709
|
+
onClick: () => b(!1),
|
|
3681
3710
|
className: "gtm-trackable",
|
|
3682
3711
|
"data-gtm-event-type": "close-modal-click",
|
|
3683
3712
|
"data-gtm-event-context": f,
|
|
@@ -3685,13 +3714,13 @@ const Dn = ({
|
|
|
3685
3714
|
}
|
|
3686
3715
|
)
|
|
3687
3716
|
] }),
|
|
3688
|
-
n && /* @__PURE__ */ r.jsx(
|
|
3717
|
+
n && /* @__PURE__ */ r.jsx(Le, {}),
|
|
3689
3718
|
i,
|
|
3690
3719
|
c && /* @__PURE__ */ r.jsxs("div", { className: "bottom", children: [
|
|
3691
|
-
/* @__PURE__ */ r.jsx(
|
|
3692
|
-
/* @__PURE__ */ r.jsx(
|
|
3720
|
+
/* @__PURE__ */ r.jsx(Le, {}),
|
|
3721
|
+
/* @__PURE__ */ r.jsx(tt, { buttons: c })
|
|
3693
3722
|
] }),
|
|
3694
|
-
|
|
3723
|
+
m && /* @__PURE__ */ r.jsx($t, { className: "error", children: m })
|
|
3695
3724
|
] })
|
|
3696
3725
|
}
|
|
3697
3726
|
) });
|
|
@@ -3700,14 +3729,14 @@ const Dn = ({
|
|
|
3700
3729
|
"aria-expanded": t,
|
|
3701
3730
|
"aria-controls": e
|
|
3702
3731
|
});
|
|
3703
|
-
const
|
|
3732
|
+
const So = ({
|
|
3704
3733
|
className: e,
|
|
3705
3734
|
showModal: t = !0,
|
|
3706
3735
|
title: n,
|
|
3707
3736
|
formTitle: s = "Know someone who might like to join this workshop?",
|
|
3708
|
-
formLabel: o = "
|
|
3709
|
-
ctaMessage: l = "Send
|
|
3710
|
-
showIcon:
|
|
3737
|
+
formLabel: o = "Invite your colleagues by typing or pasting their emails below.",
|
|
3738
|
+
ctaMessage: l = "Send",
|
|
3739
|
+
showIcon: m,
|
|
3711
3740
|
onClose: a,
|
|
3712
3741
|
reportError: i = () => {
|
|
3713
3742
|
},
|
|
@@ -3718,10 +3747,11 @@ const $o = ({
|
|
|
3718
3747
|
title: n,
|
|
3719
3748
|
isOpen: t,
|
|
3720
3749
|
showDivider: !1,
|
|
3721
|
-
showIcon:
|
|
3750
|
+
showIcon: m,
|
|
3751
|
+
functions: { onClose: a },
|
|
3722
3752
|
className: j("invite-modal", e, { success: !!n }),
|
|
3723
3753
|
children: /* @__PURE__ */ r.jsx(
|
|
3724
|
-
|
|
3754
|
+
vs,
|
|
3725
3755
|
{
|
|
3726
3756
|
title: s,
|
|
3727
3757
|
label: o,
|
|
@@ -3735,22 +3765,18 @@ const $o = ({
|
|
|
3735
3765
|
), ln = (e) => {
|
|
3736
3766
|
const t = {};
|
|
3737
3767
|
return Object.keys(e).forEach((n) => n.includes("Id") ? t[n] = e[n] : t[`${n}Slug`] = e[n]), t;
|
|
3738
|
-
},
|
|
3739
|
-
const xe = "discussion_",
|
|
3768
|
+
}, Ft = (e, t) => e && !t;
|
|
3769
|
+
const xe = "discussion_", Rt = ({
|
|
3740
3770
|
element: e = "div",
|
|
3741
3771
|
content: t,
|
|
3742
3772
|
userHasPermissions: n = !0,
|
|
3743
3773
|
isLoading: s = !1,
|
|
3744
3774
|
originalAuthorId: o,
|
|
3745
3775
|
functions: {
|
|
3746
|
-
content: { createContent: l, deleteContent:
|
|
3747
|
-
|
|
3748
|
-
|
|
3749
|
-
|
|
3750
|
-
},
|
|
3751
|
-
updateContent: () => {
|
|
3752
|
-
}
|
|
3753
|
-
},
|
|
3776
|
+
content: { createContent: l, deleteContent: m, updateContent: a } = { createContent: () => {
|
|
3777
|
+
}, deleteContent: () => {
|
|
3778
|
+
}, updateContent: () => {
|
|
3779
|
+
} },
|
|
3754
3780
|
likes: { createLike: i, deleteLike: c } = { createLike: () => {
|
|
3755
3781
|
}, deleteLike: () => {
|
|
3756
3782
|
} },
|
|
@@ -3760,81 +3786,76 @@ const xe = "discussion_", Cs = 280, Ot = ({
|
|
|
3760
3786
|
links: f = {},
|
|
3761
3787
|
className: p,
|
|
3762
3788
|
gtmContext: h = "DiscussionAnswer",
|
|
3763
|
-
children: _
|
|
3764
|
-
isTruncated: k = !1
|
|
3789
|
+
children: _
|
|
3765
3790
|
}) => {
|
|
3766
|
-
const
|
|
3791
|
+
const b = P(), g = ye(je), E = ye(Nn), [x, $] = D({
|
|
3767
3792
|
body: t && t.body || "",
|
|
3768
3793
|
isEditing: !1,
|
|
3769
3794
|
didEdit: t && t.isEdited || !1
|
|
3770
|
-
}), [
|
|
3795
|
+
}), [T, M] = D(!1), [Q, V] = D("");
|
|
3771
3796
|
if (z(() => {
|
|
3772
|
-
|
|
3773
|
-
...
|
|
3797
|
+
$({
|
|
3798
|
+
...x,
|
|
3774
3799
|
body: t && t.body || "",
|
|
3775
3800
|
didEdit: t && t.isEdited || !1
|
|
3776
3801
|
});
|
|
3777
3802
|
}, [t.isEdited]), s || !t || t.type === "answer" && (!t.slugs || !t.slugs.question))
|
|
3778
|
-
return /* @__PURE__ */ r.jsx(
|
|
3779
|
-
const { author:
|
|
3780
|
-
R || (R = ""),
|
|
3803
|
+
return /* @__PURE__ */ r.jsx(ve, { className: "discussion-card discussion-post" });
|
|
3804
|
+
const { author: w, canLike: F, createdAt: q, id: k, likes: Y = 0, userLiked: B, comments: L = 0 } = t, U = g && g.id && typeof w != "string" && w.id && w.id === g.id || !1, G = typeof F == "boolean" ? F : n ? !U : !1, K = async (R) => {
|
|
3805
|
+
R || (R = ""), V("");
|
|
3781
3806
|
try {
|
|
3782
|
-
if (!_r(R,
|
|
3783
|
-
const
|
|
3784
|
-
await a(ln(t.slugs),
|
|
3807
|
+
if (!_r(R, x.body)) {
|
|
3808
|
+
const ee = t.type === "question" ? { title: R } : { body: R };
|
|
3809
|
+
await a(ln(t.slugs), ee);
|
|
3785
3810
|
}
|
|
3786
|
-
|
|
3811
|
+
$({ body: R, isEditing: !1, didEdit: !0 });
|
|
3787
3812
|
} catch {
|
|
3788
|
-
|
|
3813
|
+
V(`${xe}form_error`);
|
|
3789
3814
|
}
|
|
3790
|
-
},
|
|
3791
|
-
|
|
3792
|
-
const
|
|
3793
|
-
|
|
3815
|
+
}, ie = () => {
|
|
3816
|
+
E && E.updateConversation && E.updateConversation({ showThread: !0, showForm: !0 }), setTimeout(() => {
|
|
3817
|
+
const ee = `reply-form-${(t.type === "answer" ? t.slug : t.slugs.answer || "").toLowerCase().slice(-15)}`, oe = document.getElementById(ee), ce = document.getElementById(`${ee}-input`);
|
|
3818
|
+
ce && ce.focus(), oe && oe.scrollIntoView({ behavior: "smooth" });
|
|
3794
3819
|
}, 0);
|
|
3795
|
-
},
|
|
3820
|
+
}, le = () => {
|
|
3796
3821
|
try {
|
|
3797
|
-
|
|
3822
|
+
m(ln(t.slugs));
|
|
3798
3823
|
} catch {
|
|
3799
|
-
|
|
3824
|
+
V("delete-error");
|
|
3800
3825
|
}
|
|
3801
|
-
},
|
|
3802
|
-
{
|
|
3803
|
-
|
|
3804
|
-
|
|
3805
|
-
|
|
3806
|
-
|
|
3807
|
-
|
|
3808
|
-
|
|
3809
|
-
{
|
|
3810
|
-
|
|
3811
|
-
|
|
3812
|
-
|
|
3813
|
-
|
|
3814
|
-
|
|
3815
|
-
|
|
3816
|
-
icon: "flag"
|
|
3817
|
-
}
|
|
3818
|
-
];
|
|
3819
|
-
return n && K && oe.push(
|
|
3826
|
+
}, se = [{
|
|
3827
|
+
text: b.formatMessage({ id: `${xe}moreMenu_report` }),
|
|
3828
|
+
href: `mailto:community@apolitical.co?subject=${encodeURI(b.formatMessage({ id: `${xe}report_subject` }))}&body=${encodeURI(
|
|
3829
|
+
b.formatMessage(
|
|
3830
|
+
{ id: `${xe}report_body` },
|
|
3831
|
+
{
|
|
3832
|
+
contentType: t.type || "",
|
|
3833
|
+
contentSlug: t.slug || "",
|
|
3834
|
+
contentUrl: `${window.origin}${typeof process < "u" && process.env.PUBLIC_URL || ""}/${t.slugs.question || ""}`
|
|
3835
|
+
}
|
|
3836
|
+
)
|
|
3837
|
+
)}`,
|
|
3838
|
+
icon: "flag"
|
|
3839
|
+
}];
|
|
3840
|
+
return n && U && se.push(
|
|
3820
3841
|
{
|
|
3821
|
-
text:
|
|
3822
|
-
onClick: () =>
|
|
3842
|
+
text: b.formatMessage({ id: `${xe}moreMenu_edit` }),
|
|
3843
|
+
onClick: () => $({ ...x, isEditing: !0 }),
|
|
3823
3844
|
icon: "pencil-paper",
|
|
3824
3845
|
className: "gtm-trackable",
|
|
3825
3846
|
"data-gtm-event-context": h,
|
|
3826
3847
|
"data-gtm-event-type": `edit-${t.type}-click`
|
|
3827
3848
|
},
|
|
3828
3849
|
{
|
|
3829
|
-
text:
|
|
3850
|
+
text: b.formatMessage({ id: `${xe}moreMenu_delete` }),
|
|
3830
3851
|
onClick: (R) => {
|
|
3831
|
-
R.preventDefault(), R.stopPropagation(),
|
|
3852
|
+
R.preventDefault(), R.stopPropagation(), M(!0);
|
|
3832
3853
|
},
|
|
3833
3854
|
icon: "trash",
|
|
3834
3855
|
className: "gtm-trackable",
|
|
3835
3856
|
"data-gtm-event-context": h,
|
|
3836
3857
|
"data-gtm-event-type": `delete-${t.type}-click`,
|
|
3837
|
-
...Ms(`delete-${t.slug}-modal`,
|
|
3858
|
+
...Ms(`delete-${t.slug}-modal`, T)
|
|
3838
3859
|
}
|
|
3839
3860
|
), A.createElement(e, {
|
|
3840
3861
|
className: j("discussion-post", p),
|
|
@@ -3843,151 +3864,92 @@ const xe = "discussion_", Cs = 280, Ot = ({
|
|
|
3843
3864
|
/* @__PURE__ */ r.jsxs(
|
|
3844
3865
|
"div",
|
|
3845
3866
|
{
|
|
3846
|
-
id:
|
|
3847
|
-
className: j("discussion-card", t.type, {
|
|
3848
|
-
editing: S.isEditing,
|
|
3849
|
-
"has-link": f.post && !S.isEditing
|
|
3850
|
-
}),
|
|
3867
|
+
id: k || t.slug,
|
|
3868
|
+
className: j("discussion-card", t.type, { editing: x.isEditing, "has-link": f.post && !x.isEditing }),
|
|
3851
3869
|
onClick: (R) => {
|
|
3852
|
-
!f.post ||
|
|
3870
|
+
!f.post || x.isEditing || (R.preventDefault(), R.stopPropagation(), window.location.href = f.post);
|
|
3853
3871
|
},
|
|
3854
3872
|
children: [
|
|
3855
|
-
!
|
|
3856
|
-
|
|
3873
|
+
!x.isEditing && /* @__PURE__ */ r.jsx(
|
|
3874
|
+
Pt,
|
|
3857
3875
|
{
|
|
3858
|
-
member:
|
|
3859
|
-
additionalContent: { createdAt:
|
|
3860
|
-
className: typeof
|
|
3876
|
+
member: w,
|
|
3877
|
+
additionalContent: { createdAt: q, didEdit: x.didEdit },
|
|
3878
|
+
className: typeof w != "string" && w.id === o ? "highlighted" : "",
|
|
3861
3879
|
gtmContext: h,
|
|
3862
3880
|
gtmType: "profile-click"
|
|
3863
3881
|
}
|
|
3864
3882
|
),
|
|
3865
|
-
|
|
3883
|
+
x.isEditing ? /* @__PURE__ */ r.jsx(
|
|
3866
3884
|
Cn,
|
|
3867
3885
|
{
|
|
3868
3886
|
content: { type: t.type, slugs: t.slugs },
|
|
3869
3887
|
userHasPermissions: n,
|
|
3870
|
-
meta: {
|
|
3871
|
-
isLoading: s,
|
|
3872
|
-
isInWrapper: !0,
|
|
3873
|
-
isEditing: { text: S.body }
|
|
3874
|
-
},
|
|
3888
|
+
meta: { isLoading: s, isInWrapper: !0, isEditing: { text: x.body } },
|
|
3875
3889
|
maxLength: t.type === "question" ? 250 : 5e4,
|
|
3876
|
-
forceShow: {
|
|
3877
|
-
|
|
3878
|
-
|
|
3879
|
-
|
|
3880
|
-
|
|
3881
|
-
id: `discussion_action_${t.type}`
|
|
3882
|
-
})
|
|
3883
|
-
}
|
|
3884
|
-
) : !1
|
|
3885
|
-
},
|
|
3890
|
+
forceShow: { error: Q !== "" && Q !== "delete-error" ? b.formatMessage({ id: Q }, {
|
|
3891
|
+
action: b.formatMessage({
|
|
3892
|
+
id: `discussion_action_${t.type}`
|
|
3893
|
+
})
|
|
3894
|
+
}) : !1 },
|
|
3886
3895
|
functions: {
|
|
3887
3896
|
create: l,
|
|
3888
|
-
handleSaveEdit:
|
|
3897
|
+
handleSaveEdit: K,
|
|
3889
3898
|
handleCancel: () => {
|
|
3890
|
-
|
|
3899
|
+
V(""), $({ ...x, isEditing: !1 });
|
|
3891
3900
|
}
|
|
3892
3901
|
},
|
|
3893
3902
|
gtmContext: `${h}Form`
|
|
3894
3903
|
}
|
|
3895
|
-
) : f.post ? /* @__PURE__ */ r.jsx(
|
|
3896
|
-
|
|
3897
|
-
|
|
3898
|
-
|
|
3899
|
-
|
|
3900
|
-
|
|
3901
|
-
|
|
3902
|
-
|
|
3903
|
-
|
|
3904
|
-
|
|
3905
|
-
|
|
3906
|
-
|
|
3907
|
-
|
|
3908
|
-
|
|
3909
|
-
|
|
3910
|
-
|
|
3911
|
-
|
|
3912
|
-
|
|
3913
|
-
|
|
3914
|
-
}
|
|
3915
|
-
|
|
3916
|
-
|
|
3917
|
-
|
|
3918
|
-
|
|
3919
|
-
|
|
3920
|
-
|
|
3921
|
-
|
|
3922
|
-
|
|
3923
|
-
|
|
3924
|
-
|
|
3925
|
-
|
|
3926
|
-
|
|
3927
|
-
|
|
3928
|
-
|
|
3929
|
-
|
|
3930
|
-
|
|
3931
|
-
|
|
3932
|
-
|
|
3933
|
-
|
|
3934
|
-
|
|
3935
|
-
|
|
3936
|
-
|
|
3937
|
-
|
|
3938
|
-
|
|
3939
|
-
|
|
3940
|
-
|
|
3941
|
-
|
|
3942
|
-
|
|
3943
|
-
|
|
3944
|
-
children: [
|
|
3945
|
-
/* @__PURE__ */ r.jsx(
|
|
3946
|
-
W,
|
|
3947
|
-
{
|
|
3948
|
-
variant: "tertiary",
|
|
3949
|
-
size: "medium",
|
|
3950
|
-
styling: { muted: !0 },
|
|
3951
|
-
icon: { icon: "speech-bubble_square_thick" },
|
|
3952
|
-
href: f.comments ? f.comments : !1,
|
|
3953
|
-
onClick: f.comments || typeof u != "function" ? !1 : u,
|
|
3954
|
-
className: "gtm-trackable",
|
|
3955
|
-
"data-gtm-event-context": h,
|
|
3956
|
-
"data-gtm-event-type": `answer-${t.type}-click`,
|
|
3957
|
-
screenreaderText: g.formatMessage(
|
|
3958
|
-
{ id: `${xe}comments_screenReader` },
|
|
3959
|
-
{ count: U }
|
|
3960
|
-
)
|
|
3961
|
-
}
|
|
3962
|
-
),
|
|
3963
|
-
/* @__PURE__ */ r.jsx("span", { children: g.formatMessage(
|
|
3964
|
-
{ id: `${xe}comments` },
|
|
3965
|
-
{ count: U }
|
|
3966
|
-
) })
|
|
3967
|
-
]
|
|
3968
|
-
}
|
|
3969
|
-
),
|
|
3970
|
-
(t.type === "answer" || t.type === "reply") && /* @__PURE__ */ r.jsx("li", { children: /* @__PURE__ */ r.jsx(
|
|
3971
|
-
W,
|
|
3972
|
-
{
|
|
3973
|
-
variant: "tertiary",
|
|
3974
|
-
size: "medium",
|
|
3975
|
-
styling: { muted: !0 },
|
|
3976
|
-
onClick: ce,
|
|
3977
|
-
children: g.formatMessage({ id: `${xe}reply` })
|
|
3978
|
-
}
|
|
3979
|
-
) }),
|
|
3980
|
-
/* @__PURE__ */ r.jsx(
|
|
3981
|
-
ps,
|
|
3982
|
-
{
|
|
3983
|
-
element: "li",
|
|
3984
|
-
id: `more-${t.slug}`,
|
|
3985
|
-
options: oe
|
|
3986
|
-
}
|
|
3987
|
-
)
|
|
3988
|
-
]
|
|
3989
|
-
}
|
|
3990
|
-
)
|
|
3904
|
+
) : f.post ? /* @__PURE__ */ r.jsx("a", { href: f.post, className: "gtm-trackable", "data-gtm-event-context": h, "data-gtm-event-type": "title-click", children: /* @__PURE__ */ r.jsx(nn, { options: { overrides: { a: Zr } }, children: x.body }) }) : /* @__PURE__ */ r.jsx(nn, { options: { wrapper: t.type === "question" ? "h1" : A.Fragment, forceWrapper: t.type === "question", forceInline: t.type === "question", forceBlock: t.type !== "question" }, children: x.body }),
|
|
3905
|
+
!x.isEditing && /* @__PURE__ */ r.jsxs("ul", { className: j("actions text-medium", t.type), "data-testid": `${t.type}-actions`, children: [
|
|
3906
|
+
/* @__PURE__ */ r.jsx(
|
|
3907
|
+
$s,
|
|
3908
|
+
{
|
|
3909
|
+
element: "li",
|
|
3910
|
+
likes: Y,
|
|
3911
|
+
isShort: !1,
|
|
3912
|
+
userLiked: B,
|
|
3913
|
+
content: { type: t.type, slugs: t.slugs },
|
|
3914
|
+
canLike: G,
|
|
3915
|
+
functions: {
|
|
3916
|
+
createLike: i,
|
|
3917
|
+
deleteLike: c
|
|
3918
|
+
}
|
|
3919
|
+
}
|
|
3920
|
+
),
|
|
3921
|
+
(["question", "post"].includes(t.type) || f.comments || typeof u == "function") && /* @__PURE__ */ r.jsxs("li", { className: "action-button", onClick: (R) => {
|
|
3922
|
+
R.preventDefault(), R.stopPropagation(), f.comments && (window.location.href = f.comments), typeof u == "function" && u();
|
|
3923
|
+
}, children: [
|
|
3924
|
+
/* @__PURE__ */ r.jsx(
|
|
3925
|
+
W,
|
|
3926
|
+
{
|
|
3927
|
+
variant: "tertiary",
|
|
3928
|
+
size: "medium",
|
|
3929
|
+
styling: { muted: !0 },
|
|
3930
|
+
icon: { icon: "speech-bubble_square_thick" },
|
|
3931
|
+
href: f.comments ? f.comments : !1,
|
|
3932
|
+
onClick: f.comments || typeof u != "function" ? !1 : u,
|
|
3933
|
+
className: "gtm-trackable",
|
|
3934
|
+
"data-gtm-event-context": h,
|
|
3935
|
+
"data-gtm-event-type": `answer-${t.type}-click`,
|
|
3936
|
+
screenreaderText: b.formatMessage({ id: `${xe}comments_screenReader` }, { count: L })
|
|
3937
|
+
}
|
|
3938
|
+
),
|
|
3939
|
+
/* @__PURE__ */ r.jsx("span", { children: b.formatMessage({ id: `${xe}comments` }, { count: L }) })
|
|
3940
|
+
] }),
|
|
3941
|
+
(t.type === "answer" || t.type === "reply") && /* @__PURE__ */ r.jsx("li", { children: /* @__PURE__ */ r.jsx(
|
|
3942
|
+
W,
|
|
3943
|
+
{
|
|
3944
|
+
variant: "tertiary",
|
|
3945
|
+
size: "medium",
|
|
3946
|
+
styling: { muted: !0 },
|
|
3947
|
+
onClick: ie,
|
|
3948
|
+
children: b.formatMessage({ id: `${xe}reply` })
|
|
3949
|
+
}
|
|
3950
|
+
) }),
|
|
3951
|
+
/* @__PURE__ */ r.jsx(ps, { element: "li", id: `more-${t.slug}`, options: se })
|
|
3952
|
+
] })
|
|
3991
3953
|
]
|
|
3992
3954
|
}
|
|
3993
3955
|
),
|
|
@@ -3996,35 +3958,21 @@ const xe = "discussion_", Cs = 280, Ot = ({
|
|
|
3996
3958
|
Dn,
|
|
3997
3959
|
{
|
|
3998
3960
|
id: `delete-${t.slug}-modal`,
|
|
3999
|
-
isOpen:
|
|
3961
|
+
isOpen: T,
|
|
4000
3962
|
functions: { onOpen: () => {
|
|
4001
|
-
}, onClose: () =>
|
|
4002
|
-
forceShow: {
|
|
4003
|
-
|
|
4004
|
-
|
|
4005
|
-
|
|
4006
|
-
|
|
4007
|
-
|
|
4008
|
-
})
|
|
4009
|
-
}
|
|
4010
|
-
) : !1
|
|
4011
|
-
},
|
|
4012
|
-
title: g.formatMessage(
|
|
3963
|
+
}, onClose: () => M(!1) },
|
|
3964
|
+
forceShow: { error: Q === "delete-error" ? b.formatMessage({ id: "discussion_delete_error" }, {
|
|
3965
|
+
action: b.formatMessage({
|
|
3966
|
+
id: `discussion_action_${t.type}`
|
|
3967
|
+
})
|
|
3968
|
+
}) : !1 },
|
|
3969
|
+
title: b.formatMessage(
|
|
4013
3970
|
{ id: "discussion_delete_title" },
|
|
4014
|
-
{ action:
|
|
3971
|
+
{ action: b.formatMessage({ id: `discussion_action_${t.type}` }) }
|
|
4015
3972
|
),
|
|
4016
3973
|
buttons: [
|
|
4017
|
-
{
|
|
4018
|
-
|
|
4019
|
-
onClick: () => Q(!1),
|
|
4020
|
-
children: g.formatMessage({ id: "discussion_delete_cancel" })
|
|
4021
|
-
},
|
|
4022
|
-
{
|
|
4023
|
-
variant: "primary",
|
|
4024
|
-
className: "destructive",
|
|
4025
|
-
onClick: ue,
|
|
4026
|
-
children: g.formatMessage({ id: "discussion_delete_delete" })
|
|
4027
|
-
}
|
|
3974
|
+
{ variant: "secondary", onClick: () => M(!1), children: b.formatMessage({ id: "discussion_delete_cancel" }) },
|
|
3975
|
+
{ variant: "primary", className: "destructive", onClick: le, children: b.formatMessage({ id: "discussion_delete_delete" }) }
|
|
4028
3976
|
],
|
|
4029
3977
|
gtmContext: `${t.type.charAt(0).toUpperCase()}${t.type.slice(1)}:${t.slug}`,
|
|
4030
3978
|
children: /* @__PURE__ */ r.jsx(
|
|
@@ -4033,7 +3981,7 @@ const xe = "discussion_", Cs = 280, Ot = ({
|
|
|
4033
3981
|
id: "discussion_delete_text",
|
|
4034
3982
|
values: {
|
|
4035
3983
|
p: (R) => /* @__PURE__ */ r.jsx("p", { children: R }),
|
|
4036
|
-
action:
|
|
3984
|
+
action: b.formatMessage({
|
|
4037
3985
|
id: `discussion_action_${t.type}`
|
|
4038
3986
|
})
|
|
4039
3987
|
}
|
|
@@ -4044,15 +3992,15 @@ const xe = "discussion_", Cs = 280, Ot = ({
|
|
|
4044
3992
|
] })
|
|
4045
3993
|
});
|
|
4046
3994
|
};
|
|
4047
|
-
const
|
|
4048
|
-
const n =
|
|
3995
|
+
const kt = "discussion_responses_", $o = ({ type: e = "answer", responses: t = 0 }) => {
|
|
3996
|
+
const n = P();
|
|
4049
3997
|
return /* @__PURE__ */ r.jsxs("div", { className: "responses-heading", children: [
|
|
4050
|
-
/* @__PURE__ */ r.jsx("h3", { children: n.formatMessage({ id: `${
|
|
4051
|
-
t === 0 && /* @__PURE__ */ r.jsx("p", { children: he(n.formatMessage, `${
|
|
3998
|
+
/* @__PURE__ */ r.jsx("h3", { children: n.formatMessage({ id: `${kt}title` }, { action: n.formatMessage({ id: `${kt}${e}` }), count: t }) }),
|
|
3999
|
+
t === 0 && /* @__PURE__ */ r.jsx("p", { children: he(n.formatMessage, `${kt}empty`, e, e) })
|
|
4052
4000
|
] });
|
|
4053
4001
|
};
|
|
4054
|
-
const
|
|
4055
|
-
const s =
|
|
4002
|
+
const To = ({ isOpen: e = !1, count: t = 0, children: n }) => {
|
|
4003
|
+
const s = P(), o = Z(null), [l, m] = D(e), [a, i] = D("closed");
|
|
4056
4004
|
z(() => {
|
|
4057
4005
|
const p = o.current;
|
|
4058
4006
|
if (p)
|
|
@@ -4076,14 +4024,14 @@ const Mo = ({ isOpen: e = !1, count: t = 0, children: n }) => {
|
|
|
4076
4024
|
styling: { muted: !0 },
|
|
4077
4025
|
icon: { icon: `arrow_corner-down_${u ? "left" : "right"}` },
|
|
4078
4026
|
onClick: () => {
|
|
4079
|
-
|
|
4027
|
+
m(!l);
|
|
4080
4028
|
},
|
|
4081
4029
|
children: s.formatMessage({ id: `discussion_thread_${u ? "hide" : "show"}` }, { count: t })
|
|
4082
4030
|
}
|
|
4083
4031
|
),
|
|
4084
4032
|
/* @__PURE__ */ r.jsx("ul", { ref: o, className: j("thread", a), hidden: !l, children: f })
|
|
4085
4033
|
] });
|
|
4086
|
-
},
|
|
4034
|
+
}, Cs = ({
|
|
4087
4035
|
user: e,
|
|
4088
4036
|
content: t,
|
|
4089
4037
|
verb: n = "post"
|
|
@@ -4112,7 +4060,7 @@ const Mo = ({ isOpen: e = !1, count: t = 0, children: n }) => {
|
|
|
4112
4060
|
}) => ({ mutationFn: s, onMutate: async ({ content: a }) => {
|
|
4113
4061
|
if (!n)
|
|
4114
4062
|
return;
|
|
4115
|
-
const i =
|
|
4063
|
+
const i = Cs({ user: n, content: a, verb: "post" });
|
|
4116
4064
|
await e.cancelQueries({ queryKey: t });
|
|
4117
4065
|
const c = e.getQueryData(t);
|
|
4118
4066
|
return e.setQueryData(t, (u) => [...u, i]), { previousActivities: c };
|
|
@@ -4120,29 +4068,29 @@ const Mo = ({ isOpen: e = !1, count: t = 0, children: n }) => {
|
|
|
4120
4068
|
e.setQueryData(t, c.previousActivities);
|
|
4121
4069
|
}, onSettled: () => {
|
|
4122
4070
|
e.invalidateQueries({ queryKey: t });
|
|
4123
|
-
} }),
|
|
4071
|
+
} }), Ns = ({
|
|
4124
4072
|
queryClient: e,
|
|
4125
4073
|
queryKey: t,
|
|
4126
4074
|
mutationFn: n
|
|
4127
4075
|
}) => ({
|
|
4128
4076
|
mutationFn: n,
|
|
4129
4077
|
onMutate: async ({
|
|
4130
|
-
activityInfo:
|
|
4078
|
+
activityInfo: m,
|
|
4131
4079
|
content: { body: a }
|
|
4132
4080
|
}) => {
|
|
4133
4081
|
if (a.length === 0)
|
|
4134
4082
|
return;
|
|
4135
4083
|
await e.cancelQueries({ queryKey: t });
|
|
4136
|
-
const i = e.getQueryData(t), c = i == null ? void 0 : i.map((u) => ((u == null ? void 0 : u.id) === (
|
|
4084
|
+
const i = e.getQueryData(t), c = i == null ? void 0 : i.map((u) => ((u == null ? void 0 : u.id) === (m == null ? void 0 : m.activityId) && (u.content = a), u));
|
|
4137
4085
|
return e.setQueryData(t, () => c && [...c]), { previousActivities: c };
|
|
4138
4086
|
},
|
|
4139
|
-
onError: (
|
|
4087
|
+
onError: (m, a, i) => {
|
|
4140
4088
|
e.setQueryData(t, i.previousActivities);
|
|
4141
4089
|
},
|
|
4142
4090
|
onSettled: () => {
|
|
4143
4091
|
e.invalidateQueries({ queryKey: t });
|
|
4144
4092
|
}
|
|
4145
|
-
}),
|
|
4093
|
+
}), Ds = ({
|
|
4146
4094
|
queryClient: e,
|
|
4147
4095
|
queryKey: t,
|
|
4148
4096
|
mutationFn: n
|
|
@@ -4162,7 +4110,7 @@ const Mo = ({ isOpen: e = !1, count: t = 0, children: n }) => {
|
|
|
4162
4110
|
e.invalidateQueries({
|
|
4163
4111
|
queryKey: [...t, c.activityId]
|
|
4164
4112
|
});
|
|
4165
|
-
} }),
|
|
4113
|
+
} }), Ps = ({
|
|
4166
4114
|
queryClient: e,
|
|
4167
4115
|
queryKey: t,
|
|
4168
4116
|
user: n,
|
|
@@ -4178,13 +4126,13 @@ const Mo = ({ isOpen: e = !1, count: t = 0, children: n }) => {
|
|
|
4178
4126
|
e.setQueryData(t, u.previousActivities);
|
|
4179
4127
|
}, onSuccess: (i, { activityId: c }) => {
|
|
4180
4128
|
const u = e.getQueryData(t), f = u == null ? void 0 : u.map((p) => {
|
|
4181
|
-
var h, _,
|
|
4129
|
+
var h, _, b, g;
|
|
4182
4130
|
if (p.id === c) {
|
|
4183
|
-
const E = (
|
|
4184
|
-
(
|
|
4185
|
-
)) == null ? void 0 :
|
|
4131
|
+
const E = (b = (_ = (h = p.latest_reactions) == null ? void 0 : h.like) == null ? void 0 : _.find(
|
|
4132
|
+
(x) => x.user_id === (n == null ? void 0 : n.id)
|
|
4133
|
+
)) == null ? void 0 : b.id;
|
|
4186
4134
|
return p.latest_reactions.like = (g = p.latest_reactions.like) == null ? void 0 : g.filter(
|
|
4187
|
-
(
|
|
4135
|
+
(x) => x.id !== E
|
|
4188
4136
|
), p;
|
|
4189
4137
|
} else
|
|
4190
4138
|
return p;
|
|
@@ -4194,16 +4142,16 @@ const Mo = ({ isOpen: e = !1, count: t = 0, children: n }) => {
|
|
|
4194
4142
|
e.invalidateQueries({
|
|
4195
4143
|
queryKey: [...t, u.activityId]
|
|
4196
4144
|
});
|
|
4197
|
-
} }),
|
|
4145
|
+
} }), Mo = ({
|
|
4198
4146
|
basePath: e,
|
|
4199
4147
|
parentId: t,
|
|
4200
4148
|
isMember: n,
|
|
4201
|
-
functions: { list: s, create: o, edit: l, like:
|
|
4149
|
+
functions: { list: s, create: o, edit: l, like: m, unlike: a, join: i, leave: c }
|
|
4202
4150
|
}) => {
|
|
4203
|
-
const u =
|
|
4151
|
+
const u = P(), f = At(), p = ye(je), {
|
|
4204
4152
|
data: h,
|
|
4205
4153
|
error: _,
|
|
4206
|
-
isLoading:
|
|
4154
|
+
isLoading: b,
|
|
4207
4155
|
isFetching: g
|
|
4208
4156
|
} = cn({
|
|
4209
4157
|
queryKey: [e, t],
|
|
@@ -4213,46 +4161,46 @@ const Mo = ({ isOpen: e = !1, count: t = 0, children: n }) => {
|
|
|
4213
4161
|
queryKey: [e, t],
|
|
4214
4162
|
user: p,
|
|
4215
4163
|
mutationFn: o
|
|
4216
|
-
}), { mutate:
|
|
4164
|
+
}), { mutate: x } = fe(E), $ = Ns({
|
|
4217
4165
|
queryClient: f,
|
|
4218
4166
|
queryKey: [e, t],
|
|
4219
|
-
mutationFn: async (
|
|
4167
|
+
mutationFn: async (k) => await l(k)
|
|
4220
4168
|
}), {
|
|
4221
4169
|
mutate: T
|
|
4222
|
-
} = fe(
|
|
4170
|
+
} = fe($), M = Ds({
|
|
4223
4171
|
queryClient: f,
|
|
4224
4172
|
queryKey: [e, t],
|
|
4225
|
-
mutationFn:
|
|
4173
|
+
mutationFn: m
|
|
4226
4174
|
}), {
|
|
4227
4175
|
mutate: Q
|
|
4228
|
-
} = fe(M), V =
|
|
4176
|
+
} = fe(M), V = Ps({
|
|
4229
4177
|
queryClient: f,
|
|
4230
4178
|
queryKey: [e, t],
|
|
4231
4179
|
user: p,
|
|
4232
|
-
mutationFn: async ({ activityId:
|
|
4233
|
-
var
|
|
4234
|
-
const
|
|
4235
|
-
(K) => K.id ===
|
|
4236
|
-
)),
|
|
4180
|
+
mutationFn: async ({ activityId: k }) => {
|
|
4181
|
+
var L, U, G;
|
|
4182
|
+
const Y = h && (h == null ? void 0 : h.find(
|
|
4183
|
+
(K) => K.id === k
|
|
4184
|
+
)), B = (G = (U = (L = Y == null ? void 0 : Y.latest_reactions) == null ? void 0 : L.like) == null ? void 0 : U.find(
|
|
4237
4185
|
(K) => K.user_id === (p == null ? void 0 : p.id)
|
|
4238
|
-
)) == null ? void 0 :
|
|
4239
|
-
await a({ reactionId:
|
|
4186
|
+
)) == null ? void 0 : G.id;
|
|
4187
|
+
await a({ reactionId: B || "", activityId: k });
|
|
4240
4188
|
}
|
|
4241
4189
|
}), {
|
|
4242
|
-
mutate:
|
|
4243
|
-
} = fe(V),
|
|
4244
|
-
({ activityId:
|
|
4190
|
+
mutate: w
|
|
4191
|
+
} = fe(V), F = Ee(
|
|
4192
|
+
({ activityId: k }) => Q({ activityId: k }),
|
|
4245
4193
|
[Q]
|
|
4246
4194
|
), q = Ee(
|
|
4247
|
-
({ activityId:
|
|
4248
|
-
[
|
|
4195
|
+
({ activityId: k }) => w({ activityId: k }),
|
|
4196
|
+
[w]
|
|
4249
4197
|
);
|
|
4250
|
-
return _ ? /* @__PURE__ */ r.jsx(
|
|
4198
|
+
return _ ? /* @__PURE__ */ r.jsx(rt, { variant: "error", text: _.message }) : b ? /* @__PURE__ */ r.jsx(ve, { style: { height: "400px" } }) : /* @__PURE__ */ r.jsxs(r.Fragment, { children: [
|
|
4251
4199
|
/* @__PURE__ */ r.jsx(
|
|
4252
|
-
|
|
4200
|
+
An,
|
|
4253
4201
|
{
|
|
4254
4202
|
contentType: "post",
|
|
4255
|
-
createPost:
|
|
4203
|
+
createPost: x,
|
|
4256
4204
|
membershipRequiredToPost: {
|
|
4257
4205
|
isMember: n,
|
|
4258
4206
|
required: !0,
|
|
@@ -4262,63 +4210,60 @@ const Mo = ({ isOpen: e = !1, count: t = 0, children: n }) => {
|
|
|
4262
4210
|
}
|
|
4263
4211
|
}
|
|
4264
4212
|
),
|
|
4265
|
-
!g && Array.isArray(h) && (h == null ? void 0 : h.map((
|
|
4266
|
-
var
|
|
4267
|
-
const
|
|
4268
|
-
return /* @__PURE__ */ r.
|
|
4269
|
-
|
|
4270
|
-
|
|
4271
|
-
{
|
|
4272
|
-
|
|
4273
|
-
|
|
4274
|
-
|
|
4275
|
-
|
|
4276
|
-
|
|
4277
|
-
|
|
4278
|
-
|
|
4279
|
-
|
|
4280
|
-
|
|
4281
|
-
|
|
4282
|
-
|
|
4283
|
-
|
|
4284
|
-
|
|
4285
|
-
|
|
4286
|
-
}
|
|
4287
|
-
},
|
|
4288
|
-
userLiked: ((te = w == null ? void 0 : w.own_reactions) == null ? void 0 : te.like) && ((X = w == null ? void 0 : w.own_reactions) == null ? void 0 : X.like.length) > 0,
|
|
4289
|
-
likes: (w == null ? void 0 : w.reaction_counts.like) || 0,
|
|
4290
|
-
comments: (w == null ? void 0 : w.reaction_counts.reply) || 0
|
|
4213
|
+
!g && Array.isArray(h) && (h == null ? void 0 : h.map((k) => {
|
|
4214
|
+
var L, U, G, K, ie, le, se, R, ee, oe, ce, te;
|
|
4215
|
+
const Y = ((L = k == null ? void 0 : k.actor) == null ? void 0 : L.id) === (p == null ? void 0 : p.id), B = Ft(n, Y);
|
|
4216
|
+
return /* @__PURE__ */ r.jsx(
|
|
4217
|
+
Rt,
|
|
4218
|
+
{
|
|
4219
|
+
content: {
|
|
4220
|
+
type: "post",
|
|
4221
|
+
body: k == null ? void 0 : k.content,
|
|
4222
|
+
canLike: B,
|
|
4223
|
+
createdAt: (k == null ? void 0 : k.time) || "",
|
|
4224
|
+
slugs: { parentId: t, activityId: k == null ? void 0 : k.id },
|
|
4225
|
+
slug: k == null ? void 0 : k.id,
|
|
4226
|
+
author: {
|
|
4227
|
+
id: (U = k == null ? void 0 : k.actor) == null ? void 0 : U.id,
|
|
4228
|
+
name: `${(K = (G = k == null ? void 0 : k.actor) == null ? void 0 : G.data) == null ? void 0 : K.name}`,
|
|
4229
|
+
organization: (le = (ie = k == null ? void 0 : k.actor) == null ? void 0 : ie.data) == null ? void 0 : le.organization,
|
|
4230
|
+
jobTitle: (R = (se = k == null ? void 0 : k.actor) == null ? void 0 : se.data) == null ? void 0 : R.jobTitle,
|
|
4231
|
+
image: {
|
|
4232
|
+
thumbnail: ((oe = (ee = k == null ? void 0 : k.actor) == null ? void 0 : ee.data) == null ? void 0 : oe.thumbnail) || void 0
|
|
4233
|
+
}
|
|
4291
4234
|
},
|
|
4292
|
-
|
|
4293
|
-
|
|
4294
|
-
|
|
4235
|
+
userLiked: ((ce = k == null ? void 0 : k.own_reactions) == null ? void 0 : ce.like) && ((te = k == null ? void 0 : k.own_reactions) == null ? void 0 : te.like.length) > 0,
|
|
4236
|
+
likes: (k == null ? void 0 : k.reaction_counts.like) || 0,
|
|
4237
|
+
comments: (k == null ? void 0 : k.reaction_counts.reply) || 0
|
|
4238
|
+
},
|
|
4239
|
+
links: {
|
|
4240
|
+
post: `${e}/${t}/${k == null ? void 0 : k.id}`,
|
|
4241
|
+
comments: `${e}/${t}/${k == null ? void 0 : k.id}`
|
|
4242
|
+
},
|
|
4243
|
+
functions: {
|
|
4244
|
+
content: {
|
|
4245
|
+
createContent: () => null,
|
|
4246
|
+
deleteContent: () => null,
|
|
4247
|
+
updateContent: (ue, me) => T({ activityInfo: ue, content: me })
|
|
4295
4248
|
},
|
|
4296
|
-
|
|
4297
|
-
|
|
4298
|
-
|
|
4299
|
-
deleteContent: () => null,
|
|
4300
|
-
updateContent: (ne, me) => T({ activityInfo: ne, content: me })
|
|
4301
|
-
},
|
|
4302
|
-
likes: {
|
|
4303
|
-
createLike: () => {
|
|
4304
|
-
N({ activityId: w == null ? void 0 : w.id });
|
|
4305
|
-
},
|
|
4306
|
-
deleteLike: () => {
|
|
4307
|
-
q({ activityId: w == null ? void 0 : w.id });
|
|
4308
|
-
}
|
|
4249
|
+
likes: {
|
|
4250
|
+
createLike: () => {
|
|
4251
|
+
F({ activityId: k == null ? void 0 : k.id });
|
|
4309
4252
|
},
|
|
4310
|
-
|
|
4311
|
-
|
|
4253
|
+
deleteLike: () => {
|
|
4254
|
+
q({ activityId: k == null ? void 0 : k.id });
|
|
4312
4255
|
}
|
|
4313
4256
|
},
|
|
4314
|
-
|
|
4257
|
+
comments: {
|
|
4258
|
+
openComments: () => null
|
|
4259
|
+
}
|
|
4315
4260
|
}
|
|
4316
|
-
|
|
4317
|
-
|
|
4318
|
-
|
|
4261
|
+
},
|
|
4262
|
+
k == null ? void 0 : k.id
|
|
4263
|
+
);
|
|
4319
4264
|
}))
|
|
4320
4265
|
] });
|
|
4321
|
-
},
|
|
4266
|
+
}, Fs = ({
|
|
4322
4267
|
queryClient: e,
|
|
4323
4268
|
queryKey: t,
|
|
4324
4269
|
mutationFn: n
|
|
@@ -4337,7 +4282,7 @@ const Mo = ({ isOpen: e = !1, count: t = 0, children: n }) => {
|
|
|
4337
4282
|
})), { previousActivity: i };
|
|
4338
4283
|
}, onSettled: () => {
|
|
4339
4284
|
e.invalidateQueries({ queryKey: t });
|
|
4340
|
-
} }),
|
|
4285
|
+
} }), Rs = ({
|
|
4341
4286
|
queryClient: e,
|
|
4342
4287
|
queryKey: t,
|
|
4343
4288
|
mutationFn: n
|
|
@@ -4345,49 +4290,49 @@ const Mo = ({ isOpen: e = !1, count: t = 0, children: n }) => {
|
|
|
4345
4290
|
mutationFn: n,
|
|
4346
4291
|
onMutate: async ({
|
|
4347
4292
|
replyInfo: l,
|
|
4348
|
-
content: { body:
|
|
4293
|
+
content: { body: m }
|
|
4349
4294
|
}) => {
|
|
4350
4295
|
var c, u, f;
|
|
4351
|
-
if (
|
|
4296
|
+
if (m.length === 0)
|
|
4352
4297
|
return;
|
|
4353
4298
|
await e.cancelQueries({ queryKey: t });
|
|
4354
4299
|
const a = e.getQueryData(t);
|
|
4355
4300
|
if (!a || !((c = a == null ? void 0 : a.latest_reactions) != null && c.reply))
|
|
4356
4301
|
return;
|
|
4357
|
-
const i = (f = (u = a == null ? void 0 : a.latest_reactions) == null ? void 0 : u.reply) == null ? void 0 : f.map((p) => (p.id === l.replySlug && (p.data.content =
|
|
4302
|
+
const i = (f = (u = a == null ? void 0 : a.latest_reactions) == null ? void 0 : u.reply) == null ? void 0 : f.map((p) => (p.id === l.replySlug && (p.data.content = m), p));
|
|
4358
4303
|
return e.setQueryData(t, () => ({
|
|
4359
4304
|
...a,
|
|
4360
4305
|
latest_reactions: { reply: i }
|
|
4361
4306
|
})), { previousActivity: a };
|
|
4362
4307
|
},
|
|
4363
|
-
onError: (l,
|
|
4308
|
+
onError: (l, m, a) => {
|
|
4364
4309
|
e.setQueryData(t, a.previousActivity);
|
|
4365
4310
|
}
|
|
4366
|
-
}),
|
|
4311
|
+
}), Os = ({
|
|
4367
4312
|
queryClient: e,
|
|
4368
4313
|
queryKey: t,
|
|
4369
4314
|
mutationFn: n
|
|
4370
|
-
}) => ({ mutationFn: n, onMutate: async ({ replyId:
|
|
4315
|
+
}) => ({ mutationFn: n, onMutate: async ({ replyId: m }) => {
|
|
4371
4316
|
var c, u;
|
|
4372
4317
|
await e.cancelQueries({ queryKey: t });
|
|
4373
4318
|
const a = e.getQueryData(t), i = (u = (c = a == null ? void 0 : a.latest_reactions) == null ? void 0 : c.reply) == null ? void 0 : u.map((f) => {
|
|
4374
4319
|
var p;
|
|
4375
|
-
return f.id ===
|
|
4320
|
+
return f.id === m && ((p = f.children_counts) != null && p.like ? f.children_counts.like += 1 : f.children_counts = { like: 1 }), f;
|
|
4376
4321
|
});
|
|
4377
4322
|
return e.setQueryData(t, () => ({
|
|
4378
4323
|
...a,
|
|
4379
4324
|
latest_reactions: { reply: i }
|
|
4380
4325
|
})), { previousActivity: a };
|
|
4381
|
-
}, onError: (
|
|
4326
|
+
}, onError: (m, a, i) => {
|
|
4382
4327
|
e.setQueryData(t, i.previousActivity);
|
|
4383
|
-
}, onSuccess: (
|
|
4328
|
+
}, onSuccess: (m) => {
|
|
4384
4329
|
var c;
|
|
4385
|
-
const a = e.getQueryData(t), i = (c = a == null ? void 0 : a.latest_reactions.reply) == null ? void 0 : c.map((u) => (u.id ===
|
|
4330
|
+
const a = e.getQueryData(t), i = (c = a == null ? void 0 : a.latest_reactions.reply) == null ? void 0 : c.map((u) => (u.id === m.id && (u.latest_children.like ? u.latest_children.like.push(m) : u.latest_children.like = [m]), u));
|
|
4386
4331
|
return e.setQueryData(t, () => ({
|
|
4387
4332
|
...a,
|
|
4388
4333
|
latest_reactions: { reply: i }
|
|
4389
4334
|
})), { previousActivity: a };
|
|
4390
|
-
} }),
|
|
4335
|
+
} }), Ls = ({
|
|
4391
4336
|
queryClient: e,
|
|
4392
4337
|
queryKey: t,
|
|
4393
4338
|
user: n,
|
|
@@ -4413,38 +4358,38 @@ const Mo = ({ isOpen: e = !1, count: t = 0, children: n }) => {
|
|
|
4413
4358
|
const u = (f = c.latest_reactions.reply) == null ? void 0 : f.map((p) => {
|
|
4414
4359
|
var h;
|
|
4415
4360
|
return p.id === i ? (h = p.latest_children.reply) == null ? void 0 : h.filter(
|
|
4416
|
-
(
|
|
4361
|
+
(b) => b.user_id !== (n == null ? void 0 : n.id)
|
|
4417
4362
|
) : p;
|
|
4418
4363
|
});
|
|
4419
4364
|
return e.setQueryData(t, () => ({
|
|
4420
4365
|
...c,
|
|
4421
4366
|
latest_reactions: { reply: u }
|
|
4422
4367
|
})), { previousActivity: c };
|
|
4423
|
-
} }),
|
|
4368
|
+
} }), Bs = ({
|
|
4424
4369
|
basePath: e,
|
|
4425
4370
|
parentId: t,
|
|
4426
4371
|
activityId: n,
|
|
4427
4372
|
repliesList: s,
|
|
4428
4373
|
isMember: o,
|
|
4429
|
-
functions: { createReply: l, editReply:
|
|
4374
|
+
functions: { createReply: l, editReply: m, like: a, unlike: i, join: c, leave: u }
|
|
4430
4375
|
}) => {
|
|
4431
|
-
const f =
|
|
4376
|
+
const f = P(), p = At(), h = ye(je), _ = Fs({
|
|
4432
4377
|
queryClient: p,
|
|
4433
4378
|
queryKey: [e, t, n],
|
|
4434
4379
|
mutationFn: l
|
|
4435
|
-
}), { mutate:
|
|
4380
|
+
}), { mutate: b } = fe(_), g = Rs({
|
|
4436
4381
|
queryClient: p,
|
|
4437
4382
|
queryKey: [e, t, n],
|
|
4438
|
-
mutationFn: async (
|
|
4383
|
+
mutationFn: async (w) => m(w)
|
|
4439
4384
|
}), {
|
|
4440
4385
|
mutate: E
|
|
4441
|
-
} = fe(g),
|
|
4386
|
+
} = fe(g), x = Os({
|
|
4442
4387
|
queryClient: p,
|
|
4443
4388
|
queryKey: [e, t, n],
|
|
4444
4389
|
mutationFn: a
|
|
4445
4390
|
}), {
|
|
4446
|
-
mutate:
|
|
4447
|
-
} = fe(
|
|
4391
|
+
mutate: $
|
|
4392
|
+
} = fe(x), T = Ls({
|
|
4448
4393
|
queryClient: p,
|
|
4449
4394
|
queryKey: [e, t, n],
|
|
4450
4395
|
user: h,
|
|
@@ -4452,18 +4397,18 @@ const Mo = ({ isOpen: e = !1, count: t = 0, children: n }) => {
|
|
|
4452
4397
|
}), {
|
|
4453
4398
|
mutate: M
|
|
4454
4399
|
} = fe(T), Q = Ee(
|
|
4455
|
-
({ replyId:
|
|
4456
|
-
[
|
|
4400
|
+
({ replyId: w }) => $({ replyId: w }),
|
|
4401
|
+
[$]
|
|
4457
4402
|
), V = Ee(
|
|
4458
|
-
({ replyId:
|
|
4403
|
+
({ replyId: w }) => M({ replyId: w }),
|
|
4459
4404
|
[M]
|
|
4460
4405
|
);
|
|
4461
4406
|
return /* @__PURE__ */ r.jsxs(r.Fragment, { children: [
|
|
4462
4407
|
/* @__PURE__ */ r.jsx(
|
|
4463
|
-
|
|
4408
|
+
An,
|
|
4464
4409
|
{
|
|
4465
4410
|
contentType: "post",
|
|
4466
|
-
createPost:
|
|
4411
|
+
createPost: b,
|
|
4467
4412
|
membershipRequiredToPost: {
|
|
4468
4413
|
isMember: o,
|
|
4469
4414
|
required: !0,
|
|
@@ -4473,37 +4418,37 @@ const Mo = ({ isOpen: e = !1, count: t = 0, children: n }) => {
|
|
|
4473
4418
|
}
|
|
4474
4419
|
}
|
|
4475
4420
|
),
|
|
4476
|
-
(s == null ? void 0 : s.length) === 0 || (s == null ? void 0 : s.map((
|
|
4477
|
-
var
|
|
4478
|
-
const
|
|
4421
|
+
(s == null ? void 0 : s.length) === 0 || (s == null ? void 0 : s.map((w) => {
|
|
4422
|
+
var Y, B, L, U, G, K, ie, le, se, R, ee, oe, ce, te, ue, me, pe;
|
|
4423
|
+
const F = ((Y = w == null ? void 0 : w.latest_children) == null ? void 0 : Y.like) && ((B = w == null ? void 0 : w.latest_children) == null ? void 0 : B.like.filter(
|
|
4479
4424
|
(ge) => ge.user_id === (h == null ? void 0 : h.id)
|
|
4480
|
-
)), q = ((
|
|
4425
|
+
)), q = ((L = w == null ? void 0 : w.user) == null ? void 0 : L.id) === (h == null ? void 0 : h.id), k = Ft(o, q);
|
|
4481
4426
|
return /* @__PURE__ */ r.jsx(
|
|
4482
|
-
|
|
4427
|
+
Rt,
|
|
4483
4428
|
{
|
|
4484
4429
|
content: {
|
|
4485
4430
|
type: "post",
|
|
4486
|
-
body: typeof
|
|
4487
|
-
canLike:
|
|
4488
|
-
createdAt:
|
|
4431
|
+
body: typeof w.data.content == "string" ? (U = w == null ? void 0 : w.data) == null ? void 0 : U.content : ((K = (G = w == null ? void 0 : w.data) == null ? void 0 : G.content) == null ? void 0 : K.text) || "",
|
|
4432
|
+
canLike: k,
|
|
4433
|
+
createdAt: w == null ? void 0 : w.created_at,
|
|
4489
4434
|
slugs: {
|
|
4490
4435
|
question: `${e}/${t}/${n}`,
|
|
4491
4436
|
parentId: t,
|
|
4492
|
-
reply:
|
|
4437
|
+
reply: w == null ? void 0 : w.id
|
|
4493
4438
|
},
|
|
4494
|
-
slug: `${e}/${t}/${n}#${
|
|
4439
|
+
slug: `${e}/${t}/${n}#${w == null ? void 0 : w.id}`,
|
|
4495
4440
|
author: {
|
|
4496
|
-
id: (ie =
|
|
4497
|
-
name: (
|
|
4498
|
-
organization: (
|
|
4499
|
-
jobTitle: (
|
|
4441
|
+
id: (ie = w == null ? void 0 : w.user) == null ? void 0 : ie.id,
|
|
4442
|
+
name: (se = (le = w == null ? void 0 : w.user) == null ? void 0 : le.data) == null ? void 0 : se.name,
|
|
4443
|
+
organization: (ee = (R = w == null ? void 0 : w.user) == null ? void 0 : R.data) == null ? void 0 : ee.organization,
|
|
4444
|
+
jobTitle: (ce = (oe = w == null ? void 0 : w.user) == null ? void 0 : oe.data) == null ? void 0 : ce.jobTitle,
|
|
4500
4445
|
image: {
|
|
4501
|
-
thumbnail: ((
|
|
4446
|
+
thumbnail: ((ue = (te = w == null ? void 0 : w.user) == null ? void 0 : te.data) == null ? void 0 : ue.thumbnail) || void 0
|
|
4502
4447
|
}
|
|
4503
4448
|
},
|
|
4504
|
-
userLiked: !!(
|
|
4505
|
-
likes: ((me =
|
|
4506
|
-
comments: ((pe =
|
|
4449
|
+
userLiked: !!(F != null && F.length),
|
|
4450
|
+
likes: ((me = w == null ? void 0 : w.children_counts) == null ? void 0 : me.like) || 0,
|
|
4451
|
+
comments: ((pe = w == null ? void 0 : w.children_counts) == null ? void 0 : pe.reply) || 0
|
|
4507
4452
|
},
|
|
4508
4453
|
functions: {
|
|
4509
4454
|
content: {
|
|
@@ -4512,8 +4457,8 @@ const Mo = ({ isOpen: e = !1, count: t = 0, children: n }) => {
|
|
|
4512
4457
|
updateContent: (ge, Se) => E({ replyInfo: ge, content: Se })
|
|
4513
4458
|
},
|
|
4514
4459
|
likes: {
|
|
4515
|
-
createLike: () => Q({ replyId:
|
|
4516
|
-
deleteLike: () => V({ replyId:
|
|
4460
|
+
createLike: () => Q({ replyId: w == null ? void 0 : w.id }),
|
|
4461
|
+
deleteLike: () => V({ replyId: w == null ? void 0 : w.id })
|
|
4517
4462
|
},
|
|
4518
4463
|
comments: {
|
|
4519
4464
|
openComments: () => {
|
|
@@ -4521,35 +4466,35 @@ const Mo = ({ isOpen: e = !1, count: t = 0, children: n }) => {
|
|
|
4521
4466
|
}
|
|
4522
4467
|
}
|
|
4523
4468
|
},
|
|
4524
|
-
|
|
4469
|
+
w == null ? void 0 : w.id
|
|
4525
4470
|
);
|
|
4526
4471
|
}))
|
|
4527
4472
|
] });
|
|
4528
|
-
},
|
|
4473
|
+
}, Is = ({
|
|
4529
4474
|
queryClient: e,
|
|
4530
4475
|
queryKey: t,
|
|
4531
4476
|
mutationFn: n
|
|
4532
4477
|
}) => ({
|
|
4533
4478
|
mutationFn: n,
|
|
4534
4479
|
onMutate: async ({
|
|
4535
|
-
activityInfo:
|
|
4480
|
+
activityInfo: m,
|
|
4536
4481
|
content: { body: a }
|
|
4537
4482
|
}) => {
|
|
4538
4483
|
if (a.length === 0)
|
|
4539
4484
|
return;
|
|
4540
4485
|
await e.cancelQueries({ queryKey: t });
|
|
4541
4486
|
const i = e.getQueryData(t);
|
|
4542
|
-
return i && i.id === (
|
|
4487
|
+
return i && i.id === (m == null ? void 0 : m.activityId) && (i.content = a), e.setQueryData(t, () => ({
|
|
4543
4488
|
...i
|
|
4544
4489
|
})), { previousActivity: i };
|
|
4545
4490
|
},
|
|
4546
|
-
onError: (
|
|
4491
|
+
onError: (m, a, i) => {
|
|
4547
4492
|
e.setQueryData(t, i.previousActivity);
|
|
4548
4493
|
},
|
|
4549
4494
|
onSettled: () => {
|
|
4550
4495
|
e.invalidateQueries({ queryKey: t });
|
|
4551
4496
|
}
|
|
4552
|
-
}),
|
|
4497
|
+
}), Hs = ({
|
|
4553
4498
|
queryClient: e,
|
|
4554
4499
|
queryKey: t,
|
|
4555
4500
|
mutationFn: n
|
|
@@ -4569,7 +4514,7 @@ const Mo = ({ isOpen: e = !1, count: t = 0, children: n }) => {
|
|
|
4569
4514
|
})), { previousActivity: i };
|
|
4570
4515
|
}, onSettled: () => {
|
|
4571
4516
|
e.invalidateQueries({ queryKey: t });
|
|
4572
|
-
} }),
|
|
4517
|
+
} }), Qs = ({
|
|
4573
4518
|
queryClient: e,
|
|
4574
4519
|
queryKey: t,
|
|
4575
4520
|
user: n,
|
|
@@ -4599,7 +4544,7 @@ const Mo = ({ isOpen: e = !1, count: t = 0, children: n }) => {
|
|
|
4599
4544
|
})), { previousActivity: u };
|
|
4600
4545
|
}, onSettled: () => {
|
|
4601
4546
|
e.invalidateQueries({ queryKey: t });
|
|
4602
|
-
} }),
|
|
4547
|
+
} }), Co = ({
|
|
4603
4548
|
basePath: e,
|
|
4604
4549
|
parentId: t,
|
|
4605
4550
|
activityId: n,
|
|
@@ -4607,7 +4552,7 @@ const Mo = ({ isOpen: e = !1, count: t = 0, children: n }) => {
|
|
|
4607
4552
|
functions: {
|
|
4608
4553
|
get: o,
|
|
4609
4554
|
editActivity: l,
|
|
4610
|
-
likeActivity:
|
|
4555
|
+
likeActivity: m,
|
|
4611
4556
|
unlikeActivity: a,
|
|
4612
4557
|
createReply: i,
|
|
4613
4558
|
editReply: c,
|
|
@@ -4617,60 +4562,60 @@ const Mo = ({ isOpen: e = !1, count: t = 0, children: n }) => {
|
|
|
4617
4562
|
leave: h
|
|
4618
4563
|
}
|
|
4619
4564
|
}) => {
|
|
4620
|
-
var
|
|
4621
|
-
const _ = ye(je),
|
|
4565
|
+
var L, U, G, K, ie, le, se, R, ee, oe, ce;
|
|
4566
|
+
const _ = ye(je), b = At(), {
|
|
4622
4567
|
data: g,
|
|
4623
4568
|
error: E,
|
|
4624
|
-
isLoading:
|
|
4625
|
-
isFetching:
|
|
4569
|
+
isLoading: x,
|
|
4570
|
+
isFetching: $
|
|
4626
4571
|
} = cn({
|
|
4627
4572
|
queryKey: [e, t, n],
|
|
4628
4573
|
queryFn: o
|
|
4629
|
-
}), T =
|
|
4630
|
-
queryClient:
|
|
4574
|
+
}), T = Is({
|
|
4575
|
+
queryClient: b,
|
|
4631
4576
|
queryKey: [e, t, n],
|
|
4632
|
-
mutationFn: async (
|
|
4577
|
+
mutationFn: async (te) => await l(te)
|
|
4633
4578
|
}), {
|
|
4634
4579
|
mutate: M
|
|
4635
|
-
} = fe(T), Q =
|
|
4636
|
-
queryClient:
|
|
4580
|
+
} = fe(T), Q = Hs({
|
|
4581
|
+
queryClient: b,
|
|
4637
4582
|
queryKey: [e, t, n],
|
|
4638
|
-
mutationFn:
|
|
4583
|
+
mutationFn: m
|
|
4639
4584
|
}), {
|
|
4640
4585
|
mutate: V
|
|
4641
|
-
} = fe(Q),
|
|
4642
|
-
queryClient:
|
|
4586
|
+
} = fe(Q), w = Qs({
|
|
4587
|
+
queryClient: b,
|
|
4643
4588
|
queryKey: [e, t, n],
|
|
4644
4589
|
user: _,
|
|
4645
4590
|
mutationFn: async () => {
|
|
4646
|
-
var
|
|
4647
|
-
const
|
|
4591
|
+
var ue, me, pe;
|
|
4592
|
+
const te = (pe = (me = (ue = g == null ? void 0 : g.latest_reactions) == null ? void 0 : ue.like) == null ? void 0 : me.find(
|
|
4648
4593
|
(ge) => ge.user_id === (_ == null ? void 0 : _.id)
|
|
4649
4594
|
)) == null ? void 0 : pe.id;
|
|
4650
|
-
await a({ activityId: n, reactionId:
|
|
4595
|
+
await a({ activityId: n, reactionId: te });
|
|
4651
4596
|
},
|
|
4652
4597
|
activity: g
|
|
4653
4598
|
}), {
|
|
4654
|
-
mutate:
|
|
4655
|
-
} = fe(
|
|
4656
|
-
({ activityId:
|
|
4599
|
+
mutate: F
|
|
4600
|
+
} = fe(w), q = Ee(
|
|
4601
|
+
({ activityId: te }) => V({ activityId: te }),
|
|
4657
4602
|
[V]
|
|
4658
|
-
),
|
|
4659
|
-
async ({ activityId:
|
|
4660
|
-
[
|
|
4603
|
+
), k = Ee(
|
|
4604
|
+
async ({ activityId: te }) => F({ activityId: te }),
|
|
4605
|
+
[F]
|
|
4661
4606
|
);
|
|
4662
4607
|
if (E)
|
|
4663
|
-
return /* @__PURE__ */ r.jsx(
|
|
4664
|
-
if (
|
|
4665
|
-
return /* @__PURE__ */ r.jsx(
|
|
4666
|
-
const
|
|
4608
|
+
return /* @__PURE__ */ r.jsx(rt, { variant: "error", text: E.message });
|
|
4609
|
+
if (x || $)
|
|
4610
|
+
return /* @__PURE__ */ r.jsx(ve, { style: { height: "400px" } });
|
|
4611
|
+
const Y = ((L = g == null ? void 0 : g.actor) == null ? void 0 : L.id) === (_ == null ? void 0 : _.id), B = Ft(s, Y);
|
|
4667
4612
|
return /* @__PURE__ */ r.jsx(
|
|
4668
|
-
|
|
4613
|
+
Rt,
|
|
4669
4614
|
{
|
|
4670
4615
|
content: {
|
|
4671
4616
|
type: "post",
|
|
4672
4617
|
body: g == null ? void 0 : g.content,
|
|
4673
|
-
canLike:
|
|
4618
|
+
canLike: B,
|
|
4674
4619
|
createdAt: (g == null ? void 0 : g.time) || "",
|
|
4675
4620
|
slugs: {
|
|
4676
4621
|
question: `${t}/${n}`,
|
|
@@ -4680,27 +4625,27 @@ const Mo = ({ isOpen: e = !1, count: t = 0, children: n }) => {
|
|
|
4680
4625
|
slug: n,
|
|
4681
4626
|
author: {
|
|
4682
4627
|
id: (U = g == null ? void 0 : g.actor) == null ? void 0 : U.id,
|
|
4683
|
-
name: (
|
|
4628
|
+
name: (G = g == null ? void 0 : g.actor) == null ? void 0 : G.data.name,
|
|
4684
4629
|
organization: (K = g == null ? void 0 : g.actor) == null ? void 0 : K.data.organization,
|
|
4685
4630
|
jobTitle: (ie = g == null ? void 0 : g.actor) == null ? void 0 : ie.data.jobTitle,
|
|
4686
4631
|
image: {
|
|
4687
4632
|
thumbnail: ((le = g == null ? void 0 : g.actor) == null ? void 0 : le.data.thumbnail) || void 0
|
|
4688
4633
|
}
|
|
4689
4634
|
},
|
|
4690
|
-
userLiked: ((
|
|
4635
|
+
userLiked: ((se = g == null ? void 0 : g.own_reactions) == null ? void 0 : se.like) && ((R = g == null ? void 0 : g.own_reactions) == null ? void 0 : R.like.length) > 0,
|
|
4691
4636
|
likes: g && (g == null ? void 0 : g.reaction_counts.like),
|
|
4692
4637
|
comments: g && (g == null ? void 0 : g.reaction_counts.reply)
|
|
4693
4638
|
},
|
|
4694
|
-
originalAuthorId: (
|
|
4639
|
+
originalAuthorId: (ee = g == null ? void 0 : g.actor) == null ? void 0 : ee.id,
|
|
4695
4640
|
functions: {
|
|
4696
4641
|
content: {
|
|
4697
4642
|
createContent: () => console.log("create"),
|
|
4698
4643
|
deleteContent: () => console.log("delete"),
|
|
4699
|
-
updateContent: (
|
|
4644
|
+
updateContent: (te, ue) => M({ activityInfo: te, content: ue })
|
|
4700
4645
|
},
|
|
4701
4646
|
likes: {
|
|
4702
4647
|
createLike: () => q({ activityId: n }),
|
|
4703
|
-
deleteLike: () =>
|
|
4648
|
+
deleteLike: () => k({ activityId: n })
|
|
4704
4649
|
},
|
|
4705
4650
|
comments: {
|
|
4706
4651
|
openComments: () => {
|
|
@@ -4710,16 +4655,16 @@ const Mo = ({ isOpen: e = !1, count: t = 0, children: n }) => {
|
|
|
4710
4655
|
children: /* @__PURE__ */ r.jsxs(r.Fragment, { children: [
|
|
4711
4656
|
/* @__PURE__ */ r.jsxs("h3", { children: [
|
|
4712
4657
|
"Comments (",
|
|
4713
|
-
((
|
|
4658
|
+
((oe = g == null ? void 0 : g.reaction_counts) == null ? void 0 : oe.reply) || 0,
|
|
4714
4659
|
")"
|
|
4715
4660
|
] }),
|
|
4716
4661
|
/* @__PURE__ */ r.jsx(
|
|
4717
|
-
|
|
4662
|
+
Bs,
|
|
4718
4663
|
{
|
|
4719
4664
|
basePath: e,
|
|
4720
4665
|
parentId: t,
|
|
4721
4666
|
activityId: n,
|
|
4722
|
-
repliesList: (
|
|
4667
|
+
repliesList: (ce = g == null ? void 0 : g.latest_reactions) == null ? void 0 : ce.reply,
|
|
4723
4668
|
isMember: s,
|
|
4724
4669
|
functions: {
|
|
4725
4670
|
createReply: i,
|
|
@@ -4743,85 +4688,85 @@ const Mo = ({ isOpen: e = !1, count: t = 0, children: n }) => {
|
|
|
4743
4688
|
image: { thumbnail: o }
|
|
4744
4689
|
});
|
|
4745
4690
|
export {
|
|
4746
|
-
|
|
4747
|
-
|
|
4748
|
-
|
|
4749
|
-
|
|
4750
|
-
|
|
4751
|
-
|
|
4691
|
+
Et as ASSETS_BUCKET,
|
|
4692
|
+
Mo as ActivitiesFeed,
|
|
4693
|
+
Co as ActivitySection,
|
|
4694
|
+
An as AddPost,
|
|
4695
|
+
io as BannerSection,
|
|
4696
|
+
ho as Breadcrumbs,
|
|
4752
4697
|
W as Button,
|
|
4753
|
-
|
|
4698
|
+
tt as ButtonWrapper,
|
|
4754
4699
|
as as CacheProvider,
|
|
4755
4700
|
xn as CollapsibleSection,
|
|
4756
|
-
|
|
4757
|
-
|
|
4701
|
+
xo as Columns,
|
|
4702
|
+
po as CommunityDetails,
|
|
4758
4703
|
os as Contributors,
|
|
4759
|
-
|
|
4704
|
+
Nn as ConversationContext,
|
|
4760
4705
|
gs as CookieBanner,
|
|
4761
|
-
|
|
4706
|
+
Eo as DiscussionConversation,
|
|
4762
4707
|
Cn as DiscussionForm,
|
|
4763
4708
|
$s as DiscussionLikes,
|
|
4764
|
-
|
|
4765
|
-
|
|
4766
|
-
|
|
4767
|
-
|
|
4768
|
-
|
|
4709
|
+
Rt as DiscussionPost,
|
|
4710
|
+
To as DiscussionThread,
|
|
4711
|
+
Le as Divider,
|
|
4712
|
+
oo as DownloadSection,
|
|
4713
|
+
Re as EMAILS,
|
|
4769
4714
|
bo as EmailHelperTextBox,
|
|
4770
|
-
|
|
4771
|
-
|
|
4715
|
+
rt as EmptyStateBox,
|
|
4716
|
+
go as Filters,
|
|
4772
4717
|
cs as FlagsProvider,
|
|
4773
4718
|
En as Footer,
|
|
4774
4719
|
_n as FullWidthSection,
|
|
4775
|
-
|
|
4720
|
+
fo as GlobalProviders,
|
|
4776
4721
|
Mn as Header,
|
|
4777
4722
|
Ur as HelperTextBox,
|
|
4778
4723
|
mn as HiddenFromScreenReaders,
|
|
4779
|
-
|
|
4724
|
+
uo as HideShowTextBox,
|
|
4780
4725
|
ke as HighlightedTextBox,
|
|
4781
4726
|
us as IntlProvider,
|
|
4782
|
-
|
|
4783
|
-
|
|
4727
|
+
vs as InviteForm,
|
|
4728
|
+
So as InviteModal,
|
|
4784
4729
|
yn as JoinButton,
|
|
4785
|
-
|
|
4786
|
-
|
|
4730
|
+
_o as LanguageSwitcher,
|
|
4731
|
+
nt as Link,
|
|
4787
4732
|
fs as LoadMore,
|
|
4788
|
-
|
|
4789
|
-
|
|
4733
|
+
mo as LoadingBlock,
|
|
4734
|
+
ve as LoadingPlaceholder,
|
|
4790
4735
|
ns as LoadingState,
|
|
4791
4736
|
jn as Logo,
|
|
4792
|
-
|
|
4737
|
+
ao as LogoSection,
|
|
4793
4738
|
nn as MarkdownText,
|
|
4794
|
-
|
|
4795
|
-
|
|
4796
|
-
|
|
4739
|
+
lo as MarketingBox,
|
|
4740
|
+
Pt as Member,
|
|
4741
|
+
jo as MembersList,
|
|
4797
4742
|
Ts as Modal,
|
|
4798
4743
|
ps as MoreMenu,
|
|
4799
|
-
|
|
4744
|
+
co as NUMBER_OF_USERS,
|
|
4800
4745
|
Dn as Overlay,
|
|
4801
|
-
|
|
4802
|
-
|
|
4746
|
+
ko as PageLayout,
|
|
4747
|
+
vo as PasswordRules,
|
|
4803
4748
|
qr as Pill,
|
|
4804
|
-
|
|
4749
|
+
Dt as ProfilePicture,
|
|
4805
4750
|
es as ProgressBar,
|
|
4806
|
-
|
|
4807
|
-
|
|
4808
|
-
|
|
4751
|
+
wo as Rating,
|
|
4752
|
+
Bs as RepliesFeed,
|
|
4753
|
+
$o as ResponsesHeading,
|
|
4809
4754
|
Br as ResponsiveImage,
|
|
4810
|
-
|
|
4755
|
+
bs as SearchForm,
|
|
4811
4756
|
Zr as Span,
|
|
4812
|
-
|
|
4813
|
-
|
|
4757
|
+
$t as StatusBanner,
|
|
4758
|
+
yo as Tags,
|
|
4814
4759
|
Ir as Tooltip,
|
|
4815
4760
|
je as UserContext,
|
|
4816
4761
|
ds as UserProvider,
|
|
4817
|
-
|
|
4762
|
+
ne as VisuallyHidden,
|
|
4818
4763
|
Ms as addAriaProps,
|
|
4819
4764
|
kn as getMember,
|
|
4820
4765
|
Xe as headerData,
|
|
4821
4766
|
Ao as mapGetStreamData,
|
|
4822
4767
|
jr as useCurrentPath,
|
|
4823
4768
|
Ce as useEffectAfterMount,
|
|
4824
|
-
|
|
4769
|
+
et as useScreenWidth,
|
|
4825
4770
|
Sr as useScrollListener,
|
|
4826
|
-
|
|
4771
|
+
so as useScrollToHash
|
|
4827
4772
|
};
|