PageSourceSearch

https://icmm.ac.cn/content/_common/base/js/layer/layer.js?v=7ulLQZouH0p6VGUW90LUI9QTNlL8MitIZ-oprJ0wBTA

js icmm.ac.cn collected 2026-10-02 20:51:57 UTC 40,977 bytes, 865 lines download raw bytes

1/*! layer-v3.1.0 Web弹层组件 MIT License  http://layer.layui.com/  By 贤心 */
2;
3!function (e, t) {
4    "use strict";
5    var i,
6        n,
7        a = e.layui && layui.define,
8        o = {
9            getPath: function () {
10                return "/content/_common/base/js/layer/";
11            }(),
12            config: {},
13            end: {},
14            minIndex: 0,
15            minLeft: [],
16            btn: ["确定", "取消"],
17            type: ["dialog", "page", "iframe", "loading", "tips"],
18            getStyle: function (t, i) {
19                var n = t.currentStyle ? t.currentStyle : e.getComputedStyle(t, null);
20                return n[n.getPropertyValue ? "getPropertyValue" : "getAttribute"](i);
21            },
22            link: function (t, i, n) {
23                if (r.path) {
24                    var a = document.getElementsByTagName("head")[0],
25                        s = document.createElement("link");
26                    "string" == typeof i && (n = i);
27                    var l = (n || t).replace(/\.|\//g, ""),
28                        f = "layuicss-" + l,
29                        c = 0;
30                    s.rel = "stylesheet", s.href = r.path + t, s.id =
31                        f, document.getElementById(f) || a.appendChild(s), "function" == typeof i &&
32                        !function u() {
33                            return++c > 80
34                                ? e.console && console.error("layer.css: Invalid")
35                                : void(1989 === parseInt(o.getStyle(document.getElementById(f), "width"))
36                                    ? i()
37                                    : setTimeout(u, 100));
38                        }();
39                }
40            }
41        },
42        r = {
43            v: "3.1.0",
44            ie: function () {
45                var t = navigator.userAgent.toLowerCase();
46                return!!(e.ActiveXObject || "ActiveXObject" in e) && ((t.match(/msie\s(\d+)/) || [])[1] || "11");
47            }(),
48            index: e.layer && e.layer.v ? 1e5 : 0,
49            path: o.getPath,
50            config: function (e, t) {
51                return e = e || {}, r.cache = o.config = i.extend({}, o.config, e), r.path =
52                        o.config.path || r.path, "string" == typeof e.extend && (e.extend = [e.extend]),
53                    o.config.path && r.ready(), e.extend
54                        ? (a ? layui.addcss("modules/layer/" + e.extend) : o.link("theme/" + e.extend), this)
55                        : this;
56            },
57            ready: function (e) {
58                var t = "layer",
59                    i = "",
60                    n = (a ? "modules/layer/" : "theme/") + "default/layer.css?v=" + r.v + i;
61                return a ? layui.addcss(n, e, t) : o.link(n, e, t), this;
62            },
63            alert: function (e, t, n) {
64                var a = "function" == typeof t;
65                return a && (n = t), r.open(i.extend({ content: e, yes: n }, a ? {} : t));
66            },
67            confirm: function (e, t, n, a) {
68                var s = "function" == typeof t;
69                return s && (a = n, n = t), r.open(i.extend({ content: e, btn: o.btn, yes: n, btn2: a }, s ? {}
vendor: 4,565 bytes, lines 69-192
69 : t));
70            },
71            msg: function (e, n, a) {
72                var s = "function" == typeof n,
73                    f = o.config.skin,
74                    c = (f ? f + " " + f + "-msg" : "") || "layui-layer-msg",
75                    u = l.anim.length - 1;
76                return s && (a = n), r.open(i.extend(
77                    { content: e, time: 3e3, shade: !1, skin: c, title: !1, closeBtn: !1, btn: !1, resize: !1, end: a },
78                    s && !o.config.skin
79                    ? { skin: c + " layui-layer-hui", anim: u }
80                    : function () {
81                        return n = n || {}, (n.icon === -1 || n.icon === t && !o.config.skin) &&
82                            (n.skin = c + " " + (n.skin || "layui-layer-hui")), n;
83                    }()));
84            },
85            load: function (e, t) { return r.open(i.extend({ type: 3, icon: e || 0, resize: !1, shade: .01 }, t)) },
86            tips: function (e, t, n) {
87                return r.open(i.extend({
88                        type: 4,
89                        content: [e, t],
90                        closeBtn: !1,
91                        time: 3e3,
92                        shade: !1,
93                        resize: !1,
94                        fixed: !1,
95                        maxWidth: 210
96                    },
97                    n));
98            }
99        },
100        s = function (e) {
101            var t = this;
102            t.index = ++r.index, t.config =
103                i.extend({}, t.config, o.config, e), document.body
104                ? t.creat()
105                : setTimeout(function () { t.creat() }, 30);
106        };
107    s.pt = s.prototype;
108    var l = [
109        "layui-layer", ".layui-layer-title", ".layui-layer-main", ".layui-layer-dialog", "layui-layer-iframe",
110        "layui-layer-content", "layui-layer-btn", "layui-layer-close"
111    ];
112    l.anim =
113    [
114        "layer-anim-00", "layer-anim-01", "layer-anim-02", "layer-anim-03", "layer-anim-04", "layer-anim-05",
115        "layer-anim-06"
116    ], s.pt.config = {
117        type: 0,
118        shade: .3,
119        fixed: !0,
120        move: l[1],
121        title: "信息",
122        offset: "auto",
123        area: "auto",
124        closeBtn: 1,
125        time: 0,
126        zIndex: 19891014,
127        maxWidth: 360,
128        anim: 0,
129        isOutAnim: !0,
130        icon: -1,
131        moveType: 1,
132        resize: !0,
133        scrollbar: !0,
134        tips: 2
135    }, s.pt.vessel = function (e, t) {
136        var n = this,
137            a = n.index,
138            r = n.config,
139            s = r.zIndex + a,
140            f = "object" == typeof r.title,
141            c = r.maxmin && (1 === r.type || 2 === r.type),
142            u = r.title
143                ? '<div class="layui-layer-title" style="' +
144                (f ? r.title[1] : "") +
145                '">' +
146                (f ? r.title[0] : r.title) +
147                "</div>"
148                : "";
149        return r.zIndex = s, t([
150                r.shade
151                ? '<div class="layui-layer-shade" id="layui-layer-shade' +
152                a +
153                '" times="' +
154                a +
155                '" style="' +
156                ("z-index:" + (s - 1) + "; ") +
157                '"></div>'
158                : "", '<div class="' +
159                l[0] +
160                (" layui-layer-" + o.type[r.type]) +
161                (0 != r.type && 2 != r.type || r.shade ? "" : " layui-layer-border") +
162                " " +
163                (r.skin || "") +
164                '" id="' +
165                l[0] +
166                a +
167                '" type="' +
168                o.type[r.type] +
169                '" times="' +
170                a +
171                '" showtime="' +
172                r.time +
173                '" conType="' +
174                (e ? "object" : "string") +
175                '" style="z-index: ' +
176                s +
177                "; width:" +
178                r.area[0] +
179                ";height:" +
180                r.area[1] +
181                (r.fixed ? "" : ";position:absolute;") +
182                '">' +
183                (e && 2 != r.type ? "" : u) +
184                '<div id="' +
185                (r.id || "") +
186                '" class="layui-layer-content' +
187                (0 == r.type && r.icon !== -1 ? " layui-layer-padding" : "") +
188                (3 == r.type ? " layui-layer-loading" + r.icon : "") +
189                '">' +
190                (0 == r.type && r.icon !== -1 ? '<i class="layui-layer-ico layui-layer-ico' + r.icon + '"></i>' : "") +
191                (1 == r.type && e ? "" : r.content || "") +
192                '</div>
vendor: 14,670 bytes, lines 192-484
192<span class="layui-layer-setwin">' +
193                function () {
194                    var e = c
195                        ? '<a class="layui-layer-min" href="javascript:;"><cite></cite></a><a class="layui-layer-ico layui-layer-max" href="javascript:;"></a>'
196                        : "";
197                    return r.closeBtn &&
198                    (e += '<a class="layui-layer-ico ' +
199                        l[7] +
200                        " " +
201                        l[7] +
202                        (r.title ? r.closeBtn : 4 == r.type ? "1" : "2") +
203                        '" href="javascript:;"></a>'), e;
204                }() +
205                "</span>" +
206                (r.btn
207                    ? function () {
208                        var e = "";
209                        "string" == typeof r.btn && (r.btn = [r.btn]);
210                        for (var t = 0,
211                            i = r.btn.length;
212                            t < i;
213                            t++) {
214                            e += '<a class="' + l[6] + t + '">' + r.btn[t] + "</a>";
215                        }
216                        return'<div class="' + l[6] + " layui-layer-btn-" + (r.btnAlign || "") + '">' + e + "</div>";
217                    }()
218                    : "") +
219                (r.resize ? '<span class="layui-layer-resize"></span>' : "") +
220                "</div>"
221            ],
222            u,
223            i('<div class="layui-layer-move"></div>')), n;
224    }, s.pt.creat = function () {
225        var e = this,
226            t = e.config,
227            a = e.index,
228            s = t.content,
229            f = "object" == typeof s,
230            c = i("body");
231        if (!t.id || !i("#" + t.id)[0]) {
232            switch ("string" == typeof t.area && (t.area = "auto" === t.area ? ["", ""] : [t.area, ""]),
233                t.shift && (t.anim = t.shift), 6 == r.ie && (t.fixed = !1), t.type) {
234                case 0:
235                    t.btn = "btn" in t ? t.btn : o.btn[0], r.closeAll("dialog");
236                    break;
237                case 2:
238                    var s = t.content = f ? t.content : [t.content || "http://layer.layui.com", "auto"];
239                    t.content = '<iframe scrolling="' +
240                        (t.content[1] || "auto") +
241                        '" allowtransparency="true" id="' +
242                        l[4] +
243                        a +
244                        '" name="' +
245                        l[4] +
246                        a +
247                        '" onload="this.className=\'\';" class="layui-layer-load" frameborder="0" src="' +
248                        t.content[0] +
249                        '"></iframe>';
250                    break;
251                case 3:
252                    delete t.title, delete t.closeBtn, t.icon === -1 && 0 === t.icon, r.closeAll("loading");
253                    break;
254                case 4:
255                    f || (t.content = [t.content, "body"]), t.follow = t.content[1], t.content =
256                        t.content[0] + '<i class="layui-layer-TipsG"></i>', delete t.title, t.tips =
257                        "object" == typeof t.tips ? t.tips : [t.tips, !0], t.tipsMore || r.closeAll("tips");
258            }
259            if (e.vessel(f,
260                    function (n, r, u) {
261                        c.append(n[0]), f
262                            ? function () {
263                                2 == t.type || 4 == t.type
264                                    ? function () { i("body").append(n[1]) }()
265                                    : function () {
266                                        s.parents("." + l[0])[0] ||
267                                        (s.data("display", s.css("display")).show().addClass("layui-layer-wrap")
268                                            .wrap(n[1]), i("#" + l[0] + a).find("." + l[5]).before(r));
269                                    }();
270                            }()
271                            : c.append(n[1]), i(".layui-layer-move")[0] || c.append(o.moveElem = u), e.layero =
272                            i("#" + l[0] + a), t.scrollbar || l.html.css("overflow", "hidden").attr("layer-full", a);
273                    }).auto(a),
274                i("#layui-layer-shade" + e.index)
275                    .css({ "background-color": t.shade[1] || "#000", opacity: t.shade[0] || t.shade }),
276                2 == t.type && 6 == r.ie && e.layero.find("iframe").attr("src", s[0]), 4 == t.type
277                    ? e.tips()
278                    : e.offset(),
279                t.fixed &&
280                    n.on("resize",
281                        function () {
282                            e.offset(), (/^\d+%$/.test(t.area[0]) || /^\d+%$/.test(t.area[1])) && e.auto(a),
283                                4 == t.type &&
284                                    e.tips();
285                        }), t.time <= 0 || setTimeout(function () { r.close(e.index) }, t.time), e.move().callback(), l
286                    .anim
287                    [t.anim]) {
288                var u = "layer-anim " + l.anim[t.anim];
289                e.layero.addClass(u).one("webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend",
290                    function () { i(this).removeClass(u) });
291            }
292            t.isOutAnim && e.layero.data("isOutAnim", !0);
293        }
294    }, s.pt.auto = function (e) {
295        var t = this,
296            a = t.config,
297            o = i("#" + l[0] + e);
298        "" === a.area[0] &&
299            a.maxWidth > 0 &&
300            (r.ie && r.ie < 8 && a.btn && o.width(o.innerWidth()), o.outerWidth() > a.maxWidth && o.width(a.maxWidth));
301        var s = [o.innerWidth(), o.innerHeight()],
302            f = o.find(l[1]).outerHeight() || 0,
303            c = o.find("." + l[6]).outerHeight() || 0,
304            u = function (e) { e = o.find(e), e.height(s[1] - f - c - 2 * (0 | parseFloat(e.css("padding-top")))) };
305        switch (a.type) {
306            case 2:
307                u("iframe");
308                break;
309            default:
310                "" === a.area[1]
311                    ? a.maxHeight > 0 && o.outerHeight() > a.maxHeight
312                    ? (s[1] = a.maxHeight, u("." + l[5]))
313                    : a.fixed && s[1] >= n.height() && (s[1] = n.height(), u("." + l[5]))
314                    : u("." + l[5]);
315        }
316        return t;
317    }, s.pt.offset = function () {
318        var e = this,
319            t = e.config,
320            i = e.layero,
321            a = [i.outerWidth(), i.outerHeight()],
322            o = "object" == typeof t.offset;
323        e.offsetTop = (n.height() - a[1]) / 2, e.offsetLeft =
324                (n.width() - a[0]) / 2,
325            o
326                ? (e.offsetTop = t.offset[0], e.offsetLeft = t.offset[1] || e.offsetLeft)
327                : "auto" !== t.offset &&
328                ("t" === t.offset
329                    ? e.offsetTop = 0
330                    : "r" === t.offset
331                    ? e.offsetLeft = n.width() - a[0]
332                    : "b" === t.offset
333                    ? e.offsetTop = n.height() - a[1]
334                    : "l" === t.offset
335                    ? e.offsetLeft = 0
336                    : "lt" === t.offset
337                    ? (e.offsetTop = 0, e.offsetLeft = 0)
338                    : "lb" === t.offset
339                    ? (e.offsetTop = n.height() - a[1], e.offsetLeft = 0)
340                    : "rt" === t.offset
341                    ? (e.offsetTop = 0, e.offsetLeft = n.width() - a[0])
342                    : "rb" === t.offset
343                    ? (e.offsetTop = n.height() - a[1], e.offsetLeft = n.width() - a[0])
344                    : e.offsetTop = t.offset), t.fixed ||
345            (e.offsetTop =
346                    /%$/.test(e.offsetTop) ? n.height() * parseFloat(e.offsetTop) / 100 : parseFloat(e.offsetTop),
347                e.offsetLeft =
348                    /%$/.test(e.offsetLeft) ? n.width() * parseFloat(e.offsetLeft) / 100 : parseFloat(e.offsetLeft),
349                e.offsetTop += n.scrollTop(), e.offsetLeft += n.scrollLeft()), i.attr("minLeft") &&
350                (e.offsetTop = n.height() - (i.find(l[1]).outerHeight() || 0), e.offsetLeft = i.css("left")), i.css({
351                top: e.offsetTop,
352                left: e.offsetLeft
353            });
354    }, s.pt.tips = function () {
355        var e = this,
356            t = e.config,
357            a = e.layero,
358            o = [a.outerWidth(), a.outerHeight()],
359            r = i(t.follow);
360        r[0] || (r = i("body"));
361        var s = { width: r.outerWidth(), height: r.outerHeight(), top: r.offset().top, left: r.offset().left },
362            f = a.find(".layui-layer-TipsG"),
363            c = t.tips[0];
364        t.tips[1] || f.remove(), s.autoLeft =
365            function () {
366                s.left + o[0] - n.width() > 0
367                    ? (s.tipLeft = s.left + s.width - o[0], f.css({ right: 12, left: "auto" }))
368                    : s.tipLeft = s.left;
369            }, s.where =
370        [
371            function () {
372                s.autoLeft(), s.tipTop = s.top - o[1] - 10, f.removeClass("layui-layer-TipsB")
373                    .addClass("layui-layer-TipsT").css("border-right-color", t.tips[1]);
374            },
375            function () {
376                s.tipLeft = s.left + s.width + 10, s.tipTop = s.top, f.removeClass("layui-layer-TipsL")
377                    .addClass("layui-layer-TipsR").css("border-bottom-color", t.tips[1]);
378            },
379            function () {
380                s.autoLeft(), s.tipTop = s.top + s.height + 10, f.removeClass("layui-layer-TipsT")
381                    .addClass("layui-layer-TipsB").css("border-right-color", t.tips[1]);
382            },
383            function () {
384                s.tipLeft = s.left - o[0] - 10, s.tipTop = s.top, f.removeClass("layui-layer-TipsR")
385                    .addClass("layui-layer-TipsL").css("border-bottom-color", t.tips[1]);
386            }
387        ], s.where[c - 1](), 1 === c
388            ? s.top - (n.scrollTop() + o[1] + 16) < 0 && s.where[2]()
389            : 2 === c
390            ? n.width() - (s.left + s.width + o[0] + 16) > 0 || s.where[3]()
391            : 3 === c
392            ? s.top - n.scrollTop() + s.height + o[1] + 16 - n.height() > 0 && s.where[0]()
393            : 4 === c && o[0] + 16 - s.left > 0 && s.where[1](), a.find("." + l[5])
394            .css({ "background-color": t.tips[1], "padding-right": t.closeBtn ? "30px" : "" }), a.css({
395            left: s.tipLeft - (t.fixed ? n.scrollLeft() : 0),
396            top: s.tipTop - (t.fixed ? n.scrollTop() : 0)
397        });
398    }, s.pt.move = function () {
399        var e = this,
400            t = e.config,
401            a = i(document),
402            s = e.layero,
403            l = s.find(t.move),
404            f = s.find(".layui-layer-resize"),
405            c = {};
406        return t.move && l.css("cursor", "move"), l.on("mousedown",
407            function (e) {
408                e.preventDefault(), t.move &&
409                (c.moveStart = !0, c.offset =
410                    [e.clientX - parseFloat(s.css("left")), e.clientY - parseFloat(s.css("top"))], o.moveElem
411                    .css("cursor", "move").show());
412            }), f.on("mousedown",
413            function (e) {
414                e.preventDefault(), c.resizeStart = !0, c.offset = [e.clientX, e.clientY], c.area =
415                    [s.outerWidth(), s.outerHeight()], o.moveElem.css("cursor", "se-resize").show();
416            }), a.on("mousemove",
417            function (i) {
418                if (c.moveStart) {
419                    var a = i.clientX - c.offset[0],
420                        o = i.clientY - c.offset[1],
421                        l = "fixed" === s.css("position");
422                    if (i.preventDefault(), c.stX = l ? 0 : n.scrollLeft(), c.stY = l ? 0 : n.scrollTop(), !t.moveOut) {
423                        var f = n.width() - s.outerWidth() + c.stX,
424                            u = n.height() - s.outerHeight() + c.stY;
425                        a < c.stX && (a = c.stX), a > f && (a = f), o < c.stY && (o = c.stY), o > u && (o = u);
426                    }
427                    s.css({ left: a, top: o });
428                }
429                if (t.resize && c.resizeStart) {
430                    var a = i.clientX - c.offset[0],
431                        o = i.clientY - c.offset[1];
432                    i.preventDefault(), r.style(e.index, { width: c.area[0] + a, height: c.area[1] + o }), c.isResize =
433                        !0, t.resizing && t.resizing(s);
434                }
435            }).on("mouseup",
436            function (e) {
437                c.moveStart && (delete c.moveStart, o.moveElem.hide(), t.moveEnd && t.moveEnd(s)), c.resizeStart &&
438                    (delete c.resizeStart, o.moveElem.hide());
439            }), e;
440    }, s.pt.callback = function () {
441        function e() {
442            var e = a.cancel && a.cancel(t.index, n);
443            e === !1 || r.close(t.index);
444        }
445
446        var t = this,
447            n = t.layero,
448            a = t.config;
449        t.openLayer(), a.success &&
450            (2 == a.type
451                ? n.find("iframe").on("load", function () { a.success(n, t.index) })
452                : a.success(n, t.index)),
453            6 == r.ie && t.IE6(n), n.find("." + l[6]).children("a").on("click",
454                function () {
455                    var e = i(this).index();
456                    if (0 === e) {
457                        a.yes ? a.yes(t.index, n) : a.btn1 ? a.btn1(t.index, n) : r.close(t.index);
458                    } else {
459                        var o = a["btn" + (e + 1)] && a["btn" + (e + 1)](t.index, n);
460                        o === !1 || r.close(t.index);
461                    }
462                }), n.find("." + l[7]).on("click", e), a.shadeClose &&
463                i("#layui-layer-shade" + t.index).on("click", function () { r.close(t.index) }), n
464                .find(".layui-layer-min")
465                .on("click",
466                    function () {
467                        var e = a.min && a.min(n);
468                        e === !1 || r.min(t.index, a);
469                    }), n.find(".layui-layer-max").on("click",
470                function () {
471                    i(this).hasClass("layui-layer-maxmin")
472                        ? (r.restore(t.index), a.restore && a.restore(n))
473                        : (r.full(t.index, a), setTimeout(function () { a.full && a.full(n) }, 100));
474                }), a.end && (o.end[t.index] = a.end);
475    }, o.reselect = function () {
476        i.each(i("select"),
477            function (e, t) {
478                var n = i(this);
479                n.parents("." + l[0])[0] ||
480                    1 == n.attr("layer") && i("." + l[0]).length < 1 && n.removeAttr("layer").show(), n = null;
481            });
482    }, s.pt.IE6 = function (e) {
483        i("select").each(function (e, t) {
484            var n = i(this);
485            n.parents("." + l[0])[0] || "none" === n.css("display") || n.attr({ layer: "1" }).hide(), n = null;
486        });
487    }, s.pt.openLayer = function () {
488        var e = this;
489        r.zIndex = e.config.zIndex, r.setTop = function (e) {
490            var t = function () { r.zIndex++, e.css("z-index", r.zIndex + 1) };
491            return r.zIndex = parseInt(e[0].style.zIndex), e.on("mousedown", t), r.zIndex;
492        };
493    }, o.record = function (e) {
494        var t = [e.width(), e.height(), e.position().top, e.position().left + parseFloat(e.css("margin-left"))];
495        e.find(".layui-layer-max").addClass("layui-layer-maxmin"), e.attr({ area: t });
496    }, o.rescollbar =
497        function (e) {
498            l.html.attr("layer-full") == e &&
499            (l.html[0].style.removeProperty
500                ? l.html[0].style.removeProperty("overflow")
501                : l.html[0].style.removeAttribute("overflow"), l.html.removeAttr("layer-full"));
502        }, e.layer = r, r.getChildFrame =
503        function (e, t) {
504            return t = t || i("." + l[4]).attr("times"), i("#" + l[0] + t).find("iframe").contents().find(e);
505        }, r.getFrameIndex = function (e) { return i("#" + e).parents("." + l[4]).attr("times") }, r.iframeAuto =
506        function (e) {
507            if (e) {
508                var t = r.getChildFrame("html", e).outerHeight(),
509                    n = i("#" + l[0] + e),
510                    a = n.find(l[1]).outerHeight() || 0,
511                    o = n.find("." + l[6]).outerHeight() || 0;
512                n.css({ height: t + a + o }), n.find("iframe").css({ height: t });
513            }
514        }, r.iframeSrc = function (e, t) { i("#" + l[0] + e).find("iframe").attr("src", t) }, r.style =
515        function (e, t, n) {
516            var a = i("#" + l[0] + e),
517                r = a.find(".layui-layer-content"),
518                s = a.attr("type"),
519                f = a.find(l[1]).outerHeight() || 0,
520                c = a.find("." + l[6]).outerHeight() || 0;
521            a.attr("minLeft");
522            s !== o.type[3] &&
523                s !== o.type[4] &&
524                (n ||
525                (parseFloat(t.width) <= 260 && (t.width = 260), parseFloat(t.height) - f - c <= 64 &&
526                    (t.height = 64 + f + c)), a.css(t), c = a.find("." + l[6]).outerHeight(), s === o.type[2]
527                    ? a.find("iframe").css({ height: parseFloat(t.height) - f - c })
528                    : r.css({
529                        height: parseFloat(t.height) -
530                            f -
531                            c -
532                            parseFloat(r.css("padding-top")) -
533                            parseFloat(r.css("padding-bottom"))
534                    }));
535        }, r.min = function (e, t) {
536        var a = i("#" + l[0] + e),
537            s = a.find(l[1]).outerHeight() || 0,
538            f = a.attr("minLeft") || 181 * o.minIndex + "px",
539            c = a.css("position");
540        o.record(a), o.minLeft[0] && (f = o.minLeft[0], o.minLeft.shift()), a.attr("position", c), r.style(e,
541                { width: 180, height: s, left: f, top: n.height() - s, position: "fixed", overflow: "hidden" },
542                !0), a.find(".layui-layer-min").hide(), "page" === a.attr("type") && a.find(l[4]).hide(),
543            o.rescollbar(e),
544            a.attr("minLeft") || o.minIndex++, a.attr("minLeft", f);
545    }, r.restore = function (e) {
546        var t = i("#" + l[0] + e),
547            n = t.attr("area").split(",");
548        t.attr("type");
549        r.style(e,
550                {
551                    width: parseFloat(n[0]),
552                    height: parseFloat(n[1]),
553                    top: parseFloat(n[2]),
554                    left: parseFloat(n[3]),
555                    position: t.attr("position"),
556                    overflow: "visible"
557                },
558                !0), t.find(".layui-layer-max").removeClass("layui-layer-maxmin"), t.find(".layui-layer-min").show(),
559            "page" === t.attr("type") && t.find(l[4]).show(), o.rescollbar(e);
560    }, r.full = function (e) {
561        var t,
562            a = i("#" + l[0] + e);
563        o.record(a), l.html.attr("layer-full") || l.html.css("overflow", "hidden").attr("layer-full", e),
564            clearTimeout(t), t = setTimeout(function () {
565                    var t = "fixed" === a.css("position");
566                    r.style(e,
567                        {
568                            top: t ? 0 : n.scrollTop(),
569                            left: t ? 0 : n.scrollLeft(),
570                            width: n.width(),
571                            height: n.height()
572                        },
573                        !0), a.find(".layui-layer-min").hide();
574                },
575                100);
576    }, r.title = function (e, t) {
577        var n = i("#" + l[0] + (t || r.index)).find(l[1]);
578        n.html(e);
579    }, r.close = function (e) {
580        var t = i("#" + l[0] + e),
581            n = t.attr("type"),
582            a = "layer-anim-close";
583        if (t[0]) {
584            var s = "layui-layer-wrap",
585                f = function () {
586                    if (n === o.type[1] && "object" === t.attr("conType")) {
587                        t.children(":not(." + l[5] + ")").remove();
588                        for (var a = t.find("." + s),
589                            r = 0;
590                            r < 2;
591                            r++) {
592                            a.unwrap();
593                        }
594                        a.css("display", a.data("display")).removeClass(s);
595                    } else {
596                        if (n === o.type[2]) {
597                            try {
598                                var f = i("#" + l[4] + e)[0];
599                                f.contentWindow.document.write(""), f.contentWindow.close(), t.find("." + l[5])[0]
600                                    .removeChild(f);
601                            } catch (c) {
602                            }
603                        }
604                        t[0].innerHTML = "", t.remove();
605                    }
606                    "function" == typeof o.end[e] && o.end[e](), delete o.end[e];
607                };
608            t.data("isOutAnim") && t.addClass("layer-anim " + a),
609                i("#layui-layer-moves, #layui-layer-shade" + e).remove(), 6 == r.ie && o.reselect(), o.rescollbar(e),
610                t.attr("minLeft") && (o.minIndex--, o.minLeft.push(t.attr("minLeft"))), r.ie && r.ie < 10 ||
611                    !t.data("isOutAnim")
612                    ? f()
613                    : setTimeout(function () { f() }, 200);
614        }
615    }, r.closeAll = function (e) {
616        i.each(i("." + l[0]),
617            function () {
618                var t = i(this),
619                    n = e ? t.attr("type") === e : 1;
620                n && r.close(t.attr("times")), n = null;
621            });
622    };
623    var f = r.cache || {},
624        c = function (e) { return f.skin ? " " + f.skin + " " + f.skin + "-" + e : "" };
625    r.prompt = function (e, t) {
626        var a = "";
627        if (e = e || {}, "function" == typeof e && (t = e), e.area) {
628            var o = e.area;
629            a = 'style="width: ' + o[0] + "; height: " + o[1] + ';"', delete e.area;
630        }
631        var s,
632            l = 2 == e.formType
633                ? '<textarea class="layui-layer-input"' + a + ">" + (e.value || "") + "</textarea>"
634                : function () {
635                    return'<input type="' +
636                        (1 == e.formType ? "password" : "text") +
637                        '" class="layui-layer-input" value="' +
638                        (e.value || "") +
639                        '">';
640                }(),
641            f = e.success;
642        return delete e.success, r.open(i.extend({
643                type: 1,
644                btn: ["&#x786E;&#x5B9A;", "&#x53D6;&#x6D88;"],
645                content: l,
646                skin: "layui-layer-prompt" + c("prompt"),
647                maxWidth: n.width(),
648                success: function (e) { s = e.find(".layui-layer-input"), s.focus(), "function" == typeof f && f(e) },
649                resize: !1,
650                yes: function (i) {
651                    var n = s.val();
652                    "" === n
653                        ? s.focus()
654                        : n.length > (e.maxlength || 500)
655                        ? r.tips("&#x6700;&#x591A;&#x8F93;&#x5165;" + (e.maxlength || 500) + "&#x4E2A;&#x5B57;&#x6570;",
656                            s,
657                            { tips: 1 })
658                        : t && t(n, i, s);
659                }
660            },
661            e));
662    }, r.tab = function (e) {
663        e = e || {};
664        var t = e.tab || {},
665            n = "layui-this",
666            a = e.success;
667        return delete e.success, r.open(i.extend({
668                type: 1,
669                skin: "layui-layer-tab" + c("tab"),
670                resize: !1,
671                title: function () {
672                    var e = t.length,
673                        i = 1,
674                        a = "";
675                    if (e > 0) {
676                        for (a = '<span class="' + n + '">' + t[0].title + "</span>"; i < e; i++) {
677                            a += "<span>" + t[i].title + "</span>";
678                        }
679                    }
680                    return a;
681                }(),
682                content: '<ul class="layui-layer-tabmain">' +
683                    function () {
684                        var e = t.length,
685                            i = 1,
686                            a = "";
687                        if (e > 0) {
688                            for (a = '<li class="layui-layer-tabli ' +
689                                    n +
690                                    '">' +
691                                    (t[0].content || "no content") +
692                                    "</li>";
693                                i < e;
694                                i++) {
695                                a += '<li class="layui-layer-tabli">' + (t[i].content || "no  content") + "</li>";
696                            }
697                        }
698                        return a;
699                    }() +
700                    "</ul>",
701                success: function (t) {
702                    var o = t.find(".layui-layer-title").children(),
703                        r = t.find(".layui-layer-tabmain").children();
704                    o.on("mousedown",
705                        function (t) {
706                            t.stopPropagation ? t.stopPropagation() : t.cancelBubble = !0;
707                            var a = i(this),
708                                o = a.index();
709                            a.addClass(n).siblings().removeClass(n), r.eq(o).show().siblings().hide(), "function" ==
710                                typeof e.change &&
711                                e.change(o);
712                        }), "function" == typeof a && a(t);
713                }
714            },
715            e));
716    }, r.photos = function (t, n, a) {
717        function o(e, t, i) {
718            var n = new Image;
719            return n.src =
720                e, n.complete
721                ? t(n)
722                : (n.onload = function () { n.onload = null, t(n) }, void(n.onerror =
723                    function (e) { n.onerror = null, i(e) }));
724        }
725
726        var s = {};
727        if (t = t || {}, t.photos) {
728            var l = t.photos.constructor === Object,
729                f = l ? t.photos : {},
730                u = f.data || [],
731                d = f.start || 0;
732            s.imgIndex = (0 | d) + 1, t.img = t.img || "img";
733            var y = t.success;
734            if (delete t.success, l) {
735                if (0 === u.length) {
736                    return r.msg("&#x6CA1;&#x6709;&#x56FE;&#x7247;");
737                }
738            } else {
739                var p = i(t.photos),
740                    h = function () {
741                        u = [], p.find(t.img).each(function (e) {
742                            var t = i(this);
743                            t.attr("layer-index", e), u.push({
744                                alt: t.attr("alt"),
745                                pid: t.attr("layer-pid"),
746                                src: t.attr("layer-src") || t.attr("src"),
747                                thumb: t.attr("src")
748                            });
749                        });
750                    };
751                if (h(), 0 === u.length) {
752                    return;
753                }
754                if (n ||
755                    p.on("click",
756                        t.img,
757                        function () {
758                            var e = i(this),
759                                n = e.attr("layer-index");
760                            r.photos(i.extend(t, { photos: { start: n, data: u, tab: t.tab }, full: t.full }), !0), h();
761                        }), !n) {
762                    return;
763                }
764            }
765            s.imgprev =
766                function (e) { s.imgIndex--, s.imgIndex < 1 && (s.imgIndex = u.length), s.tabimg(e) }, s.imgnext =
767                function (e, t) { s.imgIndex++, s.imgIndex > u.length && (s.imgIndex = 1, t) || s.tabimg(e) }, s.keyup =
768                function (e) {
769                    if (!s.end) {
770                        var t = e.keyCode;
771                        e.preventDefault(), 37 === t
772                            ? s.imgprev(!0)
773                            : 39 === t
774                            ? s.imgnext(!0)
775                            : 27 === t && r.close(s.index);
776                    }
777                }, s.tabimg = function (e) {
778                if (!(u.length <= 1)) {
779                    return f.start = s.imgIndex - 1, r.close(s.index), r.photos(t, !0, e);
780                }
781            }, s.event =
782                function () {
783                    s.bigimg.hover(function () { s.imgsee.show() }, function () { s.imgsee.hide() }), s.bigimg
784                            .find(".layui-layer-imgprev")
785                            .on("click", function (e) { e.preventDefault(), s.imgprev() }), s.bigimg
786                            .find(".layui-layer-imgnext")
787                            .on("click", function (e) { e.preventDefault(), s.imgnext() }),
788                        i(document).on("keyup", s.keyup);
789                }, s.loadi = r.load(1, { shade: !("shade" in t) && .9, scrollbar: !1 }), o(u[d].src,
790                function (n) {
791                    r.close(s.loadi), s.index = r.open(i.extend({
792                            type: 1,
793                            id: "layui-layer-photos",
794                            area: function () {
795                                var a = [n.width, n.height],
796                                    o = [i(e).width() - 100, i(e).height() - 100];
797                                if (!t.full && (a[0] > o[0] || a[1] > o[1])) {
798                                    var r = [a[0] / o[0], a[1] / o[1]];
799                                    r[0] > r[1]
800                                        ? (a[0] = a[0] / r[0], a[1] = a[1] / r[0])
801                                        : r[0] < r[1] && (a[0] = a[0] / r[1], a[1] = a[1] / r[1]);
802                                }
803                                return[a[0] + "px", a[1] + "px"];
804                            }(),
805                            title: !1,
806                            shade: .9,
807                            shadeClose: !0,
808                            closeBtn: !1,
809                            move: ".layui-layer-phimg img",
810                            moveType: 1,
811                            scrollbar: !1,
812                            moveOut: !0,
813                            isOutAnim: !1,
814                            skin: "layui-layer-photos" + c("photos"),
815                            content: '<div class="layui-layer-phimg"><img src="' +
816                                u[d].src +
817                                '" alt="' +
818                                (u[d].alt || "") +
819                                '" layer-pid="' +
820                                u[d].pid +
821                                '"><div class="layui-layer-imgsee">' +
822                                (u.length > 1
823                                    ? '<span class="layui-layer-imguide"><a href="javascript:;" class="layui-layer-iconext layui-layer-imgprev"></a><a href="javascript:;" class="layui-layer-iconext layui-layer-imgnext"></a></span>'
824                                    : "") +
825                                '<div class="layui-layer-imgbar" style="display:' +
826                                (a ? "block" : "") +
827                                '"><span class="layui-layer-imgtit"><a href="javascript:;">' +
828                                (u[d].alt || "") +
829                                "</a><em>" +
830                                s.imgIndex +
831                                "/" +
832                                u.length +
833                                "</em></span></div></div></div>",
834                            success: function (e, i) {
835                                s.bigimg = e.find(".layui-layer-phimg"), s.imgsee =
836                                        e.find(".layui-layer-imguide,.layui-layer-imgbar"), s.event(e), t.tab &&
837                                        t.tab(u[d], e),
838                                    "function" == typeof y && y(e);
839                            },
840                            end: function () { s.end = !0, i(document).off("keyup", s.keyup) }
841                        },
842                        t));
843                },
844                function () {
845                    r.close(s.loadi), r.msg(
846                        "&#x5F53;&#x524D;&#x56FE;&#x7247;&#x5730;&#x5740;&#x5F02;&#x5E38;<br>&#x662F;&#x5426;&#x7EE7;&#x7EED;&#x67E5;&#x770B;&#x4E0B;&#x4E00;&#x5F20;&#xFF1F;",
847                        {
848                            time: 3e4,
849                            btn: ["&#x4E0B;&#x4E00;&#x5F20;", "&#x4E0D;&#x770B;&#x4E86;"],
850                            yes: function () { u.length > 1 && s.imgnext(!0, !0) }
851                        });
852                });
853        }
854    }, o.run = function (t) {
855        i = t, n = i(e), l.html = i("html"), r.open = function (e) {
856            var t = new s(e);
857            return t.index;
858        };
859    }, e.layui && layui.define
860        ? (r.ready(), layui.define("jquery",
861            function (t) { r.path = layui.cache.dir, o.run(layui.$), e.layer = r, t("layer", r) }))
862        : "function" == typeof define && define.amd
863        ? define(["jquery"], function () { return o.run(e.jQuery), r })
864        : function () { o.run(e.jQuery), r.ready() }();
865}(window);

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.