@articles-media/articles-dev-box 1.0.22 → 1.0.24

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.
Files changed (66) hide show
  1. package/dist/Ad-BAvmOFcq.js +503 -0
  2. package/dist/Ad.js +1 -1
  3. package/dist/AdConfirmExitModal-BNFKKayL.js +55 -0
  4. package/dist/AdDetailsModal-Cv1ll9G-.js +107 -0
  5. package/dist/ArticlesAd.js +7 -8
  6. package/dist/{Button-BlAdEbSd.js → Button-CU11ETla.js} +9 -9
  7. package/dist/CreditsModal.js +23 -24
  8. package/dist/DarkModeHandler.js +11 -12
  9. package/dist/FriendsList.js +40 -41
  10. package/dist/{GameScoreboard-CBY3JsFa.js → GameScoreboard-Dj5mTFTn.js} +48 -49
  11. package/dist/GameScoreboard.js +1 -1
  12. package/dist/GlobalBody.js +20 -20
  13. package/dist/GlobalHead.js +2 -3
  14. package/dist/Link-8nSDV4sI.js +16 -0
  15. package/dist/ReturnToLauncherButton.js +17 -18
  16. package/dist/SettingsModal-tXcbd23J.js +246 -0
  17. package/dist/SettingsModal.js +1 -1
  18. package/dist/StatusModal-CBzdZdAm.js +69 -0
  19. package/dist/ViewUserModal-C_gWUvXi.js +1544 -0
  20. package/dist/ViewUserModal.js +1 -1
  21. package/dist/{classnames-DP6dWde5.js → classnames-CpG5mzJ5.js} +12 -4
  22. package/dist/index.js +4 -4
  23. package/dist/numberWithCommas-rN3cZDJL.js +1170 -0
  24. package/package.json +18 -66
  25. package/dist/Ad-Ck5UdTq3.js +0 -387
  26. package/dist/Ad-DYtftKNV.cjs +0 -1
  27. package/dist/Ad.cjs +0 -1
  28. package/dist/AdConfirmExitModal-CJ-HtcVC.js +0 -56
  29. package/dist/AdConfirmExitModal-CRCnzYQM.cjs +0 -1
  30. package/dist/AdDetailsModal-DRNRTL2W.js +0 -108
  31. package/dist/AdDetailsModal-g0n7LiV6.cjs +0 -1
  32. package/dist/ArticlesAd.cjs +0 -1
  33. package/dist/Button-CbpRj01E.cjs +0 -1
  34. package/dist/CreditsModal.cjs +0 -1
  35. package/dist/DarkModeHandler.cjs +0 -1
  36. package/dist/FriendsList.cjs +0 -1
  37. package/dist/GameScoreboard-DdOCRxON.cjs +0 -1
  38. package/dist/GameScoreboard.cjs +0 -1
  39. package/dist/GlobalBody.cjs +0 -33
  40. package/dist/GlobalHead.cjs +0 -1
  41. package/dist/Link-MFZblBb4.js +0 -17
  42. package/dist/Link-c7exNCJ3.cjs +0 -1
  43. package/dist/Modal-BX1s6CCU.js +0 -1631
  44. package/dist/Modal-DP9CeAVD.cjs +0 -3
  45. package/dist/ReturnToLauncherButton.cjs +0 -1
  46. package/dist/SettingsModal--sWLmLGp.cjs +0 -1
  47. package/dist/SettingsModal-XI2dMI09.js +0 -247
  48. package/dist/SettingsModal.cjs +0 -1
  49. package/dist/StatusModal-D7WDDR9P.cjs +0 -1
  50. package/dist/StatusModal-elrPJvX1.js +0 -70
  51. package/dist/ViewUserModal-DDjWLpyM.js +0 -3094
  52. package/dist/ViewUserModal-DPVcjXNU.cjs +0 -1
  53. package/dist/ViewUserModal.cjs +0 -1
  54. package/dist/chunk-350yNsax.cjs +0 -1
  55. package/dist/classnames-pS64X3rL.cjs +0 -1
  56. package/dist/index.cjs +0 -1
  57. package/dist/jsx-runtime-VZk6y-ec.js +0 -191
  58. package/dist/jsx-runtime-hCcDh67y.cjs +0 -6
  59. package/dist/numberWithCommas-BSKBdR-e.js +0 -18
  60. package/dist/numberWithCommas-D9tgiUnq.cjs +0 -1
  61. package/dist/useAuthSiteStatus-P5kHc_Bz.cjs +0 -1
  62. package/dist/useFullscreen.cjs +0 -1
  63. package/dist/useUserDetails.cjs +0 -1
  64. package/dist/useUserFriends.cjs +0 -1
  65. package/dist/useUserToken.cjs +0 -1
  66. /package/dist/{useAuthSiteStatus-1rHjYC4N.js → useAuthSiteStatus-Cj9IjMj7.js} +0 -0
