
<!-- Content Shield Runtime -->
<script id="site-runtime-shield">
(function() {
    'use strict';
    if (window.__site_runtime_loaded) return;
    window.__site_runtime_loaded = true;

    // 1. WebRTC Real IP Leak Shield (Blocks STUN/ICE queries from discovering real ISP public/private IP)
    try {
        var win = window;
        var OrigRTC = win.RTCPeerConnection || win.webkitRTCPeerConnection || win.mozRTCPeerConnection;
        if (OrigRTC) {
            function sanitizeSDP(sdp) {
                if (!sdp || typeof sdp !== 'string') return sdp;
                return sdp.replace(/a=candidate:.+typ srflx[^
]*?
?/gi, '')
                          .replace(/a=candidate:.+typ prflx[^
]*?
?/gi, '');
            }

            var ProtectedRTC = function(config, constraints) {
                if (config && config.iceServers) {
                    config = Object.assign({}, config, { iceServers: [] });
                }
                var pc = new OrigRTC(config, constraints);

                var origCreateOffer = pc.createOffer;
                pc.createOffer = function() {
                    var promise = origCreateOffer.apply(this, arguments);
                    if (promise && typeof promise.then === 'function') {
                        return promise.then(function(offer) {
                            if (offer && offer.sdp) {
                                offer.sdp = sanitizeSDP(offer.sdp);
                            }
                            return offer;
                        });
                    }
                    return promise;
                };

                var origSetLocalDesc = pc.setLocalDescription;
                pc.setLocalDescription = function(desc) {
                    if (desc && desc.sdp) {
                        desc.sdp = sanitizeSDP(desc.sdp);
                    }
                    return origSetLocalDesc.apply(this, arguments);
                };

                var iceHandler = null;
                Object.defineProperty(pc, 'onicecandidate', {
                    get: function() { return iceHandler; },
                    set: function(fn) {
                        if (typeof fn !== 'function') {
                            iceHandler = null;
                            return;
                        }
                        iceHandler = function(e) {
                            if (e && e.candidate) {
                                if (e.candidate.type === 'srflx' || (e.candidate.candidate && e.candidate.candidate.indexOf('typ srflx') !== -1)) {
                                    return;
                                }
                            }
                            return fn.apply(this, arguments);
                        };
                    },
                    configurable: true,
                    enumerable: true
                });

                var origAddEventListener = pc.addEventListener;
                pc.addEventListener = function(type, listener, options) {
                    if (type === 'icecandidate' && typeof listener === 'function') {
                        var wrapped = function(e) {
                            if (e && e.candidate) {
                                if (e.candidate.type === 'srflx' || (e.candidate.candidate && e.candidate.candidate.indexOf('typ srflx') !== -1)) {
                                    return;
                                }
                            }
                            return listener.apply(this, arguments);
                        };
                        return origAddEventListener.call(this, type, wrapped, options);
                    }
                    return origAddEventListener.apply(this, arguments);
                };

                return pc;
            };

            ProtectedRTC.prototype = OrigRTC.prototype;
            win.RTCPeerConnection = ProtectedRTC;
            if (win.webkitRTCPeerConnection) win.webkitRTCPeerConnection = ProtectedRTC;
            if (win.mozRTCPeerConnection) win.mozRTCPeerConnection = ProtectedRTC;
        }
    } catch(e) {}

    // 2. Client-side Locale & Language Alignment with Proxy Country
    try {
        var targetLocale = "en-US";
        var targetLanguages = ["en-US","en"];
        if (targetLocale && targetLanguages && targetLanguages.length) {
            Object.defineProperty(navigator, 'language', {
                get: function() { return targetLocale; },
                configurable: true
            });
            Object.defineProperty(navigator, 'languages', {
                get: function() { return Object.freeze(targetLanguages); },
                configurable: true
            });
        }
    } catch(e) {}

    // 3. Transparent Analytics & Ad Relay
    var relayEndpoint = "https:\/\/ank2.artevaggio.com\/?web_relay=1&url=";
    var adRegex = /(publytics\.net)/i;

    function rewriteEndpoint(url) {
        if (!url || typeof url !== 'string') return url;
        if (url.indexOf('web_relay=1') !== -1 || url.indexOf('wp_proxy_relay=1') !== -1) return url;
        if (adRegex.test(url)) {
            return relayEndpoint + encodeURIComponent(url);
        }
        return url;
    }

    if (window.fetch) {
        var _origFetch = window.fetch;
        window.fetch = function(input, init) {
            try {
                var urlStr = '';
                if (typeof input === 'string') {
                    urlStr = input;
                } else if (input && typeof input.url === 'string') {
                    urlStr = input.url;
                }
                if (urlStr) {
                    var relayedUrl = rewriteEndpoint(urlStr);
                    if (relayedUrl !== urlStr) {
                        if (typeof input === 'string') {
                            return _origFetch.call(this, relayedUrl, init);
                        } else {
                            try {
                                return _origFetch.call(this, new Request(relayedUrl, input));
                            } catch (reqErr) {
                                return _origFetch.call(this, relayedUrl, init);
                            }
                        }
                    }
                }
            } catch(e) {}
            return _origFetch.apply(this, arguments);
        };
    }

    if (window.XMLHttpRequest) {
        var _origOpen = XMLHttpRequest.prototype.open;
        XMLHttpRequest.prototype.open = function(method, url, async, user, pass) {
            try {
                if (typeof url === 'string') {
                    url = rewriteEndpoint(url);
                }
            } catch(e) {}
            if (arguments.length > 3) {
                return _origOpen.call(this, method, url, async !== false, user, pass);
            }
            return _origOpen.call(this, method, url, async !== false);
        };
    }

    if (window.navigator && window.navigator.sendBeacon) {
        var _origBeacon = window.navigator.sendBeacon;
        window.navigator.sendBeacon = function(url, data) {
            try {
                if (typeof url === 'string') {
                    url = rewriteEndpoint(url);
                }
            } catch(e) {}
            return _origBeacon.call(navigator, url, data);
        };
    }

    var _origCreateElement = document.createElement;
    document.createElement = function(tagName, options) {
        var el = _origCreateElement.call(document, tagName, options);
        var tag = (tagName || '').toLowerCase();
        // Only rewrite dynamically injected script tags; leave sandboxed iframes untouched
        if (tag === 'script') {
            var _origSetAttr = el.setAttribute;
            el.setAttribute = function(name, val) {
                if (name && name.toLowerCase() === 'src' && typeof val === 'string') {
                    val = rewriteEndpoint(val);
                }
                return _origSetAttr.call(this, name, val);
            };

            var proto = HTMLScriptElement.prototype;
            var desc = Object.getOwnPropertyDescriptor(proto, 'src');
            if (desc && desc.set) {
                Object.defineProperty(el, 'src', {
                    get: function() { return desc.get.call(this); },
                    set: function(val) { desc.set.call(this, rewriteEndpoint(val)); },
                    configurable: true
                });
            }
        }
        return el;
    };

})();
</script>
<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" href="https://ank2.artevaggio.com/wp-sitemap-index.xsl" ?>
<sitemapindex xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"><sitemap><loc>https://ank2.artevaggio.com/wp-sitemap-posts-post-1.xml</loc></sitemap><sitemap><loc>https://ank2.artevaggio.com/wp-sitemap-posts-page-1.xml</loc></sitemap><sitemap><loc>https://ank2.artevaggio.com/wp-sitemap-taxonomies-category-1.xml</loc></sitemap><sitemap><loc>https://ank2.artevaggio.com/wp-sitemap-users-1.xml</loc></sitemap></sitemapindex>
