@leancodepl/cookie-consent 9.7.4 → 10.0.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.
- package/CHANGELOG.md +24 -0
- package/dist/index.js +100 -741
- package/dist/index.umd.cjs +1 -1
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,30 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file. See
|
|
4
4
|
[Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
## [10.0.1](https://github.com/leancodepl/js_corelibrary/compare/v10.0.0...v10.0.1) (2026-02-13)
|
|
7
|
+
|
|
8
|
+
### Features
|
|
9
|
+
|
|
10
|
+
- move publish targets to nx plugin
|
|
11
|
+
([aa68e33](https://github.com/leancodepl/js_corelibrary/commit/aa68e33991cd9ce7af3dab3f10f1d0a8030b4d28))
|
|
12
|
+
|
|
13
|
+
# Change Log
|
|
14
|
+
|
|
15
|
+
All notable changes to this project will be documented in this file. See
|
|
16
|
+
[Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
17
|
+
|
|
18
|
+
# [10.0.0](https://github.com/leancodepl/js_corelibrary/compare/v9.7.4...v10.0.0) (2026-02-11)
|
|
19
|
+
|
|
20
|
+
### Bug Fixes
|
|
21
|
+
|
|
22
|
+
- exclude external packages from build output
|
|
23
|
+
([4c2be7a](https://github.com/leancodepl/js_corelibrary/commit/4c2be7ac64eb6ed5603ba61b9aeef75a454dffb3))
|
|
24
|
+
|
|
25
|
+
# Change Log
|
|
26
|
+
|
|
27
|
+
All notable changes to this project will be documented in this file. See
|
|
28
|
+
[Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
29
|
+
|
|
6
30
|
## [9.7.4](https://github.com/leancodepl/js_corelibrary/compare/v9.7.3...v9.7.4) (2026-02-10)
|
|
7
31
|
|
|
8
32
|
**Note:** Version bump only for package @leancodepl/cookie-consent
|
package/dist/index.js
CHANGED
|
@@ -1,712 +1,71 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
}, w = (t, n, o) => t.setAttribute(n, o), Ne = (t, n, o) => {
|
|
12
|
-
t.removeAttribute(o ? "data-" + n : n);
|
|
13
|
-
}, xe = (t, n, o) => t.getAttribute(o ? "data-" + n : n), y = (t, n) => t.appendChild(n), T = (t, n) => t.classList.add(n), I = (t, n) => T(t, "cm__" + n), S = (t, n) => T(t, "pm__" + n), re = (t, n) => t.classList.remove(n), ee = (t) => {
|
|
14
|
-
if (typeof t != "object") return t;
|
|
15
|
-
if (t instanceof Date) return new Date(t.getTime());
|
|
16
|
-
let n = Array.isArray(t) ? [] : {};
|
|
17
|
-
for (let o in t) {
|
|
18
|
-
let e = t[o];
|
|
19
|
-
n[o] = ee(e);
|
|
20
|
-
}
|
|
21
|
-
return n;
|
|
22
|
-
}, ao = () => {
|
|
23
|
-
const t = {}, { O: n, X: o, Y: e } = a.o;
|
|
24
|
-
for (const r of n) t[r] = Oe(e[r], W(o[r]));
|
|
25
|
-
return t;
|
|
26
|
-
}, kt = (t, n) => dispatchEvent(new CustomEvent(t, { detail: n })), x = (t, n, o, e) => {
|
|
27
|
-
t.addEventListener(n, o), e && a.o.m.push({ pe: t, ge: n, me: o });
|
|
28
|
-
}, wt = () => {
|
|
29
|
-
const t = a.t.cookie.expiresAfterDays;
|
|
30
|
-
return J(t) ? t(a.o.F) : t;
|
|
31
|
-
}, Oe = (t, n) => {
|
|
32
|
-
const o = t || [], e = n || [];
|
|
33
|
-
return o.filter(((r) => !_(e, r))).concat(e.filter(((r) => !_(o, r))));
|
|
34
|
-
}, Pt = (t) => {
|
|
35
|
-
a.o.R = nt(t), a.o.F = (() => {
|
|
36
|
-
let n = "custom";
|
|
37
|
-
const { R: o, O: e, B: r } = a.o, c = o.length;
|
|
38
|
-
return c === e.length ? n = "all" : c === r.length && (n = "necessary"), n;
|
|
39
|
-
})();
|
|
40
|
-
}, Dt = (t, n, o, e) => {
|
|
41
|
-
const r = "accept-", { show: c, showPreferences: u, hide: s, hidePreferences: i, acceptCategory: d } = n, f = t || document, p = (k) => at(f, `[data-cc="${k}"]`), g = (k, b) => {
|
|
42
|
-
ye(k), d(b), i(), s();
|
|
43
|
-
}, m = p("show-preferencesModal"), l = p("show-consentModal"), v = p(r + "all"), z = p(r + "necessary"), C = p(r + "custom"), j = a.t.lazyHtmlGeneration;
|
|
44
|
-
for (const k of m) w(k, "aria-haspopup", "dialog"), x(k, H, ((b) => {
|
|
45
|
-
ye(b), u();
|
|
46
|
-
})), j && (x(k, "mouseenter", ((b) => {
|
|
47
|
-
ye(b), a.o.N || o(n, e);
|
|
48
|
-
}), !0), x(k, "focus", (() => {
|
|
49
|
-
a.o.N || o(n, e);
|
|
50
|
-
})));
|
|
51
|
-
for (let k of l) w(k, "aria-haspopup", "dialog"), x(k, H, ((b) => {
|
|
52
|
-
ye(b), c(!0);
|
|
53
|
-
}), !0);
|
|
54
|
-
for (let k of v) x(k, H, ((b) => {
|
|
55
|
-
g(b, "all");
|
|
56
|
-
}), !0);
|
|
57
|
-
for (let k of C) x(k, H, ((b) => {
|
|
58
|
-
g(b);
|
|
59
|
-
}), !0);
|
|
60
|
-
for (let k of z) x(k, H, ((b) => {
|
|
61
|
-
g(b, []);
|
|
62
|
-
}), !0);
|
|
63
|
-
}, V = (t, n) => {
|
|
64
|
-
t && (n && (t.tabIndex = -1), t.focus(), n && t.removeAttribute("tabindex"));
|
|
65
|
-
}, Bt = (t, n) => {
|
|
66
|
-
const o = (e) => {
|
|
67
|
-
e.target.removeEventListener("transitionend", o), e.propertyName === "opacity" && getComputedStyle(t).opacity === "1" && V(((r) => r === 1 ? a.ne.be : a.ne.ve)(n));
|
|
68
|
-
};
|
|
69
|
-
x(t, "transitionend", o);
|
|
70
|
-
};
|
|
71
|
-
let bt;
|
|
72
|
-
const Ht = (t) => {
|
|
73
|
-
clearTimeout(bt), t ? T(a.ne.ye, Ue) : bt = setTimeout((() => {
|
|
74
|
-
re(a.ne.ye, Ue);
|
|
75
|
-
}), 500);
|
|
76
|
-
}, so = ["M 19.5 4.5 L 4.5 19.5 M 4.5 4.501 L 19.5 19.5", "M 3.572 13.406 L 8.281 18.115 L 20.428 5.885", "M 21.999 6.94 L 11.639 17.18 L 2.001 6.82 "], je = (t = 0, n = 1.5) => `<svg viewBox="0 0 24 24" stroke-width="${n}"><path d="${so[t]}"/></svg>`, It = (t) => {
|
|
77
|
-
const n = a.ne, o = a.o;
|
|
78
|
-
((e) => {
|
|
79
|
-
const r = e === n.he, c = o.i.disablePageInteraction ? n.ye : r ? n.Ce : n.ye;
|
|
80
|
-
x(c, "keydown", ((u) => {
|
|
81
|
-
if (u.key !== "Tab" || !(r ? o.k && !o.A : o.A)) return;
|
|
82
|
-
const s = Be(), i = r ? o.q : o.K;
|
|
83
|
-
i.length !== 0 && (u.shiftKey ? s !== i[0] && e.contains(s) || (ye(u), V(i[1])) : s !== i[1] && e.contains(s) || (ye(u), V(i[0])));
|
|
84
|
-
}), !0);
|
|
85
|
-
})(t);
|
|
86
|
-
}, io = ["[href]", $, "input", "details", "[tabindex]"].map(((t) => t + ':not([tabindex="-1"])')).join(","), Nt = (t) => {
|
|
87
|
-
const { o: n, ne: o } = a, e = (r, c) => {
|
|
88
|
-
const u = at(r, io);
|
|
89
|
-
c[0] = u[0], c[1] = u[u.length - 1];
|
|
90
|
-
};
|
|
91
|
-
t === 1 && n.T && e(o.he, n.q), t === 2 && n.N && e(o.we, n.K);
|
|
92
|
-
}, K = (t, n, o) => {
|
|
93
|
-
const { de: e, le: r, ie: c, _e: u, ue: s, fe: i } = a.ce, d = a.re;
|
|
94
|
-
if (n) {
|
|
95
|
-
const p = { modalName: n };
|
|
96
|
-
return t === d.fe ? J(i) && i(p) : t === d._e ? J(u) && u(p) : (p.modal = o, J(s) && s(p)), kt(t, p);
|
|
97
|
-
}
|
|
98
|
-
const f = { cookie: a.o.p };
|
|
99
|
-
t === d.ie ? J(c) && c(ee(f)) : t === d.le ? J(r) && r(ee(f)) : (f.changedCategories = a.o.L, f.changedServices = a.o.ee, J(e) && e(ee(f))), kt(t, ee(f));
|
|
100
|
-
}, _e = (t, n) => {
|
|
101
|
-
try {
|
|
102
|
-
return t();
|
|
103
|
-
} catch (o) {
|
|
104
|
-
return !n && console.warn("CookieConsent:", o), !1;
|
|
105
|
-
}
|
|
106
|
-
}, Ze = (t) => {
|
|
107
|
-
const { Y: n, ee: o, O: e, X: r, oe: c, p: u, L: s } = a.o;
|
|
108
|
-
for (const p of e) {
|
|
109
|
-
const g = o[p] || n[p] || [];
|
|
110
|
-
for (const m of g) {
|
|
111
|
-
const l = r[p][m];
|
|
112
|
-
if (!l) continue;
|
|
113
|
-
const { onAccept: v, onReject: z } = l;
|
|
114
|
-
!l.Se && _(n[p], m) ? (l.Se = !0, J(v) && v()) : l.Se && !_(n[p], m) && (l.Se = !1, J(z) && z());
|
|
115
|
-
}
|
|
116
|
-
}
|
|
117
|
-
if (!a.t.manageScriptTags) return;
|
|
118
|
-
const i = c, d = t || u.categories || [], f = (p, g) => {
|
|
119
|
-
if (g >= p.length) return;
|
|
120
|
-
const m = c[g];
|
|
121
|
-
if (m.xe) return f(p, g + 1);
|
|
122
|
-
const l = m.Me, v = m.De, z = m.Te, C = _(d, v), j = !!z && _(n[v], z);
|
|
123
|
-
if (!z && !m.ke && C || !z && m.ke && !C && _(s, v) || z && !m.ke && j || z && m.ke && !j && _(o[v] || [], z)) {
|
|
124
|
-
m.xe = !0;
|
|
125
|
-
const k = xe(l, "type", !0);
|
|
126
|
-
Ne(l, "type", !!k), Ne(l, Pe);
|
|
127
|
-
let b = xe(l, "src", !0);
|
|
128
|
-
b && Ne(l, "src", !0);
|
|
129
|
-
const M = h("script");
|
|
130
|
-
M.textContent = l.innerHTML;
|
|
131
|
-
for (const { nodeName: L } of l.attributes) w(M, L, l[L] || xe(l, L));
|
|
132
|
-
k && (M.type = k), b ? M.src = b : b = l.src;
|
|
133
|
-
const A = !!b && (!k || ["text/javascript", "module"].includes(k));
|
|
134
|
-
if (A && (M.onload = M.onerror = () => {
|
|
135
|
-
f(p, ++g);
|
|
136
|
-
}), l.replaceWith(M), A) return;
|
|
137
|
-
}
|
|
138
|
-
f(p, ++g);
|
|
139
|
-
};
|
|
140
|
-
f(i, 0);
|
|
141
|
-
}, Ae = "bottom", Fe = "left", Rt = "center", st = "right", Re = "inline", Et = "wide", Gt = "pm--", Ee = ["middle", "top", Ae], vt = [Fe, Rt, st], ro = { box: { Ee: [Et, Re], Ae: Ee, Ne: vt, He: Ae, Ve: st }, cloud: { Ee: [Re], Ae: Ee, Ne: vt, He: Ae, Ve: Rt }, bar: { Ee: [Re], Ae: Ee.slice(1), Ne: [], He: Ae, Ve: "" } }, co = { box: { Ee: [], Ae: [], Ne: [], He: "", Ve: "" }, bar: { Ee: [Et], Ae: [], Ne: [Fe, st], He: "", Ve: Fe } }, Ut = (t) => {
|
|
142
|
-
const n = a.o.i.guiOptions, o = n && n.consentModal, e = n && n.preferencesModal;
|
|
143
|
-
t === 0 && zt(a.ne.he, ro, o, "cm--", "box", "cm"), t === 1 && zt(a.ne.we, co, e, Gt, "box", "pm");
|
|
144
|
-
}, zt = (t, n, o, e, r, c) => {
|
|
145
|
-
t.className = c;
|
|
146
|
-
const u = o && o.layout, s = o && o.position, i = o && o.flipButtons, d = !o || o.equalWeightButtons !== !1, f = u && u.split(" ") || [], p = f[0], g = f[1], m = p in n ? p : r, l = n[m], v = _(l.Ee, g) && g, z = s && s.split(" ") || [], C = z[0], j = e === Gt ? z[0] : z[1], k = _(l.Ae, C) ? C : l.He, b = _(l.Ne, j) ? j : l.Ve, M = (L) => {
|
|
147
|
-
L && T(t, e + L);
|
|
148
|
-
};
|
|
149
|
-
M(m), M(v), M(k), M(b), i && M("flip");
|
|
150
|
-
const A = c + "__btn--secondary";
|
|
151
|
-
if (c === "cm") {
|
|
152
|
-
const { Ie: L, Le: N } = a.ne;
|
|
153
|
-
L && (d ? re(L, A) : T(L, A)), N && (d ? re(N, A) : T(N, A));
|
|
154
|
-
} else {
|
|
155
|
-
const { je: L } = a.ne;
|
|
156
|
-
L && (d ? re(L, A) : T(L, A));
|
|
157
|
-
}
|
|
158
|
-
}, ke = (t, n) => {
|
|
159
|
-
const o = a.o, e = a.ne, { hide: r, hidePreferences: c, acceptCategory: u } = t, s = (b) => {
|
|
160
|
-
u(b), c(), r();
|
|
161
|
-
}, i = o.u && o.u.preferencesModal;
|
|
162
|
-
if (!i) return;
|
|
163
|
-
const d = i.title, f = i.closeIconLabel, p = i.acceptAllBtn, g = i.acceptNecessaryBtn, m = i.savePreferencesBtn, l = i.sections || [], v = p || g || m;
|
|
164
|
-
if (e.Fe) e.Pe = h("div"), S(e.Pe, "body");
|
|
165
|
-
else {
|
|
166
|
-
e.Fe = h("div"), T(e.Fe, "pm-wrapper");
|
|
167
|
-
const b = h("div");
|
|
168
|
-
T(b, "pm-overlay"), y(e.Fe, b), x(b, H, c), e.we = h("div"), T(e.we, "pm"), w(e.we, "role", "dialog"), w(e.we, q, !0), w(e.we, "aria-modal", !0), w(e.we, "aria-labelledby", "pm__title"), x(e.ye, "keydown", ((M) => {
|
|
169
|
-
M.keyCode === 27 && c();
|
|
170
|
-
}), !0), e.Oe = h("div"), S(e.Oe, "header"), e.Re = h("h2"), S(e.Re, "title"), e.Re.id = "pm__title", e.Be = h($), S(e.Be, "close-btn"), w(e.Be, "aria-label", i.closeIconLabel || ""), x(e.Be, H, c), e.$e = h("span"), e.$e.innerHTML = je(), y(e.Be, e.$e), e.Ge = h("div"), S(e.Ge, "body"), e.Je = h("div"), S(e.Je, "footer");
|
|
171
|
-
var z = h("div");
|
|
172
|
-
T(z, "btns");
|
|
173
|
-
var C = h("div"), j = h("div");
|
|
174
|
-
S(C, Se), S(j, Se), y(e.Je, C), y(e.Je, j), y(e.Oe, e.Re), y(e.Oe, e.Be), e.ve = h("div"), w(e.ve, "tabIndex", -1), y(e.we, e.ve), y(e.we, e.Oe), y(e.we, e.Ge), v && y(e.we, e.Je), y(e.Fe, e.we);
|
|
175
|
-
}
|
|
176
|
-
let k;
|
|
177
|
-
d && (e.Re.innerHTML = d, f && w(e.Be, "aria-label", f)), l.forEach(((b, M) => {
|
|
178
|
-
const A = b.title, L = b.description, N = b.linkedCategory, pe = N && o.P[N], ce = b.cookieTable, Z = ce && ce.body, oe = ce && ce.caption, F = Z && Z.length > 0, D = !!pe, R = D && o.X[N], ne = De(R) && W(R) || [], P = D && (!!L || !!F || W(R).length > 0);
|
|
179
|
-
var X = h("div");
|
|
180
|
-
if (S(X, "section"), P || L) {
|
|
181
|
-
var Y = h("div");
|
|
182
|
-
S(Y, "section-desc-wrapper");
|
|
183
|
-
}
|
|
184
|
-
let ae = ne.length;
|
|
185
|
-
if (P && ae > 0) {
|
|
186
|
-
const B = h("div");
|
|
187
|
-
S(B, "section-services");
|
|
188
|
-
for (const U of ne) {
|
|
189
|
-
const O = R[U], E = O && O.label || U, le = h("div"), ue = h("div"), ve = h("div"), fe = h("div");
|
|
190
|
-
S(le, "service"), S(fe, "service-title"), S(ue, "service-header"), S(ve, "service-icon");
|
|
191
|
-
const Q = Ct(E, U, pe, !0, N);
|
|
192
|
-
fe.innerHTML = E, y(ue, ve), y(ue, fe), y(le, ue), y(le, Q), y(B, le);
|
|
193
|
-
}
|
|
194
|
-
y(Y, B);
|
|
195
|
-
}
|
|
196
|
-
if (A) {
|
|
197
|
-
var se = h("div"), G = h(D ? $ : "div");
|
|
198
|
-
if (S(se, "section-title-wrapper"), S(G, "section-title"), G.innerHTML = A, y(se, G), D) {
|
|
199
|
-
const B = h("span");
|
|
200
|
-
B.innerHTML = je(2, 3.5), S(B, "section-arrow"), y(se, B), X.className += "--toggle";
|
|
201
|
-
const U = Ct(A, N, pe);
|
|
202
|
-
let O = i.serviceCounterLabel;
|
|
203
|
-
if (ae > 0 && te(O)) {
|
|
204
|
-
let E = h("span");
|
|
205
|
-
S(E, "badge"), S(E, "service-counter"), w(E, q, !0), w(E, "data-servicecounter", ae), O && (O = O.split("|"), O = O.length > 1 && ae > 1 ? O[1] : O[0], w(E, "data-counterlabel", O)), E.innerHTML = ae + (O ? " " + O : ""), y(G, E);
|
|
206
|
-
}
|
|
207
|
-
if (P) {
|
|
208
|
-
S(X, "section--expandable");
|
|
209
|
-
var yt = N + "-desc";
|
|
210
|
-
w(G, "aria-expanded", !1), w(G, "aria-controls", yt);
|
|
211
|
-
}
|
|
212
|
-
y(se, U);
|
|
213
|
-
} else w(G, "role", "heading"), w(G, "aria-level", "3");
|
|
214
|
-
y(X, se);
|
|
215
|
-
}
|
|
216
|
-
if (L) {
|
|
217
|
-
var Ie = h("p");
|
|
218
|
-
S(Ie, "section-desc"), Ie.innerHTML = L, y(Y, Ie);
|
|
219
|
-
}
|
|
220
|
-
if (P && (w(Y, q, "true"), Y.id = yt, ((B, U, O) => {
|
|
221
|
-
x(G, H, (() => {
|
|
222
|
-
U.classList.contains("is-expanded") ? (re(U, "is-expanded"), w(O, "aria-expanded", "false"), w(B, q, "true")) : (T(U, "is-expanded"), w(O, "aria-expanded", "true"), w(B, q, "false"));
|
|
223
|
-
}));
|
|
224
|
-
})(Y, X, G), F)) {
|
|
225
|
-
const B = h("table"), U = h("thead"), O = h("tbody");
|
|
226
|
-
if (oe) {
|
|
227
|
-
const Q = h("caption");
|
|
228
|
-
S(Q, "table-caption"), Q.innerHTML = oe, B.appendChild(Q);
|
|
229
|
-
}
|
|
230
|
-
S(B, "section-table"), S(U, "table-head"), S(O, "table-body");
|
|
231
|
-
const E = ce.headers, le = W(E), ue = e.Ue.createDocumentFragment(), ve = h("tr");
|
|
232
|
-
for (const Q of le) {
|
|
233
|
-
const ge = E[Q], ie = h("th");
|
|
234
|
-
ie.id = "cc__row-" + ge + M, w(ie, "scope", "col"), S(ie, "table-th"), ie.innerHTML = ge, y(ue, ie);
|
|
235
|
-
}
|
|
236
|
-
y(ve, ue), y(U, ve);
|
|
237
|
-
const fe = e.Ue.createDocumentFragment();
|
|
238
|
-
for (const Q of Z) {
|
|
239
|
-
const ge = h("tr");
|
|
240
|
-
S(ge, "table-tr");
|
|
241
|
-
for (const ie of le) {
|
|
242
|
-
const ht = E[ie], no = Q[ie], ze = h("td"), mt = h("div");
|
|
243
|
-
S(ze, "table-td"), w(ze, "data-column", ht), w(ze, "headers", "cc__row-" + ht + M), mt.insertAdjacentHTML("beforeend", no), y(ze, mt), y(ge, ze);
|
|
244
|
-
}
|
|
245
|
-
y(fe, ge);
|
|
246
|
-
}
|
|
247
|
-
y(O, fe), y(B, U), y(B, O), y(Y, B);
|
|
248
|
-
}
|
|
249
|
-
(P || L) && y(X, Y);
|
|
250
|
-
const oo = e.Pe || e.Ge;
|
|
251
|
-
D ? (k || (k = h("div"), S(k, "section-toggles")), k.appendChild(X)) : k = null, y(oo, k || X);
|
|
252
|
-
})), p && (e.ze || (e.ze = h($), S(e.ze, "btn"), w(e.ze, he, "all"), y(C, e.ze), x(e.ze, H, (() => s("all")))), e.ze.innerHTML = p), g && (e.je || (e.je = h($), S(e.je, "btn"), w(e.je, he, "necessary"), y(C, e.je), x(e.je, H, (() => s([])))), e.je.innerHTML = g), m && (e.qe || (e.qe = h($), S(e.qe, "btn"), S(e.qe, "btn--secondary"), w(e.qe, he, "save"), y(j, e.qe), x(e.qe, H, (() => s()))), e.qe.innerHTML = m), e.Pe && (e.we.replaceChild(e.Pe, e.Ge), e.Ge = e.Pe), Ut(1), o.N || (o.N = !0, K(a.re.ue, ot, e.we), n(t), y(e.Ce, e.Fe), It(e.we), setTimeout((() => T(e.Fe, "cc--anim")), 100)), Nt(2);
|
|
253
|
-
};
|
|
254
|
-
function Ct(t, n, o, e, r) {
|
|
255
|
-
const c = a.o, u = a.ne, s = h("label"), i = h("input"), d = h("span"), f = h("span"), p = h("span"), g = h("span"), m = h("span");
|
|
256
|
-
if (g.innerHTML = je(1, 3), m.innerHTML = je(0, 3), i.type = "checkbox", T(s, "section__toggle-wrapper"), T(i, "section__toggle"), T(g, "toggle__icon-on"), T(m, "toggle__icon-off"), T(d, "toggle__icon"), T(f, "toggle__icon-circle"), T(p, "toggle__label"), w(d, q, "true"), e ? (T(s, "toggle-service"), w(i, Pe, r), u.se[r][n] = i) : u.ae[n] = i, e ? ((l) => {
|
|
257
|
-
x(i, "change", (() => {
|
|
258
|
-
const v = u.se[l], z = u.ae[l];
|
|
259
|
-
c.Z[l] = [];
|
|
260
|
-
for (let C in v) {
|
|
261
|
-
const j = v[C];
|
|
262
|
-
j.checked && c.Z[l].push(j.value);
|
|
263
|
-
}
|
|
264
|
-
z.checked = c.Z[l].length > 0;
|
|
265
|
-
}));
|
|
266
|
-
})(r) : ((l) => {
|
|
267
|
-
x(i, H, (() => {
|
|
268
|
-
const v = u.se[l], z = i.checked;
|
|
269
|
-
c.Z[l] = [];
|
|
270
|
-
for (let C in v) v[C].checked = z, z && c.Z[l].push(C);
|
|
271
|
-
}));
|
|
272
|
-
})(n), i.value = n, p.textContent = t.replace(/<.*>.*<\/.*>/gm, ""), y(f, m), y(f, g), y(d, f), c.D) (o.readOnly || o.enabled) && (i.checked = !0);
|
|
273
|
-
else if (e) {
|
|
274
|
-
const l = c.Y[r];
|
|
275
|
-
i.checked = o.readOnly || _(l, n);
|
|
276
|
-
} else _(c.R, n) && (i.checked = !0);
|
|
277
|
-
return o.readOnly && (i.disabled = !0), y(s, i), y(s, d), y(s, p), s;
|
|
278
|
-
}
|
|
279
|
-
const Ge = () => {
|
|
280
|
-
const t = h("span");
|
|
281
|
-
return a.ne.Ke || (a.ne.Ke = t), t;
|
|
282
|
-
}, it = (t, n) => {
|
|
283
|
-
const o = a.o, e = a.ne, { hide: r, showPreferences: c, acceptCategory: u } = t, s = o.u && o.u.consentModal;
|
|
284
|
-
if (!s) return;
|
|
285
|
-
const i = s.acceptAllBtn, d = s.acceptNecessaryBtn, f = s.showPreferencesBtn, p = s.closeIconLabel, g = s.footer, m = s.label, l = s.title, v = (C) => {
|
|
286
|
-
r(), u(C);
|
|
287
|
-
};
|
|
288
|
-
if (!e.Qe) {
|
|
289
|
-
e.Qe = h("div"), e.he = h("div"), e.We = h("div"), e.Xe = h("div"), e.Ye = h("div"), T(e.Qe, "cm-wrapper"), T(e.he, "cm"), I(e.We, "body"), I(e.Xe, "texts"), I(e.Ye, "btns"), w(e.he, "role", "dialog"), w(e.he, "aria-modal", "true"), w(e.he, q, "false"), w(e.he, "aria-describedby", "cm__desc"), m ? w(e.he, "aria-label", m) : l && w(e.he, "aria-labelledby", "cm__title");
|
|
290
|
-
const C = "box", j = o.i.guiOptions, k = j && j.consentModal, b = (k && k.layout || C).split(" ")[0] === C;
|
|
291
|
-
l && p && b && (e.Le || (e.Le = h($), e.Le.innerHTML = je(), I(e.Le, "btn"), I(e.Le, "btn--close"), x(e.Le, H, (() => {
|
|
292
|
-
v([]);
|
|
293
|
-
})), y(e.We, e.Le)), w(e.Le, "aria-label", p)), y(e.We, e.Xe), (i || d || f) && y(e.We, e.Ye), e.be = h("div"), w(e.be, "tabIndex", -1), y(e.he, e.be), y(e.he, e.We), y(e.Qe, e.he);
|
|
294
|
-
}
|
|
295
|
-
l && (e.Ze || (e.Ze = h("h2"), e.Ze.className = e.Ze.id = "cm__title", y(e.Xe, e.Ze)), e.Ze.innerHTML = l);
|
|
296
|
-
let z = s.description;
|
|
297
|
-
if (z && (o.V && (z = z.replace("{{revisionMessage}}", o.I ? "" : s.revisionMessage || "")), e.et || (e.et = h("p"), e.et.className = e.et.id = "cm__desc", y(e.Xe, e.et)), e.et.innerHTML = z), i && (e.tt || (e.tt = h($), y(e.tt, Ge()), I(e.tt, "btn"), w(e.tt, he, "all"), x(e.tt, H, (() => {
|
|
298
|
-
v("all");
|
|
299
|
-
}))), e.tt.firstElementChild.innerHTML = i), d && (e.Ie || (e.Ie = h($), y(e.Ie, Ge()), I(e.Ie, "btn"), w(e.Ie, he, "necessary"), x(e.Ie, H, (() => {
|
|
300
|
-
v([]);
|
|
301
|
-
}))), e.Ie.firstElementChild.innerHTML = d), f && (e.ot || (e.ot = h($), y(e.ot, Ge()), I(e.ot, "btn"), I(e.ot, "btn--secondary"), w(e.ot, he, "show"), x(e.ot, "mouseenter", (() => {
|
|
302
|
-
o.N || ke(t, n);
|
|
303
|
-
})), x(e.ot, H, c)), e.ot.firstElementChild.innerHTML = f), e.nt || (e.nt = h("div"), I(e.nt, Se), i && y(e.nt, e.tt), d && y(e.nt, e.Ie), (i || d) && y(e.We, e.nt), y(e.Ye, e.nt)), e.ot && !e.st && (e.st = h("div"), e.Ie && e.tt ? (I(e.st, Se), y(e.st, e.ot), y(e.Ye, e.st)) : (y(e.nt, e.ot), I(e.nt, Se + "--uneven"))), g) {
|
|
304
|
-
if (!e.ct) {
|
|
305
|
-
let C = h("div"), j = h("div");
|
|
306
|
-
e.ct = h("div"), I(C, "footer"), I(j, "links"), I(e.ct, "link-group"), y(j, e.ct), y(C, j), y(e.he, C);
|
|
307
|
-
}
|
|
308
|
-
e.ct.innerHTML = g;
|
|
309
|
-
}
|
|
310
|
-
Ut(0), o.T || (o.T = !0, K(a.re.ue, tt, e.he), n(t), y(e.Ce, e.Qe), It(e.he), setTimeout((() => T(e.Qe, "cc--anim")), 100)), Nt(1), Dt(e.We, t, ke, n);
|
|
311
|
-
}, rt = (t) => {
|
|
312
|
-
if (!te(t)) return null;
|
|
313
|
-
if (t in a.o._) return t;
|
|
314
|
-
let n = t.slice(0, 2);
|
|
315
|
-
return n in a.o._ ? n : null;
|
|
316
|
-
}, ct = () => a.o.l || a.o.i.language.default, lt = (t) => {
|
|
317
|
-
t && (a.o.l = t);
|
|
318
|
-
}, Zt = async (t) => {
|
|
319
|
-
const n = a.o;
|
|
320
|
-
let o = rt(t) ? t : ct(), e = n._[o];
|
|
321
|
-
if (te(e) ? e = await (async (r) => {
|
|
322
|
-
try {
|
|
323
|
-
return await (await fetch(r)).json();
|
|
324
|
-
} catch (c) {
|
|
325
|
-
return console.error(c), !1;
|
|
326
|
-
}
|
|
327
|
-
})(e) : J(e) && (e = await e()), !e) throw `Could not load translation for the '${o}' language`;
|
|
328
|
-
return n.u = e, lt(o), !0;
|
|
329
|
-
}, Ft = () => {
|
|
330
|
-
let t = a.o.i.language.rtl, n = a.ne.Ce;
|
|
331
|
-
t && n && (be(t) || (t = [t]), _(t, a.o.l) ? T(n, "cc--rtl") : re(n, "cc--rtl"));
|
|
332
|
-
}, de = () => {
|
|
333
|
-
const t = a.ne;
|
|
334
|
-
if (t.Ce) return;
|
|
335
|
-
t.Ce = h("div"), t.Ce.id = "cc-main", t.Ce.setAttribute("data-nosnippet", ""), Ft();
|
|
336
|
-
let n = a.o.i.root;
|
|
337
|
-
n && te(n) && (n = document.querySelector(n)), (n || t.Ue.body).appendChild(t.Ce);
|
|
338
|
-
}, Yt = (t) => _e((() => localStorage.removeItem(t))), St = (t, n) => {
|
|
339
|
-
if (n instanceof RegExp) return t.filter(((o) => n.test(o)));
|
|
340
|
-
{
|
|
341
|
-
const o = At(t, n);
|
|
342
|
-
return o > -1 ? [t[o]] : [];
|
|
343
|
-
}
|
|
344
|
-
}, Xt = (t) => {
|
|
345
|
-
const { hostname: n, protocol: o } = location, { name: e, path: r, domain: c, sameSite: u, useLocalStorage: s, secure: i } = a.t.cookie, d = t ? (() => {
|
|
346
|
-
const m = a.o.S, l = m ? /* @__PURE__ */ new Date() - m : 0;
|
|
347
|
-
return 864e5 * wt() - l;
|
|
348
|
-
})() : 864e5 * wt(), f = /* @__PURE__ */ new Date();
|
|
349
|
-
f.setTime(f.getTime() + d), a.o.p.expirationTime = f.getTime();
|
|
350
|
-
const p = JSON.stringify(a.o.p);
|
|
351
|
-
let g = e + "=" + encodeURIComponent(p) + (d !== 0 ? "; expires=" + f.toUTCString() : "") + "; Path=" + r + "; SameSite=" + u;
|
|
352
|
-
_(n, ".") && (g += "; Domain=" + c), i && o === "https:" && (g += "; Secure"), s ? ((m, l) => {
|
|
353
|
-
_e((() => localStorage.setItem(m, l)));
|
|
354
|
-
})(e, p) : document.cookie = g, a.o.p;
|
|
355
|
-
}, Ye = (t, n, o) => {
|
|
356
|
-
if (t.length === 0) return;
|
|
357
|
-
const e = o || a.t.cookie.domain, r = n || a.t.cookie.path, c = e.slice(0, 4) === "www.", u = c && e.substring(4), s = (i, d) => {
|
|
358
|
-
d && d.slice(0, 1) !== "." && (d = "." + d), document.cookie = i + "=; path=" + r + (d ? "; domain=" + d : "") + "; expires=Thu, 01 Jan 1970 00:00:01 GMT;";
|
|
359
|
-
};
|
|
360
|
-
for (const i of t) s(i, o), o || s(i, e), c && s(i, u);
|
|
361
|
-
}, $t = (t) => {
|
|
362
|
-
const n = t || a.t.cookie.name, o = a.t.cookie.useLocalStorage;
|
|
363
|
-
return ((r, c) => {
|
|
364
|
-
let u;
|
|
365
|
-
return u = _e((() => JSON.parse(c ? r : decodeURIComponent(r))), !0) || {}, u;
|
|
366
|
-
})(o ? (e = n, _e((() => localStorage.getItem(e))) || "") : ut(n, !0), o);
|
|
367
|
-
var e;
|
|
368
|
-
}, ut = (t, n) => {
|
|
369
|
-
const o = document.cookie.match("(^|;)\\s*" + t + "\\s*=\\s*([^;]+)");
|
|
370
|
-
return o ? n ? o.pop() : t : "";
|
|
371
|
-
}, qt = (t) => {
|
|
372
|
-
const n = document.cookie.split(/;\s*/), o = [];
|
|
373
|
-
for (const e of n) {
|
|
374
|
-
let r = e.split("=")[0];
|
|
375
|
-
t ? _e((() => {
|
|
376
|
-
t.test(r) && o.push(r);
|
|
377
|
-
})) : o.push(r);
|
|
378
|
-
}
|
|
379
|
-
return o;
|
|
380
|
-
}, dt = (t, n = []) => {
|
|
381
|
-
((o, e) => {
|
|
382
|
-
const { O: r, R: c, B: u, N: s, Z: i, $: d, X: f } = a.o;
|
|
383
|
-
let p = [];
|
|
384
|
-
if (o) {
|
|
385
|
-
be(o) ? p.push(...o) : te(o) && (p = o === "all" ? r : [o]);
|
|
386
|
-
for (const g of r) i[g] = _(p, g) ? W(f[g]) : [];
|
|
387
|
-
} else p = [...c, ...d], s && (p = (() => {
|
|
388
|
-
const g = a.ne.ae;
|
|
389
|
-
if (!g) return [];
|
|
390
|
-
let m = [];
|
|
391
|
-
for (let l in g) g[l].checked && m.push(l);
|
|
392
|
-
return m;
|
|
393
|
-
})());
|
|
394
|
-
p = p.filter(((g) => !_(r, g) || !_(e, g))), p.push(...u), Pt(p);
|
|
395
|
-
})(t, n), (() => {
|
|
396
|
-
const o = a.o, { Z: e, B: r, Y: c, X: u, O: s } = o, i = s;
|
|
397
|
-
o.te = ee(c);
|
|
398
|
-
for (const d of i) {
|
|
399
|
-
const f = u[d], p = W(f), g = e[d] && e[d].length > 0, m = _(r, d);
|
|
400
|
-
if (p.length !== 0) {
|
|
401
|
-
if (c[d] = [], m) c[d].push(...p);
|
|
402
|
-
else if (g) {
|
|
403
|
-
const l = e[d];
|
|
404
|
-
c[d].push(...l);
|
|
405
|
-
} else c[d] = o.Z[d];
|
|
406
|
-
c[d] = nt(c[d]);
|
|
407
|
-
}
|
|
408
|
-
}
|
|
409
|
-
})(), (() => {
|
|
410
|
-
const o = a.o;
|
|
411
|
-
o.L = a.t.mode === Ce && o.D ? Oe(o.$, o.R) : Oe(o.R, o.p.categories);
|
|
412
|
-
let e = o.L.length > 0, r = !1;
|
|
413
|
-
for (const i of o.O) o.ee[i] = Oe(o.Y[i], o.te[i]), o.ee[i].length > 0 && (r = !0);
|
|
414
|
-
const c = a.ne.ae;
|
|
415
|
-
for (const i in c) c[i].checked = _(o.R, i);
|
|
416
|
-
for (const i of o.O) {
|
|
417
|
-
const d = a.ne.se[i], f = o.Y[i];
|
|
418
|
-
for (const p in d) d[p].checked = _(f, p);
|
|
419
|
-
}
|
|
420
|
-
o.C || (o.C = /* @__PURE__ */ new Date()), o.M || (o.M = ("10000000-1000-4000-8000" + -1e11).replace(/[018]/g, ((i) => (i ^ crypto.getRandomValues(new Uint8Array(1))[0] & 15 >> i / 4).toString(16)))), o.p = { categories: ee(o.R), revision: a.t.revision, data: o.h, consentTimestamp: o.C.toISOString(), consentId: o.M, services: ee(o.Y), languageCode: a.o.l }, o.S && (o.p.lastConsentTimestamp = o.S.toISOString());
|
|
421
|
-
let u = !1;
|
|
422
|
-
const s = e || r;
|
|
423
|
-
(o.D || s) && (o.D && (o.D = !1, u = !0), o.S = o.S ? /* @__PURE__ */ new Date() : o.C, o.p.lastConsentTimestamp = o.S.toISOString(), Xt(), a.t.autoClearCookies && (u || s) && ((i) => {
|
|
424
|
-
const d = a.o, f = qt(), p = ((g) => {
|
|
425
|
-
const m = a.o;
|
|
426
|
-
return (g ? m.O : m.L).filter(((l) => {
|
|
427
|
-
const v = m.P[l];
|
|
428
|
-
return !!v && !v.readOnly && !!v.autoClear;
|
|
429
|
-
}));
|
|
430
|
-
})(i);
|
|
431
|
-
for (const g in d.ee) for (const m of d.ee[g]) {
|
|
432
|
-
const l = d.X[g][m].cookies;
|
|
433
|
-
if (!_(d.Y[g], m) && l) for (const v of l) {
|
|
434
|
-
const z = St(f, v.name);
|
|
435
|
-
Ye(z, v.path, v.domain);
|
|
436
|
-
}
|
|
437
|
-
}
|
|
438
|
-
for (const g of p) {
|
|
439
|
-
const m = d.P[g].autoClear, l = m && m.cookies || [], v = _(d.L, g), z = !_(d.R, g), C = v && z;
|
|
440
|
-
if (i ? z : C) {
|
|
441
|
-
m.reloadPage && C && (d.j = !0);
|
|
442
|
-
for (const j of l) {
|
|
443
|
-
const k = St(f, j.name);
|
|
444
|
-
Ye(k, j.path, j.domain);
|
|
445
|
-
}
|
|
446
|
-
}
|
|
447
|
-
}
|
|
448
|
-
})(u), Ze()), u && (K(a.re.ie), K(a.re.le), a.t.mode === xt) || (s && K(a.re.de), o.j && (o.j = !1, location.reload()));
|
|
449
|
-
})();
|
|
450
|
-
}, Jt = (t) => {
|
|
451
|
-
const n = a.o.D ? [] : a.o.R;
|
|
452
|
-
return _(n, t);
|
|
453
|
-
}, lo = (t, n) => {
|
|
454
|
-
const { O: o, X: e } = a.o;
|
|
455
|
-
if (!(t && n && te(n) && _(o, n) && W(e[n]).length !== 0)) return !1;
|
|
456
|
-
((r, c) => {
|
|
457
|
-
const u = a.o, { X: s, Z: i, N: d } = u, f = a.ne.se[c] || {}, p = a.ne.ae[c] || {}, g = W(s[c]);
|
|
458
|
-
if (i[c] = [], te(r)) {
|
|
459
|
-
if (r === "all") {
|
|
460
|
-
if (i[c].push(...g), d) for (let l in f) f[l].checked = !0, Me(f[l]);
|
|
461
|
-
} else if (_(g, r) && i[c].push(r), d) for (let l in f) f[l].checked = r === l, Me(f[l]);
|
|
462
|
-
} else if (be(r)) for (let l of g) {
|
|
463
|
-
const v = _(r, l);
|
|
464
|
-
v && i[c].push(l), d && (f[l].checked = v, Me(f[l]));
|
|
465
|
-
}
|
|
466
|
-
const m = i[c].length === 0;
|
|
467
|
-
u.R = m ? u.R.filter(((l) => l !== c)) : nt([...u.R, c]), d && (p.checked = !m, Me(p));
|
|
468
|
-
})(t, n), dt();
|
|
469
|
-
}, pt = (t, n) => {
|
|
470
|
-
const o = a.o.D ? [] : a.o.Y[n] || [];
|
|
471
|
-
return _(o, t);
|
|
472
|
-
}, uo = (t) => ut(t, !0) !== "", Wt = (t, n, o) => {
|
|
473
|
-
let e = [];
|
|
474
|
-
const r = (c) => {
|
|
475
|
-
if (te(c)) {
|
|
476
|
-
let u = ut(c);
|
|
477
|
-
u !== "" && e.push(u);
|
|
478
|
-
} else e.push(...qt(c));
|
|
479
|
-
};
|
|
480
|
-
if (be(t)) for (let c of t) r(c);
|
|
481
|
-
else r(t);
|
|
482
|
-
Ye(e, n, o);
|
|
483
|
-
}, ft = (t) => {
|
|
484
|
-
const { ne: n, o } = a;
|
|
485
|
-
if (!o.k) {
|
|
486
|
-
if (!o.T) {
|
|
487
|
-
if (!t) return;
|
|
488
|
-
it(Te, de);
|
|
489
|
-
}
|
|
490
|
-
o.k = !0, o.J = Be(), o.v && Ht(!0), Bt(n.he, 1), T(n.ye, Qe), w(n.he, q, "false"), setTimeout((() => {
|
|
491
|
-
V(a.ne.be);
|
|
492
|
-
}), 100), K(a.re.fe, tt);
|
|
493
|
-
}
|
|
494
|
-
}, Vt = () => {
|
|
495
|
-
const { ne: t, o: n, re: o } = a;
|
|
496
|
-
n.k && (n.k = !1, n.v && Ht(), V(t.Ke, !0), re(t.ye, Qe), w(t.he, q, "true"), V(n.J), n.J = null, K(o._e, tt));
|
|
497
|
-
}, Kt = () => {
|
|
498
|
-
const t = a.o;
|
|
499
|
-
t.A || (t.N || ke(Te, de), t.A = !0, t.k ? t.U = Be() : t.J = Be(), Bt(a.ne.we, 2), T(a.ne.ye, et), w(a.ne.we, q, "false"), setTimeout((() => {
|
|
500
|
-
V(a.ne.ve);
|
|
501
|
-
}), 100), K(a.re.fe, ot));
|
|
502
|
-
}, Qt = () => {
|
|
503
|
-
const t = a.o;
|
|
504
|
-
t.A && (t.A = !1, (() => {
|
|
505
|
-
const n = gt(), o = a.o.P, e = a.ne.ae, r = a.ne.se, c = (u) => _(a.o.$, u);
|
|
506
|
-
for (const u in e) {
|
|
507
|
-
const s = !!o[u].readOnly;
|
|
508
|
-
e[u].checked = s || (n ? Jt(u) : c(u));
|
|
509
|
-
for (const i in r[u]) r[u][i].checked = s || (n ? pt(i, u) : c(u));
|
|
510
|
-
}
|
|
511
|
-
})(), V(a.ne.$e, !0), re(a.ne.ye, et), w(a.ne.we, q, "true"), t.k ? (V(t.U), t.U = null) : (V(t.J), t.J = null), K(a.re._e, ot));
|
|
512
|
-
};
|
|
513
|
-
var Te = { show: ft, hide: Vt, showPreferences: Kt, hidePreferences: Qt, acceptCategory: dt };
|
|
514
|
-
const po = async (t, n) => {
|
|
515
|
-
if (!rt(t)) return !1;
|
|
516
|
-
const o = a.o;
|
|
517
|
-
return !(t === ct() && n !== !0 || !await Zt(t) || (lt(t), o.T && it(Te, de), o.N && ke(Te, de), Ft(), 0));
|
|
518
|
-
}, fo = () => {
|
|
519
|
-
const { F: t, Y: n } = a.o, { accepted: o, rejected: e } = (() => {
|
|
520
|
-
const { D: r, R: c, O: u } = a.o;
|
|
521
|
-
return { accepted: c, rejected: r ? [] : u.filter(((s) => !_(c, s))) };
|
|
522
|
-
})();
|
|
523
|
-
return ee({ acceptType: t, acceptedCategories: o, rejectedCategories: e, acceptedServices: n, rejectedServices: ao() });
|
|
524
|
-
}, go = (t, n) => {
|
|
525
|
-
let o = document.querySelector('script[src="' + t + '"]');
|
|
526
|
-
return new Promise(((e) => {
|
|
527
|
-
if (o) return e(!0);
|
|
528
|
-
if (o = h("script"), De(n)) for (const r in n) w(o, r, n[r]);
|
|
529
|
-
o.onload = () => e(!0), o.onerror = () => {
|
|
530
|
-
o.remove(), e(!1);
|
|
531
|
-
}, o.src = t, y(document.head, o);
|
|
532
|
-
}));
|
|
533
|
-
}, yo = (t) => {
|
|
534
|
-
let n, o = t.value, e = t.mode, r = !1;
|
|
535
|
-
const c = a.o;
|
|
536
|
-
if (e === "update") {
|
|
537
|
-
c.h = n = eo("data");
|
|
538
|
-
const u = typeof n == typeof o;
|
|
539
|
-
if (u && typeof n == "object") {
|
|
540
|
-
!n && (n = {});
|
|
541
|
-
for (let s in o) n[s] !== o[s] && (n[s] = o[s], r = !0);
|
|
542
|
-
} else !u && n || n === o || (n = o, r = !0);
|
|
543
|
-
} else n = o, r = !0;
|
|
544
|
-
return r && (c.h = n, c.p.data = n, Xt(!0)), r;
|
|
545
|
-
}, eo = (t, n) => {
|
|
546
|
-
const o = $t(n);
|
|
547
|
-
return t ? o[t] : o;
|
|
548
|
-
}, ho = (t) => {
|
|
549
|
-
const n = a.t, o = a.o.i;
|
|
550
|
-
return t ? n[t] || o[t] : { ...n, ...o, cookie: { ...n.cookie } };
|
|
551
|
-
}, gt = () => !a.o.D, mo = async (t) => {
|
|
552
|
-
const { o: n, t: o, re: e } = a, r = window;
|
|
553
|
-
if (!r._ccRun) {
|
|
554
|
-
if (r._ccRun = !0, ((s) => {
|
|
555
|
-
const { ne: i, t: d, o: f } = a, p = d, g = f, { cookie: m } = p, l = a.ce, v = s.cookie, z = s.categories, C = W(z) || [], j = navigator, k = document;
|
|
556
|
-
i.Ue = k, i.ye = k.documentElement, m.domain = location.hostname, g.i = s, g.P = z, g.O = C, g._ = s.language.translations, g.v = !!s.disablePageInteraction, l.ie = s.onFirstConsent, l.le = s.onConsent, l.de = s.onChange, l._e = s.onModalHide, l.fe = s.onModalShow, l.ue = s.onModalReady;
|
|
557
|
-
const { mode: b, autoShow: M, lazyHtmlGeneration: A, autoClearCookies: L, revision: N, manageScriptTags: pe, hideFromBots: ce } = s;
|
|
558
|
-
b === Ce && (p.mode = b), typeof L == "boolean" && (p.autoClearCookies = L), typeof pe == "boolean" && (p.manageScriptTags = pe), typeof N == "number" && N >= 0 && (p.revision = N, g.V = !0), typeof M == "boolean" && (p.autoShow = M), typeof A == "boolean" && (p.lazyHtmlGeneration = A), ce === !1 && (p.hideFromBots = !1), p.hideFromBots === !0 && j && (g.G = j.userAgent && /bot|crawl|spider|slurp|teoma/i.test(j.userAgent) || j.webdriver), De(v) && (p.cookie = { ...m, ...v }), p.autoClearCookies, g.V, p.manageScriptTags, ((Z) => {
|
|
559
|
-
const { P: oe, X: F, Y: D, Z: R, B: ne } = a.o;
|
|
560
|
-
for (let P of Z) {
|
|
561
|
-
const X = oe[P], Y = X.services || {}, ae = De(Y) && W(Y) || [];
|
|
562
|
-
F[P] = {}, D[P] = [], R[P] = [], X.readOnly && (ne.push(P), D[P] = ae), a.ne.se[P] = {};
|
|
563
|
-
for (let se of ae) {
|
|
564
|
-
const G = Y[se];
|
|
565
|
-
G.Se = !1, F[P][se] = G;
|
|
566
|
-
}
|
|
567
|
-
}
|
|
568
|
-
})(C), (() => {
|
|
569
|
-
if (!a.t.manageScriptTags) return;
|
|
570
|
-
const Z = a.o, oe = at(document, "script[" + Pe + "]");
|
|
571
|
-
for (const F of oe) {
|
|
572
|
-
let D = xe(F, Pe), R = F.dataset.service || "", ne = !1;
|
|
573
|
-
if (D && D.charAt(0) === "!" && (D = D.slice(1), ne = !0), R.charAt(0) === "!" && (R = R.slice(1), ne = !0), _(Z.O, D) && (Z.oe.push({ Me: F, xe: !1, ke: ne, De: D, Te: R }), R)) {
|
|
574
|
-
const P = Z.X[D];
|
|
575
|
-
P[R] || (P[R] = { Se: !1 });
|
|
576
|
-
}
|
|
577
|
-
}
|
|
578
|
-
})(), lt((() => {
|
|
579
|
-
const Z = a.o.i.language.autoDetect;
|
|
580
|
-
if (Z) {
|
|
581
|
-
const oe = { browser: navigator.language, document: document.documentElement.lang }, F = rt(oe[Z]);
|
|
582
|
-
if (F) return F;
|
|
583
|
-
}
|
|
584
|
-
return ct();
|
|
585
|
-
})());
|
|
586
|
-
})(t), n.G) return;
|
|
587
|
-
(() => {
|
|
588
|
-
const s = a.o, i = a.t, d = $t(), { categories: f, services: p, consentId: g, consentTimestamp: m, lastConsentTimestamp: l, data: v, revision: z } = d, C = be(f);
|
|
589
|
-
s.p = d, s.M = g;
|
|
590
|
-
const j = !!g && te(g);
|
|
591
|
-
s.C = m, s.C && (s.C = new Date(m)), s.S = l, s.S && (s.S = new Date(l)), s.h = v !== void 0 ? v : null, s.V && j && z !== i.revision && (s.I = !1), s.D = !(j && s.I && s.C && s.S && C), i.cookie.useLocalStorage && !s.D && (s.D = (/* @__PURE__ */ new Date()).getTime() > (d.expirationTime || 0), s.D && Yt(i.cookie.name)), s.D, (() => {
|
|
592
|
-
const k = a.o;
|
|
593
|
-
for (const b of k.O) {
|
|
594
|
-
const M = k.P[b];
|
|
595
|
-
if (M.readOnly || M.enabled) {
|
|
596
|
-
k.$.push(b);
|
|
597
|
-
const A = k.X[b] || {};
|
|
598
|
-
for (let L in A) k.Z[b].push(L), k.i.mode === Ce && k.Y[b].push(L);
|
|
599
|
-
}
|
|
600
|
-
}
|
|
601
|
-
})(), s.D ? i.mode === Ce && (s.R = [...s.$]) : (s.Y = { ...s.Y, ...p }, s.Z = { ...s.Y }, Pt([...s.B, ...f]));
|
|
602
|
-
})();
|
|
603
|
-
const u = gt();
|
|
604
|
-
if (!await Zt()) return !1;
|
|
605
|
-
if (Dt(null, c = Te, ke, de), a.o.D && it(c, de), a.t.lazyHtmlGeneration || ke(c, de), o.autoShow && !u && ft(!0), u) return Ze(), K(e.le);
|
|
606
|
-
o.mode === Ce && Ze(n.$);
|
|
607
|
-
}
|
|
608
|
-
var c;
|
|
609
|
-
}, ko = (t) => {
|
|
610
|
-
const { Ce: n, ye: o } = a.ne, { name: e, path: r, domain: c, useLocalStorage: u } = a.t.cookie;
|
|
611
|
-
t && (u ? Yt(e) : Wt(e, r, c));
|
|
612
|
-
for (const { pe: i, ge: d, me: f } of a.o.m) i.removeEventListener(d, f);
|
|
613
|
-
n && n.remove(), o && o.classList.remove(Ue, et, Qe);
|
|
614
|
-
const s = new Ot();
|
|
615
|
-
for (const i in a) a[i] = s[i];
|
|
616
|
-
window._ccRun = !1;
|
|
617
|
-
}, wo = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
618
|
-
__proto__: null,
|
|
619
|
-
acceptCategory: dt,
|
|
620
|
-
acceptService: lo,
|
|
621
|
-
acceptedCategory: Jt,
|
|
622
|
-
acceptedService: pt,
|
|
623
|
-
eraseCookies: Wt,
|
|
624
|
-
getConfig: ho,
|
|
625
|
-
getCookie: eo,
|
|
626
|
-
getUserPreferences: fo,
|
|
627
|
-
hide: Vt,
|
|
628
|
-
hidePreferences: Qt,
|
|
629
|
-
loadScript: go,
|
|
630
|
-
reset: ko,
|
|
631
|
-
run: mo,
|
|
632
|
-
setCookieData: yo,
|
|
633
|
-
setLanguage: po,
|
|
634
|
-
show: ft,
|
|
635
|
-
showPreferences: Kt,
|
|
636
|
-
validConsent: gt,
|
|
637
|
-
validCookie: uo
|
|
638
|
-
}, Symbol.toStringTag, { value: "Module" }));
|
|
639
|
-
function bo() {
|
|
640
|
-
return (t) => {
|
|
641
|
-
globalThis.dataLayer?.push(t);
|
|
642
|
-
};
|
|
643
|
-
}
|
|
644
|
-
const jt = "necessary", we = "analytics", me = "advertisement", Le = "functionality", He = "security", Xe = "ad_storage", $e = "ad_user_data", qe = "ad_personalization", Je = "analytics_storage", We = "functionality_storage", Ve = "personalization_storage", Ke = "security_storage", vo = {
|
|
645
|
-
[Xe]: me,
|
|
646
|
-
[Je]: we,
|
|
647
|
-
[We]: Le,
|
|
648
|
-
[Ve]: Le,
|
|
649
|
-
[Ke]: He,
|
|
650
|
-
[$e]: me,
|
|
651
|
-
[qe]: me
|
|
1
|
+
import * as O from "vanilla-cookieconsent";
|
|
2
|
+
import { mkgtag as M } from "@leancodepl/gtag";
|
|
3
|
+
const v = "necessary", l = "analytics", c = "advertisement", u = "functionality", p = "security", w = "ad_storage", f = "ad_user_data", z = "ad_personalization", m = "analytics_storage", h = "functionality_storage", b = "personalization_storage", j = "security_storage", T = {
|
|
4
|
+
[w]: c,
|
|
5
|
+
[m]: l,
|
|
6
|
+
[h]: u,
|
|
7
|
+
[b]: u,
|
|
8
|
+
[j]: p,
|
|
9
|
+
[f]: c,
|
|
10
|
+
[z]: c
|
|
652
11
|
};
|
|
653
|
-
function
|
|
654
|
-
const
|
|
655
|
-
function
|
|
656
|
-
|
|
12
|
+
function B() {
|
|
13
|
+
const e = M();
|
|
14
|
+
function a(o) {
|
|
15
|
+
e({
|
|
657
16
|
event: "default_cookie_consent",
|
|
658
|
-
settings: Object.fromEntries(
|
|
17
|
+
settings: Object.fromEntries(o.map((i) => [i, "denied"]))
|
|
659
18
|
});
|
|
660
19
|
}
|
|
661
|
-
function o
|
|
662
|
-
|
|
20
|
+
function n(o) {
|
|
21
|
+
e({
|
|
663
22
|
event: "cookie_consent_update",
|
|
664
23
|
settings: Object.fromEntries(
|
|
665
|
-
|
|
24
|
+
o.map((i) => [i, G(i, T[i])])
|
|
666
25
|
)
|
|
667
26
|
});
|
|
668
27
|
}
|
|
669
|
-
return { setDefaultConsent:
|
|
28
|
+
return { setDefaultConsent: a, updateConsent: n };
|
|
670
29
|
}
|
|
671
|
-
function
|
|
672
|
-
return
|
|
30
|
+
function G(e, a) {
|
|
31
|
+
return O.acceptedService(e, a) ? "granted" : "denied";
|
|
673
32
|
}
|
|
674
|
-
function
|
|
675
|
-
const { categories:
|
|
676
|
-
(
|
|
677
|
-
), { setDefaultConsent:
|
|
678
|
-
return s
|
|
679
|
-
onFirstConsent: (
|
|
680
|
-
|
|
33
|
+
function x(e) {
|
|
34
|
+
const { categories: a, onFirstConsent: n, onChange: o, onConsent: i, ...d } = e, s = Object.values(a).flatMap(
|
|
35
|
+
(t) => Object.keys(t.services ?? {})
|
|
36
|
+
), { setDefaultConsent: g, updateConsent: r } = B();
|
|
37
|
+
return g(s), {
|
|
38
|
+
onFirstConsent: (t) => {
|
|
39
|
+
r(s), n?.(t);
|
|
681
40
|
},
|
|
682
|
-
onConsent: (
|
|
683
|
-
|
|
41
|
+
onConsent: (t) => {
|
|
42
|
+
r(s), i?.(t);
|
|
684
43
|
},
|
|
685
|
-
onChange: (
|
|
686
|
-
|
|
44
|
+
onChange: (t) => {
|
|
45
|
+
r(s), o?.(t);
|
|
687
46
|
},
|
|
688
47
|
categories: {
|
|
689
|
-
[
|
|
48
|
+
[v]: {
|
|
690
49
|
enabled: !0,
|
|
691
50
|
readOnly: !0,
|
|
692
|
-
...
|
|
51
|
+
...a[v]
|
|
693
52
|
},
|
|
694
|
-
[
|
|
53
|
+
[l]: {
|
|
695
54
|
autoClear: {
|
|
696
55
|
cookies: [{ name: /^_ga/ }, { name: "_gid" }]
|
|
697
56
|
},
|
|
698
|
-
...
|
|
57
|
+
...a[l]
|
|
699
58
|
},
|
|
700
|
-
...
|
|
59
|
+
...a
|
|
701
60
|
},
|
|
702
|
-
...
|
|
61
|
+
...d
|
|
703
62
|
};
|
|
704
63
|
}
|
|
705
|
-
async function
|
|
706
|
-
const
|
|
707
|
-
return await
|
|
64
|
+
async function N(e) {
|
|
65
|
+
const a = O, n = x(e);
|
|
66
|
+
return await a.run(n), a;
|
|
708
67
|
}
|
|
709
|
-
const
|
|
68
|
+
const C = "_ga", A = "_gid", S = {
|
|
710
69
|
en: {
|
|
711
70
|
language: {
|
|
712
71
|
consentModal: {
|
|
@@ -739,13 +98,13 @@ const _t = "_ga", Tt = "_gid", Lt = {
|
|
|
739
98
|
headers: { name: "Name", domain: "Service", description: "Description", expiration: "Expiration" },
|
|
740
99
|
body: [
|
|
741
100
|
{
|
|
742
|
-
name:
|
|
101
|
+
name: C,
|
|
743
102
|
domain: "Google Analytics",
|
|
744
103
|
description: 'Cookie set by <a href="https://business.safety.google/adscookies/">Google Analytics</a>',
|
|
745
104
|
expiration: "Expires after 12 days"
|
|
746
105
|
},
|
|
747
106
|
{
|
|
748
|
-
name:
|
|
107
|
+
name: A,
|
|
749
108
|
domain: "Google Analytics",
|
|
750
109
|
description: 'Cookie set by <a href="https://business.safety.google/adscookies/">Google Analytics</a>',
|
|
751
110
|
expiration: "Session"
|
|
@@ -768,45 +127,45 @@ const _t = "_ga", Tt = "_gid", Lt = {
|
|
|
768
127
|
}
|
|
769
128
|
},
|
|
770
129
|
categories: {
|
|
771
|
-
[
|
|
130
|
+
[l]: {
|
|
772
131
|
services: {
|
|
773
|
-
[
|
|
132
|
+
[m]: {
|
|
774
133
|
label: "Enables storage (such as cookies) related to analytics e.g. visit duration."
|
|
775
134
|
}
|
|
776
135
|
}
|
|
777
136
|
},
|
|
778
|
-
[
|
|
137
|
+
[c]: {
|
|
779
138
|
enabled: !0,
|
|
780
139
|
readOnly: !1,
|
|
781
140
|
services: {
|
|
782
|
-
[
|
|
141
|
+
[w]: {
|
|
783
142
|
label: "Enables storage (such as cookies) related to advertising."
|
|
784
143
|
},
|
|
785
|
-
[
|
|
144
|
+
[f]: {
|
|
786
145
|
label: "Sets consent for sending user data related to advertising to Google."
|
|
787
146
|
},
|
|
788
|
-
[
|
|
147
|
+
[z]: {
|
|
789
148
|
label: "Sets consent for personalized advertising."
|
|
790
149
|
}
|
|
791
150
|
}
|
|
792
151
|
},
|
|
793
|
-
[
|
|
152
|
+
[u]: {
|
|
794
153
|
enabled: !0,
|
|
795
154
|
readOnly: !1,
|
|
796
155
|
services: {
|
|
797
|
-
[
|
|
156
|
+
[h]: {
|
|
798
157
|
label: "Enables storage that supports the functionality of the website or app e.g. language settings."
|
|
799
158
|
},
|
|
800
|
-
[
|
|
159
|
+
[b]: {
|
|
801
160
|
label: "Enables storage related to personalization e.g. video recommendations."
|
|
802
161
|
}
|
|
803
162
|
}
|
|
804
163
|
},
|
|
805
|
-
[
|
|
164
|
+
[p]: {
|
|
806
165
|
enabled: !0,
|
|
807
166
|
readOnly: !1,
|
|
808
167
|
services: {
|
|
809
|
-
[
|
|
168
|
+
[j]: {
|
|
810
169
|
label: "Enables storage related to security such as authentication functionality, fraud prevention, and other user protection."
|
|
811
170
|
}
|
|
812
171
|
}
|
|
@@ -845,13 +204,13 @@ const _t = "_ga", Tt = "_gid", Lt = {
|
|
|
845
204
|
headers: { name: "Nazwa", domain: "Usługa", description: "Opis", expiration: "Wygaśnięcie" },
|
|
846
205
|
body: [
|
|
847
206
|
{
|
|
848
|
-
name:
|
|
207
|
+
name: C,
|
|
849
208
|
domain: "Google Analytics",
|
|
850
209
|
description: 'Plik cookie ustawiony przez <a href="https://business.safety.google/adscookies/">Google Analytics</a>',
|
|
851
210
|
expiration: "Wygasa po 12 dniach"
|
|
852
211
|
},
|
|
853
212
|
{
|
|
854
|
-
name:
|
|
213
|
+
name: A,
|
|
855
214
|
domain: "Google Analytics",
|
|
856
215
|
description: 'Plik cookie ustawiony przez <a href="https://business.safety.google/adscookies/">Google Analytics</a>',
|
|
857
216
|
expiration: "Sesja"
|
|
@@ -874,98 +233,98 @@ const _t = "_ga", Tt = "_gid", Lt = {
|
|
|
874
233
|
}
|
|
875
234
|
},
|
|
876
235
|
categories: {
|
|
877
|
-
[
|
|
236
|
+
[l]: {
|
|
878
237
|
services: {
|
|
879
|
-
[
|
|
238
|
+
[m]: {
|
|
880
239
|
label: "Umożliwia przechowywanie (np. plików cookie) związane z analityką, np. czas trwania wizyty."
|
|
881
240
|
}
|
|
882
241
|
}
|
|
883
242
|
},
|
|
884
|
-
[
|
|
243
|
+
[c]: {
|
|
885
244
|
enabled: !0,
|
|
886
245
|
readOnly: !1,
|
|
887
246
|
services: {
|
|
888
|
-
[
|
|
247
|
+
[w]: {
|
|
889
248
|
label: "Umożliwia przechowywanie (np. plików cookie) związane z reklamą."
|
|
890
249
|
},
|
|
891
|
-
[
|
|
250
|
+
[f]: {
|
|
892
251
|
label: "Ustawia zgodę na wysyłanie danych użytkownika związanych z reklamą do Google."
|
|
893
252
|
},
|
|
894
|
-
[
|
|
253
|
+
[z]: {
|
|
895
254
|
label: "Ustawia zgodę na personalizację reklam."
|
|
896
255
|
}
|
|
897
256
|
}
|
|
898
257
|
},
|
|
899
|
-
[
|
|
258
|
+
[u]: {
|
|
900
259
|
enabled: !0,
|
|
901
260
|
readOnly: !1,
|
|
902
261
|
services: {
|
|
903
|
-
[
|
|
262
|
+
[h]: {
|
|
904
263
|
label: "Umożliwia przechowywanie, które wspiera funkcjonalność strony internetowej lub aplikacji, np. ustawienia języka."
|
|
905
264
|
},
|
|
906
|
-
[
|
|
265
|
+
[b]: {
|
|
907
266
|
label: "Umożliwia przechowywanie związane z personalizacją, np. rekomendacje wideo."
|
|
908
267
|
}
|
|
909
268
|
}
|
|
910
269
|
},
|
|
911
|
-
[
|
|
270
|
+
[p]: {
|
|
912
271
|
enabled: !0,
|
|
913
272
|
readOnly: !1,
|
|
914
273
|
services: {
|
|
915
|
-
[
|
|
274
|
+
[j]: {
|
|
916
275
|
label: "Umożliwia przechowywanie związane z bezpieczeństwem, takie jak funkcjonalność uwierzytelniania, zapobieganie oszustwom i inna ochrona użytkowników."
|
|
917
276
|
}
|
|
918
277
|
}
|
|
919
278
|
}
|
|
920
279
|
}
|
|
921
280
|
}
|
|
922
|
-
},
|
|
923
|
-
function
|
|
924
|
-
const
|
|
925
|
-
|
|
281
|
+
}, P = [l, c, u, p];
|
|
282
|
+
function U(e, a) {
|
|
283
|
+
const n = [
|
|
284
|
+
e.language.preferencesModal.baseSection,
|
|
926
285
|
{
|
|
927
|
-
...
|
|
286
|
+
...e.language.preferencesModal.necessarySection,
|
|
928
287
|
linkedCategory: "necessary"
|
|
929
288
|
}
|
|
930
289
|
];
|
|
931
|
-
for (const
|
|
932
|
-
|
|
933
|
-
...
|
|
934
|
-
linkedCategory:
|
|
290
|
+
for (const o of P)
|
|
291
|
+
a[o] && n.push({
|
|
292
|
+
...e.language.categoryPreferenceLabels[o],
|
|
293
|
+
linkedCategory: o
|
|
935
294
|
});
|
|
936
|
-
return
|
|
295
|
+
return n;
|
|
937
296
|
}
|
|
938
|
-
const
|
|
939
|
-
function
|
|
940
|
-
language:
|
|
941
|
-
advertisement:
|
|
942
|
-
analytics:
|
|
943
|
-
security:
|
|
944
|
-
functionality:
|
|
297
|
+
const _ = "en";
|
|
298
|
+
function L({
|
|
299
|
+
language: e = [_],
|
|
300
|
+
advertisement: a = !1,
|
|
301
|
+
analytics: n = !1,
|
|
302
|
+
security: o = !1,
|
|
303
|
+
functionality: i = !1
|
|
945
304
|
}) {
|
|
946
|
-
const
|
|
947
|
-
for (const
|
|
948
|
-
|
|
949
|
-
const
|
|
950
|
-
for (const
|
|
951
|
-
const
|
|
952
|
-
|
|
953
|
-
consentModal:
|
|
305
|
+
const d = { analytics: n, advertisement: a, functionality: i, security: o }, s = e.at(0) ?? _, g = S[s], r = {};
|
|
306
|
+
for (const t of P)
|
|
307
|
+
d[t] && (r[t] = g.categories[t]);
|
|
308
|
+
const y = {};
|
|
309
|
+
for (const t of e) {
|
|
310
|
+
const k = S[t];
|
|
311
|
+
y[t] = {
|
|
312
|
+
consentModal: k.language.consentModal,
|
|
954
313
|
preferencesModal: {
|
|
955
|
-
...
|
|
956
|
-
sections:
|
|
314
|
+
...k.language.preferencesModal,
|
|
315
|
+
sections: U(k, d)
|
|
957
316
|
}
|
|
958
317
|
};
|
|
959
318
|
}
|
|
960
319
|
return {
|
|
961
|
-
categories:
|
|
320
|
+
categories: r,
|
|
962
321
|
language: {
|
|
963
|
-
default:
|
|
964
|
-
translations:
|
|
322
|
+
default: s,
|
|
323
|
+
translations: y
|
|
965
324
|
}
|
|
966
325
|
};
|
|
967
326
|
}
|
|
968
327
|
export {
|
|
969
|
-
|
|
970
|
-
|
|
328
|
+
L as getDefaultConsentConfig,
|
|
329
|
+
N as runCookieConsent
|
|
971
330
|
};
|
package/dist/index.umd.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(ce,pe){typeof exports=="object"&&typeof module<"u"?pe(exports):typeof define=="function"&&define.amd?define(["exports"],pe):(ce=typeof globalThis<"u"?globalThis:ce||self,pe(ce["@leancodepl/cookie-consent"]={}))})(this,(function(ce){"use strict";const pe="opt-in",Ce="opt-out",Re="show--consent",Ee="show--preferences",Ge="disable--interaction",Oe="data-category",X="button",$="aria-hidden",Se="btn-group",D="click",ge="data-role",Ue="consentModal",Ze="preferencesModal";class mt{constructor(){this.t={mode:pe,revision:0,autoShow:!0,lazyHtmlGeneration:!0,autoClearCookies:!0,manageScriptTags:!0,hideFromBots:!0,cookie:{name:"cc_cookie",expiresAfterDays:182,domain:"",path:"/",secure:!0,sameSite:"Lax"}},this.o={i:{},l:"",_:{},u:{},p:{},m:[],v:!1,h:null,C:null,S:null,M:"",D:!0,T:!1,k:!1,A:!1,N:!1,H:[],V:!1,I:!0,L:[],j:!1,F:"",P:!1,O:[],R:[],B:[],$:[],G:!1,J:!1,U:!1,q:[],K:[],W:[],X:{},Y:{},Z:{},ee:{},te:{},oe:[]},this.ne={ae:{},se:{}},this.ce={},this.re={ie:"cc:onFirstConsent",le:"cc:onConsent",de:"cc:onChange",fe:"cc:onModalShow",_e:"cc:onModalHide",ue:"cc:onModalReady"}}}const a=new mt,kt=(t,n)=>t.indexOf(n),_=(t,n)=>kt(t,n)!==-1,ye=t=>Array.isArray(t),Q=t=>typeof t=="string",Ae=t=>!!t&&typeof t=="object"&&!ye(t),J=t=>typeof t=="function",W=t=>Object.keys(t),Fe=t=>Array.from(new Set(t)),Pe=()=>document.activeElement,he=t=>t.preventDefault(),Ye=(t,n)=>t.querySelectorAll(n),De=t=>t.dispatchEvent(new Event("change")),h=t=>{const n=document.createElement(t);return t===X&&(n.type=t),n},w=(t,n,o)=>t.setAttribute(n,o),Xe=(t,n,o)=>{t.removeAttribute(o?"data-"+n:n)},Be=(t,n,o)=>t.getAttribute(o?"data-"+n:n),y=(t,n)=>t.appendChild(n),T=(t,n)=>t.classList.add(n),I=(t,n)=>T(t,"cm__"+n),C=(t,n)=>T(t,"pm__"+n),oe=(t,n)=>t.classList.remove(n),ee=t=>{if(typeof t!="object")return t;if(t instanceof Date)return new Date(t.getTime());let n=Array.isArray(t)?[]:{};for(let o in t){let e=t[o];n[o]=ee(e)}return n},no=()=>{const t={},{O:n,X:o,Y:e}=a.o;for(const r of n)t[r]=He(e[r],W(o[r]));return t},wt=(t,n)=>dispatchEvent(new CustomEvent(t,{detail:n})),x=(t,n,o,e)=>{t.addEventListener(n,o),e&&a.o.m.push({pe:t,ge:n,me:o})},bt=()=>{const t=a.t.cookie.expiresAfterDays;return J(t)?t(a.o.F):t},He=(t,n)=>{const o=t||[],e=n||[];return o.filter((r=>!_(e,r))).concat(e.filter((r=>!_(o,r))))},vt=t=>{a.o.R=Fe(t),a.o.F=(()=>{let n="custom";const{R:o,O:e,B:r}=a.o,c=o.length;return c===e.length?n="all":c===r.length&&(n="necessary"),n})()},zt=(t,n,o,e)=>{const r="accept-",{show:c,showPreferences:u,hide:s,hidePreferences:i,acceptCategory:d}=n,p=t||document,f=k=>Ye(p,`[data-cc="${k}"]`),g=(k,b)=>{he(k),d(b),i(),s()},m=f("show-preferencesModal"),l=f("show-consentModal"),v=f(r+"all"),z=f(r+"necessary"),S=f(r+"custom"),j=a.t.lazyHtmlGeneration;for(const k of m)w(k,"aria-haspopup","dialog"),x(k,D,(b=>{he(b),u()})),j&&(x(k,"mouseenter",(b=>{he(b),a.o.N||o(n,e)}),!0),x(k,"focus",(()=>{a.o.N||o(n,e)})));for(let k of l)w(k,"aria-haspopup","dialog"),x(k,D,(b=>{he(b),c(!0)}),!0);for(let k of v)x(k,D,(b=>{g(b,"all")}),!0);for(let k of S)x(k,D,(b=>{g(b)}),!0);for(let k of z)x(k,D,(b=>{g(b,[])}),!0)},V=(t,n)=>{t&&(n&&(t.tabIndex=-1),t.focus(),n&&t.removeAttribute("tabindex"))},Ct=(t,n)=>{const o=e=>{e.target.removeEventListener("transitionend",o),e.propertyName==="opacity"&&getComputedStyle(t).opacity==="1"&&V((r=>r===1?a.ne.be:a.ne.ve)(n))};x(t,"transitionend",o)};let St;const jt=t=>{clearTimeout(St),t?T(a.ne.ye,Ge):St=setTimeout((()=>{oe(a.ne.ye,Ge)}),500)},ao=["M 19.5 4.5 L 4.5 19.5 M 4.5 4.501 L 19.5 19.5","M 3.572 13.406 L 8.281 18.115 L 20.428 5.885","M 21.999 6.94 L 11.639 17.18 L 2.001 6.82 "],je=(t=0,n=1.5)=>`<svg viewBox="0 0 24 24" stroke-width="${n}"><path d="${ao[t]}"/></svg>`,_t=t=>{const n=a.ne,o=a.o;(e=>{const r=e===n.he,c=o.i.disablePageInteraction?n.ye:r?n.Ce:n.ye;x(c,"keydown",(u=>{if(u.key!=="Tab"||!(r?o.k&&!o.A:o.A))return;const s=Pe(),i=r?o.q:o.K;i.length!==0&&(u.shiftKey?s!==i[0]&&e.contains(s)||(he(u),V(i[1])):s!==i[1]&&e.contains(s)||(he(u),V(i[0])))}),!0)})(t)},so=["[href]",X,"input","details","[tabindex]"].map((t=>t+':not([tabindex="-1"])')).join(","),Tt=t=>{const{o:n,ne:o}=a,e=(r,c)=>{const u=Ye(r,so);c[0]=u[0],c[1]=u[u.length-1]};t===1&&n.T&&e(o.he,n.q),t===2&&n.N&&e(o.we,n.K)},K=(t,n,o)=>{const{de:e,le:r,ie:c,_e:u,ue:s,fe:i}=a.ce,d=a.re;if(n){const f={modalName:n};return t===d.fe?J(i)&&i(f):t===d._e?J(u)&&u(f):(f.modal=o,J(s)&&s(f)),wt(t,f)}const p={cookie:a.o.p};t===d.ie?J(c)&&c(ee(p)):t===d.le?J(r)&&r(ee(p)):(p.changedCategories=a.o.L,p.changedServices=a.o.ee,J(e)&&e(ee(p))),wt(t,ee(p))},_e=(t,n)=>{try{return t()}catch(o){return!n&&console.warn("CookieConsent:",o),!1}},$e=t=>{const{Y:n,ee:o,O:e,X:r,oe:c,p:u,L:s}=a.o;for(const f of e){const g=o[f]||n[f]||[];for(const m of g){const l=r[f][m];if(!l)continue;const{onAccept:v,onReject:z}=l;!l.Se&&_(n[f],m)?(l.Se=!0,J(v)&&v()):l.Se&&!_(n[f],m)&&(l.Se=!1,J(z)&&z())}}if(!a.t.manageScriptTags)return;const i=c,d=t||u.categories||[],p=(f,g)=>{if(g>=f.length)return;const m=c[g];if(m.xe)return p(f,g+1);const l=m.Me,v=m.De,z=m.Te,S=_(d,v),j=!!z&&_(n[v],z);if(!z&&!m.ke&&S||!z&&m.ke&&!S&&_(s,v)||z&&!m.ke&&j||z&&m.ke&&!j&&_(o[v]||[],z)){m.xe=!0;const k=Be(l,"type",!0);Xe(l,"type",!!k),Xe(l,Oe);let b=Be(l,"src",!0);b&&Xe(l,"src",!0);const M=h("script");M.textContent=l.innerHTML;for(const{nodeName:L}of l.attributes)w(M,L,l[L]||Be(l,L));k&&(M.type=k),b?M.src=b:b=l.src;const A=!!b&&(!k||["text/javascript","module"].includes(k));if(A&&(M.onload=M.onerror=()=>{p(f,++g)}),l.replaceWith(M),A)return}p(f,++g)};p(i,0)},Ie="bottom",qe="left",Lt="center",Je="right",We="inline",Mt="wide",xt="pm--",Ve=["middle","top",Ie],Ot=[qe,Lt,Je],io={box:{Ee:[Mt,We],Ae:Ve,Ne:Ot,He:Ie,Ve:Je},cloud:{Ee:[We],Ae:Ve,Ne:Ot,He:Ie,Ve:Lt},bar:{Ee:[We],Ae:Ve.slice(1),Ne:[],He:Ie,Ve:""}},ro={box:{Ee:[],Ae:[],Ne:[],He:"",Ve:""},bar:{Ee:[Mt],Ae:[],Ne:[qe,Je],He:"",Ve:qe}},At=t=>{const n=a.o.i.guiOptions,o=n&&n.consentModal,e=n&&n.preferencesModal;t===0&&Pt(a.ne.he,io,o,"cm--","box","cm"),t===1&&Pt(a.ne.we,ro,e,xt,"box","pm")},Pt=(t,n,o,e,r,c)=>{t.className=c;const u=o&&o.layout,s=o&&o.position,i=o&&o.flipButtons,d=!o||o.equalWeightButtons!==!1,p=u&&u.split(" ")||[],f=p[0],g=p[1],m=f in n?f:r,l=n[m],v=_(l.Ee,g)&&g,z=s&&s.split(" ")||[],S=z[0],j=e===xt?z[0]:z[1],k=_(l.Ae,S)?S:l.He,b=_(l.Ne,j)?j:l.Ve,M=L=>{L&&T(t,e+L)};M(m),M(v),M(k),M(b),i&&M("flip");const A=c+"__btn--secondary";if(c==="cm"){const{Ie:L,Le:N}=a.ne;L&&(d?oe(L,A):T(L,A)),N&&(d?oe(N,A):T(N,A))}else{const{je:L}=a.ne;L&&(d?oe(L,A):T(L,A))}},me=(t,n)=>{const o=a.o,e=a.ne,{hide:r,hidePreferences:c,acceptCategory:u}=t,s=b=>{u(b),c(),r()},i=o.u&&o.u.preferencesModal;if(!i)return;const d=i.title,p=i.closeIconLabel,f=i.acceptAllBtn,g=i.acceptNecessaryBtn,m=i.savePreferencesBtn,l=i.sections||[],v=f||g||m;if(e.Fe)e.Pe=h("div"),C(e.Pe,"body");else{e.Fe=h("div"),T(e.Fe,"pm-wrapper");const b=h("div");T(b,"pm-overlay"),y(e.Fe,b),x(b,D,c),e.we=h("div"),T(e.we,"pm"),w(e.we,"role","dialog"),w(e.we,$,!0),w(e.we,"aria-modal",!0),w(e.we,"aria-labelledby","pm__title"),x(e.ye,"keydown",(M=>{M.keyCode===27&&c()}),!0),e.Oe=h("div"),C(e.Oe,"header"),e.Re=h("h2"),C(e.Re,"title"),e.Re.id="pm__title",e.Be=h(X),C(e.Be,"close-btn"),w(e.Be,"aria-label",i.closeIconLabel||""),x(e.Be,D,c),e.$e=h("span"),e.$e.innerHTML=je(),y(e.Be,e.$e),e.Ge=h("div"),C(e.Ge,"body"),e.Je=h("div"),C(e.Je,"footer");var z=h("div");T(z,"btns");var S=h("div"),j=h("div");C(S,Se),C(j,Se),y(e.Je,S),y(e.Je,j),y(e.Oe,e.Re),y(e.Oe,e.Be),e.ve=h("div"),w(e.ve,"tabIndex",-1),y(e.we,e.ve),y(e.we,e.Oe),y(e.we,e.Ge),v&&y(e.we,e.Je),y(e.Fe,e.we)}let k;d&&(e.Re.innerHTML=d,p&&w(e.Be,"aria-label",p)),l.forEach(((b,M)=>{const A=b.title,L=b.description,N=b.linkedCategory,be=N&&o.P[N],ue=b.cookieTable,Z=ue&&ue.body,ne=ue&&ue.caption,F=Z&&Z.length>0,B=!!be,R=B&&o.X[N],ae=Ae(R)&&W(R)||[],P=B&&(!!L||!!F||W(R).length>0);var q=h("div");if(C(q,"section"),P||L){var Y=h("div");C(Y,"section-desc-wrapper")}let se=ae.length;if(P&&se>0){const H=h("div");C(H,"section-services");for(const U of ae){const O=R[U],E=O&&O.label||U,de=h("div"),fe=h("div"),Me=h("div"),ve=h("div");C(de,"service"),C(ve,"service-title"),C(fe,"service-header"),C(Me,"service-icon");const te=Dt(E,U,be,!0,N);ve.innerHTML=E,y(fe,Me),y(fe,ve),y(de,fe),y(de,te),y(H,de)}y(Y,H)}if(A){var ie=h("div"),G=h(B?X:"div");if(C(ie,"section-title-wrapper"),C(G,"section-title"),G.innerHTML=A,y(ie,G),B){const H=h("span");H.innerHTML=je(2,3.5),C(H,"section-arrow"),y(ie,H),q.className+="--toggle";const U=Dt(A,N,be);let O=i.serviceCounterLabel;if(se>0&&Q(O)){let E=h("span");C(E,"badge"),C(E,"service-counter"),w(E,$,!0),w(E,"data-servicecounter",se),O&&(O=O.split("|"),O=O.length>1&&se>1?O[1]:O[0],w(E,"data-counterlabel",O)),E.innerHTML=se+(O?" "+O:""),y(G,E)}if(P){C(q,"section--expandable");var eo=N+"-desc";w(G,"aria-expanded",!1),w(G,"aria-controls",eo)}y(ie,U)}else w(G,"role","heading"),w(G,"aria-level","3");y(q,ie)}if(L){var ht=h("p");C(ht,"section-desc"),ht.innerHTML=L,y(Y,ht)}if(P&&(w(Y,$,"true"),Y.id=eo,((H,U,O)=>{x(G,D,(()=>{U.classList.contains("is-expanded")?(oe(U,"is-expanded"),w(O,"aria-expanded","false"),w(H,$,"true")):(T(U,"is-expanded"),w(O,"aria-expanded","true"),w(H,$,"false"))}))})(Y,q,G),F)){const H=h("table"),U=h("thead"),O=h("tbody");if(ne){const te=h("caption");C(te,"table-caption"),te.innerHTML=ne,H.appendChild(te)}C(H,"section-table"),C(U,"table-head"),C(O,"table-body");const E=ue.headers,de=W(E),fe=e.Ue.createDocumentFragment(),Me=h("tr");for(const te of de){const ze=E[te],re=h("th");re.id="cc__row-"+ze+M,w(re,"scope","col"),C(re,"table-th"),re.innerHTML=ze,y(fe,re)}y(Me,fe),y(U,Me);const ve=e.Ue.createDocumentFragment();for(const te of Z){const ze=h("tr");C(ze,"table-tr");for(const re of de){const to=E[re],_o=te[re],xe=h("td"),oo=h("div");C(xe,"table-td"),w(xe,"data-column",to),w(xe,"headers","cc__row-"+to+M),oo.insertAdjacentHTML("beforeend",_o),y(xe,oo),y(ze,xe)}y(ve,ze)}y(O,ve),y(H,U),y(H,O),y(Y,H)}(P||L)&&y(q,Y);const jo=e.Pe||e.Ge;B?(k||(k=h("div"),C(k,"section-toggles")),k.appendChild(q)):k=null,y(jo,k||q)})),f&&(e.ze||(e.ze=h(X),C(e.ze,"btn"),w(e.ze,ge,"all"),y(S,e.ze),x(e.ze,D,(()=>s("all")))),e.ze.innerHTML=f),g&&(e.je||(e.je=h(X),C(e.je,"btn"),w(e.je,ge,"necessary"),y(S,e.je),x(e.je,D,(()=>s([])))),e.je.innerHTML=g),m&&(e.qe||(e.qe=h(X),C(e.qe,"btn"),C(e.qe,"btn--secondary"),w(e.qe,ge,"save"),y(j,e.qe),x(e.qe,D,(()=>s()))),e.qe.innerHTML=m),e.Pe&&(e.we.replaceChild(e.Pe,e.Ge),e.Ge=e.Pe),At(1),o.N||(o.N=!0,K(a.re.ue,Ze,e.we),n(t),y(e.Ce,e.Fe),_t(e.we),setTimeout((()=>T(e.Fe,"cc--anim")),100)),Tt(2)};function Dt(t,n,o,e,r){const c=a.o,u=a.ne,s=h("label"),i=h("input"),d=h("span"),p=h("span"),f=h("span"),g=h("span"),m=h("span");if(g.innerHTML=je(1,3),m.innerHTML=je(0,3),i.type="checkbox",T(s,"section__toggle-wrapper"),T(i,"section__toggle"),T(g,"toggle__icon-on"),T(m,"toggle__icon-off"),T(d,"toggle__icon"),T(p,"toggle__icon-circle"),T(f,"toggle__label"),w(d,$,"true"),e?(T(s,"toggle-service"),w(i,Oe,r),u.se[r][n]=i):u.ae[n]=i,e?(l=>{x(i,"change",(()=>{const v=u.se[l],z=u.ae[l];c.Z[l]=[];for(let S in v){const j=v[S];j.checked&&c.Z[l].push(j.value)}z.checked=c.Z[l].length>0}))})(r):(l=>{x(i,D,(()=>{const v=u.se[l],z=i.checked;c.Z[l]=[];for(let S in v)v[S].checked=z,z&&c.Z[l].push(S)}))})(n),i.value=n,f.textContent=t.replace(/<.*>.*<\/.*>/gm,""),y(p,m),y(p,g),y(d,p),c.D)(o.readOnly||o.enabled)&&(i.checked=!0);else if(e){const l=c.Y[r];i.checked=o.readOnly||_(l,n)}else _(c.R,n)&&(i.checked=!0);return o.readOnly&&(i.disabled=!0),y(s,i),y(s,d),y(s,f),s}const Ke=()=>{const t=h("span");return a.ne.Ke||(a.ne.Ke=t),t},Qe=(t,n)=>{const o=a.o,e=a.ne,{hide:r,showPreferences:c,acceptCategory:u}=t,s=o.u&&o.u.consentModal;if(!s)return;const i=s.acceptAllBtn,d=s.acceptNecessaryBtn,p=s.showPreferencesBtn,f=s.closeIconLabel,g=s.footer,m=s.label,l=s.title,v=S=>{r(),u(S)};if(!e.Qe){e.Qe=h("div"),e.he=h("div"),e.We=h("div"),e.Xe=h("div"),e.Ye=h("div"),T(e.Qe,"cm-wrapper"),T(e.he,"cm"),I(e.We,"body"),I(e.Xe,"texts"),I(e.Ye,"btns"),w(e.he,"role","dialog"),w(e.he,"aria-modal","true"),w(e.he,$,"false"),w(e.he,"aria-describedby","cm__desc"),m?w(e.he,"aria-label",m):l&&w(e.he,"aria-labelledby","cm__title");const S="box",j=o.i.guiOptions,k=j&&j.consentModal,b=(k&&k.layout||S).split(" ")[0]===S;l&&f&&b&&(e.Le||(e.Le=h(X),e.Le.innerHTML=je(),I(e.Le,"btn"),I(e.Le,"btn--close"),x(e.Le,D,(()=>{v([])})),y(e.We,e.Le)),w(e.Le,"aria-label",f)),y(e.We,e.Xe),(i||d||p)&&y(e.We,e.Ye),e.be=h("div"),w(e.be,"tabIndex",-1),y(e.he,e.be),y(e.he,e.We),y(e.Qe,e.he)}l&&(e.Ze||(e.Ze=h("h2"),e.Ze.className=e.Ze.id="cm__title",y(e.Xe,e.Ze)),e.Ze.innerHTML=l);let z=s.description;if(z&&(o.V&&(z=z.replace("{{revisionMessage}}",o.I?"":s.revisionMessage||"")),e.et||(e.et=h("p"),e.et.className=e.et.id="cm__desc",y(e.Xe,e.et)),e.et.innerHTML=z),i&&(e.tt||(e.tt=h(X),y(e.tt,Ke()),I(e.tt,"btn"),w(e.tt,ge,"all"),x(e.tt,D,(()=>{v("all")}))),e.tt.firstElementChild.innerHTML=i),d&&(e.Ie||(e.Ie=h(X),y(e.Ie,Ke()),I(e.Ie,"btn"),w(e.Ie,ge,"necessary"),x(e.Ie,D,(()=>{v([])}))),e.Ie.firstElementChild.innerHTML=d),p&&(e.ot||(e.ot=h(X),y(e.ot,Ke()),I(e.ot,"btn"),I(e.ot,"btn--secondary"),w(e.ot,ge,"show"),x(e.ot,"mouseenter",(()=>{o.N||me(t,n)})),x(e.ot,D,c)),e.ot.firstElementChild.innerHTML=p),e.nt||(e.nt=h("div"),I(e.nt,Se),i&&y(e.nt,e.tt),d&&y(e.nt,e.Ie),(i||d)&&y(e.We,e.nt),y(e.Ye,e.nt)),e.ot&&!e.st&&(e.st=h("div"),e.Ie&&e.tt?(I(e.st,Se),y(e.st,e.ot),y(e.Ye,e.st)):(y(e.nt,e.ot),I(e.nt,Se+"--uneven"))),g){if(!e.ct){let S=h("div"),j=h("div");e.ct=h("div"),I(S,"footer"),I(j,"links"),I(e.ct,"link-group"),y(j,e.ct),y(S,j),y(e.he,S)}e.ct.innerHTML=g}At(0),o.T||(o.T=!0,K(a.re.ue,Ue,e.he),n(t),y(e.Ce,e.Qe),_t(e.he),setTimeout((()=>T(e.Qe,"cc--anim")),100)),Tt(1),zt(e.We,t,me,n)},et=t=>{if(!Q(t))return null;if(t in a.o._)return t;let n=t.slice(0,2);return n in a.o._?n:null},tt=()=>a.o.l||a.o.i.language.default,ot=t=>{t&&(a.o.l=t)},Bt=async t=>{const n=a.o;let o=et(t)?t:tt(),e=n._[o];if(Q(e)?e=await(async r=>{try{return await(await fetch(r)).json()}catch(c){return console.error(c),!1}})(e):J(e)&&(e=await e()),!e)throw`Could not load translation for the '${o}' language`;return n.u=e,ot(o),!0},Ht=()=>{let t=a.o.i.language.rtl,n=a.ne.Ce;t&&n&&(ye(t)||(t=[t]),_(t,a.o.l)?T(n,"cc--rtl"):oe(n,"cc--rtl"))},le=()=>{const t=a.ne;if(t.Ce)return;t.Ce=h("div"),t.Ce.id="cc-main",t.Ce.setAttribute("data-nosnippet",""),Ht();let n=a.o.i.root;n&&Q(n)&&(n=document.querySelector(n)),(n||t.Ue.body).appendChild(t.Ce)},It=t=>_e((()=>localStorage.removeItem(t))),Nt=(t,n)=>{if(n instanceof RegExp)return t.filter((o=>n.test(o)));{const o=kt(t,n);return o>-1?[t[o]]:[]}},Rt=t=>{const{hostname:n,protocol:o}=location,{name:e,path:r,domain:c,sameSite:u,useLocalStorage:s,secure:i}=a.t.cookie,d=t?(()=>{const m=a.o.S,l=m?new Date-m:0;return 864e5*bt()-l})():864e5*bt(),p=new Date;p.setTime(p.getTime()+d),a.o.p.expirationTime=p.getTime();const f=JSON.stringify(a.o.p);let g=e+"="+encodeURIComponent(f)+(d!==0?"; expires="+p.toUTCString():"")+"; Path="+r+"; SameSite="+u;_(n,".")&&(g+="; Domain="+c),i&&o==="https:"&&(g+="; Secure"),s?((m,l)=>{_e((()=>localStorage.setItem(m,l)))})(e,f):document.cookie=g,a.o.p},nt=(t,n,o)=>{if(t.length===0)return;const e=o||a.t.cookie.domain,r=n||a.t.cookie.path,c=e.slice(0,4)==="www.",u=c&&e.substring(4),s=(i,d)=>{d&&d.slice(0,1)!=="."&&(d="."+d),document.cookie=i+"=; path="+r+(d?"; domain="+d:"")+"; expires=Thu, 01 Jan 1970 00:00:01 GMT;"};for(const i of t)s(i,o),o||s(i,e),c&&s(i,u)},Et=t=>{const n=t||a.t.cookie.name,o=a.t.cookie.useLocalStorage;return((r,c)=>{let u;return u=_e((()=>JSON.parse(c?r:decodeURIComponent(r))),!0)||{},u})(o?(e=n,_e((()=>localStorage.getItem(e)))||""):at(n,!0),o);var e},at=(t,n)=>{const o=document.cookie.match("(^|;)\\s*"+t+"\\s*=\\s*([^;]+)");return o?n?o.pop():t:""},Gt=t=>{const n=document.cookie.split(/;\s*/),o=[];for(const e of n){let r=e.split("=")[0];t?_e((()=>{t.test(r)&&o.push(r)})):o.push(r)}return o},st=(t,n=[])=>{((o,e)=>{const{O:r,R:c,B:u,N:s,Z:i,$:d,X:p}=a.o;let f=[];if(o){ye(o)?f.push(...o):Q(o)&&(f=o==="all"?r:[o]);for(const g of r)i[g]=_(f,g)?W(p[g]):[]}else f=[...c,...d],s&&(f=(()=>{const g=a.ne.ae;if(!g)return[];let m=[];for(let l in g)g[l].checked&&m.push(l);return m})());f=f.filter((g=>!_(r,g)||!_(e,g))),f.push(...u),vt(f)})(t,n),(()=>{const o=a.o,{Z:e,B:r,Y:c,X:u,O:s}=o,i=s;o.te=ee(c);for(const d of i){const p=u[d],f=W(p),g=e[d]&&e[d].length>0,m=_(r,d);if(f.length!==0){if(c[d]=[],m)c[d].push(...f);else if(g){const l=e[d];c[d].push(...l)}else c[d]=o.Z[d];c[d]=Fe(c[d])}}})(),(()=>{const o=a.o;o.L=a.t.mode===Ce&&o.D?He(o.$,o.R):He(o.R,o.p.categories);let e=o.L.length>0,r=!1;for(const i of o.O)o.ee[i]=He(o.Y[i],o.te[i]),o.ee[i].length>0&&(r=!0);const c=a.ne.ae;for(const i in c)c[i].checked=_(o.R,i);for(const i of o.O){const d=a.ne.se[i],p=o.Y[i];for(const f in d)d[f].checked=_(p,f)}o.C||(o.C=new Date),o.M||(o.M=("10000000-1000-4000-8000"+-1e11).replace(/[018]/g,(i=>(i^crypto.getRandomValues(new Uint8Array(1))[0]&15>>i/4).toString(16)))),o.p={categories:ee(o.R),revision:a.t.revision,data:o.h,consentTimestamp:o.C.toISOString(),consentId:o.M,services:ee(o.Y),languageCode:a.o.l},o.S&&(o.p.lastConsentTimestamp=o.S.toISOString());let u=!1;const s=e||r;(o.D||s)&&(o.D&&(o.D=!1,u=!0),o.S=o.S?new Date:o.C,o.p.lastConsentTimestamp=o.S.toISOString(),Rt(),a.t.autoClearCookies&&(u||s)&&(i=>{const d=a.o,p=Gt(),f=(g=>{const m=a.o;return(g?m.O:m.L).filter((l=>{const v=m.P[l];return!!v&&!v.readOnly&&!!v.autoClear}))})(i);for(const g in d.ee)for(const m of d.ee[g]){const l=d.X[g][m].cookies;if(!_(d.Y[g],m)&&l)for(const v of l){const z=Nt(p,v.name);nt(z,v.path,v.domain)}}for(const g of f){const m=d.P[g].autoClear,l=m&&m.cookies||[],v=_(d.L,g),z=!_(d.R,g),S=v&&z;if(i?z:S){m.reloadPage&&S&&(d.j=!0);for(const j of l){const k=Nt(p,j.name);nt(k,j.path,j.domain)}}}})(u),$e()),u&&(K(a.re.ie),K(a.re.le),a.t.mode===pe)||(s&&K(a.re.de),o.j&&(o.j=!1,location.reload()))})()},Ut=t=>{const n=a.o.D?[]:a.o.R;return _(n,t)},co=(t,n)=>{const{O:o,X:e}=a.o;if(!(t&&n&&Q(n)&&_(o,n)&&W(e[n]).length!==0))return!1;((r,c)=>{const u=a.o,{X:s,Z:i,N:d}=u,p=a.ne.se[c]||{},f=a.ne.ae[c]||{},g=W(s[c]);if(i[c]=[],Q(r)){if(r==="all"){if(i[c].push(...g),d)for(let l in p)p[l].checked=!0,De(p[l])}else if(_(g,r)&&i[c].push(r),d)for(let l in p)p[l].checked=r===l,De(p[l])}else if(ye(r))for(let l of g){const v=_(r,l);v&&i[c].push(l),d&&(p[l].checked=v,De(p[l]))}const m=i[c].length===0;u.R=m?u.R.filter((l=>l!==c)):Fe([...u.R,c]),d&&(f.checked=!m,De(f))})(t,n),st()},it=(t,n)=>{const o=a.o.D?[]:a.o.Y[n]||[];return _(o,t)},lo=t=>at(t,!0)!=="",Zt=(t,n,o)=>{let e=[];const r=c=>{if(Q(c)){let u=at(c);u!==""&&e.push(u)}else e.push(...Gt(c))};if(ye(t))for(let c of t)r(c);else r(t);nt(e,n,o)},rt=t=>{const{ne:n,o}=a;if(!o.k){if(!o.T){if(!t)return;Qe(Te,le)}o.k=!0,o.J=Pe(),o.v&&jt(!0),Ct(n.he,1),T(n.ye,Re),w(n.he,$,"false"),setTimeout((()=>{V(a.ne.be)}),100),K(a.re.fe,Ue)}},Ft=()=>{const{ne:t,o:n,re:o}=a;n.k&&(n.k=!1,n.v&&jt(),V(t.Ke,!0),oe(t.ye,Re),w(t.he,$,"true"),V(n.J),n.J=null,K(o._e,Ue))},Yt=()=>{const t=a.o;t.A||(t.N||me(Te,le),t.A=!0,t.k?t.U=Pe():t.J=Pe(),Ct(a.ne.we,2),T(a.ne.ye,Ee),w(a.ne.we,$,"false"),setTimeout((()=>{V(a.ne.ve)}),100),K(a.re.fe,Ze))},Xt=()=>{const t=a.o;t.A&&(t.A=!1,(()=>{const n=ct(),o=a.o.P,e=a.ne.ae,r=a.ne.se,c=u=>_(a.o.$,u);for(const u in e){const s=!!o[u].readOnly;e[u].checked=s||(n?Ut(u):c(u));for(const i in r[u])r[u][i].checked=s||(n?it(i,u):c(u))}})(),V(a.ne.$e,!0),oe(a.ne.ye,Ee),w(a.ne.we,$,"true"),t.k?(V(t.U),t.U=null):(V(t.J),t.J=null),K(a.re._e,Ze))};var Te={show:rt,hide:Ft,showPreferences:Yt,hidePreferences:Xt,acceptCategory:st};const uo=async(t,n)=>{if(!et(t))return!1;const o=a.o;return!(t===tt()&&n!==!0||!await Bt(t)||(ot(t),o.T&&Qe(Te,le),o.N&&me(Te,le),Ht(),0))},fo=()=>{const{F:t,Y:n}=a.o,{accepted:o,rejected:e}=(()=>{const{D:r,R:c,O:u}=a.o;return{accepted:c,rejected:r?[]:u.filter((s=>!_(c,s)))}})();return ee({acceptType:t,acceptedCategories:o,rejectedCategories:e,acceptedServices:n,rejectedServices:no()})},po=(t,n)=>{let o=document.querySelector('script[src="'+t+'"]');return new Promise((e=>{if(o)return e(!0);if(o=h("script"),Ae(n))for(const r in n)w(o,r,n[r]);o.onload=()=>e(!0),o.onerror=()=>{o.remove(),e(!1)},o.src=t,y(document.head,o)}))},go=t=>{let n,o=t.value,e=t.mode,r=!1;const c=a.o;if(e==="update"){c.h=n=$t("data");const u=typeof n==typeof o;if(u&&typeof n=="object"){!n&&(n={});for(let s in o)n[s]!==o[s]&&(n[s]=o[s],r=!0)}else!u&&n||n===o||(n=o,r=!0)}else n=o,r=!0;return r&&(c.h=n,c.p.data=n,Rt(!0)),r},$t=(t,n)=>{const o=Et(n);return t?o[t]:o},yo=t=>{const n=a.t,o=a.o.i;return t?n[t]||o[t]:{...n,...o,cookie:{...n.cookie}}},ct=()=>!a.o.D,ho=Object.freeze(Object.defineProperty({__proto__:null,acceptCategory:st,acceptService:co,acceptedCategory:Ut,acceptedService:it,eraseCookies:Zt,getConfig:yo,getCookie:$t,getUserPreferences:fo,hide:Ft,hidePreferences:Xt,loadScript:po,reset:t=>{const{Ce:n,ye:o}=a.ne,{name:e,path:r,domain:c,useLocalStorage:u}=a.t.cookie;t&&(u?It(e):Zt(e,r,c));for(const{pe:i,ge:d,me:p}of a.o.m)i.removeEventListener(d,p);n&&n.remove(),o&&o.classList.remove(Ge,Ee,Re);const s=new mt;for(const i in a)a[i]=s[i];window._ccRun=!1},run:async t=>{const{o:n,t:o,re:e}=a,r=window;if(!r._ccRun){if(r._ccRun=!0,(s=>{const{ne:i,t:d,o:p}=a,f=d,g=p,{cookie:m}=f,l=a.ce,v=s.cookie,z=s.categories,S=W(z)||[],j=navigator,k=document;i.Ue=k,i.ye=k.documentElement,m.domain=location.hostname,g.i=s,g.P=z,g.O=S,g._=s.language.translations,g.v=!!s.disablePageInteraction,l.ie=s.onFirstConsent,l.le=s.onConsent,l.de=s.onChange,l._e=s.onModalHide,l.fe=s.onModalShow,l.ue=s.onModalReady;const{mode:b,autoShow:M,lazyHtmlGeneration:A,autoClearCookies:L,revision:N,manageScriptTags:be,hideFromBots:ue}=s;b===Ce&&(f.mode=b),typeof L=="boolean"&&(f.autoClearCookies=L),typeof be=="boolean"&&(f.manageScriptTags=be),typeof N=="number"&&N>=0&&(f.revision=N,g.V=!0),typeof M=="boolean"&&(f.autoShow=M),typeof A=="boolean"&&(f.lazyHtmlGeneration=A),ue===!1&&(f.hideFromBots=!1),f.hideFromBots===!0&&j&&(g.G=j.userAgent&&/bot|crawl|spider|slurp|teoma/i.test(j.userAgent)||j.webdriver),Ae(v)&&(f.cookie={...m,...v}),f.autoClearCookies,g.V,f.manageScriptTags,(Z=>{const{P:ne,X:F,Y:B,Z:R,B:ae}=a.o;for(let P of Z){const q=ne[P],Y=q.services||{},se=Ae(Y)&&W(Y)||[];F[P]={},B[P]=[],R[P]=[],q.readOnly&&(ae.push(P),B[P]=se),a.ne.se[P]={};for(let ie of se){const G=Y[ie];G.Se=!1,F[P][ie]=G}}})(S),(()=>{if(!a.t.manageScriptTags)return;const Z=a.o,ne=Ye(document,"script["+Oe+"]");for(const F of ne){let B=Be(F,Oe),R=F.dataset.service||"",ae=!1;if(B&&B.charAt(0)==="!"&&(B=B.slice(1),ae=!0),R.charAt(0)==="!"&&(R=R.slice(1),ae=!0),_(Z.O,B)&&(Z.oe.push({Me:F,xe:!1,ke:ae,De:B,Te:R}),R)){const P=Z.X[B];P[R]||(P[R]={Se:!1})}}})(),ot((()=>{const Z=a.o.i.language.autoDetect;if(Z){const ne={browser:navigator.language,document:document.documentElement.lang},F=et(ne[Z]);if(F)return F}return tt()})())})(t),n.G)return;(()=>{const s=a.o,i=a.t,d=Et(),{categories:p,services:f,consentId:g,consentTimestamp:m,lastConsentTimestamp:l,data:v,revision:z}=d,S=ye(p);s.p=d,s.M=g;const j=!!g&&Q(g);s.C=m,s.C&&(s.C=new Date(m)),s.S=l,s.S&&(s.S=new Date(l)),s.h=v!==void 0?v:null,s.V&&j&&z!==i.revision&&(s.I=!1),s.D=!(j&&s.I&&s.C&&s.S&&S),i.cookie.useLocalStorage&&!s.D&&(s.D=new Date().getTime()>(d.expirationTime||0),s.D&&It(i.cookie.name)),s.D,(()=>{const k=a.o;for(const b of k.O){const M=k.P[b];if(M.readOnly||M.enabled){k.$.push(b);const A=k.X[b]||{};for(let L in A)k.Z[b].push(L),k.i.mode===Ce&&k.Y[b].push(L)}}})(),s.D?i.mode===Ce&&(s.R=[...s.$]):(s.Y={...s.Y,...f},s.Z={...s.Y},vt([...s.B,...p]))})();const u=ct();if(!await Bt())return!1;if(zt(null,c=Te,me,le),a.o.D&&Qe(c,le),a.t.lazyHtmlGeneration||me(c,le),o.autoShow&&!u&&rt(!0),u)return $e(),K(e.le);o.mode===Ce&&$e(n.$)}var c},setCookieData:go,setLanguage:uo,show:rt,showPreferences:Yt,validConsent:ct,validCookie:lo},Symbol.toStringTag,{value:"Module"}));function mo(){return t=>{globalThis.dataLayer?.push(t)}}const qt="necessary",ke="analytics",we="advertisement",Le="functionality",Ne="security",lt="ad_storage",ut="ad_user_data",dt="ad_personalization",ft="analytics_storage",pt="functionality_storage",gt="personalization_storage",yt="security_storage",ko={[lt]:we,[ft]:ke,[pt]:Le,[gt]:Le,[yt]:Ne,[ut]:we,[dt]:we};function wo(){const t=mo();function n(e){t({event:"default_cookie_consent",settings:Object.fromEntries(e.map(r=>[r,"denied"]))})}function o(e){t({event:"cookie_consent_update",settings:Object.fromEntries(e.map(r=>[r,bo(r,ko[r])]))})}return{setDefaultConsent:n,updateConsent:o}}function bo(t,n){return it(t,n)?"granted":"denied"}function vo(t){const{categories:n,onFirstConsent:o,onChange:e,onConsent:r,...c}=t,u=Object.values(n).flatMap(p=>Object.keys(p.services??{})),{setDefaultConsent:s,updateConsent:i}=wo();return s(u),{onFirstConsent:p=>{i(u),o?.(p)},onConsent:p=>{i(u),r?.(p)},onChange:p=>{i(u),e?.(p)},categories:{[qt]:{enabled:!0,readOnly:!0,...n[qt]},[ke]:{autoClear:{cookies:[{name:/^_ga/},{name:"_gid"}]},...n[ke]},...n},...c}}async function zo(t){const n=ho,o=vo(t);return await n.run(o),n}const Jt="_ga",Wt="_gid",Vt={en:{language:{consentModal:{title:"We use cookies",description:"This website uses essential cookies to ensure its proper operation and tracking cookies to understand how you interact with it. The latter will be set only after consent.",acceptAllBtn:"Accept all",acceptNecessaryBtn:"Reject all",showPreferencesBtn:"Manage Individual preferences"},preferencesModal:{title:"Manage cookie preferences",acceptAllBtn:"Accept all",acceptNecessaryBtn:"Reject all",savePreferencesBtn:"Accept current selection",closeIconLabel:"Close modal",baseSection:{title:"Cookie usage",description:"We use cookies to ensure the basic functionalities of the website and to enhance your online experience."},necessarySection:{title:"Strictly necessary cookies",description:"These cookies are essential for the proper functioning of the website, for example for user authentication."}},categoryPreferenceLabels:{analytics:{title:"Analytics",description:"Cookies used for analytics help collect data that allows services to understand how users interact with a particular service. These insights allow services both to improve content and to build better features that improve the user's experience.",cookieTable:{headers:{name:"Name",domain:"Service",description:"Description",expiration:"Expiration"},body:[{name:Jt,domain:"Google Analytics",description:'Cookie set by <a href="https://business.safety.google/adscookies/">Google Analytics</a>',expiration:"Expires after 12 days"},{name:Wt,domain:"Google Analytics",description:'Cookie set by <a href="https://business.safety.google/adscookies/">Google Analytics</a>',expiration:"Session"}]}},advertisement:{title:"Advertising",description:'Google uses cookies for advertising, including serving and rendering ads, personalizing ads (depending on your ad settings at <a href="https://g.co/adsettings">g.co/adsettings</a>), limiting the number of times an ad is shown to a user, muting ads you have chosen to stop seeing, and measuring the effectiveness of ads.'},functionality:{title:"Functionality",description:"Cookies used for functionality allow users to interact with a service or site to access features that are fundamental to that service. Things considered fundamental to the service include preferences like the user's choice of language, product optimizations that help maintain and improve a service, and maintaining information relating to a user's session, such as the content of a shopping cart."},security:{title:"Security",description:"Cookies used for security authenticate users, prevent fraud, and protect users as they interact with a service."}}},categories:{[ke]:{services:{[ft]:{label:"Enables storage (such as cookies) related to analytics e.g. visit duration."}}},[we]:{enabled:!0,readOnly:!1,services:{[lt]:{label:"Enables storage (such as cookies) related to advertising."},[ut]:{label:"Sets consent for sending user data related to advertising to Google."},[dt]:{label:"Sets consent for personalized advertising."}}},[Le]:{enabled:!0,readOnly:!1,services:{[pt]:{label:"Enables storage that supports the functionality of the website or app e.g. language settings."},[gt]:{label:"Enables storage related to personalization e.g. video recommendations."}}},[Ne]:{enabled:!0,readOnly:!1,services:{[yt]:{label:"Enables storage related to security such as authentication functionality, fraud prevention, and other user protection."}}}}},pl:{language:{consentModal:{title:"Używamy plików cookie",description:"Ta strona internetowa wykorzystuje niezbędne pliki cookie w celu zapewnienia jej prawidłowego działania oraz pliki cookie śledzące w celu zrozumienia sposobu interakcji użytkowników z witryną. Te ostatnie będą ustawione tylko po wyrażeniu zgody.",acceptAllBtn:"Zaakceptuj wszystkie",acceptNecessaryBtn:"Odrzuć wszystkie",showPreferencesBtn:"Zarządzaj indywidualnymi preferencjami"},preferencesModal:{title:"Zarządzaj preferencjami plików cookie",acceptAllBtn:"Zaakceptuj wszystkie",acceptNecessaryBtn:"Odrzuć wszystkie",savePreferencesBtn:"Zaakceptuj bieżący wybór",closeIconLabel:"Zamknij okno",baseSection:{title:"Używanie plików cookie",description:"Używamy plików cookie w celu zapewnienia podstawowej funkcjonalności strony internetowej oraz poprawy Twojego doświadczenia online."},necessarySection:{title:"Ściśle niezbędne pliki cookie",description:"Te pliki cookie są niezbędne do prawidłowego funkcjonowania strony internetowej, na przykład do uwierzytelniania użytkowników."}},categoryPreferenceLabels:{analytics:{title:"Analityka",description:"Pliki cookie używane do analityki pomagają zbierać dane, które umożliwiają usługom zrozumienie sposobu interakcji użytkowników z określoną usługą. Te informacje pozwalają usługom zarówno poprawić treść, jak i tworzyć lepsze funkcje, które poprawiają doświadczenie użytkownika.",cookieTable:{headers:{name:"Nazwa",domain:"Usługa",description:"Opis",expiration:"Wygaśnięcie"},body:[{name:Jt,domain:"Google Analytics",description:'Plik cookie ustawiony przez <a href="https://business.safety.google/adscookies/">Google Analytics</a>',expiration:"Wygasa po 12 dniach"},{name:Wt,domain:"Google Analytics",description:'Plik cookie ustawiony przez <a href="https://business.safety.google/adscookies/">Google Analytics</a>',expiration:"Sesja"}]}},advertisement:{title:"Reklama",description:'Google używa plików cookie do reklam, w tym do wyświetlania i renderowania reklam, personalizacji reklam (w zależności od Twoich ustawień reklam na <a href="https://g.co/adsettings">g.co/adsettings</a>), ograniczania liczby wyświetleń reklamy użytkownikowi, wyciszania reklam, które zdecydowałeś się przestać oglądać, oraz mierzenia skuteczności reklam.'},functionality:{title:"Funkcjonalność",description:"Pliki cookie używane do funkcjonalności umożliwiają użytkownikom interakcję z usługą lub stroną w celu uzyskania dostępu do funkcji, które są fundamentalne dla tej usługi. Do rzeczy uznawanych za fundamentalne dla usługi należą preferencje takie jak wybór języka przez użytkownika, optymalizacje produktu, które pomagają utrzymać i poprawić usługę, oraz utrzymywanie informacji dotyczących sesji użytkownika, takich jak zawartość koszyka zakupów."},security:{title:"Bezpieczeństwo",description:"Pliki cookie używane do bezpieczeństwa uwierzytelniają użytkowników, zapobiegają oszustwom i chronią użytkowników podczas interakcji z usługą."}}},categories:{[ke]:{services:{[ft]:{label:"Umożliwia przechowywanie (np. plików cookie) związane z analityką, np. czas trwania wizyty."}}},[we]:{enabled:!0,readOnly:!1,services:{[lt]:{label:"Umożliwia przechowywanie (np. plików cookie) związane z reklamą."},[ut]:{label:"Ustawia zgodę na wysyłanie danych użytkownika związanych z reklamą do Google."},[dt]:{label:"Ustawia zgodę na personalizację reklam."}}},[Le]:{enabled:!0,readOnly:!1,services:{[pt]:{label:"Umożliwia przechowywanie, które wspiera funkcjonalność strony internetowej lub aplikacji, np. ustawienia języka."},[gt]:{label:"Umożliwia przechowywanie związane z personalizacją, np. rekomendacje wideo."}}},[Ne]:{enabled:!0,readOnly:!1,services:{[yt]:{label:"Umożliwia przechowywanie związane z bezpieczeństwem, takie jak funkcjonalność uwierzytelniania, zapobieganie oszustwom i inna ochrona użytkowników."}}}}}},Kt=[ke,we,Le,Ne];function Co(t,n){const o=[t.language.preferencesModal.baseSection,{...t.language.preferencesModal.necessarySection,linkedCategory:"necessary"}];for(const e of Kt)n[e]&&o.push({...t.language.categoryPreferenceLabels[e],linkedCategory:e});return o}const Qt="en";function So({language:t=[Qt],advertisement:n=!1,analytics:o=!1,security:e=!1,functionality:r=!1}){const c={analytics:o,advertisement:n,functionality:r,security:e},u=t.at(0)??Qt,s=Vt[u],i={};for(const p of Kt)c[p]&&(i[p]=s.categories[p]);const d={};for(const p of t){const f=Vt[p];d[p]={consentModal:f.language.consentModal,preferencesModal:{...f.language.preferencesModal,sections:Co(f,c)}}}return{categories:i,language:{default:u,translations:d}}}ce.getDefaultConsentConfig=So,ce.runCookieConsent=zo,Object.defineProperty(ce,Symbol.toStringTag,{value:"Module"})}));
|
|
1
|
+
(function(i,d){typeof exports=="object"&&typeof module<"u"?d(exports,require("vanilla-cookieconsent"),require("@leancodepl/gtag")):typeof define=="function"&&define.amd?define(["exports","vanilla-cookieconsent","@leancodepl/gtag"],d):(i=typeof globalThis<"u"?globalThis:i||self,d(i["@leancodepl/cookie-consent"]={},i.CookieConsent,i.gtag))})(this,(function(i,d,B){"use strict";function G(e){const n=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const t in e)if(t!=="default"){const a=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(n,t,a.get?a:{enumerable:!0,get:()=>e[t]})}}return n.default=e,Object.freeze(n)}const S=G(d),A="necessary",c="analytics",l="advertisement",p="functionality",g="security",k="ad_storage",w="ad_user_data",f="ad_personalization",z="analytics_storage",m="functionality_storage",b="personalization_storage",h="security_storage",x={[k]:l,[z]:c,[m]:p,[b]:p,[h]:g,[w]:l,[f]:l};function U(){const e=B.mkgtag();function n(a){e({event:"default_cookie_consent",settings:Object.fromEntries(a.map(s=>[s,"denied"]))})}function t(a){e({event:"cookie_consent_update",settings:Object.fromEntries(a.map(s=>[s,N(s,x[s])]))})}return{setDefaultConsent:n,updateConsent:t}}function N(e,n){return S.acceptedService(e,n)?"granted":"denied"}function D(e){const{categories:n,onFirstConsent:t,onChange:a,onConsent:s,...y}=e,r=Object.values(n).flatMap(o=>Object.keys(o.services??{})),{setDefaultConsent:j,updateConsent:u}=U();return j(r),{onFirstConsent:o=>{u(r),t?.(o)},onConsent:o=>{u(r),s?.(o)},onChange:o=>{u(r),a?.(o)},categories:{[A]:{enabled:!0,readOnly:!0,...n[A]},[c]:{autoClear:{cookies:[{name:/^_ga/},{name:"_gid"}]},...n[c]},...n},...y}}async function E(e){const n=S,t=D(e);return await n.run(t),n}const O="_ga",_="_gid",P={en:{language:{consentModal:{title:"We use cookies",description:"This website uses essential cookies to ensure its proper operation and tracking cookies to understand how you interact with it. The latter will be set only after consent.",acceptAllBtn:"Accept all",acceptNecessaryBtn:"Reject all",showPreferencesBtn:"Manage Individual preferences"},preferencesModal:{title:"Manage cookie preferences",acceptAllBtn:"Accept all",acceptNecessaryBtn:"Reject all",savePreferencesBtn:"Accept current selection",closeIconLabel:"Close modal",baseSection:{title:"Cookie usage",description:"We use cookies to ensure the basic functionalities of the website and to enhance your online experience."},necessarySection:{title:"Strictly necessary cookies",description:"These cookies are essential for the proper functioning of the website, for example for user authentication."}},categoryPreferenceLabels:{analytics:{title:"Analytics",description:"Cookies used for analytics help collect data that allows services to understand how users interact with a particular service. These insights allow services both to improve content and to build better features that improve the user's experience.",cookieTable:{headers:{name:"Name",domain:"Service",description:"Description",expiration:"Expiration"},body:[{name:O,domain:"Google Analytics",description:'Cookie set by <a href="https://business.safety.google/adscookies/">Google Analytics</a>',expiration:"Expires after 12 days"},{name:_,domain:"Google Analytics",description:'Cookie set by <a href="https://business.safety.google/adscookies/">Google Analytics</a>',expiration:"Session"}]}},advertisement:{title:"Advertising",description:'Google uses cookies for advertising, including serving and rendering ads, personalizing ads (depending on your ad settings at <a href="https://g.co/adsettings">g.co/adsettings</a>), limiting the number of times an ad is shown to a user, muting ads you have chosen to stop seeing, and measuring the effectiveness of ads.'},functionality:{title:"Functionality",description:"Cookies used for functionality allow users to interact with a service or site to access features that are fundamental to that service. Things considered fundamental to the service include preferences like the user's choice of language, product optimizations that help maintain and improve a service, and maintaining information relating to a user's session, such as the content of a shopping cart."},security:{title:"Security",description:"Cookies used for security authenticate users, prevent fraud, and protect users as they interact with a service."}}},categories:{[c]:{services:{[z]:{label:"Enables storage (such as cookies) related to analytics e.g. visit duration."}}},[l]:{enabled:!0,readOnly:!1,services:{[k]:{label:"Enables storage (such as cookies) related to advertising."},[w]:{label:"Sets consent for sending user data related to advertising to Google."},[f]:{label:"Sets consent for personalized advertising."}}},[p]:{enabled:!0,readOnly:!1,services:{[m]:{label:"Enables storage that supports the functionality of the website or app e.g. language settings."},[b]:{label:"Enables storage related to personalization e.g. video recommendations."}}},[g]:{enabled:!0,readOnly:!1,services:{[h]:{label:"Enables storage related to security such as authentication functionality, fraud prevention, and other user protection."}}}}},pl:{language:{consentModal:{title:"Używamy plików cookie",description:"Ta strona internetowa wykorzystuje niezbędne pliki cookie w celu zapewnienia jej prawidłowego działania oraz pliki cookie śledzące w celu zrozumienia sposobu interakcji użytkowników z witryną. Te ostatnie będą ustawione tylko po wyrażeniu zgody.",acceptAllBtn:"Zaakceptuj wszystkie",acceptNecessaryBtn:"Odrzuć wszystkie",showPreferencesBtn:"Zarządzaj indywidualnymi preferencjami"},preferencesModal:{title:"Zarządzaj preferencjami plików cookie",acceptAllBtn:"Zaakceptuj wszystkie",acceptNecessaryBtn:"Odrzuć wszystkie",savePreferencesBtn:"Zaakceptuj bieżący wybór",closeIconLabel:"Zamknij okno",baseSection:{title:"Używanie plików cookie",description:"Używamy plików cookie w celu zapewnienia podstawowej funkcjonalności strony internetowej oraz poprawy Twojego doświadczenia online."},necessarySection:{title:"Ściśle niezbędne pliki cookie",description:"Te pliki cookie są niezbędne do prawidłowego funkcjonowania strony internetowej, na przykład do uwierzytelniania użytkowników."}},categoryPreferenceLabels:{analytics:{title:"Analityka",description:"Pliki cookie używane do analityki pomagają zbierać dane, które umożliwiają usługom zrozumienie sposobu interakcji użytkowników z określoną usługą. Te informacje pozwalają usługom zarówno poprawić treść, jak i tworzyć lepsze funkcje, które poprawiają doświadczenie użytkownika.",cookieTable:{headers:{name:"Nazwa",domain:"Usługa",description:"Opis",expiration:"Wygaśnięcie"},body:[{name:O,domain:"Google Analytics",description:'Plik cookie ustawiony przez <a href="https://business.safety.google/adscookies/">Google Analytics</a>',expiration:"Wygasa po 12 dniach"},{name:_,domain:"Google Analytics",description:'Plik cookie ustawiony przez <a href="https://business.safety.google/adscookies/">Google Analytics</a>',expiration:"Sesja"}]}},advertisement:{title:"Reklama",description:'Google używa plików cookie do reklam, w tym do wyświetlania i renderowania reklam, personalizacji reklam (w zależności od Twoich ustawień reklam na <a href="https://g.co/adsettings">g.co/adsettings</a>), ograniczania liczby wyświetleń reklamy użytkownikowi, wyciszania reklam, które zdecydowałeś się przestać oglądać, oraz mierzenia skuteczności reklam.'},functionality:{title:"Funkcjonalność",description:"Pliki cookie używane do funkcjonalności umożliwiają użytkownikom interakcję z usługą lub stroną w celu uzyskania dostępu do funkcji, które są fundamentalne dla tej usługi. Do rzeczy uznawanych za fundamentalne dla usługi należą preferencje takie jak wybór języka przez użytkownika, optymalizacje produktu, które pomagają utrzymać i poprawić usługę, oraz utrzymywanie informacji dotyczących sesji użytkownika, takich jak zawartość koszyka zakupów."},security:{title:"Bezpieczeństwo",description:"Pliki cookie używane do bezpieczeństwa uwierzytelniają użytkowników, zapobiegają oszustwom i chronią użytkowników podczas interakcji z usługą."}}},categories:{[c]:{services:{[z]:{label:"Umożliwia przechowywanie (np. plików cookie) związane z analityką, np. czas trwania wizyty."}}},[l]:{enabled:!0,readOnly:!1,services:{[k]:{label:"Umożliwia przechowywanie (np. plików cookie) związane z reklamą."},[w]:{label:"Ustawia zgodę na wysyłanie danych użytkownika związanych z reklamą do Google."},[f]:{label:"Ustawia zgodę na personalizację reklam."}}},[p]:{enabled:!0,readOnly:!1,services:{[m]:{label:"Umożliwia przechowywanie, które wspiera funkcjonalność strony internetowej lub aplikacji, np. ustawienia języka."},[b]:{label:"Umożliwia przechowywanie związane z personalizacją, np. rekomendacje wideo."}}},[g]:{enabled:!0,readOnly:!1,services:{[h]:{label:"Umożliwia przechowywanie związane z bezpieczeństwem, takie jak funkcjonalność uwierzytelniania, zapobieganie oszustwom i inna ochrona użytkowników."}}}}}},T=[c,l,p,g];function L(e,n){const t=[e.language.preferencesModal.baseSection,{...e.language.preferencesModal.necessarySection,linkedCategory:"necessary"}];for(const a of T)n[a]&&t.push({...e.language.categoryPreferenceLabels[a],linkedCategory:a});return t}const M="en";function F({language:e=[M],advertisement:n=!1,analytics:t=!1,security:a=!1,functionality:s=!1}){const y={analytics:t,advertisement:n,functionality:s,security:a},r=e.at(0)??M,j=P[r],u={};for(const o of T)y[o]&&(u[o]=j.categories[o]);const v={};for(const o of e){const C=P[o];v[o]={consentModal:C.language.consentModal,preferencesModal:{...C.language.preferencesModal,sections:L(C,y)}}}return{categories:u,language:{default:r,translations:v}}}i.getDefaultConsentConfig=F,i.runCookieConsent=E,Object.defineProperty(i,Symbol.toStringTag,{value:"Module"})}));
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@leancodepl/cookie-consent",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "10.0.1",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
}
|
|
16
16
|
},
|
|
17
17
|
"dependencies": {
|
|
18
|
-
"@leancodepl/gtag": "
|
|
18
|
+
"@leancodepl/gtag": "10.0.1",
|
|
19
19
|
"vanilla-cookieconsent": "^3.1.0"
|
|
20
20
|
},
|
|
21
21
|
"publishConfig": {
|