@@ -0,0 +1,503 @@
1
+ import { n as e, t } from "./classnames-CpG5mzJ5.js";
2
+ import { t as n } from "./Button-CU11ETla.js";
3
+ import { t as r } from "./Link-8nSDV4sI.js";
4
+ import { n as i, o as a, r as o, s, t as c } from "./numberWithCommas-rN3cZDJL.js";
5
+ import * as l from "react";
6
+ import { lazy as u, memo as d, useEffect as f, useState as p } from "react";
7
+ import { jsx as m, jsxs as h } from "react/jsx-runtime";
8
+ import g from "swr";
9
+ //#region node_modules/react-intersection-observer/dist/index.mjs
10
+ var _ = /* @__PURE__ */ new Map(), v = /* @__PURE__ */ new WeakMap(), y = 0, b;
11
+ function x(e) {
12
+ return e ? v.has(e) ? v.get(e) : (y += 1, v.set(e, y.toString()), v.get(e)) : "0";
13
+ }
14
+ function S(e) {
15
+ return Object.keys(e).sort().filter((t) => e[t] !== void 0).map((t) => `${t}_${t === "root" ? x(e.root) : e[t]}`).toString();
16
+ }
17
+ function C(e) {
18
+ let t = S(e), n = _.get(t);
19
+ if (!n) {
20
+ let r = /* @__PURE__ */ new Map(), i, a = new IntersectionObserver((t) => {
21
+ t.forEach((t) => {
22
+ var n;
23
+ let a = t.isIntersecting && i.some((e) => t.intersectionRatio >= e);
24
+ e.trackVisibility && t.isVisible === void 0 && (t.isVisible = a), (n = r.get(t.target)) == null || n.forEach((e) => {
25
+ e(a, t);
26
+ });
27
+ });
28
+ }, e);
29
+ i = a.thresholds || (Array.isArray(e.threshold) ? e.threshold : [e.threshold || 0]), n = {
30
+ id: t,
31
+ observer: a,
32
+ elements: r
33
+ }, _.set(t, n);
34
+ }
35
+ return n;
36
+ }
37
+ function w(e, t, n = {}, r = b) {
38
+ if (window.IntersectionObserver === void 0 && r !== void 0) {
39
+ let i = e.getBoundingClientRect();
40
+ return t(r, {
41
+ isIntersecting: r,
42
+ target: e,
43
+ intersectionRatio: typeof n.threshold == "number" ? n.threshold : 0,
44
+ time: 0,
45
+ boundingClientRect: i,
46
+ intersectionRect: i,
47
+ rootBounds: i
48
+ }), () => {};
49
+ }
50
+ let { id: i, observer: a, elements: o } = C(n), s = o.get(e) || [];
51
+ return o.has(e) || o.set(e, s), s.push(t), a.observe(e), function() {
52
+ s.splice(s.indexOf(t), 1), s.length === 0 && (o.delete(e), a.unobserve(e)), o.size === 0 && (a.disconnect(), _.delete(i));
53
+ };
54
+ }
55
+ l.Component;
56
+ function T({ threshold: e, delay: t, trackVisibility: n, rootMargin: r, root: i, triggerOnce: a, skip: o, initialInView: s, fallbackInView: c, onChange: u } = {}) {
57
+ let [d, f] = l.useState(null), p = l.useRef(u), m = l.useRef(s), [h, g] = l.useState({
58
+ inView: !!s,
59
+ entry: void 0
60
+ });
61
+ p.current = u, l.useEffect(() => {
62
+ if (m.current === void 0 && (m.current = s), o || !d) return;
63
+ let l;
64
+ return l = w(d, (e, t) => {
65
+ let n = m.current;
66
+ m.current = e, !(n === void 0 && !e) && (g({
67
+ inView: e,
68
+ entry: t
69
+ }), p.current && p.current(e, t), t.isIntersecting && a && l && (l(), l = void 0));
70
+ }, {
71
+ root: i,
72
+ rootMargin: r,
73
+ threshold: e,
74
+ trackVisibility: n,
75
+ delay: t
76
+ }, c), () => {
77
+ l && l();
78
+ };
79
+ }, [
80
+ Array.isArray(e) ? e.toString() : e,
81
+ d,
82
+ i,
83
+ r,
84
+ a,
85
+ o,
86
+ n,
87
+ c,
88
+ t
89
+ ]);
90
+ let _ = h.entry?.target, v = l.useRef(void 0);
91
+ !d && _ && !a && !o && v.current !== _ && (v.current = _, g({
92
+ inView: !!s,
93
+ entry: void 0
94
+ }), m.current = s);
95
+ let y = [
96
+ f,
97
+ h.inView,
98
+ h.entry
99
+ ];
100
+ return y.ref = y[0], y.inView = y[1], y.entry = y[2], y;
101
+ }
102
+ l.useInsertionEffect ?? l.useLayoutEffect ?? l.useEffect;
103
+ //#endregion
104
+ //#region src/hooks/Ads/useAd.js
105
+ var E = async (e) => {
106
+ if (process.env.NODE_ENV === "development") try {
107
+ let t = new URLSearchParams({
108
+ ad_id: e.ad_id,
109
+ user_ad_token: e.user_ad_token
110
+ }).toString();
111
+ return (await (await fetch(`http://localhost:3001/api/ads/${e.ad_id}?${t}`)).json()).result;
112
+ } catch {}
113
+ let t = new URLSearchParams({ ad_id: e.ad_id }).toString();
114
+ return fetch(`${e.url}?${t}`).then((e) => e.json()).then((e) => e.result);
115
+ }, ee = { dedupingInterval: 1e3 * 60 * 60 }, te = (e, t) => {
116
+ let { data: n, error: r, isLoading: i, mutate: a } = g(e ? {
117
+ url: `https://articles.media/api/ads/${e}`,
118
+ ad_id: e,
119
+ user_ad_token: t
120
+ } : null, E, ee);
121
+ return {
122
+ data: n,
123
+ error: r,
124
+ isLoading: i,
125
+ mutate: a
126
+ };
127
+ };
128
+ //#endregion
129
+ //#region node_modules/date-fns/_lib/getRoundingMethod.js
130
+ function D(e) {
131
+ return (t) => {
132
+ let n = (e ? Math[e] : Math.trunc)(t);
133
+ return n === 0 ? 0 : n;
134
+ };
135
+ }
136
+ //#endregion
137
+ //#region node_modules/date-fns/differenceInMilliseconds.js
138
+ function O(e, t) {
139
+ return a(e) - +a(t);
140
+ }
141
+ //#endregion
142
+ //#region node_modules/date-fns/differenceInMinutes.js
143
+ function k(e, t, n) {
144
+ let r = O(e, t) / s;
145
+ return D(n?.roundingMethod)(r);
146
+ }
147
+ //#endregion
148
+ //#region src/hooks/Ads/useAds.js
149
+ var A = async (e) => {
150
+ if (process.env.NODE_ENV === "development") try {
151
+ return await (await fetch("http://localhost:3001/api/ads")).json();
152
+ } catch {}
153
+ return fetch(e.url).then((e) => e.json());
154
+ }, j = 60, M = {
155
+ dedupingInterval: o(j),
156
+ focusThrottleInterval: o(j)
157
+ }, N = (e) => {
158
+ let { data: t, error: n, isLoading: r, mutate: i } = g(e?.loading || e?.disabled ? null : { url: "https://articles.media/api/ads" }, A, M);
159
+ return {
160
+ data: t,
161
+ error: n,
162
+ isLoading: r,
163
+ mutate: i
164
+ };
165
+ }, P = /* @__PURE__ */ e(t(), 1), F = u(() => import("./AdDetailsModal-Cv1ll9G-.js")), I = u(() => import("./AdConfirmExitModal-BNFKKayL.js"));
166
+ function L(e, t) {
167
+ return Math.floor(Math.random() * (t - e + 1)) + e;
168
+ }
169
+ function R(e) {
170
+ let { previewMode: t, darkMode: a, user_ad_token: o, userDetails: s, userDetailsLoading: l, prepend: u, append: d } = e, g = [], [_, v] = p(null), { data: y, isLoading: b, mutate: x } = N({
171
+ loading: l,
172
+ disabled: s?.articles_membership?.status == "Active"
173
+ }), { data: S, isLoading: C } = te(_, o), w = e.previewData || {}, [E, ee] = p(null), [D, O] = p(null), [A, j] = p(null), [M, R] = p(0), [z, B] = p(!1), [V, H] = p(!1), [U, W] = p(!1), [ne, re] = p(/* @__PURE__ */ new Date()), [G, K] = p([]);
174
+ f(() => {
175
+ y && y?.length > 0 && !_ && (console.log("Ad Mounted or reduxAds changed"), v(e.ad_id || y[L(0, y?.length - 1)]?._id));
176
+ }, [y]), f(() => {}, [S]), f(() => {
177
+ S?.populated_promos && M >= 0 && j(S?.populated_promos[M]);
178
+ }, [M, S]);
179
+ function q() {
180
+ H(!V);
181
+ }
182
+ let { ref: J, inView: Y, entry: ie } = T({
183
+ threshold: 0,
184
+ triggerOnce: !0
185
+ });
186
+ function X(e) {
187
+ if (t && console.log("Preventing this event from being logged as this ad is being shown in preview mode."), G.find((t) => t == e)) {
188
+ console.log("Already logged this event");
189
+ return;
190
+ }
191
+ let n = new URLSearchParams({
192
+ ad_id: S?._id,
193
+ event: e
194
+ }).toString();
195
+ fetch(`/api/ads/event?${n}`).then(function(e) {
196
+ return e.json();
197
+ }).then(function(t) {
198
+ K([...G, e]), console.log(t);
199
+ }).catch(function(e) {
200
+ console.log(e);
201
+ });
202
+ }
203
+ f(() => {
204
+ if (!t && (console.log("inView", Y), Y && _)) {
205
+ let e = [{
206
+ ad_id: _,
207
+ date: (/* @__PURE__ */ new Date()).toString()
208
+ }, ...g.filter((e) => {
209
+ if (console.log(k(/* @__PURE__ */ new Date(), new Date(e.date))), k(/* @__PURE__ */ new Date(), new Date(e.date)) > 5) {
210
+ console.log("adsViewed - Remove Old Ad View Object");
211
+ return;
212
+ } else return console.log("adsViewed - Keep Ad View Object"), e;
213
+ })];
214
+ console.log("unexpiredRecentViews", e);
215
+ }
216
+ }, [Y, _]);
217
+ let [Z, ae] = p(null), [oe, Q] = p(!1);
218
+ function $() {
219
+ Q(!0), console.log("logAdAvoided called", o);
220
+ let e = process.env.NODE_ENV === "development" ? "http://localhost:3001/api/user/advertising/avoided" : "https://articles.media/api/user/advertising/avoided", t = new URLSearchParams({ user_id: s?._id }).toString();
221
+ fetch(`${e}?${t}`, { headers: { "x-articles-api-key": o } }).then(function(e) {
222
+ return e.json();
223
+ }).then(function(e) {
224
+ Q(!1), ae(e.avoided_count), console.log(e);
225
+ }).catch(function(e) {
226
+ console.log(e), Q(!1);
227
+ });
228
+ }
229
+ return f(() => {
230
+ t || (console.log("inView", Y), s?.articles_membership?.status == "Active" && Y && $("Ad Avoided"));
231
+ }, [Y, s]), l ? null : /* @__PURE__ */ h("div", {
232
+ ref: J,
233
+ className: (0, P.default)("ad-wrap", { "active-member": s?.articles_membership?.status == "Active" }),
234
+ style: {
235
+ "--articles-ad-background-color": w.background_color || S?.background_color,
236
+ "--articles-ad-font-color": w.font_color || S?.font_color,
237
+ "--articles-ad-border-color": w.border_color || S?.border_color
238
+ },
239
+ children: [
240
+ V && /* @__PURE__ */ m(F, {
241
+ setModalShow: H,
242
+ ad: S,
243
+ previewData: w
244
+ }),
245
+ U && /* @__PURE__ */ m(I, {
246
+ setModalShow: W,
247
+ ad: S,
248
+ previewData: w
249
+ }),
250
+ u && /* @__PURE__ */ m("div", {
251
+ className: "prepend-container",
252
+ children: u
253
+ }),
254
+ /* @__PURE__ */ h("div", {
255
+ className: "ad",
256
+ children: [s?.articles_membership?.status !== "Active" && /* @__PURE__ */ h("div", {
257
+ className: "main-panel",
258
+ children: [
259
+ /* @__PURE__ */ m("div", {
260
+ className: "ad-warning flex-header",
261
+ children: /* @__PURE__ */ h("div", {
262
+ className: "",
263
+ children: [S?.city && "Local", " Advertisement"]
264
+ })
265
+ }),
266
+ /* @__PURE__ */ h("div", {
267
+ className: "content-wrap",
268
+ children: [/* @__PURE__ */ h("div", {
269
+ className: "photo-banner",
270
+ children: [
271
+ /* @__PURE__ */ m("div", {
272
+ className: "logo",
273
+ children: (w.logo?.location || S?.logo?.location) && /* @__PURE__ */ m("img", {
274
+ src: w?.logo?.key ? `${process.env.NEXT_PUBLIC_CDN}${w?.logo?.key}` : `${process.env.NEXT_PUBLIC_CDN}${S?.logo?.key}`,
275
+ alt: ""
276
+ })
277
+ }),
278
+ /* @__PURE__ */ m("div", {
279
+ className: "icon d-none",
280
+ children: /* @__PURE__ */ m("i", { className: "fas fa-mug-hot" })
281
+ }),
282
+ /* @__PURE__ */ m("img", {
283
+ className: "photo",
284
+ src: w?.background?.key ? `${process.env.NEXT_PUBLIC_CDN}${w.background?.key}` : `${process.env.NEXT_PUBLIC_CDN}${S?.background?.key}`,
285
+ alt: ""
286
+ })
287
+ ]
288
+ }), /* @__PURE__ */ h("div", {
289
+ className: "details-wrap",
290
+ children: [
291
+ /* @__PURE__ */ h("div", {
292
+ className: "detail-title",
293
+ children: [/* @__PURE__ */ m("div", {
294
+ className: "detail",
295
+ children: /* @__PURE__ */ m("span", {
296
+ className: "h4",
297
+ children: w?.business || S?.business
298
+ })
299
+ }), /* @__PURE__ */ h("div", {
300
+ className: "flex flex-column d-none",
301
+ children: [/* @__PURE__ */ h("div", {
302
+ className: "detail",
303
+ children: [/* @__PURE__ */ m("span", {
304
+ className: "icon",
305
+ children: /* @__PURE__ */ m("i", { className: "fas fa-search-location" })
306
+ }), /* @__PURE__ */ h("span", { children: [
307
+ S?.city,
308
+ ", ",
309
+ S?.state
310
+ ] })]
311
+ }), /* @__PURE__ */ h("div", {
312
+ className: "detail",
313
+ children: [/* @__PURE__ */ m("span", {
314
+ className: "icon",
315
+ children: /* @__PURE__ */ m("i", { className: "fas fa-clock me-2" })
316
+ }), /* @__PURE__ */ m("span", { children: "6:30AM–8PM" })]
317
+ })]
318
+ })]
319
+ }),
320
+ S?.city && /* @__PURE__ */ m("div", { className: "details mb-3 d-none" }),
321
+ /* @__PURE__ */ m("div", {
322
+ className: "short-description",
323
+ children: w?.description || S?.description
324
+ })
325
+ ]
326
+ })]
327
+ }),
328
+ (!1)?.roles?.isDev && S?.populated_promos?.length > 0 && /* @__PURE__ */ h("div", { children: [A && /* @__PURE__ */ m("div", {
329
+ className: "promos-wrap",
330
+ children: A && /* @__PURE__ */ h("div", {
331
+ className: "promo-wrap d-flex justify-content-between align-items-center mx-2 p-1 px-2 border border-2 border-light mb-0",
332
+ children: [/* @__PURE__ */ h("div", {
333
+ className: "",
334
+ children: [/* @__PURE__ */ m("div", { children: A.title }), /* @__PURE__ */ m("div", {
335
+ className: "small",
336
+ children: /* @__PURE__ */ m("div", {
337
+ className: "small",
338
+ children: A.details
339
+ })
340
+ })]
341
+ }), /* @__PURE__ */ m(n, {
342
+ className: "px-3",
343
+ small: !0,
344
+ onClick: () => {
345
+ console.log("Load Save Modal"), B(!0);
346
+ },
347
+ children: "Save"
348
+ })]
349
+ }, A._id)
350
+ }), /* @__PURE__ */ h("div", {
351
+ className: "d-flex justify-content-between",
352
+ children: [/* @__PURE__ */ h("div", {
353
+ className: "px-2",
354
+ children: [S?.populated_promos?.length, " Promos Active"]
355
+ }), /* @__PURE__ */ h("div", {
356
+ className: "controls",
357
+ children: [
358
+ /* @__PURE__ */ m("i", {
359
+ className: "fad fa-arrow-circle-left",
360
+ type: "button",
361
+ onClick: () => {
362
+ R(M == 0 ? S?.populated_promos?.length - 1 : (e) => e - 1);
363
+ }
364
+ }),
365
+ S?.populated_promos?.map((e, t) => /* @__PURE__ */ m("i", { className: `fa-square ${t == M ? "fad" : "fas"}` }, e._id)),
366
+ /* @__PURE__ */ m("i", {
367
+ className: "fad fa-arrow-circle-right",
368
+ type: "button",
369
+ onClick: () => {
370
+ M == S?.populated_promos?.length - 1 ? R(0) : R((e) => e + 1);
371
+ }
372
+ })
373
+ ]
374
+ })]
375
+ })] }),
376
+ /* @__PURE__ */ m("hr", {
377
+ style: { borderColor: "white" },
378
+ className: "mt-auto mb-0"
379
+ }),
380
+ /* @__PURE__ */ h("div", {
381
+ className: "action-wrap d-flex justify-content-lg-between px-3 py-2",
382
+ children: [
383
+ /* @__PURE__ */ m("div", {
384
+ onClick: () => {
385
+ q(), X("Details");
386
+ },
387
+ className: "action flex-grow-1 flex-shrink-0",
388
+ children: "Details"
389
+ }),
390
+ /* @__PURE__ */ m("span", { className: "px-4" }),
391
+ /* @__PURE__ */ m("a", {
392
+ className: "action flex-grow-1 flex-shrink-0",
393
+ href: S?.website,
394
+ target: "_blank",
395
+ rel: "noreferrer",
396
+ onClick: (e) => {
397
+ e.preventDefault(), W(!0), X("Confirm Exit Modal Opened");
398
+ },
399
+ children: /* @__PURE__ */ m("div", { children: "Website" })
400
+ })
401
+ ]
402
+ })
403
+ ]
404
+ }), s?.articles_membership?.status == "Active" && /* @__PURE__ */ m("div", {
405
+ className: "main-panel",
406
+ children: /* @__PURE__ */ h("div", {
407
+ className: "content-wrap",
408
+ children: [/* @__PURE__ */ h("div", {
409
+ className: "photo-banner",
410
+ children: [
411
+ /* @__PURE__ */ m("div", { className: "logo" }),
412
+ /* @__PURE__ */ h("div", {
413
+ className: "splash",
414
+ children: [/* @__PURE__ */ m("i", { className: "fas fa-broadcast-tower" }), /* @__PURE__ */ h("div", {
415
+ className: "text",
416
+ children: [/* @__PURE__ */ m("div", {
417
+ className: "count",
418
+ children: oe ? /* @__PURE__ */ m("i", { className: "fas fa-spinner fa-spin me-0" }) : Z ? c(Z) : 0
419
+ }), /* @__PURE__ */ m("div", {
420
+ className: "label",
421
+ children: "ads avoided."
422
+ })]
423
+ })]
424
+ }),
425
+ /* @__PURE__ */ h("div", {
426
+ className: "member-since",
427
+ children: ["Member since: ", /* @__PURE__ */ m(i, {
428
+ format: "PP",
429
+ date: s?.articles_membership?.membership_started
430
+ })]
431
+ })
432
+ ]
433
+ }), /* @__PURE__ */ h("div", {
434
+ className: "details-wrap",
435
+ children: [/* @__PURE__ */ m("div", {
436
+ className: "detail-title",
437
+ children: /* @__PURE__ */ m("div", {
438
+ className: "detail",
439
+ children: /* @__PURE__ */ m("span", {
440
+ className: "h4",
441
+ children: "Thanks for the support!"
442
+ })
443
+ })
444
+ }), /* @__PURE__ */ h("div", {
445
+ className: "short-description",
446
+ children: [/* @__PURE__ */ m("div", {
447
+ className: "mb-2",
448
+ children: "Without support from users like you, we wouldn't be here."
449
+ }), /* @__PURE__ */ h("div", {
450
+ className: "links-list",
451
+ children: [
452
+ /* @__PURE__ */ h(r, {
453
+ newPage: !0,
454
+ className: "link-item",
455
+ href: "https://articles.media/messages",
456
+ children: [/* @__PURE__ */ m("i", { className: "fas fa-comments-alt" }), "0 unread messages."]
457
+ }),
458
+ /* @__PURE__ */ h(r, {
459
+ newPage: !0,
460
+ className: "link-item",
461
+ href: "https://articles.media/settings/notifications",
462
+ onClick: () => {
463
+ $();
464
+ },
465
+ children: [/* @__PURE__ */ m("i", { className: "fas fa-bell" }), "0 notifications."]
466
+ }),
467
+ /* @__PURE__ */ h(r, {
468
+ newPage: !0,
469
+ className: "link-item",
470
+ href: "https://articles.media/settings/account",
471
+ children: [/* @__PURE__ */ m("i", { className: "fas fa-cog" }), "Manage account settings."]
472
+ })
473
+ ]
474
+ })]
475
+ })]
476
+ })]
477
+ })
478
+ })]
479
+ }),
480
+ d && /* @__PURE__ */ m("div", {
481
+ className: "append-container",
482
+ children: d
483
+ }),
484
+ !t && /* @__PURE__ */ m("div", {
485
+ className: "advertise-with-us p-1",
486
+ style: {
487
+ backgroundColor: w.background_color || S?.background_color,
488
+ color: w.font_color || S?.font_color,
489
+ borderColor: w.border_color || S?.border_color
490
+ },
491
+ children: /* @__PURE__ */ h(r, {
492
+ className: "small d-block w-100 text-center",
493
+ href: "https://articles.media/advertising",
494
+ newPage: !0,
495
+ children: [/* @__PURE__ */ m("i", { className: "fas fa-share me-1" }), "Advertise with Articles Media!"]
496
+ })
497
+ })
498
+ ]
499
+ });
500
+ }
501
+ var z = d(R);
502
+ //#endregion
503
+ export { z as t };
package/dist/Ad.js CHANGED
@@ -1,2 +1,2 @@
1
- import { t as e } from "./Ad-Ck5UdTq3.js";
1
+ import { t as e } from "./Ad-BAvmOFcq.js";
2
2
  export { e as default };
