PageSourceSearch

https://www.cryptopunks.app/components/lazysizes.min.js

js cryptopunks.app collected 2026-10-03 21:11:28 UTC 13,943 bytes, 457 lines download raw bytes

1/*! lazysizes - v2.0.0-rc1 */
2!(function (a, b) {
3  var c = b(a, a.document);
4  ((a.lazySizes = c),
5    "object" == typeof module && module.exports && (module.exports = c));
6})(window, function (a, b) {
7  "use strict";
8  if (b.getElementsByClassName) {
9    var c,
10      d = b.documentElement,
11      e = a.Date,
12      f = a.HTMLPictureElement,
13      g = "addEventListener",
14      h = "getAttribute",
15      i = a[g],
16      j = a.setTimeout,
17      k = a.requestAnimationFrame || j,
18      l = a.requestIdleCallback,
19      m = /^picture$/i,
20      n = ["load", "error", "lazyincluded", "_lazyloaded"],
21      o = {},
22      p = Array.prototype.forEach,
23      q = function (a, b) {
24        return (
25          o[b] || (o[b] = new RegExp("(\\s|^)" + b + "(\\s|$)")),
26          o[b].test(a[h]("class") || "") && o[b]
27        );
28      },
29      r = function (a, b) {
30        q(a, b) ||
31          a.setAttribute("class", (a[h]("class") || "").trim() + " " + b);
32      },
33      s = function (a, b) {
34        var c;
35        (c = q(a, b)) &&
36          a.setAttribute("class", (a[h]("class") || "").replace(c, " "));
37      },
38      t = function (a, b, c) {
39        var d = c ? g : "removeEventListener";
40        (c && t(a, b),
41          n.forEach(function (c) {
42            a[d](c, b);
43          }));
44      },
45      u = function (a, c, d, e, f) {
46        var g = b.createEvent("CustomEvent");
47        return (g.initCustomEvent(c, !e, !f, d || {}), a.dispatchEvent(g), g);
48      },
49      v = function (b, d) {
50        var e;
51        !f && (e = a.picturefill || c.pf)
52          ? e({ reevaluate: !0, elements: [b] })
53          : d && d.src && (b.src = d.src);
54      },
55      w = function (a, b) {
56        return (getComputedStyle(a, null) || {})[b];
57      },
58      x = function (a, b, d) {
59        for (d = d || a.offsetWidth; d < c.minSize && b && !a._lazysizesWidth; )
60          ((d = b.offsetWidth), (b = b.parentNode));
61        return d;
62      },
63      y = (function () {
64        var a,
65          c,
66          d = [],
67          e = function () {
68            var b;
69            for (a = !0, c = !1; d.length; )
70              ((b = d.shift()), b[0].apply(b[1], b[2]));
71            a = !1;
72          };
73        return function (f) {
74          a
75            ? f.apply(this, arguments)
76            : (d.push([f, this, arguments]),
77              c || ((c = !0), (b.hidden ? j : k)(e)));
78        };
79      })(),
80      z = function (a, b) {
81        return b
82          ? function () {
83              y(a);
84            }
85          : function () {
86              var b = this,
87                c = arguments;
88              y(function () {
89                a.apply(b, c);
90              });
91            };
92      },
93      A = function (a) {
94        var b,
95          c = 0,
96          d = 99,
97          f = 999,
98          g = f,
99          h = function () {
100            ((b = !1), (c = e.now()), a());
101          },
102          i = l
103            ? function () {
104                (l(h, { timeout: g }), g !== f && (g = f));
105              }
106            : z(function () {
107                j(h);
108              }, !0);
109        return function (a) {
110          var f;
111          ((a = a === !0) && (g = 66),
112            b ||
113              ((b = !0),
114              (f = d - (e.now() - c)),
115              0 > f && (f = 0),
116              a || (9 > f && l) ? i() : j(i, f)));
117        };
118      },
119      B = function (a) {
120        var b,
121          c,
122          d = 99,
123          f = function () {
124            ((b = null), a());
125          },
126          g = function () {
127            var a = e.now() - c;
128            d > a ? j(g, d - a) : (l || f)(f);
129          };
130        return function () {
131          ((c = e.now()), b || (b = j(g, d)));
132        };
133      },
134      C = (function () {
135        var f,
136          k,
137          l,
138          n,
139          o,
140          x,
141          C,
142          E,
143          F,
144          G,
145          H,
146          I,
147          J,
148          K,
149          L,
150          M = /^img$/i,
151          N = /^iframe$/i,
152          O = "onscroll" in a && !/glebot/.test(navigator.userAgent),
153          P = 0,
154          Q = 0,
155          R = 0,
156          S = 0,
157          T = function (a) {
158            (R--,
159              a && a.target && t(a.target, T),
160              (!a || 0 > R || !a.target) && (R = 0));
161          },
162          U = function (a, c) {
163            var e,
164              f = a,
165              g =
166                "hidden" == w(b.body, "visibility") ||
167                "hidden" != w(a, "visibility");
168            for (
169              F -= c, I += c, G -= c, H += c;
170              g && (f = f.offsetParent) && f != b.body && f != d;
171
172            )
173              ((g = (w(f, "opacity") || 1) > 0),
174                g &&
175                  "visible" != w(f, "overflow") &&
176                  ((e = f.getBoundingClientRect()),
177                  (g =
178                    H > e.left &&
179                    G < e.right &&
180                    I > e.top - 1 &&
181                    F < e.bottom + 1)));
182            return g;
183          },
184          V = function () {
185            var a, b, e, g, i, j, m, n, p;
186            if ((o = c.loadMode) && 8 > R && (a = f.length)) {
187              ((b = 0),
188                S++,
189                null == K &&
190                  ("expand" in c ||
191                    (c.expand =
192                      d.clientHeight > 600
193                        ? d.clientWidth > 600
194                          ? 550
195                          : 410
196                        : 359),
197                  (J = c.expand),
198                  (K = J * c.expFactor)),
199                K > Q && 1 > R && S > 3 && o > 2
200                  ? ((Q = K), (S = 0))
201                  : (Q = o > 1 && S > 2 && 6 > R ? J : P));
202              for (; a > b; b++)
203                if (f[b] && !f[b]._lazyRace)
204                  if (O)
205                    if (
206                      (((n = f[b][h]("data-expand")) && (j = 1 * n)) || (j = Q),
207                      p !== j &&
208                        ((C = innerWidth + j * L),
209                        (E = innerHeight + j),
210                        (m = -1 * j),
211                        (p = j)),
212                      (e = f[b].getBoundingClientRect()),
213                      (I = e.bottom) >= m &&
214                        (F = e.top) <= E &&
215                        (H = e.right) >= m * L &&
216                        (G = e.left) <= C &&
217                        (I || H || G || F) &&
218                        ((l && 3 > R && !n && (3 > o || 4 > S)) || U(f[b], j)))
219                    ) {
220                      if ((ba(f[b]), (i = !0), R > 9)) break;
221                    } else
222                      !i &&
223                        l &&
224                        !g &&
225                        4 > R &&
226                        4 > S &&
227                        o > 2 &&
228                        (k[0] || c.preloadAfterLoad) &&
229                        (k[0] ||
230                          (!n &&
231                            (I ||
232                              H ||
233                              G ||
234                              F ||
235                              "auto" != f[b][h](c.sizesAttr)))) &&
236                        (g = k[0] || f[b]);
237                  else ba(f[b]);
238              g && !i && ba(g);
239            }
240          },
241          W = A(V),
242          X = function (a) {
243            (r(a.target, c.loadedClass),
244              s(a.target, c.loadingClass),
245              t(a.target, Z));
246          },
247          Y = z(X),
248          Z = function (a) {
249            Y({ target: a.target });
250          },
251          $ = function (a, b) {
252            try {
253              a.contentWindow.location.replace(b);
254            } catch (c) {
255              a.src = b;
256            }
257          },
258          _ = function (a) {
259            var b,
260              d,
261              e = a[h](c.srcsetAttr);
262            ((b = c.customMedia[a[h]("data-media") || a[h]("media")]) &&
263              a.setAttribute("media", b),
264              e && a.setAttribute("srcset", e),
265              b &&
266                ((d = a.parentNode),
267                d.insertBefore(a.cloneNode(), a),
268                d.removeChild(a)));
269          },
270          aa = z(function (a, b, d, e, f) {
271            var g, i, k, l, o, q;
272            ((o = u(a, "lazybeforeunveil", b)).defaultPrevented ||
273              (e && (d ? r(a, c.autosizesClass) : a.setAttribute("sizes", e)),
274              (i = a[h](c.srcsetAttr)),
275              (g = a[h](c.srcAttr)),
276              f && ((k = a.parentNode), (l = k && m.test(k.nodeName || ""))),
277              (q = b.firesLoad || ("src" in a && (i || g || l))),
278              (o = { target: a }),
279              q &&
280                (t(a, T, !0),
281                clearTimeout(n),
282                (n = j(T, 2500)),
283                r(a, c.loadingClass),
284                t(a, Z, !0)),
285              l && p.call(k.getElementsByTagName("source"), _),
286              i
287                ? a.setAttribute("srcset", i)
288                : g && !l && (N.test(a.nodeName) ? $(a, g) : (a.src = g)),
289              (i || l) && v(a, { src: g })),
290              y(function () {
291                (a._lazyRace && delete a._lazyRace,
292                  s(a, c.lazyClass),
293                  (!q || a.complete) && (q ? T(o) : R--, X(o)));
294              }));
295          }),
296          ba = function (a) {
297            var b,
298              d = M.test(a.nodeName),
299              e = d && (a[h](c.sizesAttr) || a[h]("sizes")),
300              f = "auto" == e;
301            ((!f && l) ||
302              !d ||
303              (!a.src && !a.srcset) ||
304              a.complete ||
305              q(a, c.errorClass)) &&
306              ((b = u(a, "lazyunveilread").detail),
307              f && D.updateElem(a, !0, a.offsetWidth),
308              (a._lazyRace = !0),
309              R++,
310              aa(a, b, f, e, d));
311          },
312          ca = function () {
313            if (!l) {
314              if (e.now() - x < 999) return void j(ca, 999);
315              var a = B(function () {
316                ((c.loadMode = 3), W());
317              });
318              ((l = !0),
319                (c.loadMode = 3),
320                W(),
321                i(
322                  "scroll",
323                  function () {
324                    (3 == c.loadMode && (c.loadMode = 2), a());
325                  },
326                  !0,
327                ));
328            }
329          };
330        return {
331          _: function () {
332            ((x = e.now()),
333              (f = b.getElementsByClassName(c.lazyClass)),
334              (k = b.getElementsByClassName(
335                c.lazyClass + " " + c.preloadClass,
336              )),
337              (L = c.hFac),
338              i("scroll", W, !0),
339              i("resize", W, !0),
340              a.MutationObserver
341                ? new MutationObserver(W).observe(d, {
342                    childList: !0,
343                    subtree: !0,
344                    attributes: !0,
345                  })
346                : (d[g]("DOMNodeInserted", W, !0),
347                  d[g]("DOMAttrModified", W, !0),
348                  setInterval(W, 999)),
349              i("hashchange", W, !0),
350              [
351                "focus",
352                "mouseover",
353                "click",
354                "load",
355                "transitionend",
356                "animationend",
357                "webkitAnimationEnd",
358              ].forEach(function (a) {
359                b[g](a, W, !0);
360              }),
361              /d$|^c/.test(b.readyState)
362                ? ca()
363                : (i("load", ca), b[g]("DOMContentLoaded", W), j(ca, 2e4)),
364              W(f.length > 0));
365          },
366          checkElems: W,
367          unveil: ba,
368        };
369      })(),
370      D = (function () {
371        var a,
372          d = z(function (a, b, c, d) {
373            var e, f, g;
374            if (
375              ((a._lazysizesWidth = d),
376              (d += "px"),
377              a.setAttribute("sizes", d),
378              m.test(b.nodeName || ""))
379            )
380              for (
381                e = b.getElementsByTagName("source"), f = 0, g = e.length;
382                g > f;
383                f++
384              )
385                e[f].setAttribute("sizes", d);
386            c.detail.dataAttr || v(a, c.detail);
387          }),
388          e = function (a, b, c) {
389            var e,
390              f = a.parentNode;
391            f &&
392              ((c = x(a, f, c)),
393              (e = u(a, "lazybeforesizes", { width: c, dataAttr: !!b })),
394              e.defaultPrevented ||
395                ((c = e.detail.width),
396                c && c !== a._lazysizesWidth && d(a, f, e, c)));
397          },
398          f = function () {
399            var b,
400              c = a.length;
401            if (c) for (b = 0; c > b; b++) e(a[b]);
402          },
403          g = B(f);
404        return {
405          _: function () {
406            ((a = b.getElementsByClassName(c.autosizesClass)), i("resize", g));
407          },
408          checkElems: g,
409          updateElem: e,
410        };
411      })(),
412      E = function () {
413        E.i || ((E.i = !0), D._(), C._());
414      };
415    return (
416      (function () {
417        var b,
418          d = {
419            lazyClass: "lazyload",
420            loadedClass: "lazyloaded",
421            loadingClass: "lazyloading",
422            preloadClass: "lazypreload",
423            errorClass: "lazyerror",
424            autosizesClass: "lazyautosizes",
425            srcAttr: "data-src",
426            srcsetAttr: "data-srcset",
427            sizesAttr: "data-sizes",
428            minSize: 40,
429            customMedia: {},
430            init: !0,
431            expFactor: 1.7,
432            hFac: 0.8,
433            loadMode: 2,
434          };
435        c = a.lazySizesConfig || a.lazysizesConfig || {};
436        for (b in d) b in c || (c[b] = d[b]);
437        ((a.lazySizesConfig = c),
438          j(function () {
439            c.init && E();
440          }));
441      })(),
442      {
443        cfg: c,
444        autoSizer: D,
445        loader: C,
446        init: E,
447        uP: v,
448        aC: r,
449        rC: s,
450        hC: q,
451        fire: u,
452        gW: x,
453        rAF: y,
454      }
455    );
456  }
457});

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.