@articles-media/articles-dev-box 1.0.14 → 1.0.16
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/Ad.cjs +1 -1
- package/dist/Ad.js +199 -195
- package/dist/FriendsList.cjs +1 -1
- package/dist/FriendsList.js +85 -96
- package/dist/GameScoreboard.cjs +1 -1
- package/dist/GameScoreboard.js +45 -37
- package/dist/ReturnToLauncherButton.cjs +1 -1
- package/dist/ReturnToLauncherButton.js +19 -14
- package/dist/index.cjs +1 -1
- package/dist/index.js +10 -8
- package/dist/useUserFriends.cjs +1 -0
- package/dist/useUserFriends.js +52 -0
- package/package.json +5 -1
package/dist/Ad.js
CHANGED
|
@@ -1,102 +1,102 @@
|
|
|
1
1
|
import { j as e } from "./jsx-runtime-tc70JA_2.js";
|
|
2
|
-
import * as
|
|
3
|
-
import { lazy as
|
|
4
|
-
import { t as
|
|
5
|
-
import { u as
|
|
6
|
-
import { A as
|
|
7
|
-
import { c as
|
|
8
|
-
var
|
|
9
|
-
function
|
|
10
|
-
return s ? (
|
|
2
|
+
import * as A from "react";
|
|
3
|
+
import { lazy as G, memo as re, useState as p, useEffect as y } from "react";
|
|
4
|
+
import { t as X, m as H, n as ne, A as ie, L as E } from "./numberWithCommas-DnAkiOFL.js";
|
|
5
|
+
import { u as J, a as k } from "./index-DLYx67wi.js";
|
|
6
|
+
import { A as oe } from "./Button-_Quon8UV.js";
|
|
7
|
+
import { c as le } from "./index-YnD2EP-S.js";
|
|
8
|
+
var S = /* @__PURE__ */ new Map(), I = /* @__PURE__ */ new WeakMap(), z = 0, de;
|
|
9
|
+
function ce(s) {
|
|
10
|
+
return s ? (I.has(s) || (z += 1, I.set(s, z.toString())), I.get(s)) : "0";
|
|
11
11
|
}
|
|
12
|
-
function
|
|
12
|
+
function ue(s) {
|
|
13
13
|
return Object.keys(s).sort().filter(
|
|
14
14
|
(t) => s[t] !== void 0
|
|
15
|
-
).map((t) => `${t}_${t === "root" ?
|
|
15
|
+
).map((t) => `${t}_${t === "root" ? ce(s.root) : s[t]}`).toString();
|
|
16
16
|
}
|
|
17
|
-
function
|
|
18
|
-
const t =
|
|
19
|
-
let
|
|
20
|
-
if (!
|
|
17
|
+
function me(s) {
|
|
18
|
+
const t = ue(s);
|
|
19
|
+
let l = S.get(t);
|
|
20
|
+
if (!l) {
|
|
21
21
|
const r = /* @__PURE__ */ new Map();
|
|
22
|
-
let
|
|
23
|
-
const
|
|
24
|
-
|
|
25
|
-
var
|
|
26
|
-
const
|
|
27
|
-
s.trackVisibility && typeof
|
|
28
|
-
|
|
22
|
+
let o;
|
|
23
|
+
const c = new IntersectionObserver((u) => {
|
|
24
|
+
u.forEach((n) => {
|
|
25
|
+
var h;
|
|
26
|
+
const N = n.isIntersecting && o.some((f) => n.intersectionRatio >= f);
|
|
27
|
+
s.trackVisibility && typeof n.isVisible > "u" && (n.isVisible = N), (h = r.get(n.target)) == null || h.forEach((f) => {
|
|
28
|
+
f(N, n);
|
|
29
29
|
});
|
|
30
30
|
});
|
|
31
31
|
}, s);
|
|
32
|
-
|
|
32
|
+
o = c.thresholds || (Array.isArray(s.threshold) ? s.threshold : [s.threshold || 0]), l = {
|
|
33
33
|
id: t,
|
|
34
|
-
observer:
|
|
34
|
+
observer: c,
|
|
35
35
|
elements: r
|
|
36
|
-
},
|
|
36
|
+
}, S.set(t, l);
|
|
37
37
|
}
|
|
38
|
-
return
|
|
38
|
+
return l;
|
|
39
39
|
}
|
|
40
|
-
function
|
|
40
|
+
function he(s, t, l = {}, r = de) {
|
|
41
41
|
if (typeof window.IntersectionObserver > "u" && r !== void 0) {
|
|
42
|
-
const
|
|
42
|
+
const h = s.getBoundingClientRect();
|
|
43
43
|
return t(r, {
|
|
44
44
|
isIntersecting: r,
|
|
45
45
|
target: s,
|
|
46
|
-
intersectionRatio: typeof
|
|
46
|
+
intersectionRatio: typeof l.threshold == "number" ? l.threshold : 0,
|
|
47
47
|
time: 0,
|
|
48
|
-
boundingClientRect:
|
|
49
|
-
intersectionRect:
|
|
50
|
-
rootBounds:
|
|
48
|
+
boundingClientRect: h,
|
|
49
|
+
intersectionRect: h,
|
|
50
|
+
rootBounds: h
|
|
51
51
|
}), () => {
|
|
52
52
|
};
|
|
53
53
|
}
|
|
54
|
-
const { id:
|
|
55
|
-
return
|
|
56
|
-
|
|
54
|
+
const { id: o, observer: c, elements: u } = me(l), n = u.get(s) || [];
|
|
55
|
+
return u.has(s) || u.set(s, n), n.push(t), c.observe(s), function() {
|
|
56
|
+
n.splice(n.indexOf(t), 1), n.length === 0 && (u.delete(s), c.unobserve(s)), u.size === 0 && (c.disconnect(), S.delete(o));
|
|
57
57
|
};
|
|
58
58
|
}
|
|
59
|
-
function
|
|
59
|
+
function fe({
|
|
60
60
|
threshold: s,
|
|
61
61
|
delay: t,
|
|
62
|
-
trackVisibility:
|
|
62
|
+
trackVisibility: l,
|
|
63
63
|
rootMargin: r,
|
|
64
|
-
root:
|
|
65
|
-
triggerOnce:
|
|
66
|
-
skip:
|
|
67
|
-
initialInView:
|
|
68
|
-
fallbackInView:
|
|
69
|
-
onChange:
|
|
64
|
+
root: o,
|
|
65
|
+
triggerOnce: c,
|
|
66
|
+
skip: u,
|
|
67
|
+
initialInView: n,
|
|
68
|
+
fallbackInView: h,
|
|
69
|
+
onChange: N
|
|
70
70
|
} = {}) {
|
|
71
|
-
var
|
|
72
|
-
const [
|
|
73
|
-
inView: !!
|
|
71
|
+
var f;
|
|
72
|
+
const [_, b] = A.useState(null), a = A.useRef(N), i = A.useRef(n), [M, C] = A.useState({
|
|
73
|
+
inView: !!n,
|
|
74
74
|
entry: void 0
|
|
75
75
|
});
|
|
76
|
-
|
|
76
|
+
a.current = N, A.useEffect(
|
|
77
77
|
() => {
|
|
78
|
-
if (
|
|
79
|
-
let
|
|
80
|
-
return
|
|
81
|
-
|
|
82
|
-
(
|
|
83
|
-
const
|
|
84
|
-
|
|
85
|
-
inView:
|
|
86
|
-
entry:
|
|
87
|
-
}),
|
|
78
|
+
if (i.current === void 0 && (i.current = n), u || !_) return;
|
|
79
|
+
let x;
|
|
80
|
+
return x = he(
|
|
81
|
+
_,
|
|
82
|
+
(v, j) => {
|
|
83
|
+
const $ = i.current;
|
|
84
|
+
i.current = v, !($ === void 0 && !v) && (C({
|
|
85
|
+
inView: v,
|
|
86
|
+
entry: j
|
|
87
|
+
}), a.current && a.current(v, j), j.isIntersecting && c && x && (x(), x = void 0));
|
|
88
88
|
},
|
|
89
89
|
{
|
|
90
|
-
root:
|
|
90
|
+
root: o,
|
|
91
91
|
rootMargin: r,
|
|
92
92
|
threshold: s,
|
|
93
93
|
// @ts-expect-error
|
|
94
|
-
trackVisibility:
|
|
94
|
+
trackVisibility: l,
|
|
95
95
|
delay: t
|
|
96
96
|
},
|
|
97
|
-
|
|
97
|
+
h
|
|
98
98
|
), () => {
|
|
99
|
-
|
|
99
|
+
x && x();
|
|
100
100
|
};
|
|
101
101
|
},
|
|
102
102
|
// We break the rule here, because we aren't including the actual `threshold` variable
|
|
@@ -104,28 +104,28 @@ function me({
|
|
|
104
104
|
[
|
|
105
105
|
// If the threshold is an array, convert it to a string, so it won't change between renders.
|
|
106
106
|
Array.isArray(s) ? s.toString() : s,
|
|
107
|
-
|
|
108
|
-
n,
|
|
109
|
-
r,
|
|
110
|
-
u,
|
|
111
|
-
f,
|
|
107
|
+
_,
|
|
112
108
|
o,
|
|
109
|
+
r,
|
|
113
110
|
c,
|
|
111
|
+
u,
|
|
112
|
+
l,
|
|
113
|
+
h,
|
|
114
114
|
t
|
|
115
115
|
]
|
|
116
116
|
);
|
|
117
|
-
const
|
|
118
|
-
!
|
|
119
|
-
inView: !!
|
|
117
|
+
const D = (f = M.entry) == null ? void 0 : f.target, R = A.useRef(void 0);
|
|
118
|
+
!_ && D && !c && !u && R.current !== D && (R.current = D, C({
|
|
119
|
+
inView: !!n,
|
|
120
120
|
entry: void 0
|
|
121
|
-
}),
|
|
122
|
-
const m = [
|
|
121
|
+
}), i.current = n);
|
|
122
|
+
const m = [b, M.inView, M.entry];
|
|
123
123
|
return m.ref = m[0], m.inView = m[1], m.entry = m[2], m;
|
|
124
124
|
}
|
|
125
|
-
const
|
|
125
|
+
const pe = async (s) => {
|
|
126
126
|
if (process.env.NODE_ENV === "development")
|
|
127
127
|
try {
|
|
128
|
-
return (await
|
|
128
|
+
return (await k.get(`http://localhost:3001/api/ads/${s.ad_id}`, {
|
|
129
129
|
params: {
|
|
130
130
|
ad_id: s.ad_id,
|
|
131
131
|
user_ad_token: s.user_ad_token
|
|
@@ -133,213 +133,216 @@ const fe = async (s) => {
|
|
|
133
133
|
})).data.result;
|
|
134
134
|
} catch {
|
|
135
135
|
}
|
|
136
|
-
return
|
|
136
|
+
return k.get(s.url, {
|
|
137
137
|
params: {
|
|
138
138
|
ad_id: s.ad_id
|
|
139
139
|
}
|
|
140
140
|
}).then((t) => t.data.result);
|
|
141
|
-
},
|
|
142
|
-
dedupingInterval: 1e3 * 60 *
|
|
141
|
+
}, ve = 60, ge = {
|
|
142
|
+
dedupingInterval: 1e3 * 60 * ve
|
|
143
143
|
// keepPreviousData: true,
|
|
144
144
|
// fallbackData: []
|
|
145
|
-
},
|
|
146
|
-
const { data:
|
|
145
|
+
}, xe = (s, t) => {
|
|
146
|
+
const { data: l, error: r, isLoading: o, mutate: c } = J(
|
|
147
147
|
s ? {
|
|
148
148
|
url: `https://articles.media/api/ads/${s}`,
|
|
149
149
|
ad_id: s,
|
|
150
150
|
user_ad_token: t
|
|
151
151
|
} : null,
|
|
152
|
-
|
|
153
|
-
|
|
152
|
+
pe,
|
|
153
|
+
ge
|
|
154
154
|
);
|
|
155
155
|
return {
|
|
156
|
-
data:
|
|
156
|
+
data: l,
|
|
157
157
|
error: r,
|
|
158
|
-
isLoading:
|
|
159
|
-
mutate:
|
|
158
|
+
isLoading: o,
|
|
159
|
+
mutate: c
|
|
160
160
|
};
|
|
161
161
|
};
|
|
162
|
-
function
|
|
162
|
+
function je(s) {
|
|
163
163
|
return (t) => {
|
|
164
164
|
const r = (s ? Math[s] : Math.trunc)(t);
|
|
165
165
|
return r === 0 ? 0 : r;
|
|
166
166
|
};
|
|
167
167
|
}
|
|
168
|
-
function
|
|
169
|
-
return +
|
|
168
|
+
function Ne(s, t) {
|
|
169
|
+
return +X(s) - +X(t);
|
|
170
170
|
}
|
|
171
|
-
function
|
|
172
|
-
const r =
|
|
173
|
-
return
|
|
171
|
+
function q(s, t, l) {
|
|
172
|
+
const r = Ne(s, t) / H;
|
|
173
|
+
return je(l?.roundingMethod)(r);
|
|
174
174
|
}
|
|
175
|
-
function
|
|
176
|
-
return Math.trunc(s *
|
|
175
|
+
function K(s) {
|
|
176
|
+
return Math.trunc(s * H);
|
|
177
177
|
}
|
|
178
|
-
const
|
|
178
|
+
const be = async (s) => {
|
|
179
179
|
if (process.env.NODE_ENV === "development")
|
|
180
180
|
try {
|
|
181
|
-
return (await
|
|
181
|
+
return (await k.get("http://localhost:3001/api/ads", {
|
|
182
182
|
params: {
|
|
183
183
|
// ad_id: data.ad_id
|
|
184
184
|
}
|
|
185
185
|
})).data;
|
|
186
186
|
} catch {
|
|
187
187
|
}
|
|
188
|
-
return
|
|
188
|
+
return k.get(s.url, {
|
|
189
189
|
params: {
|
|
190
190
|
// ad_id: data.ad_id
|
|
191
191
|
}
|
|
192
192
|
}).then((t) => t.data);
|
|
193
|
-
},
|
|
194
|
-
dedupingInterval:
|
|
195
|
-
focusThrottleInterval:
|
|
193
|
+
}, F = 60, _e = {
|
|
194
|
+
dedupingInterval: K(F),
|
|
195
|
+
focusThrottleInterval: K(F)
|
|
196
196
|
// keepPreviousData: true,
|
|
197
197
|
// fallbackData: []
|
|
198
|
-
},
|
|
199
|
-
const { data: t, error:
|
|
198
|
+
}, we = (s) => {
|
|
199
|
+
const { data: t, error: l, isLoading: r, mutate: o } = J(
|
|
200
200
|
s?.loading || s?.disabled ? null : {
|
|
201
201
|
url: "https://articles.media/api/ads"
|
|
202
202
|
// ad_id
|
|
203
203
|
},
|
|
204
|
-
|
|
205
|
-
|
|
204
|
+
be,
|
|
205
|
+
_e
|
|
206
206
|
);
|
|
207
207
|
return {
|
|
208
208
|
data: t,
|
|
209
|
-
error:
|
|
209
|
+
error: l,
|
|
210
210
|
isLoading: r,
|
|
211
|
-
mutate:
|
|
211
|
+
mutate: o
|
|
212
212
|
};
|
|
213
|
-
},
|
|
214
|
-
function
|
|
213
|
+
}, Ae = G(() => import("./AdDetailsModal-Bp5hZm9N.js")), ke = G(() => import("./AdConfirmExitModal-CKkMAvBK.js"));
|
|
214
|
+
function ye(s, t) {
|
|
215
215
|
return Math.floor(Math.random() * (t - s + 1)) + s;
|
|
216
216
|
}
|
|
217
|
-
function
|
|
217
|
+
function Me(s) {
|
|
218
218
|
let {
|
|
219
219
|
previewMode: t,
|
|
220
|
-
darkMode:
|
|
220
|
+
darkMode: l,
|
|
221
221
|
user_ad_token: r,
|
|
222
|
-
userDetails:
|
|
223
|
-
userDetailsLoading:
|
|
222
|
+
userDetails: o,
|
|
223
|
+
userDetailsLoading: c,
|
|
224
|
+
prepend: u,
|
|
225
|
+
append: n
|
|
224
226
|
} = s;
|
|
225
|
-
const
|
|
226
|
-
data:
|
|
227
|
-
} =
|
|
227
|
+
const h = !1, N = [], [f, _] = p(null), {
|
|
228
|
+
data: b
|
|
229
|
+
} = we(
|
|
228
230
|
{
|
|
229
|
-
loading:
|
|
230
|
-
disabled:
|
|
231
|
+
loading: c,
|
|
232
|
+
disabled: o?.articles_membership?.status == "Active"
|
|
231
233
|
}
|
|
232
|
-
), { data: a } =
|
|
233
|
-
let
|
|
234
|
-
const [M,
|
|
234
|
+
), { data: a } = xe(f, r);
|
|
235
|
+
let i = s.previewData || {};
|
|
236
|
+
const [M, C] = p(null), [D, R] = p(null), [m, x] = p(null), [v, j] = p(0), [$, Q] = p(!1), [L, V] = p(!1), [Y, O] = p(!1), [De, Ee] = p(/* @__PURE__ */ new Date()), [T, Z] = p([]);
|
|
235
237
|
y(() => {
|
|
236
|
-
|
|
237
|
-
}, [
|
|
238
|
+
b && b?.length > 0 && !f && (console.log("Ad Mounted or reduxAds changed"), _(s.ad_id || b[ye(0, b?.length - 1)]?._id));
|
|
239
|
+
}, [b]), y(() => {
|
|
238
240
|
}, [a]), y(() => {
|
|
239
|
-
a?.populated_promos &&
|
|
240
|
-
}, [
|
|
241
|
-
function
|
|
242
|
-
|
|
241
|
+
a?.populated_promos && v >= 0 && x(a?.populated_promos[v]);
|
|
242
|
+
}, [v, a]);
|
|
243
|
+
function ee() {
|
|
244
|
+
V(!L);
|
|
243
245
|
}
|
|
244
|
-
const { ref:
|
|
246
|
+
const { ref: se, inView: w } = fe({
|
|
245
247
|
/* Optional options */
|
|
246
248
|
threshold: 0,
|
|
247
249
|
triggerOnce: !0
|
|
248
250
|
});
|
|
249
|
-
function
|
|
250
|
-
if (t && console.log("Preventing this event from being logged as this ad is being shown in preview mode."),
|
|
251
|
+
function B(d) {
|
|
252
|
+
if (t && console.log("Preventing this event from being logged as this ad is being shown in preview mode."), T.find((g) => g == d)) {
|
|
251
253
|
console.log("Already logged this event");
|
|
252
254
|
return;
|
|
253
255
|
}
|
|
254
|
-
|
|
256
|
+
k.get("/api/ads/event", {
|
|
255
257
|
params: {
|
|
256
258
|
ad_id: a?._id,
|
|
257
|
-
event:
|
|
259
|
+
event: d
|
|
258
260
|
}
|
|
259
261
|
}).then(function(g) {
|
|
260
|
-
|
|
262
|
+
Z([...T, d]), console.log(g.data);
|
|
261
263
|
}).catch(function(g) {
|
|
262
264
|
console.log(g);
|
|
263
265
|
});
|
|
264
266
|
}
|
|
265
267
|
y(() => {
|
|
266
|
-
if (!t && (console.log("inView",
|
|
267
|
-
let
|
|
268
|
+
if (!t && (console.log("inView", w), w && f)) {
|
|
269
|
+
let d = [
|
|
268
270
|
{
|
|
269
|
-
ad_id:
|
|
271
|
+
ad_id: f,
|
|
270
272
|
date: (/* @__PURE__ */ new Date()).toString()
|
|
271
273
|
},
|
|
272
|
-
...
|
|
274
|
+
...N.filter((g) => {
|
|
273
275
|
if (console.log(
|
|
274
|
-
|
|
275
|
-
),
|
|
276
|
+
q(/* @__PURE__ */ new Date(), new Date(g.date))
|
|
277
|
+
), q(/* @__PURE__ */ new Date(), new Date(g.date)) > 5) {
|
|
276
278
|
console.log("adsViewed - Remove Old Ad View Object");
|
|
277
279
|
return;
|
|
278
280
|
} else
|
|
279
281
|
return console.log("adsViewed - Keep Ad View Object"), g;
|
|
280
282
|
})
|
|
281
283
|
];
|
|
282
|
-
console.log("unexpiredRecentViews",
|
|
284
|
+
console.log("unexpiredRecentViews", d);
|
|
283
285
|
}
|
|
284
|
-
}, [
|
|
285
|
-
const [
|
|
286
|
-
function
|
|
287
|
-
|
|
286
|
+
}, [w, f]);
|
|
287
|
+
const [W, te] = p(null), [ae, P] = p(!1);
|
|
288
|
+
function U() {
|
|
289
|
+
P(!0), console.log("logAdAvoided called", r), k.get(
|
|
288
290
|
process.env.NODE_ENV === "development" ? "http://localhost:3001/api/user/advertising/avoided" : "https://articles.media/api/user/advertising/avoided",
|
|
289
291
|
{
|
|
290
292
|
params: {
|
|
291
|
-
user_id:
|
|
293
|
+
user_id: o?._id
|
|
292
294
|
},
|
|
293
295
|
headers: {
|
|
294
296
|
"x-articles-api-key": r
|
|
295
297
|
}
|
|
296
298
|
}
|
|
297
|
-
).then(function(
|
|
298
|
-
|
|
299
|
-
}).catch(function(
|
|
300
|
-
console.log(
|
|
299
|
+
).then(function(d) {
|
|
300
|
+
P(!1), te(d.data.avoided_count), console.log(d.data);
|
|
301
|
+
}).catch(function(d) {
|
|
302
|
+
console.log(d), P(!1);
|
|
301
303
|
});
|
|
302
304
|
}
|
|
303
305
|
return y(() => {
|
|
304
|
-
t || (console.log("inView",
|
|
305
|
-
}, [
|
|
306
|
+
t || (console.log("inView", w), o?.articles_membership?.status == "Active" && w && U());
|
|
307
|
+
}, [w, o]), c ? null : /* @__PURE__ */ e.jsxs(
|
|
306
308
|
"div",
|
|
307
309
|
{
|
|
308
|
-
ref:
|
|
309
|
-
className:
|
|
310
|
+
ref: se,
|
|
311
|
+
className: le(
|
|
310
312
|
"ad-wrap",
|
|
311
313
|
{
|
|
312
|
-
"active-member":
|
|
314
|
+
"active-member": o?.articles_membership?.status == "Active"
|
|
313
315
|
}
|
|
314
316
|
),
|
|
315
317
|
style: {
|
|
316
|
-
"--articles-ad-background-color":
|
|
317
|
-
"--articles-ad-font-color":
|
|
318
|
-
"--articles-ad-border-color":
|
|
318
|
+
"--articles-ad-background-color": i.background_color || a?.background_color,
|
|
319
|
+
"--articles-ad-font-color": i.font_color || a?.font_color,
|
|
320
|
+
"--articles-ad-border-color": i.border_color || a?.border_color
|
|
319
321
|
},
|
|
320
322
|
children: [
|
|
321
|
-
|
|
322
|
-
|
|
323
|
+
L && /* @__PURE__ */ e.jsx(
|
|
324
|
+
Ae,
|
|
323
325
|
{
|
|
324
|
-
setModalShow:
|
|
326
|
+
setModalShow: V,
|
|
325
327
|
ad: a,
|
|
326
|
-
previewData:
|
|
328
|
+
previewData: i
|
|
327
329
|
}
|
|
328
330
|
),
|
|
329
|
-
|
|
330
|
-
|
|
331
|
+
Y && /* @__PURE__ */ e.jsx(
|
|
332
|
+
ke,
|
|
331
333
|
{
|
|
332
|
-
setModalShow:
|
|
334
|
+
setModalShow: O,
|
|
333
335
|
ad: a,
|
|
334
|
-
previewData:
|
|
336
|
+
previewData: i
|
|
335
337
|
}
|
|
336
338
|
),
|
|
339
|
+
u && /* @__PURE__ */ e.jsx("div", { className: "prepend-container", children: u }),
|
|
337
340
|
/* @__PURE__ */ e.jsxs(
|
|
338
341
|
"div",
|
|
339
342
|
{
|
|
340
343
|
className: "ad",
|
|
341
344
|
children: [
|
|
342
|
-
|
|
345
|
+
o?.articles_membership?.status !== "Active" && /* @__PURE__ */ e.jsxs(
|
|
343
346
|
"div",
|
|
344
347
|
{
|
|
345
348
|
className: "main-panel",
|
|
@@ -350,10 +353,10 @@ function ke(s) {
|
|
|
350
353
|
] }) }),
|
|
351
354
|
/* @__PURE__ */ e.jsxs("div", { className: "content-wrap", children: [
|
|
352
355
|
/* @__PURE__ */ e.jsxs("div", { className: "photo-banner", children: [
|
|
353
|
-
/* @__PURE__ */ e.jsx("div", { className: "logo", children: (
|
|
356
|
+
/* @__PURE__ */ e.jsx("div", { className: "logo", children: (i.logo?.location || a?.logo?.location) && /* @__PURE__ */ e.jsx(
|
|
354
357
|
"img",
|
|
355
358
|
{
|
|
356
|
-
src:
|
|
359
|
+
src: i?.logo?.key ? `${process.env.NEXT_PUBLIC_CDN}${i?.logo?.key}` : `${process.env.NEXT_PUBLIC_CDN}${a?.logo?.key}`,
|
|
357
360
|
alt: ""
|
|
358
361
|
}
|
|
359
362
|
) }),
|
|
@@ -362,14 +365,14 @@ function ke(s) {
|
|
|
362
365
|
"img",
|
|
363
366
|
{
|
|
364
367
|
className: "photo",
|
|
365
|
-
src:
|
|
368
|
+
src: i?.background?.key ? `${process.env.NEXT_PUBLIC_CDN}${i.background?.key}` : `${process.env.NEXT_PUBLIC_CDN}${a?.background?.key}`,
|
|
366
369
|
alt: ""
|
|
367
370
|
}
|
|
368
371
|
)
|
|
369
372
|
] }),
|
|
370
373
|
/* @__PURE__ */ e.jsxs("div", { className: "details-wrap", children: [
|
|
371
374
|
/* @__PURE__ */ e.jsxs("div", { className: "detail-title", children: [
|
|
372
|
-
/* @__PURE__ */ e.jsx("div", { className: "detail", children: /* @__PURE__ */ e.jsx("span", { className: "h4", children:
|
|
375
|
+
/* @__PURE__ */ e.jsx("div", { className: "detail", children: /* @__PURE__ */ e.jsx("span", { className: "h4", children: i?.business || a?.business }) }),
|
|
373
376
|
/* @__PURE__ */ e.jsxs("div", { className: "flex flex-column d-none", children: [
|
|
374
377
|
/* @__PURE__ */ e.jsxs("div", { className: "detail", children: [
|
|
375
378
|
/* @__PURE__ */ e.jsx("span", { className: "icon", children: /* @__PURE__ */ e.jsx("i", { className: "fas fa-search-location" }) }),
|
|
@@ -386,33 +389,33 @@ function ke(s) {
|
|
|
386
389
|
] })
|
|
387
390
|
] }),
|
|
388
391
|
a?.city && /* @__PURE__ */ e.jsx("div", { className: "details mb-3 d-none" }),
|
|
389
|
-
/* @__PURE__ */ e.jsx("div", { className: "short-description", children:
|
|
392
|
+
/* @__PURE__ */ e.jsx("div", { className: "short-description", children: i?.description || a?.description })
|
|
390
393
|
] })
|
|
391
394
|
] }),
|
|
392
|
-
|
|
393
|
-
|
|
395
|
+
h?.roles?.isDev && a?.populated_promos?.length > 0 && /* @__PURE__ */ e.jsxs("div", { children: [
|
|
396
|
+
m && /* @__PURE__ */ e.jsx("div", { className: "promos-wrap", children: m && /* @__PURE__ */ e.jsxs(
|
|
394
397
|
"div",
|
|
395
398
|
{
|
|
396
399
|
className: "promo-wrap d-flex justify-content-between align-items-center mx-2 p-1 px-2 border border-2 border-light mb-0",
|
|
397
400
|
children: [
|
|
398
401
|
/* @__PURE__ */ e.jsxs("div", { className: "", children: [
|
|
399
|
-
/* @__PURE__ */ e.jsx("div", { children:
|
|
400
|
-
/* @__PURE__ */ e.jsx("div", { className: "small", children: /* @__PURE__ */ e.jsx("div", { className: "small", children:
|
|
402
|
+
/* @__PURE__ */ e.jsx("div", { children: m.title }),
|
|
403
|
+
/* @__PURE__ */ e.jsx("div", { className: "small", children: /* @__PURE__ */ e.jsx("div", { className: "small", children: m.details }) })
|
|
401
404
|
] }),
|
|
402
405
|
/* @__PURE__ */ e.jsx(
|
|
403
|
-
|
|
406
|
+
oe,
|
|
404
407
|
{
|
|
405
408
|
className: "px-3",
|
|
406
409
|
small: !0,
|
|
407
410
|
onClick: () => {
|
|
408
|
-
console.log("Load Save Modal"),
|
|
411
|
+
console.log("Load Save Modal"), Q(!0);
|
|
409
412
|
},
|
|
410
413
|
children: "Save"
|
|
411
414
|
}
|
|
412
415
|
)
|
|
413
416
|
]
|
|
414
417
|
},
|
|
415
|
-
|
|
418
|
+
m._id
|
|
416
419
|
) }),
|
|
417
420
|
/* @__PURE__ */ e.jsxs("div", { className: "d-flex justify-content-between", children: [
|
|
418
421
|
/* @__PURE__ */ e.jsxs("div", { className: "px-2", children: [
|
|
@@ -426,17 +429,17 @@ function ke(s) {
|
|
|
426
429
|
className: "fad fa-arrow-circle-left",
|
|
427
430
|
type: "button",
|
|
428
431
|
onClick: () => {
|
|
429
|
-
|
|
432
|
+
v == 0 ? j(a?.populated_promos?.length - 1) : j((d) => d - 1);
|
|
430
433
|
}
|
|
431
434
|
}
|
|
432
435
|
),
|
|
433
436
|
a?.populated_promos?.map(
|
|
434
|
-
(
|
|
437
|
+
(d, g) => /* @__PURE__ */ e.jsx(
|
|
435
438
|
"i",
|
|
436
439
|
{
|
|
437
|
-
className: `fa-square ${g ==
|
|
440
|
+
className: `fa-square ${g == v ? "fad" : "fas"}`
|
|
438
441
|
},
|
|
439
|
-
|
|
442
|
+
d._id
|
|
440
443
|
)
|
|
441
444
|
),
|
|
442
445
|
/* @__PURE__ */ e.jsx(
|
|
@@ -445,7 +448,7 @@ function ke(s) {
|
|
|
445
448
|
className: "fad fa-arrow-circle-right",
|
|
446
449
|
type: "button",
|
|
447
450
|
onClick: () => {
|
|
448
|
-
|
|
451
|
+
v == a?.populated_promos?.length - 1 ? j(0) : j((d) => d + 1);
|
|
449
452
|
}
|
|
450
453
|
}
|
|
451
454
|
)
|
|
@@ -458,7 +461,7 @@ function ke(s) {
|
|
|
458
461
|
"div",
|
|
459
462
|
{
|
|
460
463
|
onClick: () => {
|
|
461
|
-
|
|
464
|
+
ee(), B("Details");
|
|
462
465
|
},
|
|
463
466
|
className: "action flex-grow-1 flex-shrink-0",
|
|
464
467
|
children: "Details"
|
|
@@ -472,8 +475,8 @@ function ke(s) {
|
|
|
472
475
|
href: a?.website,
|
|
473
476
|
target: "_blank",
|
|
474
477
|
rel: "noreferrer",
|
|
475
|
-
onClick: (
|
|
476
|
-
|
|
478
|
+
onClick: (d) => {
|
|
479
|
+
d.preventDefault(), O(!0), B("Confirm Exit Modal Opened");
|
|
477
480
|
},
|
|
478
481
|
children: /* @__PURE__ */ e.jsx("div", { children: "Website" })
|
|
479
482
|
}
|
|
@@ -482,7 +485,7 @@ function ke(s) {
|
|
|
482
485
|
]
|
|
483
486
|
}
|
|
484
487
|
),
|
|
485
|
-
|
|
488
|
+
o?.articles_membership?.status == "Active" && /* @__PURE__ */ e.jsx(
|
|
486
489
|
"div",
|
|
487
490
|
{
|
|
488
491
|
className: "main-panel",
|
|
@@ -496,7 +499,7 @@ function ke(s) {
|
|
|
496
499
|
"div",
|
|
497
500
|
{
|
|
498
501
|
className: "count",
|
|
499
|
-
children:
|
|
502
|
+
children: ae ? /* @__PURE__ */ e.jsx("i", { className: "fas fa-spinner fa-spin me-0" }) : W ? ne(W) : 0
|
|
500
503
|
}
|
|
501
504
|
),
|
|
502
505
|
/* @__PURE__ */ e.jsx("div", { className: "label", children: "ads avoided." })
|
|
@@ -508,7 +511,7 @@ function ke(s) {
|
|
|
508
511
|
className: "member-since",
|
|
509
512
|
children: [
|
|
510
513
|
"Member since: ",
|
|
511
|
-
/* @__PURE__ */ e.jsx(
|
|
514
|
+
/* @__PURE__ */ e.jsx(ie, { format: "PP", date: o?.articles_membership?.membership_started })
|
|
512
515
|
]
|
|
513
516
|
}
|
|
514
517
|
)
|
|
@@ -519,7 +522,7 @@ function ke(s) {
|
|
|
519
522
|
/* @__PURE__ */ e.jsx("div", { className: "mb-2", children: "Without support from users like you, we wouldn't be here." }),
|
|
520
523
|
/* @__PURE__ */ e.jsxs("div", { className: "links-list", children: [
|
|
521
524
|
/* @__PURE__ */ e.jsxs(
|
|
522
|
-
|
|
525
|
+
E,
|
|
523
526
|
{
|
|
524
527
|
newPage: !0,
|
|
525
528
|
className: "link-item",
|
|
@@ -531,13 +534,13 @@ function ke(s) {
|
|
|
531
534
|
}
|
|
532
535
|
),
|
|
533
536
|
/* @__PURE__ */ e.jsxs(
|
|
534
|
-
|
|
537
|
+
E,
|
|
535
538
|
{
|
|
536
539
|
newPage: !0,
|
|
537
540
|
className: "link-item",
|
|
538
541
|
href: "https://articles.media/settings/notifications",
|
|
539
542
|
onClick: () => {
|
|
540
|
-
|
|
543
|
+
U();
|
|
541
544
|
},
|
|
542
545
|
children: [
|
|
543
546
|
/* @__PURE__ */ e.jsx("i", { className: "fas fa-bell" }),
|
|
@@ -546,7 +549,7 @@ function ke(s) {
|
|
|
546
549
|
}
|
|
547
550
|
),
|
|
548
551
|
/* @__PURE__ */ e.jsxs(
|
|
549
|
-
|
|
552
|
+
E,
|
|
550
553
|
{
|
|
551
554
|
newPage: !0,
|
|
552
555
|
className: "link-item",
|
|
@@ -566,18 +569,19 @@ function ke(s) {
|
|
|
566
569
|
]
|
|
567
570
|
}
|
|
568
571
|
),
|
|
572
|
+
n && /* @__PURE__ */ e.jsx("div", { className: "append-container", children: n }),
|
|
569
573
|
!t && /* @__PURE__ */ e.jsx(
|
|
570
574
|
"div",
|
|
571
575
|
{
|
|
572
576
|
className: "advertise-with-us p-1",
|
|
573
577
|
style: {
|
|
574
578
|
// ...(props.previewData ? props.previewData.background_color : ad?.background_color),
|
|
575
|
-
backgroundColor:
|
|
576
|
-
color:
|
|
577
|
-
borderColor:
|
|
579
|
+
backgroundColor: i.background_color || a?.background_color,
|
|
580
|
+
color: i.font_color || a?.font_color,
|
|
581
|
+
borderColor: i.border_color || a?.border_color
|
|
578
582
|
},
|
|
579
583
|
children: /* @__PURE__ */ e.jsxs(
|
|
580
|
-
|
|
584
|
+
E,
|
|
581
585
|
{
|
|
582
586
|
className: "small d-block w-100 text-center",
|
|
583
587
|
href: "https://articles.media/advertising",
|
|
@@ -594,7 +598,7 @@ function ke(s) {
|
|
|
594
598
|
}
|
|
595
599
|
);
|
|
596
600
|
}
|
|
597
|
-
const
|
|
601
|
+
const Le = re(Me);
|
|
598
602
|
export {
|
|
599
|
-
|
|
603
|
+
Le as default
|
|
600
604
|
};
|