PageSourceSearch

https://savilerowco.com/cdn/shop/t/377/assets/component-GeoIp.min.js?v=60796935153069239011790073366

js savilerowco.com collected 2026-09-25 20:30:49 UTC 8,222 bytes, 7 lines download raw bytes

1var p=Object.defineProperty;var c=(s,o)=>p(s,"name",{value:o,configurable:!0});import{ThemeComponent as a}from"./theme.min.js";import{axios as l}from"./vendor.min.js";class r extends a{constructor(){super(...arguments),this.euCountries=["AT","BE","BG","HR","CY","CZ","DK","EE","FI","FR","DE","GR","HU","IE","IT","LV","LT","LU","MT","NL","PL","PT","RO","SK","SI","ES","SE"],this.availableAlternativeCountries=["GB","US","EU","GLOBAL",...this.euCountries]}async init(){if(this.openPopUp(),this.updateStoreUrl(),sessionStorage.getItem("preventGeoIpDisplay")||this.isGeoIpRedirect())return;const t=await this.getLocationData();if(t===null){this.$log.error("Error whilst getting location data");return}this.updateContentVisibility(t),this.continueButton.forEach(e=>{this.$listen(e,"click",()=>{sessionStorage.setItem("preventGeoIpDisplay","true")})}),this.confirmSelection.forEach(e=>{this.$listen(e,"click",i=>{i.preventDefault();const n=i.target.getAttribute("data-url");sessionStorage.setItem("preventGeoIpDisplay","true"),setTimeout(()=>{n?window.location.href=n:this.$log.error("URL is null")},500)})})}async getLocationData(){const o=window.localStorage.getItem("_geoservice_ip"),t=await l.get("https://geo.eastsideapps.io/api/v1/info",{params:{ip:o||void 0}});return t.status===200?t.data.result:null}isGeoIpRedirect(){const o=window.location.href,t=new URL(o),e=new URLSearchParams(t.search);return e.has("geoip")&&e.get("geoip")==="has-redirect"}updateContentVisibility(o){let t=o.country.iso_code;if(this.euCountries.includes(t)&&(t="EU"),this.availableAlternativeCountries.includes(t)||(t="GLOBAL"),t===this.currentCountry||!this.availableAlternativeCountries.includes(t)){sessionStorage.setItem("preventGeoIpDisplay","true");return}this.listenForHidePopupEvents();for(const e of this.contentBlock)e.getAttribute("data-country-code")===t&&e.classList.add("geo-ip__content-block--active");this.classList.add("geo-ip--active"),document.documentElement.classList.add("prevent-scroll"),document.body.classList.add("prevent-scroll")}listenForHidePopupEvents(){for(const o of this.closeButton)this.$listen(o,"click",()=>{this.closePopup()})}openPopUp(){const o=document.querySelectorAll("[data-geoip-open]");for(const t of o)this.$listen(t,"click",()=>{for(const e of this.contentBlock)e.classList.remove("geo-ip__content-block--active"),e.getAttribute("data-country-code")==="null"&&e.classList.add("geo-ip__content-block--active");this.classList.add("geo-ip--active");for(const e of this.closeButton)this.$listen(e,"click",()=>{this.closePopup(!1)});this.$listen(this,"click",e=>{e.target&&this.classList.contains("geo-ip--active")&&e.target===this&&this.closePopup(!1)}),document.dispatchEvent(new Event("closeMenu")),document.dispatchEvent(new Event("hamburgerClose")),document.body.classList.contains("search-open")&&document.dispatchEvent(new Event("searchClose"))})}updateStoreUrl(){for(const o of this.storeSwitch)this.$listen(o,"change",()=>{const t=o.value,e=this.querySelector('.geo-ip__content-block--active [data-ref="continueButton"]');e&&t!=="Please select a country"&&e.setAttribute("href",t)})}closePopup(o=!0){o&&sessionStorage.setItem("preventGeoIpDisplay","true"),this.classList.remove("geo-ip--active"),document.documentElement.classList.remove("prevent-scroll"),document.body.classList.remove("prevent-scroll")}}c(r,"GeoIp");const u={String};r.prototype.$name="GeoIp";r.prototype.$info=JSON.parse('{"name":"GeoIp","meta":{"isLegacy":false,"selector":"geo-ip"},"props":[{"attr":"current-country","reflectAttr":false,"propertyKey":"currentCountry","propertyType":"String","propertyTypeName":"String","propertyTsTypeName":"string"}],"refs":[{"selector":"[data-ref=\\"closeButton\\"]","required":true,"propertyKey":"closeButton","propertyType":"Array","propertyTypeName":"Array","propertyTsTypeName":"HTMLElement[]"},{"selector":"[data-ref=\\"contentBlock\\"]","required":false,"propertyKey":"contentBlock","propertyType":"Array","propertyTypeName":"Array","propertyTsTypeName":"HTMLElement[]"},{"selector":"[data-ref=\\"storeSwitch\\"]","required":true,"propertyKey":"storeSwitch","propertyType":"Array","propertyTypeName":"Array","propertyTsTypeName":"HTMLSelectElement[]"},{"selector":"[data-ref=\\"continueButton\\"]","required":true,"propertyKey":"continueButton","propertyType":"Array","propertyTypeName":"Array","propertyTsTypeName":"HTMLElement[]"},{"selector":"[data-ref=\\"confirmSelection\\"]","required":true,"propertyKey":"confirmSelection","propertyType":"Array","propertyTypeName":"Array","propertyTsTypeName":"HTMLButtonElement[]"}]}');r.prototype.$info.component=r;for(const s of r.prototype.$info.props)s.propertyType=u[s.propertyType];window.componentService.registerComponent("GeoIp/GeoIp.ts",{GeoIp:r},void 0);
2
3;(() => {
4    const style = document.createElement('style');
5    style.innerHTML = "/* component-GeoIp.css */\n.geo-ip{position:fixed;z-index:var(--z-top);top:0;left:0;width:100%;height:100%;background:rgba(0,0,0,.5);padding:30px;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;opacity:0;visibility:hidden;pointer-events:none;-webkit-transition:var(--transition-default);-moz-transition:var(--transition-default);-ms-transition:var(--transition-default);-o-transition:var(--transition-default);transition:var(--transition-default)}.geo-ip--active{opacity:1;visibility:visible;pointer-events:unset}.geo-ip__inner{background-color:var(--color-background);padding:60px 35px 45px;width:100%;max-width:535px;display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;position:relative}.geo-ip__close{position:absolute;top:30px;right:30px;width:24px;height:24px;
5cursor:pointer;padding:0;border:none;border-radius:50%;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.geo-ip__close svg{margin-left:0;width:14px;height:14px}.geo-ip__flag{width:4.6875rem;height:3.125rem;margin-bottom:2rem}.geo-ip__content-block{width:100%;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;-webkit-box-align:center;-ms-flex-align:center;align-items:center;text-align:center;display:none}.geo-ip__content-block--active{display:-webkit-box;display:-ms-flexbox;display:flex}.geo-ip__content-block .button{font-size:14px}.geo-ip__content-block__heading{font-size:16px;line-height:24px;font-weight:var(--weight-bold);display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;margin-bottom:25px}.geo-ip__content-block__heading svg{width:28px;height:auto;margin-left:10px}.geo-ip__content-block__text{font-size:16px;line-height:28px;margin-bottom:25px;margin-top:40px}.geo-ip__content-block__buttons{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;width:350px;max-width:100%}.geo-ip__content-block__buttons select{margin-bottom:12px;border:1px solid var(--color-border);padding:1rem}.geo-ip__content-block__buttons .button{-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center}.geo-ip__content-block__buttons .button:not(:last-child){margin-right:20px}#shopify-section-geo-ip{margin:0}@media (max-width: 1023px){.geo-ip__inner{padding:30px 35px;max-width:320px}.geo-ip__close{top:18px;right:18px}.geo-ip__content-block__heading{margin-bottom:15px}.geo-ip__content-block__text{font-size:14px;line-height:28px;margin-bottom:20px}.geo-ip__content-block__buttons{-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column}.geo-ip__content-block__buttons .button{width:100%}.geo-ip__content-block__buttons .button:not(:last-child){margin-right:0;margin-bottom:15px}}\n";
6    document.body.appendChild(style);
7})();

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.