PageSourceSearch

https://sourcegear.com/assets/js/plugins/jasny-bootstrap.min.js

js sourcegear.com collected 2026-10-02 02:21:56 UTC 22,965 bytes, 420 lines download raw bytes

vendor: 8,938 bytes, lines 1-172
1/*!
2 * Jasny Bootstrap v3.1.3 (http://jasny.github.io/bootstrap)
3 * Copyright 2012-2014 Arnold Daniels
4 * Licensed under Apache-2.0 (https://github.com/jasny/bootstrap/blob/master/LICENSE)
5 */
6if ("undefined" == typeof jQuery) throw new Error("Jasny Bootstrap's JavaScript requires jQuery"); + function(a) {
7    "use strict";
8
9    function b() {
10        var a = document.createElement("bootstrap"),
11            b = {
12                WebkitTransition: "webkitTransitionEnd",
13                MozTransition: "transitionend",
14                OTransition: "oTransitionEnd otransitionend",
15                transition: "transitionend"
16            };
17        for (var c in b)
18            if (void 0 !== a.style[c]) return {
19                end: b[c]
20            };
21        return !1
22    }
23    void 0 === a.support.transition && (a.fn.emulateTransitionEnd = function(b) {
24        var c = !1,
25            d = this;
26        a(this).one(a.support.transition.end, function() {
27            c = !0
28        });
29        var e = function() {
30            c || a(d).trigger(a.support.transition.end)
31        };
32        return setTimeout(e, b), this
33    }, a(function() {
34        a.support.transition = b()
35    }))
36}(window.jQuery), + function(a) {
37    "use strict";
38    var b = function(c, d) {
39        this.$element = a(c), this.options = a.extend({}, b.DEFAULTS, d), this.state = null, this.placement = null, this.options.recalc && (this.calcClone(), a(window).on("resize", a.proxy(this.recalc, this))), this.options.autohide && a(document).on("click", a.proxy(this.autohide, this)), this.options.toggle && this.toggle(), this.options.disablescrolling && (this.options.disableScrolling = this.options.disablescrolling, delete this.options.disablescrolling)
40    };
41    b.DEFAULTS = {
42        toggle: !0,
43        placement: "auto",
44        autohide: !0,
45        recalc: !0,
46        disableScrolling: !0
47    }, b.prototype.offset = function() {
48        switch (this.placement) {
49            case "left":
50            case "right":
51                return this.$element.outerWidth();
52            case "top":
53            case "bottom":
54                return this.$element.outerHeight()
55        }
56    }, b.prototype.calcPlacement = function() {
57        function b(a, b) {
58            if ("auto" === e.css(b)) return a;
59            if ("auto" === e.css(a)) return b;
60            var c = parseInt(e.css(a), 10),
61                d = parseInt(e.css(b), 10);
62            return c > d ? b : a
63        }
64        if ("auto" !== this.options.placement) return void(this.placement = this.options.placement);
65        this.$element.hasClass("in") || this.$element.css("visiblity", "hidden !important").addClass("in");
66        var c = a(window).width() / this.$element.width(),
67            d = a(window).height() / this.$element.height(),
68            e = this.$element;
69        this.placement = c >= d ? b("left", "right") : b("top", "bottom"), "hidden !important" === this.$element.css("visibility") && this.$element.removeClass("in").css("visiblity", "")
70    }, b.prototype.opposite = function(a) {
71        switch (a) {
72            case "top":
73                return "bottom";
74            case "left":
75                return "right";
76            case "bottom":
77                return "top";
78            case "right":
79                return "left"
80        }
81    }, b.prototype.getCanvasElements = function() {
82        var b = this.options.canvas ? a(this.options.canvas) : this.$element,
83            c = b.find("*").filter(function() {
84                return "fixed" === a(this).css("position")
85            }).not(this.options.exclude);
86        return b.add(c)
87    }, b.prototype.slide = function(b, c, d) {
88        if (!a.support.transition) {
89            var e = {};
90            return e[this.placement] = "+=" + c, b.animate(e, 350, d)
91        }
92        var f = this.placement,
93            g = this.opposite(f);
94        b.each(function() {
95            "auto" !== a(this).css(f) && a(this).css(f, (parseInt(a(this).css(f), 10) || 0) + c), "auto" !== a(this).css(g) && a(this).css(g, (parseInt(a(this).css(g), 10) || 0) - c)
96        }), this.$element.one(a.support.transition.end, d).emulateTransitionEnd(350)
97    }, b.prototype.disableScrolling = function() {
98        var b = a("body").width(),
99            c = "padding-" + this.opposite(this.placement);
100        if (void 0 === a("body").data("offcanvas-style") && a("body").data("offcanvas-style", a("body").attr("style") || ""), a("body").css("overflow", "hidden"), a("body").width() > b) {
101            var d = parseInt(a("body").css(c), 10) + a("body").width() - b;
102            setTimeout(function() {
103                a("body").css(c, d)
104            }, 1)
105        }
106    }, b.prototype.show = function() {
107        if (!this.state) {
108            var b = a.Event("show.bs.offcanvas");
109            if (this.$element.trigger(b), !b.isDefaultPrevented()) {
110                this.state = "slide-in", this.calcPlacement();
111                var c = this.getCanvasElements(),
112                    d = this.placement,
113                    e = this.opposite(d),
114                    f = this.offset(); - 1 !== c.index(this.$element) && (a(this.$element).data("offcanvas-style", a(this.$element).attr("style") || ""), this.$element.css(d, -1 * f), this.$element.css(d)), c.addClass("canvas-sliding").each(function() {
115                    void 0 === a(this).data("offcanvas-style") && a(this).data("offcanvas-style", a(this).attr("style") || ""), "static" === a(this).css("position") && a(this).css("position", "relative"), "auto" !== a(this).css(d) && "0px" !== a(this).css(d) || "auto" !== a(this).css(e) && "0px" !== a(this).css(e) || a(this).css(d, 0)
116                }), this.options.disableScrolling && this.disableScrolling();
117                var g = function() {
118                    "slide-in" == this.state && (this.state = "slid", c.removeClass("canvas-sliding").addClass("canvas-slid"), this.$element.trigger("shown.bs.offcanvas"))
119                };
120                setTimeout(a.proxy(function() {
121                    this.$element.addClass("in"), this.slide(c, f, a.proxy(g, this))
122                }, this), 1)
123            }
124        }
125    }, b.prototype.hide = function() {
126        if ("slid" === this.state) {
127            var b = a.Event("hide.bs.offcanvas");
128            if (this.$element.trigger(b), !b.isDefaultPrevented()) {
129                this.state = "slide-out";
130                var c = a(".canvas-slid"),
131                    d = (this.placement, -1 * this.offset()),
132                    e = function() {
133                        "slide-out" == this.state && (this.state = null, this.placement = null, this.$element.removeClass("in"), c.removeClass("canvas-sliding"), c.add(this.$element).add("body").each(function() {
134                            a(this).attr("style", a(this).data("offcanvas-style")).removeData("offcanvas-style")
135                        }), this.$element.trigger("hidden.bs.offcanvas"))
136                    };
137                c.removeClass("canvas-slid").addClass("canvas-sliding"), setTimeout(a.proxy(function() {
138                    this.slide(c, d, a.proxy(e, this))
139                }, this), 1)
140            }
141        }
142    }, b.prototype.toggle = function() {
143        "slide-in" !== this.state && "slide-out" !== this.state && this["slid" === this.state ? "hide" : "show"]()
144    }, b.prototype.calcClone = function() {
145        this.$calcClone = this.$element.clone().html("").addClass("offcanvas-clone").removeClass("in").appendTo(a("body"))
146    }, b.prototype.recalc = function() {
147        if ("none" !== this.$calcClone.css("display") && ("slid" === this.state || "slide-in" === this.state)) {
148            this.state = null, this.placement = null;
149            var b = this.getCanvasElements();
150            this.$element.removeClass("in"), b.removeClass("canvas-slid"), b.add(this.$element).add("body").each(function() {
151                a(this).attr("style", a(this).data("offcanvas-style")).removeData("offcanvas-style")
152            })
153        }
154    }, b.prototype.autohide = function(b) {
155        0 === a(b.target).closest(this.$element).length && this.hide()
156    };
157    var c = a.fn.offcanvas;
158    a.fn.offcanvas = function(c) {
159        return this.each(function() {
160            var d = a(this),
161                e = d.data("bs.offcanvas"),
162                f = a.extend({}, b.DEFAULTS, d.data(), "object" == typeof c && c);
163            e || d.data("bs.offcanvas", e = new b(this, f)), "string" == typeof c && e[c]()
164        })
165    }, a.fn.offcanvas.Constructor = b, a.fn.offcanvas.noConflict = function() {
166        return a.fn.offcanvas = c, this
167    }, a(document).on("click.bs.offcanvas.data-api", "[data-toggle=offcanvas]", function(b) {
168        var c, d = a(this),
169            e = d.attr("data-target") || b.preventDefault() || (c = d.attr("href")) && c.replace(/.*(?=#[^\s]+$)/, ""),
170            f = a(e),
171            g = f.data("bs.offcanvas"),
172            h = g ? "toggle" : d.data();
173        b.stopPropagation(), g ? g.toggle() : f.offcanvas(h)
174    })
175}(window.jQuery), + function(a) {
176    "use strict";
177    var b = function(c, d) {
178        this.$element = a(c), this.options = a.extend({}, b.DEFAULTS, d), this.$element.on("click.bs.rowlink", "td:not(.rowlink-skip)", a.proxy(this.click, this))
179    };
180    b.DEFAULTS = {
181        target: "a"
182    }, b.prototype.click = function(b) {
183        var c = a(b.currentTarget).closest("tr").find(this.options.target)[0];
184        if (a(b.target)[0] !== c)
185            if (b.preventDefault(), c.click) c.click();
186            else if (document.createEvent) {
187            var d = document.createEvent("MouseEvents");
188            d.initMouseEvent("click", !0, !0, window, 0, 0, 0, 0, 0, !1, !1, !1, !1, 0, null), c.dispatchEvent(d)
189        }
190    };
191    var c = a.fn.rowlink;
192    a.fn.rowlink = function(c) {
193        return this.each(function() {
194            var d = a(this),
195                e = d.data("bs.rowlink");
196            e || d.data("bs.rowlink", e = new b(this, c))
197        })
198    }, a.fn.rowlink.Constructor = b, a.fn.rowlink.noConflict = function() {
199        return a.fn.rowlink = c, this
200    }, a(document).on("click.bs.rowlink.data-api", '[data-link="row"]', function(b) {
201        if (0 === a(b.target).closest(".rowlink-skip").length) {
202            var c = a(this);
203            c.data("bs.rowlink") || (c.rowlink(c.data()), a(b.target).trigger("click.bs.rowlink"))
204        }
205    })
206}(window.jQuery), + function(a) {
207    "use strict";
208    var b = void 0 !== window.orientation,
209        c = navigator.userAgent.toLowerCase().indexOf("android") > -1,
210        d = "Microsoft Internet Explorer" == window.navigator.appName,
211        e = function(b, d) {
212            c || (this.$element = a(b), this.options = a.extend({}, e.DEFAULTS, d), this.mask = String(this.options.mask), this.init(), this.listen(), this.checkVal())
213        };
214    e.DEFAULTS = {
215        mask: "",
216        placeholder: "_",
217        definitions: {
218            9: "[0-9]",
219            a: "[A-Za-z]",
220            w: "[A-Za-z0-9]",
221            "*": "."
222        }
223    }, e.prototype.init = function() {
224        var b = this.options.definitions,
225            c = this.mask.length;
226        this.tests = [], this.partialPosition = this.mask.length, this.firstNonMaskPos = null, a.each(this.mask.split(""), a.proxy(function(a, d) {
227            "?" == d ? (c--, this.partialPosition = a) : b[d] ? (this.tests.push(new RegExp(b[d])), null === this.firstNonMaskPos && (this.firstNonMaskPos = this.tests.length - 1)) : this.tests.push(null)
228        }, this)), this.buffer = a.map(this.mask.split(""), a.proxy(function(a) {
229            return "?" != a ? b[a] ? this.options.placeholder : a : void 0
230        }, this)), this.focusText = this.$element.val(), this.$element.data("rawMaskFn", a.proxy(function() {
231            return a.map(this.buffer, function(a, b) {
232                return this.tests[b] && a != this.options.placeholder ? a : null
233            }).join("")
234        }, this))
235    }, e.prototype.listen = function() {
236        if (!this.$element.attr("readonly")) {
237            var b = (d ? "paste" : "input") + ".mask";
238            this.$element.on("unmask.bs.inputmask", a.proxy(this.unmask, this)).on("focus.bs.inputmask", a.proxy(this.focusEvent, this)).on("blur.bs.inputmask", a.proxy(this.blurEvent, this)).on("keydown.bs.inputmask", a.proxy(this.keydownEvent, this)).on("keypress.bs.inputmask", a.proxy(this.keypressEvent, this)).on(b, a.proxy(this.pasteEvent, this))
239        }
240    }, e.prototype.caret = function(a, b) {
241        if (0 !== this.$element.length) {
242            if ("number" == typeof a) return b = "number" == typeof b ? b : a, this.$element.each(function() {
243                if (this.setSelectionRange) this.setSelectionRange(a, b);
244                else if (this.createTextRange) {
245                    var c = this.createTextRange();
246                    c.collapse(!0), c.moveEnd("character", b), c.moveStart("character", a), c.select()
247                }
248            });
249            if (this.$element[0].setSelectionRange) a = this.$element[0].selectionStart, b = this.$element[0].selectionEnd;
250            else if (document.selection && document.selection.createRange) {
251                var c = document.selection.createRange();
252                a = 0 - c.duplicate().moveStart("character", -1e5), b = a + c.text.length
253            }
254            return {
255                begin: a,
256                end: b
257            }
258        }
259    }, e.prototype.seekNext = function(a) {
260        for (var b = this.mask.length; ++a <= b && !this.tests[a];);
261        return a
262    }, e.prototype.seekPrev = function(a) {
263        for (; --a >= 0 && !this.tests[a];);
264        return a
265    }, e.prototype.shiftL = function(a, b) {
266        var c = this.mask.length;
267        if (!(0 > a)) {
268            for (var d = a, e = this.seekNext(b); c > d; d++)
269                if (this.tests[d]) {
270                    if (!(c > e && this.tests[d].test(this.buffer[e]))) break;
271                    this.buffer[d] = this.buffer[e], this.buffer[e] = this.options.placeholder, e = this.seekNext(e)
272                }
273            this.writeBuffer(), this.caret(Math.max(this.firstNonMaskPos, a))
274        }
275    }, e.prototype.shiftR = function(a) {
276        for (var b = this.mask.length, c = a, d = this.options.placeholder; b > c; c++)
277            if (this.tests[c]) {
278                var e = this.seekNext(c),
279                    f = this.buffer[c];
280                if (this.buffer[c] = d, !(b > e && this.tests[e].test(f))) break;
281                d = f
282            }
283    }, e.prototype.unmask = function() {
284        this.$element.unbind(".mask").removeData("inputmask")
285    }
285, e.prototype.focusEvent = function() {
286        this.focusText = this.$element.val();
287        var a = this.mask.length,
288            b = this.checkVal();
289        this.writeBuffer();
290        var c = this,
291            d = function() {
292                b == a ? c.caret(0, b) : c.caret(b)
293            };
294        d(), setTimeout(d, 50)
295    }, e.prototype.blurEvent = function() {
296        this.checkVal(), this.$element.val() !== this.focusText && this.$element.trigger("change")
297    }, e.prototype.keydownEvent = function(a) {
298        var c = a.which;
299        if (8 == c || 46 == c || b && 127 == c) {
300            var d = this.caret(),
301                e = d.begin,
302                f = d.end;
303            return f - e === 0 && (e = 46 != c ? this.seekPrev(e) : f = this.seekNext(e - 1), f = 46 == c ? this.seekNext(f) : f), this.clearBuffer(e, f), this.shiftL(e, f - 1), !1
304        }
305        return 27 == c ? (this.$element.val(this.focusText), this.caret(0, this.checkVal()), !1) : void 0
306    }, e.prototype.keypressEvent = function(a) {
307        var b = this.mask.length,
308            c = a.which,
309            d = this.caret();
310        if (a.ctrlKey || a.altKey || a.metaKey || 32 > c) return !0;
311        if (c) {
312            d.end - d.begin !== 0 && (this.clearBuffer(d.begin, d.end), this.shiftL(d.begin, d.end - 1));
313            var e = this.seekNext(d.begin - 1);
314            if (b > e) {
315                var f = String.fromCharCode(c);
316                if (this.tests[e].test(f)) {
317                    this.shiftR(e), this.buffer[e] = f, this.writeBuffer();
318                    var g = this.seekNext(e);
319                    this.caret(g)
320                }
321            }
322            return !1
323        }
324    }, e.prototype.pasteEvent = function() {
325        var a = this;
326        setTimeout(function() {
327            a.caret(a.checkVal(!0))
328        }, 0)
329    }, e.prototype.clearBuffer = function(a, b) {
330        for (var c = this.mask.length, d = a; b > d && c > d; d++) this.tests[d] && (this.buffer[d] = this.options.placeholder)
331    }, e.prototype.writeBuffer = function() {
332        return this.$element.val(this.buffer.join("")).val()
333    }, e.prototype.checkVal = function(a) {
334        for (var b = this.mask.length, c = this.$element.val(), d = -1, e = 0, f = 0; b > e; e++)
335            if (this.tests[e]) {
336                for (this.buffer[e] = this.options.placeholder; f++ < c.length;) {
337                    var g = c.charAt(f - 1);
338                    if (this.tests[e].test(g)) {
339                        this.buffer[e] = g, d = e;
340                        break
341                    }
342                }
343                if (f > c.length) break
344            } else this.buffer[e] == c.charAt(f) && e != this.partialPosition && (f++, d = e);
345        return !a && d + 1 < this.partialPosition ? (this.$element.val(""), this.clearBuffer(0, b)) : (a || d + 1 >= this.partialPosition) && (this.writeBuffer(), a || this.$element.val(this.$element.val().substring(0, d + 1))), this.partialPosition ? e : this.firstNonMaskPos
346    };
347    var f = a.fn.inputmask;
348    a.fn.inputmask = function(b) {
349        return this.each(function() {
350            var c = a(this),
351                d = c.data("bs.inputmask");
352            d || c.data("bs.inputmask", d = new e(this, b))
353        })
354    }, a.fn.inputmask.Constructor = e, a.fn.inputmask.noConflict = function() {
355        return a.fn.inputmask = f, this
356    }, a(document).on("focus.bs.inputmask.data-api", "[data-mask]", function() {
357        var b = a(this);
358        b.data("bs.inputmask") || b.inputmask(b.data())
359    })
360}(window.jQuery), + function(a) {
361    "use strict";
362    var b = "Microsoft Internet Explorer" == window.navigator.appName,
363        c = function(b, c) {
364            if (this.$element = a(b), this.$input = this.$element.find(":file"), 0 !== this.$input.length) {
365                this.name = this.$input.attr("name") || c.name, this.$hidden = this.$element.find('input[type=hidden][name="' + this.name + '"]'), 0 === this.$hidden.length && (this.$hidden = a('<input type="hidden">').insertBefore(this.$input)), this.$preview = this.$element.find(".fileinput-preview");
366                var d = this.$preview.css("height");
367                "inline" !== this.$preview.css("display") && "0px" !== d && "none" !== d && this.$preview.css("line-height", d), this.original = {
368                    exists: this.$element.hasClass("fileinput-exists"),
369                    preview: this.$preview.html(),
370                    hiddenVal: this.$hidden.val()
371                }, this.listen()
372            }
373        };
374    c.prototype.listen = function() {
375        this.$input.on("change.bs.fileinput", a.proxy(this.change, this)), a(this.$input[0].form).on("reset.bs.fileinput", a.proxy(this.reset, this)), this.$element.find('[data-trigger="fileinput"]').on("click.bs.fileinput", a.proxy(this.trigger, this)), this.$element.find('[data-dismiss="fileinput"]').on("click.bs.fileinput", a.proxy(this.clear, this))
376    }, c.prototype.change = function(b) {
377        var c = void 0 === b.target.files ? b.target && b.target.value ? [{
378            name: b.target.value.replace(/^.+\\/, "")
379        }] : [] : b.target.files;
380        if (b.stopPropagation(), 0 === c.length) return void this.clear();
381        this.$hidden.val(""), this.$hidden.attr("name", ""), this.$input.attr("name", this.name);
382        var d = c[0];
383        if (this.$preview.length > 0 && ("undefined" != typeof d.type ? d.type.match(/^image\/(gif|png|jpeg)$/) : d.name.match(/\.(gif|png|jpe?g)$/i)) && "undefined" != typeof FileReader) {
384            var e = new FileReader,
385                f = this.$preview,
386                g = this.$element;
387            e.onload = function(b) {
388                var e = a("<img>");
389                e[0].src = b.target.result, c[0].result = b.target.result, g.find(".fileinput-filename").text(d.name), "none" != f.css("max-height") && e.css("max-height", parseInt(f.css("max-height"), 10) - parseInt(f.css("padding-top"), 10) - parseInt(f.css("padding-bottom"), 10) - parseInt(f.css("border-top"), 10) - parseInt(f.css("border-bottom"), 10)), f.html(e), g.addClass("fileinput-exists").removeClass("fileinput-new"), g.trigger("change.bs.fileinput", c)
390            }
vendor: 2,138 bytes, lines 390-420
390, e.readAsDataURL(d)
391        } else this.$element.find(".fileinput-filename").text(d.name), this.$preview.text(d.name), this.$element.addClass("fileinput-exists").removeClass("fileinput-new"), this.$element.trigger("change.bs.fileinput")
392    }, c.prototype.clear = function(a) {
393        if (a && a.preventDefault(), this.$hidden.val(""), this.$hidden.attr("name", this.name), this.$input.attr("name", ""), b) {
394            var c = this.$input.clone(!0);
395            this.$input.after(c), this.$input.remove(), this.$input = c
396        } else this.$input.val("");
397        this.$preview.html(""), this.$element.find(".fileinput-filename").text(""), this.$element.addClass("fileinput-new").removeClass("fileinput-exists"), void 0 !== a && (this.$input.trigger("change"), this.$element.trigger("clear.bs.fileinput"))
398    }, c.prototype.reset = function() {
399        this.clear(), this.$hidden.val(this.original.hiddenVal), this.$preview.html(this.original.preview), this.$element.find(".fileinput-filename").text(""), this.original.exists ? this.$element.addClass("fileinput-exists").removeClass("fileinput-new") : this.$element.addClass("fileinput-new").removeClass("fileinput-exists"), this.$element.trigger("reset.bs.fileinput")
400    }, c.prototype.trigger = function(a) {
401        this.$input.trigger("click"), a.preventDefault()
402    };
403    var d = a.fn.fileinput;
404    a.fn.fileinput = function(b) {
405        return this.each(function() {
406            var d = a(this),
407                e = d.data("bs.fileinput");
408            e || d.data("bs.fileinput", e = new c(this, b)), "string" == typeof b && e[b]()
409        })
410    }, a.fn.fileinput.Constructor = c, a.fn.fileinput.noConflict = function() {
411        return a.fn.fileinput = d, this
412    }, a(document).on("click.fileinput.data-api", '[data-provides="fileinput"]', function(b) {
413        var c = a(this);
414        if (!c.data("bs.fileinput")) {
415            c.fileinput(c.data());
416            var d = a(b.target).closest('[data-dismiss="fileinput"],[data-trigger="fileinput"]');
417            d.length > 0 && (b.preventDefault(), d.trigger("click.bs.fileinput"))
418        }
419    })
420}(window.jQuery);

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.