PageSourceSearch

https://www.hutsoninc.com/component---src-pages-lp-unverferth-jm-hot-deals-js-a3ed47760319bbbd03ab.js

js hutsoninc.com collected 2026-10-04 07:06:35 UTC 12,243 bytes, 2 lines download raw bytes

1"use strict";(self.webpackChunk_hutson_www=self.webpackChunk_hutson_www||[]).push([[5483],{16025:function(e,t,n){n.r(t);var o=n(42236),a=n(28007),i=n(92568),l=n(68154),r=n(71822),s=n(10769),c=n(61344),m=n(13340),d=n.n(m),u=n(88110),h=n(19598),p=n(65873),g=n(14675),f=n(86457),w=n(65264),v=n(9119),E=n.n(v);const y=e=>{const t={},n=new URLSearchParams(e);for(let[o,a]of n.entries())a&&(/[^\d]/.test(a)||(a=Number(a)),t.hasOwnProperty(o)?t[o]=[t[o],a]:t[o]=a);return t},x={Relevance:e=>e,"Recently Added":e=>e.sort((e,t)=>e.modifiedDate<t.modifiedDate?1:e.modifiedDate>t.modifiedDate?-1:null),"Price: Low - High":e=>e.sort((e,t)=>e.price<t.price?-1:e.price>t.price?1:null),"Price: High - Low":e=>e.sort((e,t)=>e.price>t.price?-1:e.price<t.price?1:null),"Engine Hours: Low - High":e=>e.sort((e,t)=>e.engineHoursMeter<t.engineHoursMeter?-1:e.engineHoursMeter>t.engineHoursMeter?1:null),"Engine Hours: High - Low":e=>e.sort((e,t)=>e.engineHoursMeter>t.engineHoursMeter?-1:e.engineHoursMeter<t.engineHoursMeter?1:null),"Year: Newest - Oldest":e=>e.sort((e,t)=>e.modelYear>t.modelYear?-1:e.modelYear<t.modelYear?1:null),"Year: Oldest - Newest":e=>e.sort((e,t)=>e.modelYear<t.modelYear?-1:e.modelYear>t.modelYear?1:null)},b={location:"Location",minHours:"Min Hours",maxHours:"Max Hours",condition:"Condition"},H=[10,20,30],C=i.default.div.withConfig({displayName:"unverferth-jm-hot-deals__Content",componentId:"sc-10jzow0-0"})(["box-sizing:border-box;margin:0 auto;padding:40px 0;width:85%;@media (min-width:1024px){padding:40px 25px;width:1024px;}"]),S=i.default.div.withConfig({displayName:"unverferth-jm-hot-deals__TitleBar",componentId:"sc-10jzow0-1"})(["margin:0 0 30px;"]),N=i.default.div.withConfig({displayName:"unverferth-jm-hot-deals__TitleContainer",componentId:"sc-10jzow0-2"})(["@media (min-width:1024px){display:inline-block;margin-right:3%;vertical-align:bottom;width:72%;}"]),j=i.default.h1.withConfig({displayName:"unverferth-jm-hot-deals__Title",componentId:"sc-10jzow0-3"})(["font-size:1.75em;margin:0;"]),_=i.default.div.withConfig({displayName:"unverferth-jm-hot-deals__FilterTagClose",componentId:"sc-10jzow0-4"})(["border-right:1px solid #d7d7d7;display:inline-block;font-size:1.3em;font-weight:600;padding:6px 8px;vertical-align:middle;"]),k=(0,i.default)(f.A).withConfig({displayName:"unverferth-jm-hot-deals__FilterTag",componentId:"sc-10jzow0-5"})(["background-color:#ebebeb;color:#7d7d7d;cursor:pointer;display:inline-block;font-size:1em;font-weight:lighter;line-height:1;margin:10px 10px 0 0;text-decoration:none;:hover,:focus{background-color:#dbdbdb;color:#6d6d6d;","{border-right:1px solid #c7c7c7;}}"],_),A=i.default.div.withConfig({displayName:"unverferth-jm-hot-deals__FilterTagText",componentId:"sc-10jzow0-6"})(["display:inline-block;padding:6px 8px;vertical-align:middle;"]),z=i.default.div.withConfig({displayName:"unverferth-jm-hot-deals__Sort",componentId:"sc-10jzow0-7"})(["display:none;@media (min-width:1024px){display:inline-block;vertical-align:bottom;width:25%;}"]),I=i.default.div.withConfig({displayName:"unverferth-jm-hot-deals__ShowingBar",componentId:"sc-10jzow0-8"})(["border-bottom:1px solid #d7d7d7;color:#999;margin-bottom:40px;padding:5px 0;width:100%;"]),L=i.default.div.withConfig({displayName:"unverferth-jm-hot-deals__ChangeShowing",componentId:"sc-10jzow0-9"})(["display:none;@media (min-width:1024px){display:block;float:right;}"]),M=(0,i.default)(f.A).withConfig({displayName:"unverferth-jm-hot-deals__ChangeShowingOption",componentId:"sc-10jzow0-10"})(["@media (min-width:1024px){color:",";cursor:",";display:inline-block;font-weight:",";text-decoration:",";:not(:first-of-type){margin-left:8px;}:hover,:focus{text-decoration:underline;}}"],e=>e["aria-selected"]?"#7d7d7d":"#377539",e=>e["aria-selected"]?"default":"pointer",e=>e["aria-selected"]?"700":"400",e=>e["aria-selected"]?"underline":"none"),F=i.default.div.withConfig({displayName:"unverferth-jm-hot-deals__ColumnsContainer",componentId:"sc-10jzow0-11"})(["@media (min-width:1024px){","}"],g.J),P=i.default.div.withConfig({displayName:"unverferth-jm-hot-deals__FiltersColumn",componentId:"sc-10jzow0-12"})(["margin-bottom:40px;@media (min-width:1024px){"," margin-bottom:0;}"],(0,p.f)("1/4")),O=i.default.div.withConfig({displayName:"unverferth-jm-hot-deals__ProductsColumn",componentId:"sc-10jzow0-13"})(["@media (min-width:1024px){","}"],(0,p.f)("3/4")),q=i.default.div.withConfig({displayName:"unverferth-jm-hot-deals__NoneFound",componentId:"sc-10jzow0-14"})(["background-color:#f6f6f6;border:1px solid #d7d7d7;font-size:1em;padding:10px 20px;"]),T=(0,i.default)(c.A).withConfig({displayName:"unverferth-jm-hot-deals__StyledPagination",componentId:"sc-10jzow0-15"})(["padding:0 0 40px;text-align:center;@media (min-width:800px){padding:0 0 60px;}"]),Y=e=>{let{data:{allMachineFinderEquipment:t},location:{pathname:n}}=e;return{equipment:t.nodes,meta:{title:"Hot Deals | Used Equipment | Hutson Inc",pageUrl:`https://www.hutsoninc.com${n}`},pathname:n}},R=e=>{let{equipment:t=[],filter:n,itemsShowing:a,onFilter:i,search:l}=e,{location:r}=n;const{0:s,1:c}=(0,o.useState)([]);void 0===r&&(r="All Locations"),(0,o.useEffect)(()=>{const e=t.reduce((e,t)=>
1{const n=t.location.name;return-1===e.indexOf(n)&&e.push(n),e},[]).sort();c(e)},[t]);return o.createElement("select",{className:"All Locations"!==r?"filled":"",value:r,onChange:e=>{var t;t=e.target.value,i({...n,itemsShowing:a,search:l,location:"All Locations"===t?"":t},!0)},name:"Location"},o.createElement("option",{value:"All Locations"},"All Locations"),s.map(e=>o.createElement("option",{key:e,value:e},e)))},U=e=>{let{filter:t,itemsShowing:n,onFilter:a,search:i}=e,{maxHours:l,minHours:r}=t;void 0===r&&(r=0),void 0===l&&(l="None");const s=e=>{const o=e.target.getAttribute("name");((e,o)=>{const l={};"minHours"===o?l.minHours=e:"maxHours"===o&&(l.maxHours="None"===e?"":e),a({...t,...l,itemsShowing:n,search:i},!0)})(e.target.value,o)};return o.createElement(o.Fragment,null,o.createElement("label",null,"Min Hours",o.createElement("select",{className:r?"filled":"",value:r,onChange:s,name:"minHours"},o.createElement("option",{value:"0"},"0"),o.createElement("option",{value:"250"},"250"),o.createElement("option",{value:"500"},"500"),o.createElement("option",{value:"1000"},"1,000"),o.createElement("option",{value:"2000"},"2,000"),o.createElement("option",{value:"3000"},"3,000"),o.createElement("option",{value:"4000"},"4,000"),o.createElement("option",{value:"5000"},"5,000"))),o.createElement("label",null,"Max Hours",o.createElement("select",{className:"None"!==l?"filled":"",value:l,onChange:s,name:"maxHours"},o.createElement("option",{value:"None"},"None"),o.createElement("option",{value:"250"},"250"),o.createElement("option",{value:"500"},"500"),o.createElement("option",{value:"1000"},"1,000"),o.createElement("option",{value:"2000"},"2,000"),o.createElement("option",{value:"3000"},"3,000"),o.createElement("option",{value:"4000"},"4,000"),o.createElement("option",{value:"5000"},"5,000"))))},D=e=>{let{filter:t,itemsShowing:n,onFilter:a,search:i}=e,{condition:l,...r}=t;void 0===l&&(l="Any Condition");return o.createElement("select",{className:"Any Condition"!==l?"filled":"",value:l,onChange:e=>{const t={};"any"!==e.target.value&&(t.condition=e.target.value),a({...r,...t,itemsShowing:n,search:i},!0)},name:"Condition"},o.createElement("option",{value:"any"},"Any Condition"),o.createElement("option",{value:"New"},"New"),o.createElement("option",{value:"Used"},"Used"))};t.default=e=>{const t=Y(e),{0:n,1:i}=(0,o.useState)(1),{0:c,1:m}=(0,o.useState)(10),{0:p,1:g}=(0,o.useState)("Recently Added"),{0:f,1:v}=(0,o.useState)({}),{0:$,1:B}=(0,o.useState)(""),{0:J,1:W}=(0,o.useState)(t.equipment),G=(0,o.useRef)(null),{meta:K={},pathname:Q}=t;(0,w.S)(()=>{if(window.addEventListener("popstate",V),e.location.search){const t=y(e.location.search);let{page:n,itemsShowing:o,search:a="",sort:i,...l}=t;X({...l,page:n,itemsShowing:o,sort:i,search:a},!1)}return()=>{window.removeEventListener("popstate",V)}});const V=()=>{const t=y(e.location.search);t.hasOwnProperty("search")||(t.search=""),X(t,!1)},X=async function(e,n){void 0===n&&(n=!0);let{page:o=1,itemsShowing:l=10,sort:r,search:s,...c}=e,u=t.equipment;if(""!==s){const e=[];(await ne(s)).forEach(t=>{for(let n=0;n<u.length;n++)if(u[n].slug===t.slug){e.push(u[n]);break}}),u=e}if(r?u=x[r](u):r=""!==s?"Relevance":p,l&&(l=Number(l)),c.condition){const e="New"===c.condition;u=u.filter(t=>t.isNew===e)}c.location&&(u=((e,t,n)=>{const o=Array.isArray(t)?t:[t];return e.filter(e=>E().get(e,o)===n)})(u,["location","name"],c.location)),c.minHours>0&&(c.minHours=Number(c.minHours),u=u.filter(e=>c.minHours<=e.engineHoursMeter)),c.maxHours&&(c.maxHours=Number(c.maxHours),u=u.filter(e=>c.maxHours>=e.engineHoursMeter));const h=d()(c);if(v(h),i(o),m(l),g(r),B(s),W(u),n){const e={...h,page:o,itemsShowing:l,sort:r};s&&(e.search=s);const t=new URLSearchParams(e);(0,a.navigate)(`${Q}?${t.toString()}`)}},Z=e=>{const t=Number(e.target.innerText);t!==c&&X({...f,itemsShowing:t,sort:p,search:$||""})},ee=e=>{const t=e.target.value||e.target.getAttribute("data-value");t!==p&&X({...f,sort:t,itemsShowing:c,search:$||""})},te=e=>{const t=e.currentTarget.getAttribute("data-filter");X({...f,itemsShowing:c,search:$||"",[t]:""})},ne=async e=>(await fetch("/api/search",{method:"POST",headers:{"Content-Type":"application/json"},credentials:"include",body:JSON.stringify({query:e})}).then(e=>e.json())).filter(e=>/used/i.test(e.tag)&&!/used\spage/i.test(e.tag)),oe=[],ae=(n-1)*c;for(let o=ae,a=J.length;o<a&&o<ae+c;o++)oe.push(J[o]);const ie=Math.ceil(J.length/c);let le;le=n*c>J.length?J.length:n*c;const re=n*c-(c-1);return o.createElement(r.A,{kind:"white"},o.createElement(l.Helmet,null,o.createElement("title",null,K.title),o.createElement("meta",{property:"og:title",content:K.title}),o.createElement("meta",{property:"og:url",content:K.pageUrl}),o.createElement("meta",{property:"twitter:card",content:"summary"}),o.createElement("meta",{name:"twitter:site",content:"@Hutson_Inc"}),o.createElement("meta",{name:"robots",content:"noindex, nofollow"})),o.createElement(C,null,o.createElement(S,null,o.createElement(N,null,o.createElement(j,null,"Hot Deals")),o.createElement(z,null,o.createElement("select",{value:p,onChange:ee,name:"Sort"},Object.keys(x).map(e=>o.createElement("option",{value:e,key:`Sort_${e}`},e)))),o.createElement("div",null,$&&o.createElement(k,{onClick:te,"data-filter":"search"},o.createElement(_,null,"×"),o.createElement(A,null,"Search: ",$)),Object.keys(f).map(e=>o.createElement(k,{key:e,onClick:te,"data-filter":e},o.createElement(_,null,"×"),o.createElement(A,null,b[e],": ",((e,t)=>
1{switch(t){case"minHours":case"maxHours":return e.toLocaleString("en-US");default:return e}})(f[e],e)))))),o.createElement(F,null,o.createElement(P,null,o.createElement(u.A,null),o.createElement(h.A,{filter:[{heading:"Location",content:o.createElement(R,{equipment:t.equipment,itemsShowing:c,search:$||"",filter:f,onFilter:X})},{heading:"Condition",content:o.createElement(D,{itemsShowing:c,search:$||"",filter:f,onFilter:X})},{heading:"Hours",content:o.createElement(U,{itemsShowing:c,search:$||"",filter:f,onFilter:X})}],sort:{value:p,options:Object.keys(x),onChange:ee},desktopWidth:1024})),o.createElement(O,null,o.createElement(I,null,J.length>0&&o.createElement(o.Fragment,null,"Showing ",re,le>1&&o.createElement("span",null,"-",le)," of ",J.length),0===J.length&&o.createElement("span",null,"No equipment found."),o.createElement(L,{"aria-label":"Results per page"},"Show:"," ",H.map(e=>o.createElement(M,{"aria-selected":c===e,key:e,onClick:Z},e)))),o.createElement("div",{ref:G,tabIndex:"-1"}),J.length>0&&o.createElement(o.Fragment,null,oe.map((e,t)=>o.createElement("div",{key:t},o.createElement(s.A,Object.assign({},e,{hotDeal:!0}))))),0===J.length&&o.createElement(q,null,"No equipment found matching your search.")))),ie>1&&o.createElement(T,{onPageChange:e=>{if(n!==e){const t={...d()(f),page:e,itemsShowing:c,sort:p};$&&(t.search=$),i(e);const n=new URLSearchParams(t);(0,a.navigate)(`${Q}?${n.toString()}`),G.current.focus()}},currentPage:n,totalPages:ie}))}}}]);
2//# sourceMappingURL=component---src-pages-lp-unverferth-jm-hot-deals-js-a3ed47760319bbbd03ab.js.map

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.