strapi-plugin-magic-sessionmanager 4.5.12 → 4.6.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.
Files changed (39) hide show
  1. package/CHANGELOG.md +21 -0
  2. package/README.md +90 -34
  3. package/dist/{_chunks/Analytics-DM4_UffY.js → admin/Analytics-BMkhiuRX.js} +3 -121
  4. package/dist/{_chunks/Analytics--qB2cKuD.mjs → admin/Analytics-CwNJ3TNI.mjs} +5 -123
  5. package/dist/{_chunks/App-DF-VsbDW.js → admin/App-DazHh7Zi.js} +67 -646
  6. package/dist/{_chunks/App-CL5q29Mi.mjs → admin/App-Sk0F9UEN.mjs} +69 -648
  7. package/dist/{_chunks/License-D9piCp34.mjs → admin/License-6SIpR7Rk.mjs} +34 -113
  8. package/dist/{_chunks/License-Dmm1d3fQ.js → admin/License-BwbmzbP_.js} +34 -113
  9. package/dist/{_chunks/OnlineUsersWidget-KchZ_ScS.js → admin/OnlineUsersWidget-BIfnbFcZ.js} +44 -36
  10. package/dist/{_chunks/OnlineUsersWidget-DHsthkt0.mjs → admin/OnlineUsersWidget-Qq_uCTi1.mjs} +44 -36
  11. package/dist/{_chunks/Settings-D6ILgR9X.mjs → admin/Settings-BA7S_8DF.mjs} +286 -112
  12. package/dist/{_chunks/Settings-CUNaxDWk.js → admin/Settings-CCYScjxv.js} +284 -110
  13. package/dist/{_chunks/de-CDA1V0rF.mjs → admin/de-6rIvkYOp.mjs} +37 -14
  14. package/dist/{_chunks/de-I-Q-pWqu.js → admin/de-DjP2WJ_V.js} +37 -14
  15. package/dist/{_chunks/en-Bd7_h-4e.js → admin/en-0pesBbOT.js} +37 -14
  16. package/dist/{_chunks/en-DzmOCyzQ.mjs → admin/en-8hiv31Dv.mjs} +37 -14
  17. package/dist/{_chunks/es-BcAx18XG.js → admin/es-DdBRpF7F.js} +37 -14
  18. package/dist/{_chunks/es-Cx-SN6qV.mjs → admin/es-LRQ148f5.mjs} +37 -14
  19. package/dist/{_chunks/fr-DXlXE5Eo.mjs → admin/fr-CKhx_qil.mjs} +37 -14
  20. package/dist/{_chunks/fr-DCzYMuJ-.js → admin/fr-DJ6DbeDy.js} +37 -14
  21. package/dist/{_chunks/index-CTxGMDHr.js → admin/index-DTskQVDl.js} +12 -25
  22. package/dist/{_chunks/index-CwxKazpc.mjs → admin/index-UTLA1r40.mjs} +12 -25
  23. package/dist/admin/index.js +3 -2
  24. package/dist/admin/index.mjs +1 -1
  25. package/dist/{_chunks/pt-21-MAb72.js → admin/pt-D0SMoAmo.js} +37 -14
  26. package/dist/{_chunks/pt-zsdTSjba.mjs → admin/pt-DXizUvcj.mjs} +37 -14
  27. package/dist/server/index.js +9680 -8914
  28. package/dist/server/index.mjs +9701 -8918
  29. package/package.json +25 -14
  30. package/scripts/geoip-updater.cjs +220 -0
  31. package/scripts/update-geoip-db.mjs +38 -0
  32. package/strapi-admin.js +2 -1
  33. package/strapi-server.js +2 -1
  34. package/dist/_chunks/UpgradePage-D697BVWo.mjs +0 -352
  35. package/dist/_chunks/UpgradePage-Dwrv7g8L.js +0 -354
  36. package/dist/_chunks/useLicense-B9WW9s_d.mjs +0 -86
  37. package/dist/_chunks/useLicense-BEbtA_Zo.js +0 -85
  38. /package/dist/{_chunks → admin}/StyledButtons-Cz8oYhmc.mjs +0 -0
  39. /package/dist/{_chunks → admin}/StyledButtons-DDuxnYz8.js +0 -0
