PageSourceSearch

https://fervent-swirles-8f0246.netlify.app/javascripts/slider.js

js fervent-swirles-8f0246.netlify.app collected 2026-10-03 10:44:00 UTC 12,480 bytes, 304 lines download raw bytes

vendor: 4,180 bytes, lines 1-114
1!function(e, t) {
2    "object" == typeof exports && "object" == typeof module ? module.exports = t() : "function" == typeof define && define.amd ? define([], t) : "object" == typeof exports ? exports.bulmaSlider = t() : e.bulmaSlider = t()
3}("undefined" != typeof self ? self : this, function() {
4    return function(n) {
5        var r = {};
6        function i(e) {
7            if (r[e])
8                return r[e].exports;
9            var t = r[e] = {
10                i: e,
11                l: !1,
12                exports: {}
13            };
14            return n[e].call(t.exports, t, t.exports, i),
15            t.l = !0,
16            t.exports
17        }
18        return i.m = n,
19        i.c = r,
20        i.d = function(e, t, n) {
21            i.o(e, t) || Object.defineProperty(e, t, {
22                configurable: !1,
23                enumerable: !0,
24                get: n
25            })
26        }
27        ,
28        i.n = function(e) {
29            var t = e && e.__esModule ? function() {
30                return e.default
31            }
32            : function() {
33                return e
34            }
35            ;
36            return i.d(t, "a", t),
37            t
38        }
39        ,
40        i.o = function(e, t) {
41            return Object.prototype.hasOwnProperty.call(e, t)
42        }
43        ,
44        i.p = "",
45        i(i.s = 0)
46    }([function(e, t, n) {
47        "use strict";
48        Object.defineProperty(t, "__esModule", {
49            value: !0
50        });
51        var r = n(1)
52          , o = n(2)
53          , u = Object.assign || function(e) {
54            for (var t = 1; t < arguments.length; t++) {
55                var n = arguments[t];
56                for (var r in n)
57                    Object.prototype.hasOwnProperty.call(n, r) && (e[r] = n[r])
58            }
59            return e
60        }
61          , l = function() {
62            function r(e, t) {
63                for (var n = 0; n < t.length; n++) {
64                    var r = t[n];
65                    r.enumerable = r.enumerable || !1,
66                    r.configurable = !0,
67                    "value"in r && (r.writable = !0),
68                    Object.defineProperty(e, r.key, r)
69                }
70            }
71            return function(e, t, n) {
72                return t && r(e.prototype, t),
73                n && r(e, n),
74                e
75            }
76        }();
77        var a = Symbol("onSliderInput")
78          , i = function(e) {
79            function i(e) {
80                var t = 1 < arguments.length && void 0 !== arguments[1] ? arguments[1] : {};
81                !function(e, t) {
82                    if (!(e instanceof t))
83                        throw new TypeError("Cannot call a class as a function")
84                }(this, i);
85                var n = function(e, t) {
86                    if (!e)
87                        throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
88                    return !t || "object" != typeof t && "function" != typeof t ? e : t
89                }(this, (i.__proto__ || Object.getPrototypeOf(i)).call(this));
90                if (n.element = "string" == typeof e ? document.querySelector(e) : e,
91                !n.element)
92                    throw new Error("An invalid selector or non-DOM node has been provided.");
93                return n._clickEvents = ["click"],
94                n.options = u({}, o.a, t),
95                n[a] = n[a].bind(n),
96                n.init(),
97                n
98            }
99            return function(e, t) {
100                if ("function" != typeof t && null !== t)
101                    throw new TypeError("Super expression must either be null or a function, not " + typeof t);
102                e.prototype = Object.create(t && t.prototype, {
103                    constructor: {
104                        value: e,
105                        enumerable: !1,
106                        writable: !0,
107                        configurable: !0
108                    }
109                }),
110                t && (Object.setPrototypeOf ? Object.setPrototypeOf(e, t) : e.__proto__ = t)
111            }(i, r["a"]),
112            l(i, [{
113                key: "init",
114                value: function() {
vendor: 6,338 bytes, lines 115-253
115                    if (this._id = "bulmaSlider" + (new Date).getTime() + Math.floor(Math.random() * Math.floor(9999)),
116                    this.output = this._findOutputForSlider(),
117                    this.output && this.element.classList.contains("has-output-tooltip")) {
118                        var e = this._getSliderOutputPosition();
119                        this.output.style.left = e.position
120                    }
121                    this.emit("bulmaslider:ready", this.element.value)
122                }
123            }, {
124                key: "_findOutputForSlider",
125                value: function() {
126                    var t = this
127                      , e = document.getElementsByTagName("output");
128                    return [].forEach.call(e, function(e) {
129                        if (e.htmlFor == t.element.getAttribute("id"))
130                            return e
131                    }),
132                    null
133                }
134            }, {
135                key: "_getSliderOutputPosition",
136                value: function() {
137                    var e, t = window.getComputedStyle(this.element, null), n = parseInt(t.getPropertyValue("width"), 10);
138                    e = this.element.getAttribute("min") ? this.element.getAttribute("min") : 0;
139                    var r = (this.element.value - e) / (this.element.getAttribute("max") - e);
140                    return {
141                        position: (r < 0 ? 0 : 1 < r ? n : n * r) + "px"
142                    }
143                }
144            }, {
145                key: "_bindEvents",
146                value: function() {
147                    this.output && this.element.addEventListener("input", this[a], !1)
148                }
149            }, {
150                key: a,
151                value: function(e) {
152                    if (e.preventDefault(),
153                    this.element.classList.contains("has-output-tooltip")) {
154                        var t = this._getSliderOutputPosition();
155                        this.output.style.left = t.position
156                    }
157                    var n = this.output.hasAttribute("data-prefix") ? this.output.getAttribute("data-prefix") : ""
158                      , r = this.output.hasAttribute("data-postfix") ? this.output.getAttribute("data-postfix") : "";
159                    this.output.value = n + this.element.value + r,
160                    this.emit("bulmaslider:ready", this.element.value)
161                }
162            }], [{
163                key: "attach",
164                value: function() {
165                    var e = 0 < arguments.length && void 0 !== arguments[0] ? arguments[0] : 'input[type="range"].slider'
166                      , t = 1 < arguments.length && void 0 !== arguments[1] ? arguments[1] : {}
167                      , n = new Array
168                      , r = document.querySelectorAll(e);
169                    return [].forEach.call(r, function(e) {
170                        setTimeout(function() {
171                            n.push(new i(e,t))
172                        }, 100)
173                    }),
174                    n
175                }
176            }]),
177            i
178        }();
179        t.default = i
180    }
181    , function(e, t, n) {
182        "use strict";
183        var r = function() {
184            function r(e, t) {
185                for (var n = 0; n < t.length; n++) {
186                    var r = t[n];
187                    r.enumerable = r.enumerable || !1,
188                    r.configurable = !0,
189                    "value"in r && (r.writable = !0),
190                    Object.defineProperty(e, r.key, r)
191                }
192            }
193            return function(e, t, n) {
194                return t && r(e.prototype, t),
195                n && r(e, n),
196                e
197            }
198        }();
199        var i = function() {
200            function t() {
201                var e = 0 < arguments.length && void 0 !== arguments[0] ? arguments[0] : [];
202                !function(e, t) {
203                    if (!(e instanceof t))
204                        throw new TypeError("Cannot call a class as a function")
205                }(this, t),
206                this._listeners = new Map(e),
207                this._middlewares = new Map
208            }
209            return r(t, [{
210                key: "listenerCount",
211                value: function(e) {
212                    return this._listeners.has(e) ? this._listeners.get(e).length : 0
213                }
214            }, {
215                key: "removeListeners",
216                value: function() {
217                    var t = this
218                      , e = 0 < arguments.length && void 0 !== arguments[0] ? arguments[0] : null
219                      , n = 1 < arguments.length && void 0 !== arguments[1] && arguments[1];
220                    null !== e ? Array.isArray(e) ? name.forEach(function(e) {
221                        return t.removeListeners(e, n)
222                    }) : (this._listeners.delete(e),
223                    n && this.removeMiddleware(e)) : this._listeners = new Map
224                }
225            }, {
226                key: "middleware",
227                value: function(e, t) {
228                    var n = this;
229                    Array.isArray(e) ? name.forEach(function(e) {
230                        return n.middleware(e, t)
231                    }) : (Array.isArray(this._middlewares.get(e)) || this._middlewares.set(e, []),
232                    this._middlewares.get(e).push(t))
233                }
234            }, {
235                key: "removeMiddleware",
236                value: function() {
237                    var t = this
238                      , e = 0 < arguments.length && void 0 !== arguments[0] ? arguments[0] : null;
239                    null !== e ? Array.isArray(e) ? name.forEach(function(e) {
240                        return t.removeMiddleware(e)
241                    }) : this._middlewares.delete(e) : this._middlewares = new Map
242                }
243            }, {
244                key: "on",
245                value: function(e, t) {
246                    var n = this
247                      , r = 2 < arguments.length && void 0 !== arguments[2] && arguments[2];
248                    if (Array.isArray(e))
249                        e.forEach(function(e) {
250                            return n.on(e, t)
251                        });
252                    else {
253                        var i = (e = e.toString()).split(/,|, | /);
vendor: 1,962 bytes, lines 254-304
254                        1 < i.length ? i.forEach(function(e) {
255                            return n.on(e, t)
256                        }) : (Array.isArray(this._listeners.get(e)) || this._listeners.set(e, []),
257                        this._listeners.get(e).push({
258                            once: r,
259                            callback: t
260                        }))
261                    }
262                }
263            }, {
264                key: "once",
265                value: function(e, t) {
266                    this.on(e, t, !0)
267                }
268            }, {
269                key: "emit",
270                value: function(n, r) {
271                    var i = this
272                      , o = 2 < arguments.length && void 0 !== arguments[2] && arguments[2];
273                    n = n.toString();
274                    var u = this._listeners.get(n)
275                      , l = null
276                      , a = 0
277                      , s = o;
278                    if (Array.isArray(u))
279                        for (u.forEach(function(e, t) {
280                            o || (l = i._middlewares.get(n),
281                            Array.isArray(l) ? (l.forEach(function(e) {
282                                e(r, function() {
283                                    var e = 0 < arguments.length && void 0 !== arguments[0] ? arguments[0] : null;
284                                    null !== e && (r = e),
285                                    a++
286                                }, n)
287                            }),
288                            a >= l.length && (s = !0)) : s = !0),
289                            s && (e.once && (u[t] = null),
290                            e.callback(r))
291                        }); -1 !== u.indexOf(null); )
292                            u.splice(u.indexOf(null), 1)
293                }
294            }]),
295            t
296        }();
297        t.a = i
298    }
299    , function(e, t, n) {
300        "use strict";
301        t.a = {}
302    }
303    ]).default
304});

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.