PageSourceSearch

https://www.lodestartech.com/98.fc29bd9e4aaf037640ea.js

js lodestartech.com collected 2026-10-09 22:41:47 UTC 5,053 bytes, 37 lines download raw bytes

1/*! @version pwa-studio: 2.12, @magento/venia-ui: ~11.6.0, @magento/upward-security-headers: ~1.0.14, @magento/pwa-theme-venia: ~2.4.0, @magento/pwa-buildpack: ~11.5.4, @magento/peregrine: ~14.5.1, @magento/pagebuilder: ~9.3.3, @magento/eslint-config: ~1.5.0, @magento/babel-preset-peregrine: ~1.3.3, @apollo/client: ~3.13.8 */
2(window.webpackJsonp=window.webpackJsonp||[]).push([[98],{P2xv:function(e,t,n){"use strict"
3n.r(t),n.d(t,"default",function(){return p}),n.d(t,"FilterSidebarShimmer",function(){return b.a})
4var a=n("q1tI"),l=n.n(a),r=n("kriW"),s=n("17x9"),i=n("j/pM"),c=n("dqEZ"),o=n("x9m2"),u=n("yZeJ"),f=n("Ty5D")
5const d=e=>{const{filters:t,filterCountToOpen:n,setFilterOptions:s}=e,d=Object(i.a)({filters:t}),{filterApi:p,filterItems:b,filterNames:O,filterFrontendInput:m,filterState:g,handleApply:h,handleReset:j}=d,y=Object(a.useRef)(),w=e.classes,v=Object(f.h)(),S=Array.from(b,e=>{let[t]=e
6if("price"==t){const e=new URLSearchParams(v.search),t=new Set(e.keys())
7for(const n of t)if("price[filter]"==n){const t=e.get("price[filter]"),n={title:t.split(",")[0],value:t.split(",")[1]},a=new Set
8a.add(n),g.set("price",new Set(a))}}}),k=Object(a.useCallback)(function(){const e=y.current
9if(e&&"function"==typeof e.getBoundingClientRect){const t=e.getBoundingClientRect().top,n=window.scrollY+t-150
10window.scrollTo(0,n)}h(...arguments)},[h,y])
11Object(a.useEffect)(()=>{g&&s(g)},[g,s])
12const E=Object(a.useMemo)(()=>Array.from(b,(e,t)=>{let[a,r]=e
13const s=g.get(a),i=O.get(a),c=m.get(a)
14return l.a.createElement(u.a,{key:a,filterApi:p,filterState:s,filterFrontendInput:c,group:a,items:r,name:i,onApply:k,initialOpen:t<n})}),[p,b,O,m,g,n,k]),C=g.size?l.a.createElement("div",{className:(null==w?void 0:w.action)||""},l.a.createElement(c.a,{type:"button",onClick:j},l.a.createElement(r.a,{id:"filterModal.action",defaultMessage:"Clear all"}))):null
15return l.a.createElement("aside",{ref:y,"aria-busy":"false"},l.a.createElement("div",{className:(null==w?void 0:w.body)||""},l.a.createElement("div",{className:(null==w?void 0:w.header)||""},l.a.createElement("h2",{className:(null==w?void 0:w.headerTitle)||""},l.a.createElement(r.a,{id:"filterModal.headerTitle",defaultMessage:"Filters"}))),S,l.a.createElement(o.a,{filterApi:p,filterNames:O,filterState:g,onRemove:k}),C,l.a.createElement("ul",{className:(null==w?void 0:w.blocks)||""},E)))}
16d.defaultProps={filterCountToOpen:3},d.propTypes={classes:Object(s.shape)({action:s.string,blocks:s.string,body:s.string,header:s.string,headerTitle:s.string,root:s.string,root_open:s.string}),filters:Object(s.arrayOf)(Object(s.shape)({attribute_code:s.string,items:s.array})),filterCountToOpen:s.number}
17var p=d,b=n("QS6f")},"j/pM":function(e,t,n){"use strict"
18n.d(t,"a",function(){return f})
19var a=n("q1tI"),l=n("+TN3"),r=n("Ty5D"),s=n("OlZo"),i=n("y1Xp"),c=n("Mhql"),o=n("+wQL"),u=n("qykw")
20const f=e=>{const{filters:t}=e,n=Object(i.a)(u.a,e.operations),{getFilterInputsQuery:f}=n,[d,p]=Object(a.useState)(!1),[{drawer:b},{toggleDrawer:O,closeDrawer:m}]=Object(s.b)(),[g,h]=Object(c.a)(),j=Object(a.useRef)(null),y="filter"===b,w=Object(r.g)(),{pathname:v,search:S}=Object(r.h)(),{data:k}=Object(l.f)(f),E=Object(a.useMemo)(()=>t.map(e=>{let{attribute_code:t}=e
21return t}),[t]),C=Object(a.useMemo)(()=>{const e=new Set
22return"/search.html"!==v&&(e.add("category_id"),e.add("category_uid")),e},[v]),M=Object(a.useMemo)(()=>{const e=new Set,t=k?k.__type.inputFields:[]
23for(const{name:n}of t){const t=E.includes(n),a=!C.has(n)
24t&&a&&e.add(n)}return e},[C,E,k]),N=e=>{const t=JSON.stringify(e)
25return e.length<=2&&(t.includes(JSON.stringify({__typename:"AggregationOption",label:"0",value:"0"}))||t.includes(JSON.stringify({__typename:"AggregationOption",label:"1",value:"1"})))},[A,_,T,I]=Object(a.useMemo)(()=>{const e=new Map,n=new Set,a=new Map,l=new Map,r=Object(o.f)([...t])
26for(const t of r){const{options:r,label:s,attribute_code:i}=t
27if(M.has(i)){const t=[]
28if(e.set(i,s),n.add("".concat(i,"[filter]")),N(r))a.set(i,"boolean"),t.push({title:"No",value:"0",label:s+":No"}),t.push({title:"Yes",value:"1",label:s+":Yes"})
29else{a.set(i,null)
30for(const{label:e,value:n}of r)t.push({title:Object(o.g)(e),value:n})}l.set(i,t)}}return[e,n,l,a]},[t,M])
31Object(a.useEffect)(()=>{if(d){const e=Object(o.d)(S,_,g)
32w.push({pathname:v,search:e}),p(!1)}},[_,g,w,d,v,S])
33const F=Object(a.useCallback)(()=>{O("filter")},[O]),R=Object(a.useCallback)(()=>{m()},[m]),J=Object(a.useCallback)(()=>{p(!0),R()},[R]),q=Object(a.useCallback)(()=>{w.replace({search:"page=1"})},[w]),D=Object(a.useCallback)(e=>{if(y)switch(e.keyCode){case 27:R()}},[y,R])
34return Object(a.useEffect)(()=>{const e=null===j.current&&"filter"===b,t="filter"===j.current&&null===b
35if(e||t){const e=Object(o.e)(S,_,T)
36h.setItems(e)}t&&R(),j.current=b},[b,h,T,_,S,R]),Object(a.useEffect)(()=>{const e=Object(o.e)(S,_,T)
37h.setItems(e)},[h,T,_,S]),{filterApi:h,filterItems:T,filterKeys:_,filterNames:A,filterFrontendInput:I,filterState:g,handleApply:J,handleClose:R,handleKeyDownActions:D,handleOpen:F,handleReset:q,isApplying:d,isOpen:y}}}}])

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.