PageSourceSearch

https://login.medirect.com.mt/Themes/Medirect/js/webfont.js

js medirect.com.mt collected 2026-09-24 09:32:27 UTC 21,810 bytes, 707 lines download raw bytes

vendor: 21,810 bytes, lines 1-707
1/*
2 * Copyright 2016 Small Batch, Inc.
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License"); you may not
5 * use this file except in compliance with the License. You may obtain a copy of
6 * the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
12 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
13 * License for the specific language governing permissions and limitations under
14 * the License.
15 */
16/* Web Font Loader v1.6.26 - (c) Adobe Systems, Google. License: Apache 2.0 */
17(function () {
18    function aa(a, b, c) {
19        return a.call.apply(a.bind, arguments)
20    }
21    function ba(a, b, c) {
22        if (!a) throw Error();
23        if (2 < arguments.length) {
24            var d = Array.prototype.slice.call(arguments, 2);
25            return function () {
26                var c = Array.prototype.slice.call(arguments);
27                Array.prototype.unshift.apply(c, d);
28                return a.apply(b, c)
29            }
30        }
31        return function () {
32            return a.apply(b, arguments)
33        }
34    }
35    function p(a, b, c) {
36        p = Function.prototype.bind && -1 != Function.prototype.bind.toString().indexOf("native code") ? aa : ba;
37        return p.apply(null, arguments)
38    }
39    var q = Date.now || function () {
40        return +new Date
41    };
42
43    function ca(a, b) {
44        this.a = a;
45        this.m = b || a;
46        this.c = this.m.document
47    }
48    var da = !!window.FontFace;
49
50    function t(a, b, c, d) {
51        b = a.c.createElement(b);
52        if (c) for (var e in c) c.hasOwnProperty(e) && ("style" == e ? b.style.cssText = c[e] : b.setAttribute(e, c[e]));
53        d && b.appendChild(a.c.createTextNode(d));
54        return b
55    }
56    function u(a, b, c) {
57        a = a.c.getElementsByTagName(b)[0];
58        a || (a = document.documentElement);
59        a.insertBefore(c, a.lastChild)
60    }
61    function v(a) {
62        a.parentNode && a.parentNode.removeChild(a)
63    }
64
65    function w(a, b, c) {
66        b = b || [];
67        c = c || [];
68        for (var d = a.className.split(/\s+/), e = 0; e < b.length; e += 1) {
69            for (var f = !1, g = 0; g < d.length; g += 1) if (b[e] === d[g]) {
70                f = !0;
71                break
72            }
73            f || d.push(b[e])
74        }
75        b = [];
76        for (e = 0; e < d.length; e += 1) {
77            f = !1;
78            for (g = 0; g < c.length; g += 1) if (d[e] === c[g]) {
79                f = !0;
80                break
81            }
82            f || b.push(d[e])
83        }
84        a.className = b.join(" ").replace(/\s+/g, " ").replace(/^\s+|\s+$/, "")
85    }
86    function y(a, b) {
87        for (var c = a.className.split(/\s+/), d = 0, e = c.length; d < e; d++) if (c[d] == b) return !0;
88        return !1
89    }
90
91    function z(a) {
92        if ("string" === typeof a.f) return a.f;
93        var b = a.m.location.protocol;
94        "about:" == b && (b = a.a.location.protocol);
95        return "https:" == b ? "https:" : "http:"
96    }
97    function ea(a) {
98        return a.m.location.hostname || a.a.location.hostname
99    }
100
101    function A(a, b, c) {
102        function d() {
103            k && e && f && (k(g), k = null)
104        }
105        b = t(a, "link", {
106            rel: "stylesheet",
107            href: b,
108            media: "all"
109        });
110        var e = !1,
111            f = !0,
112            g = null,
113            k = c || null;
114        da ? (b.onload = function () {
115            e = !0;
116            d()
117        }, b.onerror = function () {
118            e = !0;
119            g = Error("Stylesheet failed to load");
120            d()
121        }) : setTimeout(function () {
122            e = !0;
123            d()
124        }, 0);
125        u(a, "head", b)
126    }
127
128    function B(a, b, c, d) {
129        var e = a.c.getElementsByTagName("head")[0];
130        if (e) {
131            var f = t(a, "script", {
132                src: b
133            }),
134                g = !1;
135            f.onload = f.onreadystatechange = function () {
136                g || this.readyState && "loaded" != this.readyState && "complete" != this.readyState || (g = !0, c && c(null), f.onload = f.onreadystatechange = null, "HEAD" == f.parentNode.tagName && e.removeChild(f))
137            };
138            e.appendChild(f);
139            setTimeout(function () {
140                g || (g = !0, c && c(Error("Script load timeout")))
141            }, d || 5E3);
142            return f
143        }
144        return null
145    };
146
147    function C() {
148        this.a = 0;
149        this.c = null
150    }
151    function D(a) {
152        a.a++;
153        return function () {
154            a.a--;
155            E(a)
156        }
157    }
158    function F(a, b) {
159        a.c = b;
160        E(a)
161    }
162    function E(a) {
163        0 == a.a && a.c && (a.c(), a.c = null)
164    };
165
166    function G(a) {
167        this.a = a || "-"
168    }
169    G.prototype.c = function (a) {
170        for (var b = [], c = 0; c < arguments.length; c++) b.push(arguments[c].replace(/[\W_]+/g, "").toLowerCase());
171        return b.join(this.a)
172    };
173
174    function H(a, b) {
175        this.c = a;
176        this.f = 4;
177        this.a = "n";
178        var c = (b || "n4").match(/^([nio])([1-9])$/i);
179        c && (this.a = c[1], this.f = parseInt(c[2], 10))
180    }
181    function fa(a) {
182        return I(a) + " " + (a.f + "00") + " 300px " + J(a.c)
183    }
184    function J(a) {
185        var b = [];
186        a = a.split(/,\s*/);
187        for (var c = 0; c < a.length; c++) {
188            var d = a[c].replace(/['"]/g, ""); - 1 != d.indexOf(" ") || /^\d/.test(d) ? b.push("'" + d + "'") : b.push(d)
189        }
190        return b.join(",")
191    }
192    function K(a) {
193        return a.a + a.f
194    }
195    function I(a) {
196        var b = "normal";
197        "o" === a.a ? b = "oblique" : "i" === a.a && (b = "italic");
198        return b
199    }
200
201    function ga(a) {
202        var b = 4,
203            c = "n",
204            d = null;
205        a && ((d = a.match(/(normal|oblique|italic)/i)) && d[1] && (c = d[1].substr(0, 1).toLowerCase()), (d = a.match(/([1-9]00|normal|bold)/i)) && d[1] && (/bold/i.test(d[1]) ? b = 7 : /[1-9]00/.test(d[1]) && (b = parseInt(d[1].substr(0, 1), 10))));
206        return c + b
207    };
208
209    function ha(a, b) {
210        this.c = a;
211        this.f = a.m.document.documentElement;
212        this.h = b;
213        this.a = new G("-");
214        this.j = !1 !== b.events;
215        this.g = !1 !== b.classes
216    }
217    function ia(a) {
218        a.g && w(a.f, [a.a.c("wf", "loading")]);
219        L(a, "loading")
220    }
221    function M(a) {
222        if (a.g) {
223            var b = y(a.f, a.a.c("wf", "active")),
224                c = [],
225                d = [a.a.c("wf", "loading")];
226            b || c.push(a.a.c("wf", "inactive"));
227            w(a.f, c, d)
228        }
229        L(a, "inactive")
230    }
231    function L(a, b, c) {
232        if (a.j && a.h[b]) if (c) a.h[b](c.c, K(c));
233        else a.h[b]()
234    };
235
236    function ja() {
237        this.c = {}
238    }
239    function ka(a, b, c) {
240        var d = [],
241            e;
242        for (e in b) if (b.hasOwnProperty(e)) {
243            var f = a.c[e];
244            f && d.push(f(b[e], c))
245        }
246        return d
247    };
248
249    function N(a, b) {
250        this.c = a;
251        this.f = b;
252        this.a = t(this.c, "span", {
253            "aria-hidden": "true"
254        }, this.f)
255    }
256    function O(a) {
257        u(a.c, "body", a.a)
258    }
259    function P(a) {
260        return "display:block;position:absolute;top:-9999px;left:-9999px;font-size:300px;width:auto;height:auto;line-height:normal;margin:0;padding:0;font-variant:normal;white-space:nowrap;font-family:" + J(a.c) + ";" + ("font-style:" + I(a) + ";font-weight:" + (a.f + "00") + ";")
261    };
262
263    function Q(a, b, c, d, e, f) {
264        this.g = a;
265        this.j = b;
266        this.a = d;
267        this.c = c;
268        this.f = e || 3E3;
269        this.h = f || void 0
270    }
271    Q.prototype.start = function () {
272        var a = this.c.m.document,
273            b = this,
274            c = q(),
275            d = new Promise(function (d, e) {
276                function k() {
277                    q() - c >= b.f ? e() : a.fonts.load(fa(b.a), b.h).then(function (a) {
278                        1 <= a.length ? d() : setTimeout(k, 25)
279                    }, function () {
280                        e()
281                    })
282                }
283                k()
284            }),
285            e = new Promise(function (a, d) {
286                setTimeout(d, b.f)
287            });
288        Promise.race([e, d]).then(function () {
289            b.g(b.a)
290        }, function () {
291            b.j(b.a)
292        })
293    };
294
295    function R(a, b, c, d, e, f, g) {
296        this.v = a;
297        this.B = b;
298        this.c = c;
299        this.a = d;
300        this.s = g || "BESbswy";
301        this.f = {};
302        this.w = e || 3E3;
303        this.u = f || null;
304        this.o = this.j = this.h = this.g = null;
305        this.g = new N(this.c, this.s);
306        this.h = new N(this.c, this.s);
307        this.j = new N(this.c, this.s);
308        this.o = new N(this.c, this.s);
309        a = new H(this.a.c + ",serif", K(this.a));
310        a = P(a);
311        this.g.a.style.cssText = a;
312        a = new H(this.a.c + ",sans-serif", K(this.a));
313        a = P(a);
314        this.h.a.style.cssText = a;
315        a = new H("serif", K(this.a));
316        a = P(a);
317        this.j.a.style.cssText = a;
318        a = new H("sans-serif", K(this.a));
319        a = P(a);
320        this.o.a.style.cssText = a;
321        O(this.g);
322        O(this.h);
323        O(this.j);
324        O(this.o)
325    }
326    var S = {
327        D: "serif",
328        C: "sans-serif"
329    }, T = null;
330
331    function U() {
332        if (null === T) {
333            var a = /AppleWebKit\/([0-9]+)(?:\.([0-9]+))/.exec(window.navigator.userAgent);
334            T = !!a && (536 > parseInt(a[1], 10) || 536 === parseInt(a[1], 10) && 11 >= parseInt(a[2], 10))
335        }
336        return T
337    }
338    R.prototype.start = function () {
339        this.f.serif = this.j.a.offsetWidth;
340        this.f["sans-serif"] = this.o.a.offsetWidth;
341        this.A = q();
342        la(this)
343    };
344
345    function ma(a, b, c) {
346        for (var d in S) if (S.hasOwnProperty(d) && b === a.f[S[d]] && c === a.f[S[d]]) return !0;
347        return !1
348    }
349    function la(a) {
350        var b = a.g.a.offsetWidth,
351            c = a.h.a.offsetWidth,
352            d;
353        (d = b === a.f.serif && c === a.f["sans-serif"]) || (d = U() && ma(a, b, c));
354        d ? q() - a.A >= a.w ? U() && ma(a, b, c) && (null === a.u || a.u.hasOwnProperty(a.a.c)) ? V(a, a.v) : V(a, a.B) : na(a) : V(a, a.v)
355    }
356    function na(a) {
357        setTimeout(p(function () {
358            la(this)
359        }, a), 50)
360    }
361    function V(a, b) {
362        setTimeout(p(function () {
363            v(this.g.a);
364            v(this.h.a);
365            v(this.j.a);
366            v(this.o.a);
367            b(this.a)
368        }, a), 0)
369    };
370
371    function W(a, b, c) {
372        this.c = a;
373        this.a = b;
374        this.f = 0;
375        this.o = this.j = !1;
376        this.s = c
377    }
378    var X = null;
379    W.prototype.g = function (a) {
380        var b = this.a;
381        b.g && w(b.f, [b.a.c("wf", a.c, K(a).toString(), "active")], [b.a.c("wf", a.c, K(a).toString(), "loading"), b.a.c("wf", a.c, K(a).toString(), "inactive")]);
382        L(b, "fontactive", a);
383        this.o = !0;
384        oa(this)
385    };
386    W.prototype.h = function (a) {
387        var b = this.a;
388        if (b.g) {
389            var c = y(b.f, b.a.c("wf", a.c, K(a).toString(), "active")),
390                d = [],
391                e = [b.a.c("wf", a.c, K(a).toString(), "loading")];
392            c || d.push(b.a.c("wf", a.c, K(a).toString(), "inactive"));
393            w(b.f, d, e)
394        }
395        L(b, "fontinactive", a);
396        oa(this)
397    };
398
399    function oa(a) {
400        0 == --a.f && a.j && (a.o ? (a = a.a, a.g && w(a.f, [a.a.c("wf", "active")], [a.a.c("wf", "loading"), a.a.c("wf", "inactive")]), L(a, "active")) : M(a.a))
401    };
402
403    function pa(a) {
404        this.j = a;
405        this.a = new ja;
406        this.h = 0;
407        this.f = this.g = !0
408    }
409    pa.prototype.load = function (a) {
410        this.c = new ca(this.j, a.context || this.j);
411        this.g = !1 !== a.events;
412        this.f = !1 !== a.classes;
413        qa(this, new ha(this.c, a), a)
414    };
415
416    function ra(a, b, c, d, e) {
417        var f = 0 == --a.h;
418        (a.f || a.g) && setTimeout(function () {
419            var a = e || null,
420                k = d || null || {};
421            if (0 === c.length && f) M(b.a);
422            else {
423                b.f += c.length;
424                f && (b.j = f);
425                var h, m = [];
426                for (h = 0; h < c.length; h++) {
427                    var l = c[h],
428                        n = k[l.c],
429                        r = b.a,
430                        x = l;
431                    r.g && w(r.f, [r.a.c("wf", x.c, K(x).toString(), "loading")]);
432                    L(r, "fontloading", x);
433                    r = null;
434                    null === X && (X = window.FontFace ? (x = /Gecko.*Firefox\/(\d+)/.exec(window.navigator.userAgent)) ? 42 < parseInt(x[1], 10) : !0 : !1);
435                    X ? r = new Q(p(b.g, b), p(b.h, b), b.c, l, b.s, n) : r = new R(p(b.g, b), p(b.h, b), b.c, l, b.s, a,
436                        n);
437                    m.push(r)
438                }
439                for (h = 0; h < m.length; h++) m[h].start()
440            }
441        }, 0)
442    }
443    function qa(a, b, c) {
444        var d = [],
445            e = c.timeout;
446        ia(b);
447        var d = ka(a.a, c, a.c),
448            f = new W(a.c, b, e);
449        a.h = d.length;
450        b = 0;
451        for (c = d.length; b < c; b++) d[b].load(function (b, d, c) {
452            ra(a, f, b, d, c)
453        })
454    };
455
456    function sa(a, b) {
457        this.c = a;
458        this.a = b
459    }
460    function ta(a, b, c) {
461        var d = z(a.c);
462        a = (a.a.api || "fast.fonts.net/jsapi").replace(/^.*http(s?):(\/\/)?/, "");
463        return d + "//" + a + "/" + b + ".js" + (c ? "?v=" + c : "")
464    }
465    sa.prototype.load = function (a) {
466        function b() {
467            if (f["__mti_fntLst" + d]) {
468                var c = f["__mti_fntLst" + d](),
469                    e = [],
470                    h;
471                if (c) for (var m = 0; m < c.length; m++) {
472                    var l = c[m].fontfamily;
473                    void 0 != c[m].fontStyle && void 0 != c[m].fontWeight ? (h = c[m].fontStyle + c[m].fontWeight, e.push(new H(l, h))) : e.push(new H(l))
474                }
475                a(e)
476            } else setTimeout(function () {
477                b()
478            }, 50)
479        }
480        var c = this,
481            d = c.a.projectId,
482            e = c.a.version;
483        if (d) {
484            var f = c.c.m;
485            B(this.c, ta(c, d, e), function (e) {
486                e ? a([]) : (f["__MonotypeConfiguration__" + d] = function () {
487                    return c.a
488                }, b())
489            }).id = "__MonotypeAPIScript__" + d
490        } else a([])
491    };
492
493    function ua(a, b) {
494        this.c = a;
495        this.a = b
496    }
497    ua.prototype.load = function (a) {
498        var b, c, d = this.a.urls || [],
499            e = this.a.families || [],
500            f = this.a.testStrings || {}, g = new C;
501        b = 0;
502        for (c = d.length; b < c; b++) A(this.c, d[b], D(g));
503        var k = [];
504        b = 0;
505        for (c = e.length; b < c; b++) if (d = e[b].split(":"), d[1]) for (var h = d[1].split(","), m = 0; m < h.length; m += 1) k.push(new H(d[0], h[m]));
506        else k.push(new H(d[0]));
507        F(g, function () {
508            a(k, f)
509        })
510    };
511
512    function va(a, b, c) {
513        a ? this.c = a : this.c = b + wa;
514        this.a = [];
515        this.f = [];
516        this.g = c || ""
517    }
518    var wa = "//fonts.googleapis.com/css";
519
520    function xa(a, b) {
521        for (var c = b.length, d = 0; d < c; d++) {
522            var e = b[d].split(":");
523            3 == e.length && a.f.push(e.pop());
524            var f = "";
525            2 == e.length && "" != e[1] && (f = ":");
526            a.a.push(e.join(f))
527        }
528    }
529
530    function ya(a) {
531        if (0 == a.a.length) throw Error("No fonts to load!");
532        if (-1 != a.c.indexOf("kit=")) return a.c;
533        for (var b = a.a.length, c = [], d = 0; d < b; d++) c.push(a.a[d].replace(/ /g, "+"));
534        b = a.c + "?family=" + c.join("%7C");
535        0 < a.f.length && (b += "&subset=" + a.f.join(","));
536        0 < a.g.length && (b += "&text=" + encodeURIComponent(a.g));
537        return b
538    };
539
540    function za(a) {
541        this.f = a;
542        this.a = [];
543        this.c = {}
544    }
545    var Aa = {
546        latin: "BESbswy",
547        "latin-ext": "\u00e7\u00f6\u00fc\u011f\u015f",
548        cyrillic: "\u0439\u044f\u0416",
549        greek: "\u03b1\u03b2\u03a3",
550        khmer: "\u1780\u1781\u1782",
551        Hanuman: "\u1780\u1781\u1782"
552    }, Ba = {
553        thin: "1",
554        extralight: "2",
555        "extra-light": "2",
556        ultralight: "2",
557        "ultra-light": "2",
558        light: "3",
559        regular: "4",
560        book: "4",
561        medium: "5",
562        "semi-bold": "6",
563        semibold: "6",
564        "demi-bold": "6",
565        demibold: "6",
566        bold: "7",
567        "extra-bold": "8",
568        extrabold: "8",
569        "ultra-bold": "8",
570        ultrabold: "8",
571        black: "9",
572        heavy: "9",
573        l: "3",
574        r: "4",
575        b: "7"
576    }, Ca = {
577        i: "i",
578        italic: "i",
579        n: "n",
580        normal: "n"
581    },
582        Da = /^(thin|(?:(?:extra|ultra)-?)?light|regular|book|medium|(?:(?:semi|demi|extra|ultra)-?)?bold|black|heavy|l|r|b|[1-9]00)?(n|i|normal|italic)?$/;
583
584    function Ea(a) {
585        for (var b = a.f.length, c = 0; c < b; c++) {
586            var d = a.f[c].split(":"),
587                e = d[0].replace(/\+/g, " "),
588                f = ["n4"];
589            if (2 <= d.length) {
590                var g;
591                var k = d[1];
592                g = [];
593                if (k) for (var k = k.split(","), h = k.length, m = 0; m < h; m++) {
594                    var l;
595                    l = k[m];
596                    if (l.match(/^[\w-]+$/)) {
597                        var n = Da.exec(l.toLowerCase());
598                        if (null == n) l = "";
599                        else {
600                            l = n[2];
601                            l = null == l || "" == l ? "n" : Ca[l];
602                            n = n[1];
603                            if (null == n || "" == n) n = "4";
604                            else var r = Ba[n],
605                                n = r ? r : isNaN(n) ? "4" : n.substr(0, 1);
606                            l = [l, n].join("")
607                        }
608                    } else l = "";
609                    l && g.push(l)
610                }
611                0 < g.length && (f = g);
612                3 == d.length && (d = d[2], g = [], d = d ? d.split(",") : g, 0 < d.length && (d = Aa[d[0]]) && (a.c[e] = d))
613            }
614            a.c[e] || (d = Aa[e]) && (a.c[e] = d);
615            for (d = 0; d < f.length; d += 1) a.a.push(new H(e, f[d]))
616        }
617    };
618
619    function Fa(a, b) {
620        this.c = a;
621        this.a = b
622    }
623    var Ga = {
624        Arimo: !0,
625        Cousine: !0,
626        Tinos: !0
627    };
628    Fa.prototype.load = function (a) {
629        var b = new C,
630            c = this.c,
631            d = new va(this.a.api, z(c), this.a.text),
632            e = this.a.families;
633        xa(d, e);
634        var f = new za(e);
635        Ea(f);
636        A(c, ya(d), D(b));
637        F(b, function () {
638            a(f.a, f.c, Ga)
639        })
640    };
641
642    function Ha(a, b) {
643        this.c = a;
644        this.a = b
645    }
646    Ha.prototype.load = function (a) {
647        var b = this.a.id,
648            c = this.c.m;
649        b ? B(this.c, (this.a.api || "https://use.typekit.net") + "/" + b + ".js", function (b) {
650            if (b) a([]);
651            else if (c.Typekit && c.Typekit.config && c.Typekit.config.fn) {
652                b = c.Typekit.config.fn;
653                for (var e = [], f = 0; f < b.length; f += 2) for (var g = b[f], k = b[f + 1], h = 0; h < k.length; h++) e.push(new H(g, k[h]));
654                try {
655                    c.Typekit.load({
656                        events: !1,
657                        classes: !1,
658                        async: !0
659                    })
660                } catch (m) { }
661                a(e)
662            }
663        }, 2E3) : a([])
664    };
665
666    function Ia(a, b) {
667        this.c = a;
668        this.f = b;
669        this.a = []
670    }
671    Ia.prototype.load = function (a) {
672        var b = this.f.id,
673            c = this.c.m,
674            d = this;
675        b ? (c.__webfontfontdeckmodule__ || (c.__webfontfontdeckmodule__ = {}), c.__webfontfontdeckmodule__[b] = function (b, c) {
676            for (var g = 0, k = c.fonts.length; g < k; ++g) {
677                var h = c.fonts[g];
678                d.a.push(new H(h.name, ga("font-weight:" + h.weight + ";font-style:" + h.style)))
679            }
680            a(d.a)
681        }, B(this.c, z(this.c) + (this.f.api || "//f.fontdeck.com/s/css/js/") + ea(this.c) + "/" + b + ".js", function (b) {
682            b && a([])
683        })) : a([])
684    };
685    var Y = new pa(window);
686    Y.a.c.custom = function (a, b) {
687        return new ua(b, a)
688    };
689    Y.a.c.fontdeck = function (a, b) {
690        return new Ia(b, a)
691    };
692    Y.a.c.monotype = function (a, b) {
693        return new sa(b, a)
694    };
695    Y.a.c.typekit = function (a, b) {
696        return new Ha(b, a)
697    };
698    Y.a.c.google = function (a, b) {
699        return new Fa(b, a)
700    };
701    var Z = {
702        load: p(Y.load, Y)
703    };
704    "function" === typeof define && define.amd ? define(function () {
705        return Z
706    }) : "undefined" !== typeof module && module.exports ? module.exports = Z : (window.WebFont = Z, window.WebFontConfig && Y.load(window.WebFontConfig));
707}());

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.