function _typeof(e){return(_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function _createForOfIteratorHelper(e,t){var n,r,o,a,i="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(i)return o=!(r=!0),{s:function(){i=i.call(e)},n:function(){var e=i.next();return r=e.done,e},e:function(e){o=!0,n=e},f:function(){try{r||null==i.return||i.return()}finally{if(o)throw n}}};if(Array.isArray(e)||(i=_unsupportedIterableToArray(e))||t&&e&&"number"==typeof e.length)return i&&(e=i),a=0,{s:t=function(){},n:function(){return a>=e.length?{done:!0}:{done:!1,value:e[a++]}},e:function(e){throw e},f:t};throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _toConsumableArray(e){return _arrayWithoutHoles(e)||_iterableToArray(e)||_unsupportedIterableToArray(e)||_nonIterableSpread()}function _nonIterableSpread(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _iterableToArray(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function _arrayWithoutHoles(e){if(Array.isArray(e))return _arrayLikeToArray(e)}function _regenerator(){var m,e="function"==typeof Symbol?Symbol:{},t=e.iterator||"@@iterator",n=e.toStringTag||"@@toStringTag";function r(e,t,n,r){var o,a,i,c,u,s,l,f,d,t=t&&t.prototype instanceof y?t:y,t=Object.create(t.prototype);return _regeneratorDefine2(t,"_invoke",(o=e,a=n,l=r||[],f=!1,d={p:s=0,n:0,v:m,a:v,f:v.bind(m,4),d:function(e,t){return i=e,c=0,u=m,d.n=t,p}},function(e,t,n){if(1t||ae.length)&&(t=e.length);for(var n=0,r=Array(t);n{function M(e,t){var n={};for(o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var r=0,o=Object.getOwnPropertySymbols(e);r{var e=null!=(e=null==(e=window.vtexafenv)?void 0:e.account)?e:null!=(e=null==(e=null==document?void 0:document.currentScript)?void 0:e.getAttribute("an"))?e:null==(e=null==document?void 0:document.currentScript)?void 0:e.getAttribute("data-an");return K=e?e:K})();return e?{accountName:t,accountEnvironment:e}:null!=(e=window.__RUNTIME__)&&e.account?{accountName:t,accountEnvironment:"store_framework"}:window.jsnomeLoja?{accountName:t,accountEnvironment:"portal"}:{accountName:t,accountEnvironment:window.__NEXT_DATA__||window.___gatsby?"fast_store":void 0}}var K="";function Y(){var e,t;return null!=(e=null==(e=window.vtex)?void 0:e.checkout)&&e.version?(t=(e=window.vtex.checkout.version).startsWith("v")?"checkout_".concat(e.slice(0,2)):"checkout",{version:e,type:t}):null!=(e=window.__FASTCHECKOUT__)&&e.version?{version:window.__FASTCHECKOUT__.version,type:"fastcheckout"}:void 0}function l(){return window.location.href}function $(){return window.document.referrer}function z(){var e;return null!=(e=null!=(e=_slicedToArray(null!=(e=null==(e=n(F))?void 0:e.split(":"))?e:[],1)[0])?e:null==(e=new RegExp(/[?&]workspace=([^&]+)(&|$)/).exec(window.location.search))?void 0:e[1])?e:null==(e=null==window?void 0:window.__RUNTIME__)?void 0:e.workspace}function Q(){var n={},e=document.querySelectorAll('head meta[property^="product:"]');if(0!==e.length)return e.forEach(function(e){var t=e.getAttribute("property"),e=e.getAttribute("content");t&&e&&(n[t]=e)}),n}function a(o,e,t){var a=1a&&(clearInterval(n),t(null))},i)}))}},e)}))}var e="https://af-origin.vtex.com/api/activity-flow",Z="Event",ee=!1,te=1e4,ne={pageView:"".concat(e,"/page-views"),ads:"".concat(e,"/ads"),webVitals:"".concat(e,"/web-vitals"),click:"".concat(e,"/click"),impression:"".concat(e,"/impression"),dataLayer:"".concat(e,"/data-layer"),view:"".concat(e,"/view")};function re(e,t){var n,r;navigator.sendBeacon?navigator.sendBeacon(t,e):(n=t,r=e,new Promise(function(e){var t=new XMLHttpRequest;t.timeout=te,t.open("POST",n,!0),t.setRequestHeader("Content-Type","application/json"),t.send(r),t.onload=function(){if(200===t.status||202===t.status)return G(),e(r)}}))}function oe(e){var t={SessionId:(t=X()).sessionID,MacId:t.macID,IsNewUser:t.isNewUser,Url:t.url,Ref:t.ref,accountName:t.accountName,accountEnvironment:t.accountEnvironment,clientdate:(new Date).getTime(),isFirstEvent:t.isNewSessionID,workspace:t.workspace,ckInfo:t.ckInfo,checkout:t.checkout},n=t.IsNewUser,r=t.isFirstEvent,t=M(t,["IsNewUser","isFirstEvent"]),t=Object.assign(Object.assign(Object.assign({},e),{DataType:Z}),t);return"pageView"===e.eventType?Object.assign(Object.assign({},t),{IsNewUser:n,isFirstEvent:r}):t}function ae(e,t){var n,t=1{var n=e;(n=ue[n])&&clearTimeout(n);var r=setTimeout(function(){"IN_VIEW"===d(e)&&t()},ie);ue[e]=r})(t,function(){f(t,"VIEWED"),r.disconnect(),n.dispatchEvent(new Event("view"))}));break;case"IN_VIEW":o.isIntersecting||f(t,"NOT_VIEWED");break;case"VIEWED":r.disconnect()}})},{threshold:.5,rootMargin:"0px"})).observe(a)}function f(e,t){ce[e]=t}function d(e){return null!=(e=ce[e])?e:"NOT_VIEWED"}function i(e){return"".concat(e.adId,"-").concat(e.adRequestId)}function le(e){e=(e=>{for(var t={},n=Object.keys(u),r=0,o=n;r{try{var e=sessionStorage.getItem(t);return e?JSON.parse(e):null}catch(e){return sessionStorage.removeItem(t),null}})(r)))return e.a(2,o);e.n=1;break;case 1:return e.p=1,o=new URLSearchParams({application:ke,featureKey:u,flag:s}).toString(),i="".concat(xe,"?").concat(o),e.n=2,fetch(i,{method:"GET",headers:{"Content-Type":"application/json"}});case 2:if((a=e.v).ok){e.n=3;break}return b({context:"feature_flags",message:"Failed to fetch feature flags (status: ".concat(a.status," ").concat(a.statusText,")"),useDefaultRate:!0}),e.a(2,null);case 3:return e.n=4,a.json();case 4:i=e.v,c=i.data,n=t=void 0;t=r,n=c;try{sessionStorage.setItem(t,JSON.stringify(n))}catch(e){We({context:"featureFlags",message:"Failed to cache feature flag",error:e,useDefaultRate:!0})}return e.a(2,c);case 5:return e.p=5,b({context:"feature_flags",message:"Error fetching feature flags",error:e.v,useDefaultRate:!0}),e.a(2,null)}var t,n},e,null,[[1,5]])}))}function Le(e){var t=(()=>{if("undefined"!=typeof window)return window.crypto||window.msCrypto;try{return require("crypto").webcrypto}catch(e){}})();return(null!=t&&t.getRandomValues?_toConsumableArray(t.getRandomValues(new Uint8Array(e))).map(function(e){return e.toString(16).padStart(2,"0")}):Array.from({length:2*e},function(){return(16*Math.random()|0).toString(16)})).join("")}var Ce="activity_flow_web_script",De="https://stable.vtexobservability.com",h=.01,w=null,Re=null;function Me(r){return c(this,void 0,void 0,_regenerator().m(function e(){var t,n;return _regenerator().w(function(e){for(;;)switch(e.n){case 0:r?(n=h,e.n=3):e.n=1;break;case 1:return e.n=2,function(){return c(this,void 0,void 0,_regenerator().m(function e(){var t;return _regenerator().w(function(e){for(;;)switch(e.n){case 0:if(null!==w)return e.a(2,w);e.n=1;break;case 1:return e.n=2,Ne("telemetry_log_rate",window.location.hostname);case 2:return t=e.v,w=t=(t="number"==typeof t?t:h)<0||1t.length&&We({context:"event.impression",message:"Found element with the data-af-impression attribute but without the data-af-element attribute"}),0!==t.length)&&t.forEach(function(e){var t=g(e),n=Object.entries(t).map(function(e){var e=_slicedToArray(e,2),t=e[0],e=e[1];return"".concat(t,"=").concat(e)}).join(",");Ue.get(e)!==n&&(Ue.set(e,n),o({eventType:"impression",element:e.tagName.toLowerCase(),impressionType:r,attributes:t,elementSource:e.getAttribute(p)}))})}function Be(){if(document.body){var e=l();if(He!==e)return He=e,r&&r.disconnect(),qe("first_render"),(e=new MutationObserver(function(e){var t,n,r,o=_createForOfIteratorHelper(e);try{for(o.s();!(r=o.n()).done;){var a=r.value;"childList"===a.type?a.addedNodes.forEach(function(e){e instanceof HTMLElement&&qe("rerender",null!=(e=e.parentElement)?e:document.body)}):"attributes"===a.type&&null!=(t=a.attributeName)&&t.startsWith(m)&&qe("rerender",null!=(n=a.target.parentElement)?n:document.body)}}catch(e){o.e(e)}finally{o.f()}})).observe(document.body,{childList:!0,subtree:!0,attributes:!0}),r=e}else Se(Be)}function Ge(){t(Be)}function Je(e){return null!=e&&"object"===_typeof(e)}var Xe=1e4,Ke={childList:!0,subtree:!0,attributes:!0},Ye="",_=null,$e=!0,ze=void 0;function Qe(e){var t=!0;try{t=!function e(t,n){if(void 0===t&&void 0===n)return 1;if(!(void 0===t&&void 0!==n||void 0!==t&&void 0===n)){var r=Object.keys(t),o=Object.keys(n);if(r.length===o.length){for(var a=0,i=r;an.value&&(n.value=r,n.entries=o,t())}var t,n=A("CLS",0),r=0,o=[],a=S("layout-shift",e);a&&(t=O(i,n,At,c.reportAllChanges),x(function(){e(a.takeRecords()),t(!0)}),E(function(){n=A("CLS",r=0),t=O(i,n,At,c.reportAllChanges),gt(function(){return t()})}),setTimeout(t,0))}))}function dt(a,i){"PerformanceEventTiming"in self&&"interactionId"in PerformanceEventTiming.prototype&&(i=i||{},N(function(){var e;jt();function t(t){Rt(function(){t.forEach(Dt);var e=Lt();e&&e.latency!==n.value&&(n.value=e.latency,n.entries=e.entries,o())})}var n=A("INP"),r=S("event",t,{durationThreshold:null!=(e=i.durationThreshold)?e:40}),o=O(a,n,Mt,i.reportAllChanges);r&&(r.observe({type:"first-input",buffered:!0}),x(function(){t(r.takeRecords()),o(!0)}),E(function(){Nt=kt(),C.length=0,D.clear(),n=A("INP"),o=O(a,n,Mt,i.reportAllChanges)}))}))}function vt(i,c){c=c||{},N(function(){function e(e){(e=c.reportAllChanges?e:e.slice(-1)).forEach(function(e){e.startTimer[1]?"poor":e>r[0]?"needs-improvement":"good",t(n))}},gt=function(e){requestAnimationFrame(function(){return requestAnimationFrame(function(){return e()})})},x=function(e){document.addEventListener("visibilitychange",function(){"hidden"===document.visibilityState&&e()})},ht=function(e){var t=!1;return function(){t||(e(),t=!0)}},k=-1,wt=function(){return"hidden"!==document.visibilityState||document.prerendering?1/0:0},j=function(e){"hidden"===document.visibilityState&&-1n.latency)&&(e?t.duration>e.latency?(e.entries=[t],e.latency=t.duration):t.duration===e.latency&&t.startTime===e.entries[0].startTime&&e.entries.push(t):(n={id:t.interactionId,latency:t.duration,entries:[t]},D.set(n.id,n),C.push(n)),C.sort(function(e,t){return t.latency-e.latency}),10