(window.webpackJsonpvtex_search_result_3_136_1=window.webpackJsonpvtex_search_result_3_136_1||[]).push([["SearchResultLayoutCustomQuery"],{0:function(e,t){e.exports=React},1:function(e,t){e.exports=R},119:function(e,t){e.exports=__RENDER_8_COMPONENTS__["vtex.pixel-manager@1.x/PixelContext"]},14:function(e,t){e.exports=__RENDER_8_COMPONENTS__["vtex.css-handles@0.x/applyModifiers"]},15:function(e,t){e.exports=__RENDER_8_COMPONENTS__["vtex.styleguide@9.x/Button"]},17:function(e,t){e.exports=__RENDER_8_COMPONENTS__["vtex.store-icons@0.x/IconCaret"]},18:function(e,t){e.exports=__RENDER_8_COMPONENTS__["vtex.device-detector@0.x/useDevice"]},185:function(e,t,r){"use strict";r.r(t),function(e){var t=r(9);r.p=Object(t.getPublicPath)("vtex.search-result@3.136.1");var n=Object(t.register)((function(){return r(200)}),e,"vtex.search-result@3.136.1","vtex.search-result@3.x","SearchResultLayoutCustomQuery");n.renderHotReload,n.setupHMR}.call(this,r(16)(e))},2:function(e,t){e.exports=PropTypes},200:function(e,t,r){"use strict";r.r(t);var n=r(47),a=r(12),o=r(20),c=r(0),i=r.n(c),u=r(3),l=r(18),s=r.n(l),d=r(1),p=r(95),f=r(80),v=r(57),_=r(118),m=r.n(_),h=r(119),y=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",r=arguments.length>2&&void 0!==arguments[2]&&arguments[2],n=Object(h.usePixel)(),a=n.push,o=Object(c.useRef)(null),i=o.current;Object(c.useEffect)((function(){t&&!r&&i!==t&&e&&!Object(d.isEmpty)(e)&&(Array.isArray(e)?e.forEach(a):a(e),o.current=t)}),[e,r,t,i,a])},g={InternalSiteSearch:"internalSiteSearchView",Category:"categoryView",Department:"departmentView",EmptySearch:"emptySearchView"},x=function(e){try{return decodeURIComponent(e)}catch(t){return e}},O=function(e){var t,r;return(null===(r=null===(t=e.facets)||void 0===t?void 0:t.categoriesTrees)||void 0===r?void 0:r.length)?e.facets.categoriesTrees.find((function(e){return e.selected})):function(e){var t,r,n;if(null===(t=null==e?void 0:e.queryArgs)||void 0===t?void 0:t.map.split(",").includes("c")){var a=null===(r=e.specificationFilters)||void 0===r?void 0:r.find((function(e){var t;return"category-1"===(null===(t=e.facets)||void 0===t?void 0:t[0].key)}));return null===(n=null==a?void 0:a.facets)||void 0===n?void 0:n.find((function(e){return e.selected}))}}(e.facets)},E=function(e){if(e&&e.facets&&e.facets.categoriesTrees){var t=O(e);if(t)return{id:t.id,name:t.name}}},S=function(e){if(e&&e.facets&&e.facets.categoriesTrees){var t=O(e);if(t){var r=function e(t,r){var n,a=t.children&&t.children.length>0&&t.children.find((function(e){return e.selected}));return a?e(a):null!==(n=function(e){var t,r,n,a;if(!((null!==(r=null===(t=null==e?void 0:e.queryArgs)||void 0===t?void 0:t.map.split(",").filter((function(e){return"c"===e})).length)&&void 0!==r?r:0)<=1)){var o=null===(n=null==e?void 0:e.specificationFilters)||void 0===n?void 0:n.find((function(e){var t;return"category-2"===(null===(t=e.facets)||void 0===t?void 0:t[0].key)}));return null===(a=null==o?void 0:o.facets)||void 0===a?void 0:a.find((function(e){return e.selected}))}}(r))&&void 0!==n?n:t}(t,e.facets);if(r!==t)return{id:r.id,name:r.name}}}},N=function(e){if(e&&e.productSearch&&e.facets&&e.facets.queryArgs){var t=e.facets.queryArgs,r=t.query,n=t.map,a=Object(d.zipObj)(n.split(","),r.split("/")).ft,o="";try{o=decodeURIComponent(a||"")}catch(e){o=decodeURIComponent(encodeURIComponent(a||""))}var c=O(e);return{term:o||void 0,category:c?{id:c.id,name:c.name}:null,results:e.productSearch.recordsFiltered,operator:e.productSearch.operator,searchState:e.productSearch.searchState,correction:e.productSearch.correction}}};function b(e){var t=e.canonicalLink,r=e.page,n=e.rel;if(!t)return null;var a=0;"canonical"===n?a=r:"next"===n?a=r+1:"prev"===n&&(a=r-1);var o=function(e){var t=e.canonicalLink,r=e.page;if(null!=r&&r<1)return null;var n={page:null!=r&&r>1?r:void 0};return m.a.stringifyUrl({url:t,query:n})}({canonicalLink:t,page:a});return o?{rel:n,href:o}:null}function R(e){var t=e.products,r=e.to,n=e.recordsFiltered;return t&&null!=r&&null!=n?r+10?" #".concat(i):"",s=u?"":" - ".concat(n);return r?"".concat(x(r)).concat(l).concat(s):o?"".concat(x(o)).concat(l).concat(s):a?"".concat((t=x(a),t&&t.charAt(0).toUpperCase()+t.slice(1))).concat(l).concat(s):n}({titleTag:p,storeTitle:H||L,term:C,pageTitle:V,pageNumber:J?Number(B):0,removeStoreNameTitle:z}),X=Object(c.useMemo)((function(){if(!u.canUseDOM||!_||!T||q)return null;var e=function(e,t){if(!e)return"otherView";var r=function(e,t){if(!e||0===e.length)return"EmptySearch";var r=t.category;return t.fullText?"InternalSiteSearch":r?"Category":"Department"}(e,t);return g[r]||"otherView"}(_,t.searchQuery.variables);return[{event:"pageInfo",eventType:e,accountName:Q,pageUrl:window.location.href,orderBy:D,page:B,category:(null==a?void 0:a.data)?S(a.data):null,department:(null==a?void 0:a.data)?E(a.data):null,search:(null==a?void 0:a.data)?N(a.data):null},{event:e,products:_}]}),[_,T,q,t.searchQuery.variables,Q,D,B,a.data]),Y=function(e,t,r){var n=e.variables;if(n)return n.query+n.map+(null!=t?t:"")+(null!=r?r:"")}(a,D,B);!function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.title,r=e.cacheKey,n=e.skip,a=Object(u.useRuntime)(),o=a.route,i=a.account,l=null!=r?r:o.routeId,s=Object(c.useMemo)((function(){return!u.canUseDOM||n?null:{event:"pageView",pageTitle:null!=t?t:document.title,pageUrl:location.href,referrer:0===document.referrer.indexOf(location.origin)?void 0:document.referrer,accountName:i,routeId:(null==o?void 0:o.routeId)?o.routeId:""}}),[i,t,u.canUseDOM,l]);y(n?null:s,l)}({title:W,cacheKey:Y}),y(X,Y,M);var Z=function(){var e,t,r=Object(u.useRuntime)(),n=r.route,a=r.rootPath,o=void 0===a?"":a,c=n.canonicalPath,i=null!==(e=window.__hostname__)&&void 0!==e?e:null===(t=window.location)||void 0===t?void 0:t.hostname;if(i&&c)return"https://".concat(i).concat(o).concat(c)}(),$=Number(B),ee=$*n-1;return i.a.createElement(c.Fragment,null,i.a.createElement(u.Helmet,{link:[b({canonicalLink:Z,page:$,rel:"canonical"}),b({canonicalLink:Z,page:$,rel:"prev"}),R({products:w,to:ee,recordsFiltered:I})?b({canonicalLink:Z,page:$,rel:"next"}):null].filter(Boolean)}),r)};function T(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function j(e){for(var t=1;t