;
! 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] = "b9d8135f-7e50-5947-c6ef-02e12b76c33a")
    } catch (e) {}
}();
(globalThis.TURBOPACK || (globalThis.TURBOPACK = [])).push(["object" == typeof document ? document.currentScript : void 0, 93257, (t, e, r) => {
    var n = {
            675: function(t, e) {
                "use strict";
                e.byteLength = function(t) {
                    var e = u(t),
                        r = e[0],
                        n = e[1];
                    return (r + n) * 3 / 4 - n
                }, e.toByteArray = function(t) {
                    var e, r, i = u(t),
                        s = i[0],
                        a = i[1],
                        f = new o((s + a) * 3 / 4 - a),
                        h = 0,
                        c = a > 0 ? s - 4 : s;
                    for (r = 0; r < c; r += 4) e = n[t.charCodeAt(r)] << 18 | n[t.charCodeAt(r + 1)] << 12 | n[t.charCodeAt(r + 2)] << 6 | n[t.charCodeAt(r + 3)], f[h++] = e >> 16 & 255, f[h++] = e >> 8 & 255, f[h++] = 255 & e;
                    return 2 === a && (e = n[t.charCodeAt(r)] << 2 | n[t.charCodeAt(r + 1)] >> 4, f[h++] = 255 & e), 1 === a && (e = n[t.charCodeAt(r)] << 10 | n[t.charCodeAt(r + 1)] << 4 | n[t.charCodeAt(r + 2)] >> 2, f[h++] = e >> 8 & 255, f[h++] = 255 & e), f
                }, e.fromByteArray = function(t) {
                    for (var e, n = t.length, o = n % 3, i = [], s = 0, a = n - o; s < a; s += 16383) i.push(function(t, e, n) {
                        for (var o, i = [], s = e; s < n; s += 3) o = (t[s] << 16 & 0xff0000) + (t[s + 1] << 8 & 65280) + (255 & t[s + 2]), i.push(r[o >> 18 & 63] + r[o >> 12 & 63] + r[o >> 6 & 63] + r[63 & o]);
                        return i.join("")
                    }(t, s, s + 16383 > a ? a : s + 16383));
                    return 1 === o ? i.push(r[(e = t[n - 1]) >> 2] + r[e << 4 & 63] + "==") : 2 === o && i.push(r[(e = (t[n - 2] << 8) + t[n - 1]) >> 10] + r[e >> 4 & 63] + r[e << 2 & 63] + "="), i.join("")
                };
                for (var r = [], n = [], o = "u" > typeof Uint8Array ? Uint8Array : Array, i = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/", s = 0, a = i.length; s < a; ++s) r[s] = i[s], n[i.charCodeAt(s)] = s;

                function u(t) {
                    var e = t.length;
                    if (e % 4 > 0) throw Error("Invalid string. Length must be a multiple of 4");
                    var r = t.indexOf("="); - 1 === r && (r = e);
                    var n = r === e ? 0 : 4 - r % 4;
                    return [r, n]
                }
                n[45] = 62, n[95] = 63
            },
            72: function(t, e, r) {
                "use strict";
                var n = r(675),
                    o = r(783),
                    i = "function" == typeof Symbol && "function" == typeof Symbol.for ? Symbol.for("nodejs.util.inspect.custom") : null;

                function s(t) {
                    if (t > 0x7fffffff) throw RangeError('The value "' + t + '" is invalid for option "size"');
                    var e = new Uint8Array(t);
                    return Object.setPrototypeOf(e, a.prototype), e
                }

                function a(t, e, r) {
                    if ("number" == typeof t) {
                        if ("string" == typeof e) throw TypeError('The "string" argument must be of type string. Received type number');
                        return h(t)
                    }
                    return u(t, e, r)
                }

                function u(t, e, r) {
                    if ("string" == typeof t) {
                        var n = t,
                            o = e;
                        if (("string" != typeof o || "" === o) && (o = "utf8"), !a.isEncoding(o)) throw TypeError("Unknown encoding: " + o);
                        var i = 0 | p(n, o),
                            u = s(i),
                            f = u.write(n, o);
                        return f !== i && (u = u.slice(0, f)), u
                    }
                    if (ArrayBuffer.isView(t)) return c(t);
                    if (null == t) throw TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type " + typeof t);
                    if (R(t, ArrayBuffer) || t && R(t.buffer, ArrayBuffer) || "u" > typeof SharedArrayBuffer && (R(t, SharedArrayBuffer) || t && R(t.buffer, SharedArrayBuffer))) return function(t, e, r) {
                        var n;
                        if (e < 0 || t.byteLength < e) throw RangeError('"offset" is outside of buffer bounds');
                        if (t.byteLength < e + (r || 0)) throw RangeError('"length" is outside of buffer bounds');
                        return Object.setPrototypeOf(n = void 0 === e && void 0 === r ? new Uint8Array(t) : void 0 === r ? new Uint8Array(t, e) : new Uint8Array(t, e, r), a.prototype), n
                    }(t, e, r);
                    if ("number" == typeof t) throw TypeError('The "value" argument must not be of type number. Received type number');
                    var h = t.valueOf && t.valueOf();
                    if (null != h && h !== t) return a.from(h, e, r);
                    var g = function(t) {
                        if (a.isBuffer(t)) {
                            var e = 0 | l(t.length),
                                r = s(e);
                            return 0 === r.length || t.copy(r, 0, 0, e), r
                        }
                        return void 0 !== t.length ? "number" != typeof t.length || function(t) {
                            return t != t
                        }(t.length) ? s(0) : c(t) : "Buffer" === t.type && Array.isArray(t.data) ? c(t.data) : void 0
                    }(t);
                    if (g) return g;
                    if ("u" > typeof Symbol && null != Symbol.toPrimitive && "function" == typeof t[Symbol.toPrimitive]) return a.from(t[Symbol.toPrimitive]("string"), e, r);
                    throw TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type " + typeof t)
                }

                function f(t) {
                    if ("number" != typeof t) throw TypeError('"size" argument must be of type number');
                    if (t < 0) throw RangeError('The value "' + t + '" is invalid for option "size"')
                }

                function h(t) {
                    return f(t), s(t < 0 ? 0 : 0 | l(t))
                }

                function c(t) {
                    for (var e = t.length < 0 ? 0 : 0 | l(t.length), r = s(e), n = 0; n < e; n += 1) r[n] = 255 & t[n];
                    return r
                }
                e.Buffer = a, e.SlowBuffer = function(t) {
                    return +t != t && (t = 0), a.alloc(+t)
                }, e.INSPECT_MAX_BYTES = 50, e.kMaxLength = 0x7fffffff, a.TYPED_ARRAY_SUPPORT = function() {
                    try {
                        var t = new Uint8Array(1),
                            e = {
                                foo: function() {
                                    return 42
                                }
                            };
                        return Object.setPrototypeOf(e, Uint8Array.prototype), Object.setPrototypeOf(t, e), 42 === t.foo()
                    } catch (t) {
                        return !1
                    }
                }(), !a.TYPED_ARRAY_SUPPORT && "u" > typeof console && "function" == typeof console.error && console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support."), Object.defineProperty(a.prototype, "parent", {
                    enumerable: !0,
                    get: function() {
                        if (a.isBuffer(this)) return this.buffer
                    }
                }), Object.defineProperty(a.prototype, "offset", {
                    enumerable: !0,
                    get: function() {
                        if (a.isBuffer(this)) return this.byteOffset
                    }
                }), a.poolSize = 8192, a.from = function(t, e, r) {
                    return u(t, e, r)
                }, Object.setPrototypeOf(a.prototype, Uint8Array.prototype), Object.setPrototypeOf(a, Uint8Array), a.alloc = function(t, e, r) {
                    return (f(t), t <= 0) ? s(t) : void 0 !== e ? "string" == typeof r ? s(t).fill(e, r) : s(t).fill(e) : s(t)
                }, a.allocUnsafe = function(t) {
                    return h(t)
                }, a.allocUnsafeSlow = function(t) {
                    return h(t)
                };

                function l(t) {
                    if (t >= 0x7fffffff) throw RangeError("Attempt to allocate Buffer larger than maximum size: 0x7fffffff bytes");
                    return 0 | t
                }

                function p(t, e) {
                    if (a.isBuffer(t)) return t.length;
                    if (ArrayBuffer.isView(t) || R(t, ArrayBuffer)) return t.byteLength;
                    if ("string" != typeof t) throw TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type ' + typeof t);
                    var r = t.length,
                        n = arguments.length > 2 && !0 === arguments[2];
                    if (!n && 0 === r) return 0;
                    for (var o = !1;;) switch (e) {
                        case "ascii":
                        case "latin1":
                        case "binary":
                            return r;
                        case "utf8":
                        case "utf-8":
                            return C(t).length;
                        case "ucs2":
                        case "ucs-2":
                        case "utf16le":
                        case "utf-16le":
                            return 2 * r;
                        case "hex":
                            return r >>> 1;
                        case "base64":
                            return B(t).length;
                        default:
                            if (o) return n ? -1 : C(t).length;
                            e = ("" + e).toLowerCase(), o = !0
                    }
                }

                function g(t, e, r) {
                    var o, i, s, a = !1;
                    if ((void 0 === e || e < 0) && (e = 0), e > this.length || ((void 0 === r || r > this.length) && (r = this.length), r <= 0 || (r >>>= 0) <= (e >>>= 0))) return "";
                    for (t || (t = "utf8");;) switch (t) {
                        case "hex":
                            return function(t, e, r) {
                                var n = t.length;
                                (!e || e < 0) && (e = 0), (!r || r < 0 || r > n) && (r = n);
                                for (var o = "", i = e; i < r; ++i) o += T[t[i]];
                                return o
                            }(this, e, r);
                        case "utf8":
                        case "utf-8":
                            return m(this, e, r);
                        case "ascii":
                            return function(t, e, r) {
                                var n = "";
                                r = Math.min(t.length, r);
                                for (var o = e; o < r; ++o) n += String.fromCharCode(127 & t[o]);
                                return n
                            }(this, e, r);
                        case "latin1":
                        case "binary":
                            return function(t, e, r) {
                                var n = "";
                                r = Math.min(t.length, r);
                                for (var o = e; o < r; ++o) n += String.fromCharCode(t[o]);
                                return n
                            }(this, e, r);
                        case "base64":
                            return o = this, i = e, s = r, 0 === i && s === o.length ? n.fromByteArray(o) : n.fromByteArray(o.slice(i, s));
                        case "ucs2":
                        case "ucs-2":
                        case "utf16le":
                        case "utf-16le":
                            return function(t, e, r) {
                                for (var n = t.slice(e, r), o = "", i = 0; i < n.length; i += 2) o += String.fromCharCode(n[i] + 256 * n[i + 1]);
                                return o
                            }(this, e, r);
                        default:
                            if (a) throw TypeError("Unknown encoding: " + t);
                            t = (t + "").toLowerCase(), a = !0
                    }
                }

                function y(t, e, r) {
                    var n = t[e];
                    t[e] = t[r], t[r] = n
                }

                function d(t, e, r, n, o) {
                    var i;
                    if (0 === t.length) return -1;
                    if ("string" == typeof r ? (n = r, r = 0) : r > 0x7fffffff ? r = 0x7fffffff : r < -0x80000000 && (r = -0x80000000), (i = r *= 1) != i && (r = o ? 0 : t.length - 1), r < 0 && (r = t.length + r), r >= t.length)
                        if (o) return -1;
                        else r = t.length - 1;
                    else if (r < 0)
                        if (!o) return -1;
                        else r = 0;
                    if ("string" == typeof e && (e = a.from(e, n)), a.isBuffer(e)) return 0 === e.length ? -1 : b(t, e, r, n, o);
                    if ("number" == typeof e) {
                        if (e &= 255, "function" == typeof Uint8Array.prototype.indexOf)
                            if (o) return Uint8Array.prototype.indexOf.call(t, e, r);
                            else return Uint8Array.prototype.lastIndexOf.call(t, e, r);
                        return b(t, [e], r, n, o)
                    }
                    throw TypeError("val must be string, number or Buffer")
                }

                function b(t, e, r, n, o) {
                    var i, s = 1,
                        a = t.length,
                        u = e.length;
                    if (void 0 !== n && ("ucs2" === (n = String(n).toLowerCase()) || "ucs-2" === n || "utf16le" === n || "utf-16le" === n)) {
                        if (t.length < 2 || e.length < 2) return -1;
                        s = 2, a /= 2, u /= 2, r /= 2
                    }

                    function f(t, e) {
                        return 1 === s ? t[e] : t.readUInt16BE(e * s)
                    }
                    if (o) {
                        var h = -1;
                        for (i = r; i < a; i++)
                            if (f(t, i) === f(e, -1 === h ? 0 : i - h)) {
                                if (-1 === h && (h = i), i - h + 1 === u) return h * s
                            } else -1 !== h && (i -= i - h), h = -1
                    } else
                        for (r + u > a && (r = a - u), i = r; i >= 0; i--) {
                            for (var c = !0, l = 0; l < u; l++)
                                if (f(t, i + l) !== f(e, l)) {
                                    c = !1;
                                    break
                                }
                            if (c) return i
                        }
                    return -1
                }
                a.isBuffer = function(t) {
                    return null != t && !0 === t._isBuffer && t !== a.prototype
                }, a.compare = function(t, e) {
                    if (R(t, Uint8Array) && (t = a.from(t, t.offset, t.byteLength)), R(e, Uint8Array) && (e = a.from(e, e.offset, e.byteLength)), !a.isBuffer(t) || !a.isBuffer(e)) throw TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');
                    if (t === e) return 0;
                    for (var r = t.length, n = e.length, o = 0, i = Math.min(r, n); o < i; ++o)
                        if (t[o] !== e[o]) {
                            r = t[o], n = e[o];
                            break
                        }
                    return r < n ? -1 : +(n < r)
                }, a.isEncoding = function(t) {
                    switch (String(t).toLowerCase()) {
                        case "hex":
                        case "utf8":
                        case "utf-8":
                        case "ascii":
                        case "latin1":
                        case "binary":
                        case "base64":
                        case "ucs2":
                        case "ucs-2":
                        case "utf16le":
                        case "utf-16le":
                            return !0;
                        default:
                            return !1
                    }
                }, a.concat = function(t, e) {
                    if (!Array.isArray(t)) throw TypeError('"list" argument must be an Array of Buffers');
                    if (0 === t.length) return a.alloc(0);
                    if (void 0 === e)
                        for (r = 0, e = 0; r < t.length; ++r) e += t[r].length;
                    var r, n = a.allocUnsafe(e),
                        o = 0;
                    for (r = 0; r < t.length; ++r) {
                        var i = t[r];
                        if (R(i, Uint8Array) && (i = a.from(i)), !a.isBuffer(i)) throw TypeError('"list" argument must be an Array of Buffers');
                        i.copy(n, o), o += i.length
                    }
                    return n
                }, a.byteLength = p, a.prototype._isBuffer = !0, a.prototype.swap16 = function() {
                    var t = this.length;
                    if (t % 2 != 0) throw RangeError("Buffer size must be a multiple of 16-bits");
                    for (var e = 0; e < t; e += 2) y(this, e, e + 1);
                    return this
                }, a.prototype.swap32 = function() {
                    var t = this.length;
                    if (t % 4 != 0) throw RangeError("Buffer size must be a multiple of 32-bits");
                    for (var e = 0; e < t; e += 4) y(this, e, e + 3), y(this, e + 1, e + 2);
                    return this
                }, a.prototype.swap64 = function() {
                    var t = this.length;
                    if (t % 8 != 0) throw RangeError("Buffer size must be a multiple of 64-bits");
                    for (var e = 0; e < t; e += 8) y(this, e, e + 7), y(this, e + 1, e + 6), y(this, e + 2, e + 5), y(this, e + 3, e + 4);
                    return this
                }, a.prototype.toString = function() {
                    var t = this.length;
                    return 0 === t ? "" : 0 == arguments.length ? m(this, 0, t) : g.apply(this, arguments)
                }, a.prototype.toLocaleString = a.prototype.toString, a.prototype.equals = function(t) {
                    if (!a.isBuffer(t)) throw TypeError("Argument must be a Buffer");
                    return this === t || 0 === a.compare(this, t)
                }, a.prototype.inspect = function() {
                    var t = "",
                        r = e.INSPECT_MAX_BYTES;
                    return t = this.toString("hex", 0, r).replace(/(.{2})/g, "$1 ").trim(), this.length > r && (t += " ... "), "<Buffer " + t + ">"
                }, i && (a.prototype[i] = a.prototype.inspect), a.prototype.compare = function(t, e, r, n, o) {
                    if (R(t, Uint8Array) && (t = a.from(t, t.offset, t.byteLength)), !a.isBuffer(t)) throw TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type ' + typeof t);
                    if (void 0 === e && (e = 0), void 0 === r && (r = t ? t.length : 0), void 0 === n && (n = 0), void 0 === o && (o = this.length), e < 0 || r > t.length || n < 0 || o > this.length) throw RangeError("out of range index");
                    if (n >= o && e >= r) return 0;
                    if (n >= o) return -1;
                    if (e >= r) return 1;
                    if (e >>>= 0, r >>>= 0, n >>>= 0, o >>>= 0, this === t) return 0;
                    for (var i = o - n, s = r - e, u = Math.min(i, s), f = this.slice(n, o), h = t.slice(e, r), c = 0; c < u; ++c)
                        if (f[c] !== h[c]) {
                            i = f[c], s = h[c];
                            break
                        }
                    return i < s ? -1 : +(s < i)
                }, a.prototype.includes = function(t, e, r) {
                    return -1 !== this.indexOf(t, e, r)
                }, a.prototype.indexOf = function(t, e, r) {
                    return d(this, t, e, r, !0)
                }, a.prototype.lastIndexOf = function(t, e, r) {
                    return d(this, t, e, r, !1)
                };

                function m(t, e, r) {
                    r = Math.min(t.length, r);
                    for (var n = [], o = e; o < r;) {
                        var i, s, a, u, f = t[o],
                            h = null,
                            c = f > 239 ? 4 : f > 223 ? 3 : f > 191 ? 2 : 1;
                        if (o + c <= r) switch (c) {
                            case 1:
                                f < 128 && (h = f);
                                break;
                            case 2:
                                (192 & (i = t[o + 1])) == 128 && (u = (31 & f) << 6 | 63 & i) > 127 && (h = u);
                                break;
                            case 3:
                                i = t[o + 1], s = t[o + 2], (192 & i) == 128 && (192 & s) == 128 && (u = (15 & f) << 12 | (63 & i) << 6 | 63 & s) > 2047 && (u < 55296 || u > 57343) && (h = u);
                                break;
                            case 4:
                                i = t[o + 1], s = t[o + 2], a = t[o + 3], (192 & i) == 128 && (192 & s) == 128 && (192 & a) == 128 && (u = (15 & f) << 18 | (63 & i) << 12 | (63 & s) << 6 | 63 & a) > 65535 && u < 1114112 && (h = u)
                        }
                        null === h ? (h = 65533, c = 1) : h > 65535 && (h -= 65536, n.push(h >>> 10 & 1023 | 55296), h = 56320 | 1023 & h), n.push(h), o += c
                    }
                    var l = n,
                        p = l.length;
                    if (p <= 4096) return String.fromCharCode.apply(String, l);
                    for (var g = "", y = 0; y < p;) g += String.fromCharCode.apply(String, l.slice(y, y += 4096));
                    return g
                }

                function v(t, e, r) {
                    if (t % 1 != 0 || t < 0) throw RangeError("offset is not uint");
                    if (t + e > r) throw RangeError("Trying to access beyond buffer length")
                }

                function w(t, e, r, n, o, i) {
                    if (!a.isBuffer(t)) throw TypeError('"buffer" argument must be a Buffer instance');
                    if (e > o || e < i) throw RangeError('"value" argument is out of bounds');
                    if (r + n > t.length) throw RangeError("Index out of range")
                }

                function E(t, e, r, n, o, i) {
                    if (r + n > t.length || r < 0) throw RangeError("Index out of range")
                }

                function S(t, e, r, n, i) {
                    return e *= 1, r >>>= 0, i || E(t, e, r, 4, 34028234663852886e22, -34028234663852886e22), o.write(t, e, r, n, 23, 4), r + 4
                }

                function k(t, e, r, n, i) {
                    return e *= 1, r >>>= 0, i || E(t, e, r, 8, 17976931348623157e292, -17976931348623157e292), o.write(t, e, r, n, 52, 8), r + 8
                }
                a.prototype.write = function(t, e, r, n) {
                    if (void 0 === e) n = "utf8", r = this.length, e = 0;
                    else if (void 0 === r && "string" == typeof e) n = e, r = this.length, e = 0;
                    else if (isFinite(e)) e >>>= 0, isFinite(r) ? (r >>>= 0, void 0 === n && (n = "utf8")) : (n = r, r = void 0);
                    else throw Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");
                    var o, i, s, a, u, f, h, c, l = this.length - e;
                    if ((void 0 === r || r > l) && (r = l), t.length > 0 && (r < 0 || e < 0) || e > this.length) throw RangeError("Attempt to write outside buffer bounds");
                    n || (n = "utf8");
                    for (var p = !1;;) switch (n) {
                        case "hex":
                            return function(t, e, r, n) {
                                r = Number(r) || 0;
                                var o = t.length - r;
                                n ? (n = Number(n)) > o && (n = o) : n = o;
                                var i = e.length;
                                n > i / 2 && (n = i / 2);
                                for (var s = 0; s < n; ++s) {
                                    var a, u = parseInt(e.substr(2 * s, 2), 16);
                                    if ((a = u) != a) break;
                                    t[r + s] = u
                                }
                                return s
                            }(this, t, e, r);
                        case "utf8":
                        case "utf-8":
                            return o = e, i = r, P(C(t, this.length - o), this, o, i);
                        case "ascii":
                            return s = e, a = r, P(O(t), this, s, a);
                        case "latin1":
                        case "binary":
                            return function(t, e, r, n) {
                                return P(O(e), t, r, n)
                            }(this, t, e, r);
                        case "base64":
                            return u = e, f = r, P(B(t), this, u, f);
                        case "ucs2":
                        case "ucs-2":
                        case "utf16le":
                        case "utf-16le":
                            return h = e, c = r, P(function(t, e) {
                                for (var r, n, o = [], i = 0; i < t.length && !((e -= 2) < 0); ++i) n = (r = t.charCodeAt(i)) >> 8, o.push(r % 256), o.push(n);
                                return o
                            }(t, this.length - h), this, h, c);
                        default:
                            if (p) throw TypeError("Unknown encoding: " + n);
                            n = ("" + n).toLowerCase(), p = !0
                    }
                }, a.prototype.toJSON = function() {
                    return {
                        type: "Buffer",
                        data: Array.prototype.slice.call(this._arr || this, 0)
                    }
                }, a.prototype.slice = function(t, e) {
                    var r = this.length;
                    t = ~~t, e = void 0 === e ? r : ~~e, t < 0 ? (t += r) < 0 && (t = 0) : t > r && (t = r), e < 0 ? (e += r) < 0 && (e = 0) : e > r && (e = r), e < t && (e = t);
                    var n = this.subarray(t, e);
                    return Object.setPrototypeOf(n, a.prototype), n
                }, a.prototype.readUIntLE = function(t, e, r) {
                    t >>>= 0, e >>>= 0, r || v(t, e, this.length);
                    for (var n = this[t], o = 1, i = 0; ++i < e && (o *= 256);) n += this[t + i] * o;
                    return n
                }, a.prototype.readUIntBE = function(t, e, r) {
                    t >>>= 0, e >>>= 0, r || v(t, e, this.length);
                    for (var n = this[t + --e], o = 1; e > 0 && (o *= 256);) n += this[t + --e] * o;
                    return n
                }, a.prototype.readUInt8 = function(t, e) {
                    return t >>>= 0, e || v(t, 1, this.length), this[t]
                }, a.prototype.readUInt16LE = function(t, e) {
                    return t >>>= 0, e || v(t, 2, this.length), this[t] | this[t + 1] << 8
                }, a.prototype.readUInt16BE = function(t, e) {
                    return t >>>= 0, e || v(t, 2, this.length), this[t] << 8 | this[t + 1]
                }, a.prototype.readUInt32LE = function(t, e) {
                    return t >>>= 0, e || v(t, 4, this.length), (this[t] | this[t + 1] << 8 | this[t + 2] << 16) + 0x1000000 * this[t + 3]
                }, a.prototype.readUInt32BE = function(t, e) {
                    return t >>>= 0, e || v(t, 4, this.length), 0x1000000 * this[t] + (this[t + 1] << 16 | this[t + 2] << 8 | this[t + 3])
                }, a.prototype.readIntLE = function(t, e, r) {
                    t >>>= 0, e >>>= 0, r || v(t, e, this.length);
                    for (var n = this[t], o = 1, i = 0; ++i < e && (o *= 256);) n += this[t + i] * o;
                    return n >= (o *= 128) && (n -= Math.pow(2, 8 * e)), n
                }, a.prototype.readIntBE = function(t, e, r) {
                    t >>>= 0, e >>>= 0, r || v(t, e, this.length);
                    for (var n = e, o = 1, i = this[t + --n]; n > 0 && (o *= 256);) i += this[t + --n] * o;
                    return i >= (o *= 128) && (i -= Math.pow(2, 8 * e)), i
                }, a.prototype.readInt8 = function(t, e) {
                    return (t >>>= 0, e || v(t, 1, this.length), 128 & this[t]) ? -((255 - this[t] + 1) * 1) : this[t]
                }, a.prototype.readInt16LE = function(t, e) {
                    t >>>= 0, e || v(t, 2, this.length);
                    var r = this[t] | this[t + 1] << 8;
                    return 32768 & r ? 0xffff0000 | r : r
                }, a.prototype.readInt16BE = function(t, e) {
                    t >>>= 0, e || v(t, 2, this.length);
                    var r = this[t + 1] | this[t] << 8;
                    return 32768 & r ? 0xffff0000 | r : r
                }, a.prototype.readInt32LE = function(t, e) {
                    return t >>>= 0, e || v(t, 4, this.length), this[t] | this[t + 1] << 8 | this[t + 2] << 16 | this[t + 3] << 24
                }, a.prototype.readInt32BE = function(t, e) {
                    return t >>>= 0, e || v(t, 4, this.length), this[t] << 24 | this[t + 1] << 16 | this[t + 2] << 8 | this[t + 3]
                }, a.prototype.readFloatLE = function(t, e) {
                    return t >>>= 0, e || v(t, 4, this.length), o.read(this, t, !0, 23, 4)
                }, a.prototype.readFloatBE = function(t, e) {
                    return t >>>= 0, e || v(t, 4, this.length), o.read(this, t, !1, 23, 4)
                }, a.prototype.readDoubleLE = function(t, e) {
                    return t >>>= 0, e || v(t, 8, this.length), o.read(this, t, !0, 52, 8)
                }, a.prototype.readDoubleBE = function(t, e) {
                    return t >>>= 0, e || v(t, 8, this.length), o.read(this, t, !1, 52, 8)
                }, a.prototype.writeUIntLE = function(t, e, r, n) {
                    if (t *= 1, e >>>= 0, r >>>= 0, !n) {
                        var o = Math.pow(2, 8 * r) - 1;
                        w(this, t, e, r, o, 0)
                    }
                    var i = 1,
                        s = 0;
                    for (this[e] = 255 & t; ++s < r && (i *= 256);) this[e + s] = t / i & 255;
                    return e + r
                }, a.prototype.writeUIntBE = function(t, e, r, n) {
                    if (t *= 1, e >>>= 0, r >>>= 0, !n) {
                        var o = Math.pow(2, 8 * r) - 1;
                        w(this, t, e, r, o, 0)
                    }
                    var i = r - 1,
                        s = 1;
                    for (this[e + i] = 255 & t; --i >= 0 && (s *= 256);) this[e + i] = t / s & 255;
                    return e + r
                }, a.prototype.writeUInt8 = function(t, e, r) {
                    return t *= 1, e >>>= 0, r || w(this, t, e, 1, 255, 0), this[e] = 255 & t, e + 1
                }, a.prototype.writeUInt16LE = function(t, e, r) {
                    return t *= 1, e >>>= 0, r || w(this, t, e, 2, 65535, 0), this[e] = 255 & t, this[e + 1] = t >>> 8, e + 2
                }, a.prototype.writeUInt16BE = function(t, e, r) {
                    return t *= 1, e >>>= 0, r || w(this, t, e, 2, 65535, 0), this[e] = t >>> 8, this[e + 1] = 255 & t, e + 2
                }, a.prototype.writeUInt32LE = function(t, e, r) {
                    return t *= 1, e >>>= 0, r || w(this, t, e, 4, 0xffffffff, 0), this[e + 3] = t >>> 24, this[e + 2] = t >>> 16, this[e + 1] = t >>> 8, this[e] = 255 & t, e + 4
                }, a.prototype.writeUInt32BE = function(t, e, r) {
                    return t *= 1, e >>>= 0, r || w(this, t, e, 4, 0xffffffff, 0), this[e] = t >>> 24, this[e + 1] = t >>> 16, this[e + 2] = t >>> 8, this[e + 3] = 255 & t, e + 4
                }, a.prototype.writeIntLE = function(t, e, r, n) {
                    if (t *= 1, e >>>= 0, !n) {
                        var o = Math.pow(2, 8 * r - 1);
                        w(this, t, e, r, o - 1, -o)
                    }
                    var i = 0,
                        s = 1,
                        a = 0;
                    for (this[e] = 255 & t; ++i < r && (s *= 256);) t < 0 && 0 === a && 0 !== this[e + i - 1] && (a = 1), this[e + i] = (t / s | 0) - a & 255;
                    return e + r
                }, a.prototype.writeIntBE = function(t, e, r, n) {
                    if (t *= 1, e >>>= 0, !n) {
                        var o = Math.pow(2, 8 * r - 1);
                        w(this, t, e, r, o - 1, -o)
                    }
                    var i = r - 1,
                        s = 1,
                        a = 0;
                    for (this[e + i] = 255 & t; --i >= 0 && (s *= 256);) t < 0 && 0 === a && 0 !== this[e + i + 1] && (a = 1), this[e + i] = (t / s | 0) - a & 255;
                    return e + r
                }, a.prototype.writeInt8 = function(t, e, r) {
                    return t *= 1, e >>>= 0, r || w(this, t, e, 1, 127, -128), t < 0 && (t = 255 + t + 1), this[e] = 255 & t, e + 1
                }, a.prototype.writeInt16LE = function(t, e, r) {
                    return t *= 1, e >>>= 0, r || w(this, t, e, 2, 32767, -32768), this[e] = 255 & t, this[e + 1] = t >>> 8, e + 2
                }, a.prototype.writeInt16BE = function(t, e, r) {
                    return t *= 1, e >>>= 0, r || w(this, t, e, 2, 32767, -32768), this[e] = t >>> 8, this[e + 1] = 255 & t, e + 2
                }, a.prototype.writeInt32LE = function(t, e, r) {
                    return t *= 1, e >>>= 0, r || w(this, t, e, 4, 0x7fffffff, -0x80000000), this[e] = 255 & t, this[e + 1] = t >>> 8, this[e + 2] = t >>> 16, this[e + 3] = t >>> 24, e + 4
                }, a.prototype.writeInt32BE = function(t, e, r) {
                    return t *= 1, e >>>= 0, r || w(this, t, e, 4, 0x7fffffff, -0x80000000), t < 0 && (t = 0xffffffff + t + 1), this[e] = t >>> 24, this[e + 1] = t >>> 16, this[e + 2] = t >>> 8, this[e + 3] = 255 & t, e + 4
                }, a.prototype.writeFloatLE = function(t, e, r) {
                    return S(this, t, e, !0, r)
                }, a.prototype.writeFloatBE = function(t, e, r) {
                    return S(this, t, e, !1, r)
                }, a.prototype.writeDoubleLE = function(t, e, r) {
                    return k(this, t, e, !0, r)
                }, a.prototype.writeDoubleBE = function(t, e, r) {
                    return k(this, t, e, !1, r)
                }, a.prototype.copy = function(t, e, r, n) {
                    if (!a.isBuffer(t)) throw TypeError("argument should be a Buffer");
                    if (r || (r = 0), n || 0 === n || (n = this.length), e >= t.length && (e = t.length), e || (e = 0), n > 0 && n < r && (n = r), n === r || 0 === t.length || 0 === this.length) return 0;
                    if (e < 0) throw RangeError("targetStart out of bounds");
                    if (r < 0 || r >= this.length) throw RangeError("Index out of range");
                    if (n < 0) throw RangeError("sourceEnd out of bounds");
                    n > this.length && (n = this.length), t.length - e < n - r && (n = t.length - e + r);
                    var o = n - r;
                    if (this === t && "function" == typeof Uint8Array.prototype.copyWithin) this.copyWithin(e, r, n);
                    else if (this === t && r < e && e < n)
                        for (var i = o - 1; i >= 0; --i) t[i + e] = this[i + r];
                    else Uint8Array.prototype.set.call(t, this.subarray(r, n), e);
                    return o
                }, a.prototype.fill = function(t, e, r, n) {
                    if ("string" == typeof t) {
                        if ("string" == typeof e ? (n = e, e = 0, r = this.length) : "string" == typeof r && (n = r, r = this.length), void 0 !== n && "string" != typeof n) throw TypeError("encoding must be a string");
                        if ("string" == typeof n && !a.isEncoding(n)) throw TypeError("Unknown encoding: " + n);
                        if (1 === t.length) {
                            var o, i = t.charCodeAt(0);
                            ("utf8" === n && i < 128 || "latin1" === n) && (t = i)
                        }
                    } else "number" == typeof t ? t &= 255 : "boolean" == typeof t && (t = Number(t));
                    if (e < 0 || this.length < e || this.length < r) throw RangeError("Out of range index");
                    if (r <= e) return this;
                    if (e >>>= 0, r = void 0 === r ? this.length : r >>> 0, t || (t = 0), "number" == typeof t)
                        for (o = e; o < r; ++o) this[o] = t;
                    else {
                        var s = a.isBuffer(t) ? t : a.from(t, n),
                            u = s.length;
                        if (0 === u) throw TypeError('The value "' + t + '" is invalid for argument "value"');
                        for (o = 0; o < r - e; ++o) this[o + e] = s[o % u]
                    }
                    return this
                };
                var A = /[^+/0-9A-Za-z-_]/g;

                function C(t, e) {
                    e = e || 1 / 0;
                    for (var r, n = t.length, o = null, i = [], s = 0; s < n; ++s) {
                        if ((r = t.charCodeAt(s)) > 55295 && r < 57344) {
                            if (!o) {
                                if (r > 56319 || s + 1 === n) {
                                    (e -= 3) > -1 && i.push(239, 191, 189);
                                    continue
                                }
                                o = r;
                                continue
                            }
                            if (r < 56320) {
                                (e -= 3) > -1 && i.push(239, 191, 189), o = r;
                                continue
                            }
                            r = (o - 55296 << 10 | r - 56320) + 65536
                        } else o && (e -= 3) > -1 && i.push(239, 191, 189);
                        if (o = null, r < 128) {
                            if ((e -= 1) < 0) break;
                            i.push(r)
                        } else if (r < 2048) {
                            if ((e -= 2) < 0) break;
                            i.push(r >> 6 | 192, 63 & r | 128)
                        } else if (r < 65536) {
                            if ((e -= 3) < 0) break;
                            i.push(r >> 12 | 224, r >> 6 & 63 | 128, 63 & r | 128)
                        } else if (r < 1114112) {
                            if ((e -= 4) < 0) break;
                            i.push(r >> 18 | 240, r >> 12 & 63 | 128, r >> 6 & 63 | 128, 63 & r | 128)
                        } else throw Error("Invalid code point")
                    }
                    return i
                }

                function O(t) {
                    for (var e = [], r = 0; r < t.length; ++r) e.push(255 & t.charCodeAt(r));
                    return e
                }

                function B(t) {
                    return n.toByteArray(function(t) {
                        if ((t = (t = t.split("=")[0]).trim().replace(A, "")).length < 2) return "";
                        for (; t.length % 4 != 0;) t += "=";
                        return t
                    }(t))
                }

                function P(t, e, r, n) {
                    for (var o = 0; o < n && !(o + r >= e.length) && !(o >= t.length); ++o) e[o + r] = t[o];
                    return o
                }

                function R(t, e) {
                    return t instanceof e || null != t && null != t.constructor && null != t.constructor.name && t.constructor.name === e.name
                }
                var T = function() {
                    for (var t = "0123456789abcdef", e = Array(256), r = 0; r < 16; ++r)
                        for (var n = 16 * r, o = 0; o < 16; ++o) e[n + o] = t[r] + t[o];
                    return e
                }()
            },
            783: function(t, e) {
                e.read = function(t, e, r, n, o) {
                    var i, s, a = 8 * o - n - 1,
                        u = (1 << a) - 1,
                        f = u >> 1,
                        h = -7,
                        c = r ? o - 1 : 0,
                        l = r ? -1 : 1,
                        p = t[e + c];
                    for (c += l, i = p & (1 << -h) - 1, p >>= -h, h += a; h > 0; i = 256 * i + t[e + c], c += l, h -= 8);
                    for (s = i & (1 << -h) - 1, i >>= -h, h += n; h > 0; s = 256 * s + t[e + c], c += l, h -= 8);
                    if (0 === i) i = 1 - f;
                    else {
                        if (i === u) return s ? NaN : 1 / 0 * (p ? -1 : 1);
                        s += Math.pow(2, n), i -= f
                    }
                    return (p ? -1 : 1) * s * Math.pow(2, i - n)
                }, e.write = function(t, e, r, n, o, i) {
                    var s, a, u, f = 8 * i - o - 1,
                        h = (1 << f) - 1,
                        c = h >> 1,
                        l = 5960464477539062e-23 * (23 === o),
                        p = n ? 0 : i - 1,
                        g = n ? 1 : -1,
                        y = +(e < 0 || 0 === e && 1 / e < 0);
                    for (isNaN(e = Math.abs(e)) || e === 1 / 0 ? (a = +!!isNaN(e), s = h) : (s = Math.floor(Math.log(e) / Math.LN2), e * (u = Math.pow(2, -s)) < 1 && (s--, u *= 2), s + c >= 1 ? e += l / u : e += l * Math.pow(2, 1 - c), e * u >= 2 && (s++, u /= 2), s + c >= h ? (a = 0, s = h) : s + c >= 1 ? (a = (e * u - 1) * Math.pow(2, o), s += c) : (a = e * Math.pow(2, c - 1) * Math.pow(2, o), s = 0)); o >= 8; t[r + p] = 255 & a, p += g, a /= 256, o -= 8);
                    for (s = s << o | a, f += o; f > 0; t[r + p] = 255 & s, p += g, s /= 256, f -= 8);
                    t[r + p - g] |= 128 * y
                }
            }
        },
        o = {};

    function i(t) {
        var e = o[t];
        if (void 0 !== e) return e.exports;
        var r = o[t] = {
                exports: {}
            },
            s = !0;
        try {
            n[t](r, r.exports, i), s = !1
        } finally {
            s && delete o[t]
        }
        return r.exports
    }
    i.ab = "/ROOT/node_modules/.pnpm/next@16.2.6_@babel+core@7.29.0_@opentelemetry+api@1.9.1_babel-plugin-react-compiler@1.0_010f4035fa80b5f36590678868a3e0b1/node_modules/next/dist/compiled/buffer/", e.exports = i(72)
}, 552470, t => {
    "use strict";
    let e = Symbol("Comlink.proxy"),
        r = Symbol("Comlink.endpoint"),
        n = Symbol("Comlink.releaseProxy"),
        o = Symbol("Comlink.finalizer"),
        i = Symbol("Comlink.thrown"),
        s = t => "object" == typeof t && null !== t || "function" == typeof t,
        a = new Map([
            ["proxy", {
                canHandle: t => s(t) && t[e],
                serialize(t) {
                    let {
                        port1: e,
                        port2: r
                    } = new MessageChannel;
                    return u(t, e), [r, [r]]
                },
                deserialize: t => (t.start(), h(t))
            }],
            ["throw", {
                canHandle: t => s(t) && i in t,
                serialize: ({
                    value: t
                }) => [t instanceof Error ? {
                        isError: !0,
                        value: {
                            message: t.message,
                            name: t.name,
                            stack: t.stack
                        }
                    } : {
                        isError: !1,
                        value: t
                    },
                    []
                ],
                deserialize(t) {
                    if (t.isError) throw Object.assign(Error(t.value.message), t.value);
                    throw t.value
                }
            }]
        ]);

    function u(t, e = globalThis, r = ["*"]) {
        e.addEventListener("message", function n(s) {
            let a;
            if (!s || !s.data) return;
            if (! function(t, e) {
                    for (let r of t)
                        if (e === r || "*" === r || r instanceof RegExp && r.test(e)) return !0;
                    return !1
                }(r, s.origin)) return void console.warn(`Invalid origin '${s.origin}' for comlink proxy`);
            let {
                id: h,
                type: c,
                path: l
            } = Object.assign({
                path: []
            }, s.data), p = (s.data.argumentList || []).map(v);
            try {
                let e = l.slice(0, -1).reduce((t, e) => t[e], t),
                    r = l.reduce((t, e) => t[e], t);
                switch (c) {
                    case "GET":
                        a = r;
                        break;
                    case "SET":
                        e[l.slice(-1)[0]] = v(s.data.value), a = !0;
                        break;
                    case "APPLY":
                        a = r.apply(e, p);
                        break;
                    case "CONSTRUCT":
                        {
                            let t = new r(...p);a = b(t)
                        }
                        break;
                    case "ENDPOINT":
                        {
                            var g, y;
                            let {
                                port1: e,
                                port2: r
                            } = new MessageChannel;u(t, r),
                            g = e,
                            y = [e],
                            d.set(g, y),
                            a = g
                        }
                        break;
                    case "RELEASE":
                        a = void 0;
                        break;
                    default:
                        return
                }
            } catch (t) {
                a = {
                    value: t,
                    [i]: 0
                }
            }
            Promise.resolve(a).catch(t => ({
                value: t,
                [i]: 0
            })).then(r => {
                let [i, s] = m(r);
                e.postMessage(Object.assign(Object.assign({}, i), {
                    id: h
                }), s), "RELEASE" === c && (e.removeEventListener("message", n), f(e), o in t && "function" == typeof t[o] && t[o]())
            }).catch(t => {
                let [r, n] = m({
                    value: TypeError("Unserializable return value"),
                    [i]: 0
                });
                e.postMessage(Object.assign(Object.assign({}, r), {
                    id: h
                }), n)
            })
        }), e.start && e.start()
    }

    function f(t) {
        "MessagePort" === t.constructor.name && t.close()
    }

    function h(t, e) {
        let o = new Map;
        return t.addEventListener("message", function(t) {
                let {
                    data: e
                } = t;
                if (!e || !e.id) return;
                let r = o.get(e.id);
                if (r) try {
                    r(e)
                } finally {
                    o.delete(e.id)
                }
            }),
            function t(e, o, i = [], s = function() {}) {
                let a, u = !1,
                    f = new Proxy(s, {
                        get(r, s) {
                            if (c(u), s === n) return () => {
                                g && g.unregister(f), l(e), o.clear(), u = !0
                            };
                            if ("then" === s) {
                                if (0 === i.length) return {
                                    then: () => f
                                };
                                let t = w(e, o, {
                                    type: "GET",
                                    path: i.map(t => t.toString())
                                }).then(v);
                                return t.then.bind(t)
                            }
                            return t(e, o, [...i, s])
                        },
                        set(t, r, n) {
                            c(u);
                            let [s, a] = m(n);
                            return w(e, o, {
                                type: "SET",
                                path: [...i, r].map(t => t.toString()),
                                value: s
                            }, a).then(v)
                        },
                        apply(n, s, a) {
                            c(u);
                            let f = i[i.length - 1];
                            if (f === r) return w(e, o, {
                                type: "ENDPOINT"
                            }).then(v);
                            if ("bind" === f) return t(e, o, i.slice(0, -1));
                            let [h, l] = y(a);
                            return w(e, o, {
                                type: "APPLY",
                                path: i.map(t => t.toString()),
                                argumentList: h
                            }, l).then(v)
                        },
                        construct(t, r) {
                            c(u);
                            let [n, s] = y(r);
                            return w(e, o, {
                                type: "CONSTRUCT",
                                path: i.map(t => t.toString()),
                                argumentList: n
                            }, s).then(v)
                        }
                    });
                return a = (p.get(e) || 0) + 1, p.set(e, a), g && g.register(f, e, f), f
            }(t, o, [], e)
    }

    function c(t) {
        if (t) throw Error("Proxy has been released and is not useable")
    }

    function l(t) {
        return w(t, new Map, {
            type: "RELEASE"
        }).then(() => {
            f(t)
        })
    }
    let p = new WeakMap,
        g = "FinalizationRegistry" in globalThis && new FinalizationRegistry(t => {
            let e = (p.get(t) || 0) - 1;
            p.set(t, e), 0 === e && l(t)
        });

    function y(t) {
        var e;
        let r = t.map(m);
        return [r.map(t => t[0]), (e = r.map(t => t[1]), Array.prototype.concat.apply([], e))]
    }
    let d = new WeakMap;

    function b(t) {
        return Object.assign(t, {
            [e]: !0
        })
    }

    function m(t) {
        for (let [e, r] of a)
            if (r.canHandle(t)) {
                let [n, o] = r.serialize(t);
                return [{
                    type: "HANDLER",
                    name: e,
                    value: n
                }, o]
            }
        return [{
            type: "RAW",
            value: t
        }, d.get(t) || []]
    }

    function v(t) {
        switch (t.type) {
            case "HANDLER":
                return a.get(t.name).deserialize(t.value);
            case "RAW":
                return t.value
        }
    }

    function w(t, e, r, n) {
        return new Promise(o => {
            let i = [, , , , ].fill(0).map(() => Math.floor(Math.random() * Number.MAX_SAFE_INTEGER).toString(16)).join("-");
            e.set(i, o), t.start && t.start(), t.postMessage(Object.assign({
                id: i
            }, r), n)
        })
    }
    t.s(["expose", 0, u, "proxy", 0, b, "wrap", 0, h])
}, 260536, 930896, 282750, t => {
    "use strict";
    var e = t.i(93257),
        r = null;
    let n = r = "u" > typeof WebSocket ? WebSocket : "u" > typeof MozWebSocket ? MozWebSocket : t.g.WebSocket || t.g.MozWebSocket,
        o = {
            Uninstantiated: -1,
            Connecting: n.CONNECTING,
            Connected: n.OPEN,
            Disconnecting: n.CLOSING,
            Disconnected: n.CLOSED
        };
    t.s(["WebsocketReadyStates", 0, o], 930896);
    let i = t => {
            switch (t) {
                case o.Uninstantiated:
                    return "disconnected";
                case o.Connecting:
                    return "connecting";
                case o.Connected:
                    return "connected";
                case o.Disconnecting:
                    return "disconnecting";
                case o.Disconnected:
                    return "disconnected"
            }
        },
        s = t => {
            try {
                return JSON.parse(t)
            } catch {
                return
            }
        };
    t.s(["parseConnectionStatus", 0, i, "parseMessageEvent", 0, t => {
        try {
            if ("PING" === t.data || "ping" === t.data) return {
                type: "ping"
            };
            if ("PONG" === t.data || "pong" === t.data) return {
                type: "pong"
            };
            if ("string" == typeof t.data) {
                let e = s(t.data);
                if (!e) return {
                    type: "string",
                    data: t.data
                };
                return {
                    type: "message",
                    data: e
                }
            }
            if (e.Buffer.isBuffer(t.data)) {
                let e = t.data.toString("utf8"),
                    r = s(e);
                if (!r) return {
                    type: "string",
                    data: e
                };
                return {
                    type: "message",
                    data: r
                }
            }
            if (t.data instanceof ArrayBuffer) {
                let r = e.Buffer.from(t.data).toString("utf8"),
                    n = s(r);
                if (!n) return {
                    type: "string",
                    data: r
                };
                return {
                    type: "message",
                    data: n
                }
            }
            if (Array.isArray(t.data) && t.data.every(e.Buffer.isBuffer)) {
                let r = e.Buffer.concat(t.data.map(t => Uint8Array.from(t))).toString("utf8"),
                    n = s(r);
                if (!n) return {
                    type: "string",
                    data: r
                };
                return {
                    type: "message",
                    data: n
                }
            }
            return {
                type: "error",
                error: Error("Invalid message data"),
                event: t
            }
        } catch (e) {
            return {
                type: "error",
                error: e,
                event: t
            }
        }
    }], 260536);
    class a {#
        t = new Map;
        constructor() {
            this.#t = new Map
        }
        add(t, e) {
            let r = {
                once: e.once,
                filter: e.filter ? t => e.filter(t) : void 0,
                callback: t => e.callback(t)
            };
            return this.#t.set(t, r), () => this.remove(t)
        }
        remove(t) {
            this.#t.delete(t)
        }
        emit(t) {
            (Array.isArray(t) ? t : [t]).forEach(t => {
                for (let [e, r] of this.#t)(r.filter ? ? (() => !0))(t) && (r.callback(t), r.once && this.#t.delete(e))
            })
        }
        reset() {
            this.#t.clear()
        }
    }
    t.s(["WebsocketClient", 0, class {
        url;
        autoReconnect;
        preventAutoReconnect;#
        e;#
        r;
        socket;
        logger;#
        n;#
        o;#
        i;#
        s;#
        a;#
        u;#
        f;#
        h;
        constructor({
            url: t,
            ping: e,
            pong: r,
            autoReconnect: n = !0,
            logger: o,
            callbacks: i
        }) {
            this.url = t, this.#e = this.parsePingPongConfig("ping", e), this.#r = this.parsePingPongConfig("pong", r), this.autoReconnect = n, this.preventAutoReconnect = !1, this.logger = o, this.#o = i ? .onOpen, this.#i = i ? .onClose, this.#s = i ? .onError, this.#a = i ? .onMessage, this.#u = i ? .onSubscribe, this.#f = i ? .onUnsubscribe, this.#h = i ? .onStatusChange, this.#n = new a, this.socket = this.createSocket()
        }
        connect() {
            this.onStatusChange("connecting"), this.#n.emit({
                type: "status",
                state: "connecting"
            }), this.#e.once && this.ping(), this.#r.once && this.pong()
        }
        disconnect() {
            this.#n.emit({
                type: "status",
                state: "disconnecting"
            }), this.preventAutoReconnect = !0, "function" == typeof this.socket.terminate ? this.socket.terminate() : this.socket.close(), this.delay(5e3).then(() => {
                this.preventAutoReconnect && (this.preventAutoReconnect = !1)
            })
        }
        send(t) {
            this.socket.send(t)
        }
        subscribe(t) {
            this.#u && this.#u({
                subscription: t,
                client: this
            }), this.socket.readyState !== n.OPEN ? this.connect() : this.#c(t)
        }
        unsubscribe(t) {
            this.socket.readyState === n.OPEN && (this.#f && this.#f({
                subscription: t,
                client: this
            }), this.#l(t))
        }
        ping() {
            if (!this.connected) return console.warn("Socket not connected. Ready state is:", this.socket.readyState);
            this.socket.send(this.#e.message, t => {
                t && console.error("ping error", t)
            })
        }
        pong() {
            if (!this.connected) return console.warn("Socket not connected. Ready state is:", this.socket.readyState);
            this.socket.send(this.#r.message, t => {
                t && console.error("pong error", t)
            })
        }
        configure(t) {
            let {
                callbacks: e,
                listeners: r,
                options: n
            } = t;
            e && (e.onOpen && (this.#o = e.onOpen), e.onClose && (this.#i = e.onClose), e.onError && (this.#s = e.onError), e.onMessage && (this.#a = e.onMessage), e.onSubscribe && (this.#u = e.onSubscribe), e.onUnsubscribe && (this.#f = e.onUnsubscribe), e.onStatusChange && (this.#h = e.onStatusChange)), n && (n.ping && (this.#e = this.parsePingPongConfig("ping", n.ping)), n.pong && (this.#r = this.parsePingPongConfig("pong", n.pong)), n.autoReconnect && (this.autoReconnect = n.autoReconnect)), r && r.forEach(t => {
                this.#n.add(t.key, t.listener)
            })
        }
        get state() {
            return {
                readyState: this.socket.readyState,
                status: i(this.socket.readyState),
                connected: this.socket.readyState === n.OPEN
            }
        }
        get connected() {
            return this.socket.readyState === n.OPEN
        }
        listen(t, e) {
            return this.#n.add(t, e)
        }#
        c(t, e) {
            let r = [];
            return e ? .listeners && e.listeners.forEach(t => {
                r.push(this.#n.add(t.key, t.listener))
            }), this.send(t), () => r.forEach(t => {
                t ? .()
            })
        }#
        l(t) {
            this.send(t)
        }
        onOpen(t) {
            this.onStatusChange("connected"), this.#o && this.#o({
                event: t,
                client: this
            }), this.#n.emit({
                type: "status",
                state: "connected",
                event: t
            }), this.logger && this.logger.debug({
                title: "WebSocket opened",
                message: "WebSocket opened",
                context: {
                    url: this.url,
                    ...t
                }
            })
        }
        onClose(t) {
            this.onStatusChange("disconnected"), this.#i && this.#i({
                event: t,
                client: this
            }), this.#n.emit({
                type: "status",
                state: "disconnected",
                event: t
            }), this.logger && this.logger.debug({
                title: "WebSocket closed",
                message: "WebSocket closed",
                context: {
                    url: this.url,
                    ...t
                }
            })
        }
        onError(t) {
            this.#s && this.#s({
                event: t,
                client: this
            }), this.autoReconnect && (this.preventAutoReconnect || this.connect(), this.preventAutoReconnect = !1), this.#n.emit({
                type: "error",
                event: t
            }), this.logger && this.logger.error({
                title: "WebSocket error",
                message: "WebSocket error",
                context: { ...t
                }
            })
        }
        onMessage(t) {
            this.#a && this.#a({
                event: t,
                client: this
            }), this.#n.emit({
                type: "message",
                event: t
            }), this.isPing(t) && this.onPing(), this.isPong(t) && this.onPong(), this.logger && this.logger.debug({
                title: "WebSocket message",
                message: "WebSocket message",
                context: { ...t
                }
            })
        }
        onStatusChange(t) {
            this.#h && this.#h({
                status: t,
                client: this
            })
        }
        onPong() {
            this.#r.respond && this.delay(this.#r.delay).then(() => this.ping()), this.logger && this.logger.debug({
                title: "WebSocket pong",
                message: "WebSocket pong"
            })
        }
        onPing() {
            this.#e.respond && this.delay(this.#e.delay).then(() => this.pong()), this.logger && this.logger.debug({
                title: "WebSocket pong",
                message: "WebSocket pong"
            })
        }
        isPing(t) {
            return "PING" === t.data || "ping" === t.data || this.#e.message === t.data
        }
        isPong(t) {
            return "PONG" === t.data || "pong" === t.data || this.#r.message === t.data
        }
        parsePingPongConfig(t, e) {
            return e ? e.respond ? {
                once: e.once ? ? !1,
                message: e.message ? ? ("ping" === t ? "PING" : "PONG"),
                respond: !0,
                response: e.response ? ? ("ping" === t ? "PONG" : "PING"),
                delay: e.delay
            } : {
                once: e.once ? ? !1,
                message: e.message ? ? ("ping" === t ? "PING" : "PONG"),
                respond: !1,
                response: "",
                delay: 3e4
            } : {
                once: !1,
                message: "ping" === t ? "PING" : "PONG",
                respond: !1,
                response: "ping" === t ? "PONG" : "PING",
                delay: 3e4
            }
        }
        createSocket() {
            let t = new n(this.url);
            return t.addEventListener("open", t => this.onOpen(t)), t.addEventListener("close", t => this.onClose(t)), t.addEventListener("error", t => this.onError(t)), t.addEventListener("message", t => this.onMessage(t)), t
        }
        delay(t) {
            return new Promise(e => setTimeout(e, t))
        }
    }], 282750)
}, 919472, t => {
    "use strict";
    var e = t.i(260536),
        r = t.i(282750);
    t.i(552470).expose(new class {#
        p;#
        g;#
        y;#
        d = [];#
        b = null;
        constructor(t) {
            this.#p = t.url, this.#g = t.options ? .batchIntervalMs ? ? 1e3
        }
        async subscribe(t) {
            return this.#y = await this.#m(t), {
                status: "success"
            }
        }
        async update(t) {
            return this.#y ? .connected && (this.disconnect(), await new Promise(t => setTimeout(t, 500))), this.subscribe(t)
        }
        disconnect() {
            return (this.onWsStatusChange && this.onWsStatusChange("disconnecting"), this.#y ? .connected) ? (this.#y.disconnect(), {
                status: "success"
            }) : {
                status: "error",
                message: "socket not open"
            }
        }
        terminate() {
            return this.disconnect(), {
                status: "success"
            }
        }
        send(t) {
            return this.#y ? .send(t), {
                status: "success"
            }
        }
        ping() {
            return this.#y ? .send("PING"), {
                status: "success"
            }
        }
        pong() {
            return this.#y ? .send("PONG"), {
                status: "success"
            }
        }
        async keepAlive(t = !1) {
            return this.#y && this.#y.connected ? (t && this.#y.ping(), {
                status: "success"
            }) : {
                status: "error",
                message: "no transport or not connected"
            }
        }
        async getState() {
            return this.#y ? {
                connected: this.#y.connected,
                status: this.#y.state.status,
                socketReadyState: this.#y.state.readyState
            } : {
                connected: !1,
                status: "uninstantiated",
                socketReadyState: -1
            }
        }#
        a(t) {
            let e = this.#v(t);
            e ? .action === "pong" && this.#y ? .connected && this.#y.send("PONG"), e ? .action === "update" && this.#d.push(e)
        }#
        i() {
            this.#w(), this.onWsStatusChange && this.onWsStatusChange("disconnected")
        }#
        h(t) {
            this.onWsStatusChange && this.onWsStatusChange(t)
        }#
        v(t) {
            let r = (0, e.parseMessageEvent)(t);
            return "ping" === r.type ? {
                action: "pong"
            } : "message" === r.type ? {
                action: "update",
                data: { ...r.data,
                    eventTimestamp: Date.now()
                }
            } : void 0
        }
        async# m(t) {
            if (this.#y) {
                if (!t ? .reset && this.#y.connected) return this.#y;
                this.#y.disconnect(), await new Promise(t => setTimeout(t, 500)), this.#y = void 0
            }
            return new r.WebsocketClient({
                url: this.#p,
                autoReconnect: !0,
                ping: {
                    once: !1,
                    message: "PING",
                    respond: !0,
                    response: "PONG",
                    delay: 5e3
                },
                callbacks: {
                    onOpen: ({
                        event: t
                    }) => {
                        this.#E(), this.logger && this.logger("debug", "[SportsWorkerApi > socket.onopen]", {
                            event: JSON.stringify(t)
                        })
                    },
                    onClose: ({
                        event: t
                    }) => {
                        this.#i(), this.logger && this.logger("debug", "[SportsWorkerApi > socket.onclose]", {
                            event: JSON.stringify(t)
                        })
                    },
                    onError: ({
                        event: t
                    }) => {
                        this.logger && this.logger("error", "[SportsWorkerApi > socket.onerror]", {
                            event: JSON.stringify(t)
                        })
                    },
                    onMessage: ({
                        event: t
                    }) => {
                        this.#a(t), this.logger && this.logger("debug", "[SportsWorkerApi > socket.onmessage]", {
                            event: JSON.stringify(t)
                        })
                    },
                    onStatusChange: ({
                        status: t
                    }) => {
                        this.#h(t), this.logger && this.logger("debug", "[SportsWorkerApi > socket.onstatuschange]", {
                            status: t
                        })
                    }
                }
            })
        }#
        E() {
            this.#b && (clearInterval(this.#b), this.#b = null), this.#b = setInterval(() => this.#S(), this.#g)
        }#
        w() {
            this.#b && (clearInterval(this.#b), this.#b = null)
        }#
        S() {
            let t = [];
            for (; this.#d.length;) {
                let e = this.#d.shift();
                if (e) {
                    let r = e.data;
                    t.push(r)
                }
            }
            let e = t.sort((t, e) => t.eventTimestamp - e.eventTimestamp);
            e.length && this.onUpdates && this.onUpdates(e)
        }
        onUpdates = null;
        onWsStatusChange = null;
        logger = null
    }({
        url: "wss://sports-api.polymarket.com/ws",
        options: {
            batchIntervalMs: 1e3
        }
    })), t.s([], 919472)
}]);

//# debugId=b9d8135f-7e50-5947-c6ef-02e12b76c33a