(function() {
  if ('require' in window) {
    require("discourse/lib/theme-settings-store").registerSettings(9, {"theme_uploads":{"FONT_0B7969EB2585C3882":"https://doy2mn9upadnk.cloudfront.net/uploads/default/original/4X/9/1/a/91a9953eeaf4ed11a424ea57bd3c2dfaa686c948.woff2","FONT_43BD528447A758FAF":"https://doy2mn9upadnk.cloudfront.net/uploads/default/original/4X/b/4/5/b451a3a2ab0b04170804d6cf823c6465f33f6f44.woff2","FONT_A36B34AC3BD8532CD":"https://doy2mn9upadnk.cloudfront.net/uploads/default/original/4X/7/9/8/7985774d3676c27586c71bbf28b1f53598951a05.woff2","FONT_A4F20E8E1A16DF8A8":"https://doy2mn9upadnk.cloudfront.net/uploads/default/original/4X/8/c/2/8c21c748004366757a93c587668ab55cb6a4bdf0.woff2","FONT_AFDFD77D599BBB531":"https://doy2mn9upadnk.cloudfront.net/uploads/default/original/4X/f/5/1/f514a9e346cd443d196c1bc401f078a9fa147323.woff2"}});
  }
})();

    const TESTING_ENABLED = window.location.hostname.includes("localhost") || window.location.hostname.includes("alt");
    
    (function (id) {
        function append(scriptid, url, async) {
            var d = document, sn = 'script', f = d.getElementsByTagName(sn)[0];
            if (!f) f = d.head;
            var s = d.createElement(sn);
            s.async = async;
            s.id = scriptid;
            s.src = url;
            s.charset = 'utf-8';
            f.parentNode.insertBefore(s, f);
        }
    
        function is2parttld(value) {
            var tldindicators = ['co', 'com', 'info', 'web', 'info', 'gov', 'edu', 'biz', 'net', 'org'];
            var countryindicators = ['uk', 'us', 'fr', 'es', 'de', 'at', 'au', 'ae', 'be', 'br', 'ca', 'ch', 'cn', 'co', 'cz', 'dk', 'eg', 'eu', 'fi', 'gb', 'gr', 'hk', 'hr', 'hu', 'ie', 'in', 'jp', 'mx', 'nl', 'no', 'nz', 'pl', 'ro', 'ru', 'se'];
            return (tldindicators.indexOf(value) !== -1 || countryindicators.indexOf(value) !== -1);
        }
    
        function getRootDomain() {
            var parts = window.location.hostname.split('.');
            if (parts.length === 2) rootDomain = parts[0];
            else if (parts.length > 2) {
                // see if the next to last value is a common tld
                var part = parts[parts.length - 2];
                if (is2parttld(part)) {
                    rootDomain = parts[parts.length - 3]; // go back one more
                }
                else {
                    rootDomain = part;
                }
            }
    
            return TESTING_ENABLED ? "roblox" : rootDomain;
        }
        
        // Force a cookie to expire if it exists
        function setCookieToExpire(name) {
          if ($.cookie && $.cookie(name)) {
            document.cookie = name + '=; Path=/; Domain=' + window.location.hostname + '; Expires=Thu, 01 Jan 1900 00:00:01 GMT;';
          }
        }
        
        // Handle google analytics cookies
        handleGoogleAnalytics = function(opted_out) {
          const IDENTIFIER = "UA-486632-20";
    
          window['ga-disable-' + IDENTIFIER] = opted_out; // Enable or disable tracking
    
          // Hanlde opt-out logic
          if (opted_out === true) {
            // Expire existing ga cookies
            setCookieToExpire('_ga');
            setCookieToExpire('_gat');
            setCookieToExpire('_gid');
          }
          else {
            // Drop cookies using gtag
            const scriptElement = document.createElement('script');
            scriptElement.src = `https://www.googletagmanager.com/gtag/js?id=${IDENTIFIER}`;
            scriptElement.setAttribute('async', true)
            document.head.appendChild(scriptElement);
    
            window.dataLayer = window.dataLayer || [];
            function gtag(){dataLayer.push(arguments);}
    
            gtag('js', new Date());
            gtag('config', IDENTIFIER, {
               'cookie_domain': 'devforum.roblox.com'
            });
            gtag('event', 'page_view', { 'send_to': IDENTIFIER });
          }
        }
    
        window.evidon = {};
        window.evidon.id = id;
        window.evidon.test = false;  // set to true for non-production testing.
        //window.evidon.userid = '';
    
        var cdn = '//c.evidon.com/', rootDomain = getRootDomain(), noticecdn = cdn + 'sitenotice/';
        append('evidon-notice', noticecdn + 'evidon-sitenotice-tag.js', false);
        if (TESTING_ENABLED) {
          append('evidon-location', cdn + 'tag-fr/country.js', true);
        }
        else {
          append('evidon-location', cdn + 'geo/country.js', true);
        }
        append('evidon-themes', noticecdn + id + '/snthemes.js', true);
        if (rootDomain) append('evidon-settings', noticecdn + id + '/' + rootDomain + (window.evidon.test ? '/test' : '') + '/settings.js', true);
    
        window.evidon.priorConsentCallback = function (categories, vendors, cookies) {
            // add the tags which need to wait for prior consent
            // here.  This should be all your advertising tags and
            // probably most of your social and tracking tags.
            var handlers = {
                categories: {
                },
                vendors: {
                	'google-analytics': 'handleGoogleAnalytics',
                }
            };
    
            for (var category in categories) {
                if (!categories[category]) continue;
                var handler = window.evidon[handlers.categories[category]];
                if (typeof handler === 'function') handler();
            }
            for (var vendor in vendors) {
                if (!vendors[vendor]) continue;
                var handler = window.evidon[handlers.vendors[vendor]];
                if (typeof handler === 'function') handler();
            }
    
            // Google analytics
            if (vendors['google-analytics']  || vendors.all === true || cookies.all === true) {
          	   handleGoogleAnalytics(false);
            }
            else if (vendors['google-analytics'] === undefined || vendors['google-analytics'] === null)  {
              handleGoogleAnalytics(true); // Opt-out of GA cookies
            }
        }
    
        window.evidon.closeCallback = function () {
            // this is executed if the user closed a UI element without either Accepting (providing consent)
            // or Declining (declining to provide consent).
        }
    
        window.evidon.consentWithdrawnCallback = function () {
            // this is exeucted if the user withdraws consent and elects to
            // no longer allow technologies to run on the site.
            handleGoogleAnalytics(true);
            window.evidon.notice.dropSuppressionCookie(360);
        }
    
        window.evidon.consentDeclinedCallback = function () {
            // this is executed if the user explicitly declines giving consent by
            // using a Decline button
            handleGoogleAnalytics(true);
            window.evidon.notice.dropSuppressionCookie(360);
        }
    })(3822);
    
    if (TESTING_ENABLED) {
      setTimeout(function () {
        window.evidon.notice.setDomain('devforum.roblox.com');
      }, 2000);
    }

