1(function(){var VERSION="pandectes-region-controller-2026-09-10-final",STRICT_REGION_PREFIXES=["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","NO","IS","LI","CH","GB","AU","US-CA","US-CO","US-CT","US-DE","US-FL","US-IN","US-IA","US-KY","US-MN","US-MT","US-NE","US-NH","US-NJ","US-OR","US-RI","US-TN","US-TX","US-UT","US-VA"],REOPEN_SELECTOR=['a[href="#reopenBanner"]','a[href*="#reopenBanner"]','[data-pandectes-reopen="preferences"]',"[data-pandectes-reopen]"].join(","),strictNoticeOpened=!1,initialized=!1,preferencesOpenedByUser=!1,nonLawGuardInterval=null;function log(){try{console.log.apply(console,["[Pandectes Region Controller]"].concat([].slice.call(arguments)))}catch(e){}}function getPandectes(){return window.Pandectes&&typeof window.Pandectes.openDialog=="function"?window.Pandectes:null}function getRegion(){try{if(window.Shopify&&Shopify.customerPrivacy&&typeof Shopify.customerPrivacy.getRegion=="function"){var raw=String(Shopify.customerPrivacy.getRegion()||"").toUpperCase();return/^US[A-Z]{2}$/.test(raw)?"US-"+raw.slice(2):raw}}catch(e){}return""}function isStrictRegion(region){if(!region)return!1;for(var i=0;i<STRICT_REGION_PREFIXES.length;i++)if(region.indexOf(STRICT_REGION_PREFIXES[i])===0)return!0;return!1}function isRegionReady(region){return!(!region||region==="US")}function currentConsent(){var api=getPandectes();if(!api||typeof api.currentVisitorConsent!="function")return null;try{return api.currentVisitorConsent()}catch(e){return null}}function readStoredConsent(){var raw=null;try{for(var cookies=document.cookie.split("; "),i=0;i<cookies.length;i++)if(cookies[i].indexOf("_pandectes_gdpr=")===0){raw=cookies[i].slice(16);break}if(raw||(raw=window.localStorage.getItem("_pandectes_gdpr")),!raw)return null;var data=JSON.parse(window.atob(raw));return data&&data.preferences!=null?data:null}catch(e){return null}}function hasVisitorMadeChoice(){if(readStoredConsent())return!0;var consent=currentConsent();if(!consent)return!1;function answered(value){return value===!0||value===!1||value==="yes"||value==="no"}return answered(consent.preferences)||answered(consent.analytics)||answered(consent.marketing)}function revealCmp(){var style=document.getElementById("pandectes-cmp-prehide");style&&style.remove()}function openPreferences(){preferencesOpenedByUser=!0;var api=getPandectes();return api?(revealCmp(),api.openDialog("preferences"),setTimeout(hideWidgetEverywhere,0),setTimeout(hideWidgetEverywhere,200),!0):!1}function retryOpenPreferences(){preferencesOpenedByUser=!0;var attempts=0,interval=window.setInterval(function(){attempts++,(openPreferences()||attempts>=40)&&window.clearInterval(interval)},250)}function openNotice(){var api=getPandectes();return api?(revealCmp(),api.openDialog("notice"),setTimeout(hideWidgetEverywhere,0),setTimeout(hideWidgetEverywhere,200),!0):!1}function closeDialog(){var api=getPandectes();return!api||typeof api.closeDialog!="function"?!1:(api.closeDialog(),setTimeout(hideWidgetEverywhere,0),!0)}function ensureDocumentStyle(){if(!document.getElementById("pandectes-region-controller-style")){var style=document.createElement("style");style.id="pandectes-region-controller-style",style.textContent=['[data-pandectes-region-hidden="true"] {'," display: none !important;"," visibility: hidden !important;"," opacity: 0 !important;"," pointer-events: none !important;","}"].join("\n"),document.head.appendChild(style)}}function markHidden(el){!el||el.nodeType!==1||(el.setAttribute("data-pandectes-region-hidden","true"),el.style.setProperty("display","none","important"),el.style.setProperty("visibility","hidden","important"),el.style.setProperty("opacity","0","important"),el.style.setProperty("pointer-events","none","important"))}function isLikelyStatusWidget(el){if(!el||el.nodeType!==1)return!1;var text=String(el.textContent||"").trim().toLowerCase(),aria=String(el.getAttribute("aria-label")||"").toLowerCase(),dataRole=String(el.getAttribute("data-role")||"").toLowerCase(),dataDialog=String(el.getAttribute("data-dialog")||"").toLowerCase(),part=String(el.getAttribute("part")||"").toLowerCase(),cls=String(el.className||"").toLowerCase(),rect;try{rect=el.getBoundingClientRect()}catch(e){rect=null}if(dataRole==="status"||dataDialog==="status"||part.indexOf("status")!==-1)return!0;var mentionsStatus=aria.indexOf("cookie")!==-1||aria.indexOf("privacy")!==-1||cls.indexOf("status")!==-1||cls.indexOf("floating")!==-1||cls.indexOf("reopen")!==-1||cls.indexOf("widget")!==-1||text==="cookie"||text==="cookies"||text==="cookie settings",looksFloating=rect&&rect.width>0&&rect.height>0&&rect.width<=180&&rect.height<=180&&rect.left<220&&window.innerHeight-rect.bottom<220;return mentionsStatus&&looksFloating}function inspectRoot(root){if(!root||typeof root.querySelectorAll!="function")return 0;for(var count=0,all=root.querySelectorAll("*"),i=0;i<all.length;i++)isLikelyStatusWidget(all[i])&&(markHidden(all[i]),count++);return count}function hideWidgetEverywhere(){ensureDocumentStyle();for(var total=0,hosts=document.querySelectorAll("pandectes-cmp"),i=0;i<hosts.length;i++){var host=hosts[i];total+=inspectRoot(host),host.shadowRoot&&(total+=inspectRoot(host.shadowRoot))}return total}function applyRegionalBehavior(source){var api=getPandectes();if(!api)return!1;
1var region=getRegion(),ready=isRegionReady(region),strict=isStrictRegion(region),madeChoice=hasVisitorMadeChoice();return log("VERSION:",VERSION),log("Source:",source),log("Detected Shopify region:",region||"(empty)"),log("Region ready:",ready),log("Strict region:",strict),log("Visitor has made choice:",madeChoice),log("Preferences opened by user:",preferencesOpenedByUser),hideWidgetEverywhere(),preferencesOpenedByUser?(hideWidgetEverywhere(),!0):ready?(strict?(revealCmp(),!madeChoice&&!strictNoticeOpened&&(strictNoticeOpened=!0,openNotice())):region.indexOf("US-")===0?(closeDialog(),startNonLawGuard()):(revealCmp(),log("Non-US region not in list; leaving app default")),hideWidgetEverywhere(),!0):(log("Skip open/close until Shopify region is known"),!1)}function bindReopenLinks(){document.addEventListener("click",function(event){var trigger=null;try{trigger=event.target.closest(REOPEN_SELECTOR)}catch(e){trigger=null}if(trigger){event.preventDefault();var opened=openPreferences();if(opened){event.stopPropagation();return}retryOpenPreferences()}},!0),window.addEventListener("hashchange",function(){window.location.hash==="#reopenBanner"&&openPreferences()}),window.location.hash==="#reopenBanner"&&setTimeout(openPreferences,50)}function startNonLawGuard(){nonLawGuardInterval||(nonLawGuardInterval=window.setInterval(function(){preferencesOpenedByUser||(closeDialog(),hideWidgetEverywhere())},500))}function suppressLateNonLawNotice(attempt){if(!preferencesOpenedByUser){var region=getRegion();if(!isRegionReady(region)){(attempt||0)<5&&setTimeout(function(){suppressLateNonLawNotice((attempt||0)+1)},500);return}isStrictRegion(region)||region.indexOf("US-")===0&&(log("Closing late-shown notice in non-law US state:",region),closeDialog())}}function bindPandectesEvents(){document.addEventListener("PandectesInitialized",function(){applyRegionalBehavior("PandectesInitialized")}),document.addEventListener("PandectesDialogOpened",function(){hideWidgetEverywhere(),suppressLateNonLawNotice(0)}),document.addEventListener("PandectesDialogClosed",hideWidgetEverywhere),document.addEventListener("PandectesButtonClicked",hideWidgetEverywhere),document.addEventListener("PandectesConsentUpdate",hideWidgetEverywhere)}function startPolling(){var attempts=0,interval=window.setInterval(function(){if(attempts++,hideWidgetEverywhere(),getPandectes()&&applyRegionalBehavior("polling")){window.clearInterval(interval);return}attempts>=120&&(window.clearInterval(interval),revealCmp(),log("Region never resolved; leaving app default"))},250)}function init(){initialized||(initialized=!0,bindReopenLinks(),bindPandectesEvents(),hideWidgetEverywhere(),getPandectes()&&applyRegionalBehavior("immediate")||startPolling(),log("Loaded:",VERSION))}window.OOConsentRegionControllerVersion=VERSION,window.OOConsentRegionControllerTest=function(){return applyRegionalBehavior("manual-test")},window.OOConsentRegionHideWidget=function(){return hideWidgetEverywhere()},window.OOConsentRegionOpenPreferences=function(){return openPreferences()},window.OOConsentRegionOpenNotice=function(){return openNotice()},window.OOConsentRegionDebugVisiblePandectesElements=function(){for(var result=[],hosts=document.querySelectorAll("pandectes-cmp"),i=0;i<hosts.length;i++){var host=hosts[i],roots=[host];host.shadowRoot&&roots.push(host.shadowRoot);for(var r=0;r<roots.length;r++){var root=roots[r];if(root.querySelectorAll)for(var nodes=root.querySelectorAll("*"),j=0;j<nodes.length;j++){var el=nodes[j],rect=el.getBoundingClientRect();rect.width<=0&&rect.height<=0||result.push({tag:el.tagName.toLowerCase(),role:el.getAttribute("role"),dataRole:el.getAttribute("data-role"),dataDialog:el.getAttribute("data-dialog"),ariaLabel:el.getAttribute("aria-label"),part:el.getAttribute("part"),className:String(el.className||""),text:String(el.textContent||"").trim().slice(0,100),width:Math.round(rect.width),height:Math.round(rect.height),left:Math.round(rect.left),top:Math.round(rect.top)})}}}return result},init()})(); 2//# sourceMappingURL=/cdn/shop/t/136/assets/pandectes-region-controller.js.map?v=26889356808083557071790268097
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.