1import{r as G}from"./BNNRdYrd.js";import{o as D}from"./crqBNO2U.js";import{B as k,E as w,Gt as _,I as x,Kt as B,M as R,N as o,P as f,Qt as r,Rt as $,Tt as d,ft as j,jt as z,mt as V,q as F,st as u,z as J}from"./DcGtCD8U.js";import{h as O,lt as q,n as U}from"./BeCnAv6l.js";import{Di as v,Ka as Q,_o as Y,go as H,qa as E,uo as W,xf as S,za as X}from"./C0ES5k8B.js";import{J as Z,Yt as ee}from"./BCh8aLr1.js";import{t as te}from"./kqsXuQgx.js";import{t as oe}from"./DEyU7gPw.js";import{t as se}from"./BcYa7iP_.js";import{n as ae}from"./BQisKs-F.js";var Ne=G({default:()=>de});z(),F();B();var ne={class:"o-modal__container"},ie={class:"title-h2"},ce={class:"o-modal__body"},re={class:"title-h3"},le={class:"o-list-bare"},_e={class:"o-modal__footer"},de={__name:"ModalCookiesSettings",setup(ue){const{$vfm:C}=D(),N=Z(),{trackGaEvent:h}=te(),{setCookiesConsent:y}=ee(),b=N("/wiki/cookie-policy"),a=$(E),I=R(()=>Object.values(a.value)),m=()=>{localStorage.setItem(v.COOKIES_ACCEPTED,"true"),C.hide(S.COOKIES_SETTINGS);const e=O(H);e&&!a.value[Q.PREFERENCES].checked&&(e.value=void 0)},T=()=>{g(a.value),p({marketing:a.value.marketing.checked,analytics:a.value.analytics.checked,preferences:a.value.preferences.checked},"custom"),m()},P=()=>{g(E),p({marketing:!0,analytics:!0,preferences:!0}),m()},p=({preferences:e,marketing:t,analytics:s},n="use all")=>{const i={functionality_storage:"granted",security_storage:"granted",ad_storage:t?"granted":"denied",ad_personalization:t?"granted":"denied",ad_user_data:t?"granted":"denied",analytics_storage:s?"granted":"denied",personalization_storage:e?"granted":"denied"};window.dataLayer=window.dataLayer||[];function l(){dataLayer.push(arguments)}l("consent","update",i),localStorage.setItem(v.COOKIES_CONSENT_MODE,JSON.stringify(i));const c=q(),{gameTitle:L,locale:M,sourcePage:A}=oe(c);h({event:X.CONSENT_POPUP,game_title:L,locale:M,source_page:A,consent_setting:n,custom_consent_setting:JSON.stringify({preferences:e,marketing:t,analytics:s})})},g=e=>{const t=Object.values(e).filter(({checked:n})=>n).map(({name:n})=>n),s=O(W,{...Y});s.value=t.join(),s.value&&y(s.value.split(","))},K=({name:e,value:t})=>{a.value[e].checked=t};return(e,t)=>{const s=U,n=V("i18n-t"),i=ae,l=se;return u(),f(l,{class:"o-modal c-modal-cookies-settings",name:_(S).COOKIES_SETTINGS,"click-to-close":!1,"esc-to-close":!1,"lock-scroll":!1,"hide-overlay":!0,background:"interactive"},{default:d(()=>[o("div",ne,[o("header",null,[o("div",ie,r(e.$t("components.modal.cookies.settings.title")),1)]),o("div",ce,[o("p",re,[k(n,{keypath:"components.modal.cookies.settings.description"},{cookies_link_more:d(()=>[k(s,{class:"link-more",to:_(b)},{default:d(()=>[J(r(e.$t("components.modal.cookies.settings.link_more")),1)]),_:1},8,["to"])]),_:1})]),o("ul",le,[(u(!0),x(w,null,j(_(I),c=>(u(),f(i,{key:c.name,data:c,onChange:K},null,8,["data"]))),128))])]),o("div",_e,[o("button",{class:"c-button c-button--secondary",type:"button",onClick:t[0]||(t[0]=()=>T())},r(e.$t("components.modal.cookies.settings.button_accept_selected")),1),o("button",{class:"c-button",type:"button",onClick:t[1]||(t[1]=()=>P())},r(e.$t("components.modal.cookies.settings.button_accept")),1)])])]),_:1},8,["name"])}}};export{de as n,Ne as t};
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.