PageSourceSearch

https://www.matcotools.com/_next/static/chunks/pages/find-a-distributor-6598c4bd818a5103.js

js matcotools.com collected 2026-10-04 00:31:21 UTC 15,594 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9324],{433:function(e,t,r){"use strict";r.r(t),r.d(t,{__N_SSP:function(){return re},default:function(){return ne}});var n=r(59499),s=r(16523),i=r(9008),a=r.n(i),o=r(80168),l=r(38124),d=r(67294),c=r(85893),u=function(e){var t=e.content;return(0,c.jsx)("div",{className:"h-fit w-full rounded-lg bg-blue-100 px-7.5 py-9",children:(0,c.jsx)(s.Rte,{json:t,className:"text-xl leading-6"})})},p=r(86010),f=r(87248),h=r(79526),x=r(68768),b=r(81064),m=r(98888),g=r(19759),y=r(47269),j=r(4898),v=r(13037),O=r(17674),N=r(90116),w=r(51897),k=["-----","-----"],P=[].concat((0,N.Z)(w.fY),[k],(0,N.Z)(w.S_)).map((function(e){var t=(0,O.Z)(e,2),r=t[0];return{value:t[1],label:r}})),S=[{fieldId:"shopName",required:!0,placeholder:"Shop Name",fieldType:"text",label:"Shop Name"},{fieldId:"addressFinder",required:!1,placeholder:"Start typing the first line of your address",fieldType:"address_lookup",label:"Address Finder"},{fieldId:"streetAddress",required:!0,placeholder:"Shop Street Address",fieldType:"text",label:"Shop Street Address"},{fieldId:"city",required:!0,placeholder:"Shop City",fieldType:"text",label:"Shop City"},{fieldId:"state",required:!0,fieldType:"select",label:"Shop State / Province",placeholder:"Select an option",uppercase:!0,data:P},{fieldId:"postalCode",required:!0,placeholder:"Shop Zip / Postal Code",fieldType:"text",label:"Shop Zip / Postal Code"},{fieldId:"isManualAddressLookup",required:!1,defaultValue:!1,fieldType:"locationSelectionCheckBox",label:"Enter address manually",ifCheckedText:"Enter address automatically"},{fieldId:"techShop",required:!1,defaultValue:!1,fieldType:"checkbox",label:"I am a Tech in a shop"}],L=r(7258);function D(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}var M={required:"Must be at least 1 character",minLength:"Must be at least 1 character"},A={required:"Must be at least 1 character",minLength:"Must be at least 1 character"},C={required:"Must be at least 1 character",minLength:"Must be at least 1 character"},E={required:"Must be at least 1 character",minLength:"Must be at least 1 character"},_={required:"Must be at least 1 character",minLength:"Must be at least 1 character",maxLength:"Must not exceed 6 characters"},Z={isManualAddressLookup:L.bool().default(!1),shopName:L.string().min(1,M.minLength).required(M.minLength),addressFinder:L.string().when("isManualAddressLookup",{is:function(e){return!e},then:L.string()}),streetAddress:L.string().when("isManualAddressLookup",{is:function(e){return e},then:L.string().min(1,A.minLength).required(A.minLength)}),city:L.string().when("isManualAddressLookup",{is:function(e){return e},then:L.string().min(1,C.minLength).required(C.minLength)}),state:L.string().when("isManualAddressLookup",{is:function(e){return e},then:L.string().min(1,E.minLength).required(E.minLength)}),postalCode:L.string().when("isManualAddressLookup",{is:function(e){return e},then:L.string().min(1,_.minLength).max(6,_.maxLength).required(_.minLength)}),techShop:L.bool().default(!1)},F=L.object().shape(function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?D(Object(r),!0).forEach((function(t){(0,n.Z)(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):D(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}({},Z)),q=(L.object().shape({}),r(51581));function I(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 T(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?I(Object(r),!0).forEach((function(t){(0,n.Z)(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):I(Object(r)).forEac
1h((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var V=["shopName","addressFinder","isManualAddressLookup","techShop"],z=function(e){var t=e.setFindDistributorData,r=(0,s.useValidation)(v.useFindDistributorMutation,(function(e){var r=e.getDistributor.findDistributor;t(r)}),F),n=r.handleSubmit,i=r.clientValidationErrors,a=r.serverValidationErrors,l=r.control,d=r.getValues,u=r.setValue,O=r.watch,N=r.mutation,w=r.trigger,L=r.resetField,D=function(e){var t,r=e.fieldId,n=e.placeholder,s=e.label,p=e.fieldType,y=e.required,j=e.data,v=e.defaultValue,O=e.uppercase,N=e.ifCheckedText,P={error:(null===i||void 0===i||null===(t=i[null!==r&&void 0!==r?r:""])||void 0===t?void 0:t.message)||(null===a||void 0===a?void 0:a[null!==r&&void 0!==r?r:""])||"",placeholder:n,label:s,"data-testid":r,type:p,name:r,required:y,control:l,data:j||[],defaultValue:"undefined"!==typeof v?v:"",uppercase:O||!1},S=((null===d||void 0===d?void 0:d())||{}).isManualAddressLookup;switch(p){case"select":return(0,c.jsx)(f.p,T(T({labelKey:"label"},P),{},{handleDisabled:function(e){return e===k[0]}}));case"address_lookup":return(0,c.jsx)(o.m,T(T({},P),{},{onChangeCallback:(0,q.Xt)({setValue:u,keys:["streetAddress"]}),placeSelectionCallback:(0,q.t3)({setValue:u,trigger:w,isManualAddressLookup:S}),handleInputIconClick:(0,q.Qg)({resetField:L}),InputIcon:(0,c.jsx)(h.Z,{strokeWidth:"1.5",className:"absolute right-3.5 top-[50%] translate-y-[-50%]"})}));case"locationSelectionCheckBox":return(0,c.jsx)(x.w,T(T({},P),{},{ifCheckedText:N,additionalClassName:"py-6 border-y-1 border-y-grey-500 w-full my-4",label:s,additionalElement:(0,c.jsx)(b.Z,{}),errorProps:{className:"text-red-600 text-xs ml-[30px] mt-2"}}));case"checkbox":return(0,c.jsx)(m.w,T(T({position:"right"},P),{},{label:s,errorProps:{className:"text-red-600 text-xs ml-[30px] mt-2"}}));default:return(0,c.jsx)(g.M,T({},P))}};O("isManualAddressLookup");var M=d("isManualAddressLookup");return(0,c.jsxs)("div",{className:"w-full",children:[(0,c.jsxs)("div",{className:"flex items-center  gap-x-2 rounded-t-lg border-x-1  border-t-1 border-grey-500 bg-grey-300 px-4 py-3 md:py-4 md:px-8",children:[(0,c.jsx)(y.Z,{}),(0,c.jsx)("p",{className:"text-2xl font-medium text-black md:text-3.5xl",children:"Distributor Locator"})]}),(0,c.jsxs)("div",{className:"rounded-b-lg border-1 border-grey-500 py-8 px-4 md:py-4 md:px-8",children:[(0,c.jsx)("p",{className:"pb-4",children:"Shop Information"}),(0,c.jsx)("form",{onSubmit:n((function(e){var t,r=e.postalCode,n=e.city,s=e.state,i=e.techShop,a=e.shopName,o=e.streetAddress;N.mutateAsync({city:n,techShop:i,state:null===(t=P.find((function(e){return e.label===s})))||void 0===t?void 0:t.value,address1:o,zip:r,company:a})})),children:(0,c.jsxs)("div",{children:[S.map((function(e,t){return M&&"addressFinder"===e.fieldId?null:V.includes(e.fieldId)||M?(0,c.jsx)("div",{className:(0,p.Z)({"mt-4":0!==t}),children:D(e)},e.fieldId):null})),(0,c.jsx)("div",{className:"mt-8",children:(0,c.jsx)(j.z,{"data-testid":"submit",isLoading:N.isLoading,uppercase:!0,buttonType:"submit",type:"rounded",size:"default",fullWidth:"always",className:(0,p.Z)("!font-medium",{"!py-1.5":N.isLoading}),children:"Find my distributor"})})]})})]})]})},U=r(58106),R=r(53878),W=r(53594),X=r(41590),B=function(e){var t=e.info;return(0,c.jsx)("p",{className:"cursor-default text-tiny text-grey-600",children:t})},K=function(e){var t=e.handleSubmit,r=e.data,n=[r.shopName,r.shopAddress,r.shopCity,"".concat(r.shopState," ").concat(r.shopZip)].filter((function(e){return!(null===e||void 0===e||!e.trim())})).join(", ");return(0,c.jsxs)("div",{className:"w-full",children:[(0,c.jsxs)("div",{className:"flex items-center  gap-x-2 rounded-t-lg border-x-1  border-t-1 border-grey-500 bg-grey-300 px-4 py-3 md:py-4 md:px-8",children:[(0,c.jsx)(y.Z,{}),(0,c.jsx)("p",{className:"text-2xl font-medium text-black md:text-3.5xl",children:"Distributor Locator"})]}),(0,c.jsxs)("div",{className:"rounded-b-lg border-1 border-grey-500 py-8 px-4 md:py-4 md:px-8",children:[(0,c.jsx)("p",{className:"pb-4",children:"Your authorized Matco Tools Distributor is"}),(0,c.jsxs)("p",{className:"pb-2 text-2xl font-bold text-black",children:[r.dbrFirstName," ",r.dbrLastName]}),(0,c.jsxs)("div",{className:"grid grid-cols-[15px_1fr] gap-x-2 pb-2",children:[(0,c.jsx)(U.Z,{}),r.dbrEmailAddress?(0,c.jsx)("a",{className:"text-tiny text-blue-500",href:"mailto:".concat(r.dbrEmailAddress),children:r.dbrEmailAddress}):(0,c.jsx)("p",{className:"cursor-default text-tiny text-grey-900",children:"No email address"})]}),(0,c.jsxs)("div",{className:"grid grid-cols-[15px_1fr] gap-x-2 pb-2",children:[(0,c.jsx)(R.Z,{}),r.dbrMobilePhone?(0,c.jsxs)("div",{className:"gap-x-1 text-tiny",children:[(0,c.jsx)("a",{className:"text-tiny text-blue-500 hover:text-blue-600",href:"tel:".concat(r.dbrMobilePhone),children:r.dbrMobilePhone})," ",(0,c.jsx)("span",{className:"cursor-default text-tiny text-grey-900",children:"(mobile)"})]}):(0,c.jsx)(B,{info:"No mobile phone"})]}),(0,c.jsxs)("div",{className:"grid grid-cols-[15px_1fr] gap-x-2 pb-2",children:[(0,c.jsx)(R.Z,{}),r.dbrOfficePhone?(0,c.jsxs)("div",{className:"gap-x-1 text-tiny",children:[(0,c.jsx)("a",{className:"text-tiny text-blue-500 hover:text-blue-600",href:"tel:".concat(r.dbrOfficePhone),children:r.dbrOfficePhone})," ",(0,c.jsx)("span",{className:"cursor-default text-tiny text-grey-900",children:"(office)"})]}):(0,c.jsx)(B,{info:"No office phone"})]}),(0,c.jsxs)("div",{className:"grid grid-cols-[15px_1fr] gap-x-2 pb-2",children:[(0,c.jsx)(W.Z,{}),r.dbrUrl&&r.dbrEnabledSite?(0,c.jsx)("a",{className:"text-tiny text-blue-500 hover:cursor-pointer hover:text-blue-600",href:r.dbrUrl,children:r.dbrUrl}):r.dbrUrl&&!r.dbrEnabledSite?(0,c.jsxs)("span",{className:"text-tiny",children:[" ",r.dbrUrl," "]}):(0,c.jsx)(B,{info:"No site"})]}),(0,c.jsxs)("div",{className:"grid grid-cols-[15px_1fr] gap-x-2 pb-8",children:[(0,c.jsx)(X.Z,{}),(0,c.jsx)("p",{className:"cursor-default text-tiny text-grey-900",children:n||"No location"})]}),(0,c.jsx)(j.z,{onClick:t,"data-testid":"findAgain",uppercase:!0,type:"rounded",kind:"bright",size:"default",fullWidth:"always",children:"Find again"})]})]})},Q=r(5902),Y=function(e){var t=e.layout,r=e.context,n=e.notification,i=e.message;return(0,c.jsxs)("div",{children:[i.included&&null!==i&&void 0!==i&&i.message?(0,c.jsx)("p",{className:"text-center text-5xl font-medium text-blue-500 md:py-8",children:i.message}):(0,c.jsx)(c.Fragment,{}),n.included&&null!==n&&void 0!==n&&n.message?(0,c.jsxs)("div",{className:"my-6 flex items-start gap-x-2 rounded-lg bg-blue-100 py-8 px-4 md:items-center md:justify-center",children:[(0,c.jsx)(Q.Z,{}),(0,c.jsx)("p",{className:"w-[calc(100%_-_16px)] md:w-fit",children:n.message})]}):(0,c.jsx)(c.Fragment,{}),(0,c.jsx)(s.Renderer,{layout:t,context:r})]})},$=function(e){var t=e.noDistributorFoundBottomLayout,r=e.context,n=e.noDistributorMessage,s=e.noDistributorNotification,i=e.findADistributorInfoText,a=i.infoContent,o=i.heading,l=(0,d.useState)(null),p=l[0],f=l[1],h="object"===typeof p&&p,x=null===p||void 0===p?void 0:p.distributor,b=(0,d.useCallback)((function(){return f(null)}),[]);return(0,c.jsx)(c.Fragment,{children:!h||h&&x?(0,c.jsxs)(c.Fragment,{children:[(0,c.jsx)("h3",{className:"pb-8 text-4xl font-medium uppercase text-black",children:o}),(0,c.jsxs)("div",{className:"grid w-full gap-y-4 md:gap-x-8 lg:grid-cols-[2fr_1fr]",children:[(0,c.jsx)(u,{content:a,isNotFullWidth:!0}),h?(0,c.jsx)(K,{handleSubmit:b,data:p}):(0,c.jsx)(z,{setFindDistributorData:f})]})]}):(0,c.jsx)(Y,{layout:t,context:r,message:n,notification:s})})};function H(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 G(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};
1t%2?H(Object(r),!0).forEach((function(t){(0,n.Z)(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):H(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var J=function(e){var t=e.context;return(0,c.jsxs)(c.Fragment,{children:[(0,c.jsx)(o.g,{siteConfig:null===t||void 0===t?void 0:t.config}),(0,c.jsxs)("div",{className:"w-full pb-8 md:pb-12",children:[(0,c.jsxs)("div",{className:"mg:px-0 flex items-end py-3 sm:py-5",children:[(0,c.jsx)(l.$,{text:"Home",href:"/",isLast:!1,isClickable:!0,className:"text-xl text-blue-500 hover:text-blue-600"}),(0,c.jsx)(l.$,{text:"Find A Distributor",href:"/find-a-distributor",isLast:!0,isClickable:!1,className:" text-xl text-black hover:cursor-default hover:no-underline"})]}),(0,c.jsx)($,G({},e))]})]})};function ee(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 te(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?ee(Object(r),!0).forEach((function(t){(0,n.Z)(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ee(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var re=!0,ne=function(e){var t=e.cmsPageData;return(0,c.jsxs)("div",{className:"flex min-h-screen flex-col justify-between",children:[(0,c.jsxs)(a(),{children:[(0,c.jsx)("title",{children:null===t||void 0===t?void 0:t.meta.seo.metaTitle}),(0,c.jsx)("meta",{property:"og:title",content:null===t||void 0===t?void 0:t.meta.seo.opengraphTitle}),(0,c.jsx)("meta",{name:"description",content:null===t||void 0===t?void 0:t.meta.seo.metaDescription},"titleDescription"),(0,c.jsx)("meta",{name:"keywords",content:null===t||void 0===t?void 0:t.meta.seo.metaKeywords},"titleKeywords")]}),t&&(0,c.jsx)(s.Renderer,te(te({},t),{},{children:(0,c.jsx)(J,te({},t))}))]})}},51581:function(e,t,r){"use strict";r.d(t,{Qg:function(){return u},Xt:function(){return l},t3:function(){return d},xR:function(){return f}});var n=r(59499),s=r(17674),i=r(50029),a=r(87794),o=r.n(a),l=function(e){var t=e.setValue,r=e.keys;return function(e){r.forEach((function(r){t(r,e)}))}},d=function(e){var t=e.setValue,r=e.isManualAddressLookup,n=e.trigger;return function(){var e=(0,i.Z)(o().mark((function e(i){var a;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(a=[],Object.entries(i).forEach((function(e){var r=(0,s.Z)(e,2),n=r[0],i=r[1];null===t||void 0===t||t(n,i),i||a.push(n)})),!a.length){e.next=6;break}return t("isManualAddressLookup",!r),e.next=6,n(a);case 6:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()},c=["state","postalCode","streetAddress","city","city"],u=function(e){var t=e.resetField;return function(e){var r=e.setPlacesSuggestions,n=e.onChange;r([]),c.forEach((function(e){return t(e)})),n("")}},p=["additionalStreetInfo","city","country","email","firstName","lastName","phone","postalCode","state","streetName"],f=function(e){return p.reduce((function(t,r){return Object.assign(t,(0,n.Z)({},r,null===e||void 0===e?void 0:e[r]))}),{})}},46324:function(e,t,r){(window.__NEXT_P=window.__NEXT_P||[]).push(["/find-a-distributor",function(){return r(433)}])}},function(e){e.O(0,[1557,554,9774,2888,179],(function(){return t=46324,e(e.s=t);var t}));var t=e.O();_N_E=t}]);

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.