PageSourceSearch

https://marsam.ai/assets/CookiePreferences-BLegLCoZ.js

js marsam.ai collected 2026-10-05 13:55:38 UTC 6,578 bytes, 1 lines download raw bytes

1import{a as e,j as s}from"./react-core-DLlA8LI2.js";import{L as r}from"./router-DfYlIM1r.js";import{d as c,cc as i,b2 as a,ah as t,S as n,V as o,ai as l,aE as m,a3 as d,ak as x,a4 as f,aF as p,bF as k,dr as h,ds as j,dt as g}from"./App-CcePo74S.js";import{S as P}from"./switch-EzfsaYwS.js";import{S as u}from"./separator-Kc-9Qcox.js";import{initFirstPromoter as y}from"./firstPromoter-B4leNE0b.js";import{C as N}from"./chart-column-DuzszbUI.js";import{C as v}from"./cookie-CEmKzMJf.js";import"./ui-primitives-IhHSEEmV.js";import"./supabase-BLS1Ze6F.js";import"./index-ljogzA6g.js";import"./posthog-COXnIbPv.js";import"./i18n-0igNkSVX.js";import"./framer-motion-CLQgV8iX.js";const b="marsam_cookie_preferences",E="marsam_cookie_consent",w={essential:!0,analytics:!1,marketing:!1,preferences:!1};function D(){if("undefined"==typeof window)return w;const e=localStorage.getItem(b);if(e)try{return{...w,...JSON.parse(e),essential:!0}}catch{return w}return"accepted"===localStorage.getItem(E)?{essential:!0,analytics:!0,marketing:!0,preferences:!0}:w}function S(e){localStorage.setItem(b,JSON.stringify(e)),localStorage.setItem(E,"custom"),window.gtag&&window.gtag("consent","update",{analytics_storage:e.analytics?"granted":"denied",ad_storage:e.marketing?"granted":"denied"}),h(e.marketing),e.marketing&&(j(),g(),y())}function T(){const{t:h}=c(),[j,g]=e.useState(w),[y,b]=e.useState(!1);e.useEffect(()=>{g(D())},[]);const E=[{key:"essential",title:h("cookiePreferences.essentialTitle"),description:h("cookiePreferences.essentialDesc"),icon:i,required:!0,examples:[h("cookiePreferences.essentialEx1"),h("cookiePreferences.essentialEx2"),h("cookiePreferences.essentialEx3"),h("cookiePreferences.essentialEx4")]},{key:"analytics",title:h("cookiePreferences.analyticsTitle"),description:h("cookiePreferences.analyticsDesc"),icon:N,required:!1,examples:[h("cookiePreferences.analyticsEx1"),h("cookiePreferences.analyticsEx2"),h("cookiePreferences.analyticsEx3"),h("cookiePreferences.analyticsEx4")]},{key:"preferences",title:h("cookiePreferences.preferencesTitle"),description:h("cookiePreferences.preferencesDesc"),icon:a,required:!1,examples:[h("cookiePreferences.preferencesEx1"),h("cookiePreferences.preferencesEx2"),h("cookiePreferences.preferencesEx3"),h("cookiePreferences.preferencesEx4")]},{key:"marketing",title:h("cookiePreferences.marketingTitle"),description:h("cookiePreferences.marketingDesc"),icon:v,required:!1,examples:[h("cookiePreferences.marketingEx1"),h("cookiePreferences.marketingEx2"),h("cookiePreferences.marketingEx3"),h("cookiePreferences.marketingEx4")]}];return s.jsx(t,{children:s.jsx("div",{className:"container py-12",children:s.jsxs("div",{className:"max-w-4xl mx-auto",children:[s.jsxs("div",{className:"space-y-2 mb-8",children:[s.jsx("h1",{className:"text-4xl font-bold",children:h("cookiePreferences.title")}),s.jsx("p",{className:"text-muted-foreground",children:h("cookiePreferences.subtitle")})]}),s.jsxs("div",{className:"flex flex-wrap gap-3 mb-8",children:[s.jsxs(n,{onClick:()=>{const e={essential:!0,analytics:!0,marketing:!0,preferences:!0};g(e),S(e),b(!1),k.success(h("cookiePreferences.acceptedTitle"),{description:h("cookiePreferences.acceptedDesc")})},className:"gap-2",children:[s.jsx(o,{className:"h-4 w-4"}),h("cookiePreferences.acceptAll")]}),s.jsx(n,{variant:"outline",onClick:()=>{const e={essential:!0,analytics:!1,marketing:!1,preferences:!1};g(e),S(e),b(!1),k.success(h("cookiePreferences.rejectedTitle"),{description:h("cookiePreferences.rejectedDesc")})},children:h("cookiePreferences.rejectNonEssential")})]}),s.jsx("div",{className:"space-y-4 mb-8",children:E.map(e=>{const r=e.icon,c=j[e.key];return s.jsxs(l,{className:c?"border-primary/30":"",children:[s.jsx(m,{className:"pb-3",children:s.jsxs("div",{className:"flex items-start justify-between gap-4",children:[s.jsxs("div",{className:"flex items-start gap-3",children:[s.jsx("div",{className:"p-2 rounded-lg "+(c?"bg-primary/10":"bg-muted"),children:s.jsx(r,{className:"h-5 w-5 "+(c?"text-primary":"text-muted-foreground")})}),s.jsxs("div",{className:"space-y-1",children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx(d,{className:"text-lg",children:e.title}),e.required&&s.jsx(x,{variant:"secondary",className:"text-xs",children:h("cookiePreferences.required")})]}),s.jsx(f,{className:"text-sm",children:e.description})]})]}),s.jsx(P,{checked:c,onCheckedChange:()=>{var s;"essential"!==(s=e.key)&&g(e=>(b(!0),{...e,[s]:!e[s]}))},disabled:e.required,"aria-label":h("cookiePreferences.toggleAria",{title:e.title})})]})}),s.jsx(p,{className:"pt-0",children:s.jsx("div",{className:"flex flex-wrap gap-2",children:e.examples.map(e=>s.jsx(x,{variant:"outline",className:"text-xs font-normal",children:e},e))})})]},e.key)})}),y&&s.jsx("div",{className:"sticky bottom-4 flex justify-center",children:s.jsx(n,{onClick:()=>{S(j),b(!1),k.success(h("cookiePreferences.savedTitle"),{description:h("cookiePreferences.savedDesc")})},size:"lg",className:"shadow-lg",children:h("cookiePreferences.savePreferences")})}),s.jsx(u,{className:"my-8"}),s.jsxs("div",{className:"space-y-6",children:[s.jsxs("section",{children:[s.jsx("h2",{className:"text-xl font-semibold mb-3",children:h("cookiePreferences.aboutTitle")}),s.jsx("p",{className:"text-muted-foreground text-sm leading-relaxed",children:h("cookiePreferences.aboutDesc")})]}),s.jsxs("section",{children:[s.jsx("h2",{className:"text-xl font-semibold mb-3",children:h("cookiePreferences.rightsTitle")}),s.jsx("p",{className:"text-muted-foreground text-sm leading-relaxed",children:h("cookiePreferences.rightsDesc")}),s.jsxs("ul",{className:"list-disc list-inside text-muted-foreground text-sm mt-2 space-y-1",children:[s.jsx("li",{children:h("cookiePreferences.rights1")}),s.jsx("li",{children:h("cookiePreferences.rights2")}),s.jsx("li",{children:h("cookiePreferences.rights3")}),s.jsx("li",{children:h("cookiePreferences.rights4")})]})]}),s.jsxs("section",{children:[s.jsx("h2",{className:"text-xl font-semibold mb-3",children:h("cookiePreferences.moreInfoTitle")}),s.jsxs("p",{className:"text-muted-foreground text-sm leading-relaxed",children:[h("cookiePreferences.moreInfoDesc").split("Privacy Policy")[0],s.jsx(r,{to:"/privacy",className:"text-primary hover:underline",children:"Privacy Policy"}),h("cookiePreferences.moreInfoDesc").split("[email protected]")[0].split("Privacy Policy")[1],s.jsx("a",{href:"mailto:[email protected]",className:"text-primary hover:underline",children:"[email protected]"}),"."]})]})]})]})})})}export{T as default,D as getCookiePreferences,S as saveCookiePreferences};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.