PageSourceSearch

https://twiinsmusic.eu/wp-content/plugins/mailchimp-for-woocommerc…ilchimp-woocommerce-public.min.js?ver=2.5.4

js twiinsmusic.eu collected 2026-09-25 13:18:51 UTC 9,630 bytes, 217 lines download raw bytes

1var mailchimp,
2    mailchimp_cart,
3    mailchimp_billing_email,
4    mailchimp_username_email,
5    mailchimp_registration_email,
6    mailchimp_submitted_email = false,
7    mailchimpReady = function (a) { /in/.test(document.readyState) ? setTimeout("mailchimpReady(" + a + ")", 9) : a(); };
8
9function mailchimpGetCurrentUserByHash(a) {
10    try {
11        if (!mailchimp_public_data.allowed_to_set_cookies) return;
12        var b = mailchimp_public_data.ajax_url + "?action=mailchimp_get_user_by_hash&hash=" + a, c = new XMLHttpRequest;
13        c.open("POST", b, !0), c.onload = function () {
14            if (c.status >= 200 && c.status < 400) {
15                var a = JSON.parse(c.responseText);
16                if (!a) return;
17                mailchimp_cart.valueEmail(a.email) && mailchimp_cart.setEmail(a.email);
18            }
19        };
20        c.onerror = function () {
21            console.log("mailchimp.get_email_by_hash.request.error", c.responseText)
22        };
23        c.setRequestHeader("Content-Type", "application/json");
24        c.setRequestHeader("Accept", "application/json");
25        c.send();
26    } catch (a) {
27        console.log("mailchimp.get_email_by_hash.error", a)
28    }
29}
30function mailchimpHandleBillingEmail(selector) {
31    try {
32        if (!mailchimp_public_data.allowed_to_set_cookies) return;
33        if (!selector) selector = "#billing_email";
34        var a = document.querySelector(selector);
35        var b = void 0 !== a ? a.value : "";
36        if (!mailchimp_cart.valueEmail(b) || mailchimp_submitted_email === b) { return false; }
37        mailchimp_cart.setEmail(b);
38        var c = mailchimp_public_data.ajax_url + "?action=mailchimp_set_user_by_email&email=" + b + "&mc_language=" + mailchimp_public_data.language;
39        var d = new XMLHttpRequest;
40        d.open("POST", c, !0);
41        d.onload = function () {
42            var successful = d.status >= 200 && d.status < 400;
43            var msg = successful ? "mailchimp.handle_billing_email.request.success" : "mailchimp.handle_billing_email.request.error";
44            if (successful) {
45                mailchimp_submitted_email = b;
46            }
47            console.log(msg, d.responseText);
48        };
49        d.onerror = function () {
50            console.log("mailchimp.handle_billing_email.request.error", d.responseText)
51        };
52        d.setRequestHeader("Content-Type", "application/json");
53        d.setRequestHeader("Accept", "application/json");
54        d.send();
55        return true;
56    } catch (a) {
57        console.log("mailchimp.handle_billing_email.error", a); mailchimp_submitted_email = !1
58    }
59}
60
61!function () {
62    "use strict";
63
64    function mailchimpCart() {
65
66        this.email_types = "input[type=email]";
67        this.regex_email = /^([A-Za-z0-9_+\-\.])+\@([A-Za-z0-9_\-\.])+\.([A-Za-z]{2,4})$/;
68        this.current_email = null;
69        this.previous_email = null;
70        this.expireUser = function () {
71            this.current_email = null;
72            if (!mailchimp_public_data.allowed_to_set_cookies) return;
73            mailchimp.storage.expire("mailchimp.cart.current_email");
74        };
75        this.expireSaved = function () {
76            if (!mailchimp_public_data.allowed_to_set_cookies) return;
77            mailchimp.storage.expire("mailchimp.cart.items");
78        };
79        this.setEmail = function (a) {
80            if (!mailchimp_public_data.allowed_to_set_cookies) return;
81            if (!this.valueEmail(a)) return false;
82            this.setPreviousEmail(this.getEmail());
83            mailchimp.storage.set("mailchimp.cart.current_email", this.current_email = a);
84        };
85        this.getEmail = function () {
86            if (!mailchimp_public_data.allowed_to_set_cookies) return;
87            if (this.current_email) return this.current_email;
88            var a = mailchimp.storage.get("mailchimp.cart.current_email", !1);
89            if (!a || !this.valueEmail(a)) return false;
90            return this.current_email = a;
91        };
92        this.setPreviousEmail = function (a) {
93            if (!mailchimp_public_data.allowed_to_set_cookies) return;
94            if (!this.valueEmail(a)) return false;
95            mailchimp.storage.set("mailchimp.cart.previous_email", this.previous_email = a);
96        };
97        this.valueEmail = function (a) {
98            return this.regex_email.test(a);
99        };
100        return this;
101    }
102
103    var g = {
104        extend: function (a, b) {
105            for (var c in b || {})b.hasOwnProperty(c) && (a[c] = b[c]);
106            return a
107        }, getQueryStringVars: function () {
108            var a = window.location.search || "", b = [], c = {};
109            if (a = a.substr(1), a.length) {
110                b = a.split("&");
111                for (var d in b) {
112                    var e = b[d];
113                    if ("string" == typeof e) {
114                        var f = e.split("="), g = f[0], h = f[1];
115                        g.length && ("undefined" == typeof c[g] && (c[g] = []), c[g].push(h))
116                    }
117                }
118            }
119            return c
120        }, unEscape: function (a) {
121            return decodeURIComponent(a)
122        }, escape: function (a) {
123            return encodeURIComponent(a)
124        }, createDate: function (a, b) {
125            a || (a = 0);
126            var c = new Date, d = b ? c.getDate() - a : c.getDate() + a;
127            return c.setDate(d), c
128        }, arrayUnique: function (a) {
129            for (var b = a.concat(), c = 0; c < b.length; ++c)for (var d = c + 1; d < b.length; ++d)b[c] === b[d] && b.splice(d, 1);
130            return b
131        }, objectCombineUnique: function (a) {
132            for (var b = a[0], c = 1; c < a.length; c++) {
133                var d = a[c];
134                for (var e in d)b[e] = d[e]
135            }
136            return b
137        }
138    }, h = function (a, b) {
139        var c = function (a, b, d) {
140            return 1 === arguments.length ? c.get(a) : c.set(a, b, d)
141        };
142        return c.get = function (b, d) {
143            return a.cookie !== c._cacheString && c._populateCache(), void 0 == c._cache[b] ? d : c._cache[b]
144        }, c.defaults = {path: "/", secure: true, samesite: 'strict'}, c.set = function (d, e, f) {
145            switch (f = {
146                path: f && f.path || c.defaults.path,
147                domain: f && f.domain || c.defaults.domain,
148                expires: f && f.expires || c.defaults.expires,
149                secure: f && f.secure !== b ? f.secure : c.defaults.secure,
150                samesite: f && f.samesite || c.defaults.samesite,
151            }, e === b && (f.expires = -1), typeof f.expires) {
152                case"number":
153                    f.expires = new Date((new Date).getTime() + 1e3 * f.expires);
154                    break;
155                case"string":
156                    f.expires = new Date(f.expires)
157            }
158            return d = encodeURIComponent(d) + "=" + (e + "").replace(/[^!#-+\--:<-\[\]-~]/g, encodeURIComponent), d += f.path ? ";path=" + f.path : "", d += f.domain ? ";domain=" + f.domain : "", d += f.expires ? ";expires=" + f.expires.toGMTString() : "", d += f.secure ? ";secure" : "", d += f.samesite ? (";samesite="+f.samesite) : '', a.cookie = d, c
159        }, c.expire = function (a, d) {
160            return c.set(a, b, d)
161        }, c._populateCache = function () {
162            c._cache = {};
163            try {
164                c._cacheString = a.cookie;
165                for (var d = c._cacheString.split("; "), e = 0; e < d.length; e++) {
166                    var f = d[e].indexOf("="), g = decodeURIComponent(d[e].substr(0, f)), f = decodeURIComponent(d[e].substr(f + 1));
167                    c._cache[g] === b && (c._cache[g] = f)
168                }
169            } catch (a) {
170                console.log(a)
171            }
172        }, c.enabled = function () {
173            var a = "1" === c.set("cookies.js", "1").get("cookies.js");
174            return c.expire("cookies.js"), a;
175        }(), c
176    }(document);
177
178    mailchimp = {storage: h, utils: g};
179    mailchimp_cart = new mailchimpCart;
180}();
181
182mailchimpReady(function () {
183
184    // if they've told us we can't do this - we have to honor it.
185    if (!mailchimp_public_data.allowed_to_set_cookies) return;
186
187    if (void 0 === a) {
188        var a = { site_url: document.location.origin, defaulted: !0, ajax_url: document.location.origin + "/wp-admin?admin-ajax.php" };
189    }
190
191    try {
192        var b = mailchimp.utils.getQueryStringVars();
193        void 0 !== b.mc_cart_id && mailchimpGetCurrentUserByHash(b.mc_cart_id);
194
195        mailchimp_username_email = document.querySelector("#username");
196        mailchimp_billing_email = document.querySelector("#billing_email");
197        mailchimp_registration_email = document.querySelector("#reg_email");
198
199        if (mailchimp_billing_email) {
200            mailchimp_billing_email.onblur = function () { mailchimpHandleBillingEmail('#billing_email'); };
201            mailchimp_billing_email.onfocus = function () { mailchimpHandleBillingEmail('#billing_email'); }
202        }
203
204        if (mailchimp_username_email) {
205            mailchimp_username_email.onblur = function () { mailchimpHandleBillingEmail('#username'); };
206            mailchimp_username_email.onfocus = function () { mailchimpHandleBillingEmail('#username'); }
207        }
208
209        if (mailchimp_registration_email) {
210            mailchimp_registration_email.onblur = function () { mailchimpHandleBillingEmail('#reg_email'); };
211            mailchimp_registration_email.onfocus = function () { mailchimpHandleBillingEmail('#reg_email'); }
212        }
213
214    } catch (e) {
215        console.log('mailchimp ready error', e);
216    }
217});

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.