;
! function() {
    try {
        var e = "undefined" != typeof globalThis ? globalThis : "undefined" != typeof global ? global : "undefined" != typeof window ? window : "undefined" != typeof self ? self : {},
            n = (new e.Error).stack;
        n && ((e._debugIds || (e._debugIds = {}))[n] = "400a4019-da5a-386a-1791-e2ef41bb7b9f")
    } catch (e) {}
}();
(globalThis.TURBOPACK || (globalThis.TURBOPACK = [])).push(["object" == typeof document ? document.currentScript : void 0, 467022, (t, e, n) => {
    e.exports = function() {
        "use strict";
        var t = ["0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "a", "b", "c", "d", "e", "f"];

        function e(t, e) {
            var n = t[0],
                r = t[1],
                i = t[2],
                o = t[3];
            n += (r & i | ~r & o) + e[0] - 0x28955b88 | 0, o += ((n = (n << 7 | n >>> 25) + r | 0) & r | ~n & i) + e[1] - 0x173848aa | 0, i += ((o = (o << 12 | o >>> 20) + n | 0) & n | ~o & r) + e[2] + 0x242070db | 0, r += ((i = (i << 17 | i >>> 15) + o | 0) & o | ~i & n) + e[3] - 0x3e423112 | 0, n += ((r = (r << 22 | r >>> 10) + i | 0) & i | ~r & o) + e[4] - 0xa83f051 | 0, o += ((n = (n << 7 | n >>> 25) + r | 0) & r | ~n & i) + e[5] + 0x4787c62a | 0, i += ((o = (o << 12 | o >>> 20) + n | 0) & n | ~o & r) + e[6] - 0x57cfb9ed | 0, r += ((i = (i << 17 | i >>> 15) + o | 0) & o | ~i & n) + e[7] - 0x2b96aff | 0, n += ((r = (r << 22 | r >>> 10) + i | 0) & i | ~r & o) + e[8] + 0x698098d8 | 0, o += ((n = (n << 7 | n >>> 25) + r | 0) & r | ~n & i) + e[9] - 0x74bb0851 | 0, i += ((o = (o << 12 | o >>> 20) + n | 0) & n | ~o & r) + e[10] - 42063 | 0, r += ((i = (i << 17 | i >>> 15) + o | 0) & o | ~i & n) + e[11] - 0x76a32842 | 0, n += ((r = (r << 22 | r >>> 10) + i | 0) & i | ~r & o) + e[12] + 0x6b901122 | 0, o += ((n = (n << 7 | n >>> 25) + r | 0) & r | ~n & i) + e[13] - 0x2678e6d | 0, i += ((o = (o << 12 | o >>> 20) + n | 0) & n | ~o & r) + e[14] - 0x5986bc72 | 0, r += ((i = (i << 17 | i >>> 15) + o | 0) & o | ~i & n) + e[15] + 0x49b40821 | 0, n += ((r = (r << 22 | r >>> 10) + i | 0) & o | i & ~o) + e[1] - 0x9e1da9e | 0, o += ((n = (n << 5 | n >>> 27) + r | 0) & i | r & ~i) + e[6] - 0x3fbf4cc0 | 0, i += ((o = (o << 9 | o >>> 23) + n | 0) & r | n & ~r) + e[11] + 0x265e5a51 | 0, r += ((i = (i << 14 | i >>> 18) + o | 0) & n | o & ~n) + e[0] - 0x16493856 | 0, n += ((r = (r << 20 | r >>> 12) + i | 0) & o | i & ~o) + e[5] - 0x29d0efa3 | 0, o += ((n = (n << 5 | n >>> 27) + r | 0) & i | r & ~i) + e[10] + 0x2441453 | 0, i += ((o = (o << 9 | o >>> 23) + n | 0) & r | n & ~r) + e[15] - 0x275e197f | 0, r += ((i = (i << 14 | i >>> 18) + o | 0) & n | o & ~n) + e[4] - 0x182c0438 | 0, n += ((r = (r << 20 | r >>> 12) + i | 0) & o | i & ~o) + e[9] + 0x21e1cde6 | 0, o += ((n = (n << 5 | n >>> 27) + r | 0) & i | r & ~i) + e[14] - 0x3cc8f82a | 0, i += ((o = (o << 9 | o >>> 23) + n | 0) & r | n & ~r) + e[3] - 0xb2af279 | 0, r += ((i = (i << 14 | i >>> 18) + o | 0) & n | o & ~n) + e[8] + 0x455a14ed | 0, n += ((r = (r << 20 | r >>> 12) + i | 0) & o | i & ~o) + e[13] - 0x561c16fb | 0, o += ((n = (n << 5 | n >>> 27) + r | 0) & i | r & ~i) + e[2] - 0x3105c08 | 0, i += ((o = (o << 9 | o >>> 23) + n | 0) & r | n & ~r) + e[7] + 0x676f02d9 | 0, r += ((i = (i << 14 | i >>> 18) + o | 0) & n | o & ~n) + e[12] - 0x72d5b376 | 0, n += ((r = (r << 20 | r >>> 12) + i | 0) ^ i ^ o) + e[5] - 378558 | 0, o += ((n = (n << 4 | n >>> 28) + r | 0) ^ r ^ i) + e[8] - 0x788e097f | 0, i += ((o = (o << 11 | o >>> 21) + n | 0) ^ n ^ r) + e[11] + 0x6d9d6122 | 0, r += ((i = (i << 16 | i >>> 16) + o | 0) ^ o ^ n) + e[14] - 0x21ac7f4 | 0, n += ((r = (r << 23 | r >>> 9) + i | 0) ^ i ^ o) + e[1] - 0x5b4115bc | 0, o += ((n = (n << 4 | n >>> 28) + r | 0) ^ r ^ i) + e[4] + 0x4bdecfa9 | 0, i += ((o = (o << 11 | o >>> 21) + n | 0) ^ n ^ r) + e[7] - 0x944b4a0 | 0, r += ((i = (i << 16 | i >>> 16) + o | 0) ^ o ^ n) + e[10] - 0x41404390 | 0, n += ((r = (r << 23 | r >>> 9) + i | 0) ^ i ^ o) + e[13] + 0x289b7ec6 | 0, o += ((n = (n << 4 | n >>> 28) + r | 0) ^ r ^ i) + e[0] - 0x155ed806 | 0, i += ((o = (o << 11 | o >>> 21) + n | 0) ^ n ^ r) + e[3] - 0x2b10cf7b | 0, r += ((i = (i << 16 | i >>> 16) + o | 0) ^ o ^ n) + e[6] + 0x4881d05 | 0, n += ((r = (r << 23 | r >>> 9) + i | 0) ^ i ^ o) + e[9] - 0x262b2fc7 | 0, o += ((n = (n << 4 | n >>> 28) + r | 0) ^ r ^ i) + e[12] - 0x1924661b | 0, i += ((o = (o << 11 | o >>> 21) + n | 0) ^ n ^ r) + e[15] + 0x1fa27cf8 | 0, r += ((i = (i << 16 | i >>> 16) + o | 0) ^ o ^ n) + e[2] - 0x3b53a99b | 0, r = (r << 23 | r >>> 9) + i | 0, n += (i ^ (r | ~o)) + e[0] - 0xbd6ddbc | 0, n = (n << 6 | n >>> 26) + r | 0, o += (r ^ (n | ~i)) + e[7] + 0x432aff97 | 0, o = (o << 10 | o >>> 22) + n | 0, i += (n ^ (o | ~r)) + e[14] - 0x546bdc59 | 0, i = (i << 15 | i >>> 17) + o | 0, r += (o ^ (i | ~n)) + e[5] - 0x36c5fc7 | 0, r = (r << 21 | r >>> 11) + i | 0, n += (i ^ (r | ~o)) + e[12] + 0x655b59c3 | 0, n = (n << 6 | n >>> 26) + r | 0, o += (r ^ (n | ~i)) + e[3] - 0x70f3336e | 0, o = (o << 10 | o >>> 22) + n | 0, i += (n ^ (o | ~r)) + e[10] - 1051523 | 0, i = (i << 15 | i >>> 17) + o | 0, r += (o ^ (i | ~n)) + e[1] - 0x7a7ba22f | 0, r = (r << 21 | r >>> 11) + i | 0, n += (i ^ (r | ~o)) + e[8] + 0x6fa87e4f | 0, n = (n << 6 | n >>> 26) + r | 0, o += (r ^ (n | ~i)) + e[15] - 0x1d31920 | 0, o = (o << 10 | o >>> 22) + n | 0, i += (n ^ (o | ~r)) + e[6] - 0x5cfebcec | 0, i = (i << 15 | i >>> 17) + o | 0, r += (o ^ (i | ~n)) + e[13] + 0x4e0811a1 | 0, r = (r << 21 | r >>> 11) + i | 0, n += (i ^ (r | ~o)) + e[4] - 0x8ac817e | 0, n = (n << 6 | n >>> 26) + r | 0, o += (r ^ (n | ~i)) + e[11] - 0x42c50dcb | 0, o = (o << 10 | o >>> 22) + n | 0, i += (n ^ (o | ~r)) + e[2] + 0x2ad7d2bb | 0, i = (i << 15 | i >>> 17) + o | 0, r += (o ^ (i | ~n)) + e[9] - 0x14792c6f | 0, r = (r << 21 | r >>> 11) + i | 0, t[0] = n + t[0] | 0, t[1] = r + t[1] | 0, t[2] = i + t[2] | 0, t[3] = o + t[3] | 0
        }

        function n(t) {
            var e, n = [];
            for (e = 0; e < 64; e += 4) n[e >> 2] = t.charCodeAt(e) + (t.charCodeAt(e + 1) << 8) + (t.charCodeAt(e + 2) << 16) + (t.charCodeAt(e + 3) << 24);
            return n
        }

        function r(t) {
            var e, n = [];
            for (e = 0; e < 64; e += 4) n[e >> 2] = t[e] + (t[e + 1] << 8) + (t[e + 2] << 16) + (t[e + 3] << 24);
            return n
        }

        function i(t) {
            var r, i, o, a, s, u, c = t.length,
                l = [0x67452301, -0x10325477, -0x67452302, 0x10325476];
            for (r = 64; r <= c; r += 64) e(l, n(t.substring(r - 64, r)));
            for (i = (t = t.substring(r - 64)).length, o = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], r = 0; r < i; r += 1) o[r >> 2] |= t.charCodeAt(r) << (r % 4 << 3);
            if (o[r >> 2] |= 128 << (r % 4 << 3), r > 55)
                for (e(l, o), r = 0; r < 16; r += 1) o[r] = 0;
            return s = parseInt((a = (a = 8 * c).toString(16).match(/(.*?)(.{0,8})$/))[2], 16), u = parseInt(a[1], 16) || 0, o[14] = s, o[15] = u, e(l, o), l
        }

        function o(e) {
            var n;
            for (n = 0; n < e.length; n += 1) e[n] = function(e) {
                var n, r = "";
                for (n = 0; n < 4; n += 1) r += t[e >> 8 * n + 4 & 15] + t[e >> 8 * n & 15];
                return r
            }(e[n]);
            return e.join("")
        }

        function a(t) {
            return /[\u0080-\uFFFF]/.test(t) && (t = unescape(encodeURIComponent(t))), t
        }

        function s(t) {
            var e, n = [],
                r = t.length;
            for (e = 0; e < r - 1; e += 2) n.push(parseInt(t.substr(e, 2), 16));
            return String.fromCharCode.apply(String, n)
        }

        function u() {
            this.reset()
        }
        return o(i("hello")), "u" > typeof ArrayBuffer && !ArrayBuffer.prototype.slice && function() {
            function t(t, e) {
                return (t = 0 | t || 0) < 0 ? Math.max(t + e, 0) : Math.min(t, e)
            }
            ArrayBuffer.prototype.slice = function(e, n) {
                var r, i, o, a, s = this.byteLength,
                    u = t(e, s),
                    c = s;
                return (void 0 !== n && (c = t(n, s)), u > c) ? new ArrayBuffer(0) : (o = new Uint8Array(i = new ArrayBuffer(r = c - u)), a = new Uint8Array(this, u, r), o.set(a), i)
            }
        }(), u.prototype.append = function(t) {
            return this.appendBinary(a(t)), this
        }, u.prototype.appendBinary = function(t) {
            this._buff += t, this._length += t.length;
            var r, i = this._buff.length;
            for (r = 64; r <= i; r += 64) e(this._hash, n(this._buff.substring(r - 64, r)));
            return this._buff = this._buff.substring(r - 64), this
        }, u.prototype.end = function(t) {
            var e, n, r = this._buff,
                i = r.length,
                a = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
            for (e = 0; e < i; e += 1) a[e >> 2] |= r.charCodeAt(e) << (e % 4 << 3);
            return this._finish(a, i), n = o(this._hash), t && (n = s(n)), this.reset(), n
        }, u.prototype.reset = function() {
            return this._buff = "", this._length = 0, this._hash = [0x67452301, -0x10325477, -0x67452302, 0x10325476], this
        }, u.prototype.getState = function() {
            return {
                buff: this._buff,
                length: this._length,
                hash: this._hash.slice()
            }
        }, u.prototype.setState = function(t) {
            return this._buff = t.buff, this._length = t.length, this._hash = t.hash, this
        }, u.prototype.destroy = function() {
            delete this._hash, delete this._buff, delete this._length
        }, u.prototype._finish = function(t, n) {
            var r, i, o, a = n;
            if (t[a >> 2] |= 128 << (a % 4 << 3), a > 55)
                for (e(this._hash, t), a = 0; a < 16; a += 1) t[a] = 0;
            i = parseInt((r = (r = 8 * this._length).toString(16).match(/(.*?)(.{0,8})$/))[2], 16), o = parseInt(r[1], 16) || 0, t[14] = i, t[15] = o, e(this._hash, t)
        }, u.hash = function(t, e) {
            return u.hashBinary(a(t), e)
        }, u.hashBinary = function(t, e) {
            var n = o(i(t));
            return e ? s(n) : n
        }, u.ArrayBuffer = function() {
            this.reset()
        }, u.ArrayBuffer.prototype.append = function(t) {
            var n, i, o, a = (n = this._buff.buffer, (i = new Uint8Array(n.byteLength + t.byteLength)).set(new Uint8Array(n)), i.set(new Uint8Array(t), n.byteLength), i),
                s = a.length;
            for (this._length += t.byteLength, o = 64; o <= s; o += 64) e(this._hash, r(a.subarray(o - 64, o)));
            return this._buff = new Uint8Array(o - 64 < s ? a.buffer.slice(o - 64) : 0), this
        }, u.ArrayBuffer.prototype.end = function(t) {
            var e, n, r = this._buff,
                i = r.length,
                a = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
            for (e = 0; e < i; e += 1) a[e >> 2] |= r[e] << (e % 4 << 3);
            return this._finish(a, i), n = o(this._hash), t && (n = s(n)), this.reset(), n
        }, u.ArrayBuffer.prototype.reset = function() {
            return this._buff = new Uint8Array(0), this._length = 0, this._hash = [0x67452301, -0x10325477, -0x67452302, 0x10325476], this
        }, u.ArrayBuffer.prototype.getState = function() {
            var t, e = u.prototype.getState.call(this);
            return t = e.buff, e.buff = String.fromCharCode.apply(null, new Uint8Array(t)), e
        }, u.ArrayBuffer.prototype.setState = function(t) {
            return t.buff = function(t, e) {
                var n, r = t.length,
                    i = new ArrayBuffer(r),
                    o = new Uint8Array(i);
                for (n = 0; n < r; n += 1) o[n] = t.charCodeAt(n);
                return e ? o : i
            }(t.buff, !0), u.prototype.setState.call(this, t)
        }, u.ArrayBuffer.prototype.destroy = u.prototype.destroy, u.ArrayBuffer.prototype._finish = u.prototype._finish, u.ArrayBuffer.hash = function(t, n) {
            var i = o(function(t) {
                var n, i, o, a, s, u, c = t.length,
                    l = [0x67452301, -0x10325477, -0x67452302, 0x10325476];
                for (n = 64; n <= c; n += 64) e(l, r(t.subarray(n - 64, n)));
                for (i = (t = n - 64 < c ? t.subarray(n - 64) : new Uint8Array(0)).length, o = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], n = 0; n < i; n += 1) o[n >> 2] |= t[n] << (n % 4 << 3);
                if (o[n >> 2] |= 128 << (n % 4 << 3), n > 55)
                    for (e(l, o), n = 0; n < 16; n += 1) o[n] = 0;
                return s = parseInt((a = (a = 8 * c).toString(16).match(/(.*?)(.{0,8})$/))[2], 16), u = parseInt(a[1], 16) || 0, o[14] = s, o[15] = u, e(l, o), l
            }(new Uint8Array(t)));
            return n ? s(i) : i
        }, u
    }()
}, 606926, t => {
    "use strict";
    t.s([], 216781), t.i(216781);
    var e, n = t.i(274466);

    function r(t) {
        return "string" == typeof t
    }

    function i(t) {
        return "number" == typeof t
    }

    function o(t) {
        return "function" == typeof t
    }

    function a(t) {
        return "object" === Object.prototype.toString.call(t).slice(8, -1).toLowerCase()
    }
    var s = function(t) {
        function e(e, n) {
            var r = t.call(this, n) || this;
            return r.field = e, r
        }
        return (0, n.__extends)(e, t), e
    }(Error);

    function u(t) {
        var e, n, i, o, u = t && t.event && t.event.type,
            c = t.event;
        if (void 0 === c) throw new s("event", "Event is missing");
        if (!r(u) || "track" === u && !r(c.event)) throw new s("event", "Event is not a string");
        var l = null != (o = c.properties) ? o : c.traits;
        if ("alias" !== u && !a(l)) throw new s("properties", "properties is not an object");
        if (!r(null != (i = null != (n = null != (e = c.userId) ? e : c.anonymousId) ? n : c.groupId) ? i : c.previousId)) throw new s("userId", "Missing userId or anonymousId");
        return t
    }
    var c = {
        name: "Event Validation",
        type: "before",
        version: "1.0.0",
        isLoaded: function() {
            return !0
        },
        load: function() {
            return Promise.resolve()
        },
        track: u,
        identify: u,
        page: u,
        alias: u,
        group: u,
        screen: u
    };

    function l(t, e, n, i) {
        var s, u = [t, e, n, i],
            c = a(t) ? t.event : t;
        if (!c || !r(c)) throw Error("Event missing");
        var l = a(t) ? null != (s = t.properties) ? s : {} : a(e) ? e : {},
            h = {};
        return o(n) || (h = null != n ? n : {}), a(t) && !o(e) && (h = null != e ? e : {}), [c, l, h, u.find(o)]
    }

    function h(t, e, n, i, s) {
        var u, c, l = null,
            h = null,
            f = [t, e, n, i, s],
            d = f.filter(r);
        void 0 !== d[0] && void 0 !== d[1] && (l = d[0], h = d[1]), 1 === d.length && (l = null, h = d[0]);
        var p = f.find(o),
            v = f.filter(function(t) {
                return null === h ? a(t) : a(t) || null === t
            }),
            g = null != (u = v[0]) ? u : {},
            _ = null != (c = v[1]) ? c : {};
        return [l, h, g, _, p]
    }
    var f = function(t) {
        return function() {
            for (var e, n, s, u, c, l = [], h = 0; h < arguments.length; h++) l[h] = arguments[h];
            var f = null;
            f = null != (s = null != (e = l.find(r)) ? e : null == (n = l.find(i)) ? void 0 : n.toString()) ? s : t.id();
            var d = l.filter(function(t) {
                    return null === f ? a(t) : a(t) || null === t
                }),
                p = null != (u = d[0]) ? u : {},
                v = null != (c = d[1]) ? c : {},
                g = l.find(o);
            return [f, p, v, g]
        }
    };

    function d(t, e, n, s) {
        i(t) && (t = t.toString()), i(e) && (e = e.toString());
        var u = [t, e, n, s],
            c = u.filter(r),
            l = c[0],
            h = void 0 === l ? t : l,
            f = c[1],
            d = u.filter(a)[0];
        return [h, void 0 === f ? null : f, void 0 === d ? {} : d, u.find(o)]
    }
    var p = t.i(692143),
        v = t.i(811471),
        g = t.i(599093),
        _ = t.i(234030),
        y = t.i(550907),
        m = t.i(58022),
        b = t.i(467022),
        w = function() {
            function t(t) {
                this.user = t
            }
            return t.prototype.track = function(t, e, r, i) {
                return this.normalize((0, n.__assign)((0, n.__assign)({}, this.baseEvent()), {
                    event: t,
                    type: "track",
                    properties: e,
                    options: (0, n.__assign)({}, r),
                    integrations: (0, n.__assign)({}, i)
                }))
            }, t.prototype.page = function(t, e, r, i, o) {
                var a, s = {
                    type: "page",
                    properties: (0, n.__assign)({}, r),
                    options: (0, n.__assign)({}, i),
                    integrations: (0, n.__assign)({}, o)
                };
                return null !== t && (s.category = t, s.properties = null != (a = s.properties) ? a : {}, s.properties.category = t), null !== e && (s.name = e), this.normalize((0, n.__assign)((0, n.__assign)({}, this.baseEvent()), s))
            }, t.prototype.screen = function(t, e, r, i, o) {
                var a = {
                    type: "screen",
                    properties: (0, n.__assign)({}, r),
                    options: (0, n.__assign)({}, i),
                    integrations: (0, n.__assign)({}, o)
                };
                return null !== t && (a.category = t), null !== e && (a.name = e), this.normalize((0, n.__assign)((0, n.__assign)({}, this.baseEvent()), a))
            }, t.prototype.identify = function(t, e, r, i) {
                return this.normalize((0, n.__assign)((0, n.__assign)({}, this.baseEvent()), {
                    type: "identify",
                    userId: t,
                    traits: e,
                    options: (0, n.__assign)({}, r),
                    integrations: (0, n.__assign)({}, i)
                }))
            }, t.prototype.group = function(t, e, r, i) {
                return this.normalize((0, n.__assign)((0, n.__assign)({}, this.baseEvent()), {
                    type: "group",
                    traits: e,
                    options: (0, n.__assign)({}, r),
                    integrations: (0, n.__assign)({}, i),
                    groupId: t
                }))
            }, t.prototype.alias = function(t, e, r, i) {
                var o = {
                    userId: t,
                    type: "alias",
                    options: (0, n.__assign)({}, r),
                    integrations: (0, n.__assign)({}, i)
                };
                return (null !== e && (o.previousId = e), void 0 === t) ? this.normalize((0, n.__assign)((0, n.__assign)({}, o), this.baseEvent())) : this.normalize((0, n.__assign)((0, n.__assign)({}, this.baseEvent()), o))
            }, t.prototype.baseEvent = function() {
                var t = {
                        integrations: {},
                        options: {}
                    },
                    e = this.user;
                return e.id() && (t.userId = e.id()), e.anonymousId() && (t.anonymousId = e.anonymousId()), t
            }, t.prototype.context = function(t) {
                var e, n, r, i = ["integrations", "anonymousId", "timestamp", "userId"],
                    o = null != (e = t.options) ? e : {};
                delete o.integrations;
                var a = Object.keys(o),
                    s = null != (r = null == (n = t.options) ? void 0 : n.context) ? r : {},
                    u = {};
                return a.forEach(function(t) {
                    "context" !== t && (i.includes(t) ? (0, m.dset)(u, t, o[t]) : (0, m.dset)(s, t, o[t]))
                }), [s, u]
            }, t.prototype.normalize = function(t) {
                (null == (e = t.options) ? void 0 : e.anonymousId) && this.user.anonymousId(t.options.anonymousId);
                var e, r, i, o = Object.keys(null != (r = t.integrations) ? r : {}).reduce(function(e, r) {
                        var i, o;
                        return (0, n.__assign)((0, n.__assign)({}, e), ((i = {})[r] = !!(null == (o = t.integrations) ? void 0 : o[r]), i))
                    }, {}),
                    a = (0, n.__assign)((0, n.__assign)({}, o), null == (i = t.options) ? void 0 : i.integrations),
                    s = this.context(t),
                    u = s[0],
                    c = s[1];
                t.options;
                var l = (0, n.__rest)(t, ["options"]),
                    h = (0, n.__assign)((0, n.__assign)((0, n.__assign)({
                        timestamp: new Date
                    }, l), {
                        context: u,
                        integrations: a
                    }), c),
                    f = "ajs-next-" + b.default.hash(JSON.stringify(h) + (0, y.v4)());
                return (0, n.__assign)((0, n.__assign)({}, h), {
                    messageId: f
                })
            }, t
        }();
    t.s(["EventFactory", 0, w], 478847);
    var x = t.i(829014),
        A = t.i(862156),
        C = t.i(457923),
        I = function() {
            var t, e, n = 0;
            return {
                done: function() {
                    return t
                },
                run: function(r) {
                    var i = r();
                    return "object" == typeof i && null !== i && "then" in i && "function" == typeof i.then && (1 == ++n && (t = new Promise(function(t) {
                        return e = t
                    })), i.finally(function() {
                        return 0 == --n && e()
                    })), i
                }
            }
        },
        S = t.i(456849),
        E = function(t) {
            function e(e) {
                return t.call(this, null != e ? e : new x.PersistedPriorityQueue(4, "event-queue")) || this
            }
            return (0, n.__extends)(e, t), e
        }(function(t) {
            function e(e) {
                var n = t.call(this) || this;
                return n.criticalTasks = I(), n.plugins = [], n.failedInitializations = [], n.flushing = !1, n.queue = e, n.queue.on(A.ON_REMOVE_FROM_FUTURE, function() {
                    n.scheduleFlush(0)
                }), n
            }
            return (0, n.__extends)(e, t), e.prototype.register = function(t, e, r) {
                return (0, n.__awaiter)(this, void 0, void 0, function() {
                    var i = this;
                    return (0, n.__generator)(this, function(n) {
                        switch (n.label) {
                            case 0:
                                return [4, (0, g.pTimeout)(Promise.resolve(e.load(t, r)), 1e4).then(function() {
                                    i.plugins.push(e)
                                }).catch(function(n) {
                                    if ("destination" === e.type) {
                                        i.failedInitializations.push(e.name), console.warn(e.name, n), t.log("warn", "Failed to load destination", {
                                            plugin: e.name,
                                            error: n
                                        });
                                        return
                                    }
                                    throw n
                                })];
                            case 1:
                                return n.sent(), [2]
                        }
                    })
                })
            }, e.prototype.deregister = function(t, e, r) {
                return (0, n.__awaiter)(this, void 0, void 0, function() {
                    var i;
                    return (0, n.__generator)(this, function(n) {
                        switch (n.label) {
                            case 0:
                                if (n.trys.push([0, 3, , 4]), !e.unload) return [3, 2];
                                return [4, Promise.resolve(e.unload(t, r))];
                            case 1:
                                n.sent(), n.label = 2;
                            case 2:
                                return this.plugins = this.plugins.filter(function(t) {
                                    return t.name !== e.name
                                }), [3, 4];
                            case 3:
                                return i = n.sent(), t.log("warn", "Failed to unload destination", {
                                    plugin: e.name,
                                    error: i
                                }), [3, 4];
                            case 4:
                                return [2]
                        }
                    })
                })
            }, e.prototype.dispatch = function(t) {
                return (0, n.__awaiter)(this, void 0, void 0, function() {
                    var e;
                    return (0, n.__generator)(this, function(n) {
                        return t.log("debug", "Dispatching"), t.stats.increment("message_dispatched"), this.queue.push(t), e = this.subscribeToDelivery(t), this.scheduleFlush(0), [2, e]
                    })
                })
            }, e.prototype.subscribeToDelivery = function(t) {
                return (0, n.__awaiter)(this, void 0, void 0, function() {
                    var e = this;
                    return (0, n.__generator)(this, function(n) {
                        return [2, new Promise(function(n) {
                            var r = function(i, o) {
                                i.isSame(t) && (e.off("flush", r), n(i))
                            };
                            e.on("flush", r)
                        })]
                    })
                })
            }, e.prototype.dispatchSingle = function(t) {
                return (0, n.__awaiter)(this, void 0, void 0, function() {
                    var e = this;
                    return (0, n.__generator)(this, function(n) {
                        return t.log("debug", "Dispatching"), t.stats.increment("message_dispatched"), this.queue.updateAttempts(t), t.attempts = 1, [2, this.deliver(t).catch(function(n) {
                            return e.enqueuRetry(n, t) ? e.subscribeToDelivery(t) : (t.setFailedDelivery({
                                reason: n
                            }), t)
                        })]
                    })
                })
            }, e.prototype.isEmpty = function() {
                return 0 === this.queue.length
            }, e.prototype.scheduleFlush = function(t) {
                var e = this;
                void 0 === t && (t = 500), this.flushing || (this.flushing = !0, setTimeout(function() {
                    e.flush().then(function() {
                        setTimeout(function() {
                            e.flushing = !1, e.queue.length && e.scheduleFlush(0)
                        }, 0)
                    })
                }, t))
            }, e.prototype.deliver = function(t) {
                return (0, n.__awaiter)(this, void 0, void 0, function() {
                    var e, r, i, o;
                    return (0, n.__generator)(this, function(n) {
                        switch (n.label) {
                            case 0:
                                return [4, this.criticalTasks.done()];
                            case 1:
                                n.sent(), e = Date.now(), n.label = 2;
                            case 2:
                                return n.trys.push([2, 4, , 5]), [4, this.flushOne(t)];
                            case 3:
                                return t = n.sent(), r = Date.now() - e, this.emit("delivery_success", t), t.stats.gauge("delivered", r), t.log("debug", "Delivered", t.event), [2, t];
                            case 4:
                                throw o = i = n.sent(), t.log("error", "Failed to deliver", o), this.emit("delivery_failure", t, o), t.stats.increment("delivery_failed"), i;
                            case 5:
                                return [2]
                        }
                    })
                })
            }, e.prototype.enqueuRetry = function(t, e) {
                return !!(!(t instanceof C.ContextCancelation) || t.retry) && this.queue.pushWithBackoff(e)
            }, e.prototype.flush = function() {
                return (0, n.__awaiter)(this, void 0, void 0, function() {
                    var t, e;
                    return (0, n.__generator)(this, function(n) {
                        switch (n.label) {
                            case 0:
                                if (0 === this.queue.length || !(!("u" > typeof window) || window.navigator.onLine) || !(t = this.queue.pop())) return [2, []];
                                t.attempts = this.queue.getAttempts(t), n.label = 1;
                            case 1:
                                return n.trys.push([1, 3, , 4]), [4, this.deliver(t)];
                            case 2:
                                return t = n.sent(), this.emit("flush", t, !0), [3, 4];
                            case 3:
                                return e = n.sent(), this.enqueuRetry(e, t) || (t.setFailedDelivery({
                                    reason: e
                                }), this.emit("flush", t, !1)), [2, []];
                            case 4:
                                return [2, [t]]
                        }
                    })
                })
            }, e.prototype.isReady = function() {
                return !0
            }, e.prototype.availableExtensions = function(t) {
                var e, r, i = (e = "type", r = {}, this.plugins.filter(function(e) {
                        if ("destination" !== e.type && "Customer.io Data Pipelines" !== e.name) return !0;
                        var n, r, i, o = void 0;
                        return null == (n = e.alternativeNames) || n.forEach(function(e) {
                            void 0 !== t[e] && (o = t[e])
                        }), null != (i = null != (r = t[e.name]) ? r : o) ? i : !1 !== ("Customer.io Data Pipelines" === e.name || t.All)
                    }).forEach(function(t) {
                        var i, o = void 0;
                        if ("string" == typeof e) {
                            var a = t[e];
                            o = "string" != typeof a ? JSON.stringify(a) : a
                        } else e instanceof Function && (o = e(t));
                        void 0 !== o && (r[o] = (0, n.__spreadArray)((0, n.__spreadArray)([], null != (i = r[o]) ? i : [], !0), [t], !1))
                    }), r),
                    o = i.before,
                    a = i.enrichment,
                    s = i.destination,
                    u = i.after;
                return {
                    before: void 0 === o ? [] : o,
                    enrichment: void 0 === a ? [] : a,
                    destinations: void 0 === s ? [] : s,
                    after: void 0 === u ? [] : u
                }
            }, e.prototype.flushOne = function(t) {
                var e, r;
                return (0, n.__awaiter)(this, void 0, void 0, function() {
                    var i, o, a, s, u, c, l, h, f, d, p, v, g;
                    return (0, n.__generator)(this, function(n) {
                        switch (n.label) {
                            case 0:
                                if (!this.isReady()) throw Error("Not ready");
                                t.attempts > 1 && this.emit("delivery_retry", t), o = (i = this.availableExtensions(null != (e = t.event.integrations) ? e : {})).before, a = i.enrichment, s = 0, u = o, n.label = 1;
                            case 1:
                                if (!(s < u.length)) return [3, 4];
                                return c = u[s], [4, (0, S.ensure)(t, c)];
                            case 2:
                                (l = n.sent()) instanceof C.CoreContext && (t = l), this.emit("message_enriched", t, c), n.label = 3;
                            case 3:
                                return s++, [3, 1];
                            case 4:
                                h = 0, f = a, n.label = 5;
                            case 5:
                                if (!(h < f.length)) return [3, 8];
                                return d = f[h], [4, (0, S.attempt)(t, d)];
                            case 6:
                                (l = n.sent()) instanceof C.CoreContext && (t = l), this.emit("message_enriched", t, d), n.label = 7;
                            case 7:
                                return h++, [3, 5];
                            case 8:
                                return v = (p = this.availableExtensions(null != (r = t.event.integrations) ? r : {})).destinations, g = p.after, [4, new Promise(function(e, n) {
                                    setTimeout(function() {
                                        Promise.all(v.map(function(e) {
                                            return (0, S.attempt)(t, e)
                                        })).then(e).catch(n)
                                    }, 0)
                                })];
                            case 9:
                                return n.sent(), t.stats.increment("message_delivered"), this.emit("message_delivered", t), [4, Promise.all(g.map(function(e) {
                                    return (0, S.attempt)(t, e)
                                }))];
                            case 10:
                                return n.sent(), [2, t]
                        }
                    })
                })
            }, e
        }(_.Emitter)),
        P = t.i(950523),
        k = t.i(373830),
        M = t.i(798035),
        O = t.i(372239),
        L = t.i(844722),
        j = "This is being deprecated and will be not be available in future releases of Analytics JS",
        q = (0, O.getGlobal)(),
        B = null == q ? void 0 : q.analytics;

    function D() {
        console.warn(j)
    }
    var F = function(e) {
        function r(t, r, i, o, a) {
            var s, u, c, l, h, f, d = this;
            (d = e.call(this) || this)._debug = !1, d.initialized = !1, d.user = function() {
                return d._user
            }, d.init = d.initialize.bind(d), d.log = D, d.addIntegrationMiddleware = D, d.listeners = D, d.addEventListener = D, d.removeAllListeners = D, d.removeListener = D, d.removeEventListener = D, d.hasListeners = D, d.add = D, d.addIntegration = D;
            var p = null == r ? void 0 : r.cookie,
                v = null != (l = null == r ? void 0 : r.disableClientPersistence) && l;
            return d.settings = t, d.settings.timeout = null != (h = d.settings.timeout) ? h : 300, d.queue = null != i ? i : (void 0 === (s = null == r ? void 0 : r.retryQueue) && (s = !1), void 0 === (u = v) && (u = !1), c = s ? 4 : 1, new E(u ? new A.PriorityQueue(c, []) : new x.PersistedPriorityQueue(c, "event-queue"))), d._universalStorage = new P.UniversalStorage(v ? ["memory"] : ["localStorage", "cookie", "memory"], (0, P.getAvailableStorageOptions)(p)), d._user = null != o ? o : new P.User(v ? (0, n.__assign)((0, n.__assign)({}, null == r ? void 0 : r.user), {
                persist: !1
            }) : null == r ? void 0 : r.user, p).load(), d._group = null != a ? a : new P.Group(v ? (0, n.__assign)((0, n.__assign)({}, null == r ? void 0 : r.group), {
                persist: !1
            }) : null == r ? void 0 : r.group, p).load(), d.eventFactory = new w(d._user), d.integrations = null != (f = null == r ? void 0 : r.integrations) ? f : {}, d.options = null != r ? r : {}, (0, k.default)(d), d
        }
        return (0, n.__extends)(r, e), Object.defineProperty(r.prototype, "storage", {
            get: function() {
                return this._universalStorage
            },
            enumerable: !1,
            configurable: !0
        }), r.prototype.track = function() {
            for (var t = [], e = 0; e < arguments.length; e++) t[e] = arguments[e];
            return (0, n.__awaiter)(this, void 0, void 0, function() {
                var e, r, i, o, a, s, u = this;
                return (0, n.__generator)(this, function(n) {
                    return r = (e = l.apply(void 0, t))[0], i = e[1], o = e[2], a = e[3], s = this.eventFactory.track(r, i, o, this.integrations), [2, this._dispatch(s, a).then(function(t) {
                        return u.emit("track", r, t.event.properties, t.event.options), t
                    })]
                })
            })
        }, r.prototype.page = function() {
            for (var t = [], e = 0; e < arguments.length; e++) t[e] = arguments[e];
            return (0, n.__awaiter)(this, void 0, void 0, function() {
                var e, r, i, o, a, s, u, c = this;
                return (0, n.__generator)(this, function(n) {
                    return r = (e = h.apply(void 0, t))[0], i = e[1], o = e[2], a = e[3], s = e[4], u = this.eventFactory.page(r, i, o, a, this.integrations), [2, this._dispatch(u, s).then(function(t) {
                        return c.emit("page", r, i, t.event.properties, t.event.options), t
                    })]
                })
            })
        }, r.prototype.identify = function() {
            for (var t = [], e = 0; e < arguments.length; e++) t[e] = arguments[e];
            return (0, n.__awaiter)(this, void 0, void 0, function() {
                var e, r, i, o, a, s, u = this;
                return (0, n.__generator)(this, function(n) {
                    return r = (e = f(this._user).apply(void 0, t))[0], i = e[1], o = e[2], a = e[3], this._user.identify(r, i), s = this.eventFactory.identify(this._user.id(), this._user.traits(), o, this.integrations), [2, this._dispatch(s, a).then(function(t) {
                        return u.emit("identify", t.event.userId, t.event.traits, t.event.options), t
                    })]
                })
            })
        }, r.prototype.group = function() {
            for (var t = this, e = [], n = 0; n < arguments.length; n++) e[n] = arguments[n];
            if (0 === e.length) return this._group;
            var r = f(this._group).apply(void 0, e),
                i = r[0],
                o = r[1],
                a = r[2],
                s = r[3];
            this._group.identify(i, o);
            var u = this._group.id(),
                c = this._group.traits(),
                l = this.eventFactory.group(u, c, a, this.integrations);
            return this._dispatch(l, s).then(function(e) {
                return t.emit("group", e.event.groupId, e.event.traits, e.event.options), e
            })
        }, r.prototype.alias = function() {
            for (var t = [], e = 0; e < arguments.length; e++) t[e] = arguments[e];
            return (0, n.__awaiter)(this, void 0, void 0, function() {
                var e, r, i, o, a, s, u = this;
                return (0, n.__generator)(this, function(n) {
                    return r = (e = d.apply(void 0, t))[0], i = e[1], o = e[2], a = e[3], s = this.eventFactory.alias(r, i, o, this.integrations), [2, this._dispatch(s, a).then(function(t) {
                        return u.emit("alias", r, i, t.event.options), t
                    })]
                })
            })
        }, r.prototype.screen = function() {
            for (var t = [], e = 0; e < arguments.length; e++) t[e] = arguments[e];
            return (0, n.__awaiter)(this, void 0, void 0, function() {
                var e, r, i, o, a, s, u, c = this;
                return (0, n.__generator)(this, function(n) {
                    return r = (e = h.apply(void 0, t))[0], i = e[1], o = e[2], a = e[3], s = e[4], u = this.eventFactory.screen(r, i, o, a, this.integrations), [2, this._dispatch(u, s).then(function(t) {
                        return c.emit("screen", r, i, t.event.properties, t.event.options), t
                    })]
                })
            })
        }, r.prototype.trackClick = function() {
            for (var e = [], r = 0; r < arguments.length; r++) e[r] = arguments[r];
            return (0, n.__awaiter)(this, void 0, void 0, function() {
                var r;
                return (0, n.__generator)(this, function(i) {
                    switch (i.label) {
                        case 0:
                            return [4, t.A(836994)];
                        case 1:
                            return [2, (r = i.sent().link).call.apply(r, (0, n.__spreadArray)([this], e, !1))]
                    }
                })
            })
        }, r.prototype.trackLink = function() {
            for (var e = [], r = 0; r < arguments.length; r++) e[r] = arguments[r];
            return (0, n.__awaiter)(this, void 0, void 0, function() {
                var r;
                return (0, n.__generator)(this, function(i) {
                    switch (i.label) {
                        case 0:
                            return [4, t.A(836994)];
                        case 1:
                            return [2, (r = i.sent().link).call.apply(r, (0, n.__spreadArray)([this], e, !1))]
                    }
                })
            })
        }, r.prototype.trackSubmit = function() {
            for (var e = [], r = 0; r < arguments.length; r++) e[r] = arguments[r];
            return (0, n.__awaiter)(this, void 0, void 0, function() {
                var r;
                return (0, n.__generator)(this, function(i) {
                    switch (i.label) {
                        case 0:
                            return [4, t.A(836994)];
                        case 1:
                            return [2, (r = i.sent().form).call.apply(r, (0, n.__spreadArray)([this], e, !1))]
                    }
                })
            })
        }, r.prototype.trackForm = function() {
            for (var e = [], r = 0; r < arguments.length; r++) e[r] = arguments[r];
            return (0, n.__awaiter)(this, void 0, void 0, function() {
                var r;
                return (0, n.__generator)(this, function(i) {
                    switch (i.label) {
                        case 0:
                            return [4, t.A(836994)];
                        case 1:
                            return [2, (r = i.sent().form).call.apply(r, (0, n.__spreadArray)([this], e, !1))]
                    }
                })
            })
        }, r.prototype.register = function() {
            for (var t = [], e = 0; e < arguments.length; e++) t[e] = arguments[e];
            return (0, n.__awaiter)(this, void 0, void 0, function() {
                var e, r = this;
                return (0, n.__generator)(this, function(n) {
                    switch (n.label) {
                        case 0:
                            return e = v.Context.system(), [4, Promise.all(t.map(function(t) {
                                return r.queue.register(e, t, r)
                            }))];
                        case 1:
                            return n.sent(), [2, e]
                    }
                })
            })
        }, r.prototype.deregister = function() {
            for (var t = [], e = 0; e < arguments.length; e++) t[e] = arguments[e];
            return (0, n.__awaiter)(this, void 0, void 0, function() {
                var e, r = this;
                return (0, n.__generator)(this, function(n) {
                    switch (n.label) {
                        case 0:
                            return e = v.Context.system(), [4, Promise.all(t.map(function(t) {
                                var n = r.queue.plugins.find(function(e) {
                                    return e.name === t
                                });
                                if (n) return r.queue.deregister(e, n, r);
                                e.log("warn", "plugin ".concat(t, " not found"))
                            }))];
                        case 1:
                            return n.sent(), [2, e]
                    }
                })
            })
        }, r.prototype.debug = function(t) {
            return !1 === t && localStorage.getItem("debug") && localStorage.removeItem("debug"), this._debug = t, this
        }, r.prototype.reset = function() {
            this._user.reset(), this._group.reset(), this.emit("reset")
        }, r.prototype.timeout = function(t) {
            this.settings.timeout = t
        }, r.prototype._dispatch = function(t, e) {
            return (0, n.__awaiter)(this, void 0, void 0, function() {
                var r;
                return (0, n.__generator)(this, function(i) {
                    return (r = new v.Context(t), (0, p.isOffline)() && !this.options.retryQueue) ? [2, r] : [2, function(t, e, r, i) {
                        return (0, n.__awaiter)(this, void 0, void 0, function() {
                            var o, a;
                            return (0, n.__generator)(this, function(n) {
                                switch (n.label) {
                                    case 0:
                                        if (r.emit("dispatch_start", t), o = Date.now(), !e.isEmpty()) return [3, 2];
                                        return [4, e.dispatchSingle(t)];
                                    case 1:
                                        return a = n.sent(), [3, 4];
                                    case 2:
                                        return [4, e.dispatch(t)];
                                    case 3:
                                        a = n.sent(), n.label = 4;
                                    case 4:
                                        var s, u;
                                        if (!(null == i ? void 0 : i.callback)) return [3, 6];
                                        return [4, (0, g.invokeCallback)(a, i.callback, (s = o, Math.max((null != (u = i.timeout) ? u : 300) - (Date.now() - s), 0)))];
                                    case 5:
                                        a = n.sent(), n.label = 6;
                                    case 6:
                                        return (null == i ? void 0 : i.debug) && a.flush(), [2, a]
                                }
                            })
                        })
                    }(r, this.queue, this, {
                        callback: e,
                        debug: this._debug,
                        timeout: this.settings.timeout
                    })]
                })
            })
        }, r.prototype.addSourceMiddleware = function(e) {
            return (0, n.__awaiter)(this, void 0, void 0, function() {
                var r = this;
                return (0, n.__generator)(this, function(i) {
                    switch (i.label) {
                        case 0:
                            return [4, this.queue.criticalTasks.run(function() {
                                return (0, n.__awaiter)(r, void 0, void 0, function() {
                                    var r, i, o;
                                    return (0, n.__generator)(this, function(n) {
                                        switch (n.label) {
                                            case 0:
                                                return [4, t.A(325580)];
                                            case 1:
                                                return r = n.sent().sourceMiddlewarePlugin, i = {}, this.queue.plugins.forEach(function(t) {
                                                    if ("destination" === t.type) return i[t.name] = !0
                                                }), o = r(e, i), [4, this.register(o)];
                                            case 2:
                                                return n.sent(), [2]
                                        }
                                    })
                                })
                            })];
                        case 1:
                            return i.sent(), [2, this]
                    }
                })
            })
        }, r.prototype.addDestinationMiddleware = function(t) {
            for (var e = [], n = 1; n < arguments.length; n++) e[n - 1] = arguments[n];
            return this.queue.plugins.filter(function(e) {
                return e.name.toLowerCase() === t.toLowerCase()
            }).forEach(function(t) {
                t.addMiddleware.apply(t, e)
            }), Promise.resolve(this)
        }, r.prototype.setAnonymousId = function(t) {
            return this._user.anonymousId(t)
        }, r.prototype.queryString = function(e) {
            return (0, n.__awaiter)(this, void 0, void 0, function() {
                return (0, n.__generator)(this, function(n) {
                    switch (n.label) {
                        case 0:
                            if (!1 === this.options.useQueryString) return [2, []];
                            return [4, t.A(218566)];
                        case 1:
                            return [2, (0, n.sent().queryString)(this, e)]
                    }
                })
            })
        }, r.prototype.use = function(t) {
            return t(this), this
        }, r.prototype.ready = function(t) {
            return void 0 === t && (t = function(t) {
                return t
            }), (0, n.__awaiter)(this, void 0, void 0, function() {
                return (0, n.__generator)(this, function(e) {
                    return [2, Promise.all(this.queue.plugins.map(function(t) {
                        return t.ready ? t.ready() : Promise.resolve()
                    })).then(function(e) {
                        return t(e), e
                    })]
                })
            })
        }, r.prototype.noConflict = function() {
            return console.warn(j), (0, L.setGlobalAnalytics)(null != B ? B : this), this
        }, r.prototype.normalize = function(t) {
            return console.warn(j), this.eventFactory.normalize(t)
        }, Object.defineProperty(r.prototype, "failedInitializations", {
            get: function() {
                return console.warn(j), this.queue.failedInitializations
            },
            enumerable: !1,
            configurable: !0
        }), Object.defineProperty(r.prototype, "VERSION", {
            get: function() {
                return M.version
            },
            enumerable: !1,
            configurable: !0
        }), r.prototype.initialize = function(t, e) {
            return (0, n.__awaiter)(this, void 0, void 0, function() {
                return (0, n.__generator)(this, function(t) {
                    return console.warn(j), [2, Promise.resolve(this)]
                })
            })
        }, r.prototype.pageview = function(t) {
            return (0, n.__awaiter)(this, void 0, void 0, function() {
                return (0, n.__generator)(this, function(e) {
                    switch (e.label) {
                        case 0:
                            return console.warn(j), [4, this.page({
                                path: t
                            })];
                        case 1:
                            return e.sent(), [2, this]
                    }
                })
            })
        }, Object.defineProperty(r.prototype, "plugins", {
            get: function() {
                var t;
                return console.warn(j), null != (t = this._plugins) ? t : {}
            },
            enumerable: !1,
            configurable: !0
        }), Object.defineProperty(r.prototype, "Integrations", {
            get: function() {
                return console.warn(j), this.queue.plugins.filter(function(t) {
                    return "destination" === t.type
                }).reduce(function(t, e) {
                    var n = "".concat(e.name.toLowerCase().replace(".", "").split(" ").join("-"), "Integration"),
                        r = window[n];
                    if (!r) return t;
                    var i = r.Integration;
                    return i ? t[e.name] = i : t[e.name] = r, t
                }, {})
            },
            enumerable: !1,
            configurable: !0
        }), r.prototype.push = function(t) {
            var e = t.shift();
            (!e || this[e]) && this[e].apply(this, t)
        }, r
    }(_.Emitter);
    t.s(["Analytics", 0, F], 976530), t.i(976530);
    var N = t.i(284553);

    function U() {
        return void 0 !== N.default && N.default.env ? N.default.env : {}
    }
    var R = t.i(605344),
        T = t.i(110229),
        z = t.i(208482),
        G = function() {
            var t, e, n = new Promise(function(n, r) {
                t = n, e = r
            });
            return {
                resolve: t,
                reject: e,
                promise: n
            }
        };

    function Q() {
        var t = document.getElementsByTagName("link"),
            e = "";
        return Array.prototype.slice.call(t).forEach(function(t) {
            "canonical" === t.getAttribute("rel") && (e = t.getAttribute("href"))
        }), e
    }

    function K() {
        return {
            path: function() {
                var t = Q();
                if (!t) return window.location.pathname;
                var e = document.createElement("a");
                return e.href = t, e.pathname.startsWith("/") ? e.pathname : "/" + e.pathname
            }(),
            referrer: document.referrer,
            search: location.search,
            title: document.title,
            url: function(t) {
                void 0 === t && (t = "");
                var e = Q();
                if (e) return e.includes("?") ? e : "".concat(e).concat(t);
                var n = window.location.href,
                    r = n.indexOf("#");
                return -1 === r ? n : n.slice(0, r)
            }(location.search)
        }
    }

    function V(t) {
        var e, n = t.event;
        n.context = n.context || {};
        var r = K(),
            i = null != (e = n.properties) ? e : {};
        return Object.keys(r).forEach(function(t) {
            i[t] && (r[t] = i[t])
        }), n.context.page && (r = Object.assign({}, r, n.context.page)), n.context = Object.assign({}, n.context, {
            page: r
        }), t.event = n, t
    }
    var J = {
            name: "Page Enrichment",
            version: "0.1.0",
            isLoaded: function() {
                return !0
            },
            load: function() {
                return Promise.resolve()
            },
            type: "before",
            page: function(t) {
                return t.event.properties = Object.assign({}, K(), t.event.properties), t.event.name && (t.event.properties.name = t.event.name), V(t)
            },
            alias: V,
            track: V,
            identify: V,
            group: V
        },
        W = t.i(395936),
        $ = t.i(150722),
        H = function() {
            function t(t, e) {
                this.version = "1.0.0", this.alternativeNames = [], this.middleware = [], this.alias = this._createMethod("alias"), this.group = this._createMethod("group"), this.identify = this._createMethod("identify"), this.page = this._createMethod("page"), this.screen = this._createMethod("screen"), this.track = this._createMethod("track"), this.action = e, this.name = t, this.type = e.type, this.alternativeNames.push(e.name)
            }
            return t.prototype.addMiddleware = function() {
                for (var t, e = [], n = 0; n < arguments.length; n++) e[n] = arguments[n];
                "destination" === this.type && (t = this.middleware).push.apply(t, e)
            }, t.prototype.transform = function(t) {
                return (0, n.__awaiter)(this, void 0, void 0, function() {
                    var e;
                    return (0, n.__generator)(this, function(n) {
                        switch (n.label) {
                            case 0:
                                return [4, (0, $.applyDestinationMiddleware)(this.name, t.event, this.middleware)];
                            case 1:
                                return null === (e = n.sent()) && t.cancel(new C.ContextCancelation({
                                    retry: !1,
                                    reason: "dropped by destination middleware"
                                })), [2, new v.Context(e)]
                        }
                    })
                })
            }, t.prototype._createMethod = function(t) {
                var e = this;
                return function(r) {
                    return (0, n.__awaiter)(e, void 0, void 0, function() {
                        var e;
                        return (0, n.__generator)(this, function(n) {
                            switch (n.label) {
                                case 0:
                                    if (!this.action[t]) return [2, r];
                                    if (e = r, "destination" !== this.type) return [3, 2];
                                    return [4, this.transform(r)];
                                case 1:
                                    e = n.sent(), n.label = 2;
                                case 2:
                                    return [4, this.action[t](e)];
                                case 3:
                                    return n.sent(), [2, r]
                            }
                        })
                    })
                }
            }, t.prototype.isLoaded = function() {
                return this.action.isLoaded()
            }, t.prototype.ready = function() {
                return this.action.ready ? this.action.ready() : Promise.resolve()
            }, t.prototype.load = function(t, e) {
                return this.action.load(t, e)
            }, t.prototype.unload = function(t, e) {
                var n, r;
                return null == (r = (n = this.action).unload) ? void 0 : r.call(n, t, e)
            }, t
        }(),
        X = t.i(85052),
        Y = function(t) {
            var e = !1;
            window.addEventListener("pagehide", function() {
                e || (e = !0, t())
            }), document.addEventListener("visibilitychange", function() {
                "hidden" == document.visibilityState ? e || (e = !0, t()) : e = !1
            })
        };

    function Z(t) {
        return (encodeURI(JSON.stringify(t)).split(/%..|./).length - 1) / 1024
    }
    var tt = t.i(287811),
        te = t.i(783321);

    function tn(t, e, r, i) {
        var o = this;
        t || setTimeout(function() {
            return (0, n.__awaiter)(o, void 0, void 0, function() {
                var t, o;
                return (0, n.__generator)(this, function(a) {
                    switch (a.label) {
                        case 0:
                            return t = !0, [4, function(t, e) {
                                return (0, n.__awaiter)(this, void 0, void 0, function() {
                                    var r, i = this;
                                    return (0, n.__generator)(this, function(o) {
                                        switch (o.label) {
                                            case 0:
                                                if (r = [], (0, p.isOffline)()) return [2, e];
                                                return [4, (0, te.pWhile)(function() {
                                                    return e.length > 0 && !(0, p.isOffline)()
                                                }, function() {
                                                    return (0, n.__awaiter)(i, void 0, void 0, function() {
                                                        var i;
                                                        return (0, n.__generator)(this, function(n) {
                                                            switch (n.label) {
                                                                case 0:
                                                                    if (!(i = e.pop())) return [2];
                                                                    return [4, (0, S.attempt)(i, t)];
                                                                case 1:
                                                                    return n.sent() instanceof v.Context || r.push(i), [2]
                                                            }
                                                        })
                                                    })
                                                })];
                                            case 1:
                                                return o.sent(), r.map(function(t) {
                                                    return e.pushWithBackoff(t)
                                                }), [2, e]
                                        }
                                    })
                                })
                            }(r, e)];
                        case 1:
                            return o = a.sent(), t = !1, e.todo > 0 && i(t, o, r, i), [2]
                    }
                })
            })
        }, 5e3 * Math.random())
    }
    var tr = function(t, e, n) {
            n.getCalls(t).forEach(function(t) {
                tu(e, t).catch(console.error)
            })
        },
        ti = tr.bind(void 0, "on"),
        to = tr.bind(void 0, "setAnonymousId"),
        ta = function(t, e) {
            e.toArray().forEach(function(e) {
                setTimeout(function() {
                    tu(t, e).catch(console.error)
                }, 0)
            })
        },
        ts = function() {
            function t() {
                this._value = {}
            }
            return t.prototype.toArray = function() {
                var t;
                return (t = []).concat.apply(t, Object.values(this._value))
            }, t.prototype.getCalls = function(t) {
                var e;
                return null != (e = this._value[t]) ? e : []
            }, t.prototype.push = function() {
                for (var t = this, e = [], n = 0; n < arguments.length; n++) e[n] = arguments[n];
                return e.forEach(function(e) {
                    t._value[e.method] ? t._value[e.method].push(e) : t._value[e.method] = [e]
                }), this
            }, t.prototype.clear = function() {
                return this._value = {}, this
            }, t
        }();

    function tu(t, e) {
        return (0, n.__awaiter)(this, void 0, void 0, function() {
            var r, i;
            return (0, n.__generator)(this, function(n) {
                switch (n.label) {
                    case 0:
                        var o;
                        if (n.trys.push([0, 3, , 4]), e.called) return [2, void 0];
                        if (e.called = !0, !("object" == typeof(o = r = t[e.method].apply(t, e.args)) && null !== o && "then" in o && "function" == typeof o.then)) return [3, 2];
                        return [4, r];
                    case 1:
                        n.sent(), n.label = 2;
                    case 2:
                        return e.resolve(r), [3, 4];
                    case 3:
                        return i = n.sent(), e.reject(i), [3, 4];
                    case 4:
                        return [2]
                }
            })
        })
    }
    var tc = function() {
        function t(t) {
            var e = this;
            this._preInitBuffer = new ts, this.trackSubmit = this._createMethod("trackSubmit"), this.trackClick = this._createMethod("trackClick"), this.trackLink = this._createMethod("trackLink"), this.pageView = this._createMethod("pageview"), this.identify = this._createMethod("identify"), this.reset = this._createMethod("reset"), this.group = this._createMethod("group"), this.track = this._createMethod("track"), this.ready = this._createMethod("ready"), this.alias = this._createMethod("alias"), this.debug = this._createChainableMethod("debug"), this.page = this._createMethod("page"), this.once = this._createChainableMethod("once"), this.off = this._createChainableMethod("off"), this.on = this._createChainableMethod("on"), this.addSourceMiddleware = this._createMethod("addSourceMiddleware"), this.setAnonymousId = this._createMethod("setAnonymousId"), this.addDestinationMiddleware = this._createMethod("addDestinationMiddleware"), this.screen = this._createMethod("screen"), this.register = this._createMethod("register"), this.deregister = this._createMethod("deregister"), this.user = this._createMethod("user"), this.VERSION = M.version, this._promise = t(this._preInitBuffer), this._promise.then(function(t) {
                var n = t[0],
                    r = t[1];
                e.instance = n, e.ctx = r
            }).catch(function() {})
        }
        return t.prototype.then = function() {
            for (var t, e = [], n = 0; n < arguments.length; n++) e[n] = arguments[n];
            return (t = this._promise).then.apply(t, e)
        }, t.prototype.catch = function() {
            for (var t, e = [], n = 0; n < arguments.length; n++) e[n] = arguments[n];
            return (t = this._promise).catch.apply(t, e)
        }, t.prototype.finally = function() {
            for (var t, e = [], n = 0; n < arguments.length; n++) e[n] = arguments[n];
            return (t = this._promise).finally.apply(t, e)
        }, t.prototype.inbox = function() {
            for (var t, e, n = [], r = 0; r < arguments.length; r++) n[r] = arguments[r];
            if (null == (e = this.instance) ? void 0 : e.inbox) return (t = this.instance).inbox.apply(t, n);
            throw Error("Customer.io In-App Plugin is not loaded yet. Ensure the plugin is initialized before calling inbox().")
        }, t.prototype._createMethod = function(t) {
            var e = this;
            return function() {
                for (var n, r = [], i = 0; i < arguments.length; i++) r[i] = arguments[i];
                return e.instance ? Promise.resolve((n = e.instance)[t].apply(n, r)) : new Promise(function(n, i) {
                    e._preInitBuffer.push({
                        method: t,
                        args: r,
                        resolve: n,
                        reject: i,
                        called: !1
                    })
                })
            }
        }, t.prototype._createChainableMethod = function(t) {
            var e = this;
            return function() {
                for (var n, r = [], i = 0; i < arguments.length; i++) r[i] = arguments[i];
                return e.instance ? (n = e.instance)[t].apply(n, r) : e._preInitBuffer.push({
                    method: t,
                    args: r,
                    resolve: function() {},
                    reject: console.error,
                    called: !1
                }), e
            }
        }, t
    }();

    function tl(t) {
        return {
            method: t[0],
            resolve: function() {},
            reject: console.error,
            args: t.slice(1),
            called: !1
        }
    }
    var th = function(t) {
            void 0 === t && (t = (0, L.getGlobalAnalytics)());
            var e = t;
            return Array.isArray(e) ? e.splice(0, e.length).map(tl) : []
        },
        tf = (0, O.getGlobal)(),
        td = null != (e = tf.__INSPECTOR__) ? e : tf.__INSPECTOR__ = {},
        tp = function(t) {
            var e;
            return null == (e = td.attach) ? void 0 : e.call(td, t)
        },
        tv = t.i(216129);

    function tg(t, e) {
        var n = null != e ? e : (0, R.getCDN)();
        return (0, T.fetch)("".concat(n, "/v1/projects/").concat(t, "/settings")).then(function(t) {
            return t.ok ? t.json() : t.text().then(function(t) {
                throw Error(t)
            })
        }).catch(function(t) {
            throw console.error(t.message), t
        })
    }
    var t_ = function(e) {
        function r() {
            var r = this,
                i = G(),
                o = i.promise,
                a = i.resolve;
            return (r = e.call(this, function(e) {
                return o.then(function(r) {
                    return function(e, r, i) {
                        var o, a, s, u, l, h, f;
                        return void 0 === r && (r = {}), (0, n.__awaiter)(this, void 0, void 0, function() {
                            var d, v, g, _, y, m, b, w, C, I, S;
                            return (0, n.__generator)(this, function(E) {
                                switch (E.label) {
                                    case 0:
                                        if (r.globalAnalyticsKey && (0, L.setGlobalAnalyticsKey)(r.globalAnalyticsKey), e.cdnURL && (0, R.setGlobalCDNUrl)(e.cdnURL), null == (o = e.cdnSettings)) return [3, 1];
                                        return v = o, [3, 3];
                                    case 1:
                                        return [4, tg(e.writeKey, e.cdnURL)];
                                    case 2:
                                        v = E.sent(), E.label = 3;
                                    case 3:
                                        var P;
                                        return g = null == (s = null == (a = (d = v).integrations["Customer.io Data Pipelines"]) ? void 0 : a.retryQueue) || s, tp(y = new F(e, _ = (0, n.__assign)({
                                            retryQueue: g
                                        }, r))), m = null != (u = e.plugins) ? u : [], b = null != (l = e.classicIntegrations) ? l : [], tv.Stats.initRemoteMetrics(d.metrics), P = y, i.push.apply(i, th()), to(P, i), ti(P, i), [4, function(e, r, i, o, a, s) {
                                            var u, l, h, f;
                                            return (0, n.__awaiter)(this, void 0, void 0, function() {
                                                var d, v, g, _, y, m, b, w, C, I, S, E, P, k = this;
                                                return (0, n.__generator)(this, function(M) {
                                                    var O, L, j;
                                                    switch (M.label) {
                                                        case 0:
                                                            if ("test" === U().NODE_ENV || !((null != (j = null == (L = null == (O = e.middlewareSettings) ? void 0 : O.routingRules) ? void 0 : L.length) ? j : 0) > 0)) return [3, 2];
                                                            return [4, t.A(328856).then(function(t) {
                                                                return t.tsubMiddleware(e.middlewareSettings.routingRules)
                                                            })];
                                                        case 1:
                                                            return v = M.sent(), [3, 3];
                                                        case 2:
                                                            v = void 0, M.label = 3;
                                                        case 3:
                                                            if (d = v, ("test" === U().NODE_ENV || !(Object.keys(e.integrations).length > 1)) && !(s.length > 0)) return [3, 5];
                                                            return [4, t.A(21391).then(function(t) {
                                                                return t.ajsDestinations(e, r.integrations, i, d, s)
                                                            })];
                                                        case 4:
                                                            return _ = M.sent(), [3, 6];
                                                        case 5:
                                                            _ = [], M.label = 6;
                                                        case 6:
                                                            if (g = _, !e.legacyVideoPluginsEnabled) return [3, 8];
                                                            return [4, t.A(809868).then(function(t) {
                                                                return t.loadLegacyVideoPlugins(r)
                                                            })];
                                                        case 7:
                                                            M.sent(), M.label = 8;
                                                        case 8:
                                                            if (!(null == (u = i.plan) ? void 0 : u.track)) return [3, 10];
                                                            return [4, t.A(429359).then(function(t) {
                                                                var n;
                                                                return t.schemaFilter(null == (n = i.plan) ? void 0 : n.track, e)
                                                            })];
                                                        case 9:
                                                            return m = M.sent(), [3, 11];
                                                        case 10:
                                                            m = void 0, M.label = 11;
                                                        case 11:
                                                            return y = m, b = (0, z.mergedOptions)(e, o), [4, (function(t, e, r, i, o) {
                                                                var a, s, u;
                                                                return (0, n.__awaiter)(this, void 0, void 0, function() {
                                                                    var c, l, h, f = this;
                                                                    return (0, n.__generator)(this, function(d) {
                                                                        switch (d.label) {
                                                                            case 0:
                                                                                return c = [], l = (0, R.getCDN)(), h = null != (s = null == (a = t.middlewareSettings) ? void 0 : a.routingRules) ? s : [], [4, Promise.all((null != (u = t.remotePlugins) ? u : []).map(function(t) {
                                                                                    return (0, n.__awaiter)(f, void 0, void 0, function() {
                                                                                        var a, s, u, f, d, p, v, g;
                                                                                        return (0, n.__generator)(this, function(_) {
                                                                                            switch (_.label) {
                                                                                                case 0:
                                                                                                    var y, m;
                                                                                                    if (y = e[t.creationName], m = e[t.name], !1 === e.All && !y && !m || !1 === y || !1 === m || 0) return [2];
                                                                                                    _.label = 1;
                                                                                                case 1:
                                                                                                    if (_.trys.push([1, 12, , 13]), a = RegExp("https://cdp.customer.io"), !i) return [3, 7];
                                                                                                    u = (s = t.url.split("/"))[s.length - 2], f = t.url.replace(u, btoa(u).replace(/=/g, "")), _.label = 2;
                                                                                                case 2:
                                                                                                    return _.trys.push([2, 4, , 6]), [4, (0, W.loadScript)(f.replace(a, l))];
                                                                                                case 3:
                                                                                                case 5:
                                                                                                    return _.sent(), [3, 6];
                                                                                                case 4:
                                                                                                    return _.sent(), [4, (0, W.loadScript)(t.url.replace(a, l))];
                                                                                                case 6:
                                                                                                    return [3, 9];
                                                                                                case 7:
                                                                                                    return [4, (0, W.loadScript)(t.url.replace(a, l))];
                                                                                                case 8:
                                                                                                    _.sent(), _.label = 9;
                                                                                                case 9:
                                                                                                    if (d = t.libraryName, "function" != typeof window[d]) return [3, 11];
                                                                                                    return [4, (0, window[d])((0, n.__assign)((0, n.__assign)({}, t.settings), r[t.name]))];
                                                                                                case 10:
                                                                                                    ! function(t) {
                                                                                                        if (!Array.isArray(t)) throw Error("Not a valid list of plugins");
                                                                                                        var e = ["load", "isLoaded", "name", "version", "type"];
                                                                                                        t.forEach(function(t) {
                                                                                                            e.forEach(function(e) {
                                                                                                                var n;
                                                                                                                if (void 0 === t[e]) throw Error("Plugin: ".concat(null != (n = t.name) ? n : "unknown", " missing required function ").concat(e))
                                                                                                            })
                                                                                                        })
                                                                                                    }(v = Array.isArray(p = _.sent()) ? p : [p]), g = h.filter(function(e) {
                                                                                                        return e.destinationName === t.creationName
                                                                                                    }), v.forEach(function(e) {
                                                                                                        var n = new H(t.creationName, e);
                                                                                                        g.length && o && "destination" === e.type && n.addMiddleware(o), c.push(n)
                                                                                                    }), _.label = 11;
                                                                                                case 11:
                                                                                                    return [3, 13];
                                                                                                case 12:
                                                                                                    return console.warn("Failed to load Remote Plugin", _.sent()), [3, 13];
                                                                                                case 13:
                                                                                                    return [2]
                                                                                            }
                                                                                        })
                                                                                    })
                                                                                }))];
                                                                            case 1:
                                                                                return d.sent(), [2, c.filter(Boolean)]
                                                                        }
                                                                    })
                                                                })
                                                            })(e, r.integrations, b, o.obfuscate, d).catch(function() {
                                                                return []
                                                            })];
                                                        case 12:
                                                            if (w = M.sent(), (C = b["Customer.io In-App Plugin"]) || (C = null == (l = o.integrations) ? void 0 : l["Customer.io In-App Plugin"]), !C) return [3, 14];
                                                            return [4, t.A(127692).then(function(t) {
                                                                return t.InAppPlugin(C)
                                                            })];
                                                        case 13:
                                                            return S = M.sent(), [3, 15];
                                                        case 14:
                                                            S = void 0, M.label = 15;
                                                        case 15:
                                                            return I = S, E = (0, n.__spreadArray)((0, n.__spreadArray)((0, n.__spreadArray)([c, J], a, !0), g, !0), w, !0), y && E.push(y), I && E.push(I), (null == (h = i.integrations) ? void 0 : h.All) === !1 && !i.integrations["Customer.io Data Pipelines"] || i.integrations && !1 === i.integrations["Customer.io Data Pipelines"] || E.push(function(t, e, r) {
                                                                window.addEventListener("pagehide", function() {
                                                                    s.push.apply(s, Array.from(u)), u.clear()
                                                                });
                                                                var i, o, a, s = t.options.disableClientPersistence ? new A.PriorityQueue(t.queue.queue.maxAttempts, []) : new x.PersistedPriorityQueue(t.queue.queue.maxAttempts, "dest-Customer.io-Data-Pipelines"),
                                                                    u = new Set,
                                                                    c = null != (o = null == e ? void 0 : e.apiHost) ? o : "cdp.customer.io/v1",
                                                                    l = null != (a = null == e ? void 0 : e.protocol) ? a : "https",
                                                                    h = "".concat(l, "://").concat(c),
                                                                    f = null == e ? void 0 : e.deliveryStrategy,
                                                                    d = (null == f ? void 0 : f.strategy) === "batching" ? function(t, e) {
                                                                        var r, i, o, a = [],
                                                                            s = !1,
                                                                            u = null != (r = null == e ? void 0 : e.size) ? r : 10,
                                                                            c = null != (i = null == e ? void 0 : e.timeout) ? i : 5e3;

                                                                        function l(e) {
                                                                            if (0 !== e.length) {
                                                                                var n, r = null == (n = e[0]) ? void 0 : n.writeKey;
                                                                                return (0, T.fetch)("".concat(t, "/b"), {
                                                                                    keepalive: s,
                                                                                    headers: {
                                                                                        "Content-Type": "text/plain"
                                                                                    },
                                                                                    method: "post",
                                                                                    body: JSON.stringify({
                                                                                        batch: e,
                                                                                        writeKey: r
                                                                                    })
                                                                                })
                                                                            }
                                                                        }

                                                                        function h() {
                                                                            return (0, n.__awaiter)(this, void 0, void 0, function() {
                                                                                var t;
                                                                                return (0, n.__generator)(this, function(e) {
                                                                                    return a.length ? (t = a, a = [], [2, l(t)]) : [2]
                                                                                })
                                                                            })
                                                                        }
                                                                        return Y(function() {
                                                                            if (s = !0, a.length) {
                                                                                var t, e;
                                                                                Promise.all((t = [], e = 0, a.forEach(function(n) {
                                                                                    Z(t[e]) >= 64 && e++, t[e] ? t[e].push(n) : t[e] = [n]
                                                                                }), t).map(l)).catch(console.error)
                                                                            }
                                                                        }), {
                                                                            dispatch: function(t, e) {
                                                                                return (0, n.__awaiter)(this, void 0, void 0, function() {
                                                                                    return (0, n.__generator)(this, function(t) {
                                                                                        return a.push(e), [2, a.length >= u || Z(a) >= 450 || s ? h() : void(!o && (o = setTimeout(function() {
                                                                                            o = void 0, h().catch(console.error)
                                                                                        }, c)))]
                                                                                    })
                                                                                })
                                                                            }
                                                                        }
                                                                    }(h, f.config) : (i = null == f ? void 0 : f.config, {
                                                                        dispatch: function(t, e) {
                                                                            return (0, T.fetch)(t, {
                                                                                keepalive: null == i ? void 0 : i.keepalive,
                                                                                headers: {
                                                                                    "Content-Type": "text/plain"
                                                                                },
                                                                                method: "post",
                                                                                body: JSON.stringify(e)
                                                                            })
                                                                        }
                                                                    });

                                                                function v(i) {
                                                                    return (0, n.__awaiter)(this, void 0, void 0, function() {
                                                                        var o, a;
                                                                        return (0, n.__generator)(this, function(n) {
                                                                            var c, l, f, v, _, y;
                                                                            return (0, p.isOffline)() ? (s.push(i), tn(!1, s, g, tn), [2, i]) : (u.add(i), o = i.event.type.charAt(0), a = (0, X.toFacade)(i.event).json(), "track" === i.event.type && delete a.traits, "alias" === i.event.type && (c = a, y = t.user(), c.previousId = null != (v = null != (f = null != (l = c.previousId) ? l : c.from) ? f : y.id()) ? v : y.anonymousId(), c.userId = null != (_ = c.userId) ? _ : c.to, delete c.from, delete c.to, a = c), [2, d.dispatch("".concat(h, "/").concat(o), (0, tt.normalize)(t, a, e, r)).then(function() {
                                                                                return i
                                                                            }).catch(function() {
                                                                                return s.pushWithBackoff(i), tn(!1, s, g, tn), i
                                                                            }).finally(function() {
                                                                                u.delete(i)
                                                                            })])
                                                                        })
                                                                    })
                                                                }
                                                                var g = {
                                                                    name: "Customer.io Data Pipelines",
                                                                    type: "after",
                                                                    version: "0.1.0",
                                                                    isLoaded: function() {
                                                                        return !0
                                                                    },
                                                                    load: function() {
                                                                        return Promise.resolve()
                                                                    },
                                                                    track: v,
                                                                    identify: v,
                                                                    page: v,
                                                                    alias: v,
                                                                    group: v,
                                                                    screen: v
                                                                };
                                                                return s.todo && tn(!1, s, g, tn), g
                                                            }(r, b["Customer.io Data Pipelines"], e.integrations)), [4, r.register.apply(r, E)];
                                                        case 16:
                                                            if (P = M.sent(), !Object.entries(null != (f = e.enabledMiddleware) ? f : {}).some(function(t) {
                                                                    return t[1]
                                                                })) return [3, 18];
                                                            return [4, t.A(871655).then(function(t) {
                                                                var i = t.remoteMiddlewares;
                                                                return (0, n.__awaiter)(k, void 0, void 0, function() {
                                                                    return (0, n.__generator)(this, function(t) {
                                                                        switch (t.label) {
                                                                            case 0:
                                                                                return [4, i(P, e, o.obfuscate)];
                                                                            case 1:
                                                                                return [2, Promise.all(t.sent().map(function(t) {
                                                                                    return r.addSourceMiddleware(t)
                                                                                }))]
                                                                        }
                                                                    })
                                                                })
                                                            })];
                                                        case 17:
                                                            M.sent(), M.label = 18;
                                                        case 18:
                                                            return [2, P]
                                                    }
                                                })
                                            })
                                        }(d, y, _, r, m, b)];
                                    case 4:
                                        if (w = E.sent(), C = null != (h = window.location.search) ? h : "", I = null != (f = window.location.hash) ? f : "", !(S = C.length ? C : I.replace(/(?=#).*(?=\?)/, "")).includes("ajs_")) return [3, 6];
                                        return [4, y.queryString(S).catch(console.error)];
                                    case 5:
                                        E.sent(), E.label = 6;
                                    case 6:
                                        return y.initialized = !0, y.emit("initialize", e, r), r.initialPageview && y.page().catch(console.error), [4, function(t, e) {
                                            return (0, n.__awaiter)(this, void 0, void 0, function() {
                                                return (0, n.__generator)(this, function(r) {
                                                    switch (r.label) {
                                                        case 0:
                                                            return e.push.apply(e, th()), [4, (0, n.__awaiter)(void 0, void 0, void 0, function() {
                                                                var r, i;
                                                                return (0, n.__generator)(this, function(n) {
                                                                    switch (n.label) {
                                                                        case 0:
                                                                            r = 0, i = e.getCalls("addSourceMiddleware"), n.label = 1;
                                                                        case 1:
                                                                            if (!(r < i.length)) return [3, 4];
                                                                            return [4, tu(t, i[r]).catch(console.error)];
                                                                        case 2:
                                                                            n.sent(), n.label = 3;
                                                                        case 3:
                                                                            return r++, [3, 1];
                                                                        case 4:
                                                                            return [2]
                                                                    }
                                                                })
                                                            })];
                                                        case 1:
                                                            return r.sent(), e.push.apply(e, th()), ta(t, e), e.clear(), [2]
                                                    }
                                                })
                                            })
                                        }(y, i)];
                                    case 7:
                                        return E.sent(), [2, [y, w]]
                                }
                            })
                        })
                    }(r[0], r[1], e)
                })
            }) || this)._resolveLoadStart = function(t, e) {
                return a([t, e])
            }, r
        }
        return (0, n.__extends)(r, e), r.prototype.load = function(t, e) {
            return void 0 === e && (e = {}), this._resolveLoadStart(t, e), this
        }, r.load = function(t, e) {
            return void 0 === e && (e = {}), new r().load(t, e)
        }, r.standalone = function(t, e) {
            return r.load({
                writeKey: t
            }, e).then(function(t) {
                return t[0]
            })
        }, r
    }(tc);
    t.s(["AnalyticsBrowser", 0, t_, "loadLegacySettings", 0, tg], 23866), t.i(23866);
    var ty = function() {
        function t() {}
        return t.load = function() {
            return Promise.reject(Error("AnalyticsNode is not available in browsers."))
        }, t
    }();
    t.s(["AnalyticsNode", 0, ty], 742914), t.i(742914), t.s(["Context", () => v.Context, "ContextCancelation", () => C.ContextCancelation], 82453), t.i(82453), t.i(478847), t.s([], 137909), t.i(137909), t.s(["EventFactory", 0, w], 89747), t.i(89747), t.s([], 423218), t.i(423218);
    var tm = t.i(877486);
    t.s(["Analytics", 0, F, "AnalyticsBrowser", 0, t_, "AnalyticsNode", 0, ty, "Context", () => v.Context, "ContextCancelation", () => C.ContextCancelation, "Cookie", () => P.Cookie, "EventFactory", 0, w, "Group", () => P.Group, "InAppEvents", () => tm.InAppEvents, "InAppPlugin", () => tm.InAppPlugin, "LocalStorage", () => P.LocalStorage, "UniversalStorage", () => P.UniversalStorage, "User", () => P.User, "getAvailableStorageOptions", () => P.getAvailableStorageOptions, "getGlobalAnalytics", () => L.getGlobalAnalytics, "loadLegacySettings", 0, tg], 606926)
}]);

//# debugId=400a4019-da5a-386a-1791-e2ef41bb7b9f