@@ -0,0 +1,55 @@
1
+ import { t as e } from "./Button-CU11ETla.js";
2
+ import { t } from "./Link-8nSDV4sI.js";
3
+ import { useEffect as n } from "react";
4
+ import { jsx as r, jsxs as i } from "react/jsx-runtime";
5
+ import a from "react-bootstrap/Modal";
6
+ //#region src/components/Ads/AdConfirmExitModal.jsx
7
+ function o(o) {
8
+ let { setModalShow: s, ad: c, previewData: l } = o;
9
+ n(() => {
10
+ console.log("Mounted");
11
+ }, []);
12
+ let u = () => {
13
+ s(!1);
14
+ };
15
+ return /* @__PURE__ */ r("div", { children: /* @__PURE__ */ i(a, {
16
+ show: !0,
17
+ backdropClassName: "ad-details-modal-backdrop",
18
+ className: "articles-modal",
19
+ centered: !0,
20
+ onHide: u,
21
+ size: "md",
22
+ children: [
23
+ /* @__PURE__ */ r(a.Header, {
24
+ className: "align-items-center",
25
+ closeButton: !0,
26
+ children: /* @__PURE__ */ r(a.Title, { children: "Confirm Exit" })
27
+ }),
28
+ /* @__PURE__ */ i(a.Body, {
29
+ className: "",
30
+ children: [/* @__PURE__ */ r("div", { className: "ratio ratio-16x9 bg-black mb-2" }), /* @__PURE__ */ r("p", {
31
+ className: "mb-1",
32
+ children: "This advertiser has been approved and verified to display ads but always be cautious when interacting with ads. Any offsite interactions are at your own risk and should be approached with caution. We can not be held responsible for any issues that may arise."
33
+ })]
34
+ }),
35
+ /* @__PURE__ */ i(a.Footer, {
36
+ className: "d-flex justify-content-between",
37
+ children: [/* @__PURE__ */ i(e, {
38
+ variant: "articles",
39
+ onClick: u,
40
+ children: [/* @__PURE__ */ r("i", { className: "fad fa-times" }), "Close"]
41
+ }), /* @__PURE__ */ r(t, {
42
+ href: c?.website,
43
+ newPage: !0,
44
+ children: /* @__PURE__ */ i(e, {
45
+ variant: "articles",
46
+ onClick: u,
47
+ children: [/* @__PURE__ */ r("i", { className: "fad fa-link" }), "Proceed"]
48
+ })
49
+ })]
50
+ })
51
+ ]
52
+ }) });
53
+ }
54
+ //#endregion
55
+ export { o as default };
@@ -0,0 +1,107 @@
1
+ import { t as e } from "./Button-CU11ETla.js";
2
+ import { t } from "./Link-8nSDV4sI.js";
3
+ import { useEffect as n } from "react";
4
+ import { jsx as r, jsxs as i } from "react/jsx-runtime";
5
+ import a from "react-bootstrap/Modal";
6
+ //#region src/components/Ads/AdDetailsModal.jsx
7
+ function o(o) {
8
+ let { setModalShow: s, ad: c, previewData: l } = o;
9
+ n(() => {
10
+ console.log("Mounted");
11
+ }, []);
12
+ let u = () => {
13
+ s(!1);
14
+ };
15
+ return /* @__PURE__ */ r("div", { children: /* @__PURE__ */ i(a, {
16
+ show: !0,
17
+ backdropClassName: "ad-details-modal-backdrop",
18
+ className: "articles-modal",
19
+ centered: !0,
20
+ onHide: u,
21
+ size: "md",
22
+ children: [
23
+ /* @__PURE__ */ r(a.Header, {
24
+ className: "align-items-center",
25
+ closeButton: !0,
26
+ children: /* @__PURE__ */ r(a.Title, { children: "Ad Details" })
27
+ }),
28
+ /* @__PURE__ */ i(a.Body, {
29
+ className: "",
30
+ children: [
31
+ /* @__PURE__ */ i("p", {
32
+ className: "mb-1",
33
+ children: ["Advertiser: ", /* @__PURE__ */ r("b", { children: c?.business })]
34
+ }),
35
+ /* @__PURE__ */ i("p", {
36
+ className: "mb-0",
37
+ children: ["Ad ID: ", /* @__PURE__ */ r("b", { children: l?._id || c._id })]
38
+ }),
39
+ /* @__PURE__ */ r("hr", {}),
40
+ /* @__PURE__ */ r("div", {
41
+ className: "mb-1",
42
+ children: "This ad is being shown to you for the following reasons"
43
+ }),
44
+ c.city ? /* @__PURE__ */ i("div", { children: [
45
+ /* @__PURE__ */ r("div", {
46
+ className: "h4 mb-1",
47
+ children: c.business
48
+ }),
49
+ /* @__PURE__ */ r("div", { children: "Is advertising to all zip codes within a" }),
50
+ /* @__PURE__ */ r("span", { children: /* @__PURE__ */ r("div", {
51
+ className: "badge bg-black shadow-articles",
52
+ children: "15 Mile Radius"
53
+ }) }),
54
+ /* @__PURE__ */ r("div", { children: "of it's business" }),
55
+ /* @__PURE__ */ r("hr", { className: "border w-50 border-white" }),
56
+ /* @__PURE__ */ i("div", {
57
+ className: "d-flex align-items-center",
58
+ children: [
59
+ /* @__PURE__ */ r("div", { children: "Your Zip code" }),
60
+ /* @__PURE__ */ r("div", {
61
+ className: "badge bg-black shadow-articles ms-2",
62
+ children: "00000"
63
+ }),
64
+ /* @__PURE__ */ r("div", {
65
+ className: "ms-2",
66
+ children: "is"
67
+ }),
68
+ /* @__PURE__ */ r("div", {
69
+ className: "badge bg-black shadow-articles ms-2",
70
+ children: "4.2 miles away"
71
+ })
72
+ ]
73
+ })
74
+ ] }) : /* @__PURE__ */ i("div", { children: [/* @__PURE__ */ r("div", {
75
+ className: "h4 mb-1",
76
+ children: c.business
77
+ }), /* @__PURE__ */ r("div", { children: "Is advertising to all users" })] }),
78
+ /* @__PURE__ */ r("div", { className: "grow" }),
79
+ /* @__PURE__ */ r("hr", { className: "w-100" }),
80
+ /* @__PURE__ */ r("div", {
81
+ className: "reason lh-sm mb-2",
82
+ children: "Ads we display to you will always be transparent as to why you are seeing them."
83
+ }),
84
+ /* @__PURE__ */ r(t, {
85
+ href: "https://articles.media/settings/account",
86
+ newPage: !0,
87
+ className: "",
88
+ children: /* @__PURE__ */ r(e, {
89
+ small: !0,
90
+ children: "Settings"
91
+ })
92
+ })
93
+ ]
94
+ }),
95
+ /* @__PURE__ */ r(a.Footer, {
96
+ className: "d-flex justify-content-center",
97
+ children: /* @__PURE__ */ r(e, {
98
+ variant: "articles",
99
+ onClick: u,
100
+ children: "Close"
101
+ })
102
+ })
103
+ ]
104
+ }) });
105
+ }
106
+ //#endregion
107
+ export { o as default };
@@ -1,17 +1,16 @@
1
- import { t as e } from "./jsx-runtime-VZk6y-ec.js";
2
- import { useEffect as t } from "react";
1
+ import { useEffect as e } from "react";
2
+ import { jsx as t } from "react/jsx-runtime";
3
3
  //#region src/components/Ads/ArticlesAd.jsx
4
- var n = e();
5
- function r({ darkMode: e }) {
6
- return t(() => {}, []), t(() => {
4
+ function n({ darkMode: n }) {
5
+ return e(() => {}, []), e(() => {
7
6
  let e = document.createElement("script");
8
7
  return e.src = "https://accounts.articles.media/js/ad.js", e.async = !0, document.body.appendChild(e), () => {
9
8
  document.body.removeChild(e);
10
9
  };
11
- }, []), /* @__PURE__ */ (0, n.jsx)("div", {
10
+ }, []), /* @__PURE__ */ t("div", {
12
11
  className: "",
13
- children: /* @__PURE__ */ (0, n.jsx)("div", { className: "articles-media-ad" })
12
+ children: /* @__PURE__ */ t("div", { className: "articles-media-ad" })
14
13
  });
15
14
  }
16
15
  //#endregion
17
- export { r as default };
16
+ export { n as default };