PageSourceSearch

https://www.sportingkc.com/assets/js/vendors-_yarn___virtual___rea…?_t=37d292de66fbbda9762f

js sportingkc.com collected 2026-09-24 09:17:37 UTC 17,382 bytes, 516 lines download raw bytes

1"use strict";
2(self["webpackChunk_mlssoccer_netcore"] = self["webpackChunk_mlssoccer_netcore"] || []).push([["vendors-_yarn___virtual___react-intersection-observer-virtual-72f1bbc67d_0_cache_react-inters-a195ee"],{
3
vendor: 17,007 bytes, lines 4-513
4/***/ "./.yarn/__virtual__/react-intersection-observer-virtual-72f1bbc67d/0/cache/react-intersection-observer-npm-8.34.0-3972ad1cd7-99dee30614.zip/node_modules/react-intersection-observer/react-intersection-observer.m.js":
5/*!*****************************************************************************************************************************************************************************************************************************!*\
6  !*** ./.yarn/__virtual__/react-intersection-observer-virtual-72f1bbc67d/0/cache/react-intersection-observer-npm-8.34.0-3972ad1cd7-99dee30614.zip/node_modules/react-intersection-observer/react-intersection-observer.m.js ***!
7  \*****************************************************************************************************************************************************************************************************************************/
8/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
9
10__webpack_require__.r(__webpack_exports__);
11/* harmony export */ __webpack_require__.d(__webpack_exports__, {
12/* harmony export */   "InView": () => (/* binding */ InView),
13/* harmony export */   "default": () => (/* binding */ InView),
14/* harmony export */   "defaultFallbackInView": () => (/* binding */ defaultFallbackInView),
15/* harmony export */   "observe": () => (/* binding */ observe),
16/* harmony export */   "useInView": () => (/* binding */ useInView)
17/* harmony export */ });
18/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "./.yarn/cache/react-npm-17.0.1-98658812fc-23ada2f8fe.zip/node_modules/react/index.js");
19
20
21
22function _extends() {
23  _extends = Object.assign || function (target) {
24    for (var i = 1; i < arguments.length; i++) {
25      var source = arguments[i];
26
27      for (var key in source) {
28        if (Object.prototype.hasOwnProperty.call(source, key)) {
29          target[key] = source[key];
30        }
31      }
32    }
33
34    return target;
35  };
36
37  return _extends.apply(this, arguments);
38}
39
40function _inheritsLoose(subClass, superClass) {
41  subClass.prototype = Object.create(superClass.prototype);
42  subClass.prototype.constructor = subClass;
43
44  _setPrototypeOf(subClass, superClass);
45}
46
47function _setPrototypeOf(o, p) {
48  _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {
49    o.__proto__ = p;
50    return o;
51  };
52
53  return _setPrototypeOf(o, p);
54}
55
56function _objectWithoutPropertiesLoose(source, excluded) {
57  if (source == null) return {};
58  var target = {};
59  var sourceKeys = Object.keys(source);
60  var key, i;
61
62  for (i = 0; i < sourceKeys.length; i++) {
63    key = sourceKeys[i];
64    if (excluded.indexOf(key) >= 0) continue;
65    target[key] = source[key];
66  }
67
68  return target;
69}
70
71var observerMap = new Map();
72var RootIds = new WeakMap();
73var rootId = 0;
74var unsupportedValue = undefined;
75/**
76 * What should be the default behavior if the IntersectionObserver is unsupported?
77 * Ideally the polyfill has been loaded, you can have the following happen:
78 * - `undefined`: Throw an error
79 * - `true` or `false`: Set the `inView` value to this regardless of intersection state
80 * **/
81
82function defaultFallbackInView(inView) {
83  unsupportedValue = inView;
84}
85/**
86 * Generate a unique ID for the root element
87 * @param root
88 */
89
90function getRootId(root) {
91  if (!root) return '0';
92  if (RootIds.has(root)) return RootIds.get(root);
93  rootId += 1;
94  RootIds.set(root, rootId.toString());
95  return RootIds.get(root);
96}
97/**
98 * Convert the options to a string Id, based on the values.
99 * Ensures we can reuse the same observer when observing elements with the same options.
100 * @param options
101 */
102
103
104function optionsToId(options) {
105  return Object.keys(options).sort().filter(function (key) {
106    return options[key] !== undefined;
107  }).map(function (key) {
108    return key + "_" + (key === 'root' ? getRootId(options.root) : options[key]);
109  }).toString();
110}
111
112function createObserver(options) {
113  // Create a unique ID for this observer instance, based on the root, root margin and threshold.
114  var id = optionsToId(options);
115  var instance = observerMap.get(id);
116
117  if (!instance) {
118    // Create a map of elements this observer is going to observe. Each element has a list of callbacks that should be triggered, once it comes into view.
119    var elements = new Map();
120    var thresholds;
121    var observer = new IntersectionObserver(function (entries) {
122      entries.forEach(function (entry) {
123        var _elements$get;
124
125        // While it would be nice if you could just look at isIntersecting to determine if the component is inside the viewport, browsers can't agree on how to use it.
126        // -Firefox ignores `threshold` when considering `isIntersecting`, so it will never be false again if `threshold` is > 0
127        var inView = entry.isIntersecting && thresholds.some(function (threshold) {
128          return entry.intersectionRatio >= threshold;
129        }); // @ts-ignore support IntersectionObserver v2
130
131        if (options.trackVisibility && typeof entry.isVisible === 'undefined') {
132          // The browser doesn't support Intersection Observer v2, falling back to v1 behavior.
133          // @ts-ignore
134          entry.isVisible = inView;
135        }
136
137        (_elements$get = elements.get(entry.target)) == null ? void 0 : _elements$get.forEach(function (callback) {
138          callback(inView, entry);
139        });
140      });
141    }, options); // Ensure we have a valid thresholds array. If not, use the threshold from the options
142
143    thresholds = observer.thresholds || (Array.isArray(options.threshold) ? options.threshold : [options.threshold || 0]);
144    instance = {
145      id: id,
146      observer: observer,
147      elements: elements
148    };
149    observerMap.set(id, instance);
150  }
151
152  return instance;
153}
154/**
155 * @param element - DOM Element to observe
156 * @param callback - Callback function to trigger when intersection status changes
157 * @param options - Intersection Observer options
158 * @param fallbackInView - Fallback inView value.
159 * @return Function - Cleanup function that should be triggered to unregister the observer
160 */
161
162
163function observe(element, callback, options, fallbackInView) {
164  if (options === void 0) {
165    options = {};
166  }
167
168  if (fallbackInView === void 0) {
169    fallbackInView = unsupportedValue;
170  }
171
172  if (typeof window.IntersectionObserver === 'undefined' && fallbackInView !== undefined) {
173    var bounds = element.getBoundingClientRect();
174    callback(fallbackInView, {
175      isIntersecting: fallbackInView,
176      target: element,
177      intersectionRatio: typeof options.threshold === 'number' ? options.threshold : 0,
178      time: 0,
179      boundingClientRect: bounds,
180      intersectionRect: bounds,
181      rootBounds: bounds
182    });
183    return function () {// Nothing to cleanup
184    };
185  } // An observer with the same options can be reused, so lets use this fact
186
187
188  var _createObserver = createObserver(options),
189      id = _createObserver.id,
190      observer = _createObserver.observer,
191      elements = _createObserver.elements; // Register the callback listener for this element
192
193
194  var callbacks = elements.get(element) || [];
195
196  if (!elements.has(element)) {
197    elements.set(element, callbacks);
198  }
199
200  callbacks.push(callback);
201  observer.observe(element);
202  return function unobserve() {
203    // Remove the callback from the callback list
204    callbacks.splice(callbacks.indexOf(callback), 1);
205
206    if (callbacks.length === 0) {
207      // No more callback exists for element, so destroy it
208      elements["delete"](element);
209      observer.unobserve(element);
210    }
211
212    if (elements.size === 0) {
213      // No more elements are being observer by this instance, so destroy it
214      observer.disconnect();
215      observerMap["delete"](id);
216    }
217  };
218}
219
220var _excluded = ["children", "as", "triggerOnce", "threshold", "root", "rootMargin", "onChange", "skip", "trackVisibility", "delay", "initialInView", "fallbackInView"];
221
222function isPlainChildren(props) {
223  return typeof props.children !== 'function';
224}
225/**
226 ## Render props
227
228 To use the `<InView>` component, you pass it a function. It will be called
229 whenever the state changes, with the new value of `inView`. In addition to the
230 `inView` prop, children also receive a `ref` that should be set on the
231 containing DOM element. This is the element that the IntersectionObserver will
232 monitor.
233
234 If you need it, you can also access the
235 [`IntersectionObserverEntry`](https://developer.mozilla.org/en-US/docs/Web/API/IntersectionObserverEntry)
236 on `entry`, giving you access to all the details about the current intersection
237 state.
238
239 ```jsx
240 import { InView } from 'react-intersection-observer';
241
242 const Component = () => (
243 <InView>
244 {({ inView, ref, entry }) => (
245      <div ref={ref}>
246        <h2>{`Header inside viewport ${inView}.`}</h2>
247      </div>
248    )}
249 </InView>
250 );
251
252 export default Component;
253 ```
254
255 ## Plain children
256
257 You can pass any element to the `<InView />`, and it will handle creating the
258 wrapping DOM element. Add a handler to the `onChange` method, and control the
259 state in your own component. Any extra props you add to `<InView>` will be
260 passed to the HTML element, allowing you set the `className`, `style`, etc.
261
262 ```jsx
263 import { InView } from 'react-intersection-observer';
264
265 const Component = () => (
266 <InView as="div" onChange={(inView, entry) => console.log('Inview:', inView)}>
267 <h2>Plain children are always rendered. Use onChange to monitor state.</h2>
268 </InView>
269 );
270
271 export default Component;
272 ```
273 */
274
275
276var InView = /*#__PURE__*/function (_React$Component) {
277  _inheritsLoose(InView, _React$Component);
278
279  function InView(props) {
280    var _this;
281
282    _this = _React$Component.call(this, props) || this;
283    _this.node = null;
284    _this._unobserveCb = null;
285
286    _this.handleNode = function (node) {
287      if (_this.node) {
288        // Clear the old observer, before we start observing a new element
289        _this.unobserve();
290
291        if (!node && !_this.props.triggerOnce && !_this.props.skip) {
292          // Reset the state if we get a new node, and we aren't ignoring updates
293          _this.setState({
294            inView: !!_this.props.initialInView,
295            entry: undefined
296          });
297        }
298      }
299
300      _this.node = node ? node : null;
301
302      _this.observeNode();
303    };
304
305    _this.handleChange = function (inView, entry) {
306      if (inView && _this.props.triggerOnce) {
307        // If `triggerOnce` is true, we should stop observing the element.
308        _this.unobserve();
309      }
310
311      if (!isPlainChildren(_this.props)) {
312        // Store the current State, so we can pass it to the children in the next render update
313        // There's no reason to update the state for plain children, since it's not used in the rendering.
314        _this.setState({
315          inView: inView,
316          entry: entry
317        });
318      }
319
320      if (_this.props.onChange) {
321        // If the user is actively listening for onChange, always trigger it
322        _this.props.onChange(inView, entry);
323      }
324    };
325
326    _this.state = {
327      inView: !!props.initialInView,
328      entry: undefined
329    };
330    return _this;
331  }
332
333  var _proto = InView.prototype;
334
335  _proto.componentDidUpdate = function componentDidUpdate(prevProps) {
336    // If a IntersectionObserver option changed, reinit the observer
337    if (prevProps.rootMargin !== this.props.rootMargin || prevProps.root !== this.props.root || prevProps.threshold !== this.props.threshold || prevProps.skip !== this.props.skip || prevProps.trackVisibility !== this.props.trackVisibility || prevProps.delay !== this.props.delay) {
338      this.unobserve();
339      this.observeNode();
340    }
341  };
342
343  _proto.componentWillUnmount = function componentWillUnmount() {
344    this.unobserve();
345    this.node = null;
346  };
347
348  _proto.observeNode = function observeNode() {
349    if (!this.node || this.props.skip) return;
350    var _this$props = this.props,
351        threshold = _this$props.threshold,
352        root = _this$props.root,
353        rootMargin = _this$props.rootMargin,
354        trackVisibility = _this$props.trackVisibility,
355        delay = _this$props.delay,
356        fallbackInView = _this$props.fallbackInView;
357    this._unobserveCb = observe(this.node, this.handleChange, {
358      threshold: threshold,
359      root: root,
360      rootMargin: rootMargin,
361      // @ts-ignore
362      trackVisibility: trackVisibility,
363      // @ts-ignore
364      delay: delay
365    }, fallbackInView);
366  };
367
368  _proto.unobserve = function unobserve() {
369    if (this._unobserveCb) {
370      this._unobserveCb();
371
372      this._unobserveCb = null;
373    }
374  };
375
376  _proto.render = function render() {
377    if (!isPlainChildren(this.props)) {
378      var _this$state = this.state,
379          inView = _this$state.inView,
380          entry = _this$state.entry;
381      return this.props.children({
382        inView: inView,
383        entry: entry,
384        ref: this.handleNode
385      });
386    }
387
388    var _this$props2 = this.props,
389        children = _this$props2.children,
390        as = _this$props2.as,
391        props = _objectWithoutPropertiesLoose(_this$props2, _excluded);
392
393    return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(as || 'div', _extends({
394      ref: this.handleNode
395    }, props), children);
396  };
397
398  return InView;
399}(react__WEBPACK_IMPORTED_MODULE_0__.Component);
400InView.displayName = 'InView';
401InView.defaultProps = {
402  threshold: 0,
403  triggerOnce: false,
404  initialInView: false
405};
406
407/**
408 * React Hooks make it easy to monitor the `inView` state of your components. Call
409 * the `useInView` hook with the (optional) [options](#options) you need. It will
410 * return an array containing a `ref`, the `inView` status and the current
411 * [`entry`](https://developer.mozilla.org/en-US/docs/Web/API/IntersectionObserverEntry).
412 * Assign the `ref` to the DOM element you want to monitor, and the hook will
413 * report the status.
414 *
415 * @example
416 * ```jsx
417 * import React from 'react';
418 * import { useInView } from 'react-intersection-observer';
419 *
420 * const Component = () => {
421 *   const { ref, inView, entry } = useInView({
422 *       threshold: 0,
423 *   });
424 *
425 *   return (
426 *     <div ref={ref}>
427 *       <h2>{`Header inside viewport ${inView}.`}</h2>
428 *     </div>
429 *   );
430 * };
431 * ```
432 */
433
434function useInView(_temp) {
435  var _ref = _temp === void 0 ? {} : _temp,
436      threshold = _ref.threshold,
437      delay = _ref.delay,
438      trackVisibility = _ref.trackVisibility,
439      rootMargin = _ref.rootMargin,
440      root = _ref.root,
441      triggerOnce = _ref.triggerOnce,
442      skip = _ref.skip,
443      initialInView = _ref.initialInView,
444      fallbackInView = _ref.fallbackInView;
445
446  var unobserve = react__WEBPACK_IMPORTED_MODULE_0__.useRef();
447
448  var _React$useState = react__WEBPACK_IMPORTED_MODULE_0__.useState({
449    inView: !!initialInView
450  }),
451      state = _React$useState[0],
452      setState = _React$useState[1];
453
454  var setRef = react__WEBPACK_IMPORTED_MODULE_0__.useCallback(function (node) {
455    if (unobserve.current !== undefined) {
456      unobserve.current();
457      unobserve.current = undefined;
458    } // Skip creating the observer
459
460
461    if (skip) return;
462
463    if (node) {
464      unobserve.current = observe(node, function (inView, entry) {
465        setState({
466          inView: inView,
467          entry: entry
468        });
469
470        if (entry.isIntersecting && triggerOnce && unobserve.current) {
471          // If it should only trigger once, unobserve the element after it's inView
472          unobserve.current();
473          unobserve.current = undefined;
474        }
475      }, {
476        root: root,
477        rootMargin: rootMargin,
478        threshold: threshold,
479        // @ts-ignore
480        trackVisibility: trackVisibility,
481        // @ts-ignore
482        delay: delay
483      }, fallbackInView);
484    }
485  }, // We break the rule here, because we aren't including the actual `threshold` variable
486  // eslint-disable-next-line react-hooks/exhaustive-deps
487  [// If the threshold is an array, convert it to a string so it won't change between renders.
488  // eslint-disable-next-line react-hooks/exhaustive-deps
489  Array.isArray(threshold) ? threshold.toString() : threshold, root, rootMargin, triggerOnce, skip, trackVisibility, fallbackInView, delay]);
490  /* eslint-disable-next-line */
491
492  (0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(function () {
493    if (!unobserve.current && state.entry && !triggerOnce && !skip) {
494      // If we don't have a ref, then reset the state (unless the hook is set to only `triggerOnce` or `skip`)
495      // This ensures we correctly reflect the current state - If you aren't observing anything, then nothing is inView
496      setState({
497        inView: !!initialInView
498      });
499    }
500  });
501  var result = [setRef, state.inView, state.entry]; // Support object destructuring, by adding the specific values.
502
503  result.ref = result[0];
504  result.inView = result[1];
505  result.entry = result[2];
506  return result;
507}
508
509
510//# sourceMappingURL=react-intersection-observer.m.js.map
511
512
513/***/ })
513
514
515}]);
516//# sourceMappingURL=vendors-_yarn___virtual___react-intersection-observer-virtual-72f1bbc67d_0_cache_react-inters-a195ee.js.map?_t=37d292de66fbbda9762f

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.