PageSourceSearch

https://www.thenleleinstitute.org/static/_common/image_sets/waterf…661e62151e5322b5a5f69ce5c8a2c12bb62fda13.js

js thenleleinstitute.org collected 2026-10-08 07:43:18 UTC 1,845 bytes, 73 lines download raw bytes

1// Waterfall.js, https://github.com/raphamorim/waterfall,version 1.0.3
2function waterfall(t, opt) { // eslint-disable-line
3  "string" == typeof t && (t = document.querySelector(t)),
4  (t.style.position = "relative");
5  var e = [],
6    n = [].map.call(t.children, function (t) {
7      return (t.style.position = "absolute"), t;
8    });
9  function r(t) {
10    return window.getComputedStyle(t);
11  }
12  function o(t, e) {
13    return parseFloat(r(e)["margin" + t]) || 0;
14  }
15  function l(t) {
16    return t + "px";
17  }
18  function i(t) {
19    return parseFloat(t.style.left);
20  }
21  function u(t) {
22    return parseFloat(r(t).width);
23  }
24  function a(t) {
25    return (
26      (function (t) {
27        return parseFloat(t.style.top);
28      })(t) +
29      (function (t) {
30        return parseFloat(r(t).height);
31      })(t) +
32      o("Bottom", t)
33    );
34  }
35  function s(t) {
36    return i(t) + u(t) + o("Right", t);
37  }
38  function f(t) {
39    t = t.sort(function (t, e) {
40      return a(e) - a(t) || i(e) - i(t);
41    });
42  }
43  n.length &&
44    ((n[0].style.top = "0px"),
45    (n[0].style.left = l(o("Left", n[0]))),
46    e.push(n[0]));
47  for (var p = 1; p < n.length; p++) {
48    var c = n[p - 1],
49      y = n[p];
50    if (!(s(c) + u(y) <= u(t))) break;
51    (y.style.top = c.style.top),
52    (y.style.left = l(s(c) + o("Left", y))),
53    e.push(y);
54  }
55  for (; p < n.length; p++) {
56    opt.keepOrder || f(e);
57    y = n[p];
58    var d = opt.keepOrder ? e.shift() : e.pop();
59    (y.style.top = l(a(d) + o("Top", y))), (y.style.left = l(i(d))), e.push(y);
60  }
61  f(e);
62  var h = e[0];
63  t.style.height = l(a(h) + o("Bottom", h));
64  var v = u(t);
65  function g(e) {
66    u(t) != v &&
67      (e.target.removeEventListener(e.type, arguments.callee), waterfall(t));
68  }
69  window.addEventListener
70    ? window.addEventListener("resize", g)
71    : (document.body.onresize = g);
72}
73;

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.