function _createForOfIteratorHelper(e,n){var t,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,t=e},f:function(){try{r||null==i.return||i.return()}finally{if(o)throw t}}};if(Array.isArray(e)||(i=_unsupportedIterableToArray(e))||n&&e&&"number"==typeof e.length)return i&&(e=i),a=0,{s:n=function(){},n:function(){return a>=e.length?{done:!0}:{done:!1,value:e[a++]}},e:function(e){throw e},f:n};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 _slicedToArray(e,n){return _arrayWithHoles(e)||_iterableToArrayLimit(e,n)||_unsupportedIterableToArray(e,n)||_nonIterableRest()}function _nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _unsupportedIterableToArray(e,n){var t;if(e)return"string"==typeof e?_arrayLikeToArray(e,n):"Map"===(t="Object"===(t={}.toString.call(e).slice(8,-1))&&e.constructor?e.constructor.name:t)||"Set"===t?Array.from(e):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?_arrayLikeToArray(e,n):void 0}function _arrayLikeToArray(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=Array(n);tn||a{function i(e,n){var t={};for(o in e)Object.prototype.hasOwnProperty.call(e,o)&&n.indexOf(o)<0&&(t[o]=e[o]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var r=0,o=Object.getOwnPropertySymbols(e);r{try{var e=sessionStorage.getItem(n);return e?JSON.parse(e):null}catch(e){return sessionStorage.removeItem(n),null}})(r)))return e.a(2,o);e.n=1;break;case 1:return e.p=1,o=new URLSearchParams({application:R,featureKey:u,flag:s}).toString(),i="".concat(P,"?").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 console.error("Failed to fetch feature flags:",a.statusText),e.a(2,null);case 3:return e.n=4,a.json();case 4:i=e.v,c=i.data,t=n=void 0;n=r,t=c;try{sessionStorage.setItem(n,JSON.stringify(t))}catch(e){console.warn("Failed to cache feature flag:",e)}return e.a(2,c);case 5:return e.p=5,c=e.v,console.error("Error fetching feature flags:",c),e.a(2,null)}var n,t},e,null,[[1,5]])}))}var r="VtexRCSessionIdv7",U="VtexRCMacIdv7",W="VtexWorkspace",q=18e5,H=31536e6,B=2;function o(e){e=new RegExp("(^| )".concat(e,"=([^;]+)")),e=document.cookie.match(e);if(e)return decodeURI(e[B])}function G(e,n,t){var n=encodeURI(n),r=(r=window.location.hostname.replace("www.",""),2<(r=(o=r).split(".")).length&&"com"===r[r.length-1]&&(o=r.slice(-2).join(".")),3{var e=o(W);return _slicedToArray(null!=(e=null==e?void 0:e.split(":"))?e:[],1)[0]})())?e:(()=>{var e=new RegExp(/[?&]workspace=([^&]+)(&|$)/).exec(window.location.search);return null==e?void 0:e[1]})())?e:(()=>{var e;return null==(e=null==window?void 0:window.__RUNTIME__)?void 0:e.workspace})(),ckInfo:window.document.cookie});var e}function K(){var e=null==(e=null==(e=window.document)?void 0:e.querySelector('meta[name="storefront"]'))?void 0:e.getAttribute("content"),n=null!=(n=null!=(n=null!=(n=null==(n=window.VTEX_METADATA)?void 0:n.account)?n:null==(n=window.__RUNTIME__)?void 0:n.account)?n:window.jsnomeLoja)?n:(()=>{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 z=e?e:z})();return e?{accountName:n,accountEnvironment:e}:null!=(e=window.__RUNTIME__)&&e.account?{accountName:n,accountEnvironment:"store_framework"}:window.jsnomeLoja?{accountName:n,accountEnvironment:"portal"}:{accountName:n,accountEnvironment:window.__NEXT_DATA__||window.___gatsby?"fast_store":void 0}}var z="";function a(){return window.location.href}var e="https://af-origin.vtex.com/api/activity-flow",Q="Event",Z=1e4,u=0,ee={pageView:"".concat(e,"/page-views"),ads:"".concat(e,"/ads"),webVitals:"".concat(e,"/web-vitals"),click:"".concat(e,"/click"),impression:"".concat(e,"/impression")};function ne(e,n){var t,r;navigator.sendBeacon?navigator.sendBeacon(n,e):(t=n,r=e,new Promise(function(e){var n=new XMLHttpRequest;n.timeout=Z,n.open("POST",t,!0),n.setRequestHeader("Content-Type","application/json"),n.send(r),n.onload=function(){if(200===n.status||202===n.status)return J(),e(r)}}))}function te(e){var n={SessionId:(n=$()).sessionID,MacId:n.macID,IsNewUser:n.isNewUser,Url:n.url,Ref:n.ref,accountName:n.accountName,accountEnvironment:n.accountEnvironment,clientdate:(new Date).getTime(),isFirstEvent:n.isNewSessionID,workspace:n.workspace,ckInfo:n.ckInfo},t=n.IsNewUser,r=n.isFirstEvent,n=i(n,["IsNewUser","isFirstEvent"]),n=Object.assign(Object.assign(Object.assign({},e),{DataType:Q}),n);return"pageView"===e.eventType?Object.assign(Object.assign({},n),{IsNewUser:t,isFirstEvent:r}):n}function s(e,n){var t,r=1{var t=e;(t=ae[t])&&clearTimeout(t);var r=setTimeout(function(){"IN_VIEW"===d(e)&&n()},re);ae[e]=r})(n,function(){f(n,"VIEWED"),r.disconnect(),t.dispatchEvent(new Event("view"))}));break;case"IN_VIEW":o.isIntersecting||f(n,"NOT_VIEWED");break;case"VIEWED":r.disconnect()}})},{threshold:.5,rootMargin:"0px"})).observe(a)}function f(e,n){oe[e]=n}function d(e){return null!=(e=oe[e])?e:"NOT_VIEWED"}function v(e){return"".concat(e.adId,"-").concat(e.adRequestId)}function ce(e){e=(e=>{for(var n={},t=Object.keys(c),r=0,o=t;ra&&(clearInterval(t),n(null))},i)}))}},e)}))}var ge=["lojasrede","drogariavenancio"];function he(){return t(this,void 0,void 0,_regenerator().m(function e(){var r,o;return _regenerator().w(function(e){for(;;)switch(e.n){case 0:if(t=n=void 0,n=K().accountName,t=(t=window.location.pathname).includes("/search")||t.includes("/pesquisa"),null!=n&&ge.includes(n)&&t)return e.n=1,me(function(){var e;return null==(e=document.querySelector("impulse-search"))?void 0:e.shadowRoot});e.n=2;break;case 1:o=e.v,e.n=4;break;case 2:return e.n=3,me(function(){return document.body});case 3:o=e.v;case 4:return r=o,e.a(2,r)}var n,t},e)}))}var m="data-af";function ye(e){for(var n={},t=0,r=Array.from(e.attributes);tt.value&&(t.value=r,t.entries=o,n())}var n,t=T("CLS",0),r=0,o=[],a=E("layout-shift",e);a&&(n=_(i,t,Ue,c.reportAllChanges),x(function(){e(a.takeRecords()),n(!0)}),y(function(){t=T("CLS",r=0),n=_(i,t,Ue,c.reportAllChanges),I(function(){return n()})}),setTimeout(n,0))}))}function Ne(a,i){"PerformanceEventTiming"in self&&"interactionId"in PerformanceEventTiming.prototype&&(i=i||{},k(function(){var e;Be();function n(n){$e(function(){n.forEach(Ye);var e=Xe();e&&e.latency!==t.value&&(t.value=e.latency,t.entries=e.entries,o())})}var t=T("INP"),r=E("event",n,{durationThreshold:null!=(e=i.durationThreshold)?e:40}),o=_(a,t,Ke,i.reportAllChanges);r&&(r.observe({type:"first-input",buffered:!0}),x(function(){n(r.takeRecords()),o(!0)}),y(function(){Ge=He(),L.length=0,D.clear(),t=T("INP"),o=_(a,t,Ke,i.reportAllChanges)}))}))}function Le(i,c){c=c||{},k(function(){function e(e){(e=c.reportAllChanges?e:e.slice(-1)).forEach(function(e){e.startTimer[1]?"poor":e>r[0]?"needs-improvement":"good",n(t))}},I=function(e){requestAnimationFrame(function(){return requestAnimationFrame(function(){return e()})})},x=function(e){document.addEventListener("visibilitychange",function(){"hidden"===document.visibilityState&&e()})},S=function(e){var n=!1;return function(){n||(e(),n=!0)}},O=-1,Ce=function(){return"hidden"!==document.visibilityState||document.prerendering?1/0:0},A=function(e){"hidden"===document.visibilityState&&-1t.latency)&&(e?n.duration>e.latency?(e.entries=[n],e.latency=n.duration):n.duration===e.latency&&n.startTime===e.entries[0].startTime&&e.entries.push(n):(t={id:n.interactionId,latency:n.duration,entries:[n]},D.set(t.id,t),L.push(t)),L.sort(function(e,n){return n.latency-e.latency}),10