function _toArray(e){return _arrayWithHoles(e)||_iterableToArray(e)||_unsupportedIterableToArray(e)||_nonIterableRest()}function _iterableToArray(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function _slicedToArray(e,t){return _arrayWithHoles(e)||_iterableToArrayLimit(e,t)||_unsupportedIterableToArray(e,t)||_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,t){var n;if(e)return"string"==typeof e?_arrayLikeToArray(e,t):"Map"===(n="Object"===(n={}.toString.call(e).slice(8,-1))&&e.constructor?e.constructor.name:n)||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?_arrayLikeToArray(e,t):void 0}function _arrayLikeToArray(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n{var t=2;function n(e){e=new RegExp("(^| )".concat(e,"=([^;]+)")),e=document.cookie.match(e);if(e)return decodeURI(e[t])}function r(e,t,n){var t=encodeURI(t),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=n(a);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})())?e:"",pageTitle:document.title,url:window.location.href,ref:window.document.referrer,path:window.location.pathname,hostName:window.location.hostname,accountName:null!=(e=null==(e=window.__RUNTIME__)?void 0:e.account)?e:window.jsnomeLoja});var e}var f,v,p="Event",x="https://rc.vtex.com/v8",y=3e5,m=["productView","otherView","categoryView","homeView","departmentView","internalSiteSearchView","cart","cartLoaded","payment","email","orderPlaced","profile","shipping"];function h(t,e){var n,r,o,a;return t?(n=t,e=e,e=Object.assign({},e),r=w(),e=Object.assign(Object.assign({},e),{DataType:e.DataType||p,RequestType:n,SessionId:r.sessionID,MacId:r.userSessionInfo.macID,IsNewUser:r.userSessionInfo.isNewUser,workspace:r.workspace,Url:r.url,Ref:r.ref,Path:r.path,HostName:r.hostName,pageTitle:r.pageTitle,accountName:r.accountName}),n=JSON.stringify(e),null!=m.find(function(e){return e===t})?(o=n,a=x,new Promise(function(e){var t=new XMLHttpRequest;t.timeout=y,t.open("POST",a,!0),t.setRequestHeader("Content-Type","application/json"),t.send(o),t.onload=function(){if(200===t.status||202===t.status)return u(),e(o)}})):void 0):console.error("Event name is not defined")}function b(){if(window.vtexrca){function e(){var e,t=window.vtexrca.q.shift();e=function(){return g(t)},"requestIdleCallback"in window?window.requestIdleCallback(e):setTimeout(e,1)}for(Object.defineProperty(window.vtexrca.q,"push",{value:function(){for(var e=arguments.length,t=new Array(e),n=0;n