PageSourceSearch

https://interfood.az/era_cms/plugins/pace/pace.min.js

js interfood.az collected 2026-10-04 01:10:21 UTC 15,963 bytes, 369 lines download raw bytes

vendor: 15,963 bytes, lines 1-369
1/*! pace 1.0.0 */
2(function () {
3	var a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y, z, A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V, W, X = [].slice,
4		Y = {}.hasOwnProperty,
5		Z = function (a, b) {
6			function c() {
7				this.constructor = a
8			}
9			for (var d in b) Y.call(b, d) && (a[d] = b[d]);
10			return c.prototype = b.prototype, a.prototype = new c, a.__super__ = b.prototype, a
11		},
12		$ = [].indexOf || function (a) {
13			for (var b = 0, c = this.length; c > b; b++)
14				if (b in this && this[b] === a) return b;
15			return -1
16		};
17	for (u = {
18			catchupTime: 100,
19			initialRate: .03,
20			minTime: 250,
21			ghostTime: 100,
22			maxProgressPerFrame: 20,
23			easeFactor: 1.25,
24			startOnPageLoad: !0,
25			restartOnPushState: !0,
26			restartOnRequestAfter: 500,
27			target: "span.head-progressbar",
28			elements: {
29				checkInterval: 100,
30				selectors: ["span.head-progressbar"]
31			},
32			eventLag: {
33				minSamples: 10,
34				sampleCount: 3,
35				lagThreshold: 3
36			},
37			ajax: {
38				trackMethods: ["GET"],
39				trackWebSockets: !0,
40				ignoreURLs: []
41			}
42		}, C = function () {
43			var a;
44			return null != (a = "undefined" != typeof performance && null !== performance && "function" == typeof performance.now ? performance.now() : void 0) ? a : +new Date
45		}, E = window.requestAnimationFrame || window.mozRequestAnimationFrame || window.webkitRequestAnimationFrame || window.msRequestAnimationFrame, t = window.cancelAnimationFrame || window.mozCancelAnimationFrame, null == E && (E = function (a) {
46			return setTimeout(a, 50)
47		}, t = function (a) {
48			return clearTimeout(a)
49		}), G = function (a) {
50			var b, c;
51			return b = C(), (c = function () {
52				var d;
53				return d = C() - b, d >= 33 ? (b = C(), a(d, function () {
54					return E(c)
55				})) : setTimeout(c, 33 - d)
56			})()
57		}, F = function () {
58			var a, b, c;
59			return c = arguments[0], b = arguments[1], a = 3 <= arguments.length ? X.call(arguments, 2) : [], "function" == typeof c[b] ? c[b].apply(c, a) : c[b]
60		}, v = function () {
61			var a, b, c, d, e, f, g;
62			for (b = arguments[0], d = 2 <= arguments.length ? X.call(arguments, 1) : [], f = 0, g = d.length; g > f; f++)
63				if (c = d[f])
64					for (a in c) Y.call(c, a) && (e = c[a], null != b[a] && "object" == typeof b[a] && null != e && "object" == typeof e ? v(b[a], e) : b[a] = e);
65			return b
66		}, q = function (a) {
67			var b, c, d, e, f;
68			for (c = b = 0, e = 0, f = a.length; f > e; e++) d = a[e], c += Math.abs(d), b++;
69			return c / b
70		}, x = function (a, b) {
71			var c, d, e;
72			if (null == a && (a = "options"), null == b && (b = !0), e = document.querySelector("[data-pace-" + a + "]")) {
73				if (c = e.getAttribute("data-pace-" + a), !b) return c;
74				try {
75					return JSON.parse(c)
76				} catch (f) {
77					return d = f, "undefined" != typeof console && null !== console ? console.error("Error parsing inline pace options", d) : void 0
78				}
79			}
80		}, g = function () {
81			function a() {}
82			return a.prototype.on = function (a, b, c, d) {
83				var e;
84				return null == d && (d = !1), null == this.bindings && (this.bindings = {}), null == (e = this.bindings)[a] && (e[a] = []), this.bindings[a].push({
85					handler: b,
86					ctx: c,
87					once: d
88				})
89			}, a.prototype.once = function (a, b, c) {
90				return this.on(a, b, c, !0)
91			}, a.prototype.off = function (a, b) {
92				var c, d, e;
93				if (null != (null != (d = this.bindings) ? d[a] : void 0)) {
94					if (null == b) return delete this.bindings[a];
95					for (c = 0, e = []; c < this.bindings[a].length;) e.push(this.bindings[a][c].handler === b ? this.bindings[a].splice(c, 1) : c++);
96					return e
97				}
98			}, a.prototype.trigger = function () {
99				var a, b, c, d, e, f, g, h, i;
100				if (c = arguments[0], a = 2 <= arguments.length ? X.call(arguments, 1) : [], null != (g = this.bindings) ? g[c] : void 0) {
101					for (e = 0, i = []; e < this.bindings[c].length;) h = this.bindings[c][e], d = h.handler, b = h.ctx, f = h.once, d.apply(null != b ? b : this, a), i.push(f ? this.bindings[c].splice(e, 1) : e++);
102					return i
103				}
104			}, a
105		}(), j = window.Pace || {}, window.Pace = j, v(j, g.prototype), D = j.options = v({}, u, window.paceOptions, x()), U = ["ajax", "document", "eventLag", "elements"], Q = 0, S = U.length; S > Q; Q++) K = U[Q], D[K] === !0 && (D[K] = u[K]);
106	i = function (a) {
107		function b() {
108			return V = b.__super__.constructor.apply(this, arguments)
109		}
110		return Z(b, a), b
111	}(Error), b = function () {
112		function a() {
113			this.progress = 0
114		}
115		return a.prototype.getElement = function () {
116			var a;
117			if (null == this.el) {
118				if (a = document.querySelector(D.target), !a) throw new i;
119				this.el = document.createElement("div"), this.el.className = "pace pace-active", document.body.className = document.body.className.replace(/pace-done/g, ""), document.body.className += " pace-running", this.el.innerHTML = '<div class="pace-progress">\n  <div class="pace-progress-inner"></div>\n</div>\n<div class="pace-activity"></div>', null != a.firstChild ? a.insertBefore(this.el, a.firstChild) : a.appendChild(this.el)
120			}
121			return this.el
122		}, a.prototype.finish = function () {
123			var a;
124			return a = this.getElement(), a.className = a.className.replace("pace-active", ""), a.className += " pace-inactive", document.body.className = document.body.className.replace("pace-running", ""), document.body.className += " pace-done"
125		}, a.prototype.update = function (a) {
126			return this.progress = a, this.render()
127		}, a.prototype.destroy = function () {
128			try {
129				this.getElement().parentNode.removeChild(this.getElement())
130			} catch (a) {
131				i = a
132			}
133			return this.el = void 0
134		}, a.prototype.render = function () {
135			var a, b, c, d, e, f, g;
136			if (null == document.querySelector(D.target)) return !1;
137			for (a = this.getElement(), d = "translate3d(" + this.progress + "%, 0, 0)", g = ["webkitTransform", "msTransform", "transform"], e = 0, f = g.length; f > e; e++) b = g[e], a.children[0].style[b] = d;
138			return (!this.lastRenderedProgress || this.lastRenderedProgress | 0 !== this.progress | 0) && (a.children[0].setAttribute("data-progress-text", "" + (0 | this.progress) + "%"), this.progress >= 100 ? c = "99" : (c = this.progress < 10 ? "0" : "", c += 0 | this.progress), a.children[0].setAttribute("data-progress", "" + c)), this.lastRenderedProgress = this.progress
139		}, a.prototype.done = function () {
140			return this.progress >= 100
141		}, a
142	}(), h = function () {
143		function a() {
144			this.bindings = {}
145		}
146		return a.prototype.trigger = function (a, b) {
147			var c, d, e, f, g;
148			if (null != this.bindings[a]) {
149				for (f = this.bindings[a], g = [], d = 0, e = f.length; e > d; d++) c = f[d], g.push(c.call(this, b));
150				return g
151			}
152		}, a.prototype.on = function (a, b) {
153			var c;
154			return null == (c = this.bindings)[a] && (c[a] = []), this.bindings[a].push(b)
155		}, a
156	}(), P = window.XMLHttpRequest, O = window.XDomainRequest, N = window.WebSocket, w = function (a, b) {
157		var c, d, e, f;
158		f = [];
159		for (d in b.prototype) try {
160			e = b.prototype[d], f.push(null == a[d] && "function" != typeof e ? a[d] = e : void 0)
161		} catch (g) {
162			c = g
163		}
164		return f
165	}, A = [], j.ignore = function () {
166		var a, b, c;
167		return b = arguments[0], a = 2 <= arguments.length ? X.call(arguments, 1) : [], A.unshift("ignore"), c = b.apply(null, a), A.shift(), c
168	}, j.track = function () {
169		var a, b, c;
170		return b = arguments[0], a = 2 <= arguments.length ? X.call(arguments, 1) : [], A.unshift("track"), c = b.apply(null, a), A.shift(), c
171	}, J = function (a) {
172		var b;
173		if (null == a && (a = "GET"), "track" === A[0]) return "force";
174		if (!A.length && D.ajax) {
175			if ("socket" === a && D.ajax.trackWebSockets) return !0;
176			if (b = a.toUpperCase(), $.call(D.ajax.trackMethods, b) >= 0) return !0
177		}
178		return !1
179	}, k = function (a) {
180		function b() {
181			var a, c = this;
182			b.__super__.constructor.apply(this, arguments), a = function (a) {
183				var b;
184				return b = a.open, a.open = function (d, e) {
185					return J(d) && c.trigger("request", {
186						type: d,
187						url: e,
188						request: a
189					}), b.apply(a, arguments)
190				}
191			}, window.XMLHttpRequest = function (b) {
192				var c;
193				return c = new P(b), a(c), c
194			};
195			try {
196				w(window.XMLHttpRequest, P)
197			} catch (d) {}
198			if (null != O) {
199				window.XDomainRequest = function () {
200					var b;
201					return b = new O, a(b), b
202				};
203				try {
204					w(window.XDomainRequest, O)
205				} catch (d) {}
206			}
207			if (null != N && D.ajax.trackWebSockets) {
208				window.WebSocket = function (a, b) {
209					var d;
210					return d = null != b ? new N(a, b) : new N(a), J("socket") && c.trigger("request", {
211						type: "socket",
212						url: a,
213						protocols: b,
214						request: d
215					}), d
216				};
217				try {
218					w(window.WebSocket, N)
219				} catch (d) {}
220			}
221		}
222		return Z(b, a), b
223	}(h), R = null, y = function () {
224		return null == R && (R = new k), R
225	}, I = function (a) {
226		var b, c, d, e;
227		for (e = D.ajax.ignoreURLs, c = 0, d = e.length; d > c; c++)
228			if (b = e[c], "string" == typeof b) {
229				if (-1 !== a.indexOf(b)) return !0
230			} else if (b.test(a)) return !0;
231		return !1
232	}, y().on("request", function (b) {
233		var c, d, e, f, g;
234		return f = b.type, e = b.request, g = b.url, I(g) ? void 0 : j.running || D.restartOnRequestAfter === !1 && "force" !== J(f) ? void 0 : (d = arguments, c = D.restartOnRequestAfter || 0, "boolean" == typeof c && (c = 0), setTimeout(function () {
235			var b, c, g, h, i, k;
236			if (b = "socket" === f ? e.readyState < 2 : 0 < (h = e.readyState) && 4 > h) {
237				for (j.restart(), i = j.sources, k = [], c = 0, g = i.length; g > c; c++) {
238					if (K = i[c], K instanceof a) {
239						K.watch.apply(K, d);
240						break
241					}
242					k.push(void 0)
243				}
244				return k
245			}
246		}, c))
247	}), a = function () {
248		function a() {
249			var a = this;
250			this.elements = [], y().on("request", function () {
251				return a.watch.apply(a, arguments)
252			})
253		}
254		return a.prototype.watch = function (a) {
255			var b, c, d, e;
256			return d = a.type, b = a.request, e = a.url, I(e) ? void 0 : (c = "socket" === d ? new n(b) : new o(b), this.elements.push(c))
257		}, a
258	}(), o = function () {
259		function a(a) {
260			var b, c, d, e, f, g, h = this;
261			if (this.progress = 0, null != window.ProgressEvent)
262				for (c = null, a.addEventListener("progress", function (a) {
263						return h.progress = a.lengthComputable ? 100 * a.loaded / a.total : h.progress + (100 - h.progress) / 2
264					}, !1), g = ["load", "abort", "timeout", "error"], d = 0, e = g.length; e > d; d++) b = g[d], a.addEventListener(b, function () {
265					return h.progress = 100
266				}, !1);
267			else f = a.onreadystatechange, a.onreadystatechange = function () {
268				var b;
269				return 0 === (b = a.readyState) || 4 === b ? h.progress = 100 : 3 === a.readyState && (h.progress = 50), "function" == typeof f ? f.apply(null, arguments) : void 0
270			}
271		}
272		return a
273	}(), n = function () {
274		function a(a) {
275			var b, c, d, e, f = this;
276			for (this.progress = 0, e = ["error", "open"], c = 0, d = e.length; d > c; c++) b = e[c], a.addEventListener(b, function () {
277				return f.progress = 100
278			}, !1)
279		}
280		return a
281	}(), d = function () {
282		function a(a) {
283			var b, c, d, f;
284			for (null == a && (a = {}), this.elements = [], null == a.selectors && (a.selectors = []), f = a.selectors, c = 0, d = f.length; d > c; c++) b = f[c], this.elements.push(new e(b))
285		}
286		return a
287	}(), e = function () {
288		function a(a) {
289			this.selector = a, this.progress = 0, this.check()
290		}
291		return a.prototype.check = function () {
292			var a = this;
293			return document.querySelector(this.selector) ? this.done() : setTimeout(function () {
294				return a.check()
295			}, D.elements.checkInterval)
296		}, a.prototype.done = function () {
297			return this.progress = 100
298		}, a
299	}(), c = function () {
300		function a() {
301			var a, b, c = this;
302			this.progress = null != (b = this.states[document.readyState]) ? b : 100, a = document.onreadystatechange, document.onreadystatechange = function () {
303				return null != c.states[document.readyState] && (c.progress = c.states[document.readyState]), "function" == typeof a ? a.apply(null, arguments) : void 0
304			}
305		}
306		return a.prototype.states = {
307			loading: 0,
308			interactive: 50,
309			complete: 100
310		}, a
311	}(), f = function () {
312		function a() {
313			var a, b, c, d, e, f = this;
314			this.progress = 0, a = 0, e = [], d = 0, c = C(), b = setInterval(function () {
315				var g;
316				return g = C() - c - 50, c = C(), e.push(g), e.length > D.eventLag.sampleCount && e.shift(), a = q(e), ++d >= D.eventLag.minSamples && a < D.eventLag.lagThreshold ? (f.progress = 100, clearInterval(b)) : f.progress = 100 * (3 / (a + 3))
317			}, 50)
318		}
319		return a
320	}(), m = function () {
321		function a(a) {
322			this.source = a, this.last = this.sinceLastUpdate = 0, this.rate = D.initialRate, this.catchup = 0, this.progress = this.lastProgress = 0, null != this.source && (this.progress = F(this.source, "progress"))
323		}
324		return a.prototype.tick = function (a, b) {
325			var c;
326			return null == b && (b = F(this.source, "progress")), b >= 100 && (this.done = !0), b === this.last ? this.sinceLastUpdate += a : (this.sinceLastUpdate && (this.rate = (b - this.last) / this.sinceLastUpdate), this.catchup = (b - this.progress) / D.catchupTime, this.sinceLastUpdate = 0, this.last = b), b > this.progress && (this.progress += this.catchup * a), c = 1 - Math.pow(this.progress / 100, D.easeFactor), this.progress += c * this.rate * a, this.progress = Math.min(this.lastProgress + D.maxProgressPerFrame, this.progress), this.progress = Math.max(0, this.progress), this.progress = Math.min(100, this.progress), this.lastProgress = this.progress, this.progress
327		}, a
328	}(), L = null, H = null, r = null, M = null, p = null, s = null, j.running = !1, z = function () {
329		return D.restartOnPushState ? j.restart() : void 0
330	}, null != window.history.pushState && (T = window.history.pushState, window.history.pushState = function () {
331		return z(), T.apply(window.history, arguments)
332	}), null != window.history.replaceState && (W = window.history.replaceState, window.history.replaceState = function () {
333		return z(), W.apply(window.history, arguments)
334	}), l = {
335		ajax: a,
336		elements: d,
337		document: c,
338		eventLag: f
339	}, (B = function () {
340		var a, c, d, e, f, g, h, i;
341		for (j.sources = L = [], g = ["ajax", "elements", "document", "eventLag"], c = 0, e = g.length; e > c; c++) a = g[c], D[a] !== !1 && L.push(new l[a](D[a]));
342		for (i = null != (h = D.extraSources) ? h : [], d = 0, f = i.length; f > d; d++) K = i[d], L.push(new K(D));
343		return j.bar = r = new b, H = [], M = new m
344	})(), j.stop = function () {
345		return j.trigger("stop"), j.running = !1, r.destroy(), s = !0, null != p && ("function" == typeof t && t(p), p = null), B()
346	}, j.restart = function () {
347		return j.trigger("restart"), j.stop(), j.start()
348	}, j.go = function () {
349		var a;
350		return j.running = !0, r.render(), a = C(), s = !1, p = G(function (b, c) {
351			var d, e, f, g, h, i, k, l, n, o, p, q, t, u, v, w;
352			for (l = 100 - r.progress, e = p = 0, f = !0, i = q = 0, u = L.length; u > q; i = ++q)
353				for (K = L[i], o = null != H[i] ? H[i] : H[i] = [], h = null != (w = K.elements) ? w : [K], k = t = 0, v = h.length; v > t; k = ++t) g = h[k], n = null != o[k] ? o[k] : o[k] = new m(g), f &= n.done, n.done || (e++, p += n.tick(b));
354			return d = p / e, r.update(M.tick(b, d)), r.done() || f || s ? (r.update(100), j.trigger("done"), setTimeout(function () {
355				return r.finish(), j.running = !1, j.trigger("hide")
356			}, Math.max(D.ghostTime, Math.max(D.minTime - (C() - a), 0)))) : c()
357		})
358	}, j.start = function (a) {
359		v(D, a), j.running = !0;
360		try {
361			r.render()
362		} catch (b) {
363			i = b
364		}
365		return document.querySelector(".pace") ? (j.trigger("start"), j.go()) : setTimeout(j.start, 50)
366	}, "function" == typeof define && define.amd ? define(function () {
367		return j
368	}) : "object" == typeof exports ? module.exports = j : D.startOnPageLoad && j.start()
369}).call(this);

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.