<!doctype html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <link rel="icon" type="image/png" href="/generated-icon.png" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>The Last Page - Fountain Pen Ink Community</title>
    <meta
      name="description"
      content="Discover and share fountain pen inks in our vibrant community. Browse detailed ink profiles, read reviews, and connect with fellow ink enthusiasts."
    />

    <link rel="preconnect" href="https://fonts.googleapis.com" />
    <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />

    <script>
      window.dataLayer = window.dataLayer || [];
      function gtag() {
        dataLayer.push(arguments);
      }
      function initGoogleAnalytics() {
        if (
          document.querySelector('script[src*="googletagmanager.com/gtag/js"]')
        )
          return;
        const script = document.createElement("script");
        script.async = true;
        script.src = "https://www.googletagmanager.com/gtag/js?id=G-5EHT7BDH84";
        document.head.appendChild(script);
        gtag("js", new Date());
        gtag("config", "G-5EHT7BDH84");
      }
      function disableGoogleAnalytics() {
        window["ga-disable-G-5EHT7BDH84"] = true;
      }
      function checkConsentAndInitAnalytics() {
        const consent = localStorage.getItem("cookie-consent");
        if (consent) {
          try {
            const preferences = JSON.parse(consent);
            if (preferences.analytics) initGoogleAnalytics();
            else disableGoogleAnalytics();
          } catch (e) {
            disableGoogleAnalytics();
          }
        } else {
          disableGoogleAnalytics();
        }
      }
      checkConsentAndInitAnalytics();
      window.addEventListener(
        "storage",
        (e) => e.key === "cookie-consent" && checkConsentAndInitAnalytics(),
      );
      window.addEventListener(
        "cookieConsentChanged",
        checkConsentAndInitAnalytics,
      );
    </script>
    <script>
      window.__CSRF_TOKEN__ = null;
      (function () {
        fetch("/api/auth/csrf-token", { method: "GET", credentials: "include" })
          .then((response) => response.json())
          .then((data) => {
            if (data.csrfToken) {
              window.__CSRF_TOKEN__ = data.csrfToken;
              sessionStorage.setItem("csrfToken", data.csrfToken);
            }
          })
          .catch((err) => console.warn("Failed to fetch CSRF token:", err));
      })();
    </script>
    <script type="module" crossorigin src="/assets/index-gZ0utFWt.js"></script>
    <link rel="modulepreload" crossorigin href="/assets/vendor-Cm1Ip-i2.js">
    <link rel="stylesheet" crossorigin href="/assets/index-BWfkscqz.css">
  </head>
  <body>
    <div id="root"></div>
  </body>
</html>
