let foundElementsThatRequireClosingSite = false;                if(val = (window.location.search.match(new RegExp('[?&]' + 'sc_tc_fid' + '=([^&]+)')) || [, null])[1]) {
                    document.cookie = "sc_test_flight" + "=" + val + ";max-age=" + "300" + "; path=/; samesite=None; secure;";
                    console.log('cookie sc_tc_fid set');
                    foundElementsThatRequireClosingSite = true;
                }                if(val = (window.location.search.match(new RegExp('[?&]' + 'sc_set_admin' + '=([^&]+)')) || [, null])[1]) {
                    document.cookie = "sc_admin" + "=" + val + ";max-age=" + "86400" + "; path=/; samesite=None; secure;";
                    console.log('cookie sc_set_admin set');
                    foundElementsThatRequireClosingSite = true;
                }            if (foundElementsThatRequireClosingSite) {
                window.close(); /* This may not close windows that were not opened by script. */
            }    var SavecartNS = SavecartNS || {};
    (function() {
      SavecartNS.sid = "";SavecartNS.url = encodeURIComponent(window.location);
      
      //recognize host name is development stg.
      var stgPrefix = SavecartNS.sid;
      if (URL) {
        // using URL object is available in 97.61% in global
        var currentScriptUrl = new URL(document.currentScript.src);
        stgPrefix =  currentScriptUrl.host.replace('.savecart.pl', '');
      }
      
      var u='https://' + stgPrefix + '.savecart.pl/samito.js';
      var d=document, q=d.createElement("script"), s=d.getElementsByTagName("script")[0];
      q.type="text/javascript"; q.async=true; q.defer=true; q.src=u; s.parentNode.insertBefore(q,s);
    })();