PageSourceSearch

https://www.norrmalmsel.se/static/js/6.d4229e50.chunk.js

js norrmalmsel.se collected 2026-09-26 20:46:01 UTC 35,450 bytes, 2 lines download raw bytes

1(window.__LOADABLE_LOADED_CHUNKS__=window.__LOADABLE_LOADED_CHUNKS__||[]).push([[6],{"1MkH":function(e,t,n){"use strict";var i=n("G9jD"),r=n.n(i),a=n("OPbP"),o=n("uY8o"),s=n("U49c"),u=n("AKWZ"),l=n("Qyje"),c=n.n(l),d=n("q1tI"),p=n("ttZb"),f=n("vbcS");t.a=function e(t){var n,i=Object(o.b)(),l=t.location,v=t.searchQuery,m=t.children,h=d.useContext(a.a),g=h.offset,b=h.perPage,y=d.useRef(),k=d.useRef(0),O=Object(u.a)().clearAllFilters;Object(s.a)(!v,"You did not pass 'searchQuery' to SearchPageBehaviour");var P=Object(p.d)(r.a),S=d.useMemo((function(){return c.a.parse(l.search,{ignoreQueryPrefix:!0}).term}),[l]);return d.useEffect((function(){y.current&&y.current!==S&&O(),y.current=S}),[O,S]),d.useEffect((function(){k.current=g}),[g]),void 0===i?d.createElement(o.a,null,d.createElement(e,Object.assign({},t))):S?d.createElement(f.b,{variables:{term:S,first:b,limit:b,filters:(null===(n=P.data)||void 0===n?void 0:n.activeFilters)||null,offset:k.current===g?0:g,client:!0},query:v,fetchPolicy:"cache-and-network"},(function(e){var t,n,i,r,a,o,s=null===(i=null===(n=null===(t=null==e?void 0:e.data)||void 0===t?void 0:t.search)||void 0===n?void 0:n.products)||void 0===i?void 0:i.totalResults,u=null===(o=null===(a=null===(r=null==e?void 0:e.data)||void 0===r?void 0:r.search)||void 0===a?void 0:a.products)||void 0===o?void 0:o.filters;return d.createElement(d.Fragment,null,m({result:e,total:s,filters:u,term:S,loading:e.loading,error:e.error}))})):m({term:S,loading:!1,error:null,total:0,result:{},filters:{}})}},"3e8h":function(e,t,n){"use strict";var i=n("q1tI"),r=n.n(i),a=(n("17x9"),"/Users/brians/git/react-slider/src/components/ReactSlider/ReactSlider.jsx");function o(){return(o=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e}).apply(this,arguments)}function s(e,t){return(s=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function u(e){return e&&e.stopPropagation&&e.stopPropagation(),e&&e.preventDefault&&e.preventDefault(),!1}function l(e){return null==e?[]:Array.isArray(e)?e.slice():[e]}function c(e){return null!==e&&1===e.length?e[0]:e.slice()}function d(e){Object.keys(e).forEach((function(t){"undefined"!=typeof document&&document.addEventListener(t,e[t],!1)}))}function p(e,t){return f(function(e,t){var n=e;n<=t.min&&(n=t.min);n>=t.max&&(n=t.max);return n}(e,t),t)}function f(e,t){var n=(e-t.min)%t.step,i=e-n;return 2*Math.abs(n)>=t.step&&(i+=n>0?t.step:-t.step),parseFloat(i.toFixed(5))}var v=function(e){var t,n;function i(t){var n;(n=e.call(this,t)||this).onKeyUp=function(){n.onEnd()},n.onMouseUp=function(){n.onEnd(n.getMouseEventMap())},n.onTouchEnd=function(){n.onEnd(n.getTouchEventMap())},n.onBlur=function(){n.setState({index:-1},n.onEnd(n.getKeyDownEventMap()))},n.onMouseMove=function(e){n.setState({pending:!0});var t=n.getMousePosition(e),i=n.getDiffPosition(t[0]),r=n.getValueFromPosition(i);n.move(r)},n.onTouchMove=function(e){if(!(e.touches.length>1)){n.setState({pending:!0});var t=n.getTouchPosition(e);if(void 0===n.isScrolling){var i=t[0]-n.startPosition[0],r=t[1]-n.startPosition[1];n.isScrolling=Math.abs(r)>Math.abs(i)}if(n.isScrolling)n.setState({index:-1});else{var a=n.getDiffPosition(t[0]),o=n.getValueFromPosition(a);n.move(o)}}},n.onKeyDown=function(e){if(!(e.ctrlKey||e.shiftKey||e.altKey||e.metaKey))switch(n.setState({pending:!0}),e.key){case"ArrowLeft":case"ArrowDown":case"Left":case"Down":e.preventDefault(),n.moveDownByStep();break;case"ArrowRight":case"ArrowUp":case"Right":case"Up":e.preventDefault(),n.moveUpByStep();break;case"Home":e.preventDefault(),n.move(n.props.min);break;case"End":e.preventDefault(),n.move(n.props.max);break;case"PageDown":e.preventDefault(),n.moveDownByStep(n.props.pageFn(n.props.step));break;case"PageUp":e.preventDefault(),n.moveUpByStep(n.props.pageFn(n.props.step))}},n.onSliderMouseDown=function(e){if(!n.props.disabled&&2!==e.button){if(n.setState({pending:!0}),!n.props.snapDragDisabled){var t=n.getMousePosition(e);n.forceValueFromPosition(t[0],(function(e){n.start(e,t[0]),d(n.getMouseEventMap())}))}u(e)}},n.onSliderClick=function(e){if(!n.props.disabled&&n.props.onSliderClick&&!n.hasMoved){var t=n.getMousePosition(e),i=p(n.calcValue(n.calcOffsetFromPosition(t[0])),n.props);n.props.onSliderClick(i)}},n.createOnKeyDown=function(e){return function(t){n.props.disabled||(n.start(e),d(n.getKeyDownEventMap()),u(t))}},n.createOnMouseDown=function(e){return function(t){if(!n.props.disabled&&2!==t.button){n.setState({pen
vendor: 9,842 bytes, line 1
1ding:!0});var i=n.getMousePosition(t);n.start(e,i[0]),d(n.getMouseEventMap()),u(t)}}},n.createOnTouchStart=function(e){return function(t){if(!(n.props.disabled||t.touches.length>1)){n.setState({pending:!0});var i=n.getTouchPosition(t);n.startPosition=i,n.isScrolling=void 0,n.start(e,i[0]),d(n.getTouchEventMap()),function(e){e.stopPropagation&&e.stopPropagation()}(t)}}},n.handleResize=function(){var e=window.setTimeout((function(){n.pendingResizeTimeouts.shift(),n.resize()}),0);n.pendingResizeTimeouts.push(e)},n.renderThumb=function(e,t){var i=n.props.thumbClassName+" "+n.props.thumbClassName+"-"+t+" "+(n.state.index===t?n.props.thumbActiveClassName:""),r={ref:function(e){n["thumb"+t]=e},key:n.props.thumbClassName+"-"+t,className:i,style:e,onMouseDown:n.createOnMouseDown(t),onTouchStart:n.createOnTouchStart(t),onFocus:n.createOnKeyDown(t),tabIndex:0,role:"slider","aria-orientation":n.props.orientation,"aria-valuenow":n.state.value[t],"aria-valuemin":n.props.min,"aria-valuemax":n.props.max,"aria-label":Array.isArray(n.props.ariaLabel)?n.props.ariaLabel[t]:n.props.ariaLabel,"aria-labelledby":Array.isArray(n.props.ariaLabelledby)?n.props.ariaLabelledby[t]:n.props.ariaLabelledby},a={index:t,value:c(n.state.value),valueNow:n.state.value[t]};return n.props.ariaValuetext&&(r["aria-valuetext"]="string"==typeof n.props.ariaValuetext?n.props.ariaValuetext:n.props.ariaValuetext(a)),n.props.renderThumb(r,a)},n.renderTrack=function(e,t,i){var r={key:n.props.trackClassName+"-"+e,className:n.props.trackClassName+" "+n.props.trackClassName+"-"+e,style:n.buildTrackStyle(t,n.state.upperBound-i)},a={index:e,value:c(n.state.value)};return n.props.renderTrack(r,a)};var i=l(t.value);i.length||(i=l(t.defaultValue)),n.pendingResizeTimeouts=[];for(var r=[],a=0;a<i.length;a+=1)i[a]=p(i[a],t),r.push(a);return n.state={index:-1,upperBound:0,sliderLength:0,value:i,zIndices:r},n}n=e,(t=i).prototype=Object.create(n.prototype),t.prototype.constructor=t,s(t,n);var a=i.prototype;return a.componentDidMount=function(){"undefined"!=typeof window&&(window.addEventListener("resize",this.handleResize),this.resize())},i.getDerivedStateFromProps=function(e,t){var n=l(e.value);return n.length?t.pending?null:{value:n.map((function(t){return p(t,e)}))}:null},a.componentDidUpdate=function(){0===this.state.upperBound&&this.resize()},a.componentWillUnmount=function(){this.clearPendingResizeTimeouts(),"undefined"!=typeof window&&window.removeEventListener("resize",this.handleResize)},a.onEnd=function(e){e&&function(e){Object.keys(e).forEach((function(t){"undefined"!=typeof document&&document.removeEventListener(t,e[t],!1)}))}(e),this.hasMoved&&this.fireChangeEvent("onAfterChange"),this.setState({pending:!1}),this.hasMoved=!1},a.getValue=function(){return c(this.state.value)},a.getClosestIndex=function(e){for(var t=Number.MAX_VALUE,n=-1,i=this.state.value,r=i.length,a=0;a<r;a+=1){var o=this.calcOffset(i[a]),s=Math.abs(e-o);s<t&&(t=s,n=a)}return n},a.getMousePosition=function(e){return[e["page"+this.axisKey()],e["page"+this.orthogonalAxisKey()]]},a.getTouchPosition=function(e){var t=e.touches[0];return[t["page"+this.axisKey()],t["page"+this.orthogonalAxisKey()]]},a.getKeyDownEventMap=function(){return{keydown:this.onKeyDown,keyup:this.onKeyUp,focusout:this.onBlur}},a.getMouseEventMap=function(){return{mousemove:this.onMouseMove,mouseup:this.onMouseUp}},a.getTouchEventMap=function(){return{touchmove:this.onTouchMove,touchend:this.onTouchEnd}},a.getValueFromPosition=function(e){var t=e/(this.state.sliderLength-this.state.thumbSize)*(this.props.max-this.props.min);return p(this.state.startValue+t,this.props)},a.getDiffPosition=function(e){var t=e-this.state.startPosition;return this.props.invert&&(t*=-1),t},a.resize=function(){var e=this.slider,t=this.thumb0;if(e&&t){var n=this.sizeKey(),i=e.getBoundingClientRect(),r=e[n],a=i[this.posMaxKey()],o=i[this.posMinKey()],s=t.getBoundingClientRect()[n.replace("client","").toLowerCase()],u=r-s,l=Math.abs(a-o);this.state.upperBound===u&&this.state.sliderLength===l&&this.state.thumbSize===s||this.setState({upperBound:u,sliderLength:l,thumbSize:s})}},a.calcOffset=function(e){var t=this.props.max-this.props.min;return 0===t?0:(e-this.props.min)/t*this.state.upperBound},a.calcValue=function(e){return e/this.state.upperBound*(this.props.max-this.props.min)+this.props.min},a.calcOffsetFromPosition=function(e){var t=this.slider.getBoundingClientRect(),n=t[this.posMaxKey()],i=t[this.posMinKey()],r=e-(window["page"+this.axisKey()+"Offset"]+(this.props.invert?n:i));return this.props.invert&&(r=this.state.sliderLength-r),r-=this.state.thumbSize/2},a.forceValueFromPosition=function(e,t){var n=this,i=this.calcOffsetFromPosition(e),r=this.getClosestIndex(i),a=p(this.calcValue(i),this.props),o=this.state.value.slice();o[r]=a;for(var s=0;s<o.length-1;s+=1)if(o[s+1]-o[s]<this.props.minDistance)return;this.fireChangeEvent("onBeforeChange"),this.hasMoved=!0,this.setState({value:o},(function(){t(r),n.fireChangeEvent("onChange")}))},a.clearPendingResizeTimeouts=function(){do{var e=this.pendingResizeTimeouts.shift();clearTimeout(e)}while(this.pendingResizeTimeouts.length)},a.start=function(e,t){var n=this["thumb"+e];n&&n.focus();var i=this.state.zIndices;i.splice(i.indexOf(e),1),i.push(e),this.setState((function(n){return{startValue:n.value[e],startPosition:void 0!==t?t:n.startPosition,index:e,zIndices:i}}))},a.moveUpByStep=function(e){void 0===e&&(e=this.props.step);var t=p(this.state.value[this.state.index]+e,this.props);this.move(Math.min(t,this.props.max))},a.moveDownByStep=function(e){void 0===e&&(e=this.props.step);var t=p(this.state.value[this.state.index]-e,this.props);this.move(Math.max(t,this.props.min))},a.move=function(e){var t=this.state,n=t.index,i=t.value,r=i.length,a=i[n];if(e!==a){this.hasMoved||this.fireChangeEvent("onBeforeChange"),this.hasMoved=!0;var o=this.props,s=o.pearling,u=o.max,l=o.min,c=o.minDistance;if(!s){if(n>0){var d=i[n-1];e<d+c&&(e=d+c)}if(n<r-1){var p=i[n+1];e>p-c&&(e=p-c)}}i[n]=e,s&&r>1&&(e>a?(this.pushSucceeding(i,c,n),function(e,t,n,i){for(var r=0;r<e;r+=1){var a=i-r*n;t[e-1-r]>a&&(t[e-1-r]=a)}}(r,i,c,u)):e<a&&(this.pushPreceding(i,c,n),function(e,t,n,i){for(var r=0;r<e;r+=1){var a=i+r*n;t[r]<a&&(t[r]=a)}}(r,i,c,l))),this.setState({value:i},this.fireChangeEvent.bind(this,"onChange"))}},a.pushSucceeding=function(e,t,n){var i,r;for(r=e[i=n]+t;null!==e[i+1]&&r>e[i+1];r=e[i+=1]+t)e[i+1]=f(r,this.props)},a.pushPreceding=function(e,t,n){for(var i=n,r=e[i]-t;null!==e[i-1]&&r<e[i-1];r=e[i-=1]-t)e[i-1]=f(r,this.props)},a.axisKey=function(){return"vertical"===this.props.orientation?"Y":"X"},a.orthogonalAxisKey=function(){return"vertical"===this.props.orientation?"X":"Y"},a.posMinKey=function(){return"vertical"===this.props.orientation?this.props.invert?"bottom":"top":this.props.invert?"right":"left"},a.posMaxKey=function(){return"vertical"===this.props.orientation?this.props.invert?"top":"bottom":this.props.invert?"left":"right"},a.sizeKey=function(){return"vertical"===this.props.orientation?"clientHeight":"clientWidth"},a.fireChangeEvent=function(e){this.props[e]&&this.props[e](c(this.state.value),this.state.index)},a.buildThumbStyle=function(e,t){var n={position:"absolute",touchAction:"none",willChange:this.state.index>=0?this.posMinKey():"",zIndex:this.state.zIndices.indexOf(t)+1};return n[this.posMinKey()]=e+"px",n},a.buildTrackStyle=function(e,t){var n={position:"absolute",willChange:this.state.index>=0?this.posMinKey()+","+this.posMaxKey():""};return n[this.posMinKey()]=e,n[this.posMaxKey()]=t,n},a.buildMarkStyle=function(e){var t;return(t={position:"absolute"})[this.posMinKey()]=e,t},a.renderThumbs=function(e){for(var t=e.length,n=[],i=0;i<t;i+=1)n[i]=this.buildThumbStyle(e[i],i);for(var r=[],a=0;a<t;a+=1)r[a]=this.renderThumb(n[a],a);return r},a.renderTracks=function(e){var t=[],n=e.length-1;t.push(this.renderTrack(0,0,e[0]));for(var i=0;i<n;i+=1)t.push(this.renderTrack(i+1,e[i],e[i+1]));return t.push(this.renderTrack(n+1,e[n],this.state.upperBound)),t},a.renderMarks=function(){var e=this,t=this.props.marks,n=this.props.max-this.props.min+1;return"boolean"==typeof t?t=Array.from({length:n}).map((function(e,t){return t})):"number"==typeof t&&(t=Array.from({length:n}).map((function(e,t){return t})).filter((function(e){return e%t==0}))),t.map(parseFloat).sort((function(e,t){return e-t})).map((function(t){var n=e.calcOffset(t),i={key:t,className:e.props.markClassName,style:e.buildMarkStyle(n)};return e.props.renderMark(i)}))},a.render=function(){for(var e=this,t=[],n=this.state.value,i=n.length,a=0;a<i;a+=1)t[a]=this.calcOffset(n[a],a);var o=this.props.withTracks?this.renderTracks(t):null,s=this.renderThumbs(t),u=this.props.marks?this.renderMarks():null;return r.a.createElement("div",{ref:function(t){e.slider=t},style:{position:"relative"},className:this.props.className+(this.props.disabled?" disabled":""),onMouseDown:this.onSliderMouseDown,onClick:this.onSliderClick},o,s,u)},i}(r.a.Component);v.displayName="ReactSlider",v.defaultProps={min:0,max:100,step:1,pageFn:function(e){return 10*e},minDistance:0,defaultValue:0,orientation:"horizontal",className:"slider",thumbClassName:"thumb",thumbActiveClassName:"active",trackClassName:"track",markClassName:"mark",withTracks:!0,pearling:!1,disabled:!1,snapDragDisabled:!1,invert:!1,marks:[],renderThumb:function(e){return r.a.createElement("div",o({},e,{__self:v,__source:{fileName:a,lineNumber:353,columnNumber:31}}))},renderTrack:function(e){return r.a.createElement("div",o({},e,{__self:v,__source:{fileName:a,lineNumber:354,columnNumber:31}}))},renderMark:function(e){return r.a.createElement("span",o({},e,{__self:v,__source:{fileName:a,lineNumber:355,columnNumber:30}}))}},v.propTypes={},t.a=v},"9VJZ":function(e,t,n){"use strict";var i=n("NS7r");t.a=i.a},AKWZ:function(e,t,n){"use strict";n.d(t,"a",(function(){return o}
1));var i=n("J4zp"),r=n.n(i),a=n("ttZb");function o(){var e=Object(a.c)({kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"ClearFilters"},variableDefinitions:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"clearAllFilters"},arguments:[],directives:[{kind:"Directive",name:{kind:"Name",value:"client"},arguments:[]}]}]}}],loc:{start:0,end:67,source:{body:"\n    mutation ClearFilters {\n      clearAllFilters @client\n    }\n  ",name:"GraphQL request",locationOffset:{line:1,column:1}}}}),t=r()(e,1)[0];return{clearAllFilters:function(){return t()}}}},B2Ge:function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var i=n("J4zp"),r=n.n(i),a=n("ttZb");function o(e){var t=Object(a.c)({kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"SetBool"},variableDefinitions:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"setBoolFilter"},arguments:[{kind:"Argument",name:{kind:"Name",value:"id"},value:{kind:"Variable",name:{kind:"Name",value:"id"}}},{kind:"Argument",name:{kind:"Name",value:"value"},value:{kind:"Variable",name:{kind:"Name",value:"value"}}}],directives:[{kind:"Directive",name:{kind:"Name",value:"client"},arguments:[]}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"value"},arguments:[],directives:[{kind:"Directive",name:{kind:"Name",value:"client"},arguments:[]}]}]}}]}}],loc:{start:0,end:116,source:{body:"\n    mutation SetBool {\n      setBoolFilter(id: $id, value: $value) @client {\n        value @client\n      }\n    }\n  ",name:"GraphQL request",locationOffset:{line:1,column:1}}}}),n=r()(t,1)[0];return{apply:function(t){var i=t.value;return n({variables:{id:e.filter.id,value:i}})}}}},CPrP:function(e,t,n){"use strict";n.d(t,"a",(function(){return x}));var i=n("J4zp"),r=n.n(i),a=n("OPbP");var o=function(e,t){return e.reduce((function(e,n,i){return n?e.concat({breakpoint:t[i],value:n}):e}),[])},s=n("lj/P"),u=n("T3N7"),l=n("q1tI"),c=n.n(l);function d(e){return(d="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function p(){return(p=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e}).apply(this,arguments)}var f=function(e){var t=void 0===e?{}:e,n=t.ref,i=t.defaultWidth,r=void 0===i?1:i,a=t.defaultHeight,o=void 0===a?1:a,s=t.useDefaults,u=void 0===s||s,c=Object(l.useRef)(null);n=n||c;var f=Object(l.useState)(u?{width:r,height:o}:null),v=f[0],m=f[1],h=Object(l.useRef)({width:r,height:o});return Object(l.useEffect)((function(){if("object"===d(n)&&null!==n&&n.current instanceof Element){var e=n.current,t=new ResizeObserver((function(e){if(Array.isArray(e)&&e.length){var t=e[0],n=Math.round(t.contentRect.width),i=Math.round(t.contentRect.height);h.current.width===n&&h.current.height===i||(h.current.width=n,h.current.height=i,m({width:n,height:i}))}}));return t.observe(e),function(){return t.unobserve(e)}}}),[n,n.current]),Object(l.useMemo)((function(){return p({ref:n},v)}),[n,v?v.width:null,v?v.height:null])},v=!1;try{var m=Object.defineProperty({},"passive",{get:function(){return v=!0,!0}}),h=function(){return null};window.addEventListener("testPassive",h,m),window.removeEventListener("testPassive",h,m)}catch(M){}var g=v;function b(e){var t=e.index,n=e.cache,i=e.row,r=e.column,a=e.columns,o=e.itemHeight;return n[t]=o?n[t]||{position:"absolute",left:r*(100/a)+"%",top:i*o+"px",width:100/a+"%",height:o+"px"}:{width:100/a+"%"},n[t]}var y={};function k(e){var t=e.id,n=void 0===t?"default":t,i=e.items,r=e.component,a=e.defaultVisible,o=void 0===a?16:a,s=e.defaultOffset,u=void 0===s?0:s,d=e.columns,p=void 0===d?4:d,v=e.overscanRows,m=void 0===v?3:v,h=e.className,k=e.onScroll,O=Object(l.useRef)(null),P=Object(l.useRef)(null),S=Object(l.useState)(o),N=S[0],x=S[1],M=Object(l.useState)(u),w=M[0],j=M[1],E=f({ref:O}),D=E.width,T=E.height,R=f({ref:P}).height;R>1&&(y[n]=R);var C=y[n]||null,A=Object(l.useRef)({}),F=Object(l.useCallback)((function(){if(C&&D&&T&&O.current){var e=window.innerHeight,t=O.current.getBoundingClientRect(),n=t.top,r=t.bottom,a=Math.floor(Math.max(-n,0)/C),o=Math.max(0,a-m),s=Math.min(m,a),u=Math.ceil((e-Math.max(n,0)+Math.min(r-e,0))/C);x((u+s+m)*p),j(o*p);var l=Math.min(a*p,i.length-1);return{firstVisibleIndex:l,lastVisibleIndex:Math.min(l+u*p,i.length-1)}}return{firstVisibleIndex:null,lastVisibleIndex:null}}),[C,D,T,p,m,i.length]),V=Object(l.useCallback)((function(){var e=F(),t=e.firstVisibleIndex,n=e.lastVisibleIndex;k&&k({firstVisibleIndex:t,lastVisibleIndex:n})}),[F,k]);Object(l.useLayoutEffect)((function(){A.current={},F();var e=!!g&&{passive:!0};return window.addEventListener("scroll",V,e),function(){return window.removeEventListener("scroll",V,e)}}),[F,V]);var L=Object(l.useMemo)((function(){for(var e=[],t=Math.min(w+N,i.length),n=w;n<t;n++){var a=i[n],o=Math.floor(n/p),s=n%p;e.push(c.a.createElement(r,{key:n,item:a,style:b({index:n,cache:A.current,row:o,column:s,columns:p,itemHeight:C}),innerRef:n===w?P:null}))}return e}),[i,w,N,C,p]),I=null===C?{position:"relative"}:{position:"relative",height:Math.ceil(i.length/p)*C};return c.a.createElement("div",{className:h,style:I,ref:O},L)}var O=n("lLbm"),P=function(e,t){var n={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.indexOf(i)<0&&(n[i]=e[i]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(i=Object.getOwnPropertySymbols(e);r<i.length;r++)t.indexOf(i[r])<0&&Object.prototype.propertyIsEnumerable.call(e,i[r])&&(n[i[r]]=e[i[r]])}return n},S=k;function N(e){var t=e.id,n=e.items,i=e.className,o=void 0===i?"":i,s=e.prevOffset,d=e.itemsPerRow,p=void 0===d?0:d,f=e.component,v=Object(l.useContext)(a.a),m=v.perPage,h=v.goToPage,g=v.currentPage,b=Object(l.useState)(null),y=r()(b,2),k=y[0],O=y[1],P=Object(l.useCallback)((function(e){var t=e.firstVisibleIndex,n=Math.floor((t+(s+m))/m+1);O(n)}),[m,s]);return Object(l.useEffect)((function(){k&&k!==g&&h(k,{replace:!0})}),[k,g,h]),c.a.createElement("div",{"data-testid":"product-grid"},c.a.createElement(S,{id:t,className:Object(u.a)("product-grid",o),columns:p,items:n,component:f,onScroll:P,defaultVisible:m||16}))}var x=function(e){var t=e.itemsPerRow,n=void 0===t?[2,null,3,4]:t,i=P(e,["itemsPerRow"]),r=Object(O.a)().theme.breakpoints;if(Array.isArray(n)){var a=o(n,Object.keys(r));return a.reduce((function(e,t){return c.a.createElement(s.a,{breakpoint:t.breakpoint},(function(n){return n?c.a.createElement(N,Object.assign({itemsPerRow:t.value},i)):e}))}),c.a.createElement(N,Object.assign({itemsPerRow:a[0].value},i)))}return null}},IQGg:function(e,t,n){},M9Wc:function(e,t,n){},NS7r:function(e,t,n){"use strict";var i=n("q1tI"),r=n.n(i),a=n("VG9E"),o=n("rZfS"),s=function(e,t){var n={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.indexOf(i)<0&&(n[i]=e[i]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(i=Object.getOwnPropertySymbols(e);r<i.length;r++)t.indexOf(i[r])<0&&Object.prototype.propertyIsEnumerable.call(e,i[r])&&(n[i[r]]=e[i[r]])}return n},u=Object(a.a)("input")({name:"CheckInput",class:"c1i1ikgj"}),l=Object(a.a)("span")({name:"CheckBox",class:"cdsc28"}),c=Object(a.a)(o.a)({name:"CheckMark",class:"c1bt8vbf"}
1),d=Object(a.a)("label")({name:"Label",class:"l13mec8q"}),p=function(e){var t=e.label,n=e.className,i=s(e,["label","className"]);return r.a.createElement(d,{className:n||"","data-testid":"checkbox-".concat(t)},r.a.createElement(u,Object.assign({type:"checkbox"},i)),r.a.createElement(l,null,r.a.createElement(c,null)),t)};p.Label=d,t.a=p,n("M9Wc")},Otv8:function(e,t,n){"use strict";n.d(t,"a",(function(){return u}));var i=n("RIqP"),r=n.n(i),a=n("l60M"),o=n("y2eb"),s=n("q1tI");function u(e){var t=e.sortOrders,n=s.useContext(o.a);return{changeSortOrder:n.changeSortOrder,direction:n.direction,sortOrder:n.sortOrder,mappedSortOrder:function(e){return e.reduce((function(e,t){var n=a.c[a.b[t.value]].map((function(e){return Object.assign(Object.assign({},t),{text:s.createElement("span",null,t.text," ",e.text),direction:e.direction})}));return[].concat(r()(e),r()(n))}),[])}(t)}}},VTI1:function(e,t,n){"use strict";var i=n("J4zp"),r=n.n(i),a=n("lSNA"),o=n.n(a),s=n("q1tI"),u=n("OPbP"),l=n("ttZb");function c(e,t,n,i){var r=function e(t,n,i,r){var a,o,s,u,l,c=Object.assign(Object.assign({},r),{offset:r.offset-(r.first||r.limit)});try{var d=n.readQuery({query:i,variables:c});return e(((null===(s=null===(o=null===(a=null==d?void 0:d.route)||void 0===a?void 0:a.object)||void 0===o?void 0:o.products)||void 0===s?void 0:s.result)||(null===(l=null===(u=null==d?void 0:d.search)||void 0===u?void 0:u.products)||void 0===l?void 0:l.result)).concat(t),n,i,c)}catch(p){return{prevOffset:c.offset,products:t}}}(e,t,n,i),a=r.prevOffset,o=function e(t,n,i,r){var a,o,s,u,l,c=Object.assign(Object.assign({},r),{offset:r.offset+(r.first||r.limit)});try{var d=n.readQuery({query:i,variables:c});return e(t.concat((null===(s=null===(o=null===(a=null==d?void 0:d.route)||void 0===a?void 0:a.object)||void 0===o?void 0:o.products)||void 0===s?void 0:s.result)||(null===(l=null===(u=null==d?void 0:d.search)||void 0===u?void 0:u.products)||void 0===l?void 0:l.result)),n,i,c)}catch(p){return{nextOffset:c.offset,products:t}}}(r.products,t,n,i);return{prevOffset:a,nextOffset:o.nextOffset,products:o.products}}var d={previous:!1,next:!1};function p(e,t){switch(t.type){case"SUCCESS":case"ERROR":return Object.assign(Object.assign({},e),o()({},t.payload,!1));case"FETCHING":return Object.assign(Object.assign({},e),o()({},t.payload,!0));default:return e}}t.a=function(e){var t,n,i,a,o,f,v=e.result,m=e.query,h=(null===(n=null===(t=null==v?void 0:v.data)||void 0===t?void 0:t.route)||void 0===n?void 0:n.object)||(null===(i=null==v?void 0:v.data)||void 0===i?void 0:i.search)||(null===(a=null==v?void 0:v.data)||void 0===a?void 0:a.category)||{},g=Object(s.useReducer)(p,d),b=r()(g,2),y=b[0],k=b[1],O=Object(s.useContext)(u.a),P=O.perPage,S=O.offset,N=O.goToPage,x=(null===(o=null==h?void 0:h.products)||void 0===o?void 0:o.totalResults)||0,M=Object(l.a)(),w=Object(s.useCallback)((function(e){var t=e<S?"previous":"next";document.activeElement instanceof HTMLElement&&document.activeElement.blur(),k({type:"FETCHING",payload:t}),M.query({query:m,variables:Object.assign(Object.assign({},v.variables),{offset:e}),errorPolicy:"all",fetchPolicy:"network-only"}).then((function(){return k({type:"SUCCESS",payload:t})}),(function(){return k({type:"ERROR",payload:t})}))}),[S,M,v,m]);Object(s.useEffect)((function(){if(x>0&&x<S){var e=Math.ceil(x/P);N(e)}}),[x,P,S,N]);var j=c((null===(f=null==h?void 0:h.products)||void 0===f?void 0:f.result)||[],M,m,Object.assign(Object.assign({},v.variables),{offset:S})),E=j.prevOffset,D=j.nextOffset,T=j.products,R=Object(s.useRef)([]),C=Object(s.useMemo)((function(){var e=T.length;if(e===R.current.length){for(var t=!1,n=0;n<e;n++)if(T[n]!==R.current[n]){t=!0;break}if(!t)return R.current}return R.current=T,R.current}),[T]);return{previous:{loadingProducts:y.previous,hasProducts:E>=0,fetchProducts:function(){return w(E)},offset:E,page:E/P+1},next:{loadingProducts:y.next,hasProducts:D<x,fetchProducts:function(){return w(D)},offset:D,page:D/P+1},products:C}}},dBYa:function(e,t,n){},eMA9:function(e,t,n){"use strict";var i=n("RIqP"),r=n.n(i),a=n("lwsE"),o=n.n(a),s=n("W8MJ"),u=n.n(s),l=n("a1gu"),c=n.n(l),d=n("Nsbk"),p=n.n(d),f=n("7W2i"),v=n.n(f),m=n("l60M"),h=n("y2eb"),g=n("FVX+"),b=n("ugJi"),y=n("q1tI"),k=n("Ty5D");function O(e,t,n){return t=p()(t),c()(e,function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){return!1}}()?Reflect.construct(t,n||[],p()(e).constructor):t.apply(e,n))}var P=function(e){function t(){return o()(this,t),O(this,t,arguments)}
1return v()(t,e),u()(t,[{key:"render",value:function(){var e=this,t=this.props.sortOrders.reduce((function(e,t){var n=m.c[m.b[t.value]].map((function(e){return Object.assign(Object.assign({},t),{text:y.createElement("div",null,t.text," ",e.text),direction:e.direction})}));return[].concat(r()(e),r()(n))}),[]);return y.createElement(g.b,{component:b.a},y.createElement(h.a.Consumer,null,(function(n){var i=n.changeSortOrder,r=n.direction,a=n.sortOrder;return e.props.children({changeSortOrder:i,direction:r,sortOrder:a,mappedSortOrder:t})})))}}])}(y.PureComponent);t.a=Object(k.i)(P)},iED3:function(e,t,n){"use strict";n.d(t,"a",(function(){return s}));var i=n("J4zp"),r=n.n(i),a=n("ttZb"),o=n("U49c");function s(e){var t=Object(a.c)({kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"setRange"},variableDefinitions:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"setRangeFilter"},arguments:[{kind:"Argument",name:{kind:"Name",value:"id"},value:{kind:"Variable",name:{kind:"Name",value:"id"}}},{kind:"Argument",name:{kind:"Name",value:"value"},value:{kind:"Variable",name:{kind:"Name",value:"value"}}}],directives:[{kind:"Directive",name:{kind:"Name",value:"client"},arguments:[]}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"isActive"},arguments:[],directives:[{kind:"Directive",name:{kind:"Name",value:"client"},arguments:[]}]}]}}]}}],loc:{start:0,end:121,source:{body:"\n    mutation setRange {\n      setRangeFilter(id: $id, value: $value) @client {\n        isActive @client\n      }\n    }\n  ",name:"GraphQL request",locationOffset:{line:1,column:1}}}}),n=r()(t,1)[0],i=Object(a.c)({kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"ClearRangeFilter"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"id"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"clearRangeFilter"},arguments:[{kind:"Argument",name:{kind:"Name",value:"id"},value:{kind:"Variable",name:{kind:"Name",value:"id"}}}],directives:[{kind:"Directive",name:{kind:"Name",value:"client"},arguments:[]}]}]}}],loc:{start:0,end:95,source:{body:"\n    mutation ClearRangeFilter($id: String!) {\n      clearRangeFilter(id: $id) @client\n    }\n  ",name:"GraphQL request",locationOffset:{line:1,column:1}}}}),s=r()(i,1)[0];return{apply:function(t){var i=t.min,r=t.max;return i&&i||Object(o.a)(!0,"You must provide a min and max to applyRangeFilter"),n({variables:{id:e.filter.id,value:[i,r]}})},clear:function(){return s({variables:{id:e.filter.id}})}}}},"p5+q":function(e,t,n){"use strict";n.d(t,"a",(function(){return g}));n("5DUi"),n("VG9E");var i=n("q1tI"),r=n.n(i);n("lSNA"),n("OPbP"),n("Qyje"),n("Ty5D");n("IQGg");n("dBYa");var a=n("lwsE"),o=n.n(a),s=n("W8MJ"),u=n.n(s),l=n("a1gu"),c=n.n(l),d=n("Nsbk"),p=n.n(d),f=n("7W2i"),v=n.n(f);var m=function(e){var t=e.perPage,n=e.total;return Math.ceil(n/t)},h=function(e,t){var n=t.total,i=t.currentPage,r=t.goToPage;n>0&&e<i&&r(e),0===n&&i>1&&r&&r(1)},g=function(e){function t(e){var n,i,r,a;return o()(this,t),i=this,r=t,a=[e],r=p()(r),(n=c()(i,function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){return!1}}()?Reflect.construct(r,a||[],p()(i).constructor):r.apply(i,a))).setTotalPages=function(){var e=m(n.props);return n.setState({totalPages:e}),e},n.nextPage=function(){var e=n.props.currentPage;e<n.state.totalPages&&n.props.goToPage(e+1)},n.prevPage=function(){var e=n.props.currentPage;1!==e&&n.props.goToPage(e-1)},n.getStateAndProps=function(){return{totalItems:n.props.total,totalPages:n.state.totalPages,currentPage:n.props.currentPage,prevPage:n.prevPage,nextPage:n.nextPage,goToPage:n.props.goToPage,setProductsPerPage:n.props.setProductsPerPage,isFirstPage:1===n.props.currentPage,isLastPage:n.props.currentPage===n.state.totalPages,hasPages:0!==n.state.totalPages}},n.state={totalPages:m(e)},n}
1return v()(t,e),u()(t,[{key:"componentDidMount",value:function(){var e=this.setTotalPages();h(e,this.props)}},{key:"componentDidUpdate",value:function(e){if(e.total!==this.props.total){var t=this.setTotalPages();h(t,this.props)}e.perPage!==this.props.perPage&&this.setTotalPages()}},{key:"render",value:function(){return this.props.children(this.getStateAndProps())}}])}(r.a.Component)},rT6d:function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var i=n("J4zp"),r=n.n(i),a=n("ttZb");function o(e){var t=Object(a.c)({kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"toggleActiveListItem"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"value"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"parentId"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"set"}},type:{kind:"NamedType",name:{kind:"Name",value:"Boolean"}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"toggleListFilterItem"},arguments:[{kind:"Argument",name:{kind:"Name",value:"value"},value:{kind:"Variable",name:{kind:"Name",value:"value"}}},{kind:"Argument",name:{kind:"Name",value:"parentId"},value:{kind:"Variable",name:{kind:"Name",value:"parentId"}}},{kind:"Argument",name:{kind:"Name",value:"set"},value:{kind:"Variable",name:{kind:"Name",value:"set"}}}],directives:[{kind:"Directive",name:{kind:"Name",value:"client"},arguments:[]}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"isActive"},arguments:[],directives:[{kind:"Directive",name:{kind:"Name",value:"client"},arguments:[]}]}]}}]}}],loc:{start:0,end:244,source:{body:"\n    mutation toggleActiveListItem(\n      $value: String!\n      $parentId: String!\n      $set: Boolean\n    ) {\n      toggleListFilterItem(value: $value, parentId: $parentId, set: $set)\n        @client {\n        isActive @client\n      }\n    }\n  ",name:"GraphQL request",locationOffset:{line:1,column:1}}}}),n=r()(t,1)[0],i=Object(a.c)({kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"ClearListFilter"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"id"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"clearListFilter"},arguments:[{kind:"Argument",name:{kind:"Name",value:"id"},value:{kind:"Variable",name:{kind:"Name",value:"id"}}}],directives:[{kind:"Directive",name:{kind:"Name",value:"client"},arguments:[]}]}]}}],loc:{start:0,end:93,source:{body:"\n    mutation ClearListFilter($id: String!) {\n      clearListFilter(id: $id) @client\n    }\n  ",name:"GraphQL request",locationOffset:{line:1,column:1}}}}),o=r()(i,1)[0];return{apply:function(t){var i=t.value,r=t.set,a=e.filter;return n({variables:{parentId:a.id,value:i,set:r}})},clear:function(){var t=e.filter;return o({variables:{id:t.id}})}}}},ugJi:function(e,t,n){"use strict";t.a=function(){return null}},yLTe:function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var i=n("q1tI"),r=function(e,t){var n={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.indexOf(i)<0&&(n[i]=e[i]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(i=Object.getOwnPropertySymbols(e);r<i.length;r++)t.indexOf(i[r])<0&&Object.prototype.propertyIsEnumerable.call(e,i[r])&&(n[i[r]]=e[i[r]])}return n},a=i.memo((function(e){var t=e.widthRem,n=void 0===t?5:t,a=e.randomizeWidthBy,o=void 0===a?0:a,s=e.count,u=void 0===s?1:s,l=e.color,c=void 0===l?"#F5F5F5":l,d=e.heightPx,p=void 0===d?16:d,f=e.className,v=e.children,m=e.style,h=r(e,["widthRem","randomizeWidthBy","count","color","heightPx","className","children","style"]),g=new Array(u).fill(null);return i.createElement(i.Fragment,null,g.map((function(e,t){return i.createElement("div",Object.assign({},h,{key:t,className:f,style:Object.assign({maxWidth:"100%",background:c,height:"".concat(p,"px"),width:"".concat(o?(r=n,a=o,s=r-a,u=r+a,Math.round(100*(Math.random()*(u-s)+s))/100):n,"rem")},m)}),v);var r,a,s,u})))}))}}]);
2//# sourceMappingURL=6.d4229e50.chunk.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.