import { bf as ne, aB as re } from "./en_US-IFPOGBSL-Dqe3iO9V.js";
var V = {}, Q, At;
function oe() {
  return At || (At = 1, Q = function() {
    return typeof Promise == "function" && Promise.prototype && Promise.prototype.then;
  }), Q;
}
var W = {}, q = {}, Rt;
function v() {
  if (Rt) return q;
  Rt = 1;
  let r;
  const o = [
    0,
    // Not used
    26,
    44,
    70,
    100,
    134,
    172,
    196,
    242,
    292,
    346,
    404,
    466,
    532,
    581,
    655,
    733,
    815,
    901,
    991,
    1085,
    1156,
    1258,
    1364,
    1474,
    1588,
    1706,
    1828,
    1921,
    2051,
    2185,
    2323,
    2465,
    2611,
    2761,
    2876,
    3034,
    3196,
    3362,
    3532,
    3706
  ];
  return q.getSymbolSize = function(n) {
    if (!n) throw new Error('"version" cannot be null or undefined');
    if (n < 1 || n > 40) throw new Error('"version" should be in range from 1 to 40');
    return n * 4 + 17;
  }, q.getSymbolTotalCodewords = function(n) {
    return o[n];
  }, q.getBCHDigit = function(i) {
    let n = 0;
    for (; i !== 0; )
      n++, i >>>= 1;
    return n;
  }, q.setToSJISFunction = function(n) {
    if (typeof n != "function")
      throw new Error('"toSJISFunc" is not a valid function.');
    r = n;
  }, q.isKanjiModeEnabled = function() {
    return typeof r < "u";
  }, q.toSJIS = function(n) {
    return r(n);
  }, q;
}
var Z = {}, It;
function Ct() {
  return It || (It = 1, (function(r) {
    r.L = { bit: 1 }, r.M = { bit: 0 }, r.Q = { bit: 3 }, r.H = { bit: 2 };
    function o(i) {
      if (typeof i != "string")
        throw new Error("Param is not a string");
      switch (i.toLowerCase()) {
        case "l":
        case "low":
          return r.L;
        case "m":
        case "medium":
          return r.M;
        case "q":
        case "quartile":
          return r.Q;
        case "h":
        case "high":
          return r.H;
        default:
          throw new Error("Unknown EC Level: " + i);
      }
    }
    r.isValid = function(n) {
      return n && typeof n.bit < "u" && n.bit >= 0 && n.bit < 4;
    }, r.from = function(n, t) {
      if (r.isValid(n))
        return n;
      try {
        return o(n);
      } catch {
        return t;
      }
    };
  })(Z)), Z;
}
var X, Nt;
function ie() {
  if (Nt) return X;
  Nt = 1;
  function r() {
    this.buffer = [], this.length = 0;
  }
  return r.prototype = {
    get: function(o) {
      const i = Math.floor(o / 8);
      return (this.buffer[i] >>> 7 - o % 8 & 1) === 1;
    },
    put: function(o, i) {
      for (let n = 0; n < i; n++)
        this.putBit((o >>> i - n - 1 & 1) === 1);
    },
    getLengthInBits: function() {
      return this.length;
    },
    putBit: function(o) {
      const i = Math.floor(this.length / 8);
      this.buffer.length <= i && this.buffer.push(0), o && (this.buffer[i] |= 128 >>> this.length % 8), this.length++;
    }
  }, X = r, X;
}
var x, Tt;
function ue() {
  if (Tt) return x;
  Tt = 1;
  function r(o) {
    if (!o || o < 1)
      throw new Error("BitMatrix size must be defined and greater than 0");
    this.size = o, this.data = new Uint8Array(o * o), this.reservedBit = new Uint8Array(o * o);
  }
  return r.prototype.set = function(o, i, n, t) {
    const e = o * this.size + i;
    this.data[e] = n, t && (this.reservedBit[e] = !0);
  }, r.prototype.get = function(o, i) {
    return this.data[o * this.size + i];
  }, r.prototype.xor = function(o, i, n) {
    this.data[o * this.size + i] ^= n;
  }, r.prototype.isReserved = function(o, i) {
    return this.reservedBit[o * this.size + i];
  }, x = r, x;
}
var $ = {}, Mt;
function se() {
  return Mt || (Mt = 1, (function(r) {
    const o = v().getSymbolSize;
    r.getRowColCoords = function(n) {
      if (n === 1) return [];
      const t = Math.floor(n / 7) + 2, e = o(n), u = e === 145 ? 26 : Math.ceil((e - 13) / (2 * t - 2)) * 2, a = [e - 7];
      for (let s = 1; s < t - 1; s++)
        a[s] = a[s - 1] - u;
      return a.push(6), a.reverse();
    }, r.getPositions = function(n) {
      const t = [], e = r.getRowColCoords(n), u = e.length;
      for (let a = 0; a < u; a++)
        for (let s = 0; s < u; s++)
          a === 0 && s === 0 || // top-left
          a === 0 && s === u - 1 || // bottom-left
          a === u - 1 && s === 0 || t.push([e[a], e[s]]);
      return t;
    };
  })($)), $;
}
var tt = {}, St;
function ae() {
  if (St) return tt;
  St = 1;
  const r = v().getSymbolSize, o = 7;
  return tt.getPositions = function(n) {
    const t = r(n);
    return [
      // top-left
      [0, 0],
      // top-right
      [t - o, 0],
      // bottom-left
      [0, t - o]
    ];
  }, tt;
}
var et = {}, Pt;
function ce() {
  return Pt || (Pt = 1, (function(r) {
    r.Patterns = {
      PATTERN000: 0,
      PATTERN001: 1,
      PATTERN010: 2,
      PATTERN011: 3,
      PATTERN100: 4,
      PATTERN101: 5,
      PATTERN110: 6,
      PATTERN111: 7
    };
    const o = {
      N1: 3,
      N2: 3,
      N3: 40,
      N4: 10
    };
    r.isValid = function(t) {
      return t != null && t !== "" && !isNaN(t) && t >= 0 && t <= 7;
    }, r.from = function(t) {
      return r.isValid(t) ? parseInt(t, 10) : void 0;
    }, r.getPenaltyN1 = function(t) {
      const e = t.size;
      let u = 0, a = 0, s = 0, c = null, E = null;
      for (let I = 0; I < e; I++) {
        a = s = 0, c = E = null;
        for (let y = 0; y < e; y++) {
          let f = t.get(I, y);
          f === c ? a++ : (a >= 5 && (u += o.N1 + (a - 5)), c = f, a = 1), f = t.get(y, I), f === E ? s++ : (s >= 5 && (u += o.N1 + (s - 5)), E = f, s = 1);
        }
        a >= 5 && (u += o.N1 + (a - 5)), s >= 5 && (u += o.N1 + (s - 5));
      }
      return u;
    }, r.getPenaltyN2 = function(t) {
      const e = t.size;
      let u = 0;
      for (let a = 0; a < e - 1; a++)
        for (let s = 0; s < e - 1; s++) {
          const c = t.get(a, s) + t.get(a, s + 1) + t.get(a + 1, s) + t.get(a + 1, s + 1);
          (c === 4 || c === 0) && u++;
        }
      return u * o.N2;
    }, r.getPenaltyN3 = function(t) {
      const e = t.size;
      let u = 0, a = 0, s = 0;
      for (let c = 0; c < e; c++) {
        a = s = 0;
        for (let E = 0; E < e; E++)
          a = a << 1 & 2047 | t.get(c, E), E >= 10 && (a === 1488 || a === 93) && u++, s = s << 1 & 2047 | t.get(E, c), E >= 10 && (s === 1488 || s === 93) && u++;
      }
      return u * o.N3;
    }, r.getPenaltyN4 = function(t) {
      let e = 0;
      const u = t.data.length;
      for (let s = 0; s < u; s++) e += t.data[s];
      return Math.abs(Math.ceil(e * 100 / u / 5) - 10) * o.N4;
    };
    function i(n, t, e) {
      switch (n) {
        case r.Patterns.PATTERN000:
          return (t + e) % 2 === 0;
        case r.Patterns.PATTERN001:
          return t % 2 === 0;
        case r.Patterns.PATTERN010:
          return e % 3 === 0;
        case r.Patterns.PATTERN011:
          return (t + e) % 3 === 0;
        case r.Patterns.PATTERN100:
          return (Math.floor(t / 2) + Math.floor(e / 3)) % 2 === 0;
        case r.Patterns.PATTERN101:
          return t * e % 2 + t * e % 3 === 0;
        case r.Patterns.PATTERN110:
          return (t * e % 2 + t * e % 3) % 2 === 0;
        case r.Patterns.PATTERN111:
          return (t * e % 3 + (t + e) % 2) % 2 === 0;
        default:
          throw new Error("bad maskPattern:" + n);
      }
    }
    r.applyMask = function(t, e) {
      const u = e.size;
      for (let a = 0; a < u; a++)
        for (let s = 0; s < u; s++)
          e.isReserved(s, a) || e.xor(s, a, i(t, s, a));
    }, r.getBestMask = function(t, e) {
      const u = Object.keys(r.Patterns).length;
      let a = 0, s = 1 / 0;
      for (let c = 0; c < u; c++) {
        e(c), r.applyMask(c, t);
        const E = r.getPenaltyN1(t) + r.getPenaltyN2(t) + r.getPenaltyN3(t) + r.getPenaltyN4(t);
        r.applyMask(c, t), E < s && (s = E, a = c);
      }
      return a;
    };
  })(et)), et;
}
var Y = {}, pt;
function Wt() {
  if (pt) return Y;
  pt = 1;
  const r = Ct(), o = [
    // L  M  Q  H
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    2,
    2,
    1,
    2,
    2,
    4,
    1,
    2,
    4,
    4,
    2,
    4,
    4,
    4,
    2,
    4,
    6,
    5,
    2,
    4,
    6,
    6,
    2,
    5,
    8,
    8,
    4,
    5,
    8,
    8,
    4,
    5,
    8,
    11,
    4,
    8,
    10,
    11,
    4,
    9,
    12,
    16,
    4,
    9,
    16,
    16,
    6,
    10,
    12,
    18,
    6,
    10,
    17,
    16,
    6,
    11,
    16,
    19,
    6,
    13,
    18,
    21,
    7,
    14,
    21,
    25,
    8,
    16,
    20,
    25,
    8,
    17,
    23,
    25,
    9,
    17,
    23,
    34,
    9,
    18,
    25,
    30,
    10,
    20,
    27,
    32,
    12,
    21,
    29,
    35,
    12,
    23,
    34,
    37,
    12,
    25,
    34,
    40,
    13,
    26,
    35,
    42,
    14,
    28,
    38,
    45,
    15,
    29,
    40,
    48,
    16,
    31,
    43,
    51,
    17,
    33,
    45,
    54,
    18,
    35,
    48,
    57,
    19,
    37,
    51,
    60,
    19,
    38,
    53,
    63,
    20,
    40,
    56,
    66,
    21,
    43,
    59,
    70,
    22,
    45,
    62,
    74,
    24,
    47,
    65,
    77,
    25,
    49,
    68,
    81
  ], i = [
    // L  M  Q  H
    7,
    10,
    13,
    17,
    10,
    16,
    22,
    28,
    15,
    26,
    36,
    44,
    20,
    36,
    52,
    64,
    26,
    48,
    72,
    88,
    36,
    64,
    96,
    112,
    40,
    72,
    108,
    130,
    48,
    88,
    132,
    156,
    60,
    110,
    160,
    192,
    72,
    130,
    192,
    224,
    80,
    150,
    224,
    264,
    96,
    176,
    260,
    308,
    104,
    198,
    288,
    352,
    120,
    216,
    320,
    384,
    132,
    240,
    360,
    432,
    144,
    280,
    408,
    480,
    168,
    308,
    448,
    532,
    180,
    338,
    504,
    588,
    196,
    364,
    546,
    650,
    224,
    416,
    600,
    700,
    224,
    442,
    644,
    750,
    252,
    476,
    690,
    816,
    270,
    504,
    750,
    900,
    300,
    560,
    810,
    960,
    312,
    588,
    870,
    1050,
    336,
    644,
    952,
    1110,
    360,
    700,
    1020,
    1200,
    390,
    728,
    1050,
    1260,
    420,
    784,
    1140,
    1350,
    450,
    812,
    1200,
    1440,
    480,
    868,
    1290,
    1530,
    510,
    924,
    1350,
    1620,
    540,
    980,
    1440,
    1710,
    570,
    1036,
    1530,
    1800,
    570,
    1064,
    1590,
    1890,
    600,
    1120,
    1680,
    1980,
    630,
    1204,
    1770,
    2100,
    660,
    1260,
    1860,
    2220,
    720,
    1316,
    1950,
    2310,
    750,
    1372,
    2040,
    2430
  ];
  return Y.getBlocksCount = function(t, e) {
    switch (e) {
      case r.L:
        return o[(t - 1) * 4 + 0];
      case r.M:
        return o[(t - 1) * 4 + 1];
      case r.Q:
        return o[(t - 1) * 4 + 2];
      case r.H:
        return o[(t - 1) * 4 + 3];
      default:
        return;
    }
  }, Y.getTotalCodewordsCount = function(t, e) {
    switch (e) {
      case r.L:
        return i[(t - 1) * 4 + 0];
      case r.M:
        return i[(t - 1) * 4 + 1];
      case r.Q:
        return i[(t - 1) * 4 + 2];
      case r.H:
        return i[(t - 1) * 4 + 3];
      default:
        return;
    }
  }, Y;
}
var nt = {}, H = {}, bt;
function le() {
  if (bt) return H;
  bt = 1;
  const r = new Uint8Array(512), o = new Uint8Array(256);
  return (function() {
    let n = 1;
    for (let t = 0; t < 255; t++)
      r[t] = n, o[n] = t, n <<= 1, n & 256 && (n ^= 285);
    for (let t = 255; t < 512; t++)
      r[t] = r[t - 255];
  })(), H.log = function(n) {
    if (n < 1) throw new Error("log(" + n + ")");
    return o[n];
  }, H.exp = function(n) {
    return r[n];
  }, H.mul = function(n, t) {
    return n === 0 || t === 0 ? 0 : r[o[n] + o[t]];
  }, H;
}
var Lt;
function fe() {
  return Lt || (Lt = 1, (function(r) {
    const o = le();
    r.mul = function(n, t) {
      const e = new Uint8Array(n.length + t.length - 1);
      for (let u = 0; u < n.length; u++)
        for (let a = 0; a < t.length; a++)
          e[u + a] ^= o.mul(n[u], t[a]);
      return e;
    }, r.mod = function(n, t) {
      let e = new Uint8Array(n);
      for (; e.length - t.length >= 0; ) {
        const u = e[0];
        for (let s = 0; s < t.length; s++)
          e[s] ^= o.mul(t[s], u);
        let a = 0;
        for (; a < e.length && e[a] === 0; ) a++;
        e = e.slice(a);
      }
      return e;
    }, r.generateECPolynomial = function(n) {
      let t = new Uint8Array([1]);
      for (let e = 0; e < n; e++)
        t = r.mul(t, new Uint8Array([1, o.exp(e)]));
      return t;
    };
  })(nt)), nt;
}
var rt, Dt;
function de() {
  if (Dt) return rt;
  Dt = 1;
  const r = fe();
  function o(i) {
    this.genPoly = void 0, this.degree = i, this.degree && this.initialize(this.degree);
  }
  return o.prototype.initialize = function(n) {
    this.degree = n, this.genPoly = r.generateECPolynomial(this.degree);
  }, o.prototype.encode = function(n) {
    if (!this.genPoly)
      throw new Error("Encoder not initialized");
    const t = new Uint8Array(n.length + this.degree);
    t.set(n);
    const e = r.mod(t, this.genPoly), u = this.degree - e.length;
    if (u > 0) {
      const a = new Uint8Array(this.degree);
      return a.set(e, u), a;
    }
    return e;
  }, rt = o, rt;
}
var ot = {}, it = {}, ut = {}, Ut;
function Zt() {
  return Ut || (Ut = 1, ut.isValid = function(o) {
    return !isNaN(o) && o >= 1 && o <= 40;
  }), ut;
}
var L = {}, Ft;
function Xt() {
  if (Ft) return L;
  Ft = 1;
  const r = "[0-9]+", o = "[A-Z $%*+\\-./:]+";
  let i = "(?:[u3000-u303F]|[u3040-u309F]|[u30A0-u30FF]|[uFF00-uFFEF]|[u4E00-u9FAF]|[u2605-u2606]|[u2190-u2195]|u203B|[u2010u2015u2018u2019u2025u2026u201Cu201Du2225u2260]|[u0391-u0451]|[u00A7u00A8u00B1u00B4u00D7u00F7])+";
  i = i.replace(/u/g, "\\u");
  const n = "(?:(?![A-Z0-9 $%*+\\-./:]|" + i + `)(?:.|[\r
]))+`;
  L.KANJI = new RegExp(i, "g"), L.BYTE_KANJI = new RegExp("[^A-Z0-9 $%*+\\-./:]+", "g"), L.BYTE = new RegExp(n, "g"), L.NUMERIC = new RegExp(r, "g"), L.ALPHANUMERIC = new RegExp(o, "g");
  const t = new RegExp("^" + i + "$"), e = new RegExp("^" + r + "$"), u = new RegExp("^[A-Z0-9 $%*+\\-./:]+$");
  return L.testKanji = function(s) {
    return t.test(s);
  }, L.testNumeric = function(s) {
    return e.test(s);
  }, L.testAlphanumeric = function(s) {
    return u.test(s);
  }, L;
}
var qt;
function k() {
  return qt || (qt = 1, (function(r) {
    const o = Zt(), i = Xt();
    r.NUMERIC = {
      id: "Numeric",
      bit: 1,
      ccBits: [10, 12, 14]
    }, r.ALPHANUMERIC = {
      id: "Alphanumeric",
      bit: 2,
      ccBits: [9, 11, 13]
    }, r.BYTE = {
      id: "Byte",
      bit: 4,
      ccBits: [8, 16, 16]
    }, r.KANJI = {
      id: "Kanji",
      bit: 8,
      ccBits: [8, 10, 12]
    }, r.MIXED = {
      bit: -1
    }, r.getCharCountIndicator = function(e, u) {
      if (!e.ccBits) throw new Error("Invalid mode: " + e);
      if (!o.isValid(u))
        throw new Error("Invalid version: " + u);
      return u >= 1 && u < 10 ? e.ccBits[0] : u < 27 ? e.ccBits[1] : e.ccBits[2];
    }, r.getBestModeForData = function(e) {
      return i.testNumeric(e) ? r.NUMERIC : i.testAlphanumeric(e) ? r.ALPHANUMERIC : i.testKanji(e) ? r.KANJI : r.BYTE;
    }, r.toString = function(e) {
      if (e && e.id) return e.id;
      throw new Error("Invalid mode");
    }, r.isValid = function(e) {
      return e && e.bit && e.ccBits;
    };
    function n(t) {
      if (typeof t != "string")
        throw new Error("Param is not a string");
      switch (t.toLowerCase()) {
        case "numeric":
          return r.NUMERIC;
        case "alphanumeric":
          return r.ALPHANUMERIC;
        case "kanji":
          return r.KANJI;
        case "byte":
          return r.BYTE;
        default:
          throw new Error("Unknown mode: " + t);
      }
    }
    r.from = function(e, u) {
      if (r.isValid(e))
        return e;
      try {
        return n(e);
      } catch {
        return u;
      }
    };
  })(it)), it;
}
var vt;
function ge() {
  return vt || (vt = 1, (function(r) {
    const o = v(), i = Wt(), n = Ct(), t = k(), e = Zt(), u = 7973, a = o.getBCHDigit(u);
    function s(y, f, S) {
      for (let P = 1; P <= 40; P++)
        if (f <= r.getCapacity(P, S, y))
          return P;
    }
    function c(y, f) {
      return t.getCharCountIndicator(y, f) + 4;
    }
    function E(y, f) {
      let S = 0;
      return y.forEach(function(P) {
        const b = c(P.mode, f);
        S += b + P.getBitsLength();
      }), S;
    }
    function I(y, f) {
      for (let S = 1; S <= 40; S++)
        if (E(y, S) <= r.getCapacity(S, f, t.MIXED))
          return S;
    }
    r.from = function(f, S) {
      return e.isValid(f) ? parseInt(f, 10) : S;
    }, r.getCapacity = function(f, S, P) {
      if (!e.isValid(f))
        throw new Error("Invalid QR Code version");
      typeof P > "u" && (P = t.BYTE);
      const b = o.getSymbolTotalCodewords(f), N = i.getTotalCodewordsCount(f, S), M = (b - N) * 8;
      if (P === t.MIXED) return M;
      const R = M - c(P, f);
      switch (P) {
        case t.NUMERIC:
          return Math.floor(R / 10 * 3);
        case t.ALPHANUMERIC:
          return Math.floor(R / 11 * 2);
        case t.KANJI:
          return Math.floor(R / 13);
        case t.BYTE:
        default:
          return Math.floor(R / 8);
      }
    }, r.getBestVersionForData = function(f, S) {
      let P;
      const b = n.from(S, n.M);
      if (Array.isArray(f)) {
        if (f.length > 1)
          return I(f, b);
        if (f.length === 0)
          return 1;
        P = f[0];
      } else
        P = f;
      return s(P.mode, P.getLength(), b);
    }, r.getEncodedBits = function(f) {
      if (!e.isValid(f) || f < 7)
        throw new Error("Invalid QR Code version");
      let S = f << 12;
      for (; o.getBCHDigit(S) - a >= 0; )
        S ^= u << o.getBCHDigit(S) - a;
      return f << 12 | S;
    };
  })(ot)), ot;
}
var st = {}, kt;
function he() {
  if (kt) return st;
  kt = 1;
  const r = v(), o = 1335, i = 21522, n = r.getBCHDigit(o);
  return st.getEncodedBits = function(e, u) {
    const a = e.bit << 3 | u;
    let s = a << 10;
    for (; r.getBCHDigit(s) - n >= 0; )
      s ^= o << r.getBCHDigit(s) - n;
    return (a << 10 | s) ^ i;
  }, st;
}
var at = {}, ct, zt;
function me() {
  if (zt) return ct;
  zt = 1;
  const r = k();
  function o(i) {
    this.mode = r.NUMERIC, this.data = i.toString();
  }
  return o.getBitsLength = function(n) {
    return 10 * Math.floor(n / 3) + (n % 3 ? n % 3 * 3 + 1 : 0);
  }, o.prototype.getLength = function() {
    return this.data.length;
  }, o.prototype.getBitsLength = function() {
    return o.getBitsLength(this.data.length);
  }, o.prototype.write = function(n) {
    let t, e, u;
    for (t = 0; t + 3 <= this.data.length; t += 3)
      e = this.data.substr(t, 3), u = parseInt(e, 10), n.put(u, 10);
    const a = this.data.length - t;
    a > 0 && (e = this.data.substr(t), u = parseInt(e, 10), n.put(u, a * 3 + 1));
  }, ct = o, ct;
}
var lt, Vt;
function we() {
  if (Vt) return lt;
  Vt = 1;
  const r = k(), o = [
    "0",
    "1",
    "2",
    "3",
    "4",
    "5",
    "6",
    "7",
    "8",
    "9",
    "A",
    "B",
    "C",
    "D",
    "E",
    "F",
    "G",
    "H",
    "I",
    "J",
    "K",
    "L",
    "M",
    "N",
    "O",
    "P",
    "Q",
    "R",
    "S",
    "T",
    "U",
    "V",
    "W",
    "X",
    "Y",
    "Z",
    " ",
    "$",
    "%",
    "*",
    "+",
    "-",
    ".",
    "/",
    ":"
  ];
  function i(n) {
    this.mode = r.ALPHANUMERIC, this.data = n;
  }
  return i.getBitsLength = function(t) {
    return 11 * Math.floor(t / 2) + 6 * (t % 2);
  }, i.prototype.getLength = function() {
    return this.data.length;
  }, i.prototype.getBitsLength = function() {
    return i.getBitsLength(this.data.length);
  }, i.prototype.write = function(t) {
    let e;
    for (e = 0; e + 2 <= this.data.length; e += 2) {
      let u = o.indexOf(this.data[e]) * 45;
      u += o.indexOf(this.data[e + 1]), t.put(u, 11);
    }
    this.data.length % 2 && t.put(o.indexOf(this.data[e]), 6);
  }, lt = i, lt;
}
var ft, Kt;
function Ce() {
  return Kt || (Kt = 1, ft = function(o) {
    for (var i = [], n = o.length, t = 0; t < n; t++) {
      var e = o.charCodeAt(t);
      if (e >= 55296 && e <= 56319 && n > t + 1) {
        var u = o.charCodeAt(t + 1);
        u >= 56320 && u <= 57343 && (e = (e - 55296) * 1024 + u - 56320 + 65536, t += 1);
      }
      if (e < 128) {
        i.push(e);
        continue;
      }
      if (e < 2048) {
        i.push(e >> 6 | 192), i.push(e & 63 | 128);
        continue;
      }
      if (e < 55296 || e >= 57344 && e < 65536) {
        i.push(e >> 12 | 224), i.push(e >> 6 & 63 | 128), i.push(e & 63 | 128);
        continue;
      }
      if (e >= 65536 && e <= 1114111) {
        i.push(e >> 18 | 240), i.push(e >> 12 & 63 | 128), i.push(e >> 6 & 63 | 128), i.push(e & 63 | 128);
        continue;
      }
      i.push(239, 191, 189);
    }
    return new Uint8Array(i).buffer;
  }), ft;
}
var dt, Ht;
function Ee() {
  if (Ht) return dt;
  Ht = 1;
  const r = Ce(), o = k();
  function i(n) {
    this.mode = o.BYTE, typeof n == "string" && (n = r(n)), this.data = new Uint8Array(n);
  }
  return i.getBitsLength = function(t) {
    return t * 8;
  }, i.prototype.getLength = function() {
    return this.data.length;
  }, i.prototype.getBitsLength = function() {
    return i.getBitsLength(this.data.length);
  }, i.prototype.write = function(n) {
    for (let t = 0, e = this.data.length; t < e; t++)
      n.put(this.data[t], 8);
  }, dt = i, dt;
}
var gt, Jt;
function ye() {
  if (Jt) return gt;
  Jt = 1;
  const r = k(), o = v();
  function i(n) {
    this.mode = r.KANJI, this.data = n;
  }
  return i.getBitsLength = function(t) {
    return t * 13;
  }, i.prototype.getLength = function() {
    return this.data.length;
  }, i.prototype.getBitsLength = function() {
    return i.getBitsLength(this.data.length);
  }, i.prototype.write = function(n) {
    let t;
    for (t = 0; t < this.data.length; t++) {
      let e = o.toSJIS(this.data[t]);
      if (e >= 33088 && e <= 40956)
        e -= 33088;
      else if (e >= 57408 && e <= 60351)
        e -= 49472;
      else
        throw new Error(
          "Invalid SJIS character: " + this.data[t] + `
Make sure your charset is UTF-8`
        );
      e = (e >>> 8 & 255) * 192 + (e & 255), n.put(e, 13);
    }
  }, gt = i, gt;
}
var Yt;
function Be() {
  return Yt || (Yt = 1, (function(r) {
    const o = k(), i = me(), n = we(), t = Ee(), e = ye(), u = Xt(), a = v(), s = ne();
    function c(N) {
      return unescape(encodeURIComponent(N)).length;
    }
    function E(N, M, R) {
      const B = [];
      let p;
      for (; (p = N.exec(R)) !== null; )
        B.push({
          data: p[0],
          index: p.index,
          mode: M,
          length: p[0].length
        });
      return B;
    }
    function I(N) {
      const M = E(u.NUMERIC, o.NUMERIC, N), R = E(u.ALPHANUMERIC, o.ALPHANUMERIC, N);
      let B, p;
      return a.isKanjiModeEnabled() ? (B = E(u.BYTE, o.BYTE, N), p = E(u.KANJI, o.KANJI, N)) : (B = E(u.BYTE_KANJI, o.BYTE, N), p = []), M.concat(R, B, p).sort(function(w, m) {
        return w.index - m.index;
      }).map(function(w) {
        return {
          data: w.data,
          mode: w.mode,
          length: w.length
        };
      });
    }
    function y(N, M) {
      switch (M) {
        case o.NUMERIC:
          return i.getBitsLength(N);
        case o.ALPHANUMERIC:
          return n.getBitsLength(N);
        case o.KANJI:
          return e.getBitsLength(N);
        case o.BYTE:
          return t.getBitsLength(N);
      }
    }
    function f(N) {
      return N.reduce(function(M, R) {
        const B = M.length - 1 >= 0 ? M[M.length - 1] : null;
        return B && B.mode === R.mode ? (M[M.length - 1].data += R.data, M) : (M.push(R), M);
      }, []);
    }
    function S(N) {
      const M = [];
      for (let R = 0; R < N.length; R++) {
        const B = N[R];
        switch (B.mode) {
          case o.NUMERIC:
            M.push([
              B,
              { data: B.data, mode: o.ALPHANUMERIC, length: B.length },
              { data: B.data, mode: o.BYTE, length: B.length }
            ]);
            break;
          case o.ALPHANUMERIC:
            M.push([
              B,
              { data: B.data, mode: o.BYTE, length: B.length }
            ]);
            break;
          case o.KANJI:
            M.push([
              B,
              { data: B.data, mode: o.BYTE, length: c(B.data) }
            ]);
            break;
          case o.BYTE:
            M.push([
              { data: B.data, mode: o.BYTE, length: c(B.data) }
            ]);
        }
      }
      return M;
    }
    function P(N, M) {
      const R = {}, B = { start: {} };
      let p = ["start"];
      for (let d = 0; d < N.length; d++) {
        const w = N[d], m = [];
        for (let l = 0; l < w.length; l++) {
          const A = w[l], g = "" + d + l;
          m.push(g), R[g] = { node: A, lastCount: 0 }, B[g] = {};
          for (let C = 0; C < p.length; C++) {
            const h = p[C];
            R[h] && R[h].node.mode === A.mode ? (B[h][g] = y(R[h].lastCount + A.length, A.mode) - y(R[h].lastCount, A.mode), R[h].lastCount += A.length) : (R[h] && (R[h].lastCount = A.length), B[h][g] = y(A.length, A.mode) + 4 + o.getCharCountIndicator(A.mode, M));
          }
        }
        p = m;
      }
      for (let d = 0; d < p.length; d++)
        B[p[d]].end = 0;
      return { map: B, table: R };
    }
    function b(N, M) {
      let R;
      const B = o.getBestModeForData(N);
      if (R = o.from(M, B), R !== o.BYTE && R.bit < B.bit)
        throw new Error('"' + N + '" cannot be encoded with mode ' + o.toString(R) + `.
 Suggested mode is: ` + o.toString(B));
      switch (R === o.KANJI && !a.isKanjiModeEnabled() && (R = o.BYTE), R) {
        case o.NUMERIC:
          return new i(N);
        case o.ALPHANUMERIC:
          return new n(N);
        case o.KANJI:
          return new e(N);
        case o.BYTE:
          return new t(N);
      }
    }
    r.fromArray = function(M) {
      return M.reduce(function(R, B) {
        return typeof B == "string" ? R.push(b(B, null)) : B.data && R.push(b(B.data, B.mode)), R;
      }, []);
    }, r.fromString = function(M, R) {
      const B = I(M, a.isKanjiModeEnabled()), p = S(B), d = P(p, R), w = s.find_path(d.map, "start", "end"), m = [];
      for (let l = 1; l < w.length - 1; l++)
        m.push(d.table[w[l]].node);
      return r.fromArray(f(m));
    }, r.rawSplit = function(M) {
      return r.fromArray(
        I(M, a.isKanjiModeEnabled())
      );
    };
  })(at)), at;
}
var _t;
function Ae() {
  if (_t) return W;
  _t = 1;
  const r = v(), o = Ct(), i = ie(), n = ue(), t = se(), e = ae(), u = ce(), a = Wt(), s = de(), c = ge(), E = he(), I = k(), y = Be();
  function f(d, w) {
    const m = d.size, l = e.getPositions(w);
    for (let A = 0; A < l.length; A++) {
      const g = l[A][0], C = l[A][1];
      for (let h = -1; h <= 7; h++)
        if (!(g + h <= -1 || m <= g + h))
          for (let T = -1; T <= 7; T++)
            C + T <= -1 || m <= C + T || (h >= 0 && h <= 6 && (T === 0 || T === 6) || T >= 0 && T <= 6 && (h === 0 || h === 6) || h >= 2 && h <= 4 && T >= 2 && T <= 4 ? d.set(g + h, C + T, !0, !0) : d.set(g + h, C + T, !1, !0));
    }
  }
  function S(d) {
    const w = d.size;
    for (let m = 8; m < w - 8; m++) {
      const l = m % 2 === 0;
      d.set(m, 6, l, !0), d.set(6, m, l, !0);
    }
  }
  function P(d, w) {
    const m = t.getPositions(w);
    for (let l = 0; l < m.length; l++) {
      const A = m[l][0], g = m[l][1];
      for (let C = -2; C <= 2; C++)
        for (let h = -2; h <= 2; h++)
          C === -2 || C === 2 || h === -2 || h === 2 || C === 0 && h === 0 ? d.set(A + C, g + h, !0, !0) : d.set(A + C, g + h, !1, !0);
    }
  }
  function b(d, w) {
    const m = d.size, l = c.getEncodedBits(w);
    let A, g, C;
    for (let h = 0; h < 18; h++)
      A = Math.floor(h / 3), g = h % 3 + m - 8 - 3, C = (l >> h & 1) === 1, d.set(A, g, C, !0), d.set(g, A, C, !0);
  }
  function N(d, w, m) {
    const l = d.size, A = E.getEncodedBits(w, m);
    let g, C;
    for (g = 0; g < 15; g++)
      C = (A >> g & 1) === 1, g < 6 ? d.set(g, 8, C, !0) : g < 8 ? d.set(g + 1, 8, C, !0) : d.set(l - 15 + g, 8, C, !0), g < 8 ? d.set(8, l - g - 1, C, !0) : g < 9 ? d.set(8, 15 - g - 1 + 1, C, !0) : d.set(8, 15 - g - 1, C, !0);
    d.set(l - 8, 8, 1, !0);
  }
  function M(d, w) {
    const m = d.size;
    let l = -1, A = m - 1, g = 7, C = 0;
    for (let h = m - 1; h > 0; h -= 2)
      for (h === 6 && h--; ; ) {
        for (let T = 0; T < 2; T++)
          if (!d.isReserved(A, h - T)) {
            let F = !1;
            C < w.length && (F = (w[C] >>> g & 1) === 1), d.set(A, h - T, F), g--, g === -1 && (C++, g = 7);
          }
        if (A += l, A < 0 || m <= A) {
          A -= l, l = -l;
          break;
        }
      }
  }
  function R(d, w, m) {
    const l = new i();
    m.forEach(function(T) {
      l.put(T.mode.bit, 4), l.put(T.getLength(), I.getCharCountIndicator(T.mode, d)), T.write(l);
    });
    const A = r.getSymbolTotalCodewords(d), g = a.getTotalCodewordsCount(d, w), C = (A - g) * 8;
    for (l.getLengthInBits() + 4 <= C && l.put(0, 4); l.getLengthInBits() % 8 !== 0; )
      l.putBit(0);
    const h = (C - l.getLengthInBits()) / 8;
    for (let T = 0; T < h; T++)
      l.put(T % 2 ? 17 : 236, 8);
    return B(l, d, w);
  }
  function B(d, w, m) {
    const l = r.getSymbolTotalCodewords(w), A = a.getTotalCodewordsCount(w, m), g = l - A, C = a.getBlocksCount(w, m), h = l % C, T = C - h, F = Math.floor(l / C), K = Math.floor(g / C), $t = K + 1, Et = F - K, te = new s(Et);
    let _ = 0;
    const J = new Array(C), yt = new Array(C);
    let O = 0;
    const ee = new Uint8Array(d.buffer);
    for (let z = 0; z < C; z++) {
      const G = z < T ? K : $t;
      J[z] = ee.slice(_, _ + G), yt[z] = te.encode(J[z]), _ += G, O = Math.max(O, G);
    }
    const j = new Uint8Array(l);
    let Bt = 0, D, U;
    for (D = 0; D < O; D++)
      for (U = 0; U < C; U++)
        D < J[U].length && (j[Bt++] = J[U][D]);
    for (D = 0; D < Et; D++)
      for (U = 0; U < C; U++)
        j[Bt++] = yt[U][D];
    return j;
  }
  function p(d, w, m, l) {
    let A;
    if (Array.isArray(d))
      A = y.fromArray(d);
    else if (typeof d == "string") {
      let F = w;
      if (!F) {
        const K = y.rawSplit(d);
        F = c.getBestVersionForData(K, m);
      }
      A = y.fromString(d, F || 40);
    } else
      throw new Error("Invalid data");
    const g = c.getBestVersionForData(A, m);
    if (!g)
      throw new Error("The amount of data is too big to be stored in a QR Code");
    if (!w)
      w = g;
    else if (w < g)
      throw new Error(
        `
The chosen QR Code version cannot contain this amount of data.
Minimum version required to store current data is: ` + g + `.
`
      );
    const C = R(w, m, A), h = r.getSymbolSize(w), T = new n(h);
    return f(T, w), S(T), P(T, w), N(T, m, 0), w >= 7 && b(T, w), M(T, C), isNaN(l) && (l = u.getBestMask(
      T,
      N.bind(null, T, m)
    )), u.applyMask(l, T), N(T, m, l), {
      modules: T,
      version: w,
      errorCorrectionLevel: m,
      maskPattern: l,
      segments: A
    };
  }
  return W.create = function(w, m) {
    if (typeof w > "u" || w === "")
      throw new Error("No input text");
    let l = o.M, A, g;
    return typeof m < "u" && (l = o.from(m.errorCorrectionLevel, o.M), A = c.from(m.version), g = u.from(m.maskPattern), m.toSJISFunc && r.setToSJISFunction(m.toSJISFunc)), p(w, A, l, g);
  }, W;
}
var ht = {}, mt = {}, Ot;
function xt() {
  return Ot || (Ot = 1, (function(r) {
    function o(i) {
      if (typeof i == "number" && (i = i.toString()), typeof i != "string")
        throw new Error("Color should be defined as hex string");
      let n = i.slice().replace("#", "").split("");
      if (n.length < 3 || n.length === 5 || n.length > 8)
        throw new Error("Invalid hex color: " + i);
      (n.length === 3 || n.length === 4) && (n = Array.prototype.concat.apply([], n.map(function(e) {
        return [e, e];
      }))), n.length === 6 && n.push("F", "F");
      const t = parseInt(n.join(""), 16);
      return {
        r: t >> 24 & 255,
        g: t >> 16 & 255,
        b: t >> 8 & 255,
        a: t & 255,
        hex: "#" + n.slice(0, 6).join("")
      };
    }
    r.getOptions = function(n) {
      n || (n = {}), n.color || (n.color = {});
      const t = typeof n.margin > "u" || n.margin === null || n.margin < 0 ? 4 : n.margin, e = n.width && n.width >= 21 ? n.width : void 0, u = n.scale || 4;
      return {
        width: e,
        scale: e ? 4 : u,
        margin: t,
        color: {
          dark: o(n.color.dark || "#000000ff"),
          light: o(n.color.light || "#ffffffff")
        },
        type: n.type,
        rendererOpts: n.rendererOpts || {}
      };
    }, r.getScale = function(n, t) {
      return t.width && t.width >= n + t.margin * 2 ? t.width / (n + t.margin * 2) : t.scale;
    }, r.getImageWidth = function(n, t) {
      const e = r.getScale(n, t);
      return Math.floor((n + t.margin * 2) * e);
    }, r.qrToImageData = function(n, t, e) {
      const u = t.modules.size, a = t.modules.data, s = r.getScale(u, e), c = Math.floor((u + e.margin * 2) * s), E = e.margin * s, I = [e.color.light, e.color.dark];
      for (let y = 0; y < c; y++)
        for (let f = 0; f < c; f++) {
          let S = (y * c + f) * 4, P = e.color.light;
          if (y >= E && f >= E && y < c - E && f < c - E) {
            const b = Math.floor((y - E) / s), N = Math.floor((f - E) / s);
            P = I[a[b * u + N] ? 1 : 0];
          }
          n[S++] = P.r, n[S++] = P.g, n[S++] = P.b, n[S] = P.a;
        }
    };
  })(mt)), mt;
}
var jt;
function Re() {
  return jt || (jt = 1, (function(r) {
    const o = xt();
    function i(t, e, u) {
      t.clearRect(0, 0, e.width, e.height), e.style || (e.style = {}), e.height = u, e.width = u, e.style.height = u + "px", e.style.width = u + "px";
    }
    function n() {
      try {
        return document.createElement("canvas");
      } catch {
        throw new Error("You need to specify a canvas element");
      }
    }
    r.render = function(e, u, a) {
      let s = a, c = u;
      typeof s > "u" && (!u || !u.getContext) && (s = u, u = void 0), u || (c = n()), s = o.getOptions(s);
      const E = o.getImageWidth(e.modules.size, s), I = c.getContext("2d"), y = I.createImageData(E, E);
      return o.qrToImageData(y.data, e, s), i(I, c, E), I.putImageData(y, 0, 0), c;
    }, r.renderToDataURL = function(e, u, a) {
      let s = a;
      typeof s > "u" && (!u || !u.getContext) && (s = u, u = void 0), s || (s = {});
      const c = r.render(e, u, s), E = s.type || "image/png", I = s.rendererOpts || {};
      return c.toDataURL(E, I.quality);
    };
  })(ht)), ht;
}
var wt = {}, Gt;
function Ie() {
  if (Gt) return wt;
  Gt = 1;
  const r = xt();
  function o(t, e) {
    const u = t.a / 255, a = e + '="' + t.hex + '"';
    return u < 1 ? a + " " + e + '-opacity="' + u.toFixed(2).slice(1) + '"' : a;
  }
  function i(t, e, u) {
    let a = t + e;
    return typeof u < "u" && (a += " " + u), a;
  }
  function n(t, e, u) {
    let a = "", s = 0, c = !1, E = 0;
    for (let I = 0; I < t.length; I++) {
      const y = Math.floor(I % e), f = Math.floor(I / e);
      !y && !c && (c = !0), t[I] ? (E++, I > 0 && y > 0 && t[I - 1] || (a += c ? i("M", y + u, 0.5 + f + u) : i("m", s, 0), s = 0, c = !1), y + 1 < e && t[I + 1] || (a += i("h", E), E = 0)) : s++;
    }
    return a;
  }
  return wt.render = function(e, u, a) {
    const s = r.getOptions(u), c = e.modules.size, E = e.modules.data, I = c + s.margin * 2, y = s.color.light.a ? "<path " + o(s.color.light, "fill") + ' d="M0 0h' + I + "v" + I + 'H0z"/>' : "", f = "<path " + o(s.color.dark, "stroke") + ' d="' + n(E, c, s.margin) + '"/>', S = 'viewBox="0 0 ' + I + " " + I + '"', b = '<svg xmlns="http://www.w3.org/2000/svg" ' + (s.width ? 'width="' + s.width + '" height="' + s.width + '" ' : "") + S + ' shape-rendering="crispEdges">' + y + f + `</svg>
`;
    return typeof a == "function" && a(null, b), b;
  }, wt;
}
var Qt;
function Ne() {
  if (Qt) return V;
  Qt = 1;
  const r = oe(), o = Ae(), i = Re(), n = Ie();
  function t(e, u, a, s, c) {
    const E = [].slice.call(arguments, 1), I = E.length, y = typeof E[I - 1] == "function";
    if (!y && !r())
      throw new Error("Callback required as last argument");
    if (y) {
      if (I < 2)
        throw new Error("Too few arguments provided");
      I === 2 ? (c = a, a = u, u = s = void 0) : I === 3 && (u.getContext && typeof c > "u" ? (c = s, s = void 0) : (c = s, s = a, a = u, u = void 0));
    } else {
      if (I < 1)
        throw new Error("Too few arguments provided");
      return I === 1 ? (a = u, u = s = void 0) : I === 2 && !u.getContext && (s = a, a = u, u = void 0), new Promise(function(f, S) {
        try {
          const P = o.create(a, s);
          f(e(P, u, s));
        } catch (P) {
          S(P);
        }
      });
    }
    try {
      const f = o.create(a, s);
      c(null, e(f, u, s));
    } catch (f) {
      c(f);
    }
  }
  return V.create = o.create, V.toCanvas = t.bind(null, i.render), V.toDataURL = t.bind(null, i.renderToDataURL), V.toString = t.bind(null, function(e, u, a) {
    return n.render(e, a);
  }), V;
}
var Te = Ne();
const Se = /* @__PURE__ */ re(Te);
export {
  Se as Q
};
