;
(self.AMP = self.AMP || []).push({
    m: 0,
    v: "2305252018001",
    n: "amp-lightbox",
    ev: "0.1",
    l: !0,
    f: function(t, i) {
        ! function() {
            function i(t, i) {
                (null == i || i > t.length) && (i = t.length);
                for (var n = 0, r = new Array(i); n < i; n++) r[n] = t[n];
                return r
            }

            function n(t, n) {
                var r = "undefined" != typeof Symbol && t[Symbol.iterator] || t["@@iterator"];
                if (r) return (r = r.call(t)).next.bind(r);
                if (Array.isArray(t) || (r = function(t, n) {
                        if (t) {
                            if ("string" == typeof t) return i(t, n);
                            var r = Object.prototype.toString.call(t).slice(8, -1);
                            return "Object" === r && t.constructor && (r = t.constructor.name), "Map" === r || "Set" === r ? Array.from(t) : "Arguments" === r || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r) ? i(t, n) : void 0
                        }
                    }(t)) || n && t && "number" == typeof t.length) {
                    r && (t = r);
                    var s = 0;
                    return function() {
                        return s >= t.length ? {
                            done: !0
                        } : {
                            done: !1,
                            value: t[s++]
                        }
                    }
                }
                throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")
            }
            var r, s = function() {
                var t = this;
                this.promise = new Promise((function(i, n) {
                    t.resolve = i, t.reject = n
                }))
            };

            function o(t, i) {
                return (o = Object.setPrototypeOf || function(t, i) {
                    return t.__proto__ = i, t
                })(t, i)
            }

            function h(t, i) {
                if ("function" != typeof i && null !== i) throw new TypeError("Super expression must either be null or a function");
                t.prototype = Object.create(i && i.prototype, {
                    constructor: {
                        value: t,
                        writable: !0,
                        configurable: !0
                    }
                }), i && o(t, i)
            }

            function e(t) {
                return (e = Object.setPrototypeOf ? Object.getPrototypeOf : function(t) {
                    return t.__proto__ || Object.getPrototypeOf(t)
                })(t)
            }

            function u(t) {
                return (u = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(t) {
                    return typeof t
                } : function(t) {
                    return t && "function" == typeof Symbol && t.constructor === Symbol && t !== Symbol.prototype ? "symbol" : typeof t
                })(t)
            }

            function a(t, i) {
                if (i && ("object" === u(i) || "function" == typeof i)) return i;
                if (void 0 !== i) throw new TypeError("Derived constructors may only return object or undefined");
                return function(t) {
                    if (void 0 === t) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
                    return t
                }(t)
            }

            function f(t) {
                var i = function() {
                    if ("undefined" == typeof Reflect || !Reflect.construct) return !1;
                    if (Reflect.construct.sham) return !1;
                    if ("function" == typeof Proxy) return !0;
                    try {
                        return Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], (function() {}))), !0
                    } catch (t) {
                        return !1
                    }
                }();
                return function() {
                    var n, r = e(t);
                    if (i) {
                        var s = e(this).constructor;
                        n = Reflect.construct(r, arguments, s)
                    } else n = r.apply(this, arguments);
                    return a(this, n)
                }
            }
            var c = Array.isArray,
                l = Object.prototype,
                v = l.hasOwnProperty;

            function d(t) {
                var i = Object.create(null);
                return t && Object.assign(i, t), i
            }

            function m(t, i) {
                return v.call(t, i)
            }

            function p(t, i, n, r, s, o, h, e, u, a, f) {
                return t
            }

            function b(t) {
                return (t.ownerDocument || t).defaultView
            }

            function y(t) {
                try {
                    t.focus()
                } catch (t) {}
            }

            function g(t) {
                var i = Object.getOwnPropertyDescriptor(t, "message");
                if (null != i && i.writable) return t;
                var n = t.message,
                    r = t.stack,
                    s = new Error(n);
                for (var o in t) s[o] = t[o];
                return s.stack = r, s
            }

            function w(t) {
                for (var i, r = null, s = "", o = n(arguments, !0); !(i = o()).done;) {
                    var h = i.value;
                    h instanceof Error && !r ? r = g(h) : (s && (s += " "), s += h)
                }
                return r ? s && (r.message = s + ": " + r.message) : r = new Error(s), r
            }

            function x(t) {
                var i, n;
                null === (i = (n = self).__AMP_REPORT_ERROR) || void 0 === i || i.call(n, t)
            }

            function S(t) {
                var i = w.apply(null, arguments);
                setTimeout((function() {
                    throw x(i), i
                }))
            }

            function k(t) {
                try {
                    for (var i = arguments.length, n = new Array(i > 1 ? i - 1 : 0), r = 1; r < i; r++) n[r - 1] = arguments[r];
                    return t.apply(null, n)
                } catch (t) {
                    S(t)
                }
            }
            l.toString;
            var O, j, A = "i-amphtml-element",
                M = function(t) {
                    return t.unmount()
                };

            function E(t, i, n, r) {
                for (var s, o = c(s = t) ? s : [s], h = 0; h < o.length; h++) D(o[h], i, n, r)
            }

            function D(t, i, n, r) {
                if (i && t.classList.contains(A)) {
                    var s = t;
                    if (k(r, s), !n) {
                        var o = s.getPlaceholder();
                        return void(o && D(o, !0, !1, r))
                    }
                }
                for (var h = t.getElementsByClassName(A), e = null, u = 0; u < h.length; u++) {
                    var a = h[u];
                    if (n) k(r, a);
                    else {
                        e = e || [];
                        for (var f = !1, c = 0; c < e.length; c++)
                            if (e[c].contains(a)) {
                                f = !0;
                                break
                            }
                        f || (e.push(a), k(r, a))
                    }
                }
            }

            function C(t) {
                return function(t, i) {
                    if (p(1 === i.length), p(Array.isArray(i) || m(i, "raw")), self.trustedTypes && self.trustedTypes.createPolicy) {
                        var n = self.trustedTypes.createPolicy("static-template#createNode", {
                            createHTML: function(t) {
                                return i[0]
                            }
                        });
                        t.innerHTML = n.createHTML("ignored")
                    } else t.innerHTML = i[0];
                    var r = t.firstElementChild;
                    return p(r), p(!r.nextElementSibling), t.removeChild(r), r
                }(O, t)
            }
            var R = ["Webkit", "webkit", "Moz", "moz", "ms", "O", "o"],
                z = {
                    "getPropertyPriority": function() {
                        return ""
                    },
                    "getPropertyValue": function() {
                        return ""
                    }
                };

            function I(t) {
                var i = t.replace(/[A-Z]/g, (function(t) {
                    return "-" + t.toLowerCase()
                }));
                return R.some((function(t) {
                    return i.startsWith(t + "-")
                })) ? "-".concat(i) : i
            }

            function P(t, i, n) {
                if (i.startsWith("--")) return i;
                j || (j = d());
                var r = j[i];
                if (!r || n) {
                    if (r = i, void 0 === t[i]) {
                        var s = function(t) {
                                return t.charAt(0).toUpperCase() + t.slice(1)
                            }(i),
                            o = function(t, i) {
                                for (var n = 0; n < R.length; n++) {
                                    var r = R[n] + i;
                                    if (void 0 !== t[r]) return r
                                }
                                return ""
                            }(t, s);
                        void 0 !== t[o] && (r = o)
                    }
                    n || (j[i] = r)
                }
                return r
            }

            function T(t, i) {
                var n = t.style;
                for (var r in i) n.setProperty(I(P(n, r)), String(i[r]), "important")
            }

            function Y(t, i, n, r, s) {
                var o = P(t.style, i, s);
                if (o) {
                    var h = r ? n + r : n;
                    t.style.setProperty(I(o), h)
                }
            }

            function L(t, i) {
                for (var n in i) Y(t, n, i[n])
            }

            function X(t) {
                return "".concat(t, "px")
            }

            function _(t) {
                return "display" in t && function(t) {
                    for (var i = arguments.length, n = new Array(i > 1 ? i - 1 : 0), r = 1; r < i; r++) n[r - 1] = arguments[r];
                    var s = w.apply(null, n);
                    s.name = t || s.name, x(s)
                }("STYLE", "`display` style detected. You must use toggle instead."), t
            }
            var H = /(?:^[#?]?|&)([^=&]+)(?:=([^&]*))?/g;

            function B(t) {
                var i = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : "";
                try {
                    return decodeURIComponent(t)
                } catch (t) {
                    return i
                }
            }

            function U(t) {
                var i = (t || self).location;
                return function(t) {
                    var i, n = d();
                    if (!t) return n;
                    for (; i = H.exec(t);) {
                        var r = B(i[1], i[1]),
                            s = i[2] ? B(i[2].replace(/\+/g, " "), i[2]) : "";
                        n[r] = s
                    }
                    return n
                }(i.originalHash || i.hash)
            }
            var W = "";

            function G(t) {
                var i = t || self;
                return i.__AMP_MODE ? i.__AMP_MODE : i.__AMP_MODE = function(t) {
                    return {
                        localDev: !1,
                        development: V(t, U(t)),
                        esm: !1,
                        test: !1,
                        rtvVersion: N(t),
                        ssrReady: !1
                    }
                }(i)
            }

            function N(t) {
                var i;
                return W || (W = (null === (i = t.AMP_CONFIG) || void 0 === i ? void 0 : i.v) || "01".concat("2305252018001")), W
            }

            function V(t, i) {
                var n = i || U(t);
                return ["1", "actions", "amp", "amp4ads", "amp4email"].includes(n.development) || !!t.AMP_DEV_MODE
            }
            self.__AMP_LOG = self.__AMP_LOG || {
                user: null,
                dev: null,
                userForEmbed: null
            };
            var F = self.__AMP_LOG;

            function Z(t, i) {
                throw new Error("failed to call initLogConstructor")
            }

            function $(t) {
                return F.user || (F.user = q()),
                    function(t, i) {
                        return i && i.ownerDocument.defaultView != t
                    }(F.user.win, t) ? F.userForEmbed || (F.userForEmbed = q()) : F.user
            }

            function q(t) {
                return Z()
            }

            function J() {
                return F.dev || (F.dev = Z())
            }

            function K(t, i, n, r, s, o, h, e, u, a, f) {
                return t
            }

            function Q(t, i) {
                return rt(t = function(t) {
                    return t.__AMP_TOP || (t.__AMP_TOP = t)
                }(t), i)
            }

            function tt(t, i) {
                return rt(nt(it(t)), i)
            }

            function it(t) {
                return t.nodeType ? (i = b(t), Q(i, "ampdoc")).getAmpDoc(t) : t;
                var i
            }

            function nt(t) {
                var i = it(t);
                return i.isSingleDoc() ? i.win : i
            }

            function rt(t, i) {
                K(st(t, i));
                var n = function(t) {
                    var i = t.__AMP_SERVICES;
                    return i || (i = t.__AMP_SERVICES = {}), i
                }(t)[i];
                return n.obj || (K(n.ctor), K(n.context), n.obj = new n.ctor(n.context), K(n.obj), n.context = null, n.resolve && n.resolve(n.obj)), n.obj
            }

            function st(t, i) {
                var n = t.__AMP_SERVICES && t.__AMP_SERVICES[i];
                return !(!n || !n.ctor)
            }
            var ot, ht = function(t) {
                    return tt(t, "owners")
                },
                et = function(t) {
                    return rt(t, "timer")
                },
                ut = function() {
                    function t(t, i) {
                        var n = this,
                            r = t.win;
                        if (this.t = r, this.Mr = i, this.yC = null, this.ds = null, this.gC = -1, this.wC = null, "function" == typeof r.CloseWatcher) try {
                            this.yC = new r.CloseWatcher
                        } catch (t) {
                            J().error("CloseWatcherImpl", "CloseWatcher failed:", t)
                        }
                        this.yC ? this.yC.onclose = function() {
                            i(), n.destroy()
                        } : (this.ds = tt(t, "history"), this.ds.push((function() {
                            return i()
                        })).then((function(t) {
                            n.gC = t
                        })), this.wC = this.xC.bind(this), r.document.documentElement.addEventListener("keydown", this.wC))
                    }
                    var i = t.prototype;
                    return i.signalClosed = function() {
                        this.yC ? this.yC.signalClosed() : this.Mr && ((0, this.Mr)(), this.destroy())
                    }, i.destroy = function() {
                        this.Mr = null, this.yC ? (this.yC.destroy(), this.yC = null) : -1 != this.gC && (K(this.ds).pop(this.gC), this.gC = -1, this.ds = null, this.t.document.documentElement.removeEventListener("keydown", this.wC))
                    }, i.xC = function(t) {
                        "Escape" == t.key && (t.preventDefault(), this.signalClosed())
                    }, t
                }();

            function at(t) {
                if (void 0 !== ot) return ot;
                ot = !1;
                try {
                    var i = {
                        get passive() {
                            return ot = !0, !1
                        }
                    };
                    t.addEventListener("test-options", null, i), t.removeEventListener("test-options", null, i)
                } catch (t) {}
                return ot
            }
            var ft = function() {
                    function t() {
                        this.Tt = null
                    }
                    var i = t.prototype;
                    return i.add = function(t) {
                        var i = this;
                        return this.Tt || (this.Tt = []), this.Tt.push(t),
                            function() {
                                i.remove(t)
                            }
                    }, i.remove = function(t) {
                        var i, n, r;
                        this.Tt && (n = t, -1 != (r = (i = this.Tt).indexOf(n)) && i.splice(r, 1))
                    }, i.removeAll = function() {
                        this.Tt && (this.Tt.length = 0)
                    }, i.fire = function(t) {
                        if (this.Tt)
                            for (var i, r = n(this.Tt.slice(), !0); !(i = r()).done;)(0, i.value)(t)
                    }, i.getHandlerCount = function() {
                        var t, i;
                        return null !== (t = null === (i = this.Tt) || void 0 === i ? void 0 : i.length) && void 0 !== t ? t : 0
                    }, t
                }(),
                ct = function() {
                    function t(t, i, n) {
                        var r = this;
                        this.Ir = et(t), this.Mr = i, this.Sr = n || 0, this.kr = -1, this._r = 0, this.Rr = !1, this.Nr = function() {
                            r.Cr()
                        }
                    }
                    var i = t.prototype;
                    return i.isPending = function() {
                        return -1 != this.kr
                    }, i.schedule = function(t) {
                        var i = t || this.Sr;
                        this.Rr && i < 10 && (i = 10);
                        var n = Date.now() + i;
                        return (!this.isPending() || n - this._r < -10) && (this.cancel(), this._r = n, this.kr = this.Ir.delay(this.Nr, i), !0)
                    }, i.Cr = function() {
                        this.kr = -1, this._r = 0, this.Rr = !0, this.Mr(), this.Rr = !1
                    }, i.cancel = function() {
                        this.isPending() && (this.Ir.cancel(this.kr), this.kr = -1)
                    }, t
                }(),
                lt = "__AMP_Gestures",
                vt = function(t, i, n, r) {
                    this.type = t, this.data = i, this.time = n, this.event = r
                },
                dt = function() {
                    function t(t) {
                        var i = arguments.length > 1 && void 0 !== arguments[1] && arguments[1],
                            n = arguments.length > 2 && void 0 !== arguments[2] && arguments[2];
                        this.zl = t, this.GM = [], this.Lv = [], this.Kt = [], this.BM = [], this.FM = null;
                        var r = t.ownerDocument.defaultView,
                            s = at(r);
                        this.WM = i || s, this.XM = n, this.qM = !1, this.Cr = new ct(b(t), this.ad.bind(this)), this.ZM = new ft, this.$M = Object.create(null), this.KM = this.zp.bind(this), this.JM = this._p.bind(this), this.QM = this.qp.bind(this), this.tI = this.Yv.bind(this), this.zl.addEventListener("touchstart", this.KM, !!s && {
                            passive: !0
                        }), this.zl.addEventListener("touchend", this.JM), this.zl.addEventListener("touchmove", this.QM, !!s && {
                            passive: !0
                        }), this.zl.addEventListener("touchcancel", this.tI), this.iI = !1
                    }
                    t.get = function(i) {
                        var n = arguments.length > 1 && void 0 !== arguments[1] && arguments[1],
                            r = arguments.length > 2 && void 0 !== arguments[2] && arguments[2],
                            s = i[lt];
                        return s || (s = new t(i, n, r), i[lt] = s), s
                    };
                    var i = t.prototype;
                    return i.cleanup = function() {
                        this.zl.removeEventListener("touchstart", this.KM), this.zl.removeEventListener("touchend", this.JM), this.zl.removeEventListener("touchmove", this.QM), this.zl.removeEventListener("touchcancel", this.tI), delete this.zl[lt], this.Cr.cancel()
                    }, i.onGesture = function(t, i) {
                        var n = new t(this),
                            r = n.getType(),
                            s = this.$M[r];
                        return s || (this.GM.push(n), s = new ft, this.$M[r] = s), s.add(i)
                    }, i.removeGesture = function(t) {
                        var i = new t(this).getType(),
                            n = this.$M[i];
                        if (n) {
                            n.removeAll();
                            var r = function(t, n) {
                                for (var r = 0; r < t.length; r++)
                                    if (t[r].getType() == i) return r;
                                return -1
                            }(this.GM);
                            return !(r < 0 || (this.GM.splice(r, 1), this.Kt.splice(r, 1), this.BM.splice(r, 1), this.Lv.splice(r, 1), delete this.$M[i], 0))
                        }
                        return !1
                    }, i.onPointerDown = function(t) {
                        return this.ZM.add(t)
                    }, i.zp = function(t) {
                        var i = Date.now();
                        this.qM = !1, this.ZM.fire(t);
                        for (var n = 0; n < this.GM.length; n++) this.Kt[n] || (this.BM[n] && this.BM[n] < i && this.Jv(n), this.GM[n].onTouchStart(t) && this.Xv(n));
                        this.nI(t)
                    }, i.qp = function(t) {
                        for (var i = Date.now(), n = 0; n < this.GM.length; n++) this.Lv[n] && (this.BM[n] && this.BM[n] < i ? this.Jv(n) : this.GM[n].onTouchMove(t) || this.Jv(n));
                        this.nI(t)
                    }, i._p = function(t) {
                        for (var i = Date.now(), n = 0; n < this.GM.length; n++)
                            if (this.Lv[n])
                                if (this.BM[n] && this.BM[n] < i) this.Jv(n);
                                else {
                                    this.GM[n].onTouchEnd(t);
                                    var r = !this.BM[n],
                                        s = this.BM[n] < i;
                                    this.FM == this.GM[n] || !r && !s || this.Jv(n)
                                }
                        this.nI(t)
                    }, i.Yv = function(t) {
                        for (var i = 0; i < this.GM.length; i++) this.rI(i);
                        this.nI(t)
                    }, i.Op = function(t, i) {
                        if (this.FM) t.acceptCancel();
                        else {
                            for (var n = Date.now(), r = 0; r < this.GM.length; r++) this.GM[r] == t && (this.Kt[r] = n + i, this.BM[r] = 0);
                            this.iI = !0
                        }
                    }, i.oI = function(t, i) {
                        if (this.FM) t.acceptCancel();
                        else
                            for (var n = Date.now(), r = 0; r < this.GM.length; r++) this.GM[r] == t && (this.BM[r] = n + i)
                    }, i.aI = function(t) {
                        this.FM == t && (this.FM = null, this.qM = !0)
                    }, i.sI = function(t, i, n) {
                        p(this.FM == t);
                        var r = this.$M[t.getType()];
                        r && r.fire(new vt(t.getType(), i, Date.now(), n))
                    }, i.nI = function(t) {
                        var i = !!this.FM || this.qM;
                        if (this.qM = !1, !i)
                            for (var n = Date.now(), r = 0; r < this.GM.length; r++)
                                if (this.Kt[r] || this.BM[r] && this.BM[r] >= n) {
                                    i = !0;
                                    break
                                }
                        i ? (t.stopPropagation(), this.WM || t.preventDefault()) : this.XM && t.stopPropagation(), this.iI && (this.iI = !1, this.ad())
                    }, i.ad = function() {
                        for (var t = Date.now(), i = -1, n = 0; n < this.GM.length; n++) this.Kt[n] ? (-1 == i || this.Kt[n] > this.Kt[i]) && (i = n) : this.BM[n] && this.BM[n] < t && this.Jv(n);
                        if (-1 != i) {
                            for (var r = 0, s = 0; s < this.GM.length; s++) !this.Kt[s] && this.Lv[s] && (r = Math.max(r, this.BM[s] - t));
                            r < 2 ? this.eI(i) : this.Cr.schedule(r)
                        }
                    }, i.eI = function(t) {
                        for (var i = this.GM[t], n = 0; n < this.GM.length; n++) n != t && this.rI(n);
                        this.Kt[t] = 0, this.BM[t] = 0, this.FM = i, i.acceptStart()
                    }, i.Xv = function(t) {
                        this.Lv[t] = !0, this.BM[t] = 0
                    }, i.Jv = function(t) {
                        this.Lv[t] = !1, this.BM[t] = 0, this.Kt[t] || this.GM[t].acceptCancel()
                    }, i.rI = function(t) {
                        this.Kt[t] = 0, this.Jv(t)
                    }, t
                }(),
                mt = function() {
                    function t(t, i) {
                        this.uI = t, this._y = i
                    }
                    var i = t.prototype;
                    return i.getType = function() {
                        return this.uI
                    }, i.signalReady = function(t) {
                        this._y.Op(this, t)
                    }, i.signalPending = function(t) {
                        this._y.oI(this, t)
                    }, i.signalEnd = function() {
                        this._y.aI(this)
                    }, i.signalEmit = function(t, i) {
                        this._y.sI(this, t, i)
                    }, i.acceptStart = function() {}, i.acceptCancel = function() {}, i.onTouchStart = function(t) {
                        return !1
                    }, i.onTouchMove = function(t) {
                        return !1
                    }, i.onTouchEnd = function(t) {}, t
                }();

            function pt(t, i, n) {
                i < 1 && (i = 1);
                var r = t / i,
                    s = .5 + Math.min(i / 33.34, .5);
                return r * s + n * (1 - s)
            }
            Math.round(-16.67 / Math.log(.95));
            var bt = function(t) {
                h(n, t);
                var i = f(n);

                function n(t) {
                    return i.call(this, "swipe-xy", t, !0, !0)
                }
                return n
            }(function(t) {
                h(n, t);
                var i = f(n);

                function n(t, n, r, s) {
                    var o;
                    return (o = i.call(this, t, n)).hI = r, o.cI = s, o.FM = !1, o.lI = 0, o.mI = 0, o.fI = 0, o.pI = 0, o.dI = 0, o.vI = 0, o.ih = 0, o.yI = 0, o.gI = 0, o.bI = 0, o.xI = 0, o
                }
                var r = n.prototype;
                return r.onTouchStart = function(t) {
                    var i = t.touches;
                    return !!(this.FM && i && i.length > 1) || !(!i || 1 != i.length) && (this.ih = Date.now(), this.lI = i[0].clientX, this.mI = i[0].clientY, !0)
                }, r.onTouchMove = function(t) {
                    var i = t.touches;
                    if (i && i.length >= 1) {
                        var n = i[0],
                            r = n.clientX,
                            s = n.clientY;
                        if (this.fI = r, this.pI = s, this.FM) this.wI(!1, !1, t);
                        else {
                            var o = Math.abs(r - this.lI),
                                h = Math.abs(s - this.mI);
                            if (this.hI && this.cI)(o >= 8 || h >= 8) && this.signalReady(-10);
                            else if (this.hI) {
                                if (o >= 8 && o > h) this.signalReady(-10);
                                else if (h >= 8) return !1
                            } else {
                                if (!this.cI) return !1;
                                if (h >= 8 && h > o) this.signalReady(-10);
                                else if (o >= 8) return !1
                            }
                        }
                        return !0
                    }
                    return !1
                }, r.onTouchEnd = function(t) {
                    var i = t.touches;
                    i && 0 == i.length && this.kI(t)
                }, r.acceptStart = function() {
                    this.FM = !0, this.dI = this.lI, this.vI = this.mI, this.gI = this.ih, this.lI = this.fI, this.mI = this.pI, this.wI(!0, !1, null)
                }, r.acceptCancel = function() {
                    this.FM = !1
                }, r.wI = function(t, i, n) {
                    this.yI = Date.now();
                    var r = this.yI - this.gI;
                    if (!i && r > 4 || i && r > 16) {
                        var s = pt(this.fI - this.dI, r, this.bI),
                            o = pt(this.pI - this.vI, r, this.xI);
                        (!i || r > 32 || 0 != s || 0 != o) && (this.bI = Math.abs(s) > 1e-4 ? s : 0, this.xI = Math.abs(o) > 1e-4 ? o : 0), this.dI = this.fI, this.vI = this.pI, this.gI = this.yI
                    }
                    this.signalEmit({
                        first: t,
                        last: i,
                        time: this.yI,
                        deltaX: this.fI - this.lI,
                        deltaY: this.pI - this.mI,
                        startX: this.lI,
                        startY: this.mI,
                        lastX: this.fI,
                        lastY: this.pI,
                        velocityX: this.bI,
                        velocityY: this.xI
                    }, n)
                }, r.kI = function(t) {
                    this.FM && (this.FM = !1, this.wI(!1, !0, t), this.signalEnd())
                }, n
            }(mt));

            function yt(t) {
                return t.classList.contains("i-amphtml-fie") || !! function(t, i) {
                    return t.closest ? t.closest(".i-amphtml-fie") : function(t, i, n) {
                        var r;
                        for (r = t; r && void 0 !== r; r = r.parentElement)
                            if (i(r)) return r;
                        return null
                    }(t, (function(t) {
                        return function(t, i) {
                            var n = t.matches || t.webkitMatchesSelector || t.mozMatchesSelector || t.msMatchesSelector || t.oMatchesSelector;
                            return !!n && n.call(t, ".i-amphtml-fie")
                        }(t)
                    }))
                }(t)
            }
            new Set(["c", "v", "a", "ad"]);
            var gt = ['<i-amphtml-ad-close-header role=button tabindex=0 aria-label="Close Ad"><div>Ad</div><i-amphtml-ad-close-button class=amp-ad-close-button></i-amphtml-ad-close-button></i-amphtml-ad-close-header>'],
                wt = "amp-lightbox",
                xt = {
                    "fade-in": {
                        openStyle: {
                            "opacity": 1
                        },
                        closedStyle: {
                            "opacity": 0
                        },
                        durationSeconds: .1
                    },
                    "fly-in-bottom": {
                        openStyle: {
                            "transform": "translate(0, 0)"
                        },
                        closedStyle: {
                            "transform": "translate(0, 100%)"
                        },
                        durationSeconds: .2
                    },
                    "fly-in-top": {
                        openStyle: {
                            "transform": "translate(0, 0)"
                        },
                        closedStyle: {
                            "transform": "translate(0, -100%)"
                        },
                        durationSeconds: .2
                    }
                };

            function St(t) {
                return (n = (i = t).ownerDocument || i, O && O.ownerDocument === n || (O = n.createElement("div")), C)(gt);
                var i, n
            }
            var kt = function(t) {
                h(n, t);
                var i = f(n);

                function n(t) {
                    var n;
                    (n = i.call(this, t)).pr = null, n.rj = null, n.Wc = n.win.document, n.Gr = null, n.SC = null, n.kC = !1, n.OC = null, n.jC = null, n.AC = null, n.MC = null, n.EC = !1, n.DC = 0, n.CC = 0, n.RC = null, n.zC = (t.getAttribute("animate-in") || "fade-in").toLowerCase(), n.IC = null, n.PC = null, n.TC = null;
                    var r = Q(n.win, "platform");
                    return n.YC = r.isIos(), n.LC = function(t, i, n) {
                        var r = 0,
                            s = 0,
                            o = null;

                        function h() {
                            r = 0;
                            var n, e = 500 - (t.Date.now() - s);
                            e > 0 ? r = t.setTimeout(h, e) : (n = o, o = null, i.apply(null, n))
                        }
                        return function() {
                            s = t.Date.now();
                            for (var i = arguments.length, n = new Array(i), e = 0; e < i; e++) n[e] = arguments[e];
                            o = n, r || (r = t.setTimeout(h, 500))
                        }
                    }(n.win, (function() {
                        var t = $().assertElement(n.rj, "E#19457 this.container_"),
                            i = ht(n.element);
                        i.scheduleLayout(n.element, t), i.scheduleResume(n.element, t)
                    })), n
                }
                var o = n.prototype;
                return o.buildCallback = function() {
                    var t, i, n, r = this;
                    this.user().assert(m(xt, this.zC), "Invalid `animate-in` value %s", this.zC), this.element.classList.add("i-amphtml-overlay"), this.Gr = (t = this.element, i = "action", st(n = nt(it(t)), i) ? rt(n, i) : null), this.XC(), this.registerDefaultAction((function(t) {
                        return r._C(t.trust, t.caller)
                    }), "open"), this.registerAction("close", (function(t) {
                        return r.close(t.trust)
                    })), this.Gr.addToAllowlist("AMP-LIGHTBOX", ["open", "close"], ["email"])
                }, o.HC = function() {
                    var t = this;
                    K(this.EC), this.BC().forEach((function(i) {
                        ht(t.element).setOwner(i, t.element)
                    }))
                }, o.BC = function() {
                    return (t = this.element.getElementsByClassName("i-amphtml-element")) ? Array.prototype.slice.call(t) : [];
                    var t
                }, o.Qn = function() {
                    var t = this;
                    if (!this.rj) {
                        var i = this.element;
                        this.EC = i.hasAttribute("scrollable");
                        var n = function(t) {
                            return function(t, i) {
                                for (var n = [], r = t.firstElementChild; r; r = r.nextElementSibling) void 0, h = void 0, e = void 0, "string" == typeof(o = s = r) ? h = o : 1 == (null == (e = o) ? void 0 : e.nodeType) && (h = o.tagName), !(h && h.toLowerCase().startsWith("i-") || s.nodeType === Node.ELEMENT_NODE && (s.hasAttribute("placeholder") || s.hasAttribute("fallback") || s.hasAttribute("overflow"))) && n.push(r);
                                var s, o, h, e;
                                return n
                            }(t)
                        }(this.element);
                        this.rj = i.ownerDocument.createElement("div"), this.EC || function(t, i) {
                            t.classList.add("i-amphtml-fill-content")
                        }(this.rj), i.appendChild(this.rj), n.forEach((function(i) {
                            t.rj.appendChild(i)
                        })), this.EC && (this.HC(), i.classList.add("i-amphtml-scrollable"), i.addEventListener("amp:dom-update", (function() {
                            t.HC(), t.UC(t.DC)
                        })), i.addEventListener("scroll", this.Hl.bind(this))), this.EC || dt.get(i).onGesture(bt, (function() {})), this.WC()
                    }
                }, o.layoutCallback = function() {
                    return r || (r = Promise.resolve(void 0))
                }, o._C = function(t, i) {
                    var n = this;
                    if (!this.kC) {
                        this.Qn(), this.jC = this.GC.bind(this), this.Wc.documentElement.addEventListener("focusin", this.jC), i && (this.MC = i);
                        var r = new s,
                            o = r.promise,
                            h = r.resolve;
                        return this.getViewport().enterLightboxMode(this.element, o).then((function() {
                            return n.NC(h, t)
                        }))
                    }
                }, o.mutatedAttributesCallback = function(t) {
                    var i = t.open;
                    void 0 !== i && (i ? this._C(2, document.activeElement) : this.close(2))
                }, o.VC = function() {
                    var t = this.rj.querySelector("[autofocus]");
                    t && y(t)
                }, o.NC = function(t, i) {
                    var n = this,
                        r = this.element,
                        s = this.FC(),
                        o = s.closedStyle,
                        h = s.durationSeconds,
                        e = s.openStyle,
                        u = Object.keys(e).map((function(t) {
                            return "".concat(t, " ").concat(h, "s ease-in")
                        })).join(",");
                    this.CC++, this.EC && Y(r, "webkitOverflowScrolling", "touch"), Y(r, "transition", u), L(r, _(o)),
                        function(t, i) {
                            void 0 === i && (i = t.hasAttribute("hidden")), i ? t.removeAttribute("hidden") : t.setAttribute("hidden", "")
                        }(r, !0), this.mutateElement((function() {
                            r.scrollTop = 0
                        })), this.VC(), this.mutateElement((function() {
                            L(r, _(e))
                        }));
                    var a = this.rj;
                    this.EC && (this.Hl(), this.UC(this.DC));
                    var f = function() {
                        n.LC(), t()
                    };
                    r.addEventListener("transitionend", f), r.addEventListener("animationend", f), this.setAsContainer();
                    var c = ht(this.element);
                    c.scheduleLayout(this.element, a), c.scheduleResume(this.element, a), this.fD("lightboxOpen", i), this.SC = new ut(this.getAmpDoc(), (function() {
                        return n.close(3)
                    })), this.ZC(), this.$C(), this.qC(), this.kC = !0
                }, o.WC = function() {
                    var t = this.element;
                    null != t.getAttribute("close-button") && (this.IC = St(t), t.insertBefore(this.IC, this.rj))
                }, o.ZC = function() {
                    var t, i = this;
                    this.IC && (this.OC = this.JC.bind(this), this.IC.addEventListener("keydown", this.OC), this.measureMutateElement((function() {
                        t = i.IC.getBoundingClientRect().height
                    }), (function() {
                        i.KC(), T(i.rj, {
                            "margin-top": X(t),
                            "min-height": "calc(100vh - ".concat(X(t), ")")
                        })
                    })))
                }, o.KC = function() {
                    this.IC.classList.add("amp-ad-close-header")
                }, o.qC = function() {
                    (this.TC || this.IC) && (this.AC = this.QC.bind(this), this.PC.addEventListener("click", this.AC))
                }, o.tY = function() {
                    (this.TC || this.IC) && (this.PC.removeEventListener("click", this.AC), this.AC = null, this.IC && (this.IC.removeEventListener("keydown", this.OC), this.OC = null))
                }, o.FC = function() {
                    return xt[this.zC]
                }, o.QC = function() {
                    this.close(3)
                }, o.JC = function(t) {
                    "Enter" == t.key && (t.preventDefault(), this.close(3))
                }, o.close = function(t) {
                    var i = this;
                    this.kC && (this.EC && Y(this.element, "webkitOverflowScrolling", ""), this.getViewport().leaveLightboxMode(this.element).then((function() {
                        return i.iY(t)
                    })))
                }, o.iY = function(t) {
                    var i = this,
                        n = this.element,
                        r = ++this.CC,
                        s = function() {
                            r == i.CC && (i.collapse(), i.LC())
                        };
                    this.nY() ? (function(t, i) {
                            for (var n = 0; n < i.length; n++) Y(t, i[n], null)
                        }(n, ["transition"]), s()) : (n.addEventListener("transitionend", s), n.addEventListener("animationend", s)), L(n, _(this.FC().closedStyle)), this.SC && (this.SC.destroy(), this.SC = null), this.Wc.documentElement.removeEventListener("focusin", this.jC), this.jC = null, this.tY(), this.removeAsContainer(),
                        function(t) {
                            E(t, !(arguments.length > 1 && void 0 !== arguments[1]) || arguments[1], !0, M)
                        }(this.element, !1), ht(this.element).schedulePause(this.element, this.rj), this.kC = !1, this.fD("lightboxClose", t), this.MC && y(this.MC)
                }, o.nY = function() {
                    return "inabox" == G(this.win).runtime || yt(this.element)
                }, o.rY = function() {
                    return !!this.element.contains(document.activeElement)
                }, o.GC = function() {
                    this.rY() || this.close(3)
                }, o.$C = function() {
                    this.rY() || (this.PC = this.sY(), this.PC || (this.TC = this.oY(), this.element.insertBefore(this.TC, this.element.firstChild), this.PC = this.TC), y(this.PC))
                }, o.sY = function() {
                    if (this.PC) return this.PC;
                    if (this.IC) return this.IC;
                    for (var t = this.element, i = t.querySelectorAll("[on]"), n = 0; n < i.length; n++) {
                        var r = i[n];
                        if (this.Gr.hasResolvableActionForTarget(r, "tap", t, K(r.parentElement))) return r
                    }
                }, o.oY = function() {
                    var t = this.element.getAttribute("data-close-button-aria-label") || "Close the modal",
                        i = this.Wc.createElement("button");
                    return i.textContent = t, i.classList.add("i-amphtml-screen-reader"), i.tabIndex = -1, i
                }, o.Hl = function() {
                    var t = this.element.scrollTop;
                    this.YC && (0 == t ? this.element.scrollTop = 1 : this.element.scrollHeight == t + this.element.offsetHeight && (this.element.scrollTop = t - 1)), this.DC = t, null === this.RC && this.hY(t)
                }, o.hY = function(t) {
                    var i = this;
                    this.RC = et(this.win).delay((function() {
                        Math.abs(t - i.DC) < 30 ? (J().fine(wt, "slow scrolling: %s - %s", t, i.DC), i.RC = null, i.Jf(i.DC)) : (J().fine(wt, "fast scrolling: %s - %s", t, i.DC), i.hY(i.DC))
                    }), 100)
                }, o.Jf = function(t) {
                    J().fine(wt, "update_"), this.UC(t), this.DC = t
                }, o.UC = function(t) {
                    var i = this,
                        n = [];
                    this.eY(t, (function(t) {
                        n.push(t), ht(i.element).scheduleLayout(i.element, t)
                    }))
                }, o.eY = function(t, i) {
                    for (var n = this.uY().height, r = this.BC(), s = 0; s < r.length; s++) {
                        for (var o = r[s], h = 0, e = o; e && this.element.contains(e); e = e.offsetParent) h += e.offsetTop;
                        var u = 2 * n;
                        h + o.offsetHeight >= t - u && h <= t + u && i(o)
                    }
                }, o.uY = function() {
                    return this.pr || (this.pr = {
                        width: this.element.clientWidth,
                        height: this.element.clientHeight
                    }), this.pr
                }, o.XC = function() {
                    var t = this.element,
                        i = this.win;
                    yt(t) && Ot(i, i.document.body)
                }, o.fD = function(t, i) {
                    var n = function(t, i, n, r) {
                        var s = {
                            detail: n
                        };
                        if (Object.assign(s, void 0), "function" == typeof t.CustomEvent) return new t.CustomEvent(i, s);
                        var o = t.document.createEvent("CustomEvent");
                        return o.initCustomEvent(i, !!s.bubbles, !!s.cancelable, n), o
                    }(this.win, "".concat(wt, ".").concat(t), {});
                    this.Gr.trigger(this.element, t, n, i)
                }, n
            }(t.BaseElement);

            function Ot(t, i) {
                var n, r = {},
                    s = function(t) {
                        return Q(t, "ampdoc")
                    }(t).getAmpDoc(i);
                (n = s, tt(n, "mutator")).measureMutateElement(i, (function() {
                    r.alreadyTransparent = "rgba(0, 0, 0, 0)" == function(t, i) {
                        return t.getComputedStyle(i) || z
                    }(t, i)["background-color"]
                }), (function() {
                    r.alreadyTransparent || $().warn(wt, "The background of the <body> element has been forced to transparent. If you need to set background, use an intermediate container."), T(i, {
                        background: "transparent"
                    })
                }))
            }
            "inabox" == G().runtime && Ot(window, K(document.body)), t.registerElement(wt, kt, 'amp-lightbox{display:none;position:fixed!important;z-index:1000;top:0!important;left:0!important;bottom:0!important;right:0!important}amp-lightbox[scrollable]{overflow-y:auto!important;overflow-x:hidden!important}amp-lightbox i-amphtml-ad-close-header{height:60px!important;display:block!important;visibility:visible!important;opacity:0;position:fixed!important;top:0!important;left:0!important;right:0!important;z-index:1000!important;display:-ms-flexbox!important;display:flex!important;-ms-flex-align:center!important;align-items:center!important;-ms-flex-pack:right!important;justify-content:right!important;transition:opacity 0.1s ease-in}[animate-in=fly-in-bottom]>i-amphtml-ad-close-header,[animate-in=fly-in-top]>i-amphtml-ad-close-header{transition-delay:0.2s}amp-lightbox .amp-ad-close-header{opacity:1!important;box-sizing:border-box;padding:5px;line-height:40px;background-color:#000;color:#fff;font-family:Helvetica,sans-serif;font-size:12px;cursor:pointer}amp-lightbox .amp-ad-close-header>:first-child{margin-left:auto!important;pointer-events:none!important}amp-lightbox .amp-ad-close-button{display:block!important;background:url(\'data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="%23fff"><path d="M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"/><path d="M0 0h24v24H0z" fill="none"/></svg>\') no-repeat;background-position:50%;width:40px;height:40px;pointer-events:none!important;border-radius:40px;margin-left:5px}amp-lightbox .amp-ad-close-header:active>.amp-ad-close-button{background-color:hsla(0,0%,100%,0.3)}\n/*# sourceURL=/extensions/amp-lightbox/0.1/amp-lightbox.css*/')
        }();
        /*! https://mths.be/cssescape v1.5.1 by @mathias | MIT license */
    }
});
//# sourceMappingURL=amp-lightbox-0.1.js.map