PageSourceSearch

https://makezine.com/wp-content/plugins/shopwp-pro/dist/vendors-no…act-virtual_-d844ec.ee3acc4257bcaf80afda.js

js makezine.com collected 2026-09-24 08:07:58 UTC 16,831 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunkshopwp=self.webpackChunkshopwp||[]).push([["vendors-node_modules_memoize-one_dist_memoize-one_esm_js-node_modules_tanstack_react-virtual_-d844ec"],{"./node_modules/@tanstack/react-virtual/dist/esm/index.js"(e,t,s){s.d(t,{Te:()=>w});var n=s("react"),i=s("react-dom");function o(e,t,s){let n,i=s.initialDeps??[],o=!0;function l(){var l,r,a;let h;s.key&&(null==(l=s.debug)?void 0:l.call(s))&&(h=Date.now());const c=e();if(c.length===i.length&&!c.some(((e,t)=>i[t]!==e)))return n;let d;if(i=c,s.key&&(null==(r=s.debug)?void 0:r.call(s))&&(d=Date.now()),n=t(...c),s.key&&(null==(a=s.debug)?void 0:a.call(s))){const e=Math.round(100*(Date.now()-h))/100,t=Math.round(100*(Date.now()-d))/100,n=t/16,i=(e,t)=>{for(e=String(e);e.length<t;)e=" "+e;return e};console.info(`%c⏱ ${i(t,5)} /${i(e,5)} ms`,`\n            font-size: .6rem;\n            font-weight: bold;\n            color: hsl(${Math.max(0,Math.min(120-120*n,120))}deg 100% 31%);`,null==s?void 0:s.key)}return!(null==s?void 0:s.onChange)||o&&s.skipInitialOnChange||s.onChange(n),o=!1,n}return l.updateDeps=e=>{i=e},l}function l(e,t){if(void 0===e)throw new Error("Unexpected undefined"+(t?`: ${t}`:""));return e}const r=(e,t,s)=>{let n;return function(...i){e.clearTimeout(n),n=e.setTimeout((()=>t.apply(this,i)),s)}},a=e=>{const{offsetWidth:t,offsetHeight:s}=e;return{width:t,height:s}},h=e=>e,c=e=>{const t=Math.max(e.startIndex-e.overscan,0),s=Math.min(e.endIndex+e.overscan,e.count-1),n=[];for(let e=t;e<=s;e++)n.push(e);return n},d=(e,t)=>{const s=e.scrollElement;if(!s)return;const n=e.targetWindow;if(!n)return;const i=e=>{const{width:s,height:n}=e;t({width:Math.round(s),height:Math.round(n)})};if(i(a(s)),!n.ResizeObserver)return()=>{};const o=new n.ResizeObserver((t=>{const n=()=>{const e=t[0];if(null==e?void 0:e.borderBoxSize){const t=e.borderBoxSize[0];if(t)return void i({width:t.inlineSize,height:t.blockSize})}i(a(s))};e.options.useAnimationFrameWithResizeObserver?requestAnimationFrame(n):n()}));return o.observe(s,{box:"border-box"}),()=>{o.unobserve(s)}},u={passive:!0},m="undefined"==typeof window||"onscrollend"in window,f=(e,t)=>{const s=e.scrollElement;if(!s)return;const n=e.targetWindow;if(!n)return;let i=0;const o=e.options.useScrollendEvent&&m?()=>{}:r(n,(()=>{t(i,!1)}),e.options.isScrollingResetDelay),l=n=>()=>{const{horizontal:l,isRtl:r}=e.options;i=l?s.scrollLeft*(r?-1:1):s.scrollTop,o(),t(i,n)},a=l(!0),h=l(!1);s.addEventListener("scroll",a,u);const c=e.options.useScrollendEvent&&m;return c&&s.addEventListener("scrollend",h,u),()=>{s.removeEventListener("scroll",a),c&&s.removeEventListener("scrollend",h)}},g=(e,t,s)=>{if(null==t?void 0:t.borderBoxSize){const e=t.borderBoxSize[0];if(e)return Math.round(e[s.options.horizontal?"inlineSize":"blockSize"])}return e[s.options.horizontal?"offsetWidth":"offsetHeight"]},p=(e,{adjustments:t=0,behavior:s},n)=>{var i,o;const l=e+t;null==(o=null==(i=n.scrollElement)?void 0:i.scrollTo)||o.call(i,{[n.options.horizontal?"left":"top"]:l,behavior:s})};class v{constructor(e){this.unsubs=[],this.scrollElement=null,this.targetWindow=null,this.isScrolling=!1,this.currentScrollToIndex=null,this.measurementsCache=[],this.itemSizeCache=new Map,this.laneAssignments=new Map,this.pendingMeasuredCacheIndexes=[],this.prevLanes=void 0,this.lanesChangedFlag=!1,this.lanesSettling=!1,this.scrollRect=null,this.scrollOffset=null,this.scrollDirection=null,this.scrollAdjustments=0,this.elementsCache=new Map,this.observer=(()=>{let e=null;const t=()=>e||(this.targetWindow&&this.targetWindow.ResizeObserver?e=new this.targetWindow.ResizeObserver((e=>{e.forEach((e=>{const t=()=>{this._measureElement(e.target,e)};this.options.useAnimationFrameWithResizeObserver?requestAnimationFrame(t):t()}))})):null);return{disconnect:()=>{var s;null==(s=t())||s.disconnect(),e=null},observe:e=>{var s;return null==(s=t())?void 0:s.observe(e,{box:"border-box"})},unobserve:e=>{var s;return null==(s=t())?void 0:s.unobserve(e)}}})(),this.range=null,this.setOptions=e=>{Object.entries(e).forEach((([t,s])=>{void 0===s&&delete e[t]})),this.options={debug:!1,initialOffset:0,overscan:1,paddingStart:0,paddingEnd:0,scrollPaddingStart:0,scrollPaddingEnd:0,horizontal:!1,getItemKey:h,rangeExtractor:c,onChange:()=>{},measureElement:g,initialRect:{width:0,height:0},scrollMargin:0,gap:0,indexAttribute:"data-index",initialMeasurementsCache:[],lanes:1,isScrollingResetDelay:150,enabled:!0,isRtl:!1,useScrollendEvent:!1,useAnimationFrameWithResizeObserver:!1,...e}},this.notify=e=>{var t,s;null==(s=(t=this.options).onChange)||s.call(t,this,e)},this.maybeNotify=o((()=>(this.calculateRange(),[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null])),(e=>{this.notify(e)}),{key:!1,debug:()=>this.options.debug,initialDeps:[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]}),this.cleanup=()=>
vendor: 1,031 bytes, line 1
1{this.unsubs.filter(Boolean).forEach((e=>e())),this.unsubs=[],this.observer.disconnect(),this.scrollElement=null,this.targetWindow=null},this._didMount=()=>()=>{this.cleanup()},this._willUpdate=()=>{var e;const t=this.options.enabled?this.options.getScrollElement():null;if(this.scrollElement!==t){if(this.cleanup(),!t)return void this.maybeNotify();this.scrollElement=t,this.scrollElement&&"ownerDocument"in this.scrollElement?this.targetWindow=this.scrollElement.ownerDocument.defaultView:this.targetWindow=(null==(e=this.scrollElement)?void 0:e.window)??null,this.elementsCache.forEach((e=>{this.observer.observe(e)})),this.unsubs.push(this.options.observeElementRect(this,(e=>{this.scrollRect=e,this.maybeNotify()}))),this.unsubs.push(this.options.observeElementOffset(this,((e,t)=>{this.scrollAdjustments=0,this.scrollDirection=t?this.getScrollOffset()<e?"forward":"backward":null,this.scrollOffset=e,this.isScrolling=t,this.maybeNotify()}))),this._scrollToOffset(this.getScrollOffset(),{adjustments:void 0,behavior:void 0})}}
1,this.getSize=()=>this.options.enabled?(this.scrollRect=this.scrollRect??this.options.initialRect,this.scrollRect[this.options.horizontal?"width":"height"]):(this.scrollRect=null,0),this.getScrollOffset=()=>this.options.enabled?(this.scrollOffset=this.scrollOffset??("function"==typeof this.options.initialOffset?this.options.initialOffset():this.options.initialOffset),this.scrollOffset):(this.scrollOffset=null,0),this.getFurthestMeasurement=(e,t)=>{const s=new Map,n=new Map;for(let i=t-1;i>=0;i--){const t=e[i];if(s.has(t.lane))continue;const o=n.get(t.lane);if(null==o||t.end>o.end?n.set(t.lane,t):t.end<o.end&&s.set(t.lane,!0),s.size===this.options.lanes)break}return n.size===this.options.lanes?Array.from(n.values()).sort(((e,t)=>e.end===t.end?e.index-t.index:e.end-t.end))[0]:void 0},this.getMeasurementOptions=o((()=>[this.options.count,this.options.paddingStart,this.options.scrollMargin,this.options.getItemKey,this.options.enabled,this.options.lanes]),((e,t,s,n,i,o)=>(void 0!==this.prevLanes&&this.prevLanes!==o&&(this.lanesChangedFlag=!0),this.prevLanes=o,this.pendingMeasuredCacheIndexes=[],{count:e,paddingStart:t,scrollMargin:s,getItemKey:n,enabled:i,lanes:o})),{key:!1}),this.getMeasurements=o((()=>[this.getMeasurementOptions(),this.itemSizeCache]),(({count:e,paddingStart:t,scrollMargin:s,getItemKey:n,enabled:i,lanes:o},l)=>{if(!i)return this.measurementsCache=[],this.itemSizeCache.clear(),this.laneAssignments.clear(),[];if(this.laneAssignments.size>e)for(const t of this.laneAssignments.keys())t>=e&&this.laneAssignments.delete(t);this.lanesChangedFlag&&(this.lanesChangedFlag=!1,this.lanesSettling=!0,this.measurementsCache=[],this.itemSizeCache.clear(),this.laneAssignments.clear(),this.pendingMeasuredCacheIndexes=[]),0!==this.measurementsCache.length||this.lanesSettling||(this.measurementsCache=this.options.initialMeasurementsCache,this.measurementsCache.forEach((e=>{this.itemSizeCache.set(e.key,e.size)})));const r=this.lanesSettling?0:this.pendingMeasuredCacheIndexes.length>0?Math.min(...this.pendingMeasuredCacheIndexes):0;this.pendingMeasuredCacheIndexes=[],this.lanesSettling&&this.measurementsCache.length===e&&(this.lanesSettling=!1);const a=this.measurementsCache.slice(0,r),h=new Array(o).fill(void 0);for(let e=0;e<r;e++){const t=a[e];t&&(h[t.lane]=e)}for(let i=r;i<e;i++){const e=n(i),o=this.laneAssignments.get(i);let r,c;if(void 0!==o&&this.options.lanes>1){r=o;const e=h[r],n=void 0!==e?a[e]:void 0;c=n?n.end+this.options.gap:t+s}else{const e=1===this.options.lanes?a[i-1]:this.getFurthestMeasurement(a,i);c=e?e.end+this.options.gap:t+s,r=e?e.lane:i%this.options.lanes,this.options.lanes>1&&this.laneAssignments.set(i,r)}const d=l.get(e),u="number"==typeof d?d:this.options.estimateSize(i),m=c+u;a[i]={index:i,start:c,size:u,end:m,key:e,lane:r},h[r]=i}return this.measurementsCache=a,a}),{key:!1,debug:()=>this.options.debug}),this.calculateRange=o((()=>[this.getMeasurements(),this.getSize(),this.getScrollOffset(),this.options.lanes]),((e,t,s,n)=>this.range=e.length>0&&t>0?function({measurements:e,outerSize:t,scrollOffset:s,lanes:n}){const i=e.length-1;if(e.length<=n)return{startIndex:0,endIndex:i};let o=b(0,i,(t=>e[t].start),s),l=o;if(1===n)for(;l<i&&e[l].end<s+t;)l++;else if(n>1){const r=Array(n).fill(0);for(;l<i&&r.some((e=>e<s+t));){const t=e[l];r[t.lane]=t.end,l++}const a=Array(n).fill(s+t);for(;o>=0&&a.some((e=>e>=s));){const t=e[o];a[t.lane]=t.start,o--}o=Math.max(0,o-o%n),l=Math.min(i,l+(n-1-l%n))}return{startIndex:o,endIndex:l}}({measurements:e,outerSize:t,scrollOffset:s,lanes:n}):null),{key:!1,debug:()=>this.options.debug}
1),this.getVirtualIndexes=o((()=>{let e=null,t=null;const s=this.calculateRange();return s&&(e=s.startIndex,t=s.endIndex),this.maybeNotify.updateDeps([this.isScrolling,e,t]),[this.options.rangeExtractor,this.options.overscan,this.options.count,e,t]}),((e,t,s,n,i)=>null===n||null===i?[]:e({startIndex:n,endIndex:i,overscan:t,count:s})),{key:!1,debug:()=>this.options.debug}),this.indexFromElement=e=>{const t=this.options.indexAttribute,s=e.getAttribute(t);return s?parseInt(s,10):(console.warn(`Missing attribute name '${t}={index}' on measured element.`),-1)},this._measureElement=(e,t)=>{const s=this.indexFromElement(e),n=this.measurementsCache[s];if(!n)return;const i=n.key,o=this.elementsCache.get(i);o!==e&&(o&&this.observer.unobserve(o),this.observer.observe(e),this.elementsCache.set(i,e)),e.isConnected&&this.resizeItem(s,this.options.measureElement(e,t,this))},this.resizeItem=(e,t)=>{const s=this.measurementsCache[e];if(!s)return;const n=t-(this.itemSizeCache.get(s.key)??s.size);0!==n&&((void 0!==this.shouldAdjustScrollPositionOnItemSizeChange?this.shouldAdjustScrollPositionOnItemSizeChange(s,n,this):s.start<this.getScrollOffset()+this.scrollAdjustments)&&this._scrollToOffset(this.getScrollOffset(),{adjustments:this.scrollAdjustments+=n,behavior:void 0}),this.pendingMeasuredCacheIndexes.push(s.index),this.itemSizeCache=new Map(this.itemSizeCache.set(s.key,t)),this.notify(!1))},this.measureElement=e=>{e?this._measureElement(e,void 0):this.elementsCache.forEach(((e,t)=>{e.isConnected||(this.observer.unobserve(e),this.elementsCache.delete(t))}))},this.getVirtualItems=o((()=>
1[this.getVirtualIndexes(),this.getMeasurements()]),((e,t)=>{const s=[];for(let n=0,i=e.length;n<i;n++){const i=t[e[n]];s.push(i)}return s}),{key:!1,debug:()=>this.options.debug}),this.getVirtualItemForOffset=e=>{const t=this.getMeasurements();if(0!==t.length)return l(t[b(0,t.length-1,(e=>l(t[e]).start),e)])},this.getMaxScrollOffset=()=>{if(!this.scrollElement)return 0;if("scrollHeight"in this.scrollElement)return this.options.horizontal?this.scrollElement.scrollWidth-this.scrollElement.clientWidth:this.scrollElement.scrollHeight-this.scrollElement.clientHeight;{const e=this.scrollElement.document.documentElement;return this.options.horizontal?e.scrollWidth-this.scrollElement.innerWidth:e.scrollHeight-this.scrollElement.innerHeight}},this.getOffsetForAlignment=(e,t,s=0)=>{if(!this.scrollElement)return 0;const n=this.getSize(),i=this.getScrollOffset();"auto"===t&&(t=e>=i+n?"end":"start"),"center"===t?e+=(s-n)/2:"end"===t&&(e-=n);const o=this.getMaxScrollOffset();return Math.max(Math.min(o,e),0)},this.getOffsetForIndex=(e,t="auto")=>{e=Math.max(0,Math.min(e,this.options.count-1));const s=this.measurementsCache[e];if(!s)return;const n=this.getSize(),i=this.getScrollOffset();if("auto"===t)if(s.end>=i+n-this.options.scrollPaddingEnd)t="end";else{if(!(s.start<=i+this.options.scrollPaddingStart))return[i,t];t="start"}if("end"===t&&e===this.options.count-1)return[this.getMaxScrollOffset(),t];const o="end"===t?s.end+this.options.scrollPaddingEnd:s.start-this.options.scrollPaddingStart;return[this.getOffsetForAlignment(o,t,s.size),t]},this.isDynamicMode=()=>this.elementsCache.size>0,this.scrollToOffset=(e,{align:t="start",behavior:s}={})=>{"smooth"===s&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size."),this._scrollToOffset(this.getOffsetForAlignment(e,t),{adjustments:void 0,behavior:s})},this.scrollToIndex=(e,{align:t="auto",behavior:s}={})=>{"smooth"===s&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size."),e=Math.max(0,Math.min(e,this.options.count-1)),this.currentScrollToIndex=e;let n=0;const i=t=>{if(!this.targetWindow)return;const n=this.getOffsetForIndex(e,t);if(!n)return void console.warn("Failed to get offset for index:",e);const[i,l]=n;this._scrollToOffset(i,{adjustments:void 0,behavior:s}),this.targetWindow.requestAnimationFrame((()=>{const t=()=>{if(this.currentScrollToIndex!==e)return;const t=this.getScrollOffset(),s=this.getOffsetForIndex(e,l);var n,i;s?(n=s[0],i=t,Math.abs(n-i)<1.01||o(l)):console.warn("Failed to get offset for index:",e)};this.isDynamicMode()?this.targetWindow.requestAnimationFrame(t):t()}))},o=t=>{this.targetWindow&&this.currentScrollToIndex===e&&(n++,n<10?this.targetWindow.requestAnimationFrame((()=>i(t))):console.warn(`Failed to scroll to index ${e} after 10 attempts.`))};i(t)},this.scrollBy=(e,{behavior:t}={})=>{"smooth"===t&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size."),this._scrollToOffset(this.getScrollOffset()+e,{adju
1stments:void 0,behavior:t})},this.getTotalSize=()=>{var e;const t=this.getMeasurements();let s;if(0===t.length)s=this.options.paddingStart;else if(1===this.options.lanes)s=(null==(e=t[t.length-1])?void 0:e.end)??0;else{const e=Array(this.options.lanes).fill(null);let n=t.length-1;for(;n>=0&&e.some((e=>null===e));){const s=t[n];null===e[s.lane]&&(e[s.lane]=s.end),n--}s=Math.max(...e.filter((e=>null!==e)))}return Math.max(s-this.options.scrollMargin+this.options.paddingEnd,0)},this._scrollToOffset=(e,{adjustments:t,behavior:s})=>{this.options.scrollToFn(e,{behavior:s,adjustments:t},this)},this.measure=()=>{this.itemSizeCache=new Map,this.laneAssignments=new Map,this.notify(!1)},this.setOptions(e)}}const b=(e,t,s,n)=>{for(;e<=t;){const i=(e+t)/2|0,o=s(i);if(o<n)e=i+1;else{if(!(o>n))return i;t=i-1}}return e>0?e-1:0},S="undefined"!=typeof document?n.useLayoutEffect:n.useEffect;function w(e){return function({useFlushSync:e=!0,...t}){const s=n.useReducer((()=>({})),{})[1],o={...t,onChange:(n,o)=>{var l;e&&o?(0,i.flushSync)(s):s(),null==(l=t.onChange)||l.call(t,n,o)}},[l]=n.useState((()=>new v(o)));return l.setOptions(o),S((()=>l._didMount()),[]),S((()=>l._willUpdate())),l}({observeElementRect:d,observeElementOffset:f,scrollToFn:p,...e})}},"./node_modules/lodash-es/_baseEach.js"(e,t,s){s.d(t,{A:()=>o});var n=s("./node_modules/lodash-es/_baseForOwn.js"),i=s("./node_modules/lodash-es/isArrayLike.js");const o=(l=n.A,function(e,t){if(null==e)return e;if(!(0,i.A)(e))return l(e,t);for(var s=e.length,n=-1,o=Object(e);++n<s&&!1!==t(o[n],n,o););return e});var l},"./node_modules/lodash-es/some.js"(e,t,s){s.d(t,{A:()=>h});var n=s("./node_modules/lodash-es/_arraySome.js"),i=s("./node_modules/lodash-es/_baseIteratee.js"),o=s("./node_modules/lodash-es/_baseEach.js");const l=function(e,t){var s;return(0,o.A)(e,(function(e,n,i){return!(s=t(e,n,i))})),!!s};var r=s("./node_modules/lodash-es/isArray.js"),a=s("./node_modules/lodash-es/_isIterateeCall.js");const h=function(e,t,s){var o=(0,r.A)(e)?n.A:l;return s&&(0,a.A)(e,t,s)&&(t=void 0),o(e,(0,i.A)(t,3))}},"./node_modules/memoize-one/dist/memoize-one.esm.js"(e,t,s){s.d(t,{A:()=>o});var n=Number.isNaN||function(e){return"number"==typeof e&&e!=e};function i(e,t){if(e.length!==t.length)return!1;for(var s=0;s<e.length;s++)if(!((i=e[s])===(o=t[s])||n(i)&&n(o)))return!1;var i,o;return!0}function o(e,t){void 0===t&&(t=i);var s=null;function n(){for(var n=[],i=0;i<arguments.length;i++)n[i]=arguments[i];if(s&&s.lastThis===this&&t(n,s.lastArgs))return s.lastResult;var o=e.apply(this,n);return s={lastResult:o,lastArgs:n,lastThis:this},o}return n.clear=function(){s=null},n}}}]);

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.