1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8748,9739,4442],{34882:function(e,t){Object.prototype.toString,Object.prototype.hasOwnProperty},78748:function(e,t,r){r.r(t),r.d(t,{default:function(){return sendEvent}});var o=r(59739),n=r(34442);function sendEvent(e){(0,o.default)(e),(0,n.default)(e)}},59739:function(e,t,r){r.r(t);var o={OTHER_VIEW:"otherView",HOME_VIEW:"homeView",CATEGORY_VIEW:"categoryView",DEPARTMENT_VIEW:"departmentView",INTERNAL_SITE_SEARCH_VIEW:"internalSiteSearchView",PRODUCT_VIEW:"productView"},sendEvent=(e,t)=>{var r,o;null===(r=window)||void 0===r||null===(o=r.sendrc)||void 0===o||o.call(r,e,t)};t.default=e=>{switch(e.name){case"page_view":switch(null!==(t=null===(r=I=e.params)||void 0===r?void 0:null===(n=r.page)||void 0===n?void 0:n.type)&&void 0!==t?t:null===(a=I)||void 0===a?void 0:a.type){case"plp":if(!(null!==(i=I)&&void 0!==i&&null!==(l=i.page_location)&&void 0!==l&&l.includes("fuzzy")))break;var t,r,n,a,i,l,s,c,d,u,p,v,m,h,f,E,y,b,g,_,O,w,I,k,S,R,j=null===(s=I)||void 0===s?void 0:null===(c=s.data)||void 0===c?void 0:c.collection,P=null==j?void 0:null===(d=j.breadcrumbList)||void 0===d?void 0:d.itemListElement;P.length>1?sendEvent(o.CATEGORY_VIEW,{departmentName:null===(k=P[0])||void 0===k?void 0:k.name,categoryId:null==j?void 0:j.id,categoryName:null===(S=P[P.length-1])||void 0===S?void 0:S.name}):sendEvent(o.DEPARTMENT_VIEW,{departmentId:null==j?void 0:j.id,departmentName:null===(R=P[0])||void 0===R?void 0:R.name});break;case"pdp":var T=null===(u=I)||void 0===u?void 0:null===(p=u.data)||void 0===p?void 0:p.product,U=null==T?void 0:null===(v=T.breadcrumbList)||void 0===v?void 0:v.itemListElement,V=null==T?void 0:null===(m=T.offers)||void 0===m?void 0:m.offers,D=V.map(e=>e.seller.identifier),N=V.filter(e=>"https://schema.org/OutOfStock"===e.availability);sendEvent(o.PRODUCT_VIEW,{skuStockOutFromProductDetail:N,productId:null==T?void 0:null===(h=T.isVariantOf)||void 0===h?void 0:h.productGroupID,productName:null==T?void 0:null===(f=T.isVariantOf)||void 0===f?void 0:f.name,productBrandName:null==T?void 0:null===(E=T.brand)||void 0===E?void 0:E.name,productDepartmentName:U?null===(y=U[0])||void 0===y?void 0:y.name:"",productCategoryName:U.length>1?null===(b=U[U.length-2])||void 0===b?void 0:b.name:"",productPrice:null===(g=V[0])||void 0===g?void 0:g.price,productListPrice:null===(_=V[0])||void 0===_?void 0:_.listPrice,sellerId:null===(O=V[0])||void 0===O?void 0:null===(w=O.seller)||void 0===w?void 0:w.identifier,sellerIds:D.join(",")});break;case"home":sendEvent(o.HOME_VIEW,{});break;case"search":break;default:sendEvent(o.OTHER_VIEW,{})}break;case"intelligent_search_query":I=e.params,sendEvent(o.INTERNAL_SITE_SEARCH_VIEW,{siteSearchTerm:I.term,siteSearchForm:I.url,siteSearchResults:I.totalCount})}}},34442:function(e,t,r){r.r(t),r.d(t,{default:function(){return search}});var o,n=r(90849),a=r(30411),i=r(6570),l=r.n(i),getBaseDomain=e=>{if(e[0]===e[1])return".".concat(new URL(l().storeUrl).hostname);for(var t=e.map(e=>{try{var t=new URL(e).hostname,r=l().api.subDomainPrefix||[],o=new RegExp("^(".concat(["www",...r].join("|"),")\\."));return t.replace(o,"")}catch(e){return""}}).map(e=>e.split(".").reverse()),r=Math.min(...t.map(e=>e.length)),o=[],_loop=function(e){if(1!==new Set(t.map(t=>t[e])).size)return"break";o.push(t[0][e])},n=0;n<r&&"break"!==_loop(n);n++);if(o.length<2){var a="No common domain found for URLs: ".concat(e.join(", "));return console.warn("".concat(a,". Please check the Production URLs in the discovery.config file.")),""}return"."+o.reverse().join(".")};function ownKeys(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,o)}return r}function _objectSpread(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?ownKeys(Object(r),!0).forEach(function(t){(0,n.Z)(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ownKeys(Object(r)).forEac
1h(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}r(34882),r(30816).lW;var s=(null===(o=l().experimental)||void 0===o?void 0:o.enableScriptsLogs)===!0,randomUUID=()=>"function"==typeof crypto.randomUUID?crypto.randomUUID().replaceAll("-",""):(1e6*Math.random()).toFixed(0),createOrRefreshCookie=(e,t)=>{var r=l().secureSubdomain?getBaseDomain([l().storeUrl,l().secureSubdomain]):".".concat(new URL(l().storeUrl).hostname);return()=>{var o=function(e){for(var t of decodeURIComponent(document.cookie).split(";")){var[r,o]=t.trim().split("=");if(r===e)return o}}(e);return void 0===o&&(o=randomUUID()),document.cookie="".concat(e,"=").concat(o,"; max-age=").concat(t,"; domain=").concat(r,"; path=/;"),o}},c={anonymous:createOrRefreshCookie("vtex-search-anonymous",31536e3),session:createOrRefreshCookie("vtex-search-session",1800)},sendEvent=e=>{var t=_objectSpread(_objectSpread({},e),{},{userAgent:navigator.userAgent,anonymous:c.anonymous(),session:c.session()});return s&&console.debug("%cvtex%c Search Event",a.Av,"color:inherit",t),fetch("https://sp.vtex.com/event-api/v1/".concat(l().api.storeId,"/event"),{method:"POST",body:JSON.stringify(t),headers:{"content-type":"application/json"}})},isFullTextSearch=e=>"string"==typeof e.searchParams.get("q")&&/^\/s(\/)?$/g.test(e.pathname);setInterval(()=>sendEvent({type:"session.ping"}),6e4);var search=e=>{switch(e.name){case"search_select_item":var t,r,o=new URL(e.params.url);if(!isFullTextSearch(o))return;for(var n of null!==(a=e.params.items)&&void 0!==a?a:[]){var a,i,l,s=null!==(i=n.item_id)&&void 0!==i?i:n.item_variant,c=n.index;s&&c&&sendEvent({type:"search.click",productId:s,position:c,url:o.href,text:null!==(l=o.searchParams.get("q"))&&void 0!==l?l:"<empty>"})}break;case"intelligent_search_query":sendEvent({type:"search.query",url:e.params.url,text:e.params.term,misspelled:e.params.isTermMisspelled,match:e.params.totalCount,operator:e.params.logicalOperator,locale:e.params.locale});break;case"intelligent_search_autocomplete_query":sendEvent({type:"search.autocomplete.query",url:e.params.url,text:e.params.term,misspelled:e.params.isTermMisspelled,match:e.params.totalCount,operator:e.params.logicalOperator,locale:e.params.locale});break;case"intelligent_search_autocomplete_click":sendEvent(_objectSpread(_objectSpread({text:e.params.term,url:null!==(t=e.params.url)&&void 0!==t?t:"",productId:null!==(r=e.params.productId)&&void 0!==r?r:""},e.params.position&&{position:e.params.position}),{},{type:"search.autocomplete.click"}))}}}}]);
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.