PageSourceSearch

https://www.shampoo.hk/templates/tshop/assets/plugins/icheck-1.x/icheck.min.js

js shampoo.hk collected 2026-09-27 05:08:36 UTC 7,986 bytes, 171 lines download raw bytes

vendor: 7,986 bytes, lines 1-171
1/*! iCheck v1.0.2 by Damir Sultanov, http://git.io/arlzeA, MIT Licensed */
2(function (f) {
3    function A(a, b, d) {
4        var c = a[0], g = /er/.test(d) ? _indeterminate : /bl/.test(d) ? n : k, e = d == _update ? {
5            checked: c[k],
6            disabled: c[n],
7            indeterminate: "true" == a.attr(_indeterminate) || "false" == a.attr(_determinate)
8        } : c[g];
9        if (/^(ch|di|in)/.test(d) && !e)x(a, g); else if (/^(un|en|de)/.test(d) && e)q(a, g); else if (d == _update)for (var f in e)e[f] ? x(a, f, !0) : q(a, f, !0); else if (!b || "toggle" == d) {
10            if (!b)a[_callback]("ifClicked");
11            e ? c[_type] !== r && q(a, g) : x(a, g)
12        }
13    }
14
15    function x(a, b, d) {
16        var c = a[0], g = a.parent(), e = b == k, u = b == _indeterminate,
17            v = b == n, s = u ? _determinate : e ? y : "enabled", F = l(a, s + t(c[_type])), B = l(a, b + t(c[_type]));
18        if (!0 !== c[b]) {
19            if (!d && b == k && c[_type] == r && c.name) {
20                var w = a.closest("form"), p = 'input[name="' + c.name + '"]', p = w.length ? w.find(p) : f(p);
21                p.each(function () {
22                    this !== c && f(this).data(m) && q(f(this), b)
23                })
24            }
25            u ? (c[b] = !0, c[k] && q(a, k, "force")) : (d || (c[b] = !0), e && c[_indeterminate] && q(a, _indeterminate, !1));
26            D(a, e, b, d)
27        }
28        c[n] && l(a, _cursor, !0) && g.find("." + C).css(_cursor, "default");
29        g[_add](B || l(a, b) || "");
30        g.attr("role") && !u && g.attr("aria-" + (v ? n : k), "true");
31        g[_remove](F || l(a, s) || "")
32    }
33
34    function q(a, b, d) {
35        var c = a[0], g = a.parent(), e = b == k, f = b == _indeterminate, m = b == n, s = f ? _determinate : e ? y : "enabled", q = l(a, s + t(c[_type])), r = l(a, b + t(c[_type]));
36        if (!1 !== c[b]) {
37            if (f || !d || "force" == d)c[b] = !1;
38            D(a, e, s, d)
39        }
40        !c[n] && l(a, _cursor, !0) && g.find("." + C).css(_cursor, "pointer");
41        g[_remove](r || l(a, b) || "");
42        g.attr("role") && !f && g.attr("aria-" + (m ? n : k), "false");
43        g[_add](q || l(a, s) || "")
44    }
45
46    function E(a, b) {
47        if (a.data(m)) {
48            a.parent().html(a.attr("style", a.data(m).s || ""));
49            if (b)a[_callback](b);
50            a.off(".i").unwrap();
51            f(_label + '[for="' + a[0].id + '"]').add(a.closest(_label)).off(".i")
52        }
53    }
54
55    function l(a, b, f) {
56        if (a.data(m))return a.data(m).o[b + (f ? "" : "Class")]
57    }
58
59    function t(a) {
60        return a.charAt(0).toUpperCase() + a.slice(1)
61    }
62
63    function D(a, b, f, c) {
64        if (!c) {
65            if (b)a[_callback]("ifToggled");
66            a[_callback]("ifChanged")[_callback]("if" + t(f))
67        }
68    }
69
70    var m = "iCheck", C = m + "-helper", r = "radio", k = "checked", y = "un" + k, n = "disabled";
71    _determinate = "determinate";
72    _indeterminate = "in" + _determinate;
73    _update = "update";
74    _type = "type";
75    _click = "click";
76    _touch = "touchbegin.i touchend.i";
77    _add = "addClass";
78    _remove = "removeClass";
79    _callback = "trigger";
80    _label = "label";
81    _cursor = "cursor";
82    _mobile = /ipad|iphone|ipod|android|blackberry|windows phone|opera mini|silk/i.test(navigator.userAgent);
83    f.fn[m] = function (a, b) {
84        var d = 'input[type="checkbox"], input[type="' + r + '"]', c = f(), g = function (a) {
85            a.each(function () {
86                var a = f(this);
87                c = a.is(d) ? c.add(a) : c.add(a.find(d))
88            })
89        };
90        if (/^(check|uncheck|toggle|indeterminate|determinate|disable|enable|update|destroy)$/i.test(a))return a = a.toLowerCase(), g(this), c.each(function () {
91            var c =
92                f(this);
93            "destroy" == a ? E(c, "ifDestroyed") : A(c, !0, a);
94            f.isFunction(b) && b()
95        });
96        if ("object" != typeof a && a)return this;
97        var e = f.extend({
98            checkedClass: k,
99            disabledClass: n,
100            indeterminateClass: _indeterminate,
101            labelHover: !0
102        }, a), l = e.handle, v = e.hoverClass || "hover", s = e.focusClass || "focus", t = e.activeClass || "active", B = !!e.labelHover, w = e.labelHoverClass || "hover", p = ("" + e.increaseArea).replace("%", "") | 0;
103        if ("checkbox" == l || l == r)d = 'input[type="' + l + '"]';
104        -50 > p && (p = -50);
105        g(this);
106        return c.each(function () {
107            var a = f(this);
108            E(a);
109            var c = this,
110                b = c.id, g = -p + "%", d = 100 + 2 * p + "%", d = {
111                    position: "absolute",
112                    top: g,
113                    left: g,
114                    display: "block",
115                    width: d,
116                    height: d,
117                    margin: 0,
118                    padding: 0,
119                    background: "#fff",
120                    border: 0,
121                    opacity: 0
122                }, g = _mobile ? {position: "absolute", visibility: "hidden"} : p ? d : {
123                    position: "absolute",
124                    opacity: 0
125                }, l = "checkbox" == c[_type] ? e.checkboxClass || "icheckbox" : e.radioClass || "i" + r, z = f(_label + '[for="' + b + '"]').add(a.closest(_label)), u = !!e.aria, y = m + "-" + Math.random().toString(36).substr(2, 6), h = '<div class="' + l + '" ' + (u ? 'role="' + c[_type] + '" ' : "");
126            u && z.each(function () {
127                h +=
128                    'aria-labelledby="';
129                this.id ? h += this.id : (this.id = y, h += y);
130                h += '"'
131            });
132            h = a.wrap(h + "/>")[_callback]("ifCreated").parent().append(e.insert);
133            d = f('<ins class="' + C + '"/>').css(d).appendTo(h);
134            a.data(m, {o: e, s: a.attr("style")}).css(g);
135            e.inheritClass && h[_add](c.className || "");
136            e.inheritID && b && h.attr("id", m + "-" + b);
137            "static" == h.css("position") && h.css("position", "relative");
138            A(a, !0, _update);
139            if (z.length)z.on(_click + ".i mouseover.i mouseout.i " + _touch, function (b) {
140                var d = b[_type], e = f(this);
141                if (!c[n]) {
142                    if (d == _click) {
143                        if (f(b.target).is("a"))return;
144                        A(a, !1, !0)
145                    } else B && (/ut|nd/.test(d) ? (h[_remove](v), e[_remove](w)) : (h[_add](v), e[_add](w)));
146                    //if (_mobile)b.stopPropagation(); else return !1
147                    b.stopPropagation();
148                }
149            });
150            a.on(_click + ".i focus.i blur.i keyup.i keydown.i keypress.i", function (b) {
151                var d = b[_type];
152                b = b.keyCode;
153                if (d == _click)return !1;
154                if ("keydown" == d && 32 == b)return c[_type] == r && c[k] || (c[k] ? q(a, k) : x(a, k)), !1;
155                if ("keyup" == d && c[_type] == r)!c[k] && x(a, k); else if (/us|ur/.test(d))h["blur" == d ? _remove : _add](s)
156            });
157            d.on(_click + " mousedown mouseup mouseover mouseout " + _touch, function (b) {
158                var d =
159                    b[_type], e = /wn|up/.test(d) ? t : v;
160                if (!c[n]) {
161                    if (d == _click)A(a, !1, !0); else {
162                        if (/wn|er|in/.test(d))h[_add](e); else h[_remove](e + " " + t);
163                        if (z.length && B && e == v)z[/ut|nd/.test(d) ? _remove : _add](w)
164                    }
165                    //if (_mobile)b.stopPropagation(); else return !1
166                    b.stopPropagation();
167                }
168            })
169        })
170    }
171})(window.jQuery || window.Zepto);

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.