package/CHANGELOG.md CHANGED
@@ -1,3 +1,24 @@
1
+ ## [4.6.1](https://github.com/Schero94/Magic-Sessionmanager/compare/v4.6.0...v4.6.1) (2026-06-21)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * **docs:** document MaxMind credentials required by geoip updater CLI ([863629b](https://github.com/Schero94/Magic-Sessionmanager/commit/863629b621c0a4047eb18dcac5755e4dd3560eaf))
7
+
8
+ # [4.6.0](https://github.com/Schero94/Magic-Sessionmanager/compare/v4.5.13...v4.6.0) (2026-06-21)
9
+
10
+
11
+ ### Features
12
+
13
+ * add local GeoIP firewall and free session manager ([f99e4db](https://github.com/Schero94/Magic-Sessionmanager/commit/f99e4db4256c5ca2dbfac4709875e6992d640c0e))
14
+
15
+ ## [4.5.13](https://github.com/Schero94/Magic-Sessionmanager/compare/v4.5.12...v4.5.13) (2026-04-21)
16
+
17
+
18
+ ### Bug Fixes
19
+
20
+ * **build:** use non-destructured require for @strapi/utils ([1402eef](https://github.com/Schero94/Magic-Sessionmanager/commit/1402eeff18cd6469cc4f9b177637896115652993))
21
+
1
22
  ## [4.5.12](https://github.com/Schero94/Magic-Sessionmanager/compare/v4.5.11...v4.5.12) (2026-04-21)
2
23
 
3
24
 
package/README.md CHANGED
@@ -4,6 +4,8 @@
4
4
 
5
5
  Track logins, monitor active users, and secure your app with one simple plugin. No complicated setup required.
6
6
 
7
+ Free and open under the MIT license. All features are available without a paid license or activation key.
8
+
7
9
  [![NPM](https://img.shields.io/npm/v/strapi-plugin-magic-sessionmanager.svg)](https://www.npmjs.com/package/strapi-plugin-magic-sessionmanager)
8
10
  [![License](https://img.shields.io/badge/License-MIT-blue.svg)](LICENSE)
9
11
 
@@ -45,8 +47,8 @@ Track logins, monitor active users, and secure your app with one simple plugin.
45
47
  - Full device information
46
48
  - Browser and operating system
47
49
  - Complete session history
48
- - IP geolocation (Premium)
49
- - Security risk score (Premium)
50
+ - IP geolocation
51
+ - Security risk score
50
52
 
51
53
  ---
52
54
 
@@ -199,7 +201,7 @@ SESSION_ENCRYPTION_KEY=your-key-here
199
201
  - Last time they did something
200
202
  - What browser/device they use
201
203
  - Their IP address
202
- - Location (if Premium)
204
+ - Location
203
205
 
204
206
  ### 4. Multiple Devices
205
207
 
@@ -269,7 +271,7 @@ Add to `config/plugins.ts`:
269
271
 
270
272
  ---
271
273
 
272
- ## 🌍 Premium Features (Optional License)
274
+ ## 🌍 Security Features
273
275
 
274
276
  ### IP Geolocation
275
277
 
@@ -279,6 +281,81 @@ Add to `config/plugins.ts`:
279
281
  - ISP Provider
280
282
  - Coordinates (for map)
281
283
 
284
+ ### Local GeoIP Firewall (Recommended)
285
+
286
+ For login blocking, use a local MaxMind GeoLite2 Country database. This avoids
287
+ remote API timeouts and rate limits in the login path.
288
+
289
+ 1. Create a free MaxMind account and download `GeoLite2-Country.mmdb`:
290
+ https://dev.maxmind.com/geoip/geolite2-free-geolocation-data/
291
+ 2. Store the file on your Strapi server, for example:
292
+ `/var/lib/strapi/GeoLite2-Country.mmdb`
293
+ 3. Configure the plugin:
294
+
295
+ ```bash
296
+ MAGIC_SESSIONMANAGER_GEOIP_DATABASE=/var/lib/strapi/GeoLite2-Country.mmdb
297
+ MAXMIND_ACCOUNT_ID=your-account-id
298
+ MAXMIND_LICENSE_KEY=your-license-key
299
+ ```
300
+
301
+ You can also manage this from the Strapi admin UI. Open
302
+ **Magic Session Manager -> Settings -> Geofencing**, choose `local-mmdb`,
303
+ enter the MaxMind account ID and license key, then use **Download / Update DB**.
304
+ The plugin stores the credentials in the Strapi plugin store and never returns
305
+ the license key to the browser after saving it.
306
+
307
+ Download or update the database. The CLI updater needs your MaxMind
308
+ credentials via environment variables (the in-admin updater stores them in the
309
+ Strapi plugin store instead):
310
+
311
+ ```bash
312
+ export MAXMIND_ACCOUNT_ID=your_account_id
313
+ export MAXMIND_LICENSE_KEY=your_license_key
314
+ npm run geoip:update
315
+ ```
316
+
317
+ When installed as a package in a Strapi project, run the packaged binary:
318
+
319
+ ```bash
320
+ npx strapi-magic-sessionmanager-geoip
321
+ ```
322
+
323
+ The updater checks MaxMind's `Last-Modified` header first and skips the download
324
+ when the local metadata is current. Use `npm run geoip:update -- --force` in the
325
+ plugin repo or `npx strapi-magic-sessionmanager-geoip --force` in an installed
326
+ Strapi project to force a refresh. Schedule it weekly or twice weekly with
327
+ cron/systemd. MaxMind requires GeoLite databases to stay up to date and
328
+ currently limits GeoLite users to 30 database downloads per day.
329
+
330
+ ```typescript
331
+ // config/plugins.ts
332
+ export default () => ({
333
+ 'magic-sessionmanager': {
334
+ enabled: true,
335
+ config: {
336
+ geoIpProvider: 'local-mmdb',
337
+ geoIpDatabasePath: process.env.MAGIC_SESSIONMANAGER_GEOIP_DATABASE,
338
+ // "auto": fail closed for suspicious-session blocking, fail open for plain geofencing
339
+ // "block": fail closed whenever GEOIP lookup is unavailable
340
+ // "allow": fail open whenever GEOIP lookup is unavailable
341
+ geoLookupFailureMode: 'block',
342
+ enableGeofencing: true,
343
+ allowedCountries: ['DE', 'AT', 'CH'],
344
+ },
345
+ },
346
+ });
347
+ ```
348
+
349
+ Provider options:
350
+ - `local-mmdb`: local MaxMind-compatible database only
351
+ - `auto`: use local database when configured, otherwise use the legacy remote provider
352
+ - `ipapi`: legacy remote provider
353
+ - `disabled`: no GEOIP lookup
354
+
355
+ Country firewall rules use the local database. VPN/proxy/threat detection still
356
+ requires a provider that supplies those risk signals; a free country database
357
+ does not reliably identify VPNs or proxies.
358
+
282
359
  ### Threat Detection
283
360
 
284
361
  **Automatically check if IP is:**
@@ -305,7 +382,7 @@ Add to `config/plugins.ts`:
305
382
 
306
383
  ---
307
384
 
308
- ## 📧 Email Alerts Setup (Premium)
385
+ ## 📧 Email Alerts Setup
309
386
 
310
387
  The Session Manager uses **Strapi's Email Plugin** to send notifications. You need to configure an email provider first.
311
388
 
@@ -713,11 +790,11 @@ When you install this plugin, you get:
713
790
  - ✅ Encryption (secure)
714
791
  - ✅ Multi-device support
715
792
 
716
- **Premium features require a license (free to generate):**
717
- - 🔒 IP Geolocation
718
- - 🔒 Threat detection
719
- - 🔒 Auto-blocking
720
- - 🔒 Email/webhook alerts
793
+ **All features are included for free:**
794
+ - ✅ IP Geolocation
795
+ - ✅ Threat detection
796
+ - ✅ Auto-blocking
797
+ - ✅ Email/webhook alerts
721
798
 
722
799
  ---
723
800
 
@@ -757,32 +834,11 @@ A: Not yet, but it's planned for future versions!
757
834
 
758
835
  **Copyright © 2025 Schero D.**
759
836
 
760
- ### Important License Restriction
761
-
762
- This plugin is **free and open source**, BUT:
763
-
764
- ⚠️ **You CANNOT modify the license validation system**
765
-
766
- This means:
767
- - ❌ Cannot remove `license-guard.js`
768
- - ❌ Cannot bypass license activation
769
- - ❌ Cannot disable license checks
770
- - ❌ Cannot modify license-related endpoints
771
-
772
- **Why?** The license system ensures:
773
- - Quality and ongoing support
774
- - Spam prevention
775
- - Usage analytics for improvements
776
- - Fair use tracking
837
+ ### Optional license-key activation
777
838
 
778
- **What you CAN do:**
779
- - ✅ Use freely (personal & commercial)
780
- - ✅ View and study source code
781
- - ✅ Report issues and contribute
782
- - ✅ Deploy in production without fees
783
- - ✅ Integrate in your projects
839
+ The admin panel includes a License page where you can register an optional key. This is only used for install tracking and support context; it does not unlock or restrict any plugin feature.
784
840
 
785
- See [LICENSE](./LICENSE) and [COPYRIGHT_NOTICE.txt](./COPYRIGHT_NOTICE.txt) for full terms.
841
+ See [LICENSE](./LICENSE) for full terms.
786
842
 
787
843
  ---
788
844
 
@@ -6,8 +6,7 @@ const admin = require("@strapi/strapi/admin");
6
6
  const styled = require("styled-components");
7
7
  const designSystem = require("@strapi/design-system");
8
8
  const icons = require("@strapi/icons");
9
- const index = require("./index-CTxGMDHr.js");
10
- const useLicense = require("./useLicense-BEbtA_Zo.js");
9
+ const index = require("./index-DTskQVDl.js");
11
10
  const _interopDefault = (e) => e && e.__esModule ? e : { default: e };
12
11
  const styled__default = /* @__PURE__ */ _interopDefault(styled);
13
12
  const theme = {
@@ -36,10 +35,6 @@ const shimmer = styled.keyframes`
36
35
  0% { background-position: -200% 0; }
37
36
  100% { background-position: 200% 0; }
38
37
  `;
39
- const float = styled.keyframes`
40
- 0%, 100% { transform: translateY(0px); }
41
- 50% { transform: translateY(-8px); }
42
- `;
43
38
  const pulse = styled.keyframes`
44
39
  0%, 100% { opacity: 1; }
45
40
  50% { opacity: 0.8; }
@@ -273,26 +268,13 @@ const LoadingOverlay = styled__default.default.div`
273
268
  ${styled.css`animation: ${pulse} 2s ease-in-out infinite;`}
274
269
  }
275
270
  `;
276
- const AnimatedIcon = styled__default.default.div`
277
- ${styled.css`animation: ${float} 3s ease-in-out infinite;`}
278
- width: 96px;
279
- height: 96px;
280
- color: var(--colors-warning600, #D97706);
281
- margin: 0 auto 32px;
282
- display: flex;
283
- align-items: center;
284
- justify-content: center;
285
- `;
286
271
  const AnalyticsPage = () => {
287
272
  const { get } = admin.useFetchClient();
288
- const { isPremium, loading: licenseLoading } = useLicense.useLicense();
289
273
  const [loading, setLoading] = react.useState(true);
290
274
  const [analytics, setAnalytics] = react.useState(null);
291
275
  react.useEffect(() => {
292
- if (!licenseLoading) {
293
- fetchAnalytics();
294
- }
295
- }, [licenseLoading]);
276
+ fetchAnalytics();
277
+ }, []);
296
278
  const fetchAnalytics = async () => {
297
279
  setLoading(true);
298
280
  try {
@@ -372,106 +354,6 @@ const AnalyticsPage = () => {
372
354
  setLoading(false);
373
355
  }
374
356
  };
375
- if (licenseLoading) {
376
- return /* @__PURE__ */ jsxRuntime.jsx(Container, { children: /* @__PURE__ */ jsxRuntime.jsxs(LoadingOverlay, { children: [
377
- /* @__PURE__ */ jsxRuntime.jsx(icons.ChartBubble, { className: "loader-icon", style: { width: "64px", height: "64px", color: "var(--colors-primary600, #0284C7)" } }),
378
- /* @__PURE__ */ jsxRuntime.jsx(designSystem.Loader, { children: "Checking license..." }),
379
- /* @__PURE__ */ jsxRuntime.jsx(designSystem.Typography, { variant: "pi", textColor: "neutral600", children: "Please wait while we verify your premium access" })
380
- ] }) });
381
- }
382
- if (!isPremium) {
383
- return /* @__PURE__ */ jsxRuntime.jsx(Container, { children: /* @__PURE__ */ jsxRuntime.jsx(designSystem.Box, { padding: 8, children: /* @__PURE__ */ jsxRuntime.jsxs(
384
- designSystem.Box,
385
- {
386
- padding: 10,
387
- style: {
388
- background: "linear-gradient(135deg, rgba(234, 179, 8, 0.12) 0%, rgba(234, 179, 8, 0.25) 100%)",
389
- borderRadius: "20px",
390
- border: "3px solid rgba(234, 179, 8, 0.4)",
391
- textAlign: "center",
392
- boxShadow: "0 20px 40px rgba(245, 158, 11, 0.2)",
393
- maxWidth: "800px",
394
- margin: "60px auto",
395
- position: "relative",
396
- overflow: "hidden"
397
- },
398
- children: [
399
- /* @__PURE__ */ jsxRuntime.jsx("div", { style: {
400
- position: "absolute",
401
- top: 0,
402
- left: 0,
403
- right: 0,
404
- bottom: 0,
405
- backgroundImage: "radial-gradient(circle at 20% 80%, transparent 50%, rgba(255, 255, 255, 0.1) 50%)",
406
- backgroundSize: "20px 20px",
407
- opacity: 0.5,
408
- zIndex: 0
409
- } }),
410
- /* @__PURE__ */ jsxRuntime.jsxs("div", { style: { position: "relative", zIndex: 1 }, children: [
411
- /* @__PURE__ */ jsxRuntime.jsx(AnimatedIcon, { as: icons.Crown }),
412
- /* @__PURE__ */ jsxRuntime.jsx(
413
- designSystem.Typography,
414
- {
415
- variant: "alpha",
416
- style: {
417
- color: "var(--colors-warning600, #92400e)",
418
- fontWeight: "700",
419
- marginBottom: "24px",
420
- fontSize: "36px",
421
- display: "block",
422
- textShadow: "0 2px 4px rgba(0, 0, 0, 0.1)"
423
- },
424
- children: "Analytics Dashboard"
425
- }
426
- ),
427
- /* @__PURE__ */ jsxRuntime.jsx(
428
- designSystem.Typography,
429
- {
430
- variant: "omega",
431
- style: {
432
- color: "var(--colors-warning600, #78350f)",
433
- lineHeight: "1.9",
434
- marginBottom: "44px",
435
- fontSize: "17px",
436
- display: "block",
437
- maxWidth: "620px",
438
- margin: "0 auto 44px"
439
- },
440
- children: "Unlock premium analytics to get powerful insights about your user sessions, device statistics, browser trends, and activity patterns"
441
- }
442
- ),
443
- /* @__PURE__ */ jsxRuntime.jsx(
444
- "button",
445
- {
446
- onClick: () => window.open("https://magicapi.fitlex.me", "_blank"),
447
- style: {
448
- background: "linear-gradient(135deg, var(--colors-warning600, #f59e0b) 0%, var(--colors-warning600, #d97706) 100%)",
449
- color: "white",
450
- border: "none",
451
- padding: "16px 48px",
452
- borderRadius: "12px",
453
- fontSize: "17px",
454
- fontWeight: "700",
455
- cursor: "pointer",
456
- boxShadow: "0 6px 16px rgba(245, 158, 11, 0.4)",
457
- transition: "all 0.3s cubic-bezier(0.4, 0, 0.2, 1)"
458
- },
459
- onMouseEnter: (e) => {
460
- e.currentTarget.style.transform = "translateY(-3px) scale(1.05)";
461
- e.currentTarget.style.boxShadow = "0 12px 24px rgba(245, 158, 11, 0.5)";
462
- },
463
- onMouseLeave: (e) => {
464
- e.currentTarget.style.transform = "translateY(0) scale(1)";
465
- e.currentTarget.style.boxShadow = "0 6px 16px rgba(245, 158, 11, 0.4)";
466
- },
467
- children: "Upgrade to Premium"
468
- }
469
- )
470
- ] })
471
- ]
472
- }
473
- ) }) });
474
- }
475
357
  if (loading) {
476
358
  return /* @__PURE__ */ jsxRuntime.jsx(Container, { children: /* @__PURE__ */ jsxRuntime.jsxs(LoadingOverlay, { children: [
477
359
  /* @__PURE__ */ jsxRuntime.jsx(icons.ChartBubble, { className: "loader-icon", style: { width: "64px", height: "64px", color: "var(--colors-primary600, #0284C7)" } }),
@@ -2,10 +2,9 @@ import { jsx, jsxs } from "react/jsx-runtime";
2
2
  import { useState, useEffect } from "react";
3
3
  import { useFetchClient } from "@strapi/strapi/admin";
4
4
  import styled, { css, keyframes } from "styled-components";
5
- import { Loader, Typography, Box, Flex, Badge } from "@strapi/design-system";
6
- import { ChartBubble, Crown, User, Clock, Monitor } from "@strapi/icons";
7
- import { a as pluginId } from "./index-CwxKazpc.mjs";
8
- import { u as useLicense } from "./useLicense-B9WW9s_d.mjs";
5
+ import { Loader, Flex, Box, Badge, Typography } from "@strapi/design-system";
6
+ import { ChartBubble, User, Clock, Monitor } from "@strapi/icons";
7
+ import { a as pluginId } from "./index-UTLA1r40.mjs";
9
8
  const theme = {
10
9
  shadows: {
11
10
  sm: "0 1px 3px 0 rgba(0, 0, 0, 0.1)",
@@ -32,10 +31,6 @@ const shimmer = keyframes`
32
31
  0% { background-position: -200% 0; }
33
32
  100% { background-position: 200% 0; }
34
33
  `;
35
- const float = keyframes`
36
- 0%, 100% { transform: translateY(0px); }
37
- 50% { transform: translateY(-8px); }
38
- `;
39
34
  const pulse = keyframes`
40
35
  0%, 100% { opacity: 1; }
41
36
  50% { opacity: 0.8; }
@@ -269,26 +264,13 @@ const LoadingOverlay = styled.div`
269
264
  ${css`animation: ${pulse} 2s ease-in-out infinite;`}
270
265
  }
271
266
  `;
272
- const AnimatedIcon = styled.div`
273
- ${css`animation: ${float} 3s ease-in-out infinite;`}
274
- width: 96px;
275
- height: 96px;
276
- color: var(--colors-warning600, #D97706);
277
- margin: 0 auto 32px;
278
- display: flex;
279
- align-items: center;
280
- justify-content: center;
281
- `;
282
267
  const AnalyticsPage = () => {
283
268
  const { get } = useFetchClient();
284
- const { isPremium, loading: licenseLoading } = useLicense();
285
269
  const [loading, setLoading] = useState(true);
286
270
  const [analytics, setAnalytics] = useState(null);
287
271
  useEffect(() => {
288
- if (!licenseLoading) {
289
- fetchAnalytics();
290
- }
291
- }, [licenseLoading]);
272
+ fetchAnalytics();
273
+ }, []);
292
274
  const fetchAnalytics = async () => {
293
275
  setLoading(true);
294
276
  try {
@@ -368,106 +350,6 @@ const AnalyticsPage = () => {
368
350
  setLoading(false);
369
351
  }
370
352
  };
371
- if (licenseLoading) {
372
- return /* @__PURE__ */ jsx(Container, { children: /* @__PURE__ */ jsxs(LoadingOverlay, { children: [
373
- /* @__PURE__ */ jsx(ChartBubble, { className: "loader-icon", style: { width: "64px", height: "64px", color: "var(--colors-primary600, #0284C7)" } }),
374
- /* @__PURE__ */ jsx(Loader, { children: "Checking license..." }),
375
- /* @__PURE__ */ jsx(Typography, { variant: "pi", textColor: "neutral600", children: "Please wait while we verify your premium access" })
376
- ] }) });
377
- }
378
- if (!isPremium) {
379
- return /* @__PURE__ */ jsx(Container, { children: /* @__PURE__ */ jsx(Box, { padding: 8, children: /* @__PURE__ */ jsxs(
380
- Box,
381
- {
382
- padding: 10,
383
- style: {
384
- background: "linear-gradient(135deg, rgba(234, 179, 8, 0.12) 0%, rgba(234, 179, 8, 0.25) 100%)",
385
- borderRadius: "20px",
386
- border: "3px solid rgba(234, 179, 8, 0.4)",
387
- textAlign: "center",
388
- boxShadow: "0 20px 40px rgba(245, 158, 11, 0.2)",
389
- maxWidth: "800px",
390
- margin: "60px auto",
391
- position: "relative",
392
- overflow: "hidden"
393
- },
394
- children: [
395
- /* @__PURE__ */ jsx("div", { style: {
396
- position: "absolute",
397
- top: 0,
398
- left: 0,
399
- right: 0,
400
- bottom: 0,
401
- backgroundImage: "radial-gradient(circle at 20% 80%, transparent 50%, rgba(255, 255, 255, 0.1) 50%)",
402
- backgroundSize: "20px 20px",
403
- opacity: 0.5,
404
- zIndex: 0
405
- } }),
406
- /* @__PURE__ */ jsxs("div", { style: { position: "relative", zIndex: 1 }, children: [
407
- /* @__PURE__ */ jsx(AnimatedIcon, { as: Crown }),
408
- /* @__PURE__ */ jsx(
409
- Typography,
410
- {
411
- variant: "alpha",
412
- style: {
413
- color: "var(--colors-warning600, #92400e)",
414
- fontWeight: "700",
415
- marginBottom: "24px",
416
- fontSize: "36px",
417
- display: "block",
418
- textShadow: "0 2px 4px rgba(0, 0, 0, 0.1)"
419
- },
420
- children: "Analytics Dashboard"
421
- }
422
- ),
423
- /* @__PURE__ */ jsx(
424
- Typography,
425
- {
426
- variant: "omega",
427
- style: {
428
- color: "var(--colors-warning600, #78350f)",
429
- lineHeight: "1.9",
430
- marginBottom: "44px",
431
- fontSize: "17px",
432
- display: "block",
433
- maxWidth: "620px",
434
- margin: "0 auto 44px"
435
- },
436
- children: "Unlock premium analytics to get powerful insights about your user sessions, device statistics, browser trends, and activity patterns"
437
- }
438
- ),
439
- /* @__PURE__ */ jsx(
440
- "button",
441
- {
442
- onClick: () => window.open("https://magicapi.fitlex.me", "_blank"),
443
- style: {
444
- background: "linear-gradient(135deg, var(--colors-warning600, #f59e0b) 0%, var(--colors-warning600, #d97706) 100%)",
445
- color: "white",
446
- border: "none",
447
- padding: "16px 48px",
448
- borderRadius: "12px",
449
- fontSize: "17px",
450
- fontWeight: "700",
451
- cursor: "pointer",
452
- boxShadow: "0 6px 16px rgba(245, 158, 11, 0.4)",
453
- transition: "all 0.3s cubic-bezier(0.4, 0, 0.2, 1)"
454
- },
455
- onMouseEnter: (e) => {
456
- e.currentTarget.style.transform = "translateY(-3px) scale(1.05)";
457
- e.currentTarget.style.boxShadow = "0 12px 24px rgba(245, 158, 11, 0.5)";
458
- },
459
- onMouseLeave: (e) => {
460
- e.currentTarget.style.transform = "translateY(0) scale(1)";
461
- e.currentTarget.style.boxShadow = "0 6px 16px rgba(245, 158, 11, 0.4)";
462
- },
463
- children: "Upgrade to Premium"
464
- }
465
- )
466
- ] })
467
- ]
468
- }
469
- ) }) });
470
- }
471
353
  if (loading) {
472
354
  return /* @__PURE__ */ jsx(Container, { children: /* @__PURE__ */ jsxs(LoadingOverlay, { children: [
473
355
  /* @__PURE__ */ jsx(ChartBubble, { className: "loader-icon", style: { width: "64px", height: "64px", color: "var(--colors-primary600, #0284C7)" } }),