"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[87355],{8441:(e,t,l)=>{l.d(t,{BH:()=>o,EU:()=>u,PP:()=>a,is:()=>r,ke:()=>c,om:()=>i,xJ:()=>n});var a=function(e){return e.IMAGE="SiteSearchResultImageItem",e.TEXT="SiteSearchResultTextItem",e}({}),r=function(e){return e.FILTER="filter",e.FUNNEL="funnel",e}({}),i=function(e){return e.CURRENTCLICK="current",e.PASTCLICK="past",e}({}),n=function(e){return e.LINK="SiteSearchResultActionLink",e.QUERY="SiteSearchResultActionQuery",e}({}),o=function(e){return e.BRAND="brand",e.BRAND_AND_PRODUCT_LINE="brandAndProductLine",e.FREE_SEARCH="",e.FRONT_TIRE="frontTireSize",e.GUIDED_SHOPPING="guidedShopping",e.MAKE_MODEL_YEAR="makeModelYearOption",e.POPULAR="mostPopularProductLine",e.REAR_TIRE="rearTireSize",e.REAR_TIRE_WIDTH="rearWidthRatio",e.TIRE_SIZE="tireSize",e.TIRE_TYPE="tireType",e.VEHICLE="vehicle",e.VEHICLE_GUIDED_SHOPPING="vehicleGuidedShopping",e}({});let c={brand:"brand",frontTireSize:"frontTireSize",rearTireSize:"rearTireSize",rearWidthRatio:"rearWidthRatio",tireSize:"tireSize",vehicle:"vehicle",tireType:"tireType",makeModelYearOption:"makeModelYearOption"};var u=function(e){return e.PRIMARY="primary",e.SECONDARY="secondary",e}({})},12055:(e,t,l)=>{l.d(t,{S:()=>i});var a=l(86089),r=l(28993);async function i(e){let{additionalQueryText:t="",queryText:l,queryType:i,signal:n}=e,o=await (0,a.q$)({endpoint:"/search-typeahead",query:{additionalQueryText:t,queryText:l,queryType:i},method:"get",signal:n});if(!o.isSuccess)throw new r.fk(r.rS[o.error.code]||r.rS.NetworkError,o.error.message||"");return o.data}},23204:(e,t,l)=>{l.d(t,{U:()=>A,Z:()=>g});var a=l(29747),r=l(18847),i=l.n(r),n=l(14232),o=l(62306),c=l(37931),u=l(79478),s=l(82562),y=l(36307),d=l(91066),p=l(57532),h=l(72219),S=l(27632),E=l(8441);let T=i()(()=>l.e(85925).then(l.bind(l,85925)),{loadableGenerated:{webpack:()=>[85925]}}),b=(0,y.q6)();function m(){return g(e=>e.isSearchOpen)?(0,a.Y)(T,{}):null}function A(e){let{children:t}=e,l=function(){let[e,t]=(0,n.useState)(!1),[l,a]=(0,n.useState)(!1),[r,i]=(0,n.useState)(!1),{activeInputType:y,getCurrentInputQuery:T,primaryQuery:b,secondaryQuery:m,setActiveInputType:A,setCurrentInputQuery:g,setInputQuery:R,setPrimaryQuery:L,setSecondaryQuery:C}=(0,S.k3)(),{lockSearchStateToGuidedShopping:v,lockSearchStateToTireType:I,lockSearchStateToTireSize:f,lockSearchStateToVehicle:_,lockSearchStateToBrand:k,setFilterPills:P,setRouteQueryParamOptions:O}=(0,h.a)(e=>({lockSearchStateToBrand:e.lockSearchStateToBrand,lockSearchStateToGuidedShopping:e.lockSearchStateToGuidedShopping,lockSearchStateToTireSize:e.lockSearchStateToTireSize,lockSearchStateToTireType:e.lockSearchStateToTireType,lockSearchStateToVehicle:e.lockSearchStateToVehicle,setFilterPills:e.setFilterPills,setRouteQueryParamOptions:e.setRouteQueryParamOptions})),N=(0,n.useMemo)(()=>({...c.O9,onClick:(e,l,a)=>()=>{let r=(0,o.Dj)(e);if(g({queryText:r.queryText,queryType:r.queryType}),_("",{pillName:(0,p.ui)("searchByBoard.vehicle"),pillNumber:l}),a&&null!==a){let e=new URLSearchParams(a),t=e.get("brand")||"",l=e.get("promotion")||"",r={};r.brand=t,r.promotion=l,O({routes:[u.ph[u.bw.VEHICLE_CATALOG]],params:r}),P([{type:E.BH.BRAND,label:"".concat(t," deals")}])}t(!0)}}),[_,g,P,O]),D=(0,n.useMemo)(()=>({...c.vB,onClick:(e,l,a)=>()=>{let r=(0,o.Dj)(e);if(g({queryText:r.queryText,queryType:r.queryType}),f({pillName:(0,p.ui)("searchByBoard.tireSize"),pillNumber:l}),a){let e=new URLSearchParams(a),t=e.get("brand")||"",l=e.get("promotion")||"",r={};r.brand=t,r.promotion=l,O({routes:[u.ph[u.bw.TIRE_SIZE_CATALOG_OR_CATEGORY]],params:r}),P([{type:E.BH.BRAND,label:"".concat(t," deals")}])}t(!0)}}),[f,g,P,O]),w=(0,n.useMemo)(()=>({...c.C2,onClick:(e,l)=>()=>{let a=(0,o.Dj)(e);g({queryText:a.queryText,queryType:a.queryType}),v({pillName:(0,p.ui)("searchByBoard.guidedShopping"),pillNumber:l}),t(!0)}}),[v,g]),H=(0,n.useMemo)(()=>({...c.ND,onClick:(e,l)=>()=>{let a=(0,o.Dj)(e);g({queryText:a.queryText,queryType:a.queryType}),k({pillName:(0,p.ui)("searchByBoard.brand"),pillNumber:l}),t(!0)}}),[k,g]),B=(0,n.useMemo)(()=>({...c.mH,onClick:(e,l,a)=>()=>{let r=(0,o.Dj)(e);if(g({queryText:r.queryText,queryType:r.queryType}),I({pillName:(0,p.ui)("searchByBoard.tireType"),pillNumber:l}),a){let e=new URLSearchParams(a),t=e.get("brand"),l=e.get("promotion"),r={};r.brand=t||"",r.promotion=l||"",O({routes:[u.ph[u.bw.VEHICLE_CATALOG],u.ph[u.bw.TIRE_SIZE_CATALOG_OR_CATEGORY]],params:r}),P([{type:E.BH.BRAND,label:"".concat(t," deals")}])}t(!0)}}),[I,g,P,O]),q=(0,n.useCallback)(e=>{t(e=>(e||history.pushState(null,"",""),!e)),e&&"function"==typeof e&&e()},[]),x=(0,n.useCallback)(l=>{var a;let{event:r}=l,{url:i,options:n}=null!==(a=r.state)&&void 0!==a?a:{};i&&(0,d.Z3)(i,u.ND)&&!(null==n?void 0:n.shallow)&&!e&&s.o.newCatalogSearchQuery.emit({comesFromSearch:!1}),t(!1)},[e]);return(0,n.useEffect)(()=>(s.o.popstateEvent.on(x),()=>{s.o.popstateEvent.off(x)}),[x]),(0,n.useEffect)(()=>{e&&a(!1)},[e]),{activeInputType:y,fromSearch:r,getCurrentInputQuery:T,guidedShoppingPill:w,isSearchOpen:e,primaryQuery:b,secondaryQuery:m,setActiveInputType:A,setCurrentInputQuery:g,setFromSearch:i,setInputQuery:R,setIsSearchOpen:t,setPrimaryQuery:L,setSecondaryQuery:C,setShowLoading:a,showLoading:l,tireBrandPill:H,tireSizePill:D,tireTypePill:B,toggleIsSearchOpen:q,vehiclePill:N}}();return(0,a.FD)(b.Provider,{value:l,"data-element":"unknown","data-component":"SearchModalContextProvider",children:[(0,a.Y)(m,{"data-element":"SearchModalOverlayContainer"}),t]})}let g=(e,t)=>(0,y.i7)(b,e,t)},25847:(e,t,l)=>{l.d(t,{A:()=>a});let a=function(e){let t,l=arguments.length>1&&void 0!==arguments[1]?arguments[1]:100,a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{isImmediate:!1};return function(){for(var r=arguments.length,i=Array(r),n=0;n{t=void 0,a.isImmediate||e(...i)},l),o&&e(...i)}}},27632:(e,t,l)=>{l.d(t,{Ue:()=>C,QC:()=>v,g$:()=>P,k3:()=>k,MN:()=>I,WB:()=>f,Z_:()=>_});var a=l(735),r=l.n(a),i=l(14232),n=l(8441);function o(e){var t,l;return{action:{type:"SiteSearchResultActionLink",link:e.link,vehicleMetadata:e.vehicleMetadata},detailLabel:null!==(t=e.detailLabel)&&void 0!==t?t:null,image:e.image,isPillItem:null!==(l=e.isPillItem)&&void 0!==l?l:null,label:e.label,labelSegments:[],type:"SiteSearchResultTextItem",typeName:e.typeName}}function c(e){return{label:"",siteSearchResultList:e.items.map(o)}}var u=l(61430),s=l(12055),y=l(70441),d=l(44364),p=l(28993),h=l(22008),S=l(52980),E=l(78096),T=l(55005),b=l(45882);let m=(e,t)=>{let l=window.innerHeight-t.bottom,a=t.top;return e.bottom>l||e.top1&&void 0!==arguments[1]?arguments[1]:{top:0,bottom:0};m(e.getBoundingClientRect(),t)&&e.scrollIntoView({block:"center"})};var g=l(63748),R=l(43772);let L={bottom:0,top:145};function C(e){let[t,l]=(0,i.useState)([0,-1]);return{selectNextItemIndex:()=>{if(0===e.length)return;let a=t,[r,i]=t,n=r===e.length-1,o=i===e[r].siteSearchResultList.length-1;o&&!n?a=[r+1,0]:o||(a=[r,i+1]),l(a)},selectPrevItemIndex:()=>{if(0===e.length)return;let a=t,[r,i]=t,n=0===r,o=0===i;o&&!n?a=[r-1,e[r-1].siteSearchResultList.length-1]:o||(a=[r,i-1]),l(a)},selectedItemIndex:t,setSelectedItemIndex:l}}function v(e){let{clearance:t=L}=e,l=(0,i.useRef)([]);return{onFocus:e=>()=>{l.current[e]&&A(l.current[e],t)},pushRefToArray:e=>t=>{l.current[e]=t}}}function I(){let[e,t]=(0,i.useState)(R.Lc),[l,a]=(0,i.useState)(!1),o=(0,i.useCallback)(async function(){let e=await (0,y.uf)();if(e.isSuccess){if(200===e.statusCode){let l=c(e.data);t(e=>r()(l,e)?e:l)}return}E.A.error("apiGetUserSearchHistory:",e.error.message)},[]),u=(0,i.useCallback)(async function(){let e=await (0,y.Ri)();a(!0),t(R.Lc),e.isSuccess||E.A.error("apiDeleteUserSearchHistory:",e.error.message)},[]);return{addPastSearch:(0,i.useCallback)(async function(e){var l,a;let i="link"in e.action&&"vehicle"!==e.typeName?e.type===n.PP.TEXT?{detailLabel:e.detailLabel,label:e.label,link:e.action.link,typeName:null!==(l=e.typeName)&&void 0!==l?l:null,vehicleMetadata:e.action.vehicleMetadata}:e.type===n.PP.IMAGE?{label:e.image.altText,link:e.action.link,typeName:null!==(a=e.typeName)&&void 0!==a?a:null,vehicleMetadata:e.action.vehicleMetadata}:null:null;if(!i)return;let o=await (0,y.LA)(i);if(o.isSuccess){if(200===o.statusCode){let e=c(o.data);t(t=>r()(e,t)?t:e)}return}E.A.error("apiAddUserSearchHistory:",o.error.message)},[]),deletePastSearches:u,getPastSearches:o,isSearchClearAll:l,pastSearches:e}}function f(){let[e,t]=(0,i.useState)(R.dF),l=(0,i.useRef)(!1),[a,r]=(0,i.useState)(!1),[n,o]=(0,i.useState)(!1),c=(0,i.useRef)(null),[u,y]=(0,i.useState)([]),d=(0,i.useCallback)(e=>{let{additionalQueryText:t,queryText:l,queryType:a,pillName:r,resultTotal:i,pillNumber:n}=e,o=r?"true":"false",c=r&&r.includes("personalized")?"true":"false";S.A.addToDataLayer({additionalQueryText:t,event:"isSiteSearch",isCustomizedPillSearch:c,isPillSearch:o,isSimpleSnapSearch:"false",page:document&&document.location.pathname,pillName:r,pillNumber:r&&n?n:void 0,queryText:l,queryType:a,resultTotal:i})},[]),m=(0,i.useCallback)(()=>{var e;null===(e=c.current)||void 0===e||e.abort(),c.current=new AbortController,l.current=!1},[]),A=(0,i.useCallback)(async function(e){let{additionalQueryText:a,queryText:i,queryType:n,pillName:u,pillNumber:y}=e;l.current&&m(),o(!1),l.current=!0,r(!0);try{var S,A,g,L,C,v;let e=await (0,s.S)({additionalQueryText:a,queryText:i,queryType:n,signal:null===(S=c.current)||void 0===S?void 0:S.signal});if(d({additionalQueryText:a,pillName:u,pillNumber:y,queryText:i,queryType:n,resultTotal:(null===(g=e.resultMetadata)||void 0===g?void 0:null===(A=g.pagination)||void 0===A?void 0:A.total)||0}),e.resultMetadata){t(e);let l={search_keyword:i,search_result_count:(null===(C=e.resultMetadata)||void 0===C?void 0:null===(L=C.pagination)||void 0===L?void 0:L.total)||0,search_type:n,search_filter_value:null!=a?a:""},r=(0,h.ed)();(null==r?void 0:null===(v=r.userLocation)||void 0===v?void 0:v.zip)&&(l.zip_code=r.userLocation.zip),(0,T.uj)(b.B.SEARCH_RESULTS_RETURNED,l)}else t(R.dF)}catch(e){E.A.error("apiGetSearchTypeahead:",e),e.code!==p.rS.AbortError&&"guidedShopping"!==n&&o(!0)}l.current=!1,r(!1)},[d,l,m]),g=(0,i.useCallback)(function(){m(),(0,i.startTransition)(()=>{t(R.dF),y([])})},[t,y,m]),L=(0,i.useCallback)(e=>{y(t=>[...t,e])},[]),C=(0,i.useCallback)(()=>{if(u.length)return y(e=>{let t=[...e];return t.pop(),t}),u[u.length-2]},[u]);return(0,i.useEffect)(()=>{c.current=new AbortController},[]),{addToDataLayer:d,clearSearchResults:g,hasSearchResultsError:n,isLoadingResults:a,popSearchHistory:C,pushSearchHistory:L,searchQuery:A,searchResults:e}}function _(e){let{searchQuery:t}=e,[l,a]=(0,i.useState)(""),[r,o]=(0,i.useState)(!1),c=(0,i.useCallback)((e,l)=>{let{queryText:r,queryType:i}=R.dC.action;a(n.BH.VEHICLE),t({queryText:e||r,queryType:i,pillName:null==l?void 0:l.pillName,pillNumber:null==l?void 0:l.pillNumber}),o(!0)},[t]),u=(0,i.useCallback)((e,l)=>{let{queryText:r,queryType:i}=R.dC.action;a(n.BH.VEHICLE_GUIDED_SHOPPING),t({queryText:e||r,queryType:i,pillName:null==l?void 0:l.pillName,pillNumber:null==l?void 0:l.pillNumber}),o(!0)},[t]),s=(0,i.useCallback)((e,l,r)=>{let{queryType:i}=R._4.action;a(n.BH.VEHICLE),t({additionalQueryText:l,pillName:null==r?void 0:r.pillName,pillNumber:null==r?void 0:r.pillNumber,queryText:e,queryType:i}),o(!0)},[t]),y=(0,i.useCallback)(()=>{a(n.BH.GUIDED_SHOPPING)},[]),d=(0,i.useCallback)(e=>{let{queryText:l,queryType:r}=R.uO.action;a(n.BH.TIRE_SIZE),t({queryText:l,queryType:r,pillName:null==e?void 0:e.pillName,pillNumber:null==e?void 0:e.pillNumber}),o(!0)},[t]);return{hasLockedSearchState:r,lockSearchStateToBrand:(0,i.useCallback)(e=>{let{queryText:l,queryType:r}=R.of.action;a(n.BH.BRAND),t({queryText:l,queryType:r,pillName:null==e?void 0:e.pillName,pillNumber:null==e?void 0:e.pillNumber}),o(!0)},[t]),lockSearchStateToGuidedShopping:y,lockSearchStateToTireSize:d,lockSearchStateToTireType:(0,i.useCallback)(e=>{let{queryText:l,queryType:r}=R.pi.action;a(n.BH.TIRE_TYPE),t({queryText:l,queryType:r,pillName:null==e?void 0:e.pillName,pillNumber:null==e?void 0:e.pillNumber}),o(!0)},[t]),lockSearchStateToVehicle:c,lockSearchStateToVehicleGuidedShopping:u,lockSearchStateToYMM:s,searchState:l,setHasLockedSearchState:o,setSearchState:a}}function k(){let[e,t]=(0,i.useState)({queryText:"",queryType:""}),[l,a]=(0,i.useState)({queryText:"",queryType:n.BH.REAR_TIRE}),[r,o]=(0,i.useState)(n.EU.PRIMARY),c=(0,i.useCallback)(e=>{r===n.EU.PRIMARY?t(t=>({...t,...e})):r===n.EU.SECONDARY&&a(t=>({...t,...e}))},[r]);return{activeInputType:r,getCurrentInputQuery:()=>r===n.EU.PRIMARY?e:l,primaryQuery:e,secondaryQuery:l,setActiveInputType:o,setCurrentInputQuery:c,setInputQuery:(0,i.useCallback)((e,l)=>{e===n.EU.PRIMARY?t(e=>({...e,...l})):e===n.EU.SECONDARY&&a(e=>({...e,...l}))},[]),setPrimaryQuery:t,setSecondaryQuery:a}}function P(){let e=(0,i.useRef)(null),t=(0,i.useRef)(null),{lessThan:l}=(0,u.A)();return(0,i.useEffect)(()=>{if(!(0,g.qW)())return;let a=new IntersectionObserver(e=>{e.forEach(e=>{l.L&&t.current&&(0===e.intersectionRatio?t.current.style.borderColor=d.l.DARK.GRAY_80:1===e.intersectionRatio&&(t.current.style.borderColor="transparent"))})});return e.current&&a.observe(e.current),()=>{a.disconnect()}},[l]),{headerRef:t,scrollRef:e}}},37931:(e,t,l)=>{l.d(t,{C2:()=>y,C8:()=>h,J2:()=>E,ND:()=>d,O9:()=>u,UH:()=>T,kX:()=>b,mH:()=>p,qU:()=>S,vB:()=>s,w6:()=>m});var a=l(20735),r=l(39069),i=l(57532),n=l(66427);let o={queryType:"",queryText:"",type:"SiteSearchResultActionQuery"},c={svgId:a.Ze.FIRE,type:r.z.ICON},u={type:n.y.VEHICLE,label:(0,i.ui)("searchByBoard.vehicle"),action:{...o,queryType:n.y.VEHICLE}},s={type:n.y.TIRE_SIZE,label:(0,i.ui)("searchByBoard.tireSize"),action:{...o,queryType:n.y.TIRE_SIZE}},y={type:n.y.GUIDEDSHOPPING,label:(0,i.ui)("searchByBoard.guidedShopping"),action:{...o,queryType:n.y.VEHICLE}},d={type:n.y.BRAND,label:(0,i.ui)("searchByBoard.brand"),action:{...o,queryType:n.y.BRAND}},p={type:n.y.TIRE_TYPE,label:(0,i.ui)("searchByBoard.tireType"),action:o},h={action:{...o,queryText:"/tire-shops"},label:(0,i.ui)("searchByBoard.Shops"),type:n.y.SHOPS},S={action:{...o,queryText:"/tire-deals/black-friday-sale"},icon:c,label:(0,i.ui)("searchByBoard.BFPreSaleDeal"),type:n.y.BF_PRE_SALE};(0,i.ui)("searchByBoard.BFDeals"),n.y.BF_DEAL;let E={action:{...o,queryText:"/tire-deals/cyber-monday-sale"},icon:c,label:(0,i.ui)("searchByBoard.CWDeals"),type:n.y.CW_DEAL},T={action:{...o,queryText:"/tire-deals/cyber-monday-sale"},icon:c,label:(0,i.ui)("searchByBoard.CMDeals"),type:n.y.CM_DEAL},b={action:{...o,queryText:"/tire-deals/cyber-monday-sale"},icon:c,label:(0,i.ui)("searchByBoard.LastChanceDeals"),type:n.y.LAST_CHANCE_DEAL},m={action:{...o,queryText:""},icon:c,label:(0,i.ui)("searchByBoard.LastChanceDeals"),type:n.y.CUSTOM_FILTER_PILL}},43704:(e,t,l)=>{l.d(t,{_:()=>i});var a=l(63276);let r=Object.entries(a.LO);function i(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=a.dj.S;return r.forEach(l=>{let[a,r]=l;e>=r&&(t=a)}),t}},43772:(e,t,l)=>{l.d(t,{Lc:()=>n,_4:()=>u,dC:()=>o,dF:()=>i,jU:()=>p,of:()=>y,pi:()=>d,uO:()=>s});var a=l(57532),r=l(8441);let i={resultMetadata:{},siteSearchResultGroupList:[],stopSellingBrandMapBrandsList:[]},n={label:"",siteSearchResultList:[]},o={action:{queryText:"",queryType:"vehicle",type:"SiteSearchResultActionQuery"},detailLabel:null,label:(0,a.ui)("search.searchCategories.vehicle"),labelSegments:[{label:(0,a.ui)("search.searchCategories.vehicle"),matches:!1}],type:"SiteSearchResultTextItem"},c={action:{queryText:"",queryType:"vehicle",type:"SiteSearchResultActionQuery"},detailLabel:null,label:(0,a.ui)("search.searchCategories.vehicle"),labelSegments:[{label:(0,a.ui)("search.searchCategories.vehicle"),matches:!1}],type:"SiteSearchResultTextItem"},u={action:{queryText:"",queryType:r.ke[r.BH.MAKE_MODEL_YEAR],type:"SiteSearchResultActionQuery"},detailLabel:null,label:(0,a.ui)("search.searchCategories.vehicle"),labelSegments:[{label:(0,a.ui)("search.searchCategories.vehicle"),matches:!1}],type:"SiteSearchResultTextItem"},s={action:{queryText:"",queryType:"tireSize",type:"SiteSearchResultActionQuery"},detailLabel:null,label:(0,a.ui)("search.searchCategories.tireSize"),labelSegments:[{label:(0,a.ui)("search.searchCategories.tireSize"),matches:!1}],type:"SiteSearchResultTextItem"},y={action:{queryText:"",queryType:"brand",type:"SiteSearchResultActionQuery"},detailLabel:null,label:(0,a.ui)("search.searchCategories.brand"),labelSegments:[{label:(0,a.ui)("search.searchCategories.brand"),matches:!1}],type:"SiteSearchResultTextItem"},d={action:{queryText:"",queryType:"tireType",type:"SiteSearchResultActionQuery"},detailLabel:null,label:(0,a.ui)("search.searchCategories.tireType"),labelSegments:[{label:(0,a.ui)("search.searchCategories.tireType"),matches:!1}],type:"SiteSearchResultTextItem"},p=[o,s,y,d,{action:{queryText:"",queryType:"guidedShopping",type:"SiteSearchResultActionQuery"},detailLabel:null,label:(0,a.ui)("search.searchCategories.guidedShopping"),labelSegments:[{label:(0,a.ui)("search.searchCategories.guidedShopping"),matches:!1}],type:"SiteSearchResultTextItem"},c]},46476:(e,t,l)=>{l.d(t,{Aj:()=>S,Z0:()=>E});var a=l(29747),r=l(14232),i=l(89444),n=l(76454),o=l(80912),c=l(64590),u=l(82562),s=l(78096),y=l(36307);let d=(0,y.q6)(),p={coreShipHandlingMode:null,customerServiceEnabled:!1,customerServiceNumber:{display:"",value:""},customFilterPills:null,footerLinks:[{header:"",links:[{label:"",link:{href:"#",isExternal:!1}}]}],paymentTypeDiscountInPercentage:{affirm:10,katapult:10,klarna:10,synchrony:0},priceDisplayInAddtoCart:!0,simpleCrewPromo:[],siteTheme:null},h=o.W[o.y.CORE_SHIP_MODE];function S(e){let{children:t,userAgentType:l,value:o}=e,y=function(e){let{siteGlobals:t,userAgentType:l}=e,a=l===c.y.DESKTOP,o=l===c.y.MOBILE,y=l===c.y.TABLET,{data:{siteGlobals:d}}=(0,i.b)({defaultData:{siteGlobals:t},endpoint:"/globals",includeUserRegion:!0,includeUserSSOUid:!0,includeUserTime:!0,includeUserZip:!0,options:{onError:e=>{s.A.error("globals api error:",e)},refreshInterval:6e5},revalidateEmitter:u.o.userPersonalizationLocationUpdate}),S=(0,r.useMemo)(()=>{var e;return null!==(e=null==d?void 0:d.coreShipHandlingMode)&&void 0!==e?e:""},[null==d?void 0:d.coreShipHandlingMode]),[E,T]=(0,n.M)(h,S.toString());return(0,r.useEffect)(()=>{S&&T(S.toString())},[T,S]),{...null!=d?d:p,isDesktop:a,isMobile:o,isTablet:y,userAgentType:l}}({siteGlobals:o,userAgentType:l});return(0,a.Y)(d.Provider,{value:y,"data-element":"unknown","data-component":"SiteGlobalsContextProvider",children:t})}let E=(e,t)=>(0,y.i7)(d,e,t)},53324:(e,t,l)=>{l.d(t,{P:()=>n,s:()=>i});var a=l(14232),r=l(54745);function i(){let[e,t]=(0,a.useState)((0,r.v)());return(0,a.useEffect)(()=>{let e=(0,r.v)();e!==r.I&&t(e)},[]),e}function n(){let[e,t]=(0,a.useState)(!0);return(0,a.useEffect)(()=>{!1===(0,r.v)().canFetch&&t(!1)},[]),e}},61430:(e,t,l)=>{l.d(t,{A:()=>o});var a=l(14232),r=l(69637),i=l(63276),n=l(43704);function o(){let e=(0,r.A)(),[t,l]=(0,a.useState)((0,n._)(e.width));return(0,a.useEffect)(()=>{l((0,n._)(e.width))},[e.width]),{bk:t,greaterThan:{S:i.LO[t]>i.LO[i.dj.S],M:i.LO[t]>i.LO[i.dj.M],L:i.LO[t]>i.LO[i.dj.L],XL:i.LO[t]>i.LO[i.dj.XL]},is:{S:t===i.dj.S,M:t===i.dj.M,L:t===i.dj.L,XL:t===i.dj.XL},isMobile:t===i.dj.S,isMobileOrTablet:t===i.dj.S||t===i.dj.M,isTablet:t===i.dj.M,isTabletOrDesktop:t===i.dj.M||i.LO[t]>i.LO[i.dj.M],lessThan:{M:i.LO[t]{l.d(t,{Dj:()=>A,N9:()=>R});var a=l(14e3),r=l(14232),i=l(72219),n=l(8441);let o=[{type:"SiteSearchResultTextItem",label:"All Season",detailLabel:"",labelSegments:[{label:"All Season",matches:!1}],action:{type:"SiteSearchResultActionLink",link:{href:"category=1",isExternal:!1}},image:{svgId:"all-season",type:"SiteIcon"}},{type:"SiteSearchResultTextItem",label:"All Terrain",detailLabel:"",labelSegments:[{label:"All Terrain",matches:!1}],action:{type:"SiteSearchResultActionLink",link:{href:"category=4",isExternal:!1}},image:{svgId:"tiretype-all-terrain",type:"SiteIcon"}},{type:"SiteSearchResultTextItem",label:"Winter",detailLabel:"",labelSegments:[{label:"Winter",matches:!1}],action:{type:"SiteSearchResultActionLink",link:{href:"category=3",isExternal:!1}},image:{svgId:"tiretype-winter",type:"SiteIcon"}},{type:"SiteSearchResultTextItem",label:"Summer",detailLabel:"",labelSegments:[{label:"Summer",matches:!1}],action:{type:"SiteSearchResultActionLink",link:{href:"category=10",isExternal:!1}},image:{svgId:"tiretype-summer",type:"SiteIcon"}},{type:"SiteSearchResultTextItem",label:"UHP",detailLabel:"",labelSegments:[{label:"UHP",matches:!1}],action:{type:"SiteSearchResultActionLink",link:{href:"category=8",isExternal:!1}},image:{svgId:"tiretype-uhp",type:"SiteIcon"}},{type:"SiteSearchResultTextItem",label:"Highway",detailLabel:"",labelSegments:[{label:"Highway",matches:!1}],action:{type:"SiteSearchResultActionLink",link:{href:"category=5",isExternal:!1}},image:{svgId:"tiretype-highway",type:"SiteIcon"}},{type:"SiteSearchResultTextItem",label:"Mud Terrain",detailLabel:"",labelSegments:[{label:"Mud Terrain",matches:!1}],action:{type:"SiteSearchResultActionLink",link:{href:"category=6",isExternal:!1}},image:{svgId:"tiretype-mud-terrain",type:"SiteIcon"}},{type:"SiteSearchResultTextItem",label:"Performance",detailLabel:"",labelSegments:[{label:"Performance",matches:!1}],action:{type:"SiteSearchResultActionLink",link:{href:"category=2",isExternal:!1}},image:{svgId:"tiretype-performance",type:"SiteIcon"}},{type:"SiteSearchResultTextItem",label:"Touring",detailLabel:"",labelSegments:[{label:"Touring",matches:!1}],action:{type:"SiteSearchResultActionLink",link:{href:"category=11",isExternal:!1}},image:{svgId:"tiretype-touring",type:"SiteIcon"}},{type:"SiteSearchResultTextItem",label:"All Weather",detailLabel:"",labelSegments:[{label:"All Weather",matches:!1}],action:{type:"SiteSearchResultActionLink",link:{href:"category=13",isExternal:!1}},image:{svgId:"tiretype-all-weather",type:"SiteIcon"}},{type:"SiteSearchResultTextItem",label:"Track Competition",detailLabel:"",labelSegments:[{label:"Track Competition",matches:!1}],action:{type:"SiteSearchResultActionLink",link:{href:"category=20",isExternal:!1}},image:{svgId:"tiretype-track-competition",type:"SiteIcon"}},{type:"SiteSearchResultTextItem",label:"Racing",detailLabel:"",labelSegments:[{label:"Racing",matches:!1}],action:{type:"SiteSearchResultActionLink",link:{href:"category=7",isExternal:!1}},image:{svgId:"tiretype-racing",type:"SiteIcon"}}];var c=l(23204),u=l(46476),s=l(26779),y=l(79478),d=l(96243),p=l(58172),h=l(84473),S=l(57532),E=l(72747),T=l(37931),b=l(66427);let m=e=>e,A=e=>e,g=e=>{let{addToDataLayer:t,pastSearches:l,setIsSearchOpen:a,setFilterPills:r,setRouteQueryParamOptions:i,brandName:n,categoryId:c,categoryName:u,typeId:d,typeName:S,isVehicleRoutes:E}=e,T=(0,s.A)(),A=null,g=null,R=null,L=null;return l&&l.siteSearchResultList.length>0&&(l.siteSearchResultList.forEach(function(e){if("size"===e.typeName&&!E){var l,a;g={type:null!==(l=e.typeName)&&void 0!==l?l:"",label:(0,h.ZH)(null!==(a=e.label)&&void 0!==a?a:""),action:e.action,onClick:(l,a,r,i)=>()=>{let{queryParams:n}=null!=i?i:{queryParams:{}},o=p.Ay.stringify(n),u=m(l);t({queryText:e.label||"",queryType:"tireSize",pillName:"".concat(e.label,"-personalized-").concat(e.typeName),pillNumber:a});let s=r?u.link.href+"?brand=".concat(r.toString()):c?u.link.href+"?category=".concat(c.toString()):d?u.link.href+"?subtype=".concat(d.toString()):u.link.href;o&&(s+=0>s.indexOf("?")?"?".concat(o):"&".concat(o)),T.push(s)}}}}),l.siteSearchResultList.slice().reverse().forEach(function(e){if(e.typeName===b.y.CATEGORY){var l,c;let u=m(e.action);u.link.href=u.link.href.includes("/categories")?u.link.href.includes("-tires")?u.link.href:u.link.href+"-tires":u.link.href.includes("-tires")?"/"+u.link.href:"/"+u.link.href+"-tires",R={type:null!==(l=e.typeName)&&void 0!==l?l:"",label:(0,h.ZH)(null!==(c=e.label)&&void 0!==c?c:""),action:e.action,onClick:(l,c)=>()=>{var l,u,s,p;let{link:{href:E}}=o.filter(t=>{var l;return t.label===(0,h.sU)(null!==(l=e.label)&&void 0!==l?l:"")})[0].action,T=E.replace("category=",""),b=n?{brand:n.toString(),category:T,subtype:""}:d?{subtype:d.toString(),category:T,brand:""}:{category:T,brand:"",subtype:""},m=[{type:null!==(l=e.typeName)&&void 0!==l?l:"",label:(0,h.ZH)(null!==(u=e.label)&&void 0!==u?u:"")}];n&&m.push({type:"brand",label:(0,h.ZH)(null!==(s=n.toString())&&void 0!==s?s:"")}),d&&S&&m.push({type:"tireType",label:(0,h.ZH)(null!==(p=S.toString())&&void 0!==p?p:"")}),i({routes:[y.ph[y.bw.VEHICLE_CATALOG],y.ph[y.bw.TIRE_SIZE_CATALOG_OR_CATEGORY]],params:b}),r(m),t({queryText:e.label||"",queryType:"category",pillName:"".concat(e.label,"-personalized-").concat(e.typeName),pillNumber:c}),a(!0)}}}}),l.siteSearchResultList.slice().reverse().forEach(function(e){if(e.typeName===b.y.BRAND&&e.isPillItem){var l,n;L={type:null!==(l=e.typeName)&&void 0!==l?l:"",label:(0,h.ZH)(null!==(n=e.label)&&void 0!==n?n:""),action:e.action,onClick:(l,n)=>()=>{var l,o,s,p,E,T,b;let m=c?{brand:null!==(l=e.label)&&void 0!==l?l:"",category:c.toString(),subtype:""}:d?{brand:null!==(o=e.label)&&void 0!==o?o:"",subtype:d.toString(),category:""}:{brand:null!==(s=e.label)&&void 0!==s?s:"",category:"",subtype:""},A=[{type:null!==(p=e.typeName)&&void 0!==p?p:"",label:(0,h.ZH)(null!==(E=e.label)&&void 0!==E?E:"")}];c&&u&&A.push({type:"category",label:(0,h.ZH)(null!==(T=u.toString())&&void 0!==T?T:"")}),d&&S&&A.push({type:"tireType",label:(0,h.ZH)(null!==(b=S.toString())&&void 0!==b?b:"")}),i({routes:[y.ph[y.bw.VEHICLE_CATALOG],y.ph[y.bw.TIRE_SIZE_CATALOG_OR_CATEGORY]],params:m}),r(A),t({queryText:e.label||"",queryType:"brand",pillName:"".concat(e.label,"-personalized-").concat(e.typeName),pillNumber:n}),a(!0)}}}}),l.siteSearchResultList.slice().reverse().forEach(function(e){if(e.typeName===b.y.VEHICLE&&!E){var l,a;A={type:null!==(l=e.typeName)&&void 0!==l?l:"",label:(0,h.ZH)(null!==(a=e.label)&&void 0!==a?a:""),action:e.action,onClick:(l,a,r,i)=>()=>{let{queryParams:n}=null!=i?i:{queryParams:{}},o=p.Ay.stringify(n),u=m(l);t({queryText:e.label||"",queryType:"vehicle",pillName:"".concat(e.label,"-personalized-").concat(e.typeName),pillNumber:a});let s=r?u.link.href+"&brand=".concat(r.toString()):c?u.link.href+"&category=".concat(c.toString()):d?u.link.href+"&subtype=".concat(d.toString()):u.link.href;o&&(s+=0>s.indexOf("?")?"?".concat(o):"&".concat(o)),T.push(s)}}}})),{sizePillFromSearch:g,categoryPillFromSearch:R,brandPillFromSearch:L,vehiclePillFromSearch:A}};function R(e){var t;let{brandName:l,categoryId:o,categoryName:p,sourcePage:m}=e,R=(0,s.A)(),{setIsSearchOpen:L,vehiclePill:C,tireSizePill:v,guidedShoppingPill:I,tireBrandPill:f,tireTypePill:_,setCurrentInputQuery:k}=(0,c.Z)(e=>({guidedShoppingPill:e.guidedShoppingPill,setCurrentInputQuery:e.setCurrentInputQuery,setIsSearchOpen:e.setIsSearchOpen,tireBrandPill:e.tireBrandPill,tireSizePill:e.tireSizePill,tireTypePill:e.tireTypePill,vehiclePill:e.vehiclePill})),{pastSearches:P,setFilterPills:O,setRouteQueryParamOptions:N,addToDataLayer:D,getPastSearches:w,searchQuery:H,lockSearchStateToTireSize:B,lockSearchStateToVehicle:q}=(0,i.a)(e=>({addToDataLayer:e.addToDataLayer,getPastSearches:e.getPastSearches,lockSearchStateToTireSize:e.lockSearchStateToTireSize,lockSearchStateToVehicle:e.lockSearchStateToVehicle,pastSearches:e.pastSearches,searchQuery:e.searchQuery,setFilterPills:e.setFilterPills,setRouteQueryParamOptions:e.setRouteQueryParamOptions})),{siteTheme:x,customFilterPills:M}=(0,u.Z0)(e=>({siteTheme:e.siteTheme,customFilterPills:e.customFilterPills})),G=M?M.displayOnHomePageWithShortCutFilter:"",Y=M?M.displayName:"",U=null!==(t=(0,E.A)())&&void 0!==t?t:"",V=(0,a.useParams)(),{make:Z,model:z,year:F=""}=null!=V?V:{},j=U.includes(y.ph[y.bw.VEHICLE_CATALOG]),Q=U.includes(y.ph[y.bw.DEALS]),W=!!Z&&!!z&&!F,K=x===d.Ur.BLACK_FRIDAY||x===d.Ur.BLACK_FRIDAY_PRE_SALE?d.wG:x===d.Ur.CYBER_WEEKEND||x===d.Ur.CYBER_MONDAY||x===d.Ur.LAST_CHANCE?d.zI:"",X=(0,h.ZH)((null==Z?void 0:Z.toString().replace("-tires",""))||""),J=(0,h.ZH)((null==z?void 0:z.toString())||""),{vehiclePillFromSearch:$,sizePillFromSearch:ee,categoryPillFromSearch:et,brandPillFromSearch:el}=g({addToDataLayer:D,brandName:l,categoryId:o,categoryName:p,isVehicleRoutes:W||j,pastSearches:P,setFilterPills:O,setIsSearchOpen:L,setRouteQueryParamOptions:N,sourcePage:m});(0,r.useEffect)(()=>{w()},[w]);let ea=(0,r.useCallback)((e,t)=>()=>{let t=A(e);R.push(t.queryText)},[R]),er=(0,r.useCallback)((e,t)=>()=>{let e={promotion:M?M.promotionId:"",customPill:M?M.customPill:""};N({routes:[y.ph[y.bw.VEHICLE_CATALOG],y.ph[y.bw.TIRE_SIZE_CATALOG_OR_CATEGORY]],params:e}),O([{type:"promotion",label:M?M.promotionShortTitle:"TIRE DEALS"}]),L(!0)},[M,O,L,N]),ei=(0,r.useCallback)((e,t)=>()=>{if(l){var e,a,r;let i={};i=Q?{promotion:K,brand:null!==(e=l.toString())&&void 0!==e?e:""}:{brand:null!==(a=l.toString())&&void 0!==a?a:""},N({routes:[y.ph[y.bw.VEHICLE_CATALOG],y.ph[y.bw.TIRE_SIZE_CATALOG_OR_CATEGORY]],params:i}),O([{type:"brand",label:(0,h.ZH)(null!==(r=l.toString())&&void 0!==r?r:"")}]),D({queryText:"brand",queryType:"brand",pillName:"".concat(l,"-personalized-brand"),pillNumber:t}),L(!0)}},[D,l,Q,K,O,L,N]),en=(0,r.useCallback)((e,t)=>()=>{O([{type:"type",label:(0,h.ZH)("electric-vehicle")}]),q("",{pillName:(0,S.ui)("searchByBoard.vehicle"),pillNumber:t}),L(!0)},[O,L,q]),eo=(0,r.useCallback)((e,t)=>()=>{O([{type:"type",label:(0,h.ZH)("electric-vehicle")}]),B({pillName:(0,S.ui)("searchByBoard.tireSize"),pillNumber:t}),L(!0)},[O,L,B]);return(0,r.useMemo)(()=>{var e,t;let a=[];if(W){let e={action:{queryText:"".concat(X," ").concat(J),queryType:n.ke[n.BH.VEHICLE],type:"SiteSearchResultActionQuery"},hasToStop:!0,label:"".concat(X," ").concat(J),onClick:(e,t,l)=>()=>{let{queryParams:a}=null!=l?l:{queryParams:{}},r=Q?{promotion:K,...a}:{...a};N({routes:[y.ph[y.bw.VEHICLE_CATALOG],y.ph[y.bw.TIRE_SIZE_CATALOG_OR_CATEGORY]],params:r}),k({queryText:e.queryText,queryType:e.queryType}),q("",{pillName:(0,S.ui)("searchByBoard.vehicle"),pillNumber:t}),H({queryText:e.queryText,queryType:e.queryType}),L(!0)},type:"vehicle"};a.push(e)}if(j){let e={action:{queryText:"".concat(X," ").concat(J," ").concat(F),queryType:n.ke[n.BH.MAKE_MODEL_YEAR],type:"SiteSearchResultActionQuery"},hasToStop:!0,label:"".concat(F," ").concat(X," ").concat(J),onClick:(e,t,l)=>async()=>{let{queryParams:a}=null!=l?l:{queryParams:{}},r=Q?{promotion:K,...a}:{...a};N({routes:[y.ph[y.bw.VEHICLE_CATALOG],y.ph[y.bw.TIRE_SIZE_CATALOG_OR_CATEGORY]],params:r}),k({queryText:e.queryText,queryType:e.queryType}),q("",{pillName:(0,S.ui)("searchByBoard.vehicle"),pillNumber:t}),L(!0),await H({queryText:e.queryText,queryType:e.queryType})},type:"vehicle"};a.push(e)}if(m===b.V.TIRE_SHOPS||m===b.V.SHOP_DETAILS||m===b.V.HEADER_COMPONENT||m===b.V.HOME||m===b.V.TIRE_DEALS){if(x==d.Ur.BLACK_FRIDAY_PRE_SALE){let e={...T.qU,onClick:er};a.push(e)}if(x==d.Ur.CYBER_WEEKEND){let e={...T.J2,onClick:er};a.push(e)}if(x==d.Ur.CYBER_MONDAY){let e={...T.UH,onClick:er};a.push(e)}if(x==d.Ur.LAST_CHANCE){let e={...T.kX,onClick:er};a.push(e)}if(G){let e={...T.w6,label:Y,onClick:er};a.push(e)}}$&&m!=b.V.DEALS_LANDING_PAGE&&a.push($),!$&&ee&&a.push(ee);let r=null;l?(r={type:b.y.BRAND,label:(0,h.ZH)(null!==(e=l.toString())&&void 0!==e?e:""),action:{link:{href:"brand=".concat(l.toString()),isExternal:!1},type:"SiteSearchResultActionLink"},onClick:ei},a.push(r)):el&&a.push(el),a.push(C),a.push(v),m!=b.V.DEALS_LANDING_PAGE&&a.push(I),el||r||m==b.V.ELECTRIC_TYPE_PAGE||m==b.V.DEALS_LANDING_PAGE||a.push(f);let i=null;if(p&&o?(i={type:b.y.CATEGORY,label:(0,h.ZH)(null!==(t=p.toString())&&void 0!==t?t:""),action:{link:{href:"categories/".concat(p.toString()),isExternal:!1},type:"SiteSearchResultActionLink"},onClick:(e,t)=>()=>{var e,l,a;let r={};r=Q?{promotion:K,category:null!==(e=o.toString())&&void 0!==e?e:""}:{category:null!==(l=o.toString())&&void 0!==l?l:""},N({routes:[y.ph[y.bw.VEHICLE_CATALOG],y.ph[y.bw.TIRE_SIZE_CATALOG_OR_CATEGORY]],params:r}),O([{type:"category",label:(0,h.ZH)(null!==(a=p.toString())&&void 0!==a?a:"")}]),D({queryText:p.toString()||"",queryType:"category",pillName:"".concat(p.toString(),"-personalized-categories"),pillNumber:t}),L(!0)}},a.push(i)):et&&a.push(et),et||i||m==b.V.ELECTRIC_TYPE_PAGE||a.push(_),m===b.V.TIRE_SHOPS||m===b.V.SHOP_DETAILS||m===b.V.HEADER_COMPONENT){let e={...T.C8,onClick:ea};a.push(e)}return m===b.V.ELECTRIC_TYPE_PAGE&&(C.onClick=en,v.onClick=eo),a},[D,l,ei,el,X,J,o,p,et,Y,G,eo,en,I,W,j,K,Q,q,er,ea,H,k,O,L,N,x,ee,m,f,v,_,C,$,F])}},63748:(e,t,l)=>{function a(){return!0}function r(){return!!window.IntersectionObserver&&!!window.IntersectionObserverEntry&&"intersectionRatio"in window.IntersectionObserverEntry.prototype}function i(){return/^((?!chrome|android|windows).)*safari/i.test(window.navigator.userAgent)}function n(e){let{url:t,windowName:l,width:a,height:r}=e;if(window&&window.top){let e=window.top.outerHeight/2+window.top.screenY-r/2,i=window.top.outerWidth/2+window.top.screenX-a/2;return window.open(t,l,"toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=no, resizable=no, copyhistory=no, width=".concat(a,", height=").concat(r,", top=").concat(e,", left=").concat(i))}return null}l.d(t,{Bd:()=>a,PZ:()=>n,nr:()=>i,qW:()=>r})},66427:(e,t,l)=>{l.d(t,{V:()=>a,y:()=>r});var a=function(e){return e.BRAND_PAGE="BRAND_PAGE",e.CATEGORY_PAGE="CATEGORY_PAGE",e.DEALS_LANDING_PAGE="DEALS_LANDING_PAGE",e.ELECTRIC_TYPE_PAGE="ELECTRIC_TYPE_PAGE",e.HEADER_COMPONENT="HEADER_COMPONENT",e.HEADER_COMPONENT_VMM="HEADER_COMPONENT_VMM",e.HEADER_COMPONENT_YMM="HEADER_COMPONENT_YMM",e.HOME="HOME",e.SHOP_DETAILS="SHOP_DETAILS",e.TIRE_DEALS="TIRE_DEALS",e.TIRE_SHOPS="TIRE_SHOPS",e.TYPE_PAGE="TYPE_PAGE",e}({}),r=function(e){return e.BF_DEAL="bfDealsPill",e.BF_PRE_SALE="bfPreSalePill",e.BRAND="brand",e.CATEGORY="category",e.CM_DEAL="cmDealsPill",e.CUSTOM_FILTER_PILL="customFilterPill",e.CW_DEAL="cwDealsPill",e.GUIDEDSHOPPING="guidedShopping",e.LAST_CHANCE_DEAL="lastChanceDealsPill",e.SHOPS="shopsPill",e.TIRE_SIZE="tireSize",e.TIRE_TYPE="tireType",e.VEHICLE="vehicle",e}({})},69637:(e,t,l)=>{l.d(t,{A:()=>s});var a=l(14232),r=l(84859),i=l(46605),n=l(64590),o=l(54292),c=l(25847);let u={[n.y.DESKTOP]:{width:1350,height:940},[n.y.TABLET]:{width:800,height:600},[n.y.MOBILE]:{width:412,height:660}};function s(){let e=function(){let[e,t]=(0,a.useReducer)(e=>e+1,0);return t}(),t=(0,o.o)(),l=(0,r._)(e=>{var t;return null!==(t=e.userAgentType)&&void 0!==t?t:n.y.MOBILE}),s=t?{height:window.innerHeight,width:window.innerWidth}:u[l];return(0,a.useEffect)(()=>{if(!t)return;let l=(0,c.A)(e,i.E.MS300,{isImmediate:!1});return window.addEventListener("resize",l),()=>window.removeEventListener("resize",l)},[t,e]),s}},72219:(e,t,l)=>{l.d(t,{L:()=>c,a:()=>u});var a=l(29747),r=l(14232),i=l(36307),n=l(27632);let o=(0,i.q6)();function c(e){let{children:t}=e,l=function(){let{addPastSearch:e,deletePastSearches:t,getPastSearches:l,isSearchClearAll:a,pastSearches:i}=(0,n.MN)(),{clearSearchResults:o,hasSearchResultsError:c,isLoadingResults:u,searchQuery:s,searchResults:y,addToDataLayer:d}=(0,n.WB)(),{hasLockedSearchState:p,lockSearchStateToBrand:h,lockSearchStateToGuidedShopping:S,lockSearchStateToTireSize:E,lockSearchStateToVehicle:T,lockSearchStateToVehicleGuidedShopping:b,lockSearchStateToTireType:m,lockSearchStateToYMM:A,searchState:g,setHasLockedSearchState:R,setSearchState:L}=(0,n.Z_)({searchQuery:s}),[C,v]=(0,r.useState)(!1),[I,f]=(0,r.useState)(),[_,k]=(0,r.useState)([]);return{addPastSearch:e,addToDataLayer:d,clearSearchResults:o,deletePastSearches:t,filterPills:_,getPastSearches:l,hasLockedSearchState:p,hasSearchResultsError:c,isLoadingResults:u,isSearchClearAll:a,lockSearchStateToBrand:h,lockSearchStateToGuidedShopping:S,lockSearchStateToTireSize:E,lockSearchStateToTireType:m,lockSearchStateToVehicle:T,lockSearchStateToVehicleGuidedShopping:b,lockSearchStateToYMM:A,pastSearches:i,routeQueryParamOptions:I,searchQuery:s,searchResults:y,searchState:g,setFilterPills:k,setHasLockedSearchState:R,setRouteQueryParamOptions:f,setSearchState:L,setShouldPreventLinkNavigation:v,shouldPreventLinkNavigation:C}}();return(0,a.Y)(o.Provider,{value:l,"data-element":"unknown","data-component":"SearchContextProvider",children:t})}let u=(e,t)=>(0,i.i7)(o,e,t)},76454:(e,t,l)=>{l.d(t,{M:()=>c});var a=l(735),r=l.n(a),i=l(14232),n=l(78096),o=l(32384);function c(e,t){let l=(0,i.useCallback)(()=>{try{let l=o.ds.getItem(e);if(l)return JSON.parse(l);return t&&o.ds.setItem(e,JSON.stringify(t)),t}catch(l){return n.A.error("Error reading localStorage key “".concat(e,"”:"),l),t}},[e,t]),[a,c]=(0,i.useState)(l),u=(0,i.useCallback)(()=>{c(e=>{let t=l();return r()(e,t)?e:t})},[l]),s=(0,i.useCallback)(t=>{try{c(l=>{let a=t instanceof Function?t(l):t;return r()(l,a)?l:(o.ds.setItem(e,JSON.stringify(a)),window.dispatchEvent(new Event("local-storage")),a)})}catch(t){n.A.error("Error setting localStorage key “".concat(e,"”:"),t)}},[e]);return(0,i.useEffect)(()=>{u()},[u]),(0,i.useEffect)(()=>{let t=t=>{t.key===e&&u()};return window.addEventListener("storage",t),()=>{window.removeEventListener("storage",t)}},[e,u]),[a,s]}},89444:(e,t,l)=>{l.d(t,{b:()=>u});var a=l(37441),r=l(14232),i=l(21155),n=l(53324),o=l(31402),c=l(86089);function u(e){let{defaultData:t,endpoint:l,includeAuthorization:u=!1,includeUserRegion:s=!1,includeUserSessionId:y=!1,includeUserSSOUid:d=!1,includeUserTime:p=!1,includeWidgetId:h=!1,includeUserZip:S=!1,revalidateEmitter:E,params:T={},query:b={},options:m={},shouldFetch:A=!0}=e;(0,a.I)()&&(b.channel="widget");let g=function(e){let{endpoint:t,includeAuthorization:l=!1,includeUserRegion:a=!1,includeUserSessionId:u=!1,includeUserSSOUid:s=!1,includeUserTime:y=!1,includeWidgetId:d=!1,includeUserZip:p=!1,params:h={},query:S={},revalidateEmitter:E,options:T={},shouldFetch:b=!0}=e,m=(0,n.P)()?[t,JSON.stringify(S)]:null,A=(0,i.Ay)(b?m:null,async()=>(await (0,o.l)(),(0,c.hd)({endpoint:t,includeAuthorization:l,includeUserRegion:a,includeUserSessionId:u,includeUserSSOUid:s,includeUserTime:y,includeUserZip:p,includeWidgetId:d,method:"get",params:h,query:{...S}})),T);return(0,r.useEffect)(()=>{if(E)return E.on(A.mutate),()=>{E.off(A.mutate)}},[E,A.mutate]),A}({endpoint:l,includeAuthorization:u,includeUserRegion:s,includeUserSessionId:y,includeUserSSOUid:d,includeUserTime:p,includeUserZip:S,includeWidgetId:h,options:m,params:T,query:b,revalidateEmitter:E,shouldFetch:A});return{data:{...t,...g.data},apiResponse:g}}},96243:(e,t,l)=>{l.d(t,{Ur:()=>a,wG:()=>r,zI:()=>i});var a=function(e){return e.BLACK_FRIDAY="blackFriday",e.BLACK_FRIDAY_PRE_SALE="blackFridayPreSale",e.CYBER_MONDAY="cyberMonday",e.CYBER_WEEKEND="cyberWeekend",e.DEFAULT="default",e.LAST_CHANCE="lastChance",e.TAX_TIME_SALE="taxTimeSale",e}({});let r="2378,2379,2380,2381",i="2404,2405,2406,2407"}